[SignalingServer] Update latest offload.js 56/274856/5
authorInsoon Kim <is46.kim@samsung.com>
Wed, 11 May 2022 03:55:20 +0000 (12:55 +0900)
committerInsoon Kim <is46.kim@samsung.com>
Wed, 11 May 2022 08:21:05 +0000 (17:21 +0900)
Disable the wildcard certificate and domain name by default for public

Change-Id: Ie8eec92688736c421f32a1f8b092d6c98833df4e
Signed-off-by: Insoon Kim <is46.kim@samsung.com>
12 files changed:
device_home/shared/res/offload.js
device_home/signaling_server/gen/config.js [new file with mode: 0644]
device_home/signaling_server/gen/config.json [new file with mode: 0644]
device_home/signaling_server/gen/edge.js
device_home/signaling_server/gen/public/offload-worker.js [deleted file]
device_home/signaling_server/gen/public/offload-worker/index.html [moved from device_home/signaling_server/gen/public/offload-worker.html with 100% similarity]
device_home/signaling_server/gen/public/offload-worker/js/log.js [moved from device_home/signaling_server/gen/public/js/log.js with 50% similarity]
device_home/signaling_server/gen/public/offload-worker/js/main.js [moved from device_home/signaling_server/gen/public/js/main.js with 97% similarity]
device_home/signaling_server/gen/public/offload-worker/offload-worker.js [new file with mode: 0644]
device_home/signaling_server/gen/service.js
device_home/signaling_server/gen/socket-tizen.js
device_home/signaling_server/gen/util.js

index 66a50a5..4a367a3 100644 (file)
@@ -1,4 +1,4 @@
-window.offload=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=65)}([function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(28))&&r.__esModule?r:{default:r};var i=["debug","error","info","log","warn","time","timeEnd","table"];t.default=function e(t){var n=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("Need a prefix when creating Logger class");i.forEach((function(e){e.indexOf("time")>-1?n[e]=(0,o.default)("".concat("offload",":TIME:")):n[e]=(0,o.default)("".concat("offload",":").concat(e.toUpperCase(),":").concat(t)),n[e].log=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.apply(this,t)}.bind(console[e])}))}},function(e,t,n){var r,o=n(47),i=n(15),s=n(48),a=n(49),c=n(50);"undefined"!=typeof ArrayBuffer&&(r=n(51));var u="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),l="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),f=u||l;t.protocol=3;var h=t.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},p=o(h),d={type:"error",data:"parser error"},g=n(52);function y(e,t,n){for(var r=new Array(e.length),o=a(e.length,n),i=function(e,n,o){t(n,(function(t,n){r[e]=n,o(t,r)}))},s=0;s<e.length;s++)i(s,e[s],o)}t.encodePacket=function(e,n,r,o){"function"==typeof n&&(o=n,n=!1),"function"==typeof r&&(o=r,r=null);var i=void 0===e.data?void 0:e.data.buffer||e.data;if("undefined"!=typeof ArrayBuffer&&i instanceof ArrayBuffer)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var o=e.data,i=new Uint8Array(o),s=new Uint8Array(1+o.byteLength);s[0]=h[e.type];for(var a=0;a<i.length;a++)s[a+1]=i[a];return r(s.buffer)}(e,n,o);if(void 0!==g&&i instanceof g)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);if(f)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var o=new FileReader;return o.onload=function(){t.encodePacket({type:e.type,data:o.result},n,!0,r)},o.readAsArrayBuffer(e.data)}(e,n,r);var o=new Uint8Array(1);o[0]=h[e.type];var i=new g([o.buffer,e.data]);return r(i)}(e,n,o);if(i&&i.base64)return function(e,n){var r="b"+t.packets[e.type]+e.data.data;return n(r)}(e,o);var s=h[e.type];return void 0!==e.data&&(s+=r?c.encode(String(e.data),{strict:!1}):String(e.data)),o(""+s)},t.encodeBase64Packet=function(e,n){var r,o="b"+t.packets[e.type];if(void 0!==g&&e.data instanceof g){var i=new FileReader;return i.onload=function(){var e=i.result.split(",")[1];n(o+e)},i.readAsDataURL(e.data)}try{r=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(t){for(var s=new Uint8Array(e.data),a=new Array(s.length),c=0;c<s.length;c++)a[c]=s[c];r=String.fromCharCode.apply(null,a)}return o+=btoa(r),n(o)},t.decodePacket=function(e,n,r){if(void 0===e)return d;if("string"==typeof e){if("b"===e.charAt(0))return t.decodeBase64Packet(e.substr(1),n);if(r&&!1===(e=function(e){try{e=c.decode(e,{strict:!1})}catch(e){return!1}return e}(e)))return d;var o=e.charAt(0);return Number(o)==o&&p[o]?e.length>1?{type:p[o],data:e.substring(1)}:{type:p[o]}:d}o=new Uint8Array(e)[0];var i=s(e,1);return g&&"blob"===n&&(i=new g([i])),{type:p[o],data:i}},t.decodeBase64Packet=function(e,t){var n=p[e.charAt(0)];if(!r)return{type:n,data:{base64:!0,data:e.substr(1)}};var o=r.decode(e.substr(1));return"blob"===t&&g&&(o=new g([o])),{type:n,data:o}},t.encodePayload=function(e,n,r){"function"==typeof n&&(r=n,n=null);var o=i(e);if(n&&o)return g&&!f?t.encodePayloadAsBlob(e,r):t.encodePayloadAsArrayBuffer(e,r);if(!e.length)return r("0:");y(e,(function(e,r){t.encodePacket(e,!!o&&n,!1,(function(e){r(null,function(e){return e.length+":"+e}(e))}))}),(function(e,t){return r(t.join(""))}))},t.decodePayload=function(e,n,r){if("string"!=typeof e)return t.decodePayloadAsBinary(e,n,r);var o;if("function"==typeof n&&(r=n,n=null),""===e)return r(d,0,1);for(var i,s,a="",c=0,u=e.length;c<u;c++){var l=e.charAt(c);if(":"===l){if(""===a||a!=(i=Number(a)))return r(d,0,1);if(a!=(s=e.substr(c+1,i)).length)return r(d,0,1);if(s.length){if(o=t.decodePacket(s,n,!1),d.type===o.type&&d.data===o.data)return r(d,0,1);if(!1===r(o,c+i,u))return}c+=i,a=""}else a+=l}return""!==a?r(d,0,1):void 0},t.encodePayloadAsArrayBuffer=function(e,n){if(!e.length)return n(new ArrayBuffer(0));y(e,(function(e,n){t.encodePacket(e,!0,!0,(function(e){return n(null,e)}))}),(function(e,t){var r=t.reduce((function(e,t){var n;return e+(n="string"==typeof t?t.length:t.byteLength).toString().length+n+2}),0),o=new Uint8Array(r),i=0;return t.forEach((function(e){var t="string"==typeof e,n=e;if(t){for(var r=new Uint8Array(e.length),s=0;s<e.length;s++)r[s]=e.charCodeAt(s);n=r.buffer}o[i++]=t?0:1;var a=n.byteLength.toString();for(s=0;s<a.length;s++)o[i++]=parseInt(a[s]);o[i++]=255;for(r=new Uint8Array(n),s=0;s<r.length;s++)o[i++]=r[s]})),n(o.buffer)}))},t.encodePayloadAsBlob=function(e,n){y(e,(function(e,n){t.encodePacket(e,!0,!0,(function(e){var t=new Uint8Array(1);if(t[0]=1,"string"==typeof e){for(var r=new Uint8Array(e.length),o=0;o<e.length;o++)r[o]=e.charCodeAt(o);e=r.buffer,t[0]=0}var i=(e instanceof ArrayBuffer?e.byteLength:e.size).toString(),s=new Uint8Array(i.length+1);for(o=0;o<i.length;o++)s[o]=parseInt(i[o]);if(s[i.length]=255,g){var a=new g([t.buffer,s.buffer,e]);n(null,a)}}))}),(function(e,t){return n(new g(t))}))},t.decodePayloadAsBinary=function(e,n,r){"function"==typeof n&&(r=n,n=null);for(var o=e,i=[];o.byteLength>0;){for(var a=new Uint8Array(o),c=0===a[0],u="",l=1;255!==a[l];l++){if(u.length>310)return r(d,0,1);u+=a[l]}o=s(o,2+u.length),u=parseInt(u);var f=s(o,0,u);if(c)try{f=String.fromCharCode.apply(null,new Uint8Array(f))}catch(e){var h=new Uint8Array(f);f="";for(l=0;l<h.length;l++)f+=String.fromCharCode(h[l])}i.push(f),o=s(o,u)}var p=i.length;i.forEach((function(e,o){r(t.decodePacket(e,n,!0),o,p)}))}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var c,u=[],l=!1,f=-1;function h(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&p())}function p(){if(!l){var e=a(h);l=!0;for(var t=u.length;t;){for(c=u,u=[];++f<t;)c&&c[f].run();f=-1,t=u.length}c=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new d(e,t)),1!==u.length||l||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){(function(r){function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(34)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))})),e.splice(i,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())}).call(this,n(3))},function(e,t){t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),r=0,o=n.length;r<o;r++){var i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}},function(e,t){e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){(function(r){function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(53)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))})),e.splice(i,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())}).call(this,n(3))},function(e,t,n){var r=n(35)("socket.io-parser"),o=n(9),i=n(15),s=n(42),a=n(16),c=n(17);function u(){}function l(e){var n=""+e.type;return t.BINARY_EVENT!==e.type&&t.BINARY_ACK!==e.type||(n+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(n+=e.nsp+","),null!=e.id&&(n+=e.id),null!=e.data&&(n+=JSON.stringify(e.data)),r("encoded %j as %s",e,n),n}function f(){this.reconstructor=null}function h(e){this.reconPack=e,this.buffers=[]}function p(e){return{type:t.ERROR,data:"parser error: "+e}}t.protocol=4,t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],t.CONNECT=0,t.DISCONNECT=1,t.EVENT=2,t.ACK=3,t.ERROR=4,t.BINARY_EVENT=5,t.BINARY_ACK=6,t.Encoder=u,t.Decoder=f,u.prototype.encode=function(e,n){(e.type!==t.EVENT&&e.type!==t.ACK||!i(e.data)||(e.type=e.type===t.EVENT?t.BINARY_EVENT:t.BINARY_ACK),r("encoding packet %j",e),t.BINARY_EVENT===e.type||t.BINARY_ACK===e.type)?function(e,t){s.removeBlobs(e,(function(e){var n=s.deconstructPacket(e),r=l(n.packet),o=n.buffers;o.unshift(r),t(o)}))}(e,n):n([l(e)])},o(f.prototype),f.prototype.add=function(e){var n;if("string"==typeof e)n=function(e){var n=0,o={type:Number(e.charAt(0))};if(null==t.types[o.type])return p("unknown packet type "+o.type);if(t.BINARY_EVENT===o.type||t.BINARY_ACK===o.type){for(var i="";"-"!==e.charAt(++n)&&(i+=e.charAt(n),n!=e.length););if(i!=Number(i)||"-"!==e.charAt(n))throw new Error("Illegal attachments");o.attachments=Number(i)}if("/"===e.charAt(n+1))for(o.nsp="";++n;){if(","===(c=e.charAt(n)))break;if(o.nsp+=c,n===e.length)break}else o.nsp="/";var s=e.charAt(n+1);if(""!==s&&Number(s)==s){for(o.id="";++n;){var c;if(null==(c=e.charAt(n))||Number(c)!=c){--n;break}if(o.id+=e.charAt(n),n===e.length)break}o.id=Number(o.id)}if(e.charAt(++n)){var u=function(e){try{return JSON.parse(e)}catch(e){return!1}}(e.substr(n));if(!(!1!==u&&(o.type===t.ERROR||a(u))))return p("invalid payload");o.data=u}return r("decoded %s as %j",e,o),o}(e),t.BINARY_EVENT===n.type||t.BINARY_ACK===n.type?(this.reconstructor=new h(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!c(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(n=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,this.emit("decoded",n))}},f.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},h.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=s.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},h.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(e,t,n){function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n)for(var r=0,o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t);return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){(function(t){var r=n(45);e.exports=function(e){var n=e.xdomain,o=e.xscheme,i=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!n||r))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!o&&i)return new XDomainRequest}catch(e){}if(!n)try{return new(t[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}}).call(this,n(0))},function(e,t,n){var r=n(2),o=n(12);function i(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.forceNode=e.forceNode,this.extraHeaders=e.extraHeaders,this.localAddress=e.localAddress}e.exports=i,o(i.prototype),i.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},i.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},i.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},i.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)},i.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},i.prototype.onData=function(e){var t=r.decodePacket(e,this.socket.binaryType);this.onPacket(t)},i.prototype.onPacket=function(e){this.emit("packet",e)},i.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(e,t,n){function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n)for(var r=0,o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t);return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var t=e,o=e.indexOf("["),i=e.indexOf("]");-1!=o&&-1!=i&&(e=e.substring(0,o)+e.substring(o,i).replace(/:/g,";")+e.substring(i,e.length));for(var s=n.exec(e||""),a={},c=14;c--;)a[r[c]]=s[c]||"";return-1!=o&&-1!=i&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a}},function(e,t){var n=1e3,r=6e4,o=60*r,i=24*o;function s(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var a,c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===c&&!1===isNaN(e))return t.long?s(a=e,i,"day")||s(a,o,"hour")||s(a,r,"minute")||s(a,n,"second")||a+" ms":function(e){if(e>=i)return Math.round(e/i)+"d";if(e>=o)return Math.round(e/o)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){(function(t){var r=n(41),o=Object.prototype.toString,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);e.exports=function e(n){if(!n||"object"!=typeof n)return!1;if(r(n)){for(var o=0,a=n.length;o<a;o++)if(e(n[o]))return!0;return!1}if("function"==typeof t&&t.isBuffer&&t.isBuffer(n)||"function"==typeof ArrayBuffer&&n instanceof ArrayBuffer||i&&n instanceof Blob||s&&n instanceof File)return!0;if(n.toJSON&&"function"==typeof n.toJSON&&1===arguments.length)return e(n.toJSON(),!0);for(var c in n)if(Object.prototype.hasOwnProperty.call(n,c)&&e(n[c]))return!0;return!1}}).call(this,n(37).Buffer)},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){(function(t){e.exports=function(e){return t.Buffer&&t.Buffer.isBuffer(e)||t.ArrayBuffer&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))}}).call(this,n(0))},function(e,t,n){var r=n(43),o=n(23),i=n(9),s=n(8),a=n(24),c=n(25),u=n(4)("socket.io-client:manager"),l=n(22),f=n(59),h=Object.prototype.hasOwnProperty;function p(e,t){if(!(this instanceof p))return new p(e,t);e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new f({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=t.parser||s;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.open()}e.exports=p,p.prototype.emitAll=function(){for(var e in this.emit.apply(this,arguments),this.nsps)h.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},p.prototype.updateSocketIds=function(){for(var e in this.nsps)h.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},p.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id},i(p.prototype),p.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},p.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},p.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},p.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},p.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},p.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},p.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},p.prototype.open=p.prototype.connect=function(e,t){if(u("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;u("opening %s",this.uri),this.engine=r(this.uri,this.opts);var n=this.engine,o=this;this.readyState="opening",this.skipReconnect=!1;var i=a(n,"open",(function(){o.onopen(),e&&e()})),s=a(n,"error",(function(t){if(u("connect_error"),o.cleanup(),o.readyState="closed",o.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else o.maybeReconnectOnOpen()}));if(!1!==this._timeout){var c=this._timeout;u("connect attempt will timeout after %d",c);var l=setTimeout((function(){u("connect attempt timed out after %d",c),i.destroy(),n.close(),n.emit("error","timeout"),o.emitAll("connect_timeout",c)}),c);this.subs.push({destroy:function(){clearTimeout(l)}})}return this.subs.push(i),this.subs.push(s),this},p.prototype.onopen=function(){u("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(a(e,"data",c(this,"ondata"))),this.subs.push(a(e,"ping",c(this,"onping"))),this.subs.push(a(e,"pong",c(this,"onpong"))),this.subs.push(a(e,"error",c(this,"onerror"))),this.subs.push(a(e,"close",c(this,"onclose"))),this.subs.push(a(this.decoder,"decoded",c(this,"ondecoded")))},p.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},p.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},p.prototype.ondata=function(e){this.decoder.add(e)},p.prototype.ondecoded=function(e){this.emit("packet",e)},p.prototype.onerror=function(e){u("error",e),this.emitAll("error",e)},p.prototype.socket=function(e,t){var n=this.nsps[e];if(!n){n=new o(this,e,t),this.nsps[e]=n;var r=this;n.on("connecting",i),n.on("connect",(function(){n.id=r.generateId(e)})),this.autoConnect&&i()}function i(){~l(r.connecting,n)||r.connecting.push(n)}return n},p.prototype.destroy=function(e){var t=l(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},p.prototype.packet=function(e){u("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,(function(n){for(var r=0;r<n.length;r++)t.engine.write(n[r],e.options);t.encoding=!1,t.processPacketQueue()})))},p.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},p.prototype.cleanup=function(){u("cleanup");for(var e=this.subs.length,t=0;t<e;t++){this.subs.shift().destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},p.prototype.close=p.prototype.disconnect=function(){u("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},p.prototype.onclose=function(e){u("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},p.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)u("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();u("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout((function(){e.skipReconnect||(u("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open((function(t){t?(u("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(u("reconnect success"),e.onreconnect())})))}),t);this.subs.push({destroy:function(){clearTimeout(n)}})}},p.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,n){(function(e){var r=n(10),o=n(46),i=n(55),s=n(56);t.polling=function(t){var n=!1,s=!1,a=!1!==t.jsonp;if(e.location){var c="https:"===location.protocol,u=location.port;u||(u=c?443:80),n=t.hostname!==location.hostname||u!==t.port,s=t.secure!==c}if(t.xdomain=n,t.xscheme=s,"open"in new r(t)&&!t.forceJSONP)return new o(t);if(!a)throw new Error("JSONP disabled");return new i(t)},t.websocket=s}).call(this,n(0))},function(e,t,n){var r=n(11),o=n(5),i=n(2),s=n(6),a=n(21),c=n(7)("engine.io-client:polling");e.exports=l;var u=null!=new(n(10))({xdomain:!1}).responseType;function l(e){var t=e&&e.forceBase64;u&&!t||(this.supportsBinary=!1),r.call(this,e)}s(l,r),l.prototype.name="polling",l.prototype.doOpen=function(){this.poll()},l.prototype.pause=function(e){var t=this;function n(){c("paused"),t.readyState="paused",e()}if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(c("we are currently polling - waiting to pause"),r++,this.once("pollComplete",(function(){c("pre-pause polling complete"),--r||n()}))),this.writable||(c("we are currently writing - waiting to pause"),r++,this.once("drain",(function(){c("pre-pause writing complete"),--r||n()})))}else n()},l.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},l.prototype.onData=function(e){var t=this;c("polling got data %s",e);i.decodePayload(e,this.socket.binaryType,(function(e,n,r){if("opening"===t.readyState&&t.onOpen(),"close"===e.type)return t.onClose(),!1;t.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():c('ignoring poll - transport state "%s"',this.readyState))},l.prototype.doClose=function(){var e=this;function t(){c("writing close packet"),e.write([{type:"close"}])}"open"===this.readyState?(c("transport open - closing"),t()):(c("transport not open - deferring close"),this.once("open",t))},l.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")};i.encodePayload(e,this.supportsBinary,(function(e){t.doWrite(e,n)}))},l.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=a()),this.supportsBinary||e.sid||(e.b64=1),e=o.encode(e),this.port&&("https"===t&&443!==Number(this.port)||"http"===t&&80!==Number(this.port))&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e}},function(e,t,n){"use strict";var r,o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),i={},s=0,a=0;function c(e){var t="";do{t=o[e%64]+t,e=Math.floor(e/64)}while(e>0);return t}function u(){var e=c(+new Date);return e!==r?(s=0,r=e):e+"."+c(s++)}for(;a<64;a++)i[o[a]]=a;u.encode=c,u.decode=function(e){var t=0;for(a=0;a<e.length;a++)t=64*t+i[e.charAt(a)];return t},e.exports=u},function(e,t){var n=[].indexOf;e.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},function(e,t,n){var r=n(8),o=n(9),i=n(58),s=n(24),a=n(25),c=n(4)("socket.io-client:socket"),u=n(5);e.exports=h;var l={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},f=o.prototype.emit;function h(e,t,n){this.io=e,this.nsp=t,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}o(h.prototype),h.prototype.subEvents=function(){if(!this.subs){var e=this.io;this.subs=[s(e,"open",a(this,"onopen")),s(e,"packet",a(this,"onpacket")),s(e,"close",a(this,"onclose"))]}},h.prototype.open=h.prototype.connect=function(){return this.connected||(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting")),this},h.prototype.send=function(){var e=i(arguments);return e.unshift("message"),this.emit.apply(this,e),this},h.prototype.emit=function(e){if(l.hasOwnProperty(e))return f.apply(this,arguments),this;var t=i(arguments),n={type:r.EVENT,data:t,options:{}};return n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof t[t.length-1]&&(c("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),delete this.flags,this},h.prototype.packet=function(e){e.nsp=this.nsp,this.io.packet(e)},h.prototype.onopen=function(){if(c("transport is open - connecting"),"/"!==this.nsp)if(this.query){var e="object"==typeof this.query?u.encode(this.query):this.query;c("sending connect packet with query %s",e),this.packet({type:r.CONNECT,query:e})}else this.packet({type:r.CONNECT})},h.prototype.onclose=function(e){c("close (%s)",e),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",e)},h.prototype.onpacket=function(e){if(e.nsp===this.nsp)switch(e.type){case r.CONNECT:this.onconnect();break;case r.EVENT:case r.BINARY_EVENT:this.onevent(e);break;case r.ACK:case r.BINARY_ACK:this.onack(e);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error",e.data)}},h.prototype.onevent=function(e){var t=e.data||[];c("emitting event %j",t),null!=e.id&&(c("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?f.apply(this,t):this.receiveBuffer.push(t)},h.prototype.ack=function(e){var t=this,n=!1;return function(){if(!n){n=!0;var o=i(arguments);c("sending ack %j",o),t.packet({type:r.ACK,id:e,data:o})}}},h.prototype.onack=function(e){var t=this.acks[e.id];"function"==typeof t?(c("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):c("bad ack %s",e.id)},h.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},h.prototype.emitBuffered=function(){var e;for(e=0;e<this.receiveBuffer.length;e++)f.apply(this,this.receiveBuffer[e]);for(this.receiveBuffer=[],e=0;e<this.sendBuffer.length;e++)this.packet(this.sendBuffer[e]);this.sendBuffer=[]},h.prototype.ondisconnect=function(){c("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},h.prototype.destroy=function(){if(this.subs){for(var e=0;e<this.subs.length;e++)this.subs[e].destroy();this.subs=null}this.io.destroy(this)},h.prototype.close=h.prototype.disconnect=function(){return this.connected&&(c("performing disconnect (%s)",this.nsp),this.packet({type:r.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},h.prototype.compress=function(e){return this.flags=this.flags||{},this.flags.compress=e,this}},function(e,t){e.exports=function(e,t,n){return e.on(t,n),{destroy:function(){e.removeListener(t,n)}}}},function(e,t){var n=[].slice;e.exports=function(e,t){if("string"==typeof t&&(t=e[t]),"function"!=typeof t)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return t.apply(e,r.concat(n.call(arguments)))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Resource",{enumerable:!0,get:function(){return r.Resource}}),Object.defineProperty(t,"Worker",{enumerable:!0,get:function(){return o.Worker}}),Object.defineProperty(t,"WorkerManager",{enumerable:!0,get:function(){return i.WorkerManager}});var r=n(68),o=n(63),i=n(69)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getServerUrlFromLocation=function(){if(location){if("http:"===location.protocol)return"http://"+location.hostname+":9559";if("https:"===location.protocol)return"https://"+location.hostname+":5443"}return null},t.getServerUrlFromLocalhost=function(){if(location&&"https:"===location.protocol)return"https://127.0.0.1:5443";return"http://127.0.0.1:9559"},t.optionEnabled=function(e){return!("true"!==o()[e])},t.getOptions=o,t.getDeviceName=function(){var e=(new r.UAParser).getResult(),t="Unknown";e.device.vendor&&e.device.model?t="[".concat(e.device.vendor,"] ").concat(e.device.model):e.os.name&&e.browser.name&&(t="[".concat(e.os.name,"] ").concat(e.browser.name));return t},t.getClientId=function(){var e=localStorage.getItem("clientId");if(null===e){var t=(new r.UAParser).getResult(),n="Unknown";void 0!==t.device.vendor?n=t.device.vendor:void 0!==t.os.name&&(n=t.os.name),e=n+i(),localStorage.setItem("clientId",e)}return e},t.isPromise=function(e){return!!e&&"function"==typeof e.then},t.getUniqueId=i,t.getOffloadId=function(e){return e+"_"+e.toLowerCase().split("").reverse().join("")};var r=n(31);function o(){var e={},t=["debug","info"],n=function(){var e=window.location.search.substr(1).split("&");if(""===e)return{};for(var t={},n=0;n<e.length;n++){var r=e[n].split("=",2);1===r.length?t[r[0]]="":t[r[0]]=decodeURIComponent(r[1].replace(/\+/g," "))}return t}();for(var r in n)-1!==t.indexOf(r)&&(e[r]=n[r]);return e}function i(){return"_"+Math.random().toString(36).substr(2,9)}},function(e,t,n){(function(r){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))}),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(29)(t);const{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(3))},function(e,t,n){e.exports=function(e){function t(e){let n,o=null;function i(...e){if(!i.enabled)return;const r=i,o=Number(new Date),s=o-(n||o);r.diff=s,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n}),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return i.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=r,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:()=>null===o?t.enabled(e):o,set:e=>{o=e}}),"function"==typeof t.init&&t.init(i),i}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(30),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},function(e,t){var n=1e3,r=6e4,o=60*r,i=24*o;function s(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var a=typeof e;if("string"===a&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===a&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=i)return s(e,t,i,"day");if(t>=o)return s(e,t,o,"hour");if(t>=r)return s(e,t,r,"minute");if(t>=n)return s(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=i)return Math.round(e/i)+"d";if(t>=o)return Math.round(e/o)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){var r;
+window.offload=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=815)}([,,function(t,e,n){var r=n(446),o=n(293);t.exports=function(t,e){var n=o(t,e,"get");return r(t,n)},t.exports.default=t.exports,t.exports.__esModule=!0},,,,,function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r,o;!function(i,s){"use strict";void 0===(o="function"==typeof(r=function(){var t=function(){},e="undefined"!=typeof window&&void 0!==window.navigator&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function r(t,e){var n=t[e];if("function"==typeof n.bind)return n.bind(t);try{return Function.prototype.bind.call(n,t)}catch(e){return function(){return Function.prototype.apply.apply(n,[t,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function i(n){return"debug"===n&&(n="log"),"undefined"!=typeof console&&("trace"===n&&e?o:void 0!==console[n]?r(console,n):void 0!==console.log?r(console,"log"):t)}function s(e,r){for(var o=0;o<n.length;o++){var i=n[o];this[i]=o<e?t:this.methodFactory(i,e,r)}this.log=this.debug}function a(t,e,n){return function(){"undefined"!=typeof console&&(s.call(this,e,n),this[t].apply(this,arguments))}}function c(t,e,n){return i(t)||a.apply(this,arguments)}function u(t,e,r){var o,i=this;e=null==e?"WARN":e;var a="loglevel";function u(){var t;if("undefined"!=typeof window&&a){try{t=window.localStorage[a]}catch(t){}if(void 0===t)try{var e=window.document.cookie,n=e.indexOf(encodeURIComponent(a)+"=");-1!==n&&(t=/^([^;]+)/.exec(e.slice(n))[1])}catch(t){}return void 0===i.levels[t]&&(t=void 0),t}}"string"==typeof t?a+=":"+t:"symbol"==typeof t&&(a=void 0),i.name=t,i.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},i.methodFactory=r||c,i.getLevel=function(){return o},i.setLevel=function(e,r){if("string"==typeof e&&void 0!==i.levels[e.toUpperCase()]&&(e=i.levels[e.toUpperCase()]),!("number"==typeof e&&e>=0&&e<=i.levels.SILENT))throw"log.setLevel() called with invalid level: "+e;if(o=e,!1!==r&&function(t){var e=(n[t]||"silent").toUpperCase();if("undefined"!=typeof window&&a){try{return void(window.localStorage[a]=e)}catch(t){}try{window.document.cookie=encodeURIComponent(a)+"="+e+";"}catch(t){}}}(e),s.call(i,e,t),"undefined"==typeof console&&e<i.levels.SILENT)return"No console available for logging"},i.setDefaultLevel=function(t){e=t,u()||i.setLevel(t,!1)},i.resetLevel=function(){i.setLevel(e,!1),function(){if("undefined"!=typeof window&&a){try{return void window.localStorage.removeItem(a)}catch(t){}try{window.document.cookie=encodeURIComponent(a)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(t){}}}()},i.enableAll=function(t){i.setLevel(i.levels.TRACE,t)},i.disableAll=function(t){i.setLevel(i.levels.SILENT,t)};var f=u();null==f&&(f=e),i.setLevel(f,!1)}var f=new u,l={};f.getLogger=function(t){if("symbol"!=typeof t&&"string"!=typeof t||""===t)throw new TypeError("You must supply a name when creating a logger.");var e=l[t];return e||(e=l[t]=new u(t,f.getLevel(),f.methodFactory)),e};var h="undefined"!=typeof window?window.log:void 0;return f.noConflict=function(){return"undefined"!=typeof window&&window.log===f&&(window.log=h),f},f.getLoggers=function(){return l},f.default=f,f})?r.call(e,n,e,t):r)||(t.exports=o)}()},,function(t,e,n){var r=n(447),o=n(293);t.exports=function(t,e,n){var i=o(t,e,"set");return r(t,i,n),n},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){t.exports=n(452)},,,function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n(53))},function(t,e,n){"use strict";var r=n(14),o=n(98),i=n(17),s=n(27),a=n(78).f,c=n(282),u=n(21),f=n(81),l=n(73),h=n(33),p=function(t){var e=function(n,r,i){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,i)}return o(t,this,arguments)};return e.prototype=t.prototype,e};t.exports=function(t,e){var n,o,d,v,g,y,m,b,w=t.target,A=t.global,x=t.stat,k=t.proto,C=A?r:x?r[w]:(r[w]||{}).prototype,E=A?u:u[w]||l(u,w,{})[w],S=E.prototype;for(d in e)n=!c(A?d:w+(x?".":"#")+d,t.forced)&&C&&h(C,d),g=E[d],n&&(y=t.noTargetGet?(b=a(C,d))&&b.value:C[d]),v=n&&y?y:e[d],n&&typeof g==typeof v||(m=t.bind&&n?f(v,r):t.wrap&&n?p(v):k&&s(v)?i(v):v,(t.sham||v&&v.sham||g&&g.sham)&&l(m,"sham",!0),l(E,d,m),k&&(h(u,o=w+"Prototype")||l(u,o,{}),l(u[o],d,v),t.real&&S&&!S[d]&&l(S,d,v)))}},function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n(53))},function(t,e,n){var r=n(132),o=Function.prototype,i=o.bind,s=o.call,a=r&&i.bind(s,s);t.exports=r?function(t){return t&&a(t)}:function(t){return t&&function(){return s.apply(t,arguments)}}},function(t,e,n){t.exports=n(520)},,function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports={}},,,function(t,e,n){var r=n(14),o=n(200),i=n(33),s=n(157),a=n(198),c=n(280),u=o("wks"),f=r.Symbol,l=f&&f.for,h=c?f:f&&f.withoutSetter||s;t.exports=function(t){if(!i(u,t)||!a&&"string"!=typeof u[t]){var e="Symbol."+t;a&&i(f,t)?u[t]=f[t]:u[t]=c&&l?l(e):h(e)}return u[t]}},function(t,e){var n=Function.prototype,r=n.bind,o=n.call,i=r&&r.bind(o);t.exports=r?function(t){return t&&i(o,t)}:function(t){return t&&function(){return o.apply(t,arguments)}}},function(t,e,n){var r=n(27);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},function(t,e){t.exports=function(t){return"function"==typeof t}},function(t,e,n){var r=n(21),o=n(33),i=n(209),s=n(54).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});o(e,t)||s(e,t,{value:i.f(t)})}},,function(t,e,n){t.exports=n(526)},function(t,e,n){t.exports=n(507)},function(t,e,n){t.exports=n(582)},function(t,e,n){var r=n(17),o=n(80),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},function(t,e,n){var r=n(17);t.exports=r({}.isPrototypeOf)},,function(t,e,n){t.exports=n(523)},,,function(t,e,n){var r=n(20);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(348);function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),r(t,o.key,o)}}t.exports=function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t},t.exports.default=t.exports,t.exports.__esModule=!0},,function(t,e){t.exports=function(t){return"function"==typeof t}},,function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},,function(t,e,n){var r=n(14),o=n(26),i=r.String,s=r.TypeError;t.exports=function(t){if(o(t))return t;throw s(i(t)+" is not an object")}},function(t,e,n){var r=n(331),o=n(604);function i(e){return t.exports=i=r?o:function(t){return t.__proto__||o(t)},t.exports.default=t.exports,t.exports.__esModule=!0,i(e)}t.exports=i,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(16),o=n(96),i=r.String,s=r.TypeError;t.exports=function(t){if(o(t))return t;throw s(i(t)+" is not an object")}},function(t,e,n){var r=n(132),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},function(t,e,n){var r=n(21);t.exports=function(t){return r[t+"Prototype"]}},,function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(14),o=n(39),i=n(281),s=n(283),a=n(47),c=n(154),u=r.TypeError,f=Object.defineProperty,l=Object.getOwnPropertyDescriptor;e.f=o?s?function(t,e,n){if(a(t),e=c(e),a(n),"function"==typeof t&&"prototype"===e&&"value"in n&&"writable"in n&&!n.writable){var r=l(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return f(t,e,n)}:f:function(t,e,n){if(a(t),e=c(e),a(n),i)try{return f(t,e,n)}catch(t){}if("get"in n||"set"in n)throw u("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=n(511)},function(t,e,n){var r=n(21),o=n(14),i=n(27),s=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?s(r[t])||s(o[t]):r[t]&&r[t][e]||o[t]&&o[t][e]}},function(t,e,n){var r=n(16),o=n(214),i=n(75),s=n(306),a=n(307),c=n(308),u=o("wks"),f=r.Symbol,l=f&&f.for,h=c?f:f&&f.withoutSetter||s;t.exports=function(t){if(!i(u,t)||!a&&"string"!=typeof u[t]){var e="Symbol."+t;a&&i(f,t)?u[t]=f[t]:u[t]=c&&l?l(e):h(e)}return u[t]}},,function(t,e){var n=Function.prototype.call;t.exports=n.bind?n.bind(n):function(){return n.apply(n,arguments)}},,,function(t,e,n){t.exports=n(475)},,,function(t,e,n){var r=n(242),o=n(123);t.exports=function(t){return r(o(t))}},function(t,e,n){n(71);var r=n(429),o=n(14),i=n(92),s=n(73),a=n(113),c=n(24)("toStringTag");for(var u in r){var f=o[u],l=f&&f.prototype;l&&i(l)!==c&&s(l,c,u),a[u]=a.Array}},function(t,e,n){t.exports=n(351)},function(t,e,n){t.exports=n(495)},,function(t,e){t.exports=!0},function(t,e,n){"use strict";var r=n(65),o=n(246),i=n(113),s=n(74),a=n(54).f,c=n(210),u=n(70),f=n(39),l=s.set,h=s.getterFor("Array Iterator");t.exports=c(Array,"Array",(function(t,e){l(this,{type:"Array Iterator",target:r(t),index:0,kind:e})}),(function(){var t=h(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values");var p=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!u&&f&&"values"!==p.name)try{a(p,"name",{value:"values"})}catch(t){}},,function(t,e,n){var r=n(39),o=n(54),i=n(91);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r,o,i,s=n(289),a=n(14),c=n(17),u=n(26),f=n(73),l=n(33),h=n(201),p=n(162),d=n(134),v=a.TypeError,g=a.WeakMap;if(s||h.state){var y=h.state||(h.state=new g),m=c(y.get),b=c(y.has),w=c(y.set);r=function(t,e){if(b(y,t))throw new v("Object already initialized");return e.facade=t,w(y,t,e),e},o=function(t){return m(y,t)||{}},i=function(t){return b(y,t)}}else{var A=p("state");d[A]=!0,r=function(t,e){if(l(t,A))throw new v("Object already initialized");return e.facade=t,f(t,A,e),e},o=function(t){return l(t,A)?t[A]:{}},i=function(t){return l(t,A)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=o(e)).type!==t)throw v("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){var r=n(25),o=n(249),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},,,function(t,e,n){var r=n(39),o=n(50),i=n(181),s=n(91),a=n(65),c=n(154),u=n(33),f=n(281),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=a(t),e=c(e),f)try{return l(t,e)}catch(t){}if(u(t,e))return s(!o(i.f,t,e),t[e])}},function(t,e,n){var r=n(14),o=n(27),i=n(156),s=r.TypeError;t.exports=function(t){if(o(t))return t;throw s(i(t)+" is not a function")}},function(t,e,n){var r=n(14),o=n(123),i=r.Object;t.exports=function(t){return i(o(t))}},function(t,e,n){var r=n(17),o=n(79),i=n(132),s=r(r.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?s(t,e):function(){return t.apply(e,arguments)}}},function(t,e){},function(t,e,n){var r=n(81),o=n(17),i=n(242),s=n(80),a=n(100),c=n(284),u=o([].push),f=function(t){var e=1==t,n=2==t,o=3==t,f=4==t,l=6==t,h=7==t,p=5==t||l;return function(d,v,g,y){for(var m,b,w=s(d),A=i(w),x=r(v,g),k=a(A),C=0,E=y||c,S=e?E(d,k):n||h?E(d,0):void 0;k>C;C++)if((p||C in A)&&(b=x(m=A[C],C,w),t))if(e)S[C]=b;else if(b)switch(t){case 3:return!0;case 5:return m;case 6:return C;case 2:u(S,m)}else switch(t){case 4:return!1;case 7:u(S,m)}return l?-1:o||f?f:S}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterReject:f(7)}},function(t,e,n){var r=n(45);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,n){var r=n(16),o=n(186),i=r.String;t.exports=function(t){if("Symbol"===o(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},function(t,e,n){var r=n(610),o=n(616);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=r(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(176).default,o=n(7);t.exports=function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return o(t)},t.exports.default=t.exports,t.exports.__esModule=!0},,,function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var c,u=[],f=!1,l=-1;function h(){f&&c&&(f=!1,c.length?u=c.concat(u):l=-1,u.length&&p())}function p(){if(!f){var t=a(h);f=!0;for(var e=u.length;e;){for(c=u,u=[];++l<e;)c&&c[l].run();l=-1,e=u.length}c=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function v(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new d(t,e)),1!==u.length||f||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(14),o=n(205),i=n(27),s=n(99),a=n(24)("toStringTag"),c=r.Object,u="Arguments"==s(function(){return arguments}());t.exports=o?s:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=c(t),a))?n:u?s(e):"Object"==(r=s(e))&&i(e.callee)?"Arguments":r}},function(t,e,n){var r=n(14),o=n(92),i=r.String;t.exports=function(t){if("Symbol"===o(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},function(t,e,n){var r,o=n(47),i=n(243),s=n(208),a=n(134),c=n(286),u=n(202),f=n(162),l=f("IE_PROTO"),h=function(){},p=function(t){return"<script>"+t+"<\/script>"},d=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;v="undefined"!=typeof document?document.domain&&r?d(r):((e=u("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):d(r);for(var n=s.length;n--;)delete v.prototype[s[n]];return v()};a[l]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(h.prototype=o(t),n=new h,h.prototype=null,n[l]=t):n=v(),void 0===e?n:i.f(n,e)}},function(t,e,n){var r=n(16),o=n(43),i=n(75),s=n(124),a=n(216),c=n(184),u=n(166),f=n(185).CONFIGURABLE,l=u.get,h=u.enforce,p=String(String).split("String");(t.exports=function(t,e,n,c){var u,l=!!c&&!!c.unsafe,d=!!c&&!!c.enumerable,v=!!c&&!!c.noTargetGet,g=c&&void 0!==c.name?c.name:e;o(n)&&("Symbol("===String(g).slice(0,7)&&(g="["+String(g).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(n,"name")||f&&n.name!==g)&&s(n,"name",g),(u=h(n)).source||(u.source=p.join("string"==typeof g?g:""))),t!==r?(l?!v&&t[e]&&(d=!0):delete t[e],d?t[e]=n:s(t,e,n)):d?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return o(this)&&l(this).source||c(this)}))},function(t,e,n){var r=n(43);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},,function(t,e,n){var r=n(132),o=Function.prototype,i=o.apply,s=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?s.bind(i):function(){return s.apply(i,arguments)})},function(t,e,n){var r=n(17),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},function(t,e,n){var r=n(203);t.exports=function(t){return r(t.length)}},function(t,e,n){var r=n(73);t.exports=function(t,e,n,o){o&&o.enumerable?t[e]=n:r(t,e,n)}},function(t,e,n){var r=n(205),o=n(54).f,i=n(73),s=n(33),a=n(410),c=n(24)("toStringTag");t.exports=function(t,e,n,u){if(t){var f=n?t:t.prototype;s(f,c)||o(f,c,{configurable:!0,value:e}),u&&!r&&i(f,"toString",a)}}},function(t,e,n){var r=n(14),o=n(81),i=n(50),s=n(47),a=n(156),c=n(295),u=n(100),f=n(34),l=n(247),h=n(146),p=n(296),d=r.TypeError,v=function(t,e){this.stopped=t,this.result=e},g=v.prototype;t.exports=function(t,e,n){var r,y,m,b,w,A,x,k=n&&n.that,C=!(!n||!n.AS_ENTRIES),E=!(!n||!n.IS_ITERATOR),S=!(!n||!n.INTERRUPTED),B=o(e,k),I=function(t){return r&&p(r,"normal",t),new v(!0,t)},O=function(t){return C?(s(t),S?B(t[0],t[1],I):B(t[0],t[1])):S?B(t,I):B(t)};if(E)r=t;else{if(!(y=h(t)))throw d(a(t)+" is not iterable");if(c(y)){for(m=0,b=u(t);b>m;m++)if((w=O(t[m]))&&f(g,w))return w;return new v(!1)}r=l(t,y)}for(A=r.next;!(x=i(A,r)).done;){try{w=O(x.value)}catch(t){p(r,"throw",t)}if("object"==typeof w&&w&&f(g,w))return w}return new v(!1)}},function(t,e,n){var r=n(213),o=n(95),i=n(474);r||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e,n){var r=n(16).TypeError;t.exports=function(t){if(null==t)throw r("Can't call method on "+t);return t}},function(t,e,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var s=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(t,e){return new Promise((function(n,r){function o(n){t.removeListener(e,i),r(n)}function i(){"function"==typeof t.removeListener&&t.removeListener("error",o),n([].slice.call(arguments))}y(t,e,i,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&y(t,"error",e,n)}(t,o,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var c=10;function u(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function f(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function l(t,e,n,r){var o,i,s,a;if(u(n),void 0===(i=t._events)?(i=t._events=Object.create(null),t._eventsCount=0):(void 0!==i.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),i=t._events),s=i[e]),void 0===s)s=i[e]=n,++t._eventsCount;else if("function"==typeof s?s=i[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(o=f(t))>0&&s.length>o&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},o=h.bind(r);return o.listener=n,r.wrapFn=o,o}function d(t,e,n){var r=t._events;if(void 0===r)return[];var o=r[e];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(o):g(o,o.length)}function v(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function y(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function o(i){r.once&&t.removeEventListener(e,o),n(i)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");c=t}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return f(this)},a.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[t];if(void 0===c)return!1;if("function"==typeof c)i(c,this,e);else{var u=c.length,f=g(c,u);for(n=0;n<u;++n)i(f[n],this,e)}return!0},a.prototype.addListener=function(t,e){return l(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return l(this,t,e,!0)},a.prototype.once=function(t,e){return u(e),this.on(t,p(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){return u(e),this.prependListener(t,p(this,t,e)),this},a.prototype.removeListener=function(t,e){var n,r,o,i,s;if(u(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===e||n[i].listener===e){s=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,o),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},a.prototype.listeners=function(t){return d(this,t,!0)},a.prototype.rawListeners=function(t){return d(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):v.call(t,e)},a.prototype.listenerCount=v,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){t.exports=n(349)},,function(t,e,n){"use strict";var r=n(347).charAt,o=n(93),i=n(74),s=n(210),a=i.set,c=i.getterFor("String Iterator");s(String,"String",(function(t){a(this,{type:"String Iterator",string:o(t),index:0})}),(function(){var t,e=c(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})}))},function(t,e,n){t.exports=n(483)},,function(t,e,n){var r=n(99);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e){t.exports={}},function(t,e,n){var r=n(16),o=n(43),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},function(t,e,n){var r=n(16),o=n(84),i=n(309),s=n(49),a=n(310),c=r.TypeError,u=Object.defineProperty;e.f=o?u:function(t,e,n){if(s(t),e=a(e),s(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(218);t.exports=function(t,e){var n=t[e];return null==n?void 0:r(n)}},function(t,e,n){function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<r.length;o++)if((n=r[o])===e||n.fn===e){r.splice(o,1);break}return this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),n=this._callbacks["$"+t];if(n)for(var r=0,o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,e);return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e,n){var r,o=n(557),i=n(318),s=n(558),a=n(559),c=n(560);"undefined"!=typeof ArrayBuffer&&(r=n(561));var u="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),f="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),l=u||f;e.protocol=3;var h=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},p=o(h),d={type:"error",data:"parser error"},v=n(562);function g(t,e,n){for(var r=new Array(t.length),o=a(t.length,n),i=function(t,n,o){e(n,(function(e,n){r[t]=n,o(e,r)}))},s=0;s<t.length;s++)i(s,t[s],o)}e.encodePacket=function(t,n,r,o){"function"==typeof n&&(o=n,n=!1),"function"==typeof r&&(o=r,r=null);var i=void 0===t.data?void 0:t.data.buffer||t.data;if("undefined"!=typeof ArrayBuffer&&i instanceof ArrayBuffer)return function(t,n,r){if(!n)return e.encodeBase64Packet(t,r);var o=t.data,i=new Uint8Array(o),s=new Uint8Array(1+o.byteLength);s[0]=h[t.type];for(var a=0;a<i.length;a++)s[a+1]=i[a];return r(s.buffer)}(t,n,o);if(void 0!==v&&i instanceof v)return function(t,n,r){if(!n)return e.encodeBase64Packet(t,r);if(l)return function(t,n,r){if(!n)return e.encodeBase64Packet(t,r);var o=new FileReader;return o.onload=function(){e.encodePacket({type:t.type,data:o.result},n,!0,r)},o.readAsArrayBuffer(t.data)}(t,n,r);var o=new Uint8Array(1);o[0]=h[t.type];var i=new v([o.buffer,t.data]);return r(i)}(t,n,o);if(i&&i.base64)return function(t,n){var r="b"+e.packets[t.type]+t.data.data;return n(r)}(t,o);var s=h[t.type];return void 0!==t.data&&(s+=r?c.encode(String(t.data),{strict:!1}):String(t.data)),o(""+s)},e.encodeBase64Packet=function(t,n){var r,o="b"+e.packets[t.type];if(void 0!==v&&t.data instanceof v){var i=new FileReader;return i.onload=function(){var t=i.result.split(",")[1];n(o+t)},i.readAsDataURL(t.data)}try{r=String.fromCharCode.apply(null,new Uint8Array(t.data))}catch(e){for(var s=new Uint8Array(t.data),a=new Array(s.length),c=0;c<s.length;c++)a[c]=s[c];r=String.fromCharCode.apply(null,a)}return o+=btoa(r),n(o)},e.decodePacket=function(t,n,r){if(void 0===t)return d;if("string"==typeof t){if("b"===t.charAt(0))return e.decodeBase64Packet(t.substr(1),n);if(r&&!1===(t=function(t){try{t=c.decode(t,{strict:!1})}catch(t){return!1}return t}(t)))return d;var o=t.charAt(0);return Number(o)==o&&p[o]?t.length>1?{type:p[o],data:t.substring(1)}:{type:p[o]}:d}o=new Uint8Array(t)[0];var i=s(t,1);return v&&"blob"===n&&(i=new v([i])),{type:p[o],data:i}},e.decodeBase64Packet=function(t,e){var n=p[t.charAt(0)];if(!r)return{type:n,data:{base64:!0,data:t.substr(1)}};var o=r.decode(t.substr(1));return"blob"===e&&v&&(o=new v([o])),{type:n,data:o}},e.encodePayload=function(t,n,r){"function"==typeof n&&(r=n,n=null);var o=i(t);if(n&&o)return v&&!l?e.encodePayloadAsBlob(t,r):e.encodePayloadAsArrayBuffer(t,r);if(!t.length)return r("0:");g(t,(function(t,r){e.encodePacket(t,!!o&&n,!1,(function(t){r(null,function(t){return t.length+":"+t}(t))}))}),(function(t,e){return r(e.join(""))}))},e.decodePayload=function(t,n,r){if("string"!=typeof t)return e.decodePayloadAsBinary(t,n,r);var o;if("function"==typeof n&&(r=n,n=null),""===t)return r(d,0,1);for(var i,s,a="",c=0,u=t.length;c<u;c++){var f=t.charAt(c);if(":"===f){if(""===a||a!=(i=Number(a)))return r(d,0,1);if(a!=(s=t.substr(c+1,i)).length)return r(d,0,1);if(s.length){if(o=e.decodePacket(s,n,!1),d.type===o.type&&d.data===o.data)return r(d,0,1);if(!1===r(o,c+i,u))return}c+=i,a=""}else a+=f}return""!==a?r(d,0,1):void 0},e.encodePayloadAsArrayBuffer=function(t,n){if(!t.length)return n(new ArrayBuffer(0));g(t,(function(t,n){e.encodePacket(t,!0,!0,(function(t){return n(null,t)}))}),(function(t,e){var r=e.reduce((function(t,e){var n;return t+(n="string"==typeof e?e.length:e.byteLength).toString().length+n+2}),0),o=new Uint8Array(r),i=0;return e.forEach((function(t){var e="string"==typeof t,n=t;if(e){for(var r=new Uint8Array(t.length),s=0;s<t.length;s++)r[s]=t.charCodeAt(s);n=r.buffer}o[i++]=e?0:1;var a=n.byteLength.toString();for(s=0;s<a.length;s++)o[i++]=parseInt(a[s]);o[i++]=255;for(r=new Uint8Array(n),s=0;s<r.length;s++)o[i++]=r[s]})),n(o.buffer)}))},e.encodePayloadAsBlob=function(t,n){g(t,(function(t,n){e.encodePacket(t,!0,!0,(function(t){var e=new Uint8Array(1);if(e[0]=1,"string"==typeof t){for(var r=new Uint8Array(t.length),o=0;o<t.length;o++)r[o]=t.charCodeAt(o);t=r.buffer,e[0]=0}var i=(t instanceof ArrayBuffer?t.byteLength:t.size).toString(),s=new Uint8Array(i.length+1);for(o=0;o<i.length;o++)s[o]=parseInt(i[o]);if(s[i.length]=255,v){var a=new v([e.buffer,s.buffer,t]);n(null,a)}}))}),(function(t,e){return n(new v(e))}))},e.decodePayloadAsBinary=function(t,n,r){"function"==typeof n&&(r=n,n=null);for(var o=t,i=[];o.byteLength>0;){for(var a=new Uint8Array(o),c=0===a[0],u="",f=1;255!==a[f];f++){if(u.length>310)return r(d,0,1);u+=a[f]}o=s(o,2+u.length),u=parseInt(u);var l=s(o,0,u);if(c)try{l=String.fromCharCode.apply(null,new Uint8Array(l))}catch(t){var h=new Uint8Array(l);l="";for(f=0;f<h.length;f++)l+=String.fromCharCode(h[f])}i.push(l),o=s(o,u)}var p=i.length;i.forEach((function(t,o){r(e.decodePacket(t,n,!0),o,p)}))}},function(t,e,n){t.exports=n(278)},function(t,e,n){t.exports=n(479)},,,function(t,e,n){var r=n(14).TypeError;t.exports=function(t){if(null==t)throw r("Can't call method on "+t);return t}},function(t,e,n){var r=n(84),o=n(115),i=n(251);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(84),o=n(185).EXISTS,i=n(25),s=n(115).f,a=Function.prototype,c=i(a.toString),u=/^\s*function ([^ (]*)/,f=i(u.exec);r&&!o&&s(a,"name",{configurable:!0,get:function(){try{return f(u,c(this))[1]}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(221),o=n(169);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(t,e,n){var r=n(312),o=n(105);t.exports=function(t){return r(o(t))}},,,,function(t,e,n){t.exports=n(499)},function(t,e,n){var r=n(20);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},function(t,e,n){var r=n(56);t.exports=r("navigator","userAgent")||""},function(t,e){t.exports={}},function(t,e,n){var r=n(17);t.exports=r([].slice)},function(t,e,n){var r=n(14),o=n(33),i=n(27),s=n(80),a=n(162),c=n(292),u=a("IE_PROTO"),f=r.Object,l=f.prototype;t.exports=c?f.getPrototypeOf:function(t){var e=s(t);if(o(e,u))return e[u];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof f?l:null}},function(t,e,n){var r=n(14),o=n(34),i=r.TypeError;t.exports=function(t,e){if(o(e,t))return t;throw i("Incorrect invocation")}},,function(t,e,n){t.exports=n(578)},,,,,function(t,e,n){var r=n(101);t.exports=function(t,e,n){for(var o in e)n&&n.unsafe&&t[o]?t[o]=e[o]:r(t,o,e[o],n);return t}},function(t,e,n){var r=n(15),o=n(17),i=n(134),s=n(26),a=n(33),c=n(54).f,u=n(163),f=n(287),l=n(294),h=n(157),p=n(350),d=!1,v=h("meta"),g=0,y=function(t){c(t,v,{value:{objectID:"O"+g++,weakData:{}}})},m=t.exports={enable:function(){m.enable=function(){},d=!0;var t=u.f,e=o([].splice),n={};n[v]=1,t(n).length&&(u.f=function(n){for(var r=t(n),o=0,i=r.length;o<i;o++)if(r[o]===v){e(r,o,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:f.f}))},fastKey:function(t,e){if(!s(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,v)){if(!l(t))return"F";if(!e)return"E";y(t)}return t[v].objectID},getWeakData:function(t,e){if(!a(t,v)){if(!l(t))return!0;if(!e)return!1;y(t)}return t[v].weakData},onFreeze:function(t){return p&&d&&l(t)&&!a(t,v)&&y(t),t}};i[v]=!0},function(t,e,n){var r=n(92),o=n(199),i=n(113),s=n(24)("iterator");t.exports=function(t){if(null!=t)return o(t,s)||o(t,"@@iterator")||i[r(t)]}},function(t,e,n){"use strict";var r=n(79),o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},function(t,e,n){var r=n(25),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},,,function(t,e,n){t.exports=n(516)},,,function(t,e,n){var r=n(405),o=n(197);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},function(t,e,n){var r,o,i=n(14),s=n(133),a=i.process,c=i.Deno,u=a&&a.versions||c&&c.version,f=u&&u.v8;f&&(o=(r=f.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},function(t,e,n){var r=n(14).String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},function(t,e,n){var r=n(17),o=0,i=Math.random(),s=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++o+i,36)}},function(t,e,n){"use strict";var r=n(154),o=n(54),i=n(91);t.exports=function(t,e,n){var s=r(e);s in t?o.f(t,s,i(0,n)):t[s]=n}},function(t,e,n){var r=n(17),o=n(20),i=n(27),s=n(92),a=n(56),c=n(206),u=function(){},f=[],l=a("Reflect","construct"),h=/^\s*(?:class|function)\b/,p=r(h.exec),d=!h.exec(u),v=function(t){if(!i(t))return!1;try{return l(u,f,t),!0}catch(t){return!1}},g=function(t){if(!i(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!p(h,c(t))}catch(t){return!0}};g.sham=!0,t.exports=!l||o((function(){var t;return v(v.call)||!v(Object)||!v((function(){t=!0}))||t}))?g:v},function(t,e,n){var r=n(20),o=n(24),i=n(155),s=o("species");t.exports=function(t){return i>=51||!r((function(){var e=[];return(e.constructor={})[s]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,n){var r=n(285),o=n(208);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(200),o=n(157),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,n){var r=n(285),o=n(208).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(17),o=n(47),i=n(428);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return o(n),i(r),e?t(n,r):n.__proto__=r,n}}():void 0)},function(t,e,n){"use strict";var r=n(15),o=n(14),i=n(145),s=n(20),a=n(73),c=n(103),u=n(137),f=n(27),l=n(26),h=n(102),p=n(54).f,d=n(83).forEach,v=n(39),g=n(74),y=g.set,m=g.getterFor;t.exports=function(t,e,n){var g,b=-1!==t.indexOf("Map"),w=-1!==t.indexOf("Weak"),A=b?"set":"add",x=o[t],k=x&&x.prototype,C={};if(v&&f(x)&&(w||k.forEach&&!s((function(){(new x).entries().next()})))){var E=(g=e((function(e,n){y(u(e,E),{type:t,collection:new x}),null!=n&&c(n,e[A],{that:e,AS_ENTRIES:b})}))).prototype,S=m(t);d(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"==t||"set"==t;!(t in k)||w&&"clear"==t||a(E,t,(function(n,r){var o=S(this).collection;if(!e&&w&&!l(n))return"get"==t&&void 0;var i=o[t](0===n?0:n,r);return e?this:i}))})),w||p(E,"size",{configurable:!0,get:function(){return S(this).collection.size}})}else g=n.getConstructor(e,t,b,A),i.enable();return h(g,t,!1,!0),C[t]=g,r({global:!0,forced:!0},C),w||n.setStrong(g,t,b),g}},function(t,e,n){var r,o,i,s=n(473),a=n(16),c=n(25),u=n(96),f=n(124),l=n(75),h=n(215),p=n(252),d=n(220),v=a.TypeError,g=a.WeakMap;if(s||h.state){var y=h.state||(h.state=new g),m=c(y.get),b=c(y.has),w=c(y.set);r=function(t,e){if(b(y,t))throw new v("Object already initialized");return e.facade=t,w(y,t,e),e},o=function(t){return m(y,t)||{}},i=function(t){return b(y,t)}}else{var A=p("state");d[A]=!0,r=function(t,e){if(l(t,A))throw new v("Object already initialized");return e.facade=t,f(t,A,e),e},o=function(t){return l(t,A)?t[A]:{}},i=function(t){return l(t,A)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=o(e)).type!==t)throw v("Incompatible receiver, "+t+" required");return n}}}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){var e=+t;return e!=e||0===e?0:(e>0?r:n)(e)}},function(t,e,n){var r=n(167),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){"use strict";var r,o,i=n(59),s=n(25),a=n(85),c=n(254),u=n(255),f=n(214),l=n(256),h=n(166).get,p=n(359),d=n(360),v=f("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,y=g,m=s("".charAt),b=s("".indexOf),w=s("".replace),A=s("".slice),x=(o=/b*/g,i(g,r=/a/,"a"),i(g,o,"a"),0!==r.lastIndex||0!==o.lastIndex),k=u.UNSUPPORTED_Y||u.BROKEN_CARET,C=void 0!==/()??/.exec("")[1];(x||C||k||p||d)&&(y=function(t){var e,n,r,o,s,u,f,p=this,d=h(p),E=a(t),S=d.raw;if(S)return S.lastIndex=p.lastIndex,e=i(y,S,E),p.lastIndex=S.lastIndex,e;var B=d.groups,I=k&&p.sticky,O=i(c,p),P=p.source,T=0,R=E;if(I&&(O=w(O,"y",""),-1===b(O,"g")&&(O+="g"),R=A(E,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\n"!==m(E,p.lastIndex-1))&&(P="(?: "+P+")",R=" "+R,T++),n=new RegExp("^(?:"+P+")",O)),C&&(n=new RegExp("^"+P+"$(?!\\s)",O)),x&&(r=p.lastIndex),o=i(g,I?n:p,R),I?o?(o.input=A(o.input,T),o[0]=A(o[0],T),o.index=p.lastIndex,p.lastIndex+=o[0].length):p.lastIndex=0:x&&o&&(p.lastIndex=p.global?o.index+o[0].length:r),C&&o&&o.length>1&&i(v,o[0],n,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(o[s]=void 0)})),o&&B)for(o.groups=u=l(null),s=0;s<B.length;s++)u[(f=B[s])[0]]=o[f[1]];return o}),t.exports=y},function(t,e,n){"use strict";n(126);var r=n(25),o=n(95),i=n(169),s=n(45),a=n(57),c=n(124),u=a("species"),f=RegExp.prototype;t.exports=function(t,e,n,l){var h=a(t),p=!s((function(){var e={};return e[h]=function(){return 7},7!=""[t](e)})),d=p&&!s((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return e=!0,null},n[h](""),!e}));if(!p||!d||n){var v=r(/./[h]),g=e(h,""[t],(function(t,e,n,o,s){var a=r(t),c=e.exec;return c===i||c===f.exec?p&&!s?{done:!0,value:v(e,n,o)}:{done:!0,value:a(n,e,o)}:{done:!1}}));o(String.prototype,t,g[0]),o(f,h,g[1])}l&&c(f[h],"sham",!0)}},function(t,e,n){var r=n(16),o=n(59),i=n(49),s=n(43),a=n(148),c=n(169),u=r.TypeError;t.exports=function(t,e){var n=t.exec;if(s(n)){var r=o(n,t,e);return null!==r&&i(r),r}if("RegExp"===a(t))return o(c,t,e);throw u("RegExp#exec called on incompatible receiver")}},function(t,e,n){(function(r){function o(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(545)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var o=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(o++,"%c"===t&&(i=o))})),t.splice(i,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=o,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(o())}).call(this,n(90))},function(t,e){e.encode=function(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},e.decode=function(t){for(var e={},n=t.split("&"),r=0,o=n.length;r<o;r++){var i=n[r].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}},function(t,e){t.exports=function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){(function(r){function o(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(563)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var o=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(o++,"%c"===t&&(i=o))})),t.splice(i,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=o,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(o())}).call(this,n(90))},function(t,e,n){var r=n(401),o=n(437);function i(e){return"function"==typeof r&&"symbol"==typeof o?(t.exports=i=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=i=function(t){return t&&"function"==typeof r&&t.constructor===r&&t!==r.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),i(e)}t.exports=i,t.exports.default=t.exports,t.exports.__esModule=!0},,,,,function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,e,n){var r=n(25);t.exports=r({}.isPrototypeOf)},function(t,e,n){var r=n(25),o=n(43),i=n(215),s=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return s(t)}),t.exports=i.inspectSource},function(t,e,n){var r=n(84),o=n(75),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),c=a&&"something"===function(){}.name,u=a&&(!r||r&&s(i,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}},function(t,e,n){var r=n(16),o=n(213),i=n(43),s=n(148),a=n(57)("toStringTag"),c=r.Object,u="Arguments"==s(function(){return arguments}());t.exports=o?s:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=c(t),a))?n:u?s(e):"Object"==(r=s(e))&&i(e.callee)?"Arguments":r}},,,,,function(t,e,n){"use strict";var r=n(631);n.d(e,"a",(function(){return r.a}));n(368);var o=n(263);n.d(e,"b",(function(){return o.a}))},,,,function(t,e,n){"use strict";n.d(e,"d",(function(){return s})),n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return c})),n.d(e,"a",(function(){return u})),n.d(e,"e",(function(){return f}));n(151);var r=n(30),o=n.n(r),i=(n(337),n(126),n(363),n(539),n(541),n(125),n(225),n(104),n(226),n(367),n(237));function s(){if(location){if("http:"===location.protocol)return"http://"+location.hostname+":9559";if("https:"===location.protocol)return"https://"+location.hostname+":5443"}return null}function a(){var t;return"https:"===(null===(t=location)||void 0===t?void 0:t.protocol)?"https://localhost:5443":"http://localhost:9559"}function c(){var t,e=(new i.UAParser).getResult(),n="Unknown";if(e.device.vendor&&e.device.model)n=o()(t="[".concat(e.device.vendor,"] ")).call(t,e.device.model);else if(e.os.name&&e.browser.name){var r;n=o()(r="[".concat(e.os.name,"] ")).call(r,e.browser.name)}return n}function u(){var t=localStorage.getItem("clientId");if(null===t){var e=(new i.UAParser).getResult(),n="Unknown";void 0!==e.device.vendor?n=e.device.vendor:void 0!==e.os.name&&(n=e.os.name),t=n+"_"+f(),localStorage.setItem("clientId",t)}return t}function f(){return Math.random().toString(36).substring(2,9)}},,function(t,e,n){var r=n(14),o=n(56),i=n(27),s=n(34),a=n(280),c=r.Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return i(e)&&s(e.prototype,c(t))}},function(t,e,n){var r=n(155),o=n(20);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(t,e,n){var r=n(79);t.exports=function(t,e){var n=t[e];return null==n?void 0:r(n)}},function(t,e,n){var r=n(70),o=n(201);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.21.1",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE",source:"https://github.com/zloirock/core-js"})},function(t,e,n){var r=n(14),o=n(407),i=r["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,e,n){var r=n(14),o=n(26),i=r.document,s=o(i)&&o(i.createElement);t.exports=function(t){return s?i.createElement(t):{}}},function(t,e,n){var r=n(204),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){var e=+t;return e!=e||0===e?0:(e>0?r:n)(e)}},function(t,e,n){var r={};r[n(24)("toStringTag")]="z",t.exports="[object z]"===String(r)},function(t,e,n){var r=n(17),o=n(27),i=n(201),s=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return s(t)}),t.exports=i.inspectSource},function(t,e,n){var r=n(204),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,n){var r=n(24);e.f=r},function(t,e,n){"use strict";var r=n(15),o=n(50),i=n(70),s=n(427),a=n(27),c=n(346),u=n(136),f=n(164),l=n(102),h=n(73),p=n(101),d=n(24),v=n(113),g=n(291),y=s.PROPER,m=s.CONFIGURABLE,b=g.IteratorPrototype,w=g.BUGGY_SAFARI_ITERATORS,A=d("iterator"),x=function(){return this};t.exports=function(t,e,n,s,d,g,k){c(n,e,s);var C,E,S,B=function(t){if(t===d&&R)return R;if(!w&&t in P)return P[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},I=e+" Iterator",O=!1,P=t.prototype,T=P[A]||P["@@iterator"]||d&&P[d],R=!w&&T||B(d),j="Array"==e&&P.entries||T;if(j&&(C=u(j.call(new t)))!==Object.prototype&&C.next&&(i||u(C)===b||(f?f(C,b):a(C[A])||p(C,A,x)),l(C,I,!0,!0),i&&(v[I]=x)),y&&"values"==d&&T&&"values"!==T.name&&(!i&&m?h(P,"name","values"):(O=!0,R=function(){return o(T,this)})),d)if(E={values:B("values"),keys:g?R:B("keys"),entries:B("entries")},k)for(S in E)(w||O||!(S in P))&&p(P,S,E[S]);else r({target:e,proto:!0,forced:w||O},E);return i&&!k||P[A]===R||p(P,A,R,{name:d}),v[e]=R,E}},function(t,e,n){var r=n(14).TypeError;t.exports=function(t,e){if(t<e)throw r("Not enough arguments");return t}},function(t,e,n){var r=n(99),o=n(14);t.exports="process"==r(o.process)},function(t,e,n){var r={};r[n(57)("toStringTag")]="z",t.exports="[object z]"===String(r)},function(t,e,n){var r=n(248),o=n(215);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.1",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(16),o=n(216),i=r["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,e,n){var r=n(16),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},function(t,e,n){var r=n(16),o=n(96),i=r.document,s=o(i)&&o(i.createElement);t.exports=function(t){return s?i.createElement(t):{}}},function(t,e,n){var r=n(16),o=n(43),i=n(219),s=r.TypeError;t.exports=function(t){if(o(t))return t;throw s(i(t)+" is not a function")}},function(t,e,n){var r=n(16).String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},function(t,e){t.exports={}},function(t,e,n){var r=n(16),o=n(253).f,i=n(124),s=n(95),a=n(216),c=n(487),u=n(314);t.exports=function(t,e){var n,f,l,h,p,d=t.target,v=t.global,g=t.stat;if(n=v?r:g?r[d]||a(d,{}):(r[d]||{}).prototype)for(f in e){if(h=e[f],l=t.noTargetGet?(p=o(n,f))&&p.value:n[f],!u(v?f:d+(g?".":"#")+f,t.forced)&&void 0!==l){if(typeof h==typeof l)continue;c(h,l)}(t.sham||l&&l.sham)&&i(h,"sham",!0),s(n,f,h,t)}}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,n){"use strict";var r=n(361).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){"use strict";var r=n(20);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},function(t,e,n){var r=n(25),o=n(95),i=Date.prototype,s=r(i.toString),a=r(i.getTime);"Invalid Date"!=String(new Date(NaN))&&o(i,"toString",(function(){var t=a(this);return t==t?s(this):"Invalid Date"}))},function(t,e,n){"use strict";var r=n(25),o=n(185).PROPER,i=n(95),s=n(49),a=n(183),c=n(85),u=n(45),f=n(254),l=RegExp.prototype,h=l.toString,p=r(f),d=u((function(){return"/a/b"!=h.call({source:"a",flags:"b"})})),v=o&&"toString"!=h.name;(d||v)&&i(RegExp.prototype,"toString",(function(){var t=s(this),e=c(t.source),n=t.flags;return"/"+e+"/"+c(void 0===n&&a(l,t)&&!("flags"in l)?p(t):n)}),{unsafe:!0})},function(t,e){var n=1e3,r=6e4,o=60*r,i=24*o;function s(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,e){e=e||{};var a,c=typeof t;if("string"===c&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===c&&!1===isNaN(t))return e.long?s(a=t,i,"day")||s(a,o,"hour")||s(a,r,"minute")||s(a,n,"second")||a+" ms":function(t){if(t>=i)return Math.round(t/i)+"d";if(t>=o)return Math.round(t/o)+"h";if(t>=r)return Math.round(t/r)+"m";if(t>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){var r=n(546)("socket.io-parser"),o=n(117),i=n(318),s=n(552),a=n(320),c=n(321);function u(){}function f(t){var n=""+t.type;return e.BINARY_EVENT!==t.type&&e.BINARY_ACK!==t.type||(n+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(n+=t.nsp+","),null!=t.id&&(n+=t.id),null!=t.data&&(n+=JSON.stringify(t.data)),r("encoded %j as %s",t,n),n}function l(){this.reconstructor=null}function h(t){this.reconPack=t,this.buffers=[]}function p(t){return{type:e.ERROR,data:"parser error: "+t}}e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=u,e.Decoder=l,u.prototype.encode=function(t,n){(t.type!==e.EVENT&&t.type!==e.ACK||!i(t.data)||(t.type=t.type===e.EVENT?e.BINARY_EVENT:e.BINARY_ACK),r("encoding packet %j",t),e.BINARY_EVENT===t.type||e.BINARY_ACK===t.type)?function(t,e){s.removeBlobs(t,(function(t){var n=s.deconstructPacket(t),r=f(n.packet),o=n.buffers;o.unshift(r),e(o)}))}(t,n):n([f(t)])},o(l.prototype),l.prototype.add=function(t){var n;if("string"==typeof t)n=function(t){var n=0,o={type:Number(t.charAt(0))};if(null==e.types[o.type])return p("unknown packet type "+o.type);if(e.BINARY_EVENT===o.type||e.BINARY_ACK===o.type){for(var i="";"-"!==t.charAt(++n)&&(i+=t.charAt(n),n!=t.length););if(i!=Number(i)||"-"!==t.charAt(n))throw new Error("Illegal attachments");o.attachments=Number(i)}if("/"===t.charAt(n+1))for(o.nsp="";++n;){if(","===(c=t.charAt(n)))break;if(o.nsp+=c,n===t.length)break}else o.nsp="/";var s=t.charAt(n+1);if(""!==s&&Number(s)==s){for(o.id="";++n;){var c;if(null==(c=t.charAt(n))||Number(c)!=c){--n;break}if(o.id+=t.charAt(n),n===t.length)break}o.id=Number(o.id)}if(t.charAt(++n)){var u=function(t){try{return JSON.parse(t)}catch(t){return!1}}(t.substr(n));if(!(!1!==u&&(o.type===e.ERROR||a(u))))return p("invalid payload");o.data=u}return r("decoded %s as %j",t,o),o}(t),e.BINARY_EVENT===n.type||e.BINARY_ACK===n.type?(this.reconstructor=new h(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!c(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(n=this.reconstructor.takeBinaryData(t))&&(this.reconstructor=null,this.emit("decoded",n))}},l.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},h.prototype.takeBinaryData=function(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var e=s.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null},h.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(t,e,n){(function(e){var r=n(555);t.exports=function(t){var n=t.xdomain,o=t.xscheme,i=t.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!n||r))return new XMLHttpRequest}catch(t){}try{if("undefined"!=typeof XDomainRequest&&!o&&i)return new XDomainRequest}catch(t){}if(!n)try{return new(e[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}}).call(this,n(53))},function(t,e,n){var r=n(118),o=n(117);function i(t){this.path=t.path,this.hostname=t.hostname,this.port=t.port,this.secure=t.secure,this.query=t.query,this.timestampParam=t.timestampParam,this.timestampRequests=t.timestampRequests,this.readyState="",this.agent=t.agent||!1,this.socket=t.socket,this.enablesXDR=t.enablesXDR,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.forceNode=t.forceNode,this.extraHeaders=t.extraHeaders,this.localAddress=t.localAddress}t.exports=i,o(i.prototype),i.prototype.onError=function(t,e){var n=new Error(t);return n.type="TransportError",n.description=e,this.emit("error",n),this},i.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},i.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},i.prototype.send=function(t){if("open"!==this.readyState)throw new Error("Transport not open");this.write(t)},i.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},i.prototype.onData=function(t){var e=r.decodePacket(t,this.socket.binaryType);this.onPacket(e)},i.prototype.onPacket=function(t){this.emit("packet",t)},i.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},,function(t,e,n){t.exports=n(573)},function(t,e,n){t.exports=n(579)},,,,function(t,e,n){var r;
 /*!
  * UAParser.js v0.7.21
  * Lightweight JavaScript-based User-Agent string parser
@@ -6,15 +6,15 @@ window.offload=function(e){var t={};function n(r){if(t[r])return t[r].exports;va
  *
  * Copyright © 2012-2019 Faisal Salman <f@faisalman.com>
  * Licensed under MIT License
- */!function(o,i){"use strict";var s="model",a="name",c="type",u="vendor",l="version",f="mobile",h="tablet",p="smarttv",d={extend:function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},g={rgx:function(e,t){for(var n,r,o,i,s,a,c=0;c<t.length&&!s;){var u=t[c],l=t[c+1];for(n=r=0;n<u.length&&!s;)if(s=u[n++].exec(e))for(o=0;o<l.length;o++)a=s[++r],"object"==typeof(i=l[o])&&i.length>0?2==i.length?"function"==typeof i[1]?this[i[0]]=i[1].call(this,a):this[i[0]]=i[1]:3==i.length?"function"!=typeof i[1]||i[1].exec&&i[1].test?this[i[0]]=a?a.replace(i[1],i[2]):void 0:this[i[0]]=a?i[1].call(this,a,i[2]):void 0:4==i.length&&(this[i[0]]=a?i[3].call(this,a.replace(i[1],i[2])):void 0):this[i]=a||void 0;c+=2}},str:function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(d.has(t[n][r],e))return"?"===n?void 0:n}else if(d.has(t[n],e))return"?"===n?void 0:n;return e}},y={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},v={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[a,l],[/(opios)[\/\s]+([\w\.]+)/i],[[a,"Opera Mini"],l],[/\s(opr)\/([\w\.]+)/i],[[a,"Opera"],l],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i],[a,l],[/(konqueror)\/([\w\.]+)/i],[[a,"Konqueror"],l],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[a,"IE"],l],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[a,"Edge"],l],[/(yabrowser)\/([\w\.]+)/i],[[a,"Yandex"],l],[/(Avast)\/([\w\.]+)/i],[[a,"Avast Secure Browser"],l],[/(AVG)\/([\w\.]+)/i],[[a,"AVG Secure Browser"],l],[/(puffin)\/([\w\.]+)/i],[[a,"Puffin"],l],[/(focus)\/([\w\.]+)/i],[[a,"Firefox Focus"],l],[/(opt)\/([\w\.]+)/i],[[a,"Opera Touch"],l],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[a,"UCBrowser"],l],[/(comodo_dragon)\/([\w\.]+)/i],[[a,/_/g," "],l],[/(windowswechat qbcore)\/([\w\.]+)/i],[[a,"WeChat(Win) Desktop"],l],[/(micromessenger)\/([\w\.]+)/i],[[a,"WeChat"],l],[/(brave)\/([\w\.]+)/i],[[a,"Brave"],l],[/(qqbrowserlite)\/([\w\.]+)/i],[a,l],[/(QQ)\/([\d\.]+)/i],[a,l],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[a,l],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[a,l],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[a,l],[/(MetaSr)[\/\s]?([\w\.]+)/i],[a],[/(LBBROWSER)/i],[a],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[l,[a,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[l,[a,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[a,l],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[l,[a,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[a,/(.+)/,"$1 WebView"],l],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[a,/(.+(?:g|us))(.+)/,"$1 $2"],l],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[l,[a,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[a,"Sailfish Browser"],l],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[a,l],[/(dolfin)\/([\w\.]+)/i],[[a,"Dolphin"],l],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[a,"360 Browser"]],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[a,"Chrome"],l],[/(coast)\/([\w\.]+)/i],[[a,"Opera Coast"],l],[/fxios\/([\w\.-]+)/i],[l,[a,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[l,[a,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[l,a],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[a,"GSA"],l],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[a,[l,g.str,y.browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[a,l],[/(navigator|netscape)\/([\w\.-]+)/i],[[a,"Netscape"],l],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[a,l]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",d.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",d.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[["architecture",d.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[s,u,[c,h]],[/applecoremedia\/[\w\.]+ \((ipad)/],[s,[u,"Apple"],[c,h]],[/(apple\s{0,1}tv)/i],[[s,"Apple TV"],[u,"Apple"],[c,p]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[u,s,[c,h]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[s,[u,"Amazon"],[c,h]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[s,g.str,y.device.amazon.model],[u,"Amazon"],[c,f]],[/android.+aft([bms])\sbuild/i],[s,[u,"Amazon"],[c,p]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[s,u,[c,f]],[/\((ip[honed|\s\w*]+);/i],[s,[u,"Apple"],[c,f]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[u,s,[c,f]],[/\(bb10;\s(\w+)/i],[s,[u,"BlackBerry"],[c,f]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[s,[u,"Asus"],[c,h]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[u,"Sony"],[s,"Xperia Tablet"],[c,h]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[s,[u,"Sony"],[c,f]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[u,s,[c,"console"]],[/android.+;\s(shield)\sbuild/i],[s,[u,"Nvidia"],[c,"console"]],[/(playstation\s[34portablevi]+)/i],[s,[u,"Sony"],[c,"console"]],[/(sprint\s(\w+))/i],[[u,g.str,y.device.sprint.vendor],[s,g.str,y.device.sprint.model],[c,f]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[u,[s,/_/g," "],[c,f]],[/(nexus\s9)/i],[s,[u,"HTC"],[c,h]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[s,[u,"Huawei"],[c,f]],[/android.+(bah2?-a?[lw]\d{2})/i],[s,[u,"Huawei"],[c,h]],[/(microsoft);\s(lumia[\s\w]+)/i],[u,s,[c,f]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[s,[u,"Microsoft"],[c,"console"]],[/(kin\.[onetw]{3})/i],[[s,/\./g," "],[u,"Microsoft"],[c,f]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[s,[u,"Motorola"],[c,f]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[s,[u,"Motorola"],[c,h]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[u,d.trim],[s,d.trim],[c,p]],[/hbbtv.+maple;(\d+)/i],[[s,/^/,"SmartTV"],[u,"Samsung"],[c,p]],[/\(dtv[\);].+(aquos)/i],[s,[u,"Sharp"],[c,p]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[u,"Samsung"],s,[c,h]],[/smart-tv.+(samsung)/i],[u,[c,p],s],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[u,"Samsung"],s,[c,f]],[/sie-(\w*)/i],[s,[u,"Siemens"],[c,f]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[u,"Nokia"],s,[c,f]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[s,[u,"Acer"],[c,h]],[/android.+([vl]k\-?\d{3})\s+build/i],[s,[u,"LG"],[c,h]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[u,"LG"],s,[c,h]],[/(lg) netcast\.tv/i],[u,s,[c,p]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[s,[u,"LG"],[c,f]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[u,s,[c,h]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[s,[u,"Lenovo"],[c,h]],[/(lenovo)[_\s-]?([\w-]+)/i],[u,s,[c,f]],[/linux;.+((jolla));/i],[u,s,[c,f]],[/((pebble))app\/[\d\.]+\s/i],[u,s,[c,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[u,s,[c,f]],[/crkey/i],[[s,"Chromecast"],[u,"Google"],[c,p]],[/android.+;\s(glass)\s\d/i],[s,[u,"Google"],[c,"wearable"]],[/android.+;\s(pixel c)[\s)]/i],[s,[u,"Google"],[c,h]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[s,[u,"Google"],[c,f]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i],[[s,/_/g," "],[u,"Xiaomi"],[c,f]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[s,/_/g," "],[u,"Xiaomi"],[c,h]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[s,[u,"Meizu"],[c,f]],[/(mz)-([\w-]{2,})/i],[[u,"Meizu"],s,[c,f]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[s,[u,"OnePlus"],[c,f]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[s,[u,"RCA"],[c,h]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[s,[u,"Dell"],[c,h]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[s,[u,"Verizon"],[c,h]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[u,"Barnes & Noble"],s,[c,h]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[s,[u,"NuVision"],[c,h]],[/android.+;\s(k88)\sbuild/i],[s,[u,"ZTE"],[c,h]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[s,[u,"Swiss"],[c,f]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[s,[u,"Swiss"],[c,h]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[s,[u,"Zeki"],[c,h]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[u,"Dragon Touch"],s,[c,h]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[s,[u,"Insignia"],[c,h]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[s,[u,"NextBook"],[c,h]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[u,"Voice"],s,[c,f]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[u,"LvTel"],s,[c,f]],[/android.+;\s(PH-1)\s/i],[s,[u,"Essential"],[c,f]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[s,[u,"Envizen"],[c,h]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[u,s,[c,h]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[s,[u,"MachSpeed"],[c,h]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[u,s,[c,h]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[s,[u,"Rotor"],[c,h]],[/android.+(KS(.+))\s+build/i],[s,[u,"Amazon"],[c,h]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[u,s,[c,h]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[c,d.lowerize],u,s],[/[\s\/\(](smart-?tv)[;\)]/i],[[c,p]],[/(android[\w\.\s\-]{0,9});.+build/i],[s,[u,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[l,[a,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[l,[a,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[a,l],[/rv\:([\w\.]{1,9}).+(gecko)/i],[l,a]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[a,l],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[a,[l,g.str,y.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[a,"Windows"],[l,g.str,y.os.windows.version]],[/\((bb)(10);/i],[[a,"BlackBerry"],l],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[a,l],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[a,"Symbian"],l],[/\((series40);/i],[a],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[a,"Firefox OS"],l],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[a,l],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[a,"Chromium OS"],l],[/(sunos)\s?([\w\.\d]*)/i],[[a,"Solaris"],l],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[a,l],[/(haiku)\s(\w+)/i],[a,l],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[l,/_/g,"."],[a,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[a,"Mac OS"],[l,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[a,l]]},m=function(e,t){if("object"==typeof e&&(t=e,e=void 0),!(this instanceof m))return new m(e,t).getResult();var n=e||(o&&o.navigator&&o.navigator.userAgent?o.navigator.userAgent:""),r=t?d.extend(v,t):v;return this.getBrowser=function(){var e={name:void 0,version:void 0};return g.rgx.call(e,n,r.browser),e.major=d.major(e.version),e},this.getCPU=function(){var e={architecture:void 0};return g.rgx.call(e,n,r.cpu),e},this.getDevice=function(){var e={vendor:void 0,model:void 0,type:void 0};return g.rgx.call(e,n,r.device),e},this.getEngine=function(){var e={name:void 0,version:void 0};return g.rgx.call(e,n,r.engine),e},this.getOS=function(){var e={name:void 0,version:void 0};return g.rgx.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=e,this},this};m.VERSION="0.7.21",m.BROWSER={NAME:a,MAJOR:"major",VERSION:l},m.CPU={ARCHITECTURE:"architecture"},m.DEVICE={MODEL:s,VENDOR:u,TYPE:c,CONSOLE:"console",MOBILE:f,SMARTTV:p,TABLET:h,WEARABLE:"wearable",EMBEDDED:"embedded"},m.ENGINE={NAME:a,VERSION:l},m.OS={NAME:a,VERSION:l},void 0!==t?(void 0!==e&&e.exports&&(t=e.exports=m),t.UAParser=m):void 0===(r=function(){return m}.call(t,n,t,e))||(e.exports=r);var b=o&&(o.jQuery||o.Zepto);if(b&&!b.ua){var w=new m;b.ua=w.getResult(),b.ua.get=function(){return w.getUA()},b.ua.set=function(e){w.setUA(e);var t=w.getResult();for(var n in t)b.ua[n]=t[n]}}}("object"==typeof window?window:this)},function(e,t,n){var r=n(33),o=n(8),i=n(18),s=n(4)("socket.io-client");e.exports=t=c;var a=t.managers={};function c(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,o=r(e),c=o.source,u=o.id,l=o.path,f=a[u]&&l in a[u].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||f?(s("ignoring socket cache for %s",c),n=i(c,t)):(a[u]||(s("new io instance for %s",c),a[u]=i(c,t)),n=a[u]),o.query&&!t.query&&(t.query=o.query),n.socket(o.path,t)}t.protocol=o.protocol,t.connect=c,t.Manager=n(18),t.Socket=n(23)},function(e,t,n){(function(t){var r=n(13),o=n(4)("socket.io-client:url");e.exports=function(e,n){var i=e;n=n||t.location,null==e&&(e=n.protocol+"//"+n.host);"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(o("protocol-less url %s",e),e=void 0!==n?n.protocol+"//"+e:"https://"+e),o("parse %s",e),i=r(e));i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443"));i.path=i.path||"/";var s=-1!==i.host.indexOf(":")?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+s+":"+i.port,i.href=i.protocol+"://"+s+(n&&n.port===i.port?"":":"+i.port),i}}).call(this,n(0))},function(e,t,n){var r;function o(e){function n(){if(n.enabled){var e=n,o=+new Date,i=o-(r||o);e.diff=i,e.prev=r,e.curr=o,r=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;c++;var o=t.formatters[r];if("function"==typeof o){var i=s[c];n=o.call(e,i),s.splice(c,1),c--}return n})),t.formatArgs.call(e,s);var u=n.log||t.log||console.log.bind(console);u.apply(e,s)}}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),"function"==typeof t.init&&t.init(n),n}(t=e.exports=o.debug=o.default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,o=0;o<r;o++)n[o]&&("-"===(e=n[o].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(14),t.names=[],t.skips=[],t.formatters={}},function(e,t,n){(function(r){function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(36)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))})),e.splice(i,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())}).call(this,n(3))},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,o=+new Date,i=o-(n||o);e.diff=i,e.prev=n,e.curr=o,n=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;c++;var o=t.formatters[r];if("function"==typeof o){var i=s[c];n=o.call(e,i),s.splice(c,1),c--}return n})),t.formatArgs.call(e,s);var u=r.log||t.log||console.log.bind(console);u.apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),r.destroy=o,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function o(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var i=t.instances[n];i.enabled=t.enabled(i.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(14),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t,n){"use strict";(function(e){
+ */!function(o,i){"use strict";var s="model",a="name",c="type",u="vendor",f="version",l="mobile",h="tablet",p="smarttv",d={extend:function(t,e){var n={};for(var r in t)e[r]&&e[r].length%2==0?n[r]=e[r].concat(t[r]):n[r]=t[r];return n},has:function(t,e){return"string"==typeof t&&-1!==e.toLowerCase().indexOf(t.toLowerCase())},lowerize:function(t){return t.toLowerCase()},major:function(t){return"string"==typeof t?t.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},v={rgx:function(t,e){for(var n,r,o,i,s,a,c=0;c<e.length&&!s;){var u=e[c],f=e[c+1];for(n=r=0;n<u.length&&!s;)if(s=u[n++].exec(t))for(o=0;o<f.length;o++)a=s[++r],"object"==typeof(i=f[o])&&i.length>0?2==i.length?"function"==typeof i[1]?this[i[0]]=i[1].call(this,a):this[i[0]]=i[1]:3==i.length?"function"!=typeof i[1]||i[1].exec&&i[1].test?this[i[0]]=a?a.replace(i[1],i[2]):void 0:this[i[0]]=a?i[1].call(this,a,i[2]):void 0:4==i.length&&(this[i[0]]=a?i[3].call(this,a.replace(i[1],i[2])):void 0):this[i]=a||void 0;c+=2}},str:function(t,e){for(var n in e)if("object"==typeof e[n]&&e[n].length>0){for(var r=0;r<e[n].length;r++)if(d.has(e[n][r],t))return"?"===n?void 0:n}else if(d.has(e[n],t))return"?"===n?void 0:n;return t}},g={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},y={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[a,f],[/(opios)[\/\s]+([\w\.]+)/i],[[a,"Opera Mini"],f],[/\s(opr)\/([\w\.]+)/i],[[a,"Opera"],f],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i],[a,f],[/(konqueror)\/([\w\.]+)/i],[[a,"Konqueror"],f],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[a,"IE"],f],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[a,"Edge"],f],[/(yabrowser)\/([\w\.]+)/i],[[a,"Yandex"],f],[/(Avast)\/([\w\.]+)/i],[[a,"Avast Secure Browser"],f],[/(AVG)\/([\w\.]+)/i],[[a,"AVG Secure Browser"],f],[/(puffin)\/([\w\.]+)/i],[[a,"Puffin"],f],[/(focus)\/([\w\.]+)/i],[[a,"Firefox Focus"],f],[/(opt)\/([\w\.]+)/i],[[a,"Opera Touch"],f],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[a,"UCBrowser"],f],[/(comodo_dragon)\/([\w\.]+)/i],[[a,/_/g," "],f],[/(windowswechat qbcore)\/([\w\.]+)/i],[[a,"WeChat(Win) Desktop"],f],[/(micromessenger)\/([\w\.]+)/i],[[a,"WeChat"],f],[/(brave)\/([\w\.]+)/i],[[a,"Brave"],f],[/(qqbrowserlite)\/([\w\.]+)/i],[a,f],[/(QQ)\/([\d\.]+)/i],[a,f],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[a,f],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[a,f],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[a,f],[/(MetaSr)[\/\s]?([\w\.]+)/i],[a],[/(LBBROWSER)/i],[a],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[f,[a,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[f,[a,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[a,f],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[f,[a,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[a,/(.+)/,"$1 WebView"],f],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[a,/(.+(?:g|us))(.+)/,"$1 $2"],f],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[f,[a,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[a,"Sailfish Browser"],f],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[a,f],[/(dolfin)\/([\w\.]+)/i],[[a,"Dolphin"],f],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[a,"360 Browser"]],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[a,"Chrome"],f],[/(coast)\/([\w\.]+)/i],[[a,"Opera Coast"],f],[/fxios\/([\w\.-]+)/i],[f,[a,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[f,[a,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[f,a],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[a,"GSA"],f],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[a,[f,v.str,g.browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[a,f],[/(navigator|netscape)\/([\w\.-]+)/i],[[a,"Netscape"],f],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[a,f]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",d.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",d.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[["architecture",d.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[s,u,[c,h]],[/applecoremedia\/[\w\.]+ \((ipad)/],[s,[u,"Apple"],[c,h]],[/(apple\s{0,1}tv)/i],[[s,"Apple TV"],[u,"Apple"],[c,p]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[u,s,[c,h]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[s,[u,"Amazon"],[c,h]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[s,v.str,g.device.amazon.model],[u,"Amazon"],[c,l]],[/android.+aft([bms])\sbuild/i],[s,[u,"Amazon"],[c,p]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[s,u,[c,l]],[/\((ip[honed|\s\w*]+);/i],[s,[u,"Apple"],[c,l]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[u,s,[c,l]],[/\(bb10;\s(\w+)/i],[s,[u,"BlackBerry"],[c,l]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[s,[u,"Asus"],[c,h]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[u,"Sony"],[s,"Xperia Tablet"],[c,h]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[s,[u,"Sony"],[c,l]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[u,s,[c,"console"]],[/android.+;\s(shield)\sbuild/i],[s,[u,"Nvidia"],[c,"console"]],[/(playstation\s[34portablevi]+)/i],[s,[u,"Sony"],[c,"console"]],[/(sprint\s(\w+))/i],[[u,v.str,g.device.sprint.vendor],[s,v.str,g.device.sprint.model],[c,l]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[u,[s,/_/g," "],[c,l]],[/(nexus\s9)/i],[s,[u,"HTC"],[c,h]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[s,[u,"Huawei"],[c,l]],[/android.+(bah2?-a?[lw]\d{2})/i],[s,[u,"Huawei"],[c,h]],[/(microsoft);\s(lumia[\s\w]+)/i],[u,s,[c,l]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[s,[u,"Microsoft"],[c,"console"]],[/(kin\.[onetw]{3})/i],[[s,/\./g," "],[u,"Microsoft"],[c,l]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[s,[u,"Motorola"],[c,l]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[s,[u,"Motorola"],[c,h]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[u,d.trim],[s,d.trim],[c,p]],[/hbbtv.+maple;(\d+)/i],[[s,/^/,"SmartTV"],[u,"Samsung"],[c,p]],[/\(dtv[\);].+(aquos)/i],[s,[u,"Sharp"],[c,p]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[u,"Samsung"],s,[c,h]],[/smart-tv.+(samsung)/i],[u,[c,p],s],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[u,"Samsung"],s,[c,l]],[/sie-(\w*)/i],[s,[u,"Siemens"],[c,l]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[u,"Nokia"],s,[c,l]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[s,[u,"Acer"],[c,h]],[/android.+([vl]k\-?\d{3})\s+build/i],[s,[u,"LG"],[c,h]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[u,"LG"],s,[c,h]],[/(lg) netcast\.tv/i],[u,s,[c,p]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[s,[u,"LG"],[c,l]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[u,s,[c,h]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[s,[u,"Lenovo"],[c,h]],[/(lenovo)[_\s-]?([\w-]+)/i],[u,s,[c,l]],[/linux;.+((jolla));/i],[u,s,[c,l]],[/((pebble))app\/[\d\.]+\s/i],[u,s,[c,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[u,s,[c,l]],[/crkey/i],[[s,"Chromecast"],[u,"Google"],[c,p]],[/android.+;\s(glass)\s\d/i],[s,[u,"Google"],[c,"wearable"]],[/android.+;\s(pixel c)[\s)]/i],[s,[u,"Google"],[c,h]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[s,[u,"Google"],[c,l]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i],[[s,/_/g," "],[u,"Xiaomi"],[c,l]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[s,/_/g," "],[u,"Xiaomi"],[c,h]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[s,[u,"Meizu"],[c,l]],[/(mz)-([\w-]{2,})/i],[[u,"Meizu"],s,[c,l]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[s,[u,"OnePlus"],[c,l]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[s,[u,"RCA"],[c,h]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[s,[u,"Dell"],[c,h]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[s,[u,"Verizon"],[c,h]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[u,"Barnes & Noble"],s,[c,h]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[s,[u,"NuVision"],[c,h]],[/android.+;\s(k88)\sbuild/i],[s,[u,"ZTE"],[c,h]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[s,[u,"Swiss"],[c,l]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[s,[u,"Swiss"],[c,h]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[s,[u,"Zeki"],[c,h]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[u,"Dragon Touch"],s,[c,h]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[s,[u,"Insignia"],[c,h]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[s,[u,"NextBook"],[c,h]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[u,"Voice"],s,[c,l]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[u,"LvTel"],s,[c,l]],[/android.+;\s(PH-1)\s/i],[s,[u,"Essential"],[c,l]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[s,[u,"Envizen"],[c,h]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[u,s,[c,h]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[s,[u,"MachSpeed"],[c,h]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[u,s,[c,h]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[s,[u,"Rotor"],[c,h]],[/android.+(KS(.+))\s+build/i],[s,[u,"Amazon"],[c,h]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[u,s,[c,h]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[c,d.lowerize],u,s],[/[\s\/\(](smart-?tv)[;\)]/i],[[c,p]],[/(android[\w\.\s\-]{0,9});.+build/i],[s,[u,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[f,[a,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[a,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[a,f],[/rv\:([\w\.]{1,9}).+(gecko)/i],[f,a]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[a,f],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[a,[f,v.str,g.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[a,"Windows"],[f,v.str,g.os.windows.version]],[/\((bb)(10);/i],[[a,"BlackBerry"],f],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[a,f],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[a,"Symbian"],f],[/\((series40);/i],[a],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[a,"Firefox OS"],f],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[a,f],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[a,"Chromium OS"],f],[/(sunos)\s?([\w\.\d]*)/i],[[a,"Solaris"],f],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[a,f],[/(haiku)\s(\w+)/i],[a,f],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[f,/_/g,"."],[a,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[a,"Mac OS"],[f,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[a,f]]},m=function(t,e){if("object"==typeof t&&(e=t,t=void 0),!(this instanceof m))return new m(t,e).getResult();var n=t||(o&&o.navigator&&o.navigator.userAgent?o.navigator.userAgent:""),r=e?d.extend(y,e):y;return this.getBrowser=function(){var t={name:void 0,version:void 0};return v.rgx.call(t,n,r.browser),t.major=d.major(t.version),t},this.getCPU=function(){var t={architecture:void 0};return v.rgx.call(t,n,r.cpu),t},this.getDevice=function(){var t={vendor:void 0,model:void 0,type:void 0};return v.rgx.call(t,n,r.device),t},this.getEngine=function(){var t={name:void 0,version:void 0};return v.rgx.call(t,n,r.engine),t},this.getOS=function(){var t={name:void 0,version:void 0};return v.rgx.call(t,n,r.os),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(t){return n=t,this},this};m.VERSION="0.7.21",m.BROWSER={NAME:a,MAJOR:"major",VERSION:f},m.CPU={ARCHITECTURE:"architecture"},m.DEVICE={MODEL:s,VENDOR:u,TYPE:c,CONSOLE:"console",MOBILE:l,SMARTTV:p,TABLET:h,WEARABLE:"wearable",EMBEDDED:"embedded"},m.ENGINE={NAME:a,VERSION:f},m.OS={NAME:a,VERSION:f},void 0!==e?(void 0!==t&&t.exports&&(e=t.exports=m),e.UAParser=m):void 0===(r=function(){return m}.call(e,n,e,t))||(t.exports=r);var b=o&&(o.jQuery||o.Zepto);if(b&&!b.ua){var w=new m;b.ua=w.getResult(),b.ua.get=function(){return w.getUA()},b.ua.set=function(t){w.setUA(t);var e=w.getResult();for(var n in e)b.ua[n]=e[n]}}}("object"==typeof window?window:this)},function(t,e,n){t.exports=n(574)},function(t,e,n){var r=n(585),o=n(592),i=n(598);function s(e,n,a){return"undefined"!=typeof Reflect&&r?(t.exports=s=r,t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=s=function(t,e,n){var r=i(t,e);if(r){var s=o(r,e);return s.get?s.get.call(n):s.value}},t.exports.default=t.exports,t.exports.__esModule=!0),s(e,n,a||e)}t.exports=s,t.exports.default=t.exports,t.exports.__esModule=!0},,,function(t,e,n){var r=n(14),o=n(17),i=n(20),s=n(99),a=r.Object,c=o("".split);t.exports=i((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"==s(t)?c(t,""):a(t)}:a},function(t,e,n){var r=n(39),o=n(283),i=n(54),s=n(47),a=n(65),c=n(161);e.f=r&&!o?Object.defineProperties:function(t,e){s(t);for(var n,r=a(e),o=c(e),u=o.length,f=0;u>f;)i.f(t,n=o[f++],r[n]);return t}},function(t,e,n){var r=n(65),o=n(207),i=n(100),s=function(t){return function(e,n,s){var a,c=r(e),u=i(c),f=o(s,u);if(t&&n!=n){for(;u>f;)if((a=c[f++])!=a)return!0}else for(;u>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){t.exports=function(){}},function(t,e,n){var r=n(14),o=n(50),i=n(79),s=n(47),a=n(156),c=n(146),u=r.TypeError;t.exports=function(t,e){var n=arguments.length<2?c(t):e;if(i(n))return s(o(n,t));throw u(a(t)+" is not iterable")}},function(t,e){t.exports=!1},function(t,e,n){var r=n(16),o=n(105),i=r.Object;t.exports=function(t){return i(o(t))}},function(t,e,n){var r=n(114);t.exports=r("navigator","userAgent")||""},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(214),o=n(306),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,n){var r=n(84),o=n(59),i=n(486),s=n(251),a=n(127),c=n(310),u=n(75),f=n(309),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=a(t),e=c(e),f)try{return l(t,e)}catch(t){}if(u(t,e))return s(!o(i.f,t,e),t[e])}},function(t,e,n){"use strict";var r=n(49);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){var r=n(45),o=n(16).RegExp;e.UNSUPPORTED_Y=r((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=r((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},function(t,e,n){var r,o=n(49),i=n(492),s=n(222),a=n(220),c=n(358),u=n(217),f=n(252),l=f("IE_PROTO"),h=function(){},p=function(t){return"<script>"+t+"<\/script>"},d=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;v="undefined"!=typeof document?document.domain&&r?d(r):((e=u("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):d(r);for(var n=s.length;n--;)delete v.prototype[s[n]];return v()};a[l]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(h.prototype=o(t),n=new h,h.prototype=null,n[l]=t):n=v(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(14),o=n(506),i=r.TypeError;t.exports=function(t){if(o(t))throw i("The method doesn't accept regular expressions");return t}},function(t,e,n){var r=n(24)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},function(t,e){var n=Function.prototype,r=n.apply,o=n.bind,i=n.call;t.exports="object"==typeof Reflect&&Reflect.apply||(o?i.bind(r):function(){return i.apply(r,arguments)})},,,,function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return Et}));n(104);var r=n(62),o=n.n(r),i=n(119),s=n.n(i),a=n(120),c=n.n(a),u=n(110),f=n.n(u),l=n(40),h=n.n(l),p=n(41),d=n.n(p),v=n(2),g=n.n(v),y=n(10),m=n.n(y),b=(n(125),n(126),n(494),n(131)),w=n.n(b),A=n(107),x=n.n(A),k=n(336),C=n.n(k),E=n(31),S=n.n(E),B=n(68),I=n.n(B),O=n(720),P=n.n(O),T=n(344),R=n.n(T),j=n(55),D=n.n(j),F=n(151),M=n.n(F),L=n(67),U=n.n(L),N=n(11),z=n.n(N),Q=n(18),G=n.n(Q),q=n(721),H=n.n(q),W=n(36),Y=n.n(W),J=n(30),X=n.n(J),K=n(8),V=n(106),Z=n(368),_=n(625),$=n(722),tt=n(195);function et(t,e){var n=void 0!==s.a&&c()(t)||t["@@iterator"];if(!n){if(f()(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return nt(t,e);var r=o()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return I()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nt(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){l=!0,a=t},f:function(){try{u||null==n.return||n.return()}finally{if(l)throw a}}}}function nt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function rt(t,e){it(t,e),e.add(t)}function ot(t,e,n){it(t,e),e.set(t,n)}function it(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function st(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}var at="[worker-manager]",ct=new z.a,ut=new z.a,ft=new z.a,lt=new z.a,ht=new z.a,pt=new z.a,dt=new z.a,vt=new z.a,gt=new z.a,yt=new G.a,mt=new G.a,bt=new G.a,wt=new G.a,At=new G.a,xt=new G.a,kt=new G.a,Ct=new G.a,Et=function(){function e(n){var r;if(h()(this,e),rt(this,Ct),rt(this,kt),rt(this,xt),rt(this,At),rt(this,wt),rt(this,bt),rt(this,mt),rt(this,yt),ot(this,ct,{writable:!0,value:void 0}),ot(this,ut,{writable:!0,value:void 0}),ot(this,ft,{writable:!0,value:void 0}),ot(this,lt,{writable:!0,value:null}),ot(this,ht,{writable:!0,value:null}),ot(this,pt,{writable:!0,value:new w.a}),ot(this,dt,{writable:!0,value:new w.a}),ot(this,vt,{writable:!0,value:new w.a}),ot(this,gt,{writable:!0,value:!1}),!(n instanceof V.EventEmitter))throw new TypeError("Not an instance of EventEmitter");return m()(this,ct,n),m()(this,ut,tt.a()),m()(this,ft,{qrcode:[],capability:[]}),this.signalingStatus=!1,null!==(r=document.currentScript)&&void 0!==r&&r.hasAttribute("use-native-webrtc")&&m()(this,gt,!0),K.info(at,"use-native-webrtc: "+g()(this,gt)),"true"===t.env.TEST&&(x()(this,"capabilities",{get:function(){return g()(this,vt)},set:function(t){m()(this,vt,t)}}),x()(this,"socket",{get:function(){return g()(this,lt)},set:function(t){m()(this,lt,t)}}),x()(this,"workerInfos",{get:function(){return g()(this,pt)},set:function(t){m()(this,pt,t)}}),x()(this,"callbacks",{get:function(){return g()(this,ft)},set:function(t){m()(this,ft,t)}})),this}return d()(e,[{key:"connect",value:function(t){var e,n,r,o,i,s,a=t||st(this,mt,Bt).call(this);if(null===a)return K.error(at,"No valid server URL found."),null;C()(a).call(a,"/offload-js")||(a+="/offload-js"),null!==g()(this,lt)&&g()(this,lt).close(),m()(this,lt,st(this,yt,St).call(this));try{g()(this,lt).connect(a)}catch(t){m()(this,lt,new _.a),g()(this,lt).connect(a)}return g()(this,lt).on("greeting",S()(e=st(this,bt,It)).call(e,this)),g()(this,lt).on("worker",S()(n=st(this,At,Pt)).call(n,this)),g()(this,lt).on("capabilities",S()(r=st(this,wt,Ot)).call(r,this)),g()(this,lt).on("message",S()(o=st(this,xt,Tt)).call(o,this)),g()(this,lt).on("connect",S()(i=st(this,kt,Rt)).call(i,this)),g()(this,lt).on("disconnect",S()(s=st(this,Ct,jt)).call(s,this)),a}},{key:"getWorkers",value:function(){var t,e,n=this.getWorkerInfos(),r=et(R()(n).call(n));try{for(r.s();!(e=r.n()).done;){var o=e.value;this.getOrCreateWorker(o)}}catch(t){r.e(t)}finally{r.f()}return I()(P()(t=g()(this,dt)).call(t))}},{key:"getOrCreateWorker",value:function(t){if(g()(this,dt).has(t))return g()(this,dt).get(t);var e=new Z.a(this,t);return g()(this,dt).set(t,e),e}},{key:"getWorkerInfos",value:function(){return g()(this,pt)}},{key:"getSupportedWorkers",value:function(t){var e,n,r=this,o=[];return D()(e=g()(this,vt)).call(e,(function(e,n,r){var i;M()(i=e.features).call(i,t)>=0&&o.push({id:n,name:e.name})})),D()(n=g()(this,pt)).call(n,(function(e,n,i){var s;!g()(r,vt).has(n)&&M()(s=e.features).call(s,t)>=0&&o.push({id:n,name:e.name})})),o}},{key:"getId",value:function(){return g()(this,ut)}},{key:"requestService",value:function(t,e){if(g()(this,pt).has(t))return K.debug(at,"Already existed in workInfos. Resolve successCallback directly"),void e.successCallback();g()(this,vt).get(t).options=e,g()(this,lt).emit("requestService",t)}},{key:"updateCapability",value:function(t){g()(this,lt).emit("getcapabilities"),g()(this,ft).capability.push(t)}},{key:"sendMessage",value:function(t,e){return g()(this,lt)?(g()(this,lt).emit("message",{to:t,from:g()(this,lt).id,message:e}),!0):(K.error(at,"socket is null"),!1)}},{key:"getQrCode",value:function(){var t=this;return new U.a((function(e){g()(t,ht)?e(g()(t,ht)):g()(t,ft).qrcode.push(e)}))}},{key:"isNativeWebRTCEnabled",value:function(){return g()(this,gt)}}]),e}();function St(){return"undefined"!=typeof tizen&&tizen.messageport?new $.a:new _.a}function Bt(){var t,e,n=(null===(t=document)||void 0===t||null===(e=t.currentScript)||void 0===e?void 0:e.src)||null;return n&&new H.a(n).protocol.match(/http?.:/)?tt.d():tt.c()}function It(t){var e;for(K.debug(at,"greeting: "+Y()(t)),this.signalingStatus=!0,m()(this,ht,t.qrCode),m()(this,pt,new w.a(t.workers));g()(this,ft).qrcode.length;)g()(this,ft).qrcode.pop().call(this,g()(this,ht));var n,r=et(R()(e=g()(this,pt)).call(e));try{for(r.s();!(n=r.n()).done;){var o=n.value;g()(this,ct).emit("joinWorker",this.getOrCreateWorker(o))}}catch(t){r.e(t)}finally{r.f()}}function Ot(t){for(m()(this,vt,new w.a(t));g()(this,ft).capability.length;)g()(this,ft).capability.pop().call(this,g()(this,vt))}function Pt(t){if("join"===t.event){var e,n,r,o;if(K.debug(at,X()(e=X()(n=X()(r=X()(o="join: '".concat(t.workerId,"' - '")).call(o,t.name,"', '")).call(r,t.socketId,"', '")).call(n,t.features,"', '")).call(e,t.mediaDeviceInfos,"'")),g()(this,dt).has(t.workerId)&&(K.warn(at,"join: Already connected. Disconnect the existing worker."),g()(this,dt).get(t.workerId).disconnect(),g()(this,dt).delete(t.workerId)),g()(this,pt).set(t.workerId,{socketId:t.socketId,name:t.name,features:t.features,mediaDeviceInfos:t.mediaDeviceInfos,compute_tasks:0}),g()(this,vt).has(t.workerId)){var i=g()(this,vt).get(t.workerId);i.options&&(K.debug(at,"resolve successCallback"),i.options.successCallback(),i.options=null)}g()(this,ct).emit("joinWorker",this.getOrCreateWorker(t.workerId))}else"bye"===t.event&&(K.debug(at,"bye: '".concat(t.workerId,"'")),g()(this,pt).delete(t.workerId),g()(this,dt).has(t.workerId)&&g()(this,dt).get(t.workerId).disconnect(),g()(this,dt).delete(t.workerId))}function Tt(t){g()(this,dt).has(t.from)&&g()(this,dt).get(t.from).handleMessage(t.message)}function Rt(){K.debug(at,"".concat(g()(this,lt).id," connected")),g()(this,ct).emit("connected"),g()(this,lt)&&g()(this,lt).emit("create")}function jt(){K.debug(at,"".concat(g()(this,lt).id," disconnected")),g()(this,ct).emit("disconnected"),this.signalingStatus=!1}}).call(this,n(90))},,,,,,,,,,function(t,e,n){t.exports=n(529)},function(t,e,n){t.exports=n(569)},function(t){t.exports=JSON.parse('{"a":"0.5.0"}')},,,function(t,e,n){var r=n(404);n(66),t.exports=r},function(t,e,n){"use strict";var r=n(15),o=n(14),i=n(20),s=n(112),a=n(26),c=n(80),u=n(100),f=n(158),l=n(284),h=n(160),p=n(24),d=n(155),v=p("isConcatSpreadable"),g=o.TypeError,y=d>=51||!i((function(){var t=[];return t[v]=!1,t.concat()[0]!==t})),m=h("concat"),b=function(t){if(!a(t))return!1;var e=t[v];return void 0!==e?!!e:s(t)};r({target:"Array",proto:!0,forced:!y||!m},{concat:function(t){var e,n,r,o,i,s=c(this),a=l(s,0),h=0;for(e=-1,r=arguments.length;e<r;e++)if(b(i=-1===e?s:arguments[e])){if(h+(o=u(i))>9007199254740991)throw g("Maximum allowed index exceeded");for(n=0;n<o;n++,h++)n in i&&f(a,h,i[n])}else{if(h>=9007199254740991)throw g("Maximum allowed index exceeded");f(a,h++,i)}return a.length=h,a}})},function(t,e,n){var r=n(198);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,n){var r=n(39),o=n(20),i=n(202);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(20),o=n(27),i=/#|\.prototype\./,s=function(t,e){var n=c[a(t)];return n==f||n!=u&&(o(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",f=s.POLYFILL="P";t.exports=s},function(t,e,n){var r=n(39),o=n(20);t.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(t,e,n){var r=n(408);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},function(t,e,n){var r=n(17),o=n(33),i=n(65),s=n(244).indexOf,a=n(134),c=r([].push);t.exports=function(t,e){var n,r=i(t),u=0,f=[];for(n in r)!o(a,n)&&o(r,n)&&c(f,n);for(;e.length>u;)o(r,n=e[u++])&&(~s(f,n)||c(f,n));return f}},function(t,e,n){var r=n(56);t.exports=r("document","documentElement")},function(t,e,n){var r=n(99),o=n(65),i=n(163).f,s=n(288),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"Window"==r(t)?function(t){try{return i(t)}catch(t){return s(a)}}(t):i(o(t))}},function(t,e,n){var r=n(14),o=n(207),i=n(100),s=n(158),a=r.Array,c=Math.max;t.exports=function(t,e,n){for(var r=i(t),u=o(e,r),f=o(void 0===n?r:n,r),l=a(c(f-u,0)),h=0;u<f;u++,h++)s(l,h,t[u]);return l.length=h,l}},function(t,e,n){var r=n(14),o=n(27),i=n(206),s=r.WeakMap;t.exports=o(s)&&/native code/.test(i(s))},function(t,e,n){n(28)("iterator")},function(t,e,n){"use strict";var r,o,i,s=n(20),a=n(27),c=n(94),u=n(136),f=n(101),l=n(24),h=n(70),p=l("iterator"),d=!1;[].keys&&("next"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(r=o):d=!0),null==r||s((function(){var t={};return r[p].call(t)!==t}))?r={}:h&&(r=c(r)),a(r[p])||f(r,p,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},function(t,e,n){var r=n(20);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e){t.exports=function(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(20),o=n(26),i=n(99),s=n(455),a=Object.isExtensible,c=r((function(){a(1)}));t.exports=c||s?function(t){return!!o(t)&&((!s||"ArrayBuffer"!=i(t))&&(!a||a(t)))}:a},function(t,e,n){var r=n(24),o=n(113),i=r("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||s[i]===t)}},function(t,e,n){var r=n(50),o=n(47),i=n(199);t.exports=function(t,e,n){var s,a;o(t);try{if(!(s=i(t,"return"))){if("throw"===e)throw n;return n}s=r(s,t)}catch(t){a=!0,s=t}if("throw"===e)throw n;if(a)throw s;return o(s),n}},function(t,e,n){"use strict";var r=n(17),o=n(144),i=n(145).getWeakData,s=n(47),a=n(26),c=n(137),u=n(103),f=n(83),l=n(33),h=n(74),p=h.set,d=h.getterFor,v=f.find,g=f.findIndex,y=r([].splice),m=0,b=function(t){return t.frozen||(t.frozen=new w)},w=function(){this.entries=[]},A=function(t,e){return v(t.entries,(function(t){return t[0]===e}))};w.prototype={get:function(t){var e=A(this,t);if(e)return e[1]},has:function(t){return!!A(this,t)},set:function(t,e){var n=A(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=g(this.entries,(function(e){return e[0]===t}));return~e&&y(this.entries,e,1),!!~e}},t.exports={getConstructor:function(t,e,n,r){var f=t((function(t,o){c(t,h),p(t,{type:e,id:m++,frozen:void 0}),null!=o&&u(o,t[r],{that:t,AS_ENTRIES:n})})),h=f.prototype,v=d(e),g=function(t,e,n){var r=v(t),o=i(s(e),!0);return!0===o?b(r).set(e,n):o[r.id]=n,t};return o(h,{delete:function(t){var e=v(this);if(!a(t))return!1;var n=i(t);return!0===n?b(e).delete(t):n&&l(n,e.id)&&delete n[e.id]},has:function(t){var e=v(this);if(!a(t))return!1;var n=i(t);return!0===n?b(e).has(t):n&&l(n,e.id)}}),o(h,n?{get:function(t){var e=v(this);if(a(t)){var n=i(t);return!0===n?b(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return g(this,t,e)}}:{add:function(t){return g(this,t,!0)}}),f}}},function(t,e,n){var r=n(14);t.exports=r.Promise},function(t,e,n){"use strict";var r=n(56),o=n(54),i=n(24),s=n(39),a=i("species");t.exports=function(t){var e=r(t),n=o.f;s&&e&&!e[a]&&n(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(24)("iterator"),o=!1;try{var i=0,s={next:function(){return{done:!!i++}},return:function(){o=!0}};s[r]=function(){return this},Array.from(s,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(t){}return n}},function(t,e,n){var r=n(47),o=n(302),i=n(24)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||null==(n=r(s)[i])?e:o(n)}},function(t,e,n){var r=n(14),o=n(159),i=n(156),s=r.TypeError;t.exports=function(t){if(o(t))return t;throw s(i(t)+" is not a constructor")}},function(t,e,n){var r,o,i,s,a=n(14),c=n(98),u=n(81),f=n(27),l=n(33),h=n(20),p=n(286),d=n(135),v=n(202),g=n(211),y=n(304),m=n(212),b=a.setImmediate,w=a.clearImmediate,A=a.process,x=a.Dispatch,k=a.Function,C=a.MessageChannel,E=a.String,S=0,B={};try{r=a.location}catch(t){}var I=function(t){if(l(B,t)){var e=B[t];delete B[t],e()}},O=function(t){return function(){I(t)}},P=function(t){I(t.data)},T=function(t){a.postMessage(E(t),r.protocol+"//"+r.host)};b&&w||(b=function(t){g(arguments.length,1);var e=f(t)?t:k(t),n=d(arguments,1);return B[++S]=function(){c(e,void 0,n)},o(S),S},w=function(t){delete B[t]},m?o=function(t){A.nextTick(O(t))}:x&&x.now?o=function(t){x.now(O(t))}:C&&!y?(s=(i=new C).port2,i.port1.onmessage=P,o=u(s.postMessage,s)):a.addEventListener&&f(a.postMessage)&&!a.importScripts&&r&&"file:"!==r.protocol&&!h(T)?(o=T,a.addEventListener("message",P,!1)):o="onreadystatechange"in v("script")?function(t){p.appendChild(v("script")).onreadystatechange=function(){p.removeChild(this),I(t)}}:function(t){setTimeout(O(t),0)}),t.exports={set:b,clear:w}},function(t,e,n){var r=n(133);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},function(t,e,n){var r=n(47),o=n(26),i=n(147);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){var r=n(25),o=0,i=Math.random(),s=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++o+i,36)}},function(t,e,n){var r=n(355),o=n(45);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(t,e,n){var r=n(307);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,n){var r=n(84),o=n(45),i=n(217);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(471),o=n(311);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},function(t,e,n){var r=n(16),o=n(114),i=n(43),s=n(183),a=n(308),c=r.Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return i(e)&&s(e.prototype,c(t))}},function(t,e,n){var r=n(16),o=n(25),i=n(45),s=n(148),a=r.Object,c=o("".split);t.exports=i((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"==s(t)?c(t,""):a(t)}:a},function(t,e,n){var r=n(25),o=n(75),i=n(127),s=n(489).indexOf,a=n(220),c=r([].push);t.exports=function(t,e){var n,r=i(t),u=0,f=[];for(n in r)!o(a,n)&&o(r,n)&&c(f,n);for(;e.length>u;)o(r,n=e[u++])&&(~s(f,n)||c(f,n));return f}},function(t,e,n){var r=n(45),o=n(43),i=/#|\.prototype\./,s=function(t,e){var n=c[a(t)];return n==f||n!=u&&(o(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",f=s.POLYFILL="P";t.exports=s},function(t,e,n){"use strict";var r=n(54).f,o=n(94),i=n(144),s=n(81),a=n(137),c=n(103),u=n(210),f=n(299),l=n(39),h=n(145).fastKey,p=n(74),d=p.set,v=p.getterFor;t.exports={getConstructor:function(t,e,n,u){var f=t((function(t,r){a(t,p),d(t,{type:e,index:o(null),first:void 0,last:void 0,size:0}),l||(t.size=0),null!=r&&c(r,t[u],{that:t,AS_ENTRIES:n})})),p=f.prototype,g=v(e),y=function(t,e,n){var r,o,i=g(t),s=m(t,e);return s?s.value=n:(i.last=s={index:o=h(e,!0),key:e,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=s),r&&(r.next=s),l?i.size++:t.size++,"F"!==o&&(i.index[o]=s)),t},m=function(t,e){var n,r=g(t),o=h(e);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==e)return n};return i(p,{clear:function(){for(var t=g(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,l?t.size=0:this.size=0},delete:function(t){var e=g(this),n=m(this,t);if(n){var r=n.next,o=n.previous;delete e.index[n.index],n.removed=!0,o&&(o.next=r),r&&(r.previous=o),e.first==n&&(e.first=r),e.last==n&&(e.last=o),l?e.size--:this.size--}return!!n},forEach:function(t){for(var e,n=g(this),r=s(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!m(this,t)}}),i(p,n?{get:function(t){var e=m(this,t);return e&&e.value},set:function(t,e){return y(this,0===t?0:t,e)}}:{add:function(t){return y(this,t=0===t?0:t,t)}}),l&&r(p,"size",{get:function(){return g(this).size}}),f},setStrong:function(t,e,n){var r=e+" Iterator",o=v(e),i=v(r);u(t,e,(function(t,e){d(this,{type:r,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),f(e)}}},function(t,e,n){"use strict";var r=n(14),o=n(17),i=n(79),s=n(26),a=n(33),c=n(135),u=n(132),f=r.Function,l=o([].concat),h=o([].join),p={},d=function(t,e,n){if(!a(p,e)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";p[e]=f("C,a","return new C("+h(r,",")+")")}return p[e](t,n)};t.exports=u?f.bind:function(t){var e=i(this),n=e.prototype,r=c(arguments,1),o=function(){var n=l(r,c(arguments));return this instanceof o?d(e,n.length,n):e.apply(t,n)};return s(n)&&(o.prototype=n),o}},function(t,e){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(t){var e=t,o=t.indexOf("["),i=t.indexOf("]");-1!=o&&-1!=i&&(t=t.substring(0,o)+t.substring(o,i).replace(/:/g,";")+t.substring(i,t.length));for(var s=n.exec(t||""),a={},c=14;c--;)a[r[c]]=s[c]||"";return-1!=o&&-1!=i&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a}},function(t,e,n){(function(e){var r=n(551),o=Object.prototype.toString,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);t.exports=function t(n){if(!n||"object"!=typeof n)return!1;if(r(n)){for(var o=0,a=n.length;o<a;o++)if(t(n[o]))return!0;return!1}if("function"==typeof e&&e.isBuffer&&e.isBuffer(n)||"function"==typeof ArrayBuffer&&n instanceof ArrayBuffer||i&&n instanceof Blob||s&&n instanceof File)return!0;if(n.toJSON&&"function"==typeof n.toJSON&&1===arguments.length)return t(n.toJSON(),!0);for(var c in n)if(Object.prototype.hasOwnProperty.call(n,c)&&t(n[c]))return!0;return!1}}).call(this,n(319).Buffer)},function(t,e,n){"use strict";(function(t){
 /*!
  * The buffer module from node.js, for the browser.
  *
  * @author   Feross Aboukhadijeh <http://feross.org>
  * @license  MIT
  */
-var r=n(38),o=n(39),i=n(40);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return u(this,e,t,n)}function u(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=h(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(t,n),o=(e=a(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|p(t.length);return 0===(e=a(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):h(e,t);if("Buffer"===t.type&&i(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=a(e,t<0?0:0|p(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|p(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(c.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 r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Q(e).length;default:if(r)return N(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return F(this,t,n);case"utf8":case"utf-8":return x(this,t,n);case"ascii":return S(this,t,n);case"latin1":case"binary":return I(this,t,n);case"base64":return B(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,o){var i,s=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var l=-1;for(i=n;i<a;i++)if(u(e,i)===u(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===c)return l*s}else-1!==l&&(i-=i-l),l=-1}else for(n+c>a&&(n=a-c),i=n;i>=0;i--){for(var f=!0,h=0;h<c;h++)if(u(e,i+h)!==u(t,h)){f=!1;break}if(f)return i}return-1}function b(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function w(e,t,n,r){return z(N(t,e.length-n),e,n,r)}function A(e,t,n,r){return z(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function C(e,t,n,r){return A(e,t,n,r)}function k(e,t,n,r){return z(Q(t),e,n,r)}function E(e,t,n,r){return z(function(e,t){for(var n,r,o,i=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function B(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function x(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,s,a,c,u=e[o],l=null,f=u>239?4:u>223?3:u>191?2:1;if(o+f<=n)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(c=(15&u)<<12|(63&i)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return u(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return f(null,e)},c.allocUnsafeSlow=function(e){return f(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=c.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,o),o+=s.length}return r},c.byteLength=d,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?x(this,0,e):g.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(i,s),u=this.slice(r,o),l=e.slice(t,n),f=0;f<a;++f)if(u[f]!==l[f]){i=u[f],s=l[f];break}return i<s?-1:s<i?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return A(this,e,t,n);case"latin1":case"binary":return C(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function I(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function F(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=U(e[i]);return o}function P(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function R(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function M(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function O(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function _(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function T(e,t,n,r,i){return i||_(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function j(e,t,n,r,i){return i||_(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var o=t-e;n=new c(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):O(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i<n&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=n-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):O(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return T(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return T(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var s=c.isBuffer(e)?e:N(new c(e,r).toString()),a=s.length;for(i=0;i<n-t;++i)this[i+t]=s[i%a]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function N(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Q(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(0))},function(e,t,n){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=u(e),s=r[0],a=r[1],c=new i(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),l=0,f=a>0?s-4:s;for(n=0;n<f;n+=4)t=o[e.charCodeAt(n)]<<18|o[e.charCodeAt(n+1)]<<12|o[e.charCodeAt(n+2)]<<6|o[e.charCodeAt(n+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===a&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,c[l++]=255&t);1===a&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=0,a=n-o;s<a;s+=16383)i.push(l(e,s,s+16383>a?a:s+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a<c;++a)r[a]=s[a],o[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var o,i,s=[],a=t;a<n;a+=3)o=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){
+var r=n(548),o=n(549),i=n(550);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=c.prototype:(null===t&&(t=new c(e)),t.length=e),t}function c(t,e,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return u(this,t,e,n)}function u(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);c.TYPED_ARRAY_SUPPORT?(t=e).__proto__=c.prototype:t=h(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),o=(t=a(t,r)).write(e,n);o!==r&&(t=t.slice(0,o));return t}(t,e,n):function(t,e){if(c.isBuffer(e)){var n=0|p(e.length);return 0===(t=a(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?a(t,0):h(t,e);if("Buffer"===e.type&&i(e.data))return h(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(f(e),t=a(t,e<0?0:0|p(e)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function h(t,e){var n=e.length<0?0:0|p(e.length);t=a(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function p(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(c.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Q(t).length;default:if(r)return z(t).length;e=(""+e).toLowerCase(),r=!0}}function v(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return O(this,e,n);case"utf8":case"utf-8":return S(this,e,n);case"ascii":return B(this,e,n);case"latin1":case"binary":return I(this,e,n);case"base64":return E(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function y(t,e,n,r,o){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=c.from(e,r)),c.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,o);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):m(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,o){var i,s=1,a=t.length,c=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,c/=2,n/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var f=-1;for(i=n;i<a;i++)if(u(t,i)===u(e,-1===f?0:i-f)){if(-1===f&&(f=i),i-f+1===c)return f*s}else-1!==f&&(i-=i-f),f=-1}else for(n+c>a&&(n=a-c),i=n;i>=0;i--){for(var l=!0,h=0;h<c;h++)if(u(t,i+h)!==u(e,h)){l=!1;break}if(l)return i}return-1}function b(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s<r;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[n+s]=a}return s}function w(t,e,n,r){return G(z(e,t.length-n),t,n,r)}function A(t,e,n,r){return G(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function x(t,e,n,r){return A(t,e,n,r)}function k(t,e,n,r){return G(Q(e),t,n,r)}function C(t,e,n,r){return G(function(t,e){for(var n,r,o,i=[],s=0;s<t.length&&!((e-=2)<0);++s)n=t.charCodeAt(s),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function E(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function S(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o<n;){var i,s,a,c,u=t[o],f=null,l=u>239?4:u>223?3:u>191?2:1;if(o+l<=n)switch(l){case 1:u<128&&(f=u);break;case 2:128==(192&(i=t[o+1]))&&(c=(31&u)<<6|63&i)>127&&(f=c);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(c=(15&u)<<12|(63&i)<<6|63&s)>2047&&(c<55296||c>57343)&&(f=c);break;case 4:i=t[o+1],s=t[o+2],a=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(f=c)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),o+=l}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}e.Buffer=c,e.SlowBuffer=function(t){+t!=t&&(t=0);return c.alloc(+t)},e.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),c.poolSize=8192,c._augment=function(t){return t.__proto__=c.prototype,t},c.from=function(t,e,n){return u(null,t,e,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(t,e,n){return function(t,e,n,r){return f(e),e<=0?a(t,e):void 0!==n?"string"==typeof r?a(t,e).fill(n,r):a(t,e).fill(n):a(t,e)}(null,t,e,n)},c.allocUnsafe=function(t){return l(null,t)},c.allocUnsafeSlow=function(t){return l(null,t)},c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,i=Math.min(n,r);o<i;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=c.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var s=t[n];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,o),o+=s.length}return r},c.byteLength=d,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},c.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?S(this,0,t):v.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},c.prototype.compare=function(t,e,n,r,o){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(i,s),u=this.slice(r,o),f=t.slice(e,n),l=0;l<a;++l)if(u[l]!==f[l]){i=u[l],s=f[l];break}return i<s?-1:s<i?1:0},c.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},c.prototype.indexOf=function(t,e,n){return y(this,t,e,n,!0)},c.prototype.lastIndexOf=function(t,e,n){return y(this,t,e,n,!1)},c.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return A(this,t,e,n);case"latin1":case"binary":return x(this,t,e,n);case"base64":return k(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function B(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(127&t[o]);return r}function I(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(t[o]);return r}function O(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=e;i<n;++i)o+=N(t[i]);return o}function P(t,e,n){for(var r=t.slice(e,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function T(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,n,r,o,i){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function j(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o<i;++o)t[n+o]=(e&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function D(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o<i;++o)t[n+o]=e>>>8*(r?o:3-o)&255}function F(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(t,e,n,r,i){return i||F(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function L(t,e,n,r,i){return i||F(t,0,n,8),o.write(t,e,n,r,52,8),n+8}c.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=c.prototype;else{var o=e-t;n=new c(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+t]}return n},c.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||T(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r},c.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||T(t,e,this.length);for(var r=this[t+--e],o=1;e>0&&(o*=256);)r+=this[t+--e]*o;return r},c.prototype.readUInt8=function(t,e){return e||T(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||T(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||T(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||T(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||T(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*e)),r},c.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||T(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},c.prototype.readInt8=function(t,e){return e||T(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||T(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(t,e){e||T(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(t,e){return e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||T(t,4,this.length),o.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||T(t,4,this.length),o.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||T(t,8,this.length),o.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||T(t,8,this.length),o.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||R(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i<n&&(o*=256);)this[e+i]=t/o&255;return e+n},c.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||R(this,t,e,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+n},c.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):D(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);R(this,t,e,n,o-1,-o)}var i=0,s=1,a=0;for(this[e]=255&t;++i<n&&(s*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+n},c.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);R(this,t,e,n,o-1,-o)}var i=n-1,s=1,a=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+n},c.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):D(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,n){return M(this,t,e,!0,n)},c.prototype.writeFloatBE=function(t,e,n){return M(this,t,e,!1,n)},c.prototype.writeDoubleLE=function(t,e,n){return L(this,t,e,!0,n)},c.prototype.writeDoubleBE=function(t,e,n){return L(this,t,e,!1,n)},c.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var o,i=r-n;if(this===t&&n<e&&e<r)for(o=i-1;o>=0;--o)t[o+e]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),e);return i},c.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{var s=c.isBuffer(t)?t:z(new c(t,r).toString()),a=s.length;for(i=0;i<n-e;++i)this[i+e]=s[i%a]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function z(t,e){var n;e=e||1/0;for(var r=t.length,o=null,i=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Q(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}}).call(this,n(53))},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){(function(e){t.exports=function(t){return e.Buffer&&e.Buffer.isBuffer(t)||e.ArrayBuffer&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))}}).call(this,n(53))},function(t,e,n){var r=n(553),o=n(327),i=n(117),s=n(228),a=n(328),c=n(329),u=n(172)("socket.io-client:manager"),f=n(326),l=n(568),h=Object.prototype.hasOwnProperty;function p(t,e){if(!(this instanceof p))return new p(t,e);t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.nsps={},this.subs=[],this.opts=e,this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(e.randomizationFactor||.5),this.backoff=new l({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this.readyState="closed",this.uri=t,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=e.parser||s;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==e.autoConnect,this.autoConnect&&this.open()}t.exports=p,p.prototype.emitAll=function(){for(var t in this.emit.apply(this,arguments),this.nsps)h.call(this.nsps,t)&&this.nsps[t].emit.apply(this.nsps[t],arguments)},p.prototype.updateSocketIds=function(){for(var t in this.nsps)h.call(this.nsps,t)&&(this.nsps[t].id=this.generateId(t))},p.prototype.generateId=function(t){return("/"===t?"":t+"#")+this.engine.id},i(p.prototype),p.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},p.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},p.prototype.reconnectionDelay=function(t){return arguments.length?(this._reconnectionDelay=t,this.backoff&&this.backoff.setMin(t),this):this._reconnectionDelay},p.prototype.randomizationFactor=function(t){return arguments.length?(this._randomizationFactor=t,this.backoff&&this.backoff.setJitter(t),this):this._randomizationFactor},p.prototype.reconnectionDelayMax=function(t){return arguments.length?(this._reconnectionDelayMax=t,this.backoff&&this.backoff.setMax(t),this):this._reconnectionDelayMax},p.prototype.timeout=function(t){return arguments.length?(this._timeout=t,this):this._timeout},p.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},p.prototype.open=p.prototype.connect=function(t,e){if(u("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;u("opening %s",this.uri),this.engine=r(this.uri,this.opts);var n=this.engine,o=this;this.readyState="opening",this.skipReconnect=!1;var i=a(n,"open",(function(){o.onopen(),t&&t()})),s=a(n,"error",(function(e){if(u("connect_error"),o.cleanup(),o.readyState="closed",o.emitAll("connect_error",e),t){var n=new Error("Connection error");n.data=e,t(n)}else o.maybeReconnectOnOpen()}));if(!1!==this._timeout){var c=this._timeout;u("connect attempt will timeout after %d",c);var f=setTimeout((function(){u("connect attempt timed out after %d",c),i.destroy(),n.close(),n.emit("error","timeout"),o.emitAll("connect_timeout",c)}),c);this.subs.push({destroy:function(){clearTimeout(f)}})}return this.subs.push(i),this.subs.push(s),this},p.prototype.onopen=function(){u("open"),this.cleanup(),this.readyState="open",this.emit("open");var t=this.engine;this.subs.push(a(t,"data",c(this,"ondata"))),this.subs.push(a(t,"ping",c(this,"onping"))),this.subs.push(a(t,"pong",c(this,"onpong"))),this.subs.push(a(t,"error",c(this,"onerror"))),this.subs.push(a(t,"close",c(this,"onclose"))),this.subs.push(a(this.decoder,"decoded",c(this,"ondecoded")))},p.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},p.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},p.prototype.ondata=function(t){this.decoder.add(t)},p.prototype.ondecoded=function(t){this.emit("packet",t)},p.prototype.onerror=function(t){u("error",t),this.emitAll("error",t)},p.prototype.socket=function(t,e){var n=this.nsps[t];if(!n){n=new o(this,t,e),this.nsps[t]=n;var r=this;n.on("connecting",i),n.on("connect",(function(){n.id=r.generateId(t)})),this.autoConnect&&i()}function i(){~f(r.connecting,n)||r.connecting.push(n)}return n},p.prototype.destroy=function(t){var e=f(this.connecting,t);~e&&this.connecting.splice(e,1),this.connecting.length||this.close()},p.prototype.packet=function(t){u("writing packet %j",t);var e=this;t.query&&0===t.type&&(t.nsp+="?"+t.query),e.encoding?e.packetBuffer.push(t):(e.encoding=!0,this.encoder.encode(t,(function(n){for(var r=0;r<n.length;r++)e.engine.write(n[r],t.options);e.encoding=!1,e.processPacketQueue()})))},p.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},p.prototype.cleanup=function(){u("cleanup");for(var t=this.subs.length,e=0;e<t;e++){this.subs.shift().destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},p.prototype.close=p.prototype.disconnect=function(){u("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},p.prototype.onclose=function(t){u("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()},p.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)u("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();u("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var n=setTimeout((function(){t.skipReconnect||(u("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open((function(e){e?(u("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(u("reconnect success"),t.onreconnect())})))}),e);this.subs.push({destroy:function(){clearTimeout(n)}})}},p.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},function(t,e,n){(function(t){var r=n(229),o=n(556),i=n(564),s=n(565);e.polling=function(e){var n=!1,s=!1,a=!1!==e.jsonp;if(t.location){var c="https:"===location.protocol,u=location.port;u||(u=c?443:80),n=e.hostname!==location.hostname||u!==e.port,s=e.secure!==c}if(e.xdomain=n,e.xscheme=s,"open"in new r(e)&&!e.forceJSONP)return new o(e);if(!a)throw new Error("JSONP disabled");return new i(e)},e.websocket=s}).call(this,n(53))},function(t,e,n){var r=n(230),o=n(173),i=n(118),s=n(174),a=n(325),c=n(175)("engine.io-client:polling");t.exports=f;var u=null!=new(n(229))({xdomain:!1}).responseType;function f(t){var e=t&&t.forceBase64;u&&!e||(this.supportsBinary=!1),r.call(this,t)}s(f,r),f.prototype.name="polling",f.prototype.doOpen=function(){this.poll()},f.prototype.pause=function(t){var e=this;function n(){c("paused"),e.readyState="paused",t()}if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(c("we are currently polling - waiting to pause"),r++,this.once("pollComplete",(function(){c("pre-pause polling complete"),--r||n()}))),this.writable||(c("we are currently writing - waiting to pause"),r++,this.once("drain",(function(){c("pre-pause writing complete"),--r||n()})))}else n()},f.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},f.prototype.onData=function(t){var e=this;c("polling got data %s",t);i.decodePayload(t,this.socket.binaryType,(function(t,n,r){if("opening"===e.readyState&&e.onOpen(),"close"===t.type)return e.onClose(),!1;e.onPacket(t)})),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():c('ignoring poll - transport state "%s"',this.readyState))},f.prototype.doClose=function(){var t=this;function e(){c("writing close packet"),t.write([{type:"close"}])}"open"===this.readyState?(c("transport open - closing"),e()):(c("transport not open - deferring close"),this.once("open",e))},f.prototype.write=function(t){var e=this;this.writable=!1;var n=function(){e.writable=!0,e.emit("drain")};i.encodePayload(t,this.supportsBinary,(function(t){e.doWrite(t,n)}))},f.prototype.uri=function(){var t=this.query||{},e=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(t[this.timestampParam]=a()),this.supportsBinary||t.sid||(t.b64=1),t=o.encode(t),this.port&&("https"===e&&443!==Number(this.port)||"http"===e&&80!==Number(this.port))&&(n=":"+this.port),t.length&&(t="?"+t),e+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+t}},function(t,e,n){"use strict";var r,o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),i={},s=0,a=0;function c(t){var e="";do{e=o[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}function u(){var t=c(+new Date);return t!==r?(s=0,r=t):t+"."+c(s++)}for(;a<64;a++)i[o[a]]=a;u.encode=c,u.decode=function(t){var e=0;for(a=0;a<t.length;a++)e=64*e+i[t.charAt(a)];return e},t.exports=u},function(t,e){var n=[].indexOf;t.exports=function(t,e){if(n)return t.indexOf(e);for(var r=0;r<t.length;++r)if(t[r]===e)return r;return-1}},function(t,e,n){var r=n(228),o=n(117),i=n(567),s=n(328),a=n(329),c=n(172)("socket.io-client:socket"),u=n(173);t.exports=h;var f={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},l=o.prototype.emit;function h(t,e,n){this.io=t,this.nsp=e,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}o(h.prototype),h.prototype.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[s(t,"open",a(this,"onopen")),s(t,"packet",a(this,"onpacket")),s(t,"close",a(this,"onclose"))]}},h.prototype.open=h.prototype.connect=function(){return this.connected||(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting")),this},h.prototype.send=function(){var t=i(arguments);return t.unshift("message"),this.emit.apply(this,t),this},h.prototype.emit=function(t){if(f.hasOwnProperty(t))return l.apply(this,arguments),this;var e=i(arguments),n={type:r.EVENT,data:e,options:{}};return n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof e[e.length-1]&&(c("emitting packet with ack id %d",this.ids),this.acks[this.ids]=e.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),delete this.flags,this},h.prototype.packet=function(t){t.nsp=this.nsp,this.io.packet(t)},h.prototype.onopen=function(){if(c("transport is open - connecting"),"/"!==this.nsp)if(this.query){var t="object"==typeof this.query?u.encode(this.query):this.query;c("sending connect packet with query %s",t),this.packet({type:r.CONNECT,query:t})}else this.packet({type:r.CONNECT})},h.prototype.onclose=function(t){c("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",t)},h.prototype.onpacket=function(t){if(t.nsp===this.nsp)switch(t.type){case r.CONNECT:this.onconnect();break;case r.EVENT:case r.BINARY_EVENT:this.onevent(t);break;case r.ACK:case r.BINARY_ACK:this.onack(t);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error",t.data)}},h.prototype.onevent=function(t){var e=t.data||[];c("emitting event %j",e),null!=t.id&&(c("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?l.apply(this,e):this.receiveBuffer.push(e)},h.prototype.ack=function(t){var e=this,n=!1;return function(){if(!n){n=!0;var o=i(arguments);c("sending ack %j",o),e.packet({type:r.ACK,id:t,data:o})}}},h.prototype.onack=function(t){var e=this.acks[t.id];"function"==typeof e?(c("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):c("bad ack %s",t.id)},h.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},h.prototype.emitBuffered=function(){var t;for(t=0;t<this.receiveBuffer.length;t++)l.apply(this,this.receiveBuffer[t]);for(this.receiveBuffer=[],t=0;t<this.sendBuffer.length;t++)this.packet(this.sendBuffer[t]);this.sendBuffer=[]},h.prototype.ondisconnect=function(){c("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},h.prototype.destroy=function(){if(this.subs){for(var t=0;t<this.subs.length;t++)this.subs[t].destroy();this.subs=null}this.io.destroy(this)},h.prototype.close=h.prototype.disconnect=function(){return this.connected&&(c("performing disconnect (%s)",this.nsp),this.packet({type:r.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},h.prototype.compress=function(t){return this.flags=this.flags||{},this.flags.compress=t,this}},function(t,e){t.exports=function(t,e,n){return t.on(e,n),{destroy:function(){t.removeListener(e,n)}}}},function(t,e){var n=[].slice;t.exports=function(t,e){if("string"==typeof e&&(e=t[e]),"function"!=typeof e)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return e.apply(t,r.concat(n.call(arguments)))}}},function(t,e,n){var r=n(15),o=n(14),i=n(98),s=n(27),a=n(133),c=n(135),u=n(211),f=/MSIE .\./.test(a),l=o.Function,h=function(t){return function(e,n){var r=u(arguments.length,1)>2,o=s(e)?e:l(e),a=r?c(arguments,2):void 0;return t(r?function(){i(o,this,a)}:o,n)}};r({global:!0,bind:!0,forced:f},{setTimeout:h(o.setTimeout),setInterval:h(o.setInterval)})},function(t,e,n){t.exports=n(599)},,,,function(t,e,n){t.exports=n(448)},function(t,e,n){t.exports=n(502)},function(t,e,n){t.exports=n(533)},function(t,e,n){var r=n(544),o=n(228),i=n(322),s=n(172)("socket.io-client");t.exports=e=c;var a=e.managers={};function c(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,o=r(t),c=o.source,u=o.id,f=o.path,l=a[u]&&f in a[u].nsps;return e.forceNew||e["force new connection"]||!1===e.multiplex||l?(s("ignoring socket cache for %s",c),n=i(c,e)):(a[u]||(s("new io instance for %s",c),a[u]=i(c,e)),n=a[u]),o.query&&!e.query&&(e.query=o.query),n.socket(o.path,e)}e.protocol=o.protocol,e.connect=c,e.Manager=n(322),e.Socket=n(327)},function(t,e,n){t.exports=n(617)},,,,,function(t,e,n){t.exports=n(823)},,function(t,e,n){"use strict";var r=n(291).IteratorPrototype,o=n(94),i=n(91),s=n(102),a=n(113),c=function(){return this};t.exports=function(t,e,n,u){var f=e+" Iterator";return t.prototype=o(r,{next:i(+!u,n)}),s(t,f,!1,!0),a[f]=c,t}},function(t,e,n){var r=n(17),o=n(204),i=n(93),s=n(123),a=r("".charAt),c=r("".charCodeAt),u=r("".slice),f=function(t){return function(e,n){var r,f,l=i(s(e)),h=o(n),p=l.length;return h<0||h>=p?t?"":void 0:(r=c(l,h))<55296||r>56319||h+1===p||(f=c(l,h+1))<56320||f>57343?t?a(l,h):r:t?u(l,h,h+2):f-56320+(r-55296<<10)+65536}};t.exports={codeAt:f(!1),charAt:f(!0)}},function(t,e,n){t.exports=n(442)},function(t,e,n){var r=n(444);t.exports=r},function(t,e,n){var r=n(20);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,n){var r=n(456);n(66),t.exports=r},function(t,e,n){"use strict";var r=n(15),o=n(14),i=n(34),s=n(136),a=n(164),c=n(457),u=n(94),f=n(73),l=n(91),h=n(459),p=n(460),d=n(103),v=n(461),g=n(24),y=n(462),m=g("toStringTag"),b=o.Error,w=[].push,A=function(t,e){var n,r=arguments.length>2?arguments[2]:void 0,o=i(x,this);a?n=a(new b,o?s(this):x):(n=o?this:u(x),f(n,m,"Error")),void 0!==e&&f(n,"message",v(e)),y&&f(n,"stack",h(n.stack,1)),p(n,r);var c=[];return d(t,w,{that:c}),f(n,"errors",c),n};a?a(A,b):c(A,b,{name:!0});var x=A.prototype=u(b.prototype,{constructor:l(1,A),message:l(1,""),name:l(1,"AggregateError")});r({global:!0},{AggregateError:A})},function(t,e,n){"use strict";var r=n(15),o=n(50),i=n(79),s=n(147),a=n(182),c=n(103);r({target:"Promise",stat:!0},{allSettled:function(t){var e=this,n=s.f(e),r=n.resolve,u=n.reject,f=a((function(){var n=i(e.resolve),s=[],a=0,u=1;c(t,(function(t){var i=a++,c=!1;u++,o(n,e,t).then((function(t){c||(c=!0,s[i]={status:"fulfilled",value:t},--u||r(s))}),(function(t){c||(c=!0,s[i]={status:"rejected",reason:t},--u||r(s))}))})),--u||r(s)}));return f.error&&u(f.value),n.promise}})},function(t,e,n){"use strict";var r=n(15),o=n(79),i=n(56),s=n(50),a=n(147),c=n(182),u=n(103);r({target:"Promise",stat:!0},{any:function(t){var e=this,n=i("AggregateError"),r=a.f(e),f=r.resolve,l=r.reject,h=c((function(){var r=o(e.resolve),i=[],a=0,c=1,h=!1;u(t,(function(t){var o=a++,u=!1;c++,s(r,e,t).then((function(t){u||h||(h=!0,f(t))}),(function(t){u||h||(u=!0,i[o]=t,--c||l(new n(i,"No one promise resolved")))}))})),--c||l(new n(i,"No one promise resolved"))}));return h.error&&l(h.value),r.promise}})},function(t,e,n){var r,o,i=n(16),s=n(250),a=i.process,c=i.Deno,u=a&&a.versions||c&&c.version,f=u&&u.v8;f&&(o=(r=f.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},function(t,e,n){var r=n(313),o=n(222).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(168);t.exports=function(t){return r(t.length)}},function(t,e,n){var r=n(114);t.exports=r("document","documentElement")},function(t,e,n){var r=n(45),o=n(16).RegExp;t.exports=r((function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},function(t,e,n){var r=n(45),o=n(16).RegExp;t.exports=r((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},function(t,e,n){var r=n(25),o=n(167),i=n(85),s=n(105),a=r("".charAt),c=r("".charCodeAt),u=r("".slice),f=function(t){return function(e,n){var r,f,l=i(s(e)),h=o(n),p=l.length;return h<0||h>=p?t?"":void 0:(r=c(l,h))<55296||r>56319||h+1===p||(f=c(l,h+1))<56320||f>57343?t?a(l,h):r:t?u(l,h,h+2):f-56320+(r-55296<<10)+65536}};t.exports={codeAt:f(!1),charAt:f(!0)}},function(t,e,n){"use strict";var r=n(14),o=n(81),i=n(50),s=n(80),a=n(498),c=n(295),u=n(159),f=n(100),l=n(158),h=n(247),p=n(146),d=r.Array;t.exports=function(t){var e=s(t),n=u(this),r=arguments.length,v=r>1?arguments[1]:void 0,g=void 0!==v;g&&(v=o(v,r>2?arguments[2]:void 0));var y,m,b,w,A,x,k=p(e),C=0;if(!k||this==d&&c(k))for(y=f(e),m=n?new this(y):d(y);y>C;C++)x=g?v(e[C],C):e[C],l(m,C,x);else for(A=(w=h(e,k)).next,m=n?new this:[];!(b=i(A,w)).done;C++)x=g?a(w,v,[b.value,C],!0):b.value,l(m,C,x);return m.length=C,m}},function(t,e,n){"use strict";var r=n(259),o=n(59),i=n(25),s=n(170),a=n(364),c=n(49),u=n(105),f=n(365),l=n(223),h=n(168),p=n(85),d=n(116),v=n(366),g=n(171),y=n(169),m=n(255),b=n(45),w=m.UNSUPPORTED_Y,A=Math.min,x=[].push,k=i(/./.exec),C=i(x),E=i("".slice);s("split",(function(t,e,n){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var i=p(u(this)),s=void 0===n?4294967295:n>>>0;if(0===s)return[];if(void 0===t)return[i];if(!a(t))return o(e,i,t,s);for(var c,f,l,h=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),g=0,m=new RegExp(t.source,d+"g");(c=o(y,m,i))&&!((f=m.lastIndex)>g&&(C(h,E(i,g,c.index)),c.length>1&&c.index<i.length&&r(x,h,v(c,1)),l=c[0].length,g=f,h.length>=s));)m.lastIndex===c.index&&m.lastIndex++;return g===i.length?!l&&k(m,"")||C(h,""):C(h,E(i,g)),h.length>s?v(h,0,s):h}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:o(e,this,t,n)}:e,[function(e,n){var r=u(this),s=null==e?void 0:d(e,t);return s?o(s,e,r,n):o(i,p(r),e,n)},function(t,r){var o=c(this),s=p(t),a=n(i,o,s,r,i!==e);if(a.done)return a.value;var u=f(o,RegExp),d=o.unicode,v=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(w?"g":"y"),y=new u(w?"^(?:"+o.source+")":o,v),m=void 0===r?4294967295:r>>>0;if(0===m)return[];if(0===s.length)return null===g(y,s)?[s]:[];for(var b=0,x=0,k=[];x<s.length;){y.lastIndex=w?0:x;var S,B=g(y,w?E(s,x):s);if(null===B||(S=A(h(y.lastIndex+(w?x:0)),s.length))===b)x=l(s,x,d);else{if(C(k,E(s,b,x)),k.length===m)return k;for(var I=1;I<=B.length-1;I++)if(C(k,B[I]),k.length===m)return k;x=b=S}}return C(k,E(s,b)),k}]}),!!b((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),w)},function(t,e,n){var r=n(96),o=n(148),i=n(57)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){var r=n(49),o=n(537),i=n(57)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||null==(n=r(s)[i])?e:o(n)}},function(t,e,n){var r=n(25);t.exports=r([].slice)},function(t,e,n){"use strict";var r=n(221),o=n(25),i=n(312),s=n(127),a=n(543),c=o([].join),u=i!=Object,f=a("join",",");r({target:"Array",proto:!0,forced:u||!f},{join:function(t){return c(s(this),void 0===t?",":t)}})},function(t,e,n){"use strict";n.d(e,"a",(function(){return gt}));var r=n(40),o=n.n(r),i=n(41),s=n.n(i),a=n(2),c=n.n(a),u=n(10),f=n.n(u),l=(n(225),n(104),n(226),n(125),n(131)),h=n.n(l),p=n(31),d=n.n(p),v=n(36),g=n.n(v),y=n(30),m=n.n(y),b=n(11),w=n.n(b),A=n(18),x=n.n(A),k=n(55),C=n.n(k),E=n(67),S=n.n(E),B=n(273),I=n.n(B),O=n(8),P=n(195),T=n(106);function R(t,e){D(t,e),e.add(t)}function j(t,e,n){D(t,e),e.set(t,n)}function D(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function F(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}var M="[worker]",L=new w.a,U=new w.a,N=new w.a,z=new w.a,Q=new w.a,G=new w.a,q=new w.a,H=new w.a,W=new w.a,Y=new w.a,J=new w.a,X=new w.a,K=new w.a,V=new w.a,Z=new w.a,_=new w.a,$=new w.a,tt=new x.a,et=new x.a,nt=new x.a,rt=new x.a,ot=new x.a,it=new x.a,st=new x.a,at=new x.a,ct=new x.a,ut=new x.a,ft=new x.a,lt=new x.a,ht=new x.a,pt=new x.a,dt=new x.a,vt=new x.a,gt=function(){function t(e,n){o()(this,t),R(this,vt),R(this,dt),R(this,pt),R(this,ht),R(this,lt),R(this,ft),R(this,ut),R(this,ct),R(this,at),R(this,st),R(this,it),R(this,ot),R(this,rt),R(this,nt),R(this,et),R(this,tt),j(this,L,{writable:!0,value:void 0}),j(this,U,{writable:!0,value:void 0}),j(this,N,{writable:!0,value:void 0}),j(this,z,{writable:!0,value:void 0}),j(this,Q,{writable:!0,value:null}),j(this,G,{writable:!0,value:null}),j(this,q,{writable:!0,value:!1}),j(this,H,{writable:!0,value:null}),j(this,W,{writable:!0,value:null}),j(this,Y,{writable:!0,value:null}),j(this,J,{writable:!0,value:null}),j(this,X,{writable:!0,value:null}),j(this,K,{writable:!0,value:null}),j(this,V,{writable:!0,value:!1}),j(this,Z,{writable:!0,value:new h.a}),j(this,_,{writable:!0,value:new h.a}),j(this,$,{writable:!0,value:new T.EventEmitter}),f()(this,L,n),f()(this,U,e),f()(this,N,c()(this,U).getId()),f()(this,z,P.b()),f()(this,q,c()(this,U).isNativeWebRTCEnabled())}return s()(t,[{key:"id",get:function(){return c()(this,L)}},{key:"connect",value:function(){var t,e,n,r,o,i=this;if(c()(this,V))O.info(M,"worker is already connected");else{var s,a;if(f()(this,Q,new RTCPeerConnection),c()(this,Q).onicecandidate=d()(t=F(this,tt,yt)).call(t,this,"default"),c()(this,Q).ontrack=d()(e=F(this,et,mt)).call(e,this,c()(this,Q)),c()(this,q))O.info(M,"Using Native WebRTC"),postMessage("webrtc.createRTC");else f()(this,G,new RTCPeerConnection),c()(this,G).onicecandidate=d()(s=F(this,tt,yt)).call(s,this,"video"),c()(this,G).ontrack=d()(a=F(this,et,mt)).call(a,this,c()(this,G));f()(this,H,c()(this,Q).createDataChannel("offload")),c()(this,H).onopen=d()(n=F(this,rt,wt)).call(n,this),c()(this,H).onclose=d()(r=F(this,ot,At)).call(r,this),c()(this,H).onmessage=d()(o=F(this,ct,Et)).call(o,this),c()(this,Q).createOffer().then((function(t){return c()(i,Q).setLocalDescription(t)})).then((function(){O.debug(M,"send offer"),i.sendSignalMessage({type:"offer",peerConnectionType:"default",message:c()(i,Q).localDescription})})).catch((function(t){O.error(M,"reason: "+t.toString())})),c()(this,q)?postMessage("webrtc.createOffer"):c()(this,G).createOffer().then((function(t){return c()(i,G).setLocalDescription(t)})).then((function(){O.debug(M,"send offer for video"),i.sendSignalMessage({type:"offer",peerConnectionType:"video",message:c()(i,G).localDescription})})).catch((function(t){O.error(M,"reason: "+t.toString())}))}}},{key:"disconnect",value:function(){c()(this,H)&&(c()(this,H).close(),f()(this,H,null)),c()(this,Q)&&(c()(this,Q).close(),f()(this,Q,null)),c()(this,q)||c()(this,G)&&(c()(this,G).close(),f()(this,G,null)),f()(this,V,!1)}},{key:"emit",value:function(t,e){if("string"==typeof t){var n=e||{};F(this,ft,Bt).call(this,{eventName:t,message:g()(n)})}else O.error(M,"The eventName should be a string")}},{key:"on",value:function(t,e){c()(this,$).on(t,e)}},{key:"sendSignalMessage",value:function(t){c()(this,U).sendMessage(c()(this,L),t)}},{key:"startJob",value:function(t){var e;O.debug(M,m()(e="startJob id:".concat(c()(this,L)," feature:")).call(e,t.feature)),c()(this,V)?(F(this,ft,Bt).call(this,{type:"start",feature:t.feature,arguments:t.arguments,resolver:t.resolver,clientId:c()(this,N),deviceName:c()(this,z)}),c()(this,Z).set(t.feature,t),t.resolver&&"function"==typeof t.resolver&&t.resolver()):c()(this,_).set(t.feature,t)}},{key:"stopJob",value:function(t){O.debug(M,"stopJob",c()(this,L),t),c()(this,Z).has(t)?(F(this,ft,Bt).call(this,{type:"stop",feature:t}),c()(this,Z).delete(t)):c()(this,_).has(t)&&c()(this,_).delete(t)}},{key:"handleMessage",value:function(t){"offer"===t.type?F(this,lt,It).call(this,t.peerConnectionType,t.message):"answer"===t.type?F(this,ht,Ot).call(this,t.peerConnectionType,t.message):"candidate"===t.type?F(this,pt,Pt).call(this,t.peerConnectionType,t.candidate):O.error(M,"unhandled message type: ".concat(t.type))}}]),t}();function yt(t,e){e.candidate&&(O.debug(M,"send candidate for "+t),this.sendSignalMessage({type:"candidate",peerConnectionType:t,candidate:e.candidate}))}function mt(t,e){var n,r=this;O.debug(M,"got track");var o,i=e.streams[0];null===c()(this,W)?(O.debug(M,"replacing gumStream with remote stream"),f()(this,W,i)):(O.debug(M,"adding tracks from remote stream to gumStream"),C()(o=c()(this,W).getTracks()).call(o,(function(t){i.addTrack(t)})),f()(this,W,i));i.peerConnection=t,C()(n=i.getTracks()).call(n,(function(t){var e=t.stop;t.stop=function(){F(r,ft,Bt).call(r,{type:"stopTrack",feature:"CAMERA",trackId:t.id}),e.call(t)}}));var s=null;i.getVideoTracks().length>0?(F(this,nt,bt).call(this,i.getVideoTracks()[0]),O.debug(M,"Camera job"),s=F(this,ut,St).call(this,"CAMERA")):i.getAudioTracks().length>0&&(O.debug(M,"MIC job"),s=F(this,ut,St).call(this,"MIC")),s&&s.successCallback(i)}function bt(t){var e,n=this;t.getCapabilities=function(){return c()(n,Y)},t.getSettings=function(){return c()(n,J)},t.getConstraints=function(){return c()(n,X)},f()(this,K,d()(e=t.applyConstraints).call(e,t)),t.applyConstraints=function(t){if(F(n,dt,Tt).call(n,t)){var e=F(n,vt,Rt).call(n,t);c()(n,K).call(n,e)}return new S.a((function(e,r){n.startJob({feature:"CAMERA",arguments:["applyConstraints",t],successCallback:e,errorCallback:r})}))}}function wt(){var t,e=this;O.debug(M,"data channel opened"),f()(this,V,!0),c()(this,$).emit("connected",this),C()(t=c()(this,_)).call(t,(function(t){return e.startJob(t)})),c()(this,_).clear()}function At(){O.debug(M,"data channel closed"),f()(this,V,!1),c()(this,$).emit("disconnected",this),f()(this,H,null),F(this,it,xt).call(this)}function xt(){c()(this,Q)&&(c()(this,Q).onicecandidate=null,c()(this,Q).ontrack=null,c()(this,Q).close(),f()(this,Q,null)),c()(this,G)&&(c()(this,G).onicecandidate=null,c()(this,G).ontrack=null,c()(this,G).close(),f()(this,G,null))}function kt(t){var e=F(this,ut,St).call(this,t.feature);if(null===e)return O.error(M,"no job related to feature",t.feature),!1;switch(t.type){case"data":"CAMERA"===t.feature?(f()(this,Y,t.data.capabilities),f()(this,J,t.data.settings),f()(this,X,t.data.constraints),t.arguments&&"applyConstraints"===t.arguments[0]&&e.successCallback()):e.successCallback(t.data);break;case"error":e.errorCallback(new DOMException(t.error.message,t.error.name)),this.stopJob(t.feature);break;default:return O.debug(M,"unsupported message type",t.type),!1}return!0}function Ct(t){var e=t.eventName,n=t.message;e&&n?c()(this,$).emit(e,JSON.parse(n)):O.error(M,"unsupported message format")}function Et(t){var e=JSON.parse(t.data);F(this,st,kt).call(this,e)||F(this,at,Ct).call(this,e)}function St(t){return c()(this,Z).has(t)?c()(this,Z).get(t):null}function Bt(t){c()(this,V)?c()(this,H).send(g()(t)):O.error(M,"data channel is not connected")}function It(t,e){var n=this;if(O.debug(M,"got offer for "+t),c()(this,q)&&"video"===t){var r={sdp:{sdp:e.sdp,type:e.type}},o="webrtc.setRemoteDescAndSendAnswer:"+g()(r)+"@";postMessage(o)}else{var i="default"===t?c()(this,Q):c()(this,G);i.setRemoteDescription(e).then((function(){return i.createAnswer()})).then((function(t){return i.setLocalDescription(t)})).then((function(){O.debug(M,"send answer for "+t),n.sendSignalMessage({type:"answer",peerConnectionType:t,message:i.localDescription})})).catch((function(t){return O.error(M,"reason: "+t.toString())}))}}function Ot(t,e){if(O.debug("got answer for "+t),c()(this,q)&&"video"===t){var n={sdp:{sdp:e.sdp,type:e.type}},r="webrtc.setRemoteDesc:"+g()(n)+"@";postMessage(r)}else{("default"===t?c()(this,Q):c()(this,G)).setRemoteDescription(e).catch((function(t){return O.error(M,"reason: "+t.toString())}))}}function Pt(t,e){if(O.debug(M,"got candidate for "+t),c()(this,q)&&"video"===t){var n={ice:{candidate:e.candidate,sdpMid:e.sdpMid,sdpMLineIndex:e.sdpMLineIndex}},r="webrtc.addIceC:"+g()(n)+"@";postMessage(r)}else{("default"===t?c()(this,Q):c()(this,G)).addIceCandidate(e).catch((function(t){return O.error(M,"reason: "+t.toString())}))}}function Tt(t){for(var e in t)if(I()(e).call(e,"tizenAiAutoZoom"))return!0;return!1}function Rt(t){var e={};for(var n in t)I()(n).call(n,"tizenAiAutoZoom")&&(e[n]=t[n]);return e}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){t.exports=n(402)},function(t,e,n){var r=n(403);n(430),n(431),n(432),n(433),n(434),n(435),n(436),t.exports=r},function(t,e,n){var r=n(278);t.exports=r},function(t,e,n){n(279),n(82),n(409),n(411),n(412),n(413),n(414),n(290),n(415),n(416),n(417),n(418),n(419),n(420),n(421),n(422),n(423),n(424),n(425),n(426);var r=n(21);t.exports=r.Symbol},function(t,e,n){var r=n(14),o=n(50),i=n(26),s=n(197),a=n(199),c=n(406),u=n(24),f=r.TypeError,l=u("toPrimitive");t.exports=function(t,e){if(!i(t)||s(t))return t;var n,r=a(t,l);if(r){if(void 0===e&&(e="default"),n=o(r,t,e),!i(n)||s(n))return n;throw f("Can't convert object to primitive value")}return void 0===e&&(e="number"),c(t,e)}},function(t,e,n){var r=n(14),o=n(50),i=n(27),s=n(26),a=r.TypeError;t.exports=function(t,e){var n,r;if("string"===e&&i(n=t.toString)&&!s(r=o(n,t)))return r;if(i(n=t.valueOf)&&!s(r=o(n,t)))return r;if("string"!==e&&i(n=t.toString)&&!s(r=o(n,t)))return r;throw a("Can't convert object to primitive value")}},function(t,e,n){var r=n(14),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},function(t,e,n){var r=n(14),o=n(112),i=n(159),s=n(26),a=n(24)("species"),c=r.Array;t.exports=function(t){var e;return o(t)&&(e=t.constructor,(i(e)&&(e===c||o(e.prototype))||s(e)&&null===(e=e[a]))&&(e=void 0)),void 0===e?c:e}},function(t,e,n){"use strict";var r=n(15),o=n(14),i=n(56),s=n(98),a=n(50),c=n(17),u=n(70),f=n(39),l=n(198),h=n(20),p=n(33),d=n(112),v=n(27),g=n(26),y=n(34),m=n(197),b=n(47),w=n(80),A=n(65),x=n(154),k=n(93),C=n(91),E=n(94),S=n(161),B=n(163),I=n(287),O=n(245),P=n(78),T=n(54),R=n(243),j=n(181),D=n(135),F=n(101),M=n(200),L=n(162),U=n(134),N=n(157),z=n(24),Q=n(209),G=n(28),q=n(102),H=n(74),W=n(83).forEach,Y=L("hidden"),J=z("toPrimitive"),X=H.set,K=H.getterFor("Symbol"),V=Object.prototype,Z=o.Symbol,_=Z&&Z.prototype,$=o.TypeError,tt=o.QObject,et=i("JSON","stringify"),nt=P.f,rt=T.f,ot=I.f,it=j.f,st=c([].push),at=M("symbols"),ct=M("op-symbols"),ut=M("string-to-symbol-registry"),ft=M("symbol-to-string-registry"),lt=M("wks"),ht=!tt||!tt.prototype||!tt.prototype.findChild,pt=f&&h((function(){return 7!=E(rt({},"a",{get:function(){return rt(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=nt(V,e);r&&delete V[e],rt(t,e,n),r&&t!==V&&rt(V,e,r)}:rt,dt=function(t,e){var n=at[t]=E(_);return X(n,{type:"Symbol",tag:t,description:e}),f||(n.description=e),n},vt=function(t,e,n){t===V&&vt(ct,e,n),b(t);var r=x(e);return b(n),p(at,r)?(n.enumerable?(p(t,Y)&&t[Y][r]&&(t[Y][r]=!1),n=E(n,{enumerable:C(0,!1)})):(p(t,Y)||rt(t,Y,C(1,{})),t[Y][r]=!0),pt(t,r,n)):rt(t,r,n)},gt=function(t,e){b(t);var n=A(e),r=S(n).concat(wt(n));return W(r,(function(e){f&&!a(yt,n,e)||vt(t,e,n[e])})),t},yt=function(t){var e=x(t),n=a(it,this,e);return!(this===V&&p(at,e)&&!p(ct,e))&&(!(n||!p(this,e)||!p(at,e)||p(this,Y)&&this[Y][e])||n)},mt=function(t,e){var n=A(t),r=x(e);if(n!==V||!p(at,r)||p(ct,r)){var o=nt(n,r);return!o||!p(at,r)||p(n,Y)&&n[Y][r]||(o.enumerable=!0),o}},bt=function(t){var e=ot(A(t)),n=[];return W(e,(function(t){p(at,t)||p(U,t)||st(n,t)})),n},wt=function(t){var e=t===V,n=ot(e?ct:A(t)),r=[];return W(n,(function(t){!p(at,t)||e&&!p(V,t)||st(r,at[t])})),r};(l||(F(_=(Z=function(){if(y(_,this))throw $("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?k(arguments[0]):void 0,e=N(t),n=function(t){this===V&&a(n,ct,t),p(this,Y)&&p(this[Y],e)&&(this[Y][e]=!1),pt(this,e,C(1,t))};return f&&ht&&pt(V,e,{configurable:!0,set:n}),dt(e,t)}).prototype,"toString",(function(){return K(this).tag})),F(Z,"withoutSetter",(function(t){return dt(N(t),t)})),j.f=yt,T.f=vt,R.f=gt,P.f=mt,B.f=I.f=bt,O.f=wt,Q.f=function(t){return dt(z(t),t)},f&&(rt(_,"description",{configurable:!0,get:function(){return K(this).description}}),u||F(V,"propertyIsEnumerable",yt,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!l,sham:!l},{Symbol:Z}),W(S(lt),(function(t){G(t)})),r({target:"Symbol",stat:!0,forced:!l},{for:function(t){var e=k(t);if(p(ut,e))return ut[e];var n=Z(e);return ut[e]=n,ft[n]=e,n},keyFor:function(t){if(!m(t))throw $(t+" is not a symbol");if(p(ft,t))return ft[t]},useSetter:function(){ht=!0},useSimple:function(){ht=!1}}),r({target:"Object",stat:!0,forced:!l,sham:!f},{create:function(t,e){return void 0===e?E(t):gt(E(t),e)},defineProperty:vt,defineProperties:gt,getOwnPropertyDescriptor:mt}),r({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:bt,getOwnPropertySymbols:wt}),r({target:"Object",stat:!0,forced:h((function(){O.f(1)}))},{getOwnPropertySymbols:function(t){return O.f(w(t))}}),et)&&r({target:"JSON",stat:!0,forced:!l||h((function(){var t=Z();return"[null]"!=et([t])||"{}"!=et({a:t})||"{}"!=et(Object(t))}))},{stringify:function(t,e,n){var r=D(arguments),o=e;if((g(e)||void 0!==t)&&!m(t))return d(e)||(e=function(t,e){if(v(o)&&(e=a(o,this,t,e)),!m(e))return e}),r[1]=e,s(et,null,r)}});if(!_[J]){var At=_.valueOf;F(_,J,(function(t){return a(At,this)}))}q(Z,"Symbol"),U[Y]=!0},function(t,e,n){"use strict";var r=n(205),o=n(92);t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,e,n){n(28)("asyncIterator")},function(t,e){},function(t,e,n){n(28)("hasInstance")},function(t,e,n){n(28)("isConcatSpreadable")},function(t,e,n){n(28)("match")},function(t,e,n){n(28)("matchAll")},function(t,e,n){n(28)("replace")},function(t,e,n){n(28)("search")},function(t,e,n){n(28)("species")},function(t,e,n){n(28)("split")},function(t,e,n){n(28)("toPrimitive")},function(t,e,n){n(28)("toStringTag")},function(t,e,n){n(28)("unscopables")},function(t,e,n){var r=n(14);n(102)(r.JSON,"JSON",!0)},function(t,e){},function(t,e){},function(t,e,n){var r=n(39),o=n(33),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),c=a&&"something"===function(){}.name,u=a&&(!r||r&&s(i,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}},function(t,e,n){var r=n(14),o=n(27),i=r.String,s=r.TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw s("Can't set "+i(t)+" as a prototype")}},function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,n){n(28)("asyncDispose")},function(t,e,n){n(28)("dispose")},function(t,e,n){n(28)("matcher")},function(t,e,n){n(28)("metadata")},function(t,e,n){n(28)("observable")},function(t,e,n){n(28)("patternMatch")},function(t,e,n){n(28)("replaceAll")},function(t,e,n){t.exports=n(438)},function(t,e,n){var r=n(439);t.exports=r},function(t,e,n){var r=n(440);t.exports=r},function(t,e,n){var r=n(441);n(66),t.exports=r},function(t,e,n){n(71),n(82),n(109),n(290);var r=n(209);t.exports=r.f("iterator")},function(t,e,n){var r=n(443);t.exports=r},function(t,e,n){var r=n(349);t.exports=r},function(t,e,n){n(445);var r=n(21).Object,o=t.exports=function(t,e,n){return r.defineProperty(t,e,n)};r.defineProperty.sham&&(o.sham=!0)},function(t,e,n){var r=n(15),o=n(39),i=n(54).f;r({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!o},{defineProperty:i})},function(t,e){t.exports=function(t,e){return e.get?e.get.call(t):e.value},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(449);t.exports=r},function(t,e,n){n(450);var r=n(21);t.exports=r.Object.values},function(t,e,n){var r=n(15),o=n(451).values;r({target:"Object",stat:!0},{values:function(t){return o(t)}})},function(t,e,n){var r=n(39),o=n(17),i=n(161),s=n(65),a=o(n(181).f),c=o([].push),u=function(t){return function(e){for(var n,o=s(e),u=i(o),f=u.length,l=0,h=[];f>l;)n=u[l++],r&&!a(o,n)||c(h,t?[n,o[n]]:o[n]);return h}};t.exports={entries:u(!0),values:u(!1)}},function(t,e,n){var r=n(453);n(66),t.exports=r},function(t,e,n){n(71),n(82),n(454);var r=n(21);t.exports=r.WeakMap},function(t,e,n){"use strict";var r,o=n(14),i=n(17),s=n(144),a=n(145),c=n(165),u=n(297),f=n(26),l=n(294),h=n(74).enforce,p=n(289),d=!o.ActiveXObject&&"ActiveXObject"in o,v=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},g=c("WeakMap",v,u);if(p&&d){r=u.getConstructor(v,"WeakMap",!0),a.enable();var y=g.prototype,m=i(y.delete),b=i(y.has),w=i(y.get),A=i(y.set);s(y,{delete:function(t){if(f(t)&&!l(t)){var e=h(this);return e.frozen||(e.frozen=new r),m(this,t)||e.frozen.delete(t)}return m(this,t)},has:function(t){if(f(t)&&!l(t)){var e=h(this);return e.frozen||(e.frozen=new r),b(this,t)||e.frozen.has(t)}return b(this,t)},get:function(t){if(f(t)&&!l(t)){var e=h(this);return e.frozen||(e.frozen=new r),b(this,t)?w(this,t):e.frozen.get(t)}return w(this,t)},set:function(t,e){if(f(t)&&!l(t)){var n=h(this);n.frozen||(n.frozen=new r),b(this,t)?A(this,t,e):n.frozen.set(t,e)}else A(this,t,e);return this}})}},function(t,e,n){var r=n(20);t.exports=r((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},function(t,e,n){n(352),n(71),n(82),n(463),n(353),n(354),n(470),n(109);var r=n(21);t.exports=r.Promise},function(t,e,n){var r=n(33),o=n(458),i=n(78),s=n(54);t.exports=function(t,e,n){for(var a=o(e),c=s.f,u=i.f,f=0;f<a.length;f++){var l=a[f];r(t,l)||n&&r(n,l)||c(t,l,u(e,l))}}},function(t,e,n){var r=n(56),o=n(17),i=n(163),s=n(245),a=n(47),c=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=s.f;return n?c(e,n(t)):e}},function(t,e,n){var r=n(17)("".replace),o=String(Error("zxcasd").stack),i=/\n\s*at [^:]*:[^\n]*/,s=i.test(o);t.exports=function(t,e){if(s&&"string"==typeof t)for(;e--;)t=r(t,i,"");return t}},function(t,e,n){var r=n(26),o=n(73);t.exports=function(t,e){r(e)&&"cause"in e&&o(t,"cause",e.cause)}},function(t,e,n){var r=n(93);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:r(t)}},function(t,e,n){var r=n(20),o=n(91);t.exports=!r((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",o(1,7)),7!==t.stack)}))},function(t,e,n){"use strict";var r,o,i,s,a=n(15),c=n(70),u=n(14),f=n(56),l=n(50),h=n(298),p=n(101),d=n(144),v=n(164),g=n(102),y=n(299),m=n(79),b=n(27),w=n(26),A=n(137),x=n(206),k=n(103),C=n(300),E=n(301),S=n(303).set,B=n(464),I=n(305),O=n(467),P=n(147),T=n(182),R=n(468),j=n(74),D=n(282),F=n(24),M=n(469),L=n(212),U=n(155),N=F("species"),z="Promise",Q=j.getterFor(z),G=j.set,q=j.getterFor(z),H=h&&h.prototype,W=h,Y=H,J=u.TypeError,X=u.document,K=u.process,V=P.f,Z=V,_=!!(X&&X.createEvent&&u.dispatchEvent),$=b(u.PromiseRejectionEvent),tt=!1,et=D(z,(function(){var t=x(W),e=t!==String(W);if(!e&&66===U)return!0;if(c&&!Y.finally)return!0;if(U>=51&&/native code/.test(t))return!1;var n=new W((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[N]=r,!(tt=n.then((function(){}))instanceof r)||!e&&M&&!$})),nt=et||!C((function(t){W.all(t).catch((function(){}))})),rt=function(t){var e;return!(!w(t)||!b(e=t.then))&&e},ot=function(t,e){var n,r,o,i=e.value,s=1==e.state,a=s?t.ok:t.fail,c=t.resolve,u=t.reject,f=t.domain;try{a?(s||(2===e.rejection&&ut(e),e.rejection=1),!0===a?n=i:(f&&f.enter(),n=a(i),f&&(f.exit(),o=!0)),n===t.promise?u(J("Promise-chain cycle")):(r=rt(n))?l(r,n,c,u):c(n)):u(i)}catch(t){f&&!o&&f.exit(),u(t)}},it=function(t,e){t.notified||(t.notified=!0,B((function(){for(var n,r=t.reactions;n=r.get();)ot(n,t);t.notified=!1,e&&!t.rejection&&at(t)})))},st=function(t,e,n){var r,o;_?((r=X.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),u.dispatchEvent(r)):r={promise:e,reason:n},!$&&(o=u["on"+t])?o(r):"unhandledrejection"===t&&O("Unhandled promise rejection",n)},at=function(t){l(S,u,(function(){var e,n=t.facade,r=t.value;if(ct(t)&&(e=T((function(){L?K.emit("unhandledRejection",r,n):st("unhandledrejection",n,r)})),t.rejection=L||ct(t)?2:1,e.error))throw e.value}))},ct=function(t){return 1!==t.rejection&&!t.parent},ut=function(t){l(S,u,(function(){var e=t.facade;L?K.emit("rejectionHandled",e):st("rejectionhandled",e,t.value)}))},ft=function(t,e,n){return function(r){t(e,r,n)}},lt=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,it(t,!0))},ht=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw J("Promise can't be resolved itself");var r=rt(e);r?B((function(){var n={done:!1};try{l(r,e,ft(ht,n,t),ft(lt,n,t))}catch(e){lt(n,e,t)}})):(t.value=e,t.state=1,it(t,!1))}catch(e){lt({done:!1},e,t)}}};if(et&&(Y=(W=function(t){A(this,Y),m(t),l(r,this);var e=Q(this);try{t(ft(ht,e),ft(lt,e))}catch(t){lt(e,t)}}).prototype,(r=function(t){G(this,{type:z,done:!1,notified:!1,parent:!1,reactions:new R,rejection:!1,state:0,value:void 0})}).prototype=d(Y,{then:function(t,e){var n=q(this),r=V(E(this,W));return n.parent=!0,r.ok=!b(t)||t,r.fail=b(e)&&e,r.domain=L?K.domain:void 0,0==n.state?n.reactions.add(r):B((function(){ot(r,n)})),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,e=Q(t);this.promise=t,this.resolve=ft(ht,e),this.reject=ft(lt,e)},P.f=V=function(t){return t===W||t===i?new o(t):Z(t)},!c&&b(h)&&H!==Object.prototype)){s=H.then,tt||(p(H,"then",(function(t,e){var n=this;return new W((function(t,e){l(s,n,t,e)})).then(t,e)}),{unsafe:!0}),p(H,"catch",Y.catch,{unsafe:!0}));try{delete H.constructor}catch(t){}v&&v(H,Y)}a({global:!0,wrap:!0,forced:et},{Promise:W}),g(W,z,!1,!0),y(z),i=f(z),a({target:z,stat:!0,forced:et},{reject:function(t){var e=V(this);return l(e.reject,void 0,t),e.promise}}),a({target:z,stat:!0,forced:c||et},{resolve:function(t){return I(c&&this===i?W:this,t)}}),a({target:z,stat:!0,forced:nt},{all:function(t){var e=this,n=V(e),r=n.resolve,o=n.reject,i=T((function(){var n=m(e.resolve),i=[],s=0,a=1;k(t,(function(t){var c=s++,u=!1;a++,l(n,e,t).then((function(t){u||(u=!0,i[c]=t,--a||r(i))}),o)})),--a||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=V(e),r=n.reject,o=T((function(){var o=m(e.resolve);k(t,(function(t){l(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},function(t,e,n){var r,o,i,s,a,c,u,f,l=n(14),h=n(81),p=n(78).f,d=n(303).set,v=n(304),g=n(465),y=n(466),m=n(212),b=l.MutationObserver||l.WebKitMutationObserver,w=l.document,A=l.process,x=l.Promise,k=p(l,"queueMicrotask"),C=k&&k.value;C||(r=function(){var t,e;for(m&&(t=A.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?s():i=void 0,t}}i=void 0,t&&t.enter()},v||m||y||!b||!w?!g&&x&&x.resolve?((u=x.resolve(void 0)).constructor=x,f=h(u.then,u),s=function(){f(r)}):m?s=function(){A.nextTick(r)}:(d=h(d,l),s=function(){d(r)}):(a=!0,c=w.createTextNode(""),new b(r).observe(c,{characterData:!0}),s=function(){c.data=a=!a})),t.exports=C||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,s()),i=e}},function(t,e,n){var r=n(133),o=n(14);t.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==o.Pebble},function(t,e,n){var r=n(133);t.exports=/web0s(?!.*chrome)/i.test(r)},function(t,e,n){var r=n(14);t.exports=function(t,e){var n=r.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,e))}},function(t,e){var n=function(){this.head=null,this.tail=null};n.prototype={add:function(t){var e={item:t,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}},t.exports=n},function(t,e){t.exports="object"==typeof window},function(t,e,n){"use strict";var r=n(15),o=n(70),i=n(298),s=n(20),a=n(56),c=n(27),u=n(301),f=n(305),l=n(101);if(r({target:"Promise",proto:!0,real:!0,forced:!!i&&s((function(){i.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=u(this,a("Promise")),n=c(t);return this.then(n?function(n){return f(e,t()).then((function(){return n}))}:t,n?function(n){return f(e,t()).then((function(){throw n}))}:t)}}),!o&&c(i)){var h=a("Promise").prototype.finally;i.prototype.finally!==h&&l(i.prototype,"finally",h,{unsafe:!0})}},function(t,e,n){var r=n(16),o=n(59),i=n(96),s=n(311),a=n(116),c=n(472),u=n(57),f=r.TypeError,l=u("toPrimitive");t.exports=function(t,e){if(!i(t)||s(t))return t;var n,r=a(t,l);if(r){if(void 0===e&&(e="default"),n=o(r,t,e),!i(n)||s(n))return n;throw f("Can't convert object to primitive value")}return void 0===e&&(e="number"),c(t,e)}},function(t,e,n){var r=n(16),o=n(59),i=n(43),s=n(96),a=r.TypeError;t.exports=function(t,e){var n,r;if("string"===e&&i(n=t.toString)&&!s(r=o(n,t)))return r;if(i(n=t.valueOf)&&!s(r=o(n,t)))return r;if("string"!==e&&i(n=t.toString)&&!s(r=o(n,t)))return r;throw a("Can't convert object to primitive value")}},function(t,e,n){var r=n(16),o=n(43),i=n(184),s=r.WeakMap;t.exports=o(s)&&/native code/.test(i(s))},function(t,e,n){"use strict";var r=n(213),o=n(186);t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,e,n){var r=n(476);t.exports=r},function(t,e,n){var r=n(34),o=n(477),i=Array.prototype;t.exports=function(t){var e=t.slice;return t===i||r(i,t)&&e===i.slice?o:e}},function(t,e,n){n(478);var r=n(51);t.exports=r("Array").slice},function(t,e,n){"use strict";var r=n(15),o=n(14),i=n(112),s=n(159),a=n(26),c=n(207),u=n(100),f=n(65),l=n(158),h=n(24),p=n(160),d=n(135),v=p("slice"),g=h("species"),y=o.Array,m=Math.max;r({target:"Array",proto:!0,forced:!v},{slice:function(t,e){var n,r,o,h=f(this),p=u(h),v=c(t,p),b=c(void 0===e?p:e,p);if(i(h)&&(n=h.constructor,(s(n)&&(n===y||i(n.prototype))||a(n)&&null===(n=n[g]))&&(n=void 0),n===y||void 0===n))return d(h,v,b);for(r=new(void 0===n?y:n)(m(b-v,0)),o=0;v<b;v++,o++)v in h&&l(r,o,h[v]);return r.length=o,r}})},function(t,e,n){var r=n(480);t.exports=r},function(t,e,n){var r=n(481);t.exports=r},function(t,e,n){var r=n(482);n(66),t.exports=r},function(t,e,n){n(71),n(109);var r=n(146);t.exports=r},function(t,e,n){var r=n(484);t.exports=r},function(t,e,n){n(485);var r=n(21);t.exports=r.Array.isArray},function(t,e,n){n(15)({target:"Array",stat:!0},{isArray:n(112)})},function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},function(t,e,n){var r=n(75),o=n(488),i=n(253),s=n(115);t.exports=function(t,e){for(var n=o(e),a=s.f,c=i.f,u=0;u<n.length;u++){var f=n[u];r(t,f)||a(t,f,c(e,f))}}},function(t,e,n){var r=n(114),o=n(25),i=n(356),s=n(491),a=n(49),c=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=s.f;return n?c(e,n(t)):e}},function(t,e,n){var r=n(127),o=n(490),i=n(357),s=function(t){return function(e,n,s){var a,c=r(e),u=i(c),f=o(s,u);if(t&&n!=n){for(;u>f;)if((a=c[f++])!=a)return!0}else for(;u>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},function(t,e,n){var r=n(167),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(84),o=n(115),i=n(49),s=n(127),a=n(493);t.exports=r?Object.defineProperties:function(t,e){i(t);for(var n,r=s(e),c=a(e),u=c.length,f=0;u>f;)o.f(t,n=c[f++],r[n]);return t}},function(t,e,n){var r=n(313),o=n(222);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){"use strict";var r=n(59),o=n(170),i=n(49),s=n(168),a=n(85),c=n(105),u=n(116),f=n(223),l=n(171);o("match",(function(t,e,n){return[function(e){var n=c(this),o=null==e?void 0:u(e,t);return o?r(o,e,n):new RegExp(e)[t](a(n))},function(t){var r=i(this),o=a(t),c=n(e,r,o);if(c.done)return c.value;if(!r.global)return l(r,o);var u=r.unicode;r.lastIndex=0;for(var h,p=[],d=0;null!==(h=l(r,o));){var v=a(h[0]);p[d]=v,""===v&&(r.lastIndex=f(o,s(r.lastIndex),u)),d++}return 0===d?null:p}]}))},function(t,e,n){var r=n(496);t.exports=r},function(t,e,n){n(109),n(497);var r=n(21);t.exports=r.Array.from},function(t,e,n){var r=n(15),o=n(362);r({target:"Array",stat:!0,forced:!n(300)((function(t){Array.from(t)}))},{from:o})},function(t,e,n){var r=n(47),o=n(296);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){o(t,"throw",e)}}},function(t,e,n){var r=n(500);n(66),t.exports=r},function(t,e,n){n(71),n(501),n(82),n(109);var r=n(21);t.exports=r.Map},function(t,e,n){"use strict";n(165)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(315))},function(t,e,n){var r=n(503);t.exports=r},function(t,e,n){var r=n(34),o=n(504),i=String.prototype;t.exports=function(t){var e=t.endsWith;return"string"==typeof t||t===i||r(i,t)&&e===i.endsWith?o:e}},function(t,e,n){n(505);var r=n(51);t.exports=r("String").endsWith},function(t,e,n){"use strict";var r,o=n(15),i=n(17),s=n(78).f,a=n(203),c=n(93),u=n(257),f=n(123),l=n(258),h=n(70),p=i("".endsWith),d=i("".slice),v=Math.min,g=l("endsWith");o({target:"String",proto:!0,forced:!!(h||g||(r=s(String.prototype,"endsWith"),!r||r.writable))&&!g},{endsWith:function(t){var e=c(f(this));u(t);var n=arguments.length>1?arguments[1]:void 0,r=e.length,o=void 0===n?r:v(a(n),r),i=c(t);return p?p(e,i,o):d(e,o-i.length,o)===i}})},function(t,e,n){var r=n(26),o=n(99),i=n(24)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){var r=n(508);t.exports=r},function(t,e,n){var r=n(34),o=n(509),i=Function.prototype;t.exports=function(t){var e=t.bind;return t===i||r(i,t)&&e===i.bind?o:e}},function(t,e,n){n(510);var r=n(51);t.exports=r("Function").bind},function(t,e,n){var r=n(15),o=n(316);r({target:"Function",proto:!0,forced:Function.bind!==o},{bind:o})},function(t,e,n){n(66);var r=n(92),o=n(33),i=n(34),s=n(512),a=Array.prototype,c={DOMTokenList:!0,NodeList:!0};t.exports=function(t){var e=t.forEach;return t===a||i(a,t)&&e===a.forEach||o(c,r(t))?s:e}},function(t,e,n){var r=n(513);t.exports=r},function(t,e,n){n(514);var r=n(51);t.exports=r("Array").forEach},function(t,e,n){"use strict";var r=n(15),o=n(515);r({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},function(t,e,n){"use strict";var r=n(83).forEach,o=n(224)("forEach");t.exports=o?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,n){var r=n(517);t.exports=r},function(t,e,n){var r=n(34),o=n(518),i=Array.prototype;t.exports=function(t){var e=t.indexOf;return t===i||r(i,t)&&e===i.indexOf?o:e}},function(t,e,n){n(519);var r=n(51);t.exports=r("Array").indexOf},function(t,e,n){"use strict";var r=n(15),o=n(17),i=n(244).indexOf,s=n(224),a=o([].indexOf),c=!!a&&1/a([1],1,-0)<0,u=s("indexOf");r({target:"Array",proto:!0,forced:c||!u},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return c?a(this,t,e)||0:i(this,t,e)}})},function(t,e,n){var r=n(521);n(66),t.exports=r},function(t,e,n){n(71),n(82),n(522);var r=n(21);t.exports=r.WeakSet},function(t,e,n){"use strict";n(165)("WeakSet",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(297))},function(t,e,n){var r=n(524);t.exports=r},function(t,e,n){n(525);var r=n(21),o=n(98);r.JSON||(r.JSON={stringify:JSON.stringify}),t.exports=function(t,e,n){return o(r.JSON.stringify,null,arguments)}},function(t,e,n){var r=n(15),o=n(14),i=n(56),s=n(98),a=n(17),c=n(20),u=o.Array,f=i("JSON","stringify"),l=a(/./.exec),h=a("".charAt),p=a("".charCodeAt),d=a("".replace),v=a(1..toString),g=/[\uD800-\uDFFF]/g,y=/^[\uD800-\uDBFF]$/,m=/^[\uDC00-\uDFFF]$/,b=function(t,e,n){var r=h(n,e-1),o=h(n,e+1);return l(y,t)&&!l(m,o)||l(m,t)&&!l(y,r)?"\\u"+v(p(t,0),16):t},w=c((function(){return'"\\udf06\\ud834"'!==f("\udf06\ud834")||'"\\udead"'!==f("\udead")}));f&&r({target:"JSON",stat:!0,forced:w},{stringify:function(t,e,n){for(var r=0,o=arguments.length,i=u(o);r<o;r++)i[r]=arguments[r];var a=s(f,null,i);return"string"==typeof a?d(a,g,b):a}})},function(t,e,n){var r=n(527);t.exports=r},function(t,e,n){var r=n(34),o=n(528),i=Array.prototype;t.exports=function(t){var e=t.concat;return t===i||r(i,t)&&e===i.concat?o:e}},function(t,e,n){n(279);var r=n(51);t.exports=r("Array").concat},function(t,e,n){var r=n(530);t.exports=r},function(t,e,n){var r=n(34),o=n(531),i=String.prototype;t.exports=function(t){var e=t.startsWith;return"string"==typeof t||t===i||r(i,t)&&e===i.startsWith?o:e}},function(t,e,n){n(532);var r=n(51);t.exports=r("String").startsWith},function(t,e,n){"use strict";var r,o=n(15),i=n(17),s=n(78).f,a=n(203),c=n(93),u=n(257),f=n(123),l=n(258),h=n(70),p=i("".startsWith),d=i("".slice),v=Math.min,g=l("startsWith");o({target:"String",proto:!0,forced:!!(h||g||(r=s(String.prototype,"startsWith"),!r||r.writable))&&!g},{startsWith:function(t){var e=c(f(this));u(t);var n=a(v(arguments.length>1?arguments[1]:void 0,e.length)),r=c(t);return p?p(e,r,n):d(e,n,n+r.length)===r}})},function(t,e,n){var r=n(534);t.exports=r},function(t,e,n){var r=n(34),o=n(535),i=Array.prototype;t.exports=function(t){var e=t.reverse;return t===i||r(i,t)&&e===i.reverse?o:e}},function(t,e,n){n(536);var r=n(51);t.exports=r("Array").reverse},function(t,e,n){"use strict";var r=n(15),o=n(17),i=n(112),s=o([].reverse),a=[1,2];r({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),s(this)}})},function(t,e,n){var r=n(16),o=n(538),i=n(219),s=r.TypeError;t.exports=function(t){if(o(t))return t;throw s(i(t)+" is not a constructor")}},function(t,e,n){var r=n(25),o=n(45),i=n(43),s=n(186),a=n(114),c=n(184),u=function(){},f=[],l=a("Reflect","construct"),h=/^\s*(?:class|function)\b/,p=r(h.exec),d=!h.exec(u),v=function(t){if(!i(t))return!1;try{return l(u,f,t),!0}catch(t){return!1}};t.exports=!l||o((function(){var t;return v(v.call)||!v(Object)||!v((function(){t=!0}))||t}))?function(t){if(!i(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return d||!!p(h,c(t))}:v},function(t,e,n){"use strict";var r=n(59),o=n(170),i=n(49),s=n(105),a=n(540),c=n(85),u=n(116),f=n(171);o("search",(function(t,e,n){return[function(e){var n=s(this),o=null==e?void 0:u(e,t);return o?r(o,e,n):new RegExp(e)[t](c(n))},function(t){var r=i(this),o=c(t),s=n(e,r,o);if(s.done)return s.value;var u=r.lastIndex;a(u,0)||(r.lastIndex=0);var l=f(r,o);return a(r.lastIndex,u)||(r.lastIndex=u),null===l?-1:l.index}]}))},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,n){"use strict";var r=n(259),o=n(59),i=n(25),s=n(170),a=n(45),c=n(49),u=n(43),f=n(167),l=n(168),h=n(85),p=n(105),d=n(223),v=n(116),g=n(542),y=n(171),m=n(57)("replace"),b=Math.max,w=Math.min,A=i([].concat),x=i([].push),k=i("".indexOf),C=i("".slice),E="$0"==="a".replace(/./,"$0"),S=!!/./[m]&&""===/./[m]("a","$0");s("replace",(function(t,e,n){var i=S?"$":"$0";return[function(t,n){var r=p(this),i=null==t?void 0:v(t,m);return i?o(i,t,r,n):o(e,h(r),t,n)},function(t,o){var s=c(this),a=h(t);if("string"==typeof o&&-1===k(o,i)&&-1===k(o,"$<")){var p=n(e,s,a,o);if(p.done)return p.value}var v=u(o);v||(o=h(o));var m=s.global;if(m){var E=s.unicode;s.lastIndex=0}for(var S=[];;){var B=y(s,a);if(null===B)break;if(x(S,B),!m)break;""===h(B[0])&&(s.lastIndex=d(a,l(s.lastIndex),E))}for(var I,O="",P=0,T=0;T<S.length;T++){for(var R=h((B=S[T])[0]),j=b(w(f(B.index),a.length),0),D=[],F=1;F<B.length;F++)x(D,void 0===(I=B[F])?I:String(I));var M=B.groups;if(v){var L=A([R],D,j,a);void 0!==M&&x(L,M);var U=h(r(o,void 0,L))}else U=g(R,a,j,D,M,o);j>=P&&(O+=C(a,P,j)+U,P=j+R.length)}return O+C(a,P)}]}),!!a((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!E||S)},function(t,e,n){var r=n(25),o=n(249),i=Math.floor,s=r("".charAt),a=r("".replace),c=r("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,f=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,r,l,h){var p=n+t.length,d=r.length,v=f;return void 0!==l&&(l=o(l),v=u),a(h,v,(function(o,a){var u;switch(s(a,0)){case"$":return"$";case"&":return t;case"`":return c(e,0,n);case"'":return c(e,p);case"<":u=l[c(a,1,-1)];break;default:var f=+a;if(0===f)return o;if(f>d){var h=i(f/10);return 0===h?o:h<=d?void 0===r[h-1]?s(a,1):r[h-1]+s(a,1):o}u=r[f-1]}return void 0===u?"":u}))}},function(t,e,n){"use strict";var r=n(45);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},function(t,e,n){(function(e){var r=n(317),o=n(172)("socket.io-client:url");t.exports=function(t,n){var i=t;n=n||e.location,null==t&&(t=n.protocol+"//"+n.host);"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(o("protocol-less url %s",t),t=void 0!==n?n.protocol+"//"+t:"https://"+t),o("parse %s",t),i=r(t));i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443"));i.path=i.path||"/";var s=-1!==i.host.indexOf(":")?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+s+":"+i.port,i.href=i.protocol+"://"+s+(n&&n.port===i.port?"":":"+i.port),i}}).call(this,n(53))},function(t,e,n){var r;function o(t){function n(){if(n.enabled){var t=n,o=+new Date,i=o-(r||o);t.diff=i,t.prev=r,t.curr=o,r=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=e.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;c++;var o=e.formatters[r];if("function"==typeof o){var i=s[c];n=o.call(t,i),s.splice(c,1),c--}return n})),e.formatArgs.call(t,s);var u=n.log||e.log||console.log.bind(console);u.apply(t,s)}}return n.namespace=t,n.enabled=e.enabled(t),n.useColors=e.useColors(),n.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),"function"==typeof e.init&&e.init(n),n}(e=t.exports=o.debug=o.default=o).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){e.save(t),e.names=[],e.skips=[];for(var n=("string"==typeof t?t:"").split(/[\s,]+/),r=n.length,o=0;o<r;o++)n[o]&&("-"===(t=n[o].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(227),e.names=[],e.skips=[],e.formatters={}},function(t,e,n){(function(r){function o(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(547)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var o=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(o++,"%c"===t&&(i=o))})),t.splice(i,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=o,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(o())}).call(this,n(90))},function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,o=+new Date,i=o-(n||o);t.diff=i,t.prev=n,t.curr=o,n=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=e.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;c++;var o=e.formatters[r];if("function"==typeof o){var i=s[c];n=o.call(t,i),s.splice(c,1),c--}return n})),e.formatArgs.call(t,s);var u=r.log||e.log||console.log.bind(console);u.apply(t,s)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=o,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function o(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var n;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var i=e.instances[n];i.enabled=e.enabled(i.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(227),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e,n){"use strict";e.byteLength=function(t){var e=u(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=u(t),s=r[0],a=r[1],c=new i(function(t,e,n){return 3*(e+n)/4-n}(0,s,a)),f=0,l=a>0?s-4:s;for(n=0;n<l;n+=4)e=o[t.charCodeAt(n)]<<18|o[t.charCodeAt(n+1)]<<12|o[t.charCodeAt(n+2)]<<6|o[t.charCodeAt(n+3)],c[f++]=e>>16&255,c[f++]=e>>8&255,c[f++]=255&e;2===a&&(e=o[t.charCodeAt(n)]<<2|o[t.charCodeAt(n+1)]>>4,c[f++]=255&e);1===a&&(e=o[t.charCodeAt(n)]<<10|o[t.charCodeAt(n+1)]<<4|o[t.charCodeAt(n+2)]>>2,c[f++]=e>>8&255,c[f++]=255&e);return c},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],s=0,a=n-o;s<a;s+=16383)i.push(f(t,s,s+16383>a?a:s+16383));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a<c;++a)r[a]=s[a],o[s.charCodeAt(a)]=a;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function f(t,e,n){for(var o,i,s=[],a=e;a<n;a+=3)o=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,e){
 /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
-t.read=function(e,t,n,r,o){var i,s,a=8*o-r-1,c=(1<<a)-1,u=c>>1,l=-7,f=n?o-1:0,h=n?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=a;l>0;i=256*i+e[t+f],f+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),i-=u}return(p?-1:1)*s*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var s,a,c,u=8*i-o-1,l=(1<<u)-1,f=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(s++,c/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*c-1)*Math.pow(2,o),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[n+p]=255&a,p+=d,a/=256,o-=8);for(s=s<<o|a,u+=o;u>0;e[n+p]=255&s,p+=d,s/=256,u-=8);e[n+p-d]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){(function(e){var r=n(16),o=n(17),i=Object.prototype.toString,s="function"==typeof e.Blob||"[object BlobConstructor]"===i.call(e.Blob),a="function"==typeof e.File||"[object FileConstructor]"===i.call(e.File);t.deconstructPacket=function(e){var t=[],n=e.data,i=e;return i.data=function e(t,n){if(!t)return t;if(o(t)){var i={_placeholder:!0,num:n.length};return n.push(t),i}if(r(t)){for(var s=new Array(t.length),a=0;a<t.length;a++)s[a]=e(t[a],n);return s}if("object"==typeof t&&!(t instanceof Date)){s={};for(var c in t)s[c]=e(t[c],n);return s}return t}(n,t),i.attachments=t.length,{packet:i,buffers:t}},t.reconstructPacket=function(e,t){return e.data=function e(t,n){if(!t)return t;if(t&&t._placeholder)return n[t.num];if(r(t))for(var o=0;o<t.length;o++)t[o]=e(t[o],n);else if("object"==typeof t)for(var i in t)t[i]=e(t[i],n);return t}(e.data,t),e.attachments=void 0,e},t.removeBlobs=function(e,t){var n=0,i=e;!function e(c,u,l){if(!c)return c;if(s&&c instanceof Blob||a&&c instanceof File){n++;var f=new FileReader;f.onload=function(){l?l[u]=this.result:i=this.result,--n||t(i)},f.readAsArrayBuffer(c)}else if(r(c))for(var h=0;h<c.length;h++)e(c[h],h,c);else if("object"==typeof c&&!o(c))for(var p in c)e(c[p],p,c)}(i),n||t(i)}}).call(this,n(0))},function(e,t,n){e.exports=n(44),e.exports.parser=n(2)},function(e,t,n){(function(t){var r=n(19),o=n(12),i=n(7)("engine.io-client:socket"),s=n(22),a=n(2),c=n(13),u=n(5);function l(e,n){if(!(this instanceof l))return new l(e,n);n=n||{},e&&"object"==typeof e&&(n=e,e=null),e?(e=c(e),n.hostname=e.host,n.secure="https"===e.protocol||"wss"===e.protocol,n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=c(n.host).host),this.secure=null!=n.secure?n.secure:t.location&&"https:"===location.protocol,n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.agent=n.agent||!1,this.hostname=n.hostname||(t.location?location.hostname:"localhost"),this.port=n.port||(t.location&&location.port?location.port:this.secure?443:80),this.query=n.query||{},"string"==typeof this.query&&(this.query=u.decode(this.query)),this.upgrade=!1!==n.upgrade,this.path=(n.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!n.forceJSONP,this.jsonp=!1!==n.jsonp,this.forceBase64=!!n.forceBase64,this.enablesXDR=!!n.enablesXDR,this.timestampParam=n.timestampParam||"t",this.timestampRequests=n.timestampRequests,this.transports=n.transports||["polling","websocket"],this.transportOptions=n.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=n.policyPort||843,this.rememberUpgrade=n.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=n.onlyBinaryUpgrades,this.perMessageDeflate=!1!==n.perMessageDeflate&&(n.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=n.pfx||null,this.key=n.key||null,this.passphrase=n.passphrase||null,this.cert=n.cert||null,this.ca=n.ca||null,this.ciphers=n.ciphers||null,this.rejectUnauthorized=void 0===n.rejectUnauthorized||n.rejectUnauthorized,this.forceNode=!!n.forceNode;var r="object"==typeof t&&t;r.global===r&&(n.extraHeaders&&Object.keys(n.extraHeaders).length>0&&(this.extraHeaders=n.extraHeaders),n.localAddress&&(this.localAddress=n.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}e.exports=l,l.priorWebsocketSuccess=!1,o(l.prototype),l.protocol=a.protocol,l.Socket=l,l.Transport=n(11),l.transports=n(19),l.parser=n(2),l.prototype.createTransport=function(e){i('creating transport "%s"',e);var t=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(this.query);t.EIO=a.protocol,t.transport=e;var n=this.transportOptions[e]||{};return this.id&&(t.sid=this.id),new r[e]({query:t,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0})},l.prototype.open=function(){var e;if(this.rememberUpgrade&&l.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout((function(){t.emit("error","No transports available")}),0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},l.prototype.setTransport=function(e){i("setting transport %s",e.name);var t=this;this.transport&&(i("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",(function(){t.onDrain()})).on("packet",(function(e){t.onPacket(e)})).on("error",(function(e){t.onError(e)})).on("close",(function(){t.onClose("transport close")}))},l.prototype.probe=function(e){i('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),n=!1,r=this;function o(){if(r.onlyBinaryUpgrades){var o=!this.supportsBinary&&r.transport.supportsBinary;n=n||o}n||(i('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",(function(o){if(!n)if("pong"===o.type&&"probe"===o.data){if(i('probe transport "%s" pong',e),r.upgrading=!0,r.emit("upgrading",t),!t)return;l.priorWebsocketSuccess="websocket"===t.name,i('pausing current transport "%s"',r.transport.name),r.transport.pause((function(){n||"closed"!==r.readyState&&(i("changing transport and sending upgrade packet"),h(),r.setTransport(t),t.send([{type:"upgrade"}]),r.emit("upgrade",t),t=null,r.upgrading=!1,r.flush())}))}else{i('probe transport "%s" failed',e);var s=new Error("probe error");s.transport=t.name,r.emit("upgradeError",s)}})))}function s(){n||(n=!0,h(),t.close(),t=null)}function a(n){var o=new Error("probe error: "+n);o.transport=t.name,s(),i('probe transport "%s" failed because of error: %s',e,n),r.emit("upgradeError",o)}function c(){a("transport closed")}function u(){a("socket closed")}function f(e){t&&e.name!==t.name&&(i('"%s" works - aborting "%s"',e.name,t.name),s())}function h(){t.removeListener("open",o),t.removeListener("error",a),t.removeListener("close",c),r.removeListener("close",u),r.removeListener("upgrading",f)}l.priorWebsocketSuccess=!1,t.once("open",o),t.once("error",a),t.once("close",c),this.once("close",u),this.once("upgrading",f),t.open()},l.prototype.onOpen=function(){if(i("socket open"),this.readyState="open",l.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){i("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},l.prototype.onPacket=function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(i('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else i('packet received with socket readyState "%s"',this.readyState)},l.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},l.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout((function(){"closed"!==t.readyState&&t.onClose("ping timeout")}),e||t.pingInterval+t.pingTimeout)},l.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout((function(){i("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)}),e.pingInterval)},l.prototype.ping=function(){var e=this;this.sendPacket("ping",(function(){e.emit("ping")}))},l.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},l.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(i("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},l.prototype.write=l.prototype.send=function(e,t,n){return this.sendPacket("message",e,t,n),this},l.prototype.sendPacket=function(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var o={type:e,data:t,options:n};this.emit("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}},l.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var e=this;this.writeBuffer.length?this.once("drain",(function(){this.upgrading?r():t()})):this.upgrading?r():t()}function t(){e.onClose("forced close"),i("socket closing - telling transport to close"),e.transport.close()}function n(){e.removeListener("upgrade",n),e.removeListener("upgradeError",n),t()}function r(){e.once("upgrade",n),e.once("upgradeError",n)}return this},l.prototype.onError=function(e){i("socket error %j",e),l.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},l.prototype.onClose=function(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){i('socket close with reason: "%s"',e);clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),this.writeBuffer=[],this.prevBufferLen=0}},l.prototype.filterUpgrades=function(e){for(var t=[],n=0,r=e.length;n<r;n++)~s(this.transports,e[n])&&t.push(e[n]);return t}}).call(this,n(0))},function(e,t){try{e.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){e.exports=!1}},function(e,t,n){(function(t){var r=n(10),o=n(20),i=n(12),s=n(6),a=n(7)("engine.io-client:polling-xhr");function c(){}function u(e){if(o.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,t.location){var n="https:"===location.protocol,r=location.port;r||(r=n?443:80),this.xd=e.hostname!==t.location.hostname||r!==e.port,this.xs=e.secure!==n}}function l(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}function f(){for(var e in l.requests)l.requests.hasOwnProperty(e)&&l.requests[e].abort()}e.exports=u,e.exports.Request=l,s(u,o),u.prototype.supportsBinary=!0,u.prototype.request=function(e){return(e=e||{}).uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new l(e)},u.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,r=this.request({method:"POST",data:e,isBinary:n}),o=this;r.on("success",t),r.on("error",(function(e){o.onError("xhr post error",e)})),this.sendXhr=r},u.prototype.doPoll=function(){a("xhr poll");var e=this.request(),t=this;e.on("data",(function(e){t.onData(e)})),e.on("error",(function(e){t.onError("xhr poll error",e)})),this.pollXhr=e},i(l.prototype),l.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var n=this.xhr=new r(e),o=this;try{a("xhr open %s: %s",this.method,this.uri),n.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var i in n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this.extraHeaders[i])}catch(e){}if("POST"===this.method)try{this.isBinary?n.setRequestHeader("Content-type","application/octet-stream"):n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{n.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in n&&(n.withCredentials=!0),this.requestTimeout&&(n.timeout=this.requestTimeout),this.hasXDR()?(n.onload=function(){o.onLoad()},n.onerror=function(){o.onError(n.responseText)}):n.onreadystatechange=function(){if(2===n.readyState)try{var e=n.getResponseHeader("Content-Type");o.supportsBinary&&"application/octet-stream"===e&&(n.responseType="arraybuffer")}catch(e){}4===n.readyState&&(200===n.status||1223===n.status?o.onLoad():setTimeout((function(){o.onError(n.status)}),0))},a("xhr data %s",this.data),n.send(this.data)}catch(e){return void setTimeout((function(){o.onError(e)}),0)}t.document&&(this.index=l.requestsCount++,l.requests[this.index]=this)},l.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},l.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},l.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},l.prototype.cleanup=function(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=c:this.xhr.onreadystatechange=c,e)try{this.xhr.abort()}catch(e){}t.document&&delete l.requests[this.index],this.xhr=null}},l.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch(e){}e="application/octet-stream"===t&&this.xhr.response||this.xhr.responseText}catch(e){this.onError(e)}null!=e&&this.onData(e)},l.prototype.hasXDR=function(){return void 0!==t.XDomainRequest&&!this.xs&&this.enablesXDR},l.prototype.abort=function(){this.cleanup()},l.requestsCount=0,l.requests={},t.document&&(t.attachEvent?t.attachEvent("onunload",f):t.addEventListener&&t.addEventListener("beforeunload",f,!1))}).call(this,n(0))},function(e,t){e.exports=Object.keys||function(e){var t=[],n=Object.prototype.hasOwnProperty;for(var r in e)n.call(e,r)&&t.push(r);return t}},function(e,t){e.exports=function(e,t,n){var r=e.byteLength;if(t=t||0,n=n||r,e.slice)return e.slice(t,n);if(t<0&&(t+=r),n<0&&(n+=r),n>r&&(n=r),t>=r||t>=n||0===r)return new ArrayBuffer(0);for(var o=new Uint8Array(e),i=new Uint8Array(n-t),s=t,a=0;s<n;s++,a++)i[a]=o[s];return i.buffer}},function(e,t){function n(){}e.exports=function(e,t,r){var o=!1;return r=r||n,i.count=e,0===e?t():i;function i(e,n){if(i.count<=0)throw new Error("after called too many times");--i.count,e?(o=!0,t(e),t=r):0!==i.count||o||t(null,n)}}},function(e,t){
+e.read=function(t,e,n,r,o){var i,s,a=8*o-r-1,c=(1<<a)-1,u=c>>1,f=-7,l=n?o-1:0,h=n?-1:1,p=t[e+l];for(l+=h,i=p&(1<<-f)-1,p>>=-f,f+=a;f>0;i=256*i+t[e+l],l+=h,f-=8);for(s=i&(1<<-f)-1,i>>=-f,f+=r;f>0;s=256*s+t[e+l],l+=h,f-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),i-=u}return(p?-1:1)*s*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var s,a,c,u=8*i-o-1,f=(1<<u)-1,l=f>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+l>=1?h/c:h*Math.pow(2,1-l))*c>=2&&(s++,c/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(e*c-1)*Math.pow(2,o),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,o),s=0));o>=8;t[n+p]=255&a,p+=d,a/=256,o-=8);for(s=s<<o|a,u+=o;u>0;t[n+p]=255&s,p+=d,s/=256,u-=8);t[n+p-d]|=128*v}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){(function(t){var r=n(320),o=n(321),i=Object.prototype.toString,s="function"==typeof t.Blob||"[object BlobConstructor]"===i.call(t.Blob),a="function"==typeof t.File||"[object FileConstructor]"===i.call(t.File);e.deconstructPacket=function(t){var e=[],n=t.data,i=t;return i.data=function t(e,n){if(!e)return e;if(o(e)){var i={_placeholder:!0,num:n.length};return n.push(e),i}if(r(e)){for(var s=new Array(e.length),a=0;a<e.length;a++)s[a]=t(e[a],n);return s}if("object"==typeof e&&!(e instanceof Date)){s={};for(var c in e)s[c]=t(e[c],n);return s}return e}(n,e),i.attachments=e.length,{packet:i,buffers:e}},e.reconstructPacket=function(t,e){return t.data=function t(e,n){if(!e)return e;if(e&&e._placeholder)return n[e.num];if(r(e))for(var o=0;o<e.length;o++)e[o]=t(e[o],n);else if("object"==typeof e)for(var i in e)e[i]=t(e[i],n);return e}(t.data,e),t.attachments=void 0,t},e.removeBlobs=function(t,e){var n=0,i=t;!function t(c,u,f){if(!c)return c;if(s&&c instanceof Blob||a&&c instanceof File){n++;var l=new FileReader;l.onload=function(){f?f[u]=this.result:i=this.result,--n||e(i)},l.readAsArrayBuffer(c)}else if(r(c))for(var h=0;h<c.length;h++)t(c[h],h,c);else if("object"==typeof c&&!o(c))for(var p in c)t(c[p],p,c)}(i),n||e(i)}}).call(this,n(53))},function(t,e,n){t.exports=n(554),t.exports.parser=n(118)},function(t,e,n){(function(e){var r=n(323),o=n(117),i=n(175)("engine.io-client:socket"),s=n(326),a=n(118),c=n(317),u=n(173);function f(t,n){if(!(this instanceof f))return new f(t,n);n=n||{},t&&"object"==typeof t&&(n=t,t=null),t?(t=c(t),n.hostname=t.host,n.secure="https"===t.protocol||"wss"===t.protocol,n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=c(n.host).host),this.secure=null!=n.secure?n.secure:e.location&&"https:"===location.protocol,n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.agent=n.agent||!1,this.hostname=n.hostname||(e.location?location.hostname:"localhost"),this.port=n.port||(e.location&&location.port?location.port:this.secure?443:80),this.query=n.query||{},"string"==typeof this.query&&(this.query=u.decode(this.query)),this.upgrade=!1!==n.upgrade,this.path=(n.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!n.forceJSONP,this.jsonp=!1!==n.jsonp,this.forceBase64=!!n.forceBase64,this.enablesXDR=!!n.enablesXDR,this.timestampParam=n.timestampParam||"t",this.timestampRequests=n.timestampRequests,this.transports=n.transports||["polling","websocket"],this.transportOptions=n.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=n.policyPort||843,this.rememberUpgrade=n.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=n.onlyBinaryUpgrades,this.perMessageDeflate=!1!==n.perMessageDeflate&&(n.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=n.pfx||null,this.key=n.key||null,this.passphrase=n.passphrase||null,this.cert=n.cert||null,this.ca=n.ca||null,this.ciphers=n.ciphers||null,this.rejectUnauthorized=void 0===n.rejectUnauthorized||n.rejectUnauthorized,this.forceNode=!!n.forceNode;var r="object"==typeof e&&e;r.global===r&&(n.extraHeaders&&Object.keys(n.extraHeaders).length>0&&(this.extraHeaders=n.extraHeaders),n.localAddress&&(this.localAddress=n.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}t.exports=f,f.priorWebsocketSuccess=!1,o(f.prototype),f.protocol=a.protocol,f.Socket=f,f.Transport=n(230),f.transports=n(323),f.parser=n(118),f.prototype.createTransport=function(t){i('creating transport "%s"',t);var e=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}(this.query);e.EIO=a.protocol,e.transport=t;var n=this.transportOptions[t]||{};return this.id&&(e.sid=this.id),new r[t]({query:e,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0})},f.prototype.open=function(){var t;if(this.rememberUpgrade&&f.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length){var e=this;return void setTimeout((function(){e.emit("error","No transports available")}),0)}t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)},f.prototype.setTransport=function(t){i("setting transport %s",t.name);var e=this;this.transport&&(i("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",(function(){e.onDrain()})).on("packet",(function(t){e.onPacket(t)})).on("error",(function(t){e.onError(t)})).on("close",(function(){e.onClose("transport close")}))},f.prototype.probe=function(t){i('probing transport "%s"',t);var e=this.createTransport(t,{probe:1}),n=!1,r=this;function o(){if(r.onlyBinaryUpgrades){var o=!this.supportsBinary&&r.transport.supportsBinary;n=n||o}n||(i('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",(function(o){if(!n)if("pong"===o.type&&"probe"===o.data){if(i('probe transport "%s" pong',t),r.upgrading=!0,r.emit("upgrading",e),!e)return;f.priorWebsocketSuccess="websocket"===e.name,i('pausing current transport "%s"',r.transport.name),r.transport.pause((function(){n||"closed"!==r.readyState&&(i("changing transport and sending upgrade packet"),h(),r.setTransport(e),e.send([{type:"upgrade"}]),r.emit("upgrade",e),e=null,r.upgrading=!1,r.flush())}))}else{i('probe transport "%s" failed',t);var s=new Error("probe error");s.transport=e.name,r.emit("upgradeError",s)}})))}function s(){n||(n=!0,h(),e.close(),e=null)}function a(n){var o=new Error("probe error: "+n);o.transport=e.name,s(),i('probe transport "%s" failed because of error: %s',t,n),r.emit("upgradeError",o)}function c(){a("transport closed")}function u(){a("socket closed")}function l(t){e&&t.name!==e.name&&(i('"%s" works - aborting "%s"',t.name,e.name),s())}function h(){e.removeListener("open",o),e.removeListener("error",a),e.removeListener("close",c),r.removeListener("close",u),r.removeListener("upgrading",l)}f.priorWebsocketSuccess=!1,e.once("open",o),e.once("error",a),e.once("close",c),this.once("close",u),this.once("upgrading",l),e.open()},f.prototype.onOpen=function(){if(i("socket open"),this.readyState="open",f.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){i("starting upgrade probes");for(var t=0,e=this.upgrades.length;t<e;t++)this.probe(this.upgrades[t])}},f.prototype.onPacket=function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(i('socket receive: type "%s", data "%s"',t.type,t.data),this.emit("packet",t),this.emit("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emit("data",t.data),this.emit("message",t.data)}else i('packet received with socket readyState "%s"',this.readyState)},f.prototype.onHandshake=function(t){this.emit("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},f.prototype.onHeartbeat=function(t){clearTimeout(this.pingTimeoutTimer);var e=this;e.pingTimeoutTimer=setTimeout((function(){"closed"!==e.readyState&&e.onClose("ping timeout")}),t||e.pingInterval+e.pingTimeout)},f.prototype.setPing=function(){var t=this;clearTimeout(t.pingIntervalTimer),t.pingIntervalTimer=setTimeout((function(){i("writing ping packet - expecting pong within %sms",t.pingTimeout),t.ping(),t.onHeartbeat(t.pingTimeout)}),t.pingInterval)},f.prototype.ping=function(){var t=this;this.sendPacket("ping",(function(){t.emit("ping")}))},f.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},f.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(i("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},f.prototype.write=f.prototype.send=function(t,e,n){return this.sendPacket("message",t,e,n),this},f.prototype.sendPacket=function(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var o={type:t,data:e,options:n};this.emit("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}},f.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var t=this;this.writeBuffer.length?this.once("drain",(function(){this.upgrading?r():e()})):this.upgrading?r():e()}function e(){t.onClose("forced close"),i("socket closing - telling transport to close"),t.transport.close()}function n(){t.removeListener("upgrade",n),t.removeListener("upgradeError",n),e()}function r(){t.once("upgrade",n),t.once("upgradeError",n)}return this},f.prototype.onError=function(t){i("socket error %j",t),f.priorWebsocketSuccess=!1,this.emit("error",t),this.onClose("transport error",t)},f.prototype.onClose=function(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){i('socket close with reason: "%s"',t);clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",t,e),this.writeBuffer=[],this.prevBufferLen=0}},f.prototype.filterUpgrades=function(t){for(var e=[],n=0,r=t.length;n<r;n++)~s(this.transports,t[n])&&e.push(t[n]);return e}}).call(this,n(53))},function(t,e){try{t.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){t.exports=!1}},function(t,e,n){(function(e){var r=n(229),o=n(324),i=n(117),s=n(174),a=n(175)("engine.io-client:polling-xhr");function c(){}function u(t){if(o.call(this,t),this.requestTimeout=t.requestTimeout,this.extraHeaders=t.extraHeaders,e.location){var n="https:"===location.protocol,r=location.port;r||(r=n?443:80),this.xd=t.hostname!==e.location.hostname||r!==t.port,this.xs=t.secure!==n}}function f(t){this.method=t.method||"GET",this.uri=t.uri,this.xd=!!t.xd,this.xs=!!t.xs,this.async=!1!==t.async,this.data=void 0!==t.data?t.data:null,this.agent=t.agent,this.isBinary=t.isBinary,this.supportsBinary=t.supportsBinary,this.enablesXDR=t.enablesXDR,this.requestTimeout=t.requestTimeout,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.extraHeaders=t.extraHeaders,this.create()}function l(){for(var t in f.requests)f.requests.hasOwnProperty(t)&&f.requests[t].abort()}t.exports=u,t.exports.Request=f,s(u,o),u.prototype.supportsBinary=!0,u.prototype.request=function(t){return(t=t||{}).uri=this.uri(),t.xd=this.xd,t.xs=this.xs,t.agent=this.agent||!1,t.supportsBinary=this.supportsBinary,t.enablesXDR=this.enablesXDR,t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized,t.requestTimeout=this.requestTimeout,t.extraHeaders=this.extraHeaders,new f(t)},u.prototype.doWrite=function(t,e){var n="string"!=typeof t&&void 0!==t,r=this.request({method:"POST",data:t,isBinary:n}),o=this;r.on("success",e),r.on("error",(function(t){o.onError("xhr post error",t)})),this.sendXhr=r},u.prototype.doPoll=function(){a("xhr poll");var t=this.request(),e=this;t.on("data",(function(t){e.onData(t)})),t.on("error",(function(t){e.onError("xhr poll error",t)})),this.pollXhr=t},i(f.prototype),f.prototype.create=function(){var t={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized;var n=this.xhr=new r(t),o=this;try{a("xhr open %s: %s",this.method,this.uri),n.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var i in n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this.extraHeaders[i])}catch(t){}if("POST"===this.method)try{this.isBinary?n.setRequestHeader("Content-type","application/octet-stream"):n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{n.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in n&&(n.withCredentials=!0),this.requestTimeout&&(n.timeout=this.requestTimeout),this.hasXDR()?(n.onload=function(){o.onLoad()},n.onerror=function(){o.onError(n.responseText)}):n.onreadystatechange=function(){if(2===n.readyState)try{var t=n.getResponseHeader("Content-Type");o.supportsBinary&&"application/octet-stream"===t&&(n.responseType="arraybuffer")}catch(t){}4===n.readyState&&(200===n.status||1223===n.status?o.onLoad():setTimeout((function(){o.onError(n.status)}),0))},a("xhr data %s",this.data),n.send(this.data)}catch(t){return void setTimeout((function(){o.onError(t)}),0)}e.document&&(this.index=f.requestsCount++,f.requests[this.index]=this)},f.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},f.prototype.onData=function(t){this.emit("data",t),this.onSuccess()},f.prototype.onError=function(t){this.emit("error",t),this.cleanup(!0)},f.prototype.cleanup=function(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=c:this.xhr.onreadystatechange=c,t)try{this.xhr.abort()}catch(t){}e.document&&delete f.requests[this.index],this.xhr=null}},f.prototype.onLoad=function(){var t;try{var e;try{e=this.xhr.getResponseHeader("Content-Type")}catch(t){}t="application/octet-stream"===e&&this.xhr.response||this.xhr.responseText}catch(t){this.onError(t)}null!=t&&this.onData(t)},f.prototype.hasXDR=function(){return void 0!==e.XDomainRequest&&!this.xs&&this.enablesXDR},f.prototype.abort=function(){this.cleanup()},f.requestsCount=0,f.requests={},e.document&&(e.attachEvent?e.attachEvent("onunload",l):e.addEventListener&&e.addEventListener("beforeunload",l,!1))}).call(this,n(53))},function(t,e){t.exports=Object.keys||function(t){var e=[],n=Object.prototype.hasOwnProperty;for(var r in t)n.call(t,r)&&e.push(r);return e}},function(t,e){t.exports=function(t,e,n){var r=t.byteLength;if(e=e||0,n=n||r,t.slice)return t.slice(e,n);if(e<0&&(e+=r),n<0&&(n+=r),n>r&&(n=r),e>=r||e>=n||0===r)return new ArrayBuffer(0);for(var o=new Uint8Array(t),i=new Uint8Array(n-e),s=e,a=0;s<n;s++,a++)i[a]=o[s];return i.buffer}},function(t,e){function n(){}t.exports=function(t,e,r){var o=!1;return r=r||n,i.count=t,0===t?e():i;function i(t,n){if(i.count<=0)throw new Error("after called too many times");--i.count,t?(o=!0,e(t),e=r):0!==i.count||o||e(null,n)}}},function(t,e){
 /*! https://mths.be/utf8js v2.1.2 by @mathias */
-var n,r,o,i=String.fromCharCode;function s(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function a(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function c(e,t){return i(e>>t&63|128)}function u(e,t){if(0==(4294967168&e))return i(e);var n="";return 0==(4294965248&e)?n=i(e>>6&31|192):0==(4294901760&e)?(a(e,t)||(e=65533),n=i(e>>12&15|224),n+=c(e,6)):0==(4292870144&e)&&(n=i(e>>18&7|240),n+=c(e,12),n+=c(e,6)),n+=i(63&e|128)}function l(){if(o>=r)throw Error("Invalid byte index");var e=255&n[o];if(o++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function f(e){var t,i;if(o>r)throw Error("Invalid byte index");if(o==r)return!1;if(t=255&n[o],o++,0==(128&t))return t;if(192==(224&t)){if((i=(31&t)<<6|l())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&t)){if((i=(15&t)<<12|l()<<6|l())>=2048)return a(i,e)?i:65533;throw Error("Invalid continuation byte")}if(240==(248&t)&&(i=(7&t)<<18|l()<<12|l()<<6|l())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.exports={version:"2.1.2",encode:function(e,t){for(var n=!1!==(t=t||{}).strict,r=s(e),o=r.length,i=-1,a="";++i<o;)a+=u(r[i],n);return a},decode:function(e,t){var a=!1!==(t=t||{}).strict;n=s(e),r=n.length,o=0;for(var c,u=[];!1!==(c=f(a));)u.push(c);return function(e){for(var t,n=e.length,r=-1,o="";++r<n;)(t=e[r])>65535&&(o+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=i(t);return o}(u)}}},function(e,t){!function(){"use strict";for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),r=0;r<e.length;r++)n[e.charCodeAt(r)]=r;t.encode=function(t){var n,r=new Uint8Array(t),o=r.length,i="";for(n=0;n<o;n+=3)i+=e[r[n]>>2],i+=e[(3&r[n])<<4|r[n+1]>>4],i+=e[(15&r[n+1])<<2|r[n+2]>>6],i+=e[63&r[n+2]];return o%3==2?i=i.substring(0,i.length-1)+"=":o%3==1&&(i=i.substring(0,i.length-2)+"=="),i},t.decode=function(e){var t,r,o,i,s,a=.75*e.length,c=e.length,u=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var l=new ArrayBuffer(a),f=new Uint8Array(l);for(t=0;t<c;t+=4)r=n[e.charCodeAt(t)],o=n[e.charCodeAt(t+1)],i=n[e.charCodeAt(t+2)],s=n[e.charCodeAt(t+3)],f[u++]=r<<2|o>>4,f[u++]=(15&o)<<4|i>>2,f[u++]=(3&i)<<6|63&s;return l}}()},function(e,t){var n=void 0!==n?n:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,r=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),o=r&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),i=n&&n.prototype.append&&n.prototype.getBlob;function s(e){return e.map((function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var n=new Uint8Array(e.byteLength);n.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=n.buffer}return t}return e}))}function a(e,t){t=t||{};var r=new n;return s(e).forEach((function(e){r.append(e)})),t.type?r.getBlob(t.type):r.getBlob()}function c(e,t){return new Blob(s(e),t||{})}"undefined"!=typeof Blob&&(a.prototype=Blob.prototype,c.prototype=Blob.prototype),e.exports=r?o?Blob:c:i?a:void 0},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,o=+new Date,i=o-(n||o);e.diff=i,e.prev=n,e.curr=o,n=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;c++;var o=t.formatters[r];if("function"==typeof o){var i=s[c];n=o.call(e,i),s.splice(c,1),c--}return n})),t.formatArgs.call(e,s);var u=r.log||t.log||console.log.bind(console);u.apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),r.destroy=o,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function o(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var i=t.instances[n];i.enabled=t.enabled(i.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(54),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t){var n=1e3,r=6e4,o=60*r,i=24*o;function s(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var a,c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===c&&!1===isNaN(e))return t.long?s(a=e,i,"day")||s(a,o,"hour")||s(a,r,"minute")||s(a,n,"second")||a+" ms":function(e){if(e>=i)return Math.round(e/i)+"d";if(e>=o)return Math.round(e/o)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){(function(t){var r=n(20),o=n(6);e.exports=u;var i,s=/\n/g,a=/\\n/g;function c(){}function u(e){r.call(this,e),this.query=this.query||{},i||(t.___eio||(t.___eio=[]),i=t.___eio),this.index=i.length;var n=this;i.push((function(e){n.onData(e)})),this.query.j=this.index,t.document&&t.addEventListener&&t.addEventListener("beforeunload",(function(){n.script&&(n.script.onerror=c)}),!1)}o(u,r),u.prototype.supportsBinary=!1,u.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),r.prototype.doClose.call(this)},u.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(t,n):(document.head||document.body).appendChild(t),this.script=t,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout((function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)}),100)},u.prototype.doWrite=function(e,t){var n=this;if(!this.form){var r,o=document.createElement("form"),i=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index;o.className="socketio",o.style.position="absolute",o.style.top="-1000px",o.style.left="-1000px",o.target=c,o.method="POST",o.setAttribute("accept-charset","utf-8"),i.name="d",o.appendChild(i),document.body.appendChild(o),this.form=o,this.area=i}function u(){l(),t()}function l(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(e){n.onError("jsonp polling iframe removal error",e)}try{var e='<iframe src="javascript:0" name="'+n.iframeId+'">';r=document.createElement(e)}catch(e){(r=document.createElement("iframe")).name=n.iframeId,r.src="javascript:0"}r.id=n.iframeId,n.form.appendChild(r),n.iframe=r}this.form.action=this.uri(),l(),e=e.replace(a,"\\\n"),this.area.value=e.replace(s,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&u()}:this.iframe.onload=u}}).call(this,n(0))},function(e,t,n){(function(t){var r,o=n(11),i=n(2),s=n(5),a=n(6),c=n(21),u=n(7)("engine.io-client:websocket"),l=t.WebSocket||t.MozWebSocket;if("undefined"==typeof window)try{r=n(57)}catch(e){}var f=l;function h(e){e&&e.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=l&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(f=r),o.call(this,e)}f||"undefined"!=typeof window||(f=r),e.exports=h,a(h,o),h.prototype.name="websocket",h.prototype.supportsBinary=!0,h.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket?t?new f(e,t):new f(e):new f(e,t,n)}catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},h.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},h.prototype.write=function(e){var n=this;this.writable=!1;for(var r=e.length,o=0,s=r;o<s;o++)!function(e){i.encodePacket(e,n.supportsBinary,(function(o){if(!n.usingBrowserWebSocket){var i={};if(e.options&&(i.compress=e.options.compress),n.perMessageDeflate)("string"==typeof o?t.Buffer.byteLength(o):o.length)<n.perMessageDeflate.threshold&&(i.compress=!1)}try{n.usingBrowserWebSocket?n.ws.send(o):n.ws.send(o,i)}catch(e){u("websocket closed before onclose event")}--r||a()}))}(e[o]);function a(){n.emit("flush"),setTimeout((function(){n.writable=!0,n.emit("drain")}),0)}},h.prototype.onClose=function(){o.prototype.onClose.call(this)},h.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},h.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";return this.port&&("wss"===t&&443!==Number(this.port)||"ws"===t&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=c()),this.supportsBinary||(e.b64=1),(e=s.encode(e)).length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e},h.prototype.check=function(){return!(!f||"__initialize"in f&&this.name===h.prototype.name)}}).call(this,n(0))},function(e,t){},function(e,t){e.exports=function(e,t){for(var n=[],r=(t=t||0)||0;r<e.length;r++)n[r-t]=e[r];return n}},function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},function(e,t,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}v(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&v(e,"error",t,n)}(e,o,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var c=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function f(e,t,n,r){var o,i,s,a;if(u(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),s=i[t]),void 0===s)s=i[t]=n,++e._eventsCount;else if("function"==typeof s?s=i[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(o=l(e))>0&&s.length>o&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=h.bind(r);return o.listener=n,r.wrapFn=o,o}function d(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):y(o,o.length)}function g(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function y(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function v(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else{var u=c.length,l=y(c,u);for(n=0;n<u;++n)i(l[n],this,t)}return!0},a.prototype.addListener=function(e,t){return f(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return f(this,e,t,!0)},a.prototype.once=function(e,t){return u(t),this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,o,i,s;if(u(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){s=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},a.prototype.listenerCount=g,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e){e.exports=JSON.parse('{"name":"offload.js","version":"0.4.1","description":"","main":"dist/offload.js","scripts":{"build":"webpack --config ./webpack.dev.js","build:prod":"webpack --config ./webpack.prod.js","build:apps":"./script/build-script.js --all","dev":"npm-run-all --parallel watch:offload watch:server","lint":"npm run lint:prettier && npm run lint:eslint","lint:eslint":"eslint --fix \\"**/*.js\\"","lint:prettier":"prettier --write --ignore-unknown \\"**/*.js\\"","release":"release-it","castanets":"cp dist/offload-worker.js offload-worker/android/app/libs/","test":"karma start ./karma.conf.js","test:e2e":"cypress open","watch:offload":"nodemon --watch offload.js -e \'js,css\' --exec npm run build","watch:server":"nodemon --watch offload-server/src offload-server/src/app.js"},"author":"Hunseop Jeong <hs85.jeong@samsung.com>","dependencies":{"debug":"4.3.1","express":"4.17.1","filemanager-webpack-plugin":"2.0.5","lokijs":"1.5.11","qrcode":"1.4.4","serve-index":"1.9.1","socket.io":"2.3.0","socket.io-client":"2.0.2","ua-parser-js":"0.7.21","uuid":"8.2.0"},"devDependencies":{"@babel/core":"7.12.3","@babel/plugin-transform-modules-commonjs":"7.12.1","@babel/preset-env":"7.12.1","babel-eslint":"10.1.0","babel-loader":"8.1.0","commander":"6.2.0","css-loader":"3.5.3","cypress":"6.5.0","eslint":"7.30.0","eslint-config-google":"0.14.0","eslint-config-prettier":"8.3.0","filemanager-webpack-plugin":"2.0.5","fs-extra":"9.0.1","glob":"7.1.6","husky":"4.3.0","istanbul":"0.4.5","istanbul-instrumenter-loader":"3.0.1","karma":"5.2.3","karma-chrome-launcher":"3.1.0","karma-coverage":"2.0.3","karma-expect":"1.1.3","karma-mocha":"2.0.1","karma-sinon":"1.0.5","karma-webpack":"4.0.2","lint-staged":"10.3.0","mocha":"8.1.3","mustache-loader":"1.4.3","nodemon":"2.0.4","npm-run-all":"4.1.5","prettier":"2.3.2","release-it":"14.2.0","rimraf":"3.0.2","sinon":"9.2.0","to-string-loader":"1.1.6","url-loader":"4.1.1","webpack":"4.44.2","webpack-cli":"3.3.12","webpack-merge":"5.1.4"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"**/*.js":"npm run lint"},"repository":{"type":"git","url":"git@github.sec.samsung.net:HighPerformanceWeb/offload.js.git"},"release-it":{"npm":{"publish":false},"github":{"release":true,"assets":["dist/*"]},"hooks":{"before:init":["npm run lint"],"after:bump":["npm run build:prod","npm run castanets","npm run build:apps"]}}}')},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Worker=void 0;var r,o=n(27);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=new(((r=n(1))&&r.__esModule?r:{default:r}).default)("worker.js"),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._workerId=n,this._workerManager=t,this._clientId=this._workerManager.getId(),this._deviceName=(0,o.getDeviceName)(),this._peerConnection=null,this._dataChannel=null,this._isConnected=!1,this._runningJobs=new Map,this._pendingJobs=new Map,this._gumStream=null,this._gumCapabilities=null,this._gumSettings=null,this._gumConstraints=null,this._applyConstraintsResolve=null,this._applyConstraintsReject=null,this._nativeApplyConstraints=null,this._setUpPeerConnection()}var t,n,r;return t=e,(n=[{key:"_setUpPeerConnection",value:function(){var e=this;this._peerConnection=new RTCPeerConnection,this._peerConnection.onicecandidate=this._handleIceCandidateEvent.bind(this),this._peerConnection.ontrack=this._handleTrackEvent.bind(this),this._dataChannel=this._peerConnection.createDataChannel("offload"),this._dataChannel.onopen=this._handleDataChannelOpenEvent.bind(this),this._dataChannel.onclose=this._handleDataChannelCloseEvent.bind(this),this._dataChannel.onmessage=this._handleDataChannelMessageEvent.bind(this),this._peerConnection.createOffer().then((function(t){return e._peerConnection.setLocalDescription(t)})).then((function(){s.debug("send offer"),e._sendSignalMessage(e._peerConnection.localDescription)})).catch((function(e){return s.error("reason: "+e.toString())}))}},{key:"_handleIceCandidateEvent",value:function(e){e.candidate&&(s.debug("send candidate"),this._sendSignalMessage({type:"candidate",candidate:e.candidate}))}},{key:"_handleTrackEvent",value:function(e){var t=this;s.debug("got track");var n=e.streams[0];this._gumStream=n,n.peerConnection=this._peerConnection,n.getTracks().forEach((function(e){var n=e.stop;e.stop=function(){t._sendPeerMessage({type:"stopTrack",feature:"CAMERA",trackId:e.id}),n.call(e)}}));var r=null;n.getVideoTracks().length>0?(this._updateMediaStreamTrack(n.getVideoTracks()[0]),r=this._getRunningJob("CAMERA")):n.getAudioTracks().length>0&&(r=this._getRunningJob("MIC")),r&&(s.timeEnd("job complete"),r.successCallback(n))}},{key:"_updateMediaStreamTrack",value:function(e){var t=this;e.getCapabilities=function(){return t._gumCapabilities},e.getSettings=function(){return t._gumSettings},e.getConstraints=function(){return t._gumConstraints},this._nativeApplyConstraints=e.applyConstraints.bind(e),e.applyConstraints=function(e){if(t._hasAutoZoomConstraints(e)){var n=t._extractAutoZoomConstraints(e);t._nativeApplyConstraints(n)}return new Promise((function(n,r){t._applyConstraintsResolve=n,t._applyConstraintsReject=r,t._sendPeerMessage({type:"applyConstraints",feature:"CAMERA",constraints:e})}))}}},{key:"_handleDataChannelOpenEvent",value:function(){var e=this;s.debug("data channel opened"),this._isConnected=!0,this._pendingJobs.forEach((function(t){return e.startJob(t)})),this._pendingJobs.clear()}},{key:"_handleDataChannelCloseEvent",value:function(){s.debug("data channel closed"),this._isConnected=!1,this._dataChannel=null,this._closePeerConnection()}},{key:"_closePeerConnection",value:function(){this._peerConnection&&(this._peerConnection.onicecandidate=null,this._peerConnection.ontrack=null,this._peerConnection.close(),this._peerConnection=null)}},{key:"_handleDataChannelMessageEvent",value:function(e){var t=JSON.parse(e.data),n=this._getRunningJob(t.feature);if(null!==n)switch(t.type){case"data":"CAMERA"===t.feature?(this._gumCapabilities=t.data.capabilities,this._gumSettings=t.data.settings,this._gumConstraints=t.data.constraints):(s.timeEnd("job complete"),n.successCallback(t.data));break;case"error":n.errorCallback(new DOMException(t.error.message,t.error.name)),this.stopJob(t.feature);break;case"applyConstraints":"success"===t.result?(this._gumSettings=t.data.settings,this._gumConstraints=t.data.constraints,this._applyConstraintsResolve()):this._applyConstraintsReject(new DOMException(t.error.message,t.error.name));break;default:s.debug("unsupported message type",t.type)}else s.error("no job related to feature",t.feature)}},{key:"_getRunningJob",value:function(e){return this._runningJobs.has(e)?this._runningJobs.get(e):null}},{key:"_sendSignalMessage",value:function(e){this._workerManager.sendMessage(this._workerId,e)}},{key:"_sendPeerMessage",value:function(e){this._isConnected?this._dataChannel.send(JSON.stringify(e)):s.error("data channel is not connected")}},{key:"startJob",value:function(e){s.debug("startJob id:".concat(this._workerId," feature:").concat(e.feature)),this._isConnected?(this._sendPeerMessage({type:"start",feature:e.feature,arguments:e.arguments,resolver:e.resolver,clientId:this._clientId,deviceName:this._deviceName}),this._runningJobs.set(e.feature,e),e.resolver&&"function"==typeof e.resolver&&e.resolver()):this._pendingJobs.set(e.feature,e)}},{key:"stopJob",value:function(e){s.debug("stopJob",this._workerId,e),this._runningJobs.has(e)?(this._sendPeerMessage({type:"stop",feature:e}),this._runningJobs.delete(e)):this._pendingJobs.has(e)&&this._pendingJobs.delete(e)}},{key:"handleMessage",value:function(e){"offer"===e.type?this._handleOffer(e):"answer"===e.type?this._handleAnswer(e):"candidate"===e.type?this._handleCandidate(e.candidate):s.error("unhandled message type: ".concat(e.type))}},{key:"_handleOffer",value:function(e){var t=this;s.debug("got offer"),this._peerConnection.setRemoteDescription(e).then((function(){return t._peerConnection.createAnswer()})).then((function(e){return t._peerConnection.setLocalDescription(e)})).then((function(){s.debug("send answer"),t._sendSignalMessage(t._peerConnection.localDescription)})).catch((function(e){return s.error("reason: "+e.toString())}))}},{key:"_handleAnswer",value:function(e){s.debug("got answer"),this._peerConnection.setRemoteDescription(e).catch((function(e){return s.error("reason: "+e.toString())}))}},{key:"_handleCandidate",value:function(e){s.debug("got candidate"),this._peerConnection.addIceCandidate(e).catch((function(e){return s.error("reason: "+e.toString())}))}},{key:"_hasAutoZoomConstraints",value:function(e){for(var t in e)if(t.startsWith("tizenAiAutoZoom"))return!0;return!1}},{key:"_extractAutoZoomConstraints",value:function(e){var t={};for(var n in e)n.startsWith("tizenAiAutoZoom")&&(t[n]=e[n]);return t}}])&&i(t.prototype,n),r&&i(t,r),e}();t.Worker=a},function(e,t,n){var r=n(74);r.Template=n(75).Template,r.template=r.Template,e.exports=r},function(e,t,n){e.exports=n(66)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(67);window.localStorage.setItem("debug","offload:INFO*, offload:ERROR*");var o=new r.Offload;t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Offload=void 0;var r,o=n(26),i=n(72),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==u(e)&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(83)),a=n(61);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var f=new(((r=n(1))&&r.__esModule?r:{default:r}).default)("offload.js");f.info("offload.js version: ".concat(a.version));var h=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n={autoconnect:!0};"object"===u(t)&&Object.assign(n,t),this.resources=[],this._workerManager=new o.WorkerManager,this._popup=new i.DevicePopup(this._workerManager),n.autoconnect&&this._workerManager.connect();for(var r=0,a=Object.values(s);r<a.length;r++){var c=a[r];this.resources.push(new c(this._workerManager,this._popup))}}var t,n,r;return t=e,(n=[{key:"version",get:function(){return a.version}},{key:"connect",value:function(e){return this._workerManager.connect(e)}},{key:"on",value:function(e,t){switch(e){case"showDevicePopup":case"hideDevicePopup":this._popup.on(e,t);break;default:f.error("unhandled event name: ".concat(e))}}},{key:"off",value:function(e,t){switch(e){case"showDevicePopup":case"hideDevicePopup":this._popup.off(e,t);break;default:f.error("unhandled event name: ".concat(e))}}}])&&l(t.prototype,n),r&&l(t,r),e}();t.Offload=h},function(e,t,n){"use strict";var r;function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.Resource=void 0;var i=new(((r=n(1))&&r.__esModule?r:{default:r}).default)("resource.js"),s=function(){function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.constructor===e)throw new Error("Resource is abstract class");this._workerManager=t,this._popup=n,this._worker=null,this._alwaysConnect=null,this.injectOffloadAPI()}var t,n,r;return t=e,(n=[{key:"injectOffloadAPI",value:function(){throw new Error("Need to inject Offload API")}},{key:"startJob",value:function(e){var t=this;if(this._alwaysConnect)this.startJobImpl(this._alwaysConnect,e);else{var n=e.feature,r=e.localGumIsCallable;this.showResourcePopup(n,r).then((function(n){t._alwaysConnect=n.always?n.workerId:null,t.startJobImpl(n.workerId,e)})).catch((function(t){i.error(t),e.errorCallback&&e.errorCallback(t)}))}}},{key:"startJobImpl",value:function(e,t){var n=this;"localdevice"!==this._alwaysConnect&&"localdevice"!==e?this.requestService(e).then((function(){n._worker=n._workerManager.getOrCreateWorker(e),i.time("job complete"),n._worker.startJob(t)})).catch((function(e){i.error(e),t.errorCallback&&t.errorCallback(e)})):t.nativeGetUserMedia(t.arguments[0]).then(t.successCallback).catch(t.errorCallback)}},{key:"startJobWithExistingWorker",value:function(e){this._worker&&this._worker.startJob(e)}},{key:"stopJob",value:function(e){this._worker&&(this._worker.stopJob(e),this._worker=null)}},{key:"showResourcePopup",value:function(e,t){var n=this;return new Promise((function(r,o){n._popup.show({feature:e,successCallback:r,errorCallback:o,localGumIsCallable:t})}))}},{key:"requestService",value:function(e){var t=this;return new Promise((function(n,r){t._workerManager.requestService(e,{successCallback:n,errorCallback:r})}))}}])&&o(t.prototype,n),r&&o(t,r),e}();t.Resource=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerManager=void 0;var r,o=n(63),i=n(70),s=n(71),a=n(27);function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var l=new(((r=n(1))&&r.__esModule?r:{default:r}).default)("worker-manager.js"),f="object"===("undefined"==typeof tizen?"undefined":u(tizen)),h=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._workerInfos=new Map,this._activeWorkers=new Map,this._capabilities=new Map,this._socket=null,this._id=(0,a.getClientId)(),this._qrCode=null,this._callbacks={qrcode:[],capability:[]},this.signalingStatus=!1,this}var t,n,r;return t=e,(n=[{key:"connect",value:function(e){var t=e||this._getServerUrl();return null===t?(l.error("No valid server URL found."),null):(t.endsWith("/offload-js")||(t+="/offload-js"),null!==this._socket&&this._socket.close(),l.time("socket connected"),this._socket=this._createSocket(),this._socket.connect(t),this._socket.on("greeting",this._initFromGreeting.bind(this)),this._socket.on("worker",this._handleWorkerEvent.bind(this)),this._socket.on("capabilities",this._updateCapabilities.bind(this)),this._socket.on("message",this._handleMessage.bind(this)),this._socket.on("connect",this._socketConnected.bind(this)),this._socket.on("disconnect",this._socketDisconnected.bind(this)),t)}},{key:"_createSocket",value:function(){return"undefined"!=typeof tizen&&tizen.messageport?new s.SocketTizen:new i.SocketWeb}},{key:"_getServerUrl",value:function(){return f?(0,a.getServerUrlFromLocalhost)():(0,a.getServerUrlFromLocation)()}},{key:"_initFromGreeting",value:function(e){for(l.debug("greeting: "+JSON.stringify(e)),this.signalingStatus=!0,this._qrCode=e.qrCode,this._workerInfos=new Map(e.workers);this._callbacks.qrcode.length;)this._callbacks.qrcode.pop().call(this,this._qrCode)}},{key:"_updateCapabilities",value:function(e){for(this._capabilities=new Map(e);this._callbacks.capability.length;)this._callbacks.capability.pop().call(this,this._capabilities)}},{key:"_handleWorkerEvent",value:function(e){if("join"===e.event){if(l.debug("join: '".concat(e.workerId,"' - '").concat(e.name,"', '").concat(e.features,"', '").concat(e.mediaDeviceInfos,"'")),this._workerInfos.set(e.workerId,{socketId:e.socketId,name:e.name,features:e.features,mediaDeviceInfos:e.mediaDeviceInfos,compute_tasks:0}),this._capabilities.has(e.workerId)){var t=this._capabilities.get(e.workerId);t.options&&(l.debug("resolve successCallback"),t.options.successCallback(),t.options=null)}}else"bye"===e.event&&(l.debug("bye: '".concat(e.workerId,"'")),this._workerInfos.delete(e.workerId),this._activeWorkers.delete(e.workerId))}},{key:"_handleMessage",value:function(e){this._activeWorkers.has(e.from)&&this._activeWorkers.get(e.from).handleMessage(e.message)}},{key:"_socketConnected",value:function(){l.debug("".concat(this._socket.id," connected")),l.timeEnd("socket connected"),this._socket&&this._socket.emit("create")}},{key:"_socketDisconnected",value:function(){l.debug("".concat(this._socket.id," disconnected")),this.signalingStatus=!1}},{key:"getOrCreateWorker",value:function(e){if(this._activeWorkers.has(e))return this._activeWorkers.get(e);var t=new o.Worker(this,e);return this._activeWorkers.set(e,t),t}},{key:"getWorkerInfos",value:function(){return this._workerInfos}},{key:"getSupportedWorkers",value:function(e){var t=this,n=[];return this._capabilities.forEach((function(t,r,o){t.features.indexOf(e)>=0&&n.push({id:r,name:t.name})})),this._workerInfos.forEach((function(r,o,i){!t._capabilities.has(o)&&r.features.indexOf(e)>=0&&n.push({id:o,name:r.name})})),n}},{key:"getId",value:function(){return this._id}},{key:"requestService",value:function(e,t){if(this._workerInfos.has(e))return l.debug("Already existed in workInfos. Resolve successCallback directly"),void t.successCallback();this._capabilities.get(e).options=t,this._socket.emit("requestService",e)}},{key:"updateCapability",value:function(e){this._socket.emit("getcapabilities"),this._callbacks.capability.push(e)}},{key:"sendMessage",value:function(e,t){this._socket?this._socket.emit("message",{to:e,from:this._socket.id,message:t}):l.error("socket is null")}},{key:"getQrCode",value:function(){var e=this;return new Promise((function(t){e._qrCode?t(e._qrCode):e._callbacks.qrcode.push(t)}))}}])&&c(t.prototype,n),r&&c(t,r),e}();t.WorkerManager=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketWeb=void 0;var r=o(n(32));function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=new(o(n(1)).default)("socket-web.js"),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),s.debug("SocketWeb created"),this._serverUrl=null,this._socket=null}var t,n,o;return t=e,(n=[{key:"id",get:function(){return this._socket.id}},{key:"on",value:function(e,t){s.debug("on: ".concat(e)),this._socket.on(e,t)}},{key:"emit",value:function(e,t){s.debug("emit: ".concat(e)),this._socket.emit(e,t)}},{key:"connect",value:function(e){s.debug("connect url:".concat(e)),this._serverUrl=e,this._socket=(0,r.default)(e,{transports:["websocket","polling"]})}},{key:"close",value:function(){s.debug("close"),this._socket.close()}}])&&i(t.prototype,n),o&&i(t,o),e}();t.SocketWeb=a},function(e,t,n){"use strict";var r;function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.SocketTizen=void 0;var i=new(((r=n(1))&&r.__esModule?r:{default:r}).default)("socket-tizen.js"),s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i.debug("SocketTizen created"),this._portName="offload",this._localPort=null,this._remotePort=null,this._eventHandlers={};var t=tizen.application.getCurrentApplication();this._appId=t.appInfo.id}var t,n,r;return t=e,(n=[{key:"id",get:function(){return this._appId}},{key:"on",value:function(e,t){i.debug("on event:".concat(e)),this._eventHandlers[e]=t.bind(null)}},{key:"emit",value:function(e,t){i.debug("emit: ".concat(e));var n=t||{};try{this._remotePort.sendMessage([{key:e,value:JSON.stringify({id:this._appId,data:n})}],this._localPort)}catch(e){i.error(e)}}},{key:"connect",value:function(){var e=this;i.debug("connect");try{this._localPort=tizen.messageport.requestLocalMessagePort(this._portName),this._localPort.addMessagePortListener((function(t){if(0!==t.length){var n=t[0],r=n.key,o=e._eventHandlers[r];o?o(JSON.parse(n.value)):i.error("Not found ".concat(r," handler"))}else i.error("Not found message")})),this._remotePort=tizen.messageport.requestRemoteMessagePort("org.tizen.chromium-efl.wrt-service",this._portName),this.emit("connect")}catch(e){i.error("Message port connection failed: "+e)}}},{key:"close",value:function(){i.debug("close")}}])&&o(t.prototype,n),r&&o(t,r),e}();t.SocketTizen=s},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.DevicePopup=void 0;var o=n(60),i=h(n(1)),s=h(n(73)),a=h(n(76)),c=h(n(77)),u=h(n(80)),l=h(n(81)),f=h(n(82));function h(e){return e&&e.__esModule?e:{default:e}}function p(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var w=new i.default("device-popup.js"),A={BACKSPACE:8,ENTER:13,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,XF86_BACK:10009},C="__oFfLoAdPoPuP210426__",k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(i,e);var t,n,r,o=v(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this))._workerManager=e,t._updateIntervalID=0,t._signalingIntervalID=0,t.createElement(),t.addQrImage(),t}return t=i,(n=[{key:"createElement",value:function(){var e=this;this._root=document.createElement("div"),this._shadow=this._root.attachShadow({mode:"open"});var t=document.createElement("style");t.innerText=c.default.toString(),this._shadow.appendChild(t),this._element=document.createElement("div"),this._element.classList.add("modal"),this._element.id=C,this._element.classList.add("overlay"),this._element.setAttribute("tabindex","-1"),this._element.setAttribute("role","dialog"),this._shadow.appendChild(this._element),this._element.innerHTML=(0,a.default)({SIGNAL_IMG:u.default,ENABLE_IMG:l.default,alwaysUseSameDevice:!0}),this._keydownEventListener=function(t){var n=!1;switch(t.which){case A.LEFT:case A.UP:case A.RIGHT:case A.DOWN:e.moveElement(t.which),n=!0;break;case A.BACKSPACE:case A.XF86_BACK:e._element.querySelector("#closeBtn").click(),n=!0;break;case A.ENTER:case A.SPACE:n=e.selectElement()}n?(t.preventDefault(),t.stopPropagation()):w.debug("Not handled keydown. ".concat(t.which," ").concat(t.code," ").concat(t.currentTarget.id))},this._keyupEventListener=function(e){Object.keys(A).some((function(t){return e.which===A[t]&&(e.preventDefault(),e.stopPropagation(),!0)}))||w.debug("Not handled keyup. ".concat(e.which," ").concat(e.code," ").concat(e.currentTarget.id))},this._focusInEventListener=function(t){e.setFocusBack()},this._focusOutEventListener=function(t){setTimeout((function(){e.setFocusBack()}),100)},this._element.querySelector("#refreshBtn").addEventListener("click",(function(t){return e.startUpdateInterval()})),this._element.querySelector("#closeBtn").addEventListener("click",(function(t){"function"==typeof e._options.errorCallback&&e._options.errorCallback(new DOMException("Requested device not found")),e.hide()})),this._element.querySelector("#connectBtn").addEventListener("click",(function(t){var n=e._element.querySelector("input[type=radio]:checked");n&&("function"==typeof e._options.successCallback&&e._options.successCallback({workerId:n.value,always:e._element.querySelector("#alwaysCb").checked}),e.hide())}))}},{key:"addQrImage",value:function(){var e=this;this._workerManager.getQrCode().then((function(t){var n=e._element.querySelector("#qrCodeImage");n.src=t,n.style.display="block";var r=document.createElement("span"),o=document.createTextNode("Scan QR code for connecting");r.appendChild(o),n.parentNode.appendChild(r)}))}},{key:"show",value:function(e){this._options=e,document.getElementById(C)||document.body.appendChild(this._root),this._element.style.display="block",this._element.addEventListener("keydown",this._keydownEventListener),this._element.addEventListener("keyup",this._keyupEventListener),document.addEventListener("focusin",this._focusInEventListener),document.addEventListener("focusout",this._focusOutEventListener);var t=this._element.querySelector("input[type=radio]:checked");t?t.focus():this._element.querySelector("#refreshBtn").focus(),this.startUpdateInterval(),this.startSignalingStatusInterval(),this.emit("showDevicePopup",this)}},{key:"hide",value:function(){this.clearUpdateInterval(),this.clearSignalingStatusInterval(),document.body.removeChild(this._root),this._element.style.display="none",this._element.removeEventListener("keydown",this._keydownEventListener),this._element.removeEventListener("keyup",this._keyupEventListener),document.removeEventListener("focusin",this._focusInEventListener),document.removeEventListener("focusout",this._focusOutEventListener),this.emit("hideDevicePopup",this)}},{key:"setFocus",value:function(e){var t=Array.from(this._element.querySelectorAll("[tabindex]")).filter((function(e){return null!==e.offsetParent}));return t.length?(e>=t.length?e=0:e<0&&(e=t.length-1),t[e].focus(),w.debug("setFocus() >> [".concat(e,"] ").concat(t[e].id)),this._lastFocusedElm=t[e],t[e]):null}},{key:"setFocusBack",value:function(){this._element.offsetParent&&this._lastFocusedElm!==document.activeElement&&(Array.from(this._element.querySelectorAll("[tabindex]")).some((function(e){return e===document.activeElement}))||(this._lastFocusedElm&&this._lastFocusedElm.closest("#".concat(C))&&null!==this._lastFocusedElm.offsetParent?this._lastFocusedElm.focus():this._lastFocusedElm=this.setFocus(0),w.debug("[focus] >> focus back to ".concat(this._lastFocusedElm.id," ").concat(null!==this._lastFocusedElm.offsetParent))))}},{key:"moveElement",value:function(e){for(var t=Array.from(this._element.querySelectorAll("[tabindex]")).filter((function(e){return null!==e.offsetParent})),n=0,r=0;r<t.length;r++)this._shadow.activeElement.id===t[r].id&&(n=r);switch(e){case A.LEFT:case A.UP:n--;break;case A.RIGHT:case A.DOWN:n++}this.setFocus(n)}},{key:"selectElement",value:function(){if(!this._shadow.activeElement)return!1;for(var e=Array.from(this._element.querySelectorAll("[tabindex]")).filter((function(e){return null!==e.offsetParent})),t=0;t<e.length;t++)if(this._shadow.activeElement.id===e[t].id)return e[t].click(),"form-device-input"===e[t].className&&this._element.querySelector("#connectBtn").click(),!0;return w.debug("selectElement() : Not Handled "+this._shadow.activeElement.id),!1}},{key:"updateDeviceList",value:function(e){var t=this,n={id:"localdevice",name:"Local Device"};!this.isDeviceListUpdated&&this._options&&this._options.localGumIsCallable&&this._showDeviceList([n]),this._workerManager.updateCapability((function(){t.isDeviceListUpdated=!0;var r=t._workerManager.getSupportedWorkers(t._options.feature);t._options.localGumIsCallable&&r.unshift(n),t._showDeviceList(r),e&&e()&&0===r.length&&!t._options.localGumIsCallable&&(t._element.querySelector("#deviceList").innerHTML="<p>None</p>")}))}},{key:"_showDeviceList",value:function(e){var t,n=this._element.querySelector("#deviceList"),r=n.querySelectorAll(".form-device-input"),o=new Set,i=r.length,a=p(r);try{var c=function(){var n=t.value;-1===e.findIndex((function(e){return e.id===n.value}))?(n.parentNode.remove(),i--):o.add(n.id)};for(a.s();!(t=a.n()).done;)c()}catch(e){a.e(e)}finally{a.f()}0===r.length&&(n.innerHTML="");for(var u=0;u<e.length;u++)if(!o.has(e[u].id)){var l=document.createRange().createContextualFragment((0,s.default)({id:e[u].id,name:e[u].name,checked:0===i&&0===u}));n.appendChild(l),i++}this._element.querySelector("#alwaysForm").style.display=i>0?"block":"none",r.length>0!=i>0&&this.setFocus(0)}},{key:"updateSignalingStatus",value:function(){var e=this._element.querySelector("#signalingStatus");e&&this._workerManager.signalingStatus?e.src=l.default:e.src=f.default}},{key:"clearUpdateInterval",value:function(){this._updateIntervalID&&(w.debug("Capability Interval Ended."),clearInterval(this._updateIntervalID),this._updateIntervalID=0)}},{key:"startUpdateInterval",value:function(){var e=this;this.clearUpdateInterval(),w.debug("Capability Interval Starting...");var t=0;this.isDeviceListUpdated=!1,this._updateIntervalID=setInterval((function(){e.updateDeviceList((function(){return(t+=1e3)>=1e4&&(e.clearUpdateInterval(),!0)}))}),1e3),this.updateDeviceList()}},{key:"clearSignalingStatusInterval",value:function(){this._signalingIntervalID&&(clearInterval(this._signalingIntervalID),this._signalingIntervalID=0)}},{key:"startSignalingStatusInterval",value:function(){this.clearSignalingStatusInterval(),this._signalingIntervalID=setInterval(this.updateSignalingStatus.bind(this),1e3)}}])&&g(t.prototype,n),r&&g(t,r),i}(o.EventEmitter);t.DevicePopup=k},function(e,t,n){var r=n(64);e.exports=function(){var e=new r.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<div class="form-check">'),r.b("\n"+n),r.b("  <input"),r.b("\n"+n),r.b('    class="form-device-input"'),r.b("\n"+n),r.b('    type="radio"'),r.b("\n"+n),r.b('    name="radios"'),r.b("\n"+n),r.b('    id="'),r.b(r.v(r.f("id",e,t,0))),r.b('"'),r.b("\n"+n),r.b('    value="'),r.b(r.v(r.f("id",e,t,0))),r.b('"'),r.b("\n"+n),r.b("    tabindex=0"),r.b("\n"+n),r.s(r.f("checked",e,t,1),e,t,0,165,182,"{{ }}")&&(r.rs(e,t,(function(e,t,r){r.b("    checked"),r.b("\n"+n)})),e.pop()),r.b("  >"),r.b("\n"+n),r.b('  <label class="form-check-label" for="'),r.b(r.v(r.f("id",e,t,0))),r.b('">'),r.b("\n"+n),r.b("    "),r.b(r.v(r.f("name",e,t,0))),r.b("\n"+n),r.b("  </label>"),r.b("\n"+n),r.b("</div>"),r.b("\n"),r.fl()},partials:{},subs:{}},'<div class="form-check">\n  <input\n    class="form-device-input"\n    type="radio"\n    name="radios"\n    id="{{id}}"\n    value="{{id}}"\n    tabindex=0\n    {{#checked}}\n    checked\n    {{/checked}}\n  >\n  <label class="form-check-label" for="{{id}}">\n    {{name}}\n  </label>\n</div>\n',r);return e.render.apply(e,arguments)}},function(e,t,n){!function(e){var t=/\S/,n=/\"/g,r=/\n/g,o=/\r/g,i=/\\/g,s=/\u2028/,a=/\u2029/;function c(e){"}"===e.n.substr(e.n.length-1)&&(e.n=e.n.substring(0,e.n.length-1))}function u(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function l(e,t,n){if(t.charAt(n)!=e.charAt(0))return!1;for(var r=1,o=e.length;r<o;r++)if(t.charAt(n+r)!=e.charAt(r))return!1;return!0}e.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(n,r){var o=n.length,i=0,s=null,a=null,f="",h=[],p=!1,d=0,g=0,y="{{",v="}}";function m(){f.length>0&&(h.push({tag:"_t",text:new String(f)}),f="")}function b(n,r){if(m(),n&&function(){for(var n=!0,r=g;r<h.length;r++)if(!(n=e.tags[h[r].tag]<e.tags._v||"_t"==h[r].tag&&null===h[r].text.match(t)))return!1;return n}())for(var o,i=g;i<h.length;i++)h[i].text&&((o=h[i+1])&&">"==o.tag&&(o.indent=h[i].text.toString()),h.splice(i,1));else r||h.push({tag:"\n"});p=!1,g=h.length}function w(e,t){var n="="+v,r=e.indexOf(n,t),o=u(e.substring(e.indexOf("=",t)+1,r)).split(" ");return y=o[0],v=o[o.length-1],r+n.length-1}for(r&&(r=r.split(" "),y=r[0],v=r[1]),d=0;d<o;d++)0==i?l(y,n,d)?(--d,m(),i=1):"\n"==n.charAt(d)?b(p):f+=n.charAt(d):1==i?(d+=y.length-1,"="==(s=(a=e.tags[n.charAt(d+1)])?n.charAt(d+1):"_v")?(d=w(n,d),i=0):(a&&d++,i=2),p=d):l(v,n,d)?(h.push({tag:s,n:u(f),otag:y,ctag:v,i:"/"==s?p-y.length:d+v.length}),f="",d+=v.length-1,i=0,"{"==s&&("}}"==v?d++:c(h[h.length-1]))):f+=n.charAt(d);return b(p,!0),h};var f={_t:!0,"\n":!0,$:!0,"/":!0};function h(e,t){for(var n=0,r=t.length;n<r;n++)if(t[n].o==e.n)return e.tag="#",!0}function p(e,t,n){for(var r=0,o=n.length;r<o;r++)if(n[r].c==e&&n[r].o==t)return!0}function d(e){var t=[];for(var n in e.partials)t.push('"'+y(n)+'":{name:"'+y(e.partials[n].name)+'", '+d(e.partials[n])+"}");return"partials: {"+t.join(",")+"}, subs: "+function(e){var t=[];for(var n in e)t.push('"'+y(n)+'": function(c,p,t,i) {'+e[n]+"}");return"{ "+t.join(",")+" }"}(e.subs)}e.stringify=function(t,n,r){return"{code: function (c,p,i) { "+e.wrapMain(t.code)+" },"+d(t)+"}"};var g=0;function y(e){return e.replace(i,"\\\\").replace(n,'\\"').replace(r,"\\n").replace(o,"\\r").replace(s,"\\u2028").replace(a,"\\u2029")}function v(e){return~e.indexOf(".")?"d":"f"}function m(e,t){var n="<"+(t.prefix||"")+e.n+g++;return t.partials[n]={name:e.n,partials:{}},t.code+='t.b(t.rp("'+y(n)+'",c,p,"'+(e.indent||"")+'"));',n}function b(e,t){t.code+="t.b(t.t(t."+v(e.n)+'("'+y(e.n)+'",c,p,0)));'}function w(e){return"t.b("+e+");"}e.generate=function(t,n,r){g=0;var o={code:"",subs:{},partials:{}};return e.walk(t,o),r.asString?this.stringify(o,n,r):this.makeTemplate(o,n,r)},e.wrapMain=function(e){return'var t=this;t.b(i=i||"");'+e+"return t.fl();"},e.template=e.Template,e.makeTemplate=function(e,t,n){var r=this.makePartials(e);return r.code=new Function("c","p","i",this.wrapMain(e.code)),new this.template(r,t,this,n)},e.makePartials=function(e){var t,n={subs:{},partials:e.partials,name:e.name};for(t in n.partials)n.partials[t]=this.makePartials(n.partials[t]);for(t in e.subs)n.subs[t]=new Function("c","p","t","i",e.subs[t]);return n},e.codegen={"#":function(t,n){n.code+="if(t.s(t."+v(t.n)+'("'+y(t.n)+'",c,p,1),c,p,0,'+t.i+","+t.end+',"'+t.otag+" "+t.ctag+'")){t.rs(c,p,function(c,p,t){',e.walk(t.nodes,n),n.code+="});c.pop();}"},"^":function(t,n){n.code+="if(!t.s(t."+v(t.n)+'("'+y(t.n)+'",c,p,1),c,p,1,0,0,"")){',e.walk(t.nodes,n),n.code+="};"},">":m,"<":function(t,n){var r={partials:{},code:"",subs:{},inPartial:!0};e.walk(t.nodes,r);var o=n.partials[m(t,n)];o.subs=r.subs,o.partials=r.partials},$:function(t,n){var r={subs:{},code:"",partials:n.partials,prefix:t.n};e.walk(t.nodes,r),n.subs[t.n]=r.code,n.inPartial||(n.code+='t.sub("'+y(t.n)+'",c,p,i);')},"\n":function(e,t){t.code+=w('"\\n"'+(e.last?"":" + i"))},_v:function(e,t){t.code+="t.b(t.v(t."+v(e.n)+'("'+y(e.n)+'",c,p,0)));'},_t:function(e,t){t.code+=w('"'+y(e.text)+'"')},"{":b,"&":b},e.walk=function(t,n){for(var r,o=0,i=t.length;o<i;o++)(r=e.codegen[t[o].tag])&&r(t[o],n);return n},e.parse=function(t,n,r){return function t(n,r,o,i){var s,a=[],c=null,u=null;for(s=o[o.length-1];n.length>0;){if(u=n.shift(),s&&"<"==s.tag&&!(u.tag in f))throw new Error("Illegal content in < super tag.");if(e.tags[u.tag]<=e.tags.$||h(u,i))o.push(u),u.nodes=t(n,u.tag,o,i);else{if("/"==u.tag){if(0===o.length)throw new Error("Closing tag without opener: /"+u.n);if(c=o.pop(),u.n!=c.n&&!p(u.n,c.n,i))throw new Error("Nesting error: "+c.n+" vs. "+u.n);return c.end=u.i,a}"\n"==u.tag&&(u.last=0==n.length||"\n"==n[0].tag)}a.push(u)}if(o.length>0)throw new Error("missing closing tag: "+o.pop().n);return a}(t,0,[],(r=r||{}).sectionTags||[])},e.cache={},e.cacheKey=function(e,t){return[e,!!t.asString,!!t.disableLambda,t.delimiters,!!t.modelGet].join("||")},e.compile=function(t,n){n=n||{};var r=e.cacheKey(t,n),o=this.cache[r];if(o){var i=o.partials;for(var s in i)delete i[s].instance;return o}return o=this.generate(this.parse(this.scan(t,n.delimiters),t,n),t,n),this.cache[r]=o}}(t)},function(e,t,n){!function(e){function t(e,t,n){var r;return t&&"object"==typeof t&&(void 0!==t[e]?r=t[e]:n&&t.get&&"function"==typeof t.get&&(r=t.get(e))),r}e.Template=function(e,t,n,r){e=e||{},this.r=e.code||this.r,this.c=n,this.options=r||{},this.text=t||"",this.partials=e.partials||{},this.subs=e.subs||{},this.buf=""},e.Template.prototype={r:function(e,t,n){return""},v:function(e){return e=c(e),a.test(e)?e.replace(n,"&amp;").replace(r,"&lt;").replace(o,"&gt;").replace(i,"&#39;").replace(s,"&quot;"):e},t:c,render:function(e,t,n){return this.ri([e],t||{},n)},ri:function(e,t,n){return this.r(e,t,n)},ep:function(e,t){var n=this.partials[e],r=t[n.name];if(n.instance&&n.base==r)return n.instance;if("string"==typeof r){if(!this.c)throw new Error("No compiler available.");r=this.c.compile(r,this.options)}if(!r)return null;if(this.partials[e].base=r,n.subs){for(key in t.stackText||(t.stackText={}),n.subs)t.stackText[key]||(t.stackText[key]=void 0!==this.activeSub&&t.stackText[this.activeSub]?t.stackText[this.activeSub]:this.text);r=function(e,t,n,r,o,i){function s(){}function a(){}var c;s.prototype=e,a.prototype=e.subs;var u=new s;for(c in u.subs=new a,u.subsText={},u.buf="",r=r||{},u.stackSubs=r,u.subsText=i,t)r[c]||(r[c]=t[c]);for(c in r)u.subs[c]=r[c];for(c in o=o||{},u.stackPartials=o,n)o[c]||(o[c]=n[c]);for(c in o)u.partials[c]=o[c];return u}(r,n.subs,n.partials,this.stackSubs,this.stackPartials,t.stackText)}return this.partials[e].instance=r,r},rp:function(e,t,n,r){var o=this.ep(e,n);return o?o.ri(t,n,r):""},rs:function(e,t,n){var r=e[e.length-1];if(u(r))for(var o=0;o<r.length;o++)e.push(r[o]),n(e,t,this),e.pop();else n(e,t,this)},s:function(e,t,n,r,o,i,s){var a;return(!u(e)||0!==e.length)&&("function"==typeof e&&(e=this.ms(e,t,n,r,o,i,s)),a=!!e,!r&&a&&t&&t.push("object"==typeof e?e:t[t.length-1]),a)},d:function(e,n,r,o){var i,s=e.split("."),a=this.f(s[0],n,r,o),c=this.options.modelGet,l=null;if("."===e&&u(n[n.length-2]))a=n[n.length-1];else for(var f=1;f<s.length;f++)void 0!==(i=t(s[f],a,c))?(l=a,a=i):a="";return!(o&&!a)&&(o||"function"!=typeof a||(n.push(l),a=this.mv(a,n,r),n.pop()),a)},f:function(e,n,r,o){for(var i=!1,s=!1,a=this.options.modelGet,c=n.length-1;c>=0;c--)if(void 0!==(i=t(e,n[c],a))){s=!0;break}return s?(o||"function"!=typeof i||(i=this.mv(i,n,r)),i):!o&&""},ls:function(e,t,n,r,o){var i=this.options.delimiters;return this.options.delimiters=o,this.b(this.ct(c(e.call(t,r)),t,n)),this.options.delimiters=i,!1},ct:function(e,t,n){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(e,this.options).render(t,n)},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ms:function(e,t,n,r,o,i,s){var a,c=t[t.length-1],u=e.call(c);return"function"==typeof u?!!r||(a=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(u,c,n,a.substring(o,i),s)):u},mv:function(e,t,n){var r=t[t.length-1],o=e.call(r);return"function"==typeof o?this.ct(c(o.call(r)),r,n):o},sub:function(e,t,n,r){var o=this.subs[e];o&&(this.activeSub=e,o(t,n,this,r),this.activeSub=!1)}};var n=/&/g,r=/</g,o=/>/g,i=/\'/g,s=/\"/g,a=/[&<>\"\']/;function c(e){return String(null==e?"":e)}var u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}(t)},function(e,t,n){var r=n(64);e.exports=function(){var e=new r.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<div class="modal-dialog" role="document">'),r.b("\n"+n),r.b('  <div class="modal-content">'),r.b("\n"+n),r.b('    <div class="modal-header">'),r.b("\n"+n),r.b('      <span class="modal-title mr-auto">Available devices</span>'),r.b("\n"+n),r.b('      <img width="24" src="'),r.b(r.v(r.f("SIGNAL_IMG",e,t,0))),r.b('" />'),r.b("\n"+n),r.b('      <img width="24" id="signalingStatus" src="'),r.b(r.v(r.f("ENABLE_IMG",e,t,0))),r.b('" />'),r.b("\n"+n),r.b("    </div>"),r.b("\n"+n),r.b('    <div class="modal-body">'),r.b("\n"+n),r.b('      <div class="row-container">'),r.b("\n"+n),r.b('        <div id="deviceList">'),r.b("\n"+n),r.b("        </div>"),r.b("\n"+n),r.b('        <div class="vertical-align-center">'),r.b("\n"+n),r.b("          <image"),r.b("\n"+n),r.b('            id="qrCodeImage"'),r.b("\n"+n),r.b('            width="132"'),r.b("\n"+n),r.b('            height="132"'),r.b("\n"+n),r.b('            style="display:none;"'),r.b("\n"+n),r.b("          />"),r.b("\n"+n),r.b("        </div>"),r.b("\n"+n),r.b("      </div>"),r.b("\n"+n),r.b('      <div class="form-check" id="alwaysForm">'),r.b("\n"+n),r.b("        <input"),r.b("\n"+n),r.b('          class="form-check-input"'),r.b("\n"+n),r.b('          type="checkbox"'),r.b("\n"+n),r.b('          id="alwaysCb"'),r.b("\n"+n),r.b("          tabindex=0"),r.b("\n"+n),r.s(r.f("alwaysUseSameDevice",e,t,1),e,t,0,817,846,"{{ }}")&&(r.rs(e,t,(function(e,t,r){r.b("          checked"),r.b("\n"+n)})),e.pop()),r.b("        >"),r.b("\n"+n),r.b('        <label class="form-check-label" for="alwaysCb">'),r.b("\n"+n),r.b("          Always connect to selected device"),r.b("\n"+n),r.b("        </label>"),r.b("\n"+n),r.b("      </div>"),r.b("\n"+n),r.b("    </div>"),r.b("\n"+n),r.b('    <div class="modal-footer">'),r.b("\n"+n),r.b('      <button type="button" class="btn btn-success mr-auto" id="refreshBtn" tabindex=0>Scan</button>'),r.b("\n"+n),r.b('      <button type="button" class="btn btn-primary" id="connectBtn" tabindex=0>Connect</button>'),r.b("\n"+n),r.b('      <button type="button" class="btn btn-secondary" id="closeBtn" tabindex=0>Close</button>'),r.b("\n"+n),r.b("    </div>"),r.b("\n"+n),r.b("  </div>"),r.b("\n"+n),r.b("</div>"),r.b("\n"),r.fl()},partials:{},subs:{}},'<div class="modal-dialog" role="document">\n  <div class="modal-content">\n    <div class="modal-header">\n      <span class="modal-title mr-auto">Available devices</span>\n      <img width="24" src="{{SIGNAL_IMG}}" />\n      <img width="24" id="signalingStatus" src="{{ENABLE_IMG}}" />\n    </div>\n    <div class="modal-body">\n      <div class="row-container">\n        <div id="deviceList">\n        </div>\n        <div class="vertical-align-center">\n          <image\n            id="qrCodeImage"\n            width="132"\n            height="132"\n            style="display:none;"\n          />\n        </div>\n      </div>\n      <div class="form-check" id="alwaysForm">\n        <input\n          class="form-check-input"\n          type="checkbox"\n          id="alwaysCb"\n          tabindex=0\n          {{#alwaysUseSameDevice}}\n          checked\n          {{/alwaysUseSameDevice}}\n        >\n        <label class="form-check-label" for="alwaysCb">\n          Always connect to selected device\n        </label>\n      </div>\n    </div>\n    <div class="modal-footer">\n      <button type="button" class="btn btn-success mr-auto" id="refreshBtn" tabindex=0>Scan</button>\n      <button type="button" class="btn btn-primary" id="connectBtn" tabindex=0>Connect</button>\n      <button type="button" class="btn btn-secondary" id="closeBtn" tabindex=0>Close</button>\n    </div>\n  </div>\n</div>\n',r);return e.render.apply(e,arguments)}},function(e,t,n){var r=n(78);e.exports="string"==typeof r?r:r.toString()},function(e,t,n){(t=n(79)(!1)).push([e.i,":host {\n  all: initial;\n}\n\n.modal {\n  position: fixed;\n  top: 0;\n  left: 0;\n  z-index: 1000;\n  width: 100%;\n  height: 100%;\n  outline: 0;\n  display: none;\n}\n\n.overlay {\n  position: fixed;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  background: rgba(0, 0, 0, 0.7);\n  visibility: visible;\n  opacity: 1;\n}\n\n.modal.show {\n  background: rgba(0, 0, 0, 0.7);\n  opacity: 1;\n  display: block;\n}\n\n.modal-open {\n  overflow: hidden;\n}\n\n.modal-open .modal {\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n\n.modal-dialog {\n  position: relative;\n  width: auto;\n}\n\n@media (min-width: 576px) {\n  .modal-dialog {\n    max-width: 500px;\n    margin: 10px auto;\n  }\n}\n\n.modal-content {\n  position: relative;\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  pointer-events: auto;\n  background-color: #fff;\n  background-clip: padding-box;\n  border: 1px solid rgba(0, 0, 0, 0.2);\n  border-radius: 10px;\n  color: #000;\n  outline: 0;\n}\n\n.modal-header {\n  display: flex;\n  align-items: flex-start;\n  justify-content: space-between;\n  padding: 10px;\n  border-bottom: 1px solid #dee2e6;\n  border-top-left-radius: 10px;\n  border-top-right-radius: 10px;\n}\n\n.modal-header img {\n  margin-left: 5px;\n}\n\n.modal-title {\n  color: #007bff;\n  font-weight: 900;\n}\n\n.modal-body {\n  position: relative;\n  flex: 1 1 auto;\n  padding: 10px;\n  border-radius: 10px;\n}\n\n.form-check-input:focus,\n.form-device-input:focus {\n  box-shadow: 0 0 0 5px black;\n}\n\n.modal-footer {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: center;\n  justify-content: center;\n  padding: 10px;\n  border-top: 1px solid #dee2e6;\n  border-bottom-left-radius: 10px;\n  border-bottom-right-radius: 10px;\n}\n\n.modal-footer > * {\n  margin: 0 5px;\n}\n\n.modal-footer > .btn {\n  display: inline-block;\n  font-weight: 400;\n  text-align: center;\n  vertical-align: middle;\n  user-select: none;\n  padding: 5px 10px;\n  font-size: 20px;\n  line-height: 1.5;\n  border-radius: 10px;\n}\n\n.modal-footer > .btn:focus {\n  box-shadow: 0 0 0 5px black;\n}\n\n.modal-footer > .btn.btn-primary {\n  color: #fff;\n  background-color: #007bff;\n  border-color: #007bff;\n}\n\n.modal-footer > .btn.btn-secondary {\n  color: #fff;\n  background-color: #6c757d;\n  border-color: #6c757d;\n}\n\n.modal-footer > .btn.btn-success {\n  color: #fff;\n  background-color: #28a745;\n  border-color: #28a745;\n}\n\n.mr-auto {\n  margin-right: auto !important;\n}\n\n.row-container {\n  display: flex;\n  justify-content: space-between;\n}\n\n.vertical-align-center {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n",""]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=(s=r,a=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(c," */")),i=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(i).concat([o]).join("\n")}var s,a,c;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var s=this[i][0];null!=s&&(o[s]=!0)}for(var a=0;a<e.length;a++){var c=[].concat(e[a]);r&&o[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),t.push(c))}},t}},function(e,t,n){"use strict";n.r(t),t.default="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGgUlEQVR4nO2bW2xVRRSGv7bcEgHBgiCE4hUCQVSQW4JFELEqD17ACyYEkAKCEeOD4hM+mIjEGDUx3ohACE+iBgQSJdUAikhijEFCJUVFCoIitwotbQ/Hh9ltNqf/2nv2OaeNl/MnkzRz/nWZtfeeWbNmCgUUUEAB/2MUdaCtfsA4YCBQGmoAJ0KtFtgT/P2vRi/gcWAtUAOkE7YDwBpgHnB5x7qePYqAycB6oJ7kg7baeWAdcDsd+9Ymwn1ANfkbtNWqA1v/GNwEfE77DzyzVQEjc3U+l9epM7ACeBooTiB3BjgE/AGcC/ouA/oCVwM9E+i6CLwGPAc0J5DLGQOBr/B7UnXAx8B8YJCH7sHAAmAjLkA+NnYA/fMyMg9MBo57OLUBmAZ0zcFWN6ACF4w4e0eBiTnY8kIFcCHGkc+AW9vB9gTgixjb9bgH1C6YhFuOLOM/AFPay3gI04hebepwwcorxgFnI4x+BHTPt9EI9AQ2R/hzGrglX8b6AscMQxeBF/BbTfrhJrf1wHZcplcXtANB3/qA089DXzFuFbKCUAtc4aEnFp8YBhqAB2NkOwGVwC4gFeFsZksFMpWBjijMAhoNPR94j9LAoggn58TIPkB+MsPqQFcUnsjBTxPXYK/Dr0bIlQLbIhzKtm0j+pV+y5Crwy//aIM1hsJPgRJDZjhwMIdBxrWawIZCZ9w8ouTesQZpTV43APvFQI8CI4BTQqYcNzP3sIwFqMHtHX4N9AEMAMpwy+j1MfJngenATvFbH2AfcGVGfxMwBPglRncr1qEjudDgX4srYFhPrgF4BRjmYXt4wG2I0HcC94kqLDVkVnnYBtyGpFkoqEHPyD1wSZDl7Abc002KskDW0rsX/bZ1xT3pTH4Tbg8Ti2cNg48Z/NUGPwUs8zEYg+dx+Yay8b4hM8fgL/UxuEcI7kNveUdir++zfYx5YrZhIwXcKPglwI+CvyPOUJlhaLnB32rwX4qx0wkYC8wEHgLG4GbxKFhZ3xaD/6LgpojJMp8yjIwS3LEGdzd2gaQXsBI4KeROBr91M2SLgW8Mm2MFf4LBXWDoB/TsX2twVxoGyg3+YOBnQybcvsVNxAqTDJmXBbcY+F1w3zV0A/CdELCSCPWNVRncQSRLkE5gB6FK8KsN7lrB3WVwKUGvvbMEd6jhuHq9SoDvDX5U22T4udDgDxXcuYJ3xtBrDkp9/48I3kV0XW5WgkFntulCX3/0sviw4FrzQGteEp6s+goFoOcAlVDU4uoGmXjU0OuDRaLvGHAkgU8KrWMNB8Bahv4UfQNE32+G/Dij3wdjjH5lS/l00pBvHWs4AF0EMRW0TKhX/bhhrI/R74NSo1/ZUj5dMORbxxoXAGvb+5fos2qC54x+Hxwy+pUt5ZPlvwxAvUFWJzXqW7cyrL1Gvw/2G/3KlvLJOmVqaPkjHAAr2urVUsbK0POItZz5QKW5XdC7S+XTVYZeOdYu6OXlHsG9S/DS6HOBXrjCR9Il8DD6s6ww+NME937BayT04MNvQCN6dlWnPNtxhySZUOv2aVz1uFH8ZqEZWGzIqKPx8+idnlpFDuMetIRKM/cY3E2CewrobfDnYu/rwy2FnTsMQJ9ObTT4KgPdanABV3xQGZ6adCqNAayI0D+F6OpRFdHnim8bcpWCO8jgPhOhn1GG0DzB7Y4+Ja4HRkfYKELXETZHOQbciS7VHcPdL8iEdaYxIspIkTEo6xV70jBSi87MWqBqfRsi+ENwn5eytcSQUUFWKXQbrBaCKXQ9vjPwk+A3AXdH2EgagDHow9mD6KX3ZvR8E1kLaMFoIZjGnQAr3IEbcHjwM2JsJA0AtD2eb8I+jt9ijMH7TtGXhgJrc7Ik5NRMD/3ZBAAuvaCx2OBMNHy3ijUSMwwl2yJk3sAVOH2QbQDAJTevR/y+U+hOA/d66gfcJmK/ocirth6DXAIQhWVCbxqXDyS+EVeOnkiagak5OtoeAZiOPqNIAeOzVbpKKEzjiiTX5eBsvgMwDFfrU76+mYNeemNfj/k6B735DoCqZres+0kuXkpM5dJlLo2LdtavFfkPQDmuIBLWdwF3uToSvhPDfOC94O+zuO3wbk9ZNbDxtC1iHjF0xuUULSjHZX8tafFs3EFP3rACt7VNWuRUr2aSlgS34a7ELE8o54Ui3M2RpOjIAIDbN3ijI/75IJtBhNGuPia55v6fRNwlxHzgww6wUUABBRRQQDb4G2AYTcK9lLV6AAAAAElFTkSuQmCC"},function(e,t,n){"use strict";n.r(t),t.default="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAn5ElEQVR4Xu2dC7RdVXnvf99ce5933iQQkkBIQAiCgGCKEBVBKW+R1gdtrbW9bQIV7R212jF8MARu3721igjXoa3V21rtS5uArYigoBjQgrxDHkASyPMBOc+995rf5c4x15hjjrnX2ifJIQR6vj322WvPOXcYrP9/fu+1Fv9tZFImZVImZVImZVImZVImZVImZVImZVKEV6PcQp0Gs8lYjLj3MSiLEOYDM4B+9ynUAFBawG5gCNiDshFhPcoGlHXkrKOL7SynOUmAQ1H+kl66WUTGmQivR1mKcALQh2A4EFEsMIzyOMJqlJ+Rcy9jrOf3GZkkwMslX+A44BwMZ6O8ETgaoZuDIcoY8DTCj7HcA9zJVTw5SYCXXrXPRbkU+GVgGUIvh4IoI8DdwD/RZCXX8OwkASZOhJu5BHgXcBHCLA5lUXYCtwLfZAUrAZ0kwP7Iu8g4l8sQPoRwDq9EUe5E+Sx38G2+ST5JgPHb93d74M9mokTDZ6XIxJ8ZlHscEa7iG5MEqLbxJ6N8GuGdBwy0DW8EqEO9VqMmNYwYMskQj7KiWLXkmrt3o9WEJqCACe8DJobyrwjXspyHOETEcCjIjQzwBa5HuWe/wFcgB8YACz21bhZMn8f5x53D/zj9fXx82Uf52oVf5LtX/Dt3v/u73PfeH/DAlT/hwV+5z71fPGb1i2P3vDj33Su+7da++JsXf/vr7t948d9y/yYWGAPy/bPsjtjKPe7/9UYGJjUAwC0sQ7kR4ZR9Bt0COZguYeH0o3nzvLN4/exTOePw05jXP58ptQF66aVOFy1a5Fi0eCXYCOI/MzJqZDRpMMIIg61BNg1t4v6t/8XPtj/ADzb/iKf2PI1tKGSA2Y8zqTyI8EGWc/d/XwLczCeAT+xT/K5AE8jg6Bnz+cWF5/KOYy7mpFknMas2y4HXoOngBkURQAPEAfAEkdhNsMUqBBwluqiRk7OztYuHdz7Etzbcyn889T2e3r0JcqAOyD7nE25gBTe82gmQJnGEmxDexnjFAi3o7uvi4oVv59JFF/Gm+WdxeO1wFGWMBlYVAmyIePjCCJ1FUGygBIqqAvhxwYjQRZ0Mw9bWVn6w6W7+ff13WPXUfzI23IDaPhpX5XaUq10y6VVPgFu4GOVzCMfsC/B9/b2889iL+a3Xvo9TZ57iduQYY+RqY9ARgJABlgCkXxXATfSB+HXFaoOgqPpfBJcR/LGRjB66yGnxwK6f86VH/o5/WbuK4aGRfSOCsgHhGpaz6tVLgFv4JHDdvqj63r4efmXJL/H+E6/kpGmvxaI0tBGUOgIYD53GuxcCsAlJEgk7PhrRQCgUQxbNBnJBl3SRITz0/MN85dF/4B8e+2eGh0f31TR8iuVc/+ojwM0uvPsUHSV42ecuWsbH3vBhls46gwYtmtpsC6QlL8APs5hoJRiA1A+I9zZBNCYE1o8UdDPuFROnIEKdOnXu23k/f3LfZ7hj/d2FIzE+Ua5jBde+eghwM3+O8JHx7vpjDlvA/3zDVVyx+DK66GJExxDwJ10KO+2At9gCcA9ofFx8xjs//pTUBYzAjwD2b+vXGR83GEyY8Uc90k2DBv+y7tv81X1fYMOOjePXBspfsII/4CWW7CCA/3mED49r11v4pZMu4fNv+zOWzTmTMRpu10u822nRIKeJkqe7ui2vpeSbhneAPdEK0bf42JOw5T6ByMdo0UAFTp95Chceex47mzt5dOsavBqpFuEsLmEOK7n1lasBbuGvgQ/RSVow0N3HH571IX5jya8CODsv7mXc25I76BUbxoMpSFU+EmuBcOyDQ0ntPxKRISWExYY5/00LYgJaZBEQTEERFHVmQYC/eezv+ZMf/TWDY8NQYzzyWZbz4VdeJvAW/nhc4DdgyZxj+eplN/HbS37dAT9mx3DiwWow6lIyllZQ0cmu1HCcjgE2jKUrU7sfjrDF7yNiKF48EQQFR9IxRmgyGvkkDTvGmDbd/+PXLrvJ/T/TYDzyIXcuX1Em4At8fFwOXwPOPuYMvnjB/+aEaa9h0A4DivhXTtOdSEtejCV+feLWSaTio7VVqk+TI0XLjIIGeth03o+3nJkCIm3Q0DEWDhzN+YvewiO7H2PjzmfHg8IyLqbFKn546BPgJi4k40vjcfYuOOGtfO68P2JG9wyG7Wjw3sEB36KR2vj0bwKnCuF3SOLdCyWS2v70WB3oSKItAl1iD6HhPg1Z0Gg6xtT6FM4/5hw2DD3N2m1PdU4nC+dyEatZxVomUGoTDP4iMm4eT+HmPadcxnVnf5S66WbEgW/Aq9BCfRoyFEWivQWmgCnAiwSgEQ2K2kQk0HBcKVoa6ys2GQ/zNokmAGcUcprU6PZEgFE7Sl+9n8+cewNTu/+Mf3zoW5BVk8Cd2xs5jw+y9tDTANdimMI3EE7rtPN/5dTLuWHZH2Iko2Gb3p3z9lO9GRATQjQ/H0fwEs1W+/3B/esg5eo/jQbS0DCsbm8UtIGIYDCAkmuLmsk47+g3sb2xg4c3P95JE0zDcAqX8n9ZiT20CHAlH8fwW1RJE9550gVcv+xjuK+2VQBJjqu9RfCmCZug9hGQVLGH1E4860crJV2b5AKqHU+0kwNqvVkThAxQWpojIpwz/41sHnmWx7esrUZFWIiirOTOQ4cAN/NG4EsItUqHb9Eb+Iu3XkvN1Gh58AVo0fDgS2rdw2hq8aW0gSfJ+Usc3lWBX+IDkEQMKfgWIAY9zTF4EoDxJMg1JzMZb15wJg/tepRndnRwDIWzuJTvs5JnXn4C/Dn9dPMthCOr4vzj5izk87/4R0zrnkrDNgpgaTJGQ0diaCWGUxNNEESTldLe4ZP0l+k7zKmShpxRYJiYgsrQ1BbHaoskESKKoVaQgO5aF2fPP4MfPvcTdr6wpwqdDOVM3sJX+C7Nl5cAv8x1CFdUZfj6unv4q7dfy/HTj2UkH/NACk0aDnxJavUxCdKkbhDpmPdTSL5rp/EY8JgGFeBrCfjWgx//Cy2aiFA4u84nmN41jRPnHMd/bLiTsWajPFMjzKYbw0q+9/IR4CZOw/BlIKvq2vnI2b/DpYvOZ6g1XIBNy8E/nMTz5XG7BFBEkDSLVxL/R2PjJoOmZEicwk5+AB76aH0wDUETYDDUUKxzio8emM/0vincseFHMcNT+QUu5DvcyrMHlwDB6/86wqIq1X/RknP4yNIVzttX1Kd1W4zqYKruPYgaU6LK/ldLSZIGqFb/4Tj16tOIIIxpAnQCfkwurwl0zDepGhR19Y+TDzuBp4c2s2bL+mpTAMdzBn/HXejBJcB7eRemosKXw7wZh/OX532SvlofTW0VsTojOohiI+WekECqKvegpQ5fEBVK1HoqpL0AYUwj+GPQo3xgBfgakSfRCS2a1KQOCBaLGOGUOUu4feMP2TsyVGUKjqafR1nFIwePALdQB76CMLfiXPKJN13DGUecwkhrDBEBcHF+rk3/XRAFJCVBustTxR5gT4mQiCT7NXkno0qANVkV7eZqH0AtEvkDgRSKgihWXVWRTLoAXJQ0s2cG03uncHvRTyCUyXFcypdZiT04BLiU9yL8bpXqf8viX+BDZ3yA0byBxh5/2PeJ11+i/hOAi99oWypIhytBpCIK0ArzoaWJIFAtI4CFuFMAaG8qWrQQDBm1whRw/KzFPL57LU9t31SOlnAE8DgreeilJ8C11BjgiwjzaCcWenu6uf6c32dO3yyaeQsRgyVnVPeiqhBl+fynlLt/MTGI10gCcAxUDGa6nzuOAgkFYiqgSexfSYaw+9P1OQ0yqSMIqpa6yVgwbS63briDViunwiYexen8DXdhX1oCvIeLKm1/E6547QW864SLneovIB1lkFwdwxEoTAIlwV4skg6kOzb+JmUOoFDtBGoEWVuKgG1HjARM1IZv2OgIbPobLdrbLDW6UNSZgvlT5rJ1eAePPLumSgvMo4/7WMWal5YAl3I9wmvLdv9AXx+fXHYNU7sHnF0ryrqjOkSs9kGre3nicSlxABMPXtrufC2PACpyAInzF32ms0Hdo0HBk9DAJg6jakEK3PkykoVimCjzph7Oqg3fp9FslmsBocZK/mkiCZBW+4S/Qugqs/2Xn/h2Ln/N+Yy2QlPHiN2LxSJxyEcqnhTpFFq5+xUVvFSlbkCrE0FhPvkeQ462s+sWwmikMZJoIFpjieiiLilEXbqKegGH9x/GlqFtPPLck1WoLeQivs4qdr80BLiE38BwaQlydHXV+ehZy5nZO43c5j7hM8YYI0k9DyQ+rNAFmgQHaftWWGAh0RBaEurZhBZtfYDKHiQL2OqQryw81NRwFGtymmRkPkGkiAiz+qazav0d5NaCkIrQhfAMK/nxS0OAS/ljhIWlnv+ipbz3xEto5A3UYzKie7GSe6cmDfHCdwKEGpNDUiK0re2rxpoggEJ1wBeTIVHsCbgSOX0xPcIODwRRsFhUwm/QkCskcgqLdUpOTk26UbXkXgs8sXs9G6oiAuhhJX878QS4ieMR/ldpxU9gxRlXsmjGUTTyprf9DUYZblvNk4Bs2toBYUy0fRjY4co+laSAW54GTsPJ1PNPvH3bNjhMtcF4ehZt2zSxJSeTGhkZFks9q2NEuN2niEtkLhfxTVaxc2IJcBnvLL10O4ejZs5lxWlXIhIU9KgOkdOK+nI1Uf8O+MRAJCBL5CVEKxKnLakG+l3b+RUTSQO0pcQI46lDWAl+cAatpqaiIICqUpduXyyyzO6dyZ0bf8Lzw4NgShxBw4Os5GcTS4BL+L3SS7hbcMHxb+bchW/0ux+sWKf+450rsc0PbVrj9frbQy3B++/Q2Dnud/GiKuOnpHOQOHkkvkH7UBBNf2e9GRDEmYEp3f1s2ruFh5+tcAaV51nJv04cAa6lh6n8MTATUjSkJvz2ae9m7sAcWj70a+gIDR1F3CsGPpUwr4B08voFNFmZ7tV0xzJO8KuJoMmaAFcAkeoUsaaFIYslzActIGRk1N23zBiMCN956oegpadzgNP5P9xFa2II8G5ORPgokiodLMydOpvfPPWXMBLaNcd0kBxHBlAN4IsSUASNgI+1gyKIupng+EVkine+qib+gEpVu0b6stgUZE2rghQOXXD+UlOgikoYtzH4wT+Q2GlUDev8nDMDYMnVuhzL9576MYOjw2BIRZlKH//MrWydGAK8g0sRLi9T/8sWnsb5i87G9fg5vHNX8YMAGiJoRX1exI+UXrkDSAQtpMeAtlf9EtZ23vmAalkKOBkBG3+iSW2g0hFs5wSqjZzBLukGETfe19XDEzvXs3bbM+0RFAyGnzk/YEIIcDHLEU4vi/8vX3Ierz3sOJq2CRjGnPofiYo9Whr/V3frq4Ak+zr5mxAEtLoWkL5KfIiEIG0BBguQJoA0voAkLRVb0GAASIjgzYAYanS54+6szo7h3fxo4wPlZWLLFlax8kAIEIo/U/i0rzgl4Gf1jPe/7nKm90zBqgVxJd+i0wUgydKlYZ7EYPl4XkqjAK9yQ80/IYVK6VW+pS+S+bTaF4AKADmRDl3CqiA2IkdUFFJQP58WjCyuRij1YgYRuHX9D1GrICXYns6XuAt7YAS4giOpcW3b9K/CnP4ZXPnai6mZrFBmLvUbii8VOzyAD+l89NsAjqRKX7QiBRzWakfnL3Xg8ICnWQUC+B3ie7Dpv51qgnLToIpVS5f0AOLWdpkuvrfhRwyNjZQRYApd/C3f4YUDI8BlLEX4TSRFiBxOPHwx5y8+GwFUBUUZtYOR16+pxgeRkhpecBjL7LySsL48dZtQwpaEhAlAafyftnXFmb32PkMgkpKQLXIQNSFDpAm6pa+gD7Wsxk+3PMKze7aVmYE6httYxfoDI8Alrvx7UZkD+Ib5J7HsqNc7BxCFFk3GdAjV8no9SGIaYnsuBQfiS8M0NIVGNjvJ+tG+WUNCwEWpso9Vt5UAeJLxC+DEKl/ahX0a1khCtsSnSLqHcAkhBINiXQv5I9vX8sTWDWWOoIArD68+sGsDhaMr5pjdPwMjglVLRkZTR8k196Q0Hg3rQTcoIGIRBFEBBMUgAOQYDIjFFvOAXw2AW6s5IsVvc9Awr6GvIMkbigpUtY0lhsbzobS8DCRhIDEpoDQhFEhgYw2QRgRYrMur9EoNq4oRmN03A6QzdgdGAJhfeqYymNM/nVbegoKz6tksCmoBE4JBDyUIiviXceP4cSvWARXWEI4lVPtQicDWKOFM9F0lRHahBqEkohJpCiBJB3dONVGaAg6qnraZQjSMpaSxqOZFQclVW+f0z4Ss3IVCWTARBDiCEjGZuCt9cs2jDLZ7q4AEMARTgAxuzgAadmkBpBoHdBgJ8Iq60UAG8LNhHMJ4ACRoBOs1QSrBNIgSwAxsSuBO0s0aSJF6/eBABBzQEjudJIGiJZgHklxBy7Zc5GUywVqlrQiHTwQBZlAimckY6OpxBCiyW7nNfThYAKbebuV+txsQMGo9cDlhlQHywlxAgL7YuSgSSsuYAv6gtJGk6CReswSzUC0OmIJsaYdwUmqWeL+CAnGXT2mbuE1DRz9mo2gi900iqrbQtPTXexwG1rYokZkHTgCpIIBk7ibK1hNAMeTa9GGLIgIG0EL1Y0GC+iauAQaQNCoMh0yiRgYBsGiAOfUDRAJ2PnyS8V5OEsX4acgHpJ/xnAe5sxmAcBySRyQtY7k2sUWNQHN6a90OgyYlBBCmT4QG6KNEjAhdpo7VwPaWZykCYLDeQQvOnnPg/Hgx5o890KKeOMEwBIhF0OAgtt39IkRrgloXqCRBiEECrAF8IhIkaeeIKKo2AhHwflG80wOh0rAvjANqndq3ouBLwzVTcxiUitI7EQSok0oEiNXCelosedQVG3a5CdFAMM0IeSBHsPHYAHnhwaMCYhWRyAFMvX4lmI/gh5Amlan0BYDQ5VN9L8GoYUS1fSWQQI5iBJJcQEnPAIqE+yKiKhiRSjIjdE0EAaptZWLrrHsZC4igYhDUvw1YQUUiRw8gePcGhMJnwAnxrlcNTmBBMA2UiMyHWilvLUslLkVrWkiKyZM2ihLgTGMFJXH6FBubnBD/J/UAg4lMhjcHlUyeCAI0qyiQ563YbqljeAj41HroA6iiHlD/IjoOd/5UbLLP1RPHO2lJKEi8PoyooHSWFN6QCxDo0G+sqa8Q/gYtkJSMbKQZEp9Bg7uJFsQxLvzuoM0aE0GAYUokV2XMNjx7LeI9f6sWg0B4Y/HAYTEi4AExmGgdAqph72sgCZrcFEqC1x8+w5ok6xhGOjmA8UcYTb/F8X9KkATwWGOGimAMOhYgFIqwSYWz6R3uUhHGDpwAyh6Eo0jFAT3UHAZmYrGIj+Gt5gCI9TG9RDs+OIYiWGwBJuE3kEuOIAnQYgXEQy1E88R/oz2L9aNCpV4UTdrQy2L/cKygaUdxSgT1ayWAq4m2iEpPIbzGlYQDGUQYao6Qq63EbiI0wC5KpGVzBhvDAF4DePXuQ0LIUTUIkmYARUATMxB+o4KKIqQJH9STygoiCkkW0EviIAIqVEjSZl5yzVG6z5WyC0nSriFNLzPzQMd+Qdj9Uf3CurXGnfuWzSuxmwgNsLWsjU9zZffIXiTkv3EvVQTrAbMF8N4smJBaC6SIABZRHxVQzBG3gwUfoMQXKHk4jOyji0v6EJkY2pgKSqr6IQI9nbGBbGiSGiKcV1TVvy2CsGf0BYcBphy7iUgEbaRMLGwf3o04QDwJrBZqPXjxCkhw6YIqBxGTpHPF72x3LBTFogCn9YQRAsWK46Q2oH5svCKAltLBRm3jxOpdknRQmCt7BkFhFiQuE+PHkaIFJYCvCiKwfWgPWMCUYzcRGuBppGzOEcCpIcWSA65kaUHJQ1IFExI7EBS+hn0N3lT4XxVqXjR2BYO2AFRim6+h/QziOd0HHaAJ9NFoAFuJAVWS1G+oDrab0zDnPiONEBWIAFxLmP+eW+vOPVqN3UQQ4PGAZMIwntu7k5HmqNcCFkMWnCKshz4n90ch1y+RiSjG4zfxWoB2CSAJtj3KECY7uzwXUH1bydT2ixLv7qr0cEWDqWrVeCCFIBhqjgAiuHP+3N7tIJVJmscPnABNHqebYaA/mTOwee82dx+Avno3xNe5I5J56AUsWAEJsTxC4cgJiEQwg0Gsh9KbinRne31hCxRDKKkRrEm6KeGzRUuMgPqR2MZbDxyJ2idW/aogpL5BMScaRQQx8CG/asgAW5hDhlsjbNq7HUxF+N6cCALsYgtzWQOclswJ7Bndy5ah7Rw3YwFNdfvctTAP2TEMIJhC8WHURA9hEoIjJ+qIASFYDPG+grg/ye6PKwWqSbk3pIJj0X1JBmkyEwCNvP80KgBtu0a1bWIozQf4wk+P6fdnJcdIjS1DO9y5RyiTNQ67AybAp2lxM6vLCJA3Let2b+aEWUe7y8IU8WYg5LFBAOO1QpEEsjGQScJHShs80rEoEmj7vLD9kgBy+W3nyqICTeYSkClNEmn8ik0rmTHunOdNW4XgaofdhNQCLKvJWF52jp7Y+QxvX7QUi/qO1V5ogS1yA6LgqSFWQWIvHoxX5RJ2rBTQmqCW/bwFRALoaahH9JtYhMoCmpLaf0nyAe2B1wB80pauaX9iPBdFA9GcKHSZHl9oszRtkzU7nwHtgBkwMQTIuA+lhaTryWDNrmfYOzbk6tMOdIyLBsZ0GFGQOD4PtQAtSJB7qCW0bbkJiZ8WgoISagESAw5Sse/DWGkDTVkUoKT5gFTdx36DpoWg2Mkj9hWi8QC+xdItvRgMrtdSxJ3rJ3Y9U3VxaMthNmEEeJYnmcsG4LhkTmDH0POs27WZUw4/jtw2MWTUpYcRO4gh5Pwhj1LCxXEBUIBaIZ6Le/zQ4PFL+V2ENYG+o+2Pnb6Ki9BtFOaVVQjTNZqMp0Uh4iogddMDahyuNVNn3a717pwjlMkGh9mEPjXsZv4O4X1l9cLzX7OUD5xysbsvoKjbuWxvbALRokYQwEKQKK0blXfDGgXEf5e09o8GaIl+70XCcXUuoHpeY0cgDv/SSAAJwIbdH9aEsegCUiAUhiKSHFafjyFz63qyLv7mwVX855rV5Z0ayldZwa9P9CNj7oYSAmTwwLa1zivtrXf7TKChyzgtQIYSPP3U2VMVTwTiwhD+NxDAFoHkeSFhPuoH1ACmCuPuCbR+lSgVWiCtGRSw2STuB9H2N5UkrE8eSqXk9JoBDJkPBcWd4we2PQlZR6yYWAJY7sIw1vZR7wa27d3FwzvWcda8kxhtNTFi6DEDjOR7C3WZ7n4k+kZJiZewJl4HlT0BQfDkU8YlWjSxa+cHSkR/UzKkf6lIDMXkUHDnsNA49azG/TvWs23v7qr8/5jDasIJcDVruJl7gbeUEIQfb36EpUcuKXrW6JEenDNoRzCSRSeX0J8fdfpKXPTxc8UaUI2pAQKiHcM/DRqhoyiM6y7iQVWn1j+ZiXd5vDqdx2Lpkl66TQ+qOYDrt/zR5oer8/9wr8NqwgkACny7lAAZ/HzrOjbsfo6F0+fSzFsghl4zldF82HvzpoAz0QDarsc/WpPs9IrwT9CqFHBn6ZwSLukVTPZ/si4lQQCfqCGkrzbFdwNburKaO7cvnuNK9e8xUsYpss83ijT8HKGfdtKCty4+jQ+87gLGWq2imsfOxmZ/u5gMkVD6ITh5ASYJ31CQYgzCZwA/7hCWkuBPghYYnygSFfxKwkLR9GZ1SYjn0ZAkBIwTP1KAH64EntV1JPi1PbU6X/75bXx/3X+Vb1tlCMvruJr1E0+AEA38I8K7y8xAT72bTyz7VY4cOMxVCYWMUR1mV+NZQDBikmd6g8QjQjQWfwYiaBgr1QbsZz5Q056i+Kjk2Mf0JWs0aTJR2juAs7rmuquBlZyayXh2cCc33P01RptjVfb/G6zgPS/tgyMtXyUrIYCB0bExvrvhp/zG6y709wrO6aaXHulnyO4F1bDrw95JUsFJli8iRJr29WOVoAc4x98TYKORqvsJAtrheUMaQd+2cmg1py+b4s5ZrjkCGDF8d8P97txS64AN8NISIOM/sNyP4YySeX686RHOnn8yi2cc6XwBsAzUZjDSGMKGUmpoDXMSxtBAAsSNxp6DStsnBaZpXkH3Rw+09f+1PFVcVSPQMJPOpw0jhoyB2swicnKe/5O7NrlzSlYJ/v0Om4Py+Pib+TWkgm0tOGnuMVxzxhVYtaBgMAza59nT3Iohi5M+Eu3vRLFHhjztC0gBFoLsd0NYuvMpwEfQ/QgJIckPRGssOdPrcxgwM3BldAEjhs/99F956Nn11dtVeR8r+NrBIcAt1FFWI5xawUg+cOoFvGn+yYzkTcS/XiSAI0KGCQSIlXxS9g1HaZk3DgrjtRMjCkiV1U8BL/UBSMI9DeDTa6Yws34EfoXL+t2z6SG+/MBtYCrBfwBhKctpHhwCAHyBd2P4R8okh5n9U/jome9hZs8Umta3NWPZPraJpo5hyGLYSL19P54qcQlz5e6eHBDTNTlKdz9Rx2+HsnF7J9HfDbSL2d0LMJjiSSHsGh3kz+79OruG9nZS/+/hKr4BcPAIcC2GI/g+hjdXmYLT5h3L75x6cXjsOhlNHXEkUBSDAYnDvkACiaEV0jqAVIAuoEmtsLMomjKhDFwNI0hk+8Oa6HtUXvbVU1zI15P1YzXHIGTG8MUHb+X+jWs6OX4/YAtv5dPYg0eAoAWWItyDUKt6cOQVS5Zx4eI3MNZqFqEgw/ledjaeQwARg5O4cExMAUnDvxTY2CgIyXgJ90vmNHx0rA+WAF6VKlKLggv5+rKpDnxF6a11ccfTD/D3D90BprJ61UI5m6tYDXBwCRBI8CcYPlalR7tMjd894x2cMGuBI4EARjIG8z3sbmxFkJgEErt4KPFdaiUGmXbhnwLp7q/GP4EyFpXUAITKXnqMpD4/SpQQmtF1OAPZdKy2UKC7Vmft7s3ceP+3GKl6dCyA5U+5ij8EePkIcCMD1PgJwolV/sCcKdP58BsuZ0bPFJp5jiAYDC+0dvF8azviRxRF0t6/AGyJMxhE2u556YQ40pEAlO14bfcbbecERjeGmF6bzRQX8lnUh3y7R/fy2fv+ja17d1fbfeVRWvwCH2Tw4BMgjQqWoXyv8nr0Fhw/ez7LX38x3aZO01pvvw17/z8Jmts9oKboA0j9+nQMNHkCSWkXu19UrfY1mUvyFEmjqICm3cMomvDGYhGUqfU5TKnNwJFBoWYMDdvklv9axRPbNnXK0DSBc1nO3RygCBMlN/MJhOupkha8fv5xvP+ktxUtToBxr6H8eXY1nwPApJ5/lORJwK3oCSTWAp0prwSw02E6ewNxrj98ho6fmfW59GfT/HfX5IlVy1cevp2fbXqyE/igXMcKrgU4NAgQooL/xHAeVZLDmQuWcOWScxARcpu7TyFzvQM7GpsBRcQEda8AUpnoEUAkue1sSgWNaJOqaOn8cBoQtF3Yp3GYWBSAgrcvzOya5xw+pYWqkpkMUP7+0Tu5d+NjkHUE/y6Et7uY/xAiQKgWZnwfOKoTCZbOP573nvAWV+ho2RxEyCRjNB9id3MrDTuKkSxJ9Uii4lOzEFmQAw4DY+5IskY7pous5q47akb9cBfqOc0H1CWjaVt8/bG7WL35ifGAv5EW5/JB1gIcWgQIJLiQjFtJJU0XH7GQXzvxXPq7enzNAIwYcrXsbm1lqPV8YQ4QkQowpeRo3xmvlEgCrJRl/ZL+/r7adGbU55CRYQvwsxrDzVG++sgdPLzlqfFVZXIu4mpuAzhkCZD6A9UkWDTrCN5/8ts4rGcqY3kzgCvCYGsPe5rbybWFwfhxSnf+fuz5/dAIkpIh7RLCYqlJjWn12QzUpkcZQHe//9EXnM1fv2PL+MBXPskKbgA41AmQ5geqWc3hU6bzrhPexAmz5jtNYFWLsJCWNh0JhvMXUCxChlTtdZEJ5rkSiWqHLsEcwTg7P70+m7rUfZgHRtzO54mdm/jG4z9k6wt7EvA7xfuHNgHS8PCvgQ+NhwT1Wo0LF5/OOUedjEFo2nCzKBFxvsHzzZ2M2qGQQq64ACThxH6KaiUhoh4+Qdw1fNPqs5ytD/f7w+X2LZY7n3mI29b9lGarBRnjkc+ynA8DvLIIEEhwE3DVuDaahVPmHsM7jjuT2b3T3LWGQRsICozZIfa2djOSD6Fqiw6jyhSfIAeo/qV0zxe3xunNBphSm063GUDQ4oURoSurs33keb715L08+NwGAnc761GWczXAK5MAwSf4c4SPMB7JYUbfAG9beCpL576Gepa5zKGqIqFAxGg+wmBrt9MIubbCFccHwQQU8XwmNXpMn2t26cn6ow5fEaFuas7LX/3cGm5/6gF2Dw9CNm7m/QUr+AOAVzYBgia4Dvgk4xELKBw7ay4XLDqdY6fPRVVdSTlAagB14I/kg664NGZHsJpHVUbplPyvnA9/izjeSEa36XVtW73ZgCMBCOpJgVf3RoS1e57jtvU/Ze3O50AAw3jlepbzKYBXBQECCRwBrmO8kkNWM5x+xLEsm7eEBVNngxIRAXCgqFqa2mCkNUhLm44UikU1PIKV0j6CtG9PRDBkXus4FU9N6vTWBqhLFyKmCOki4BHY+MIO7t78KD/dspa8ZSFjX+RTLPcR1KuKAIEEF6N8DuGYcWvgHGr1jNfNOZqz553I0VPnkEmGu3kySrh3hIQb0WjLa4gc5y+QA4LVJi1t0bJxIq1m6i5sM1IH37fQm/WT+WSU2+nR075BfMtWTTJyzXn6hW3cs/kxfr7tKVrNHLJ9OMPKBoRrWM4qgFcnAYJrcxzCTQhv2ydTbMHUhCUzFnDy7KN5zcx5TOvuL+5ZGHrskmsIBUTSx7kEQZDYh1Btdx9ArxFwGUyA58eGWLN7Mw9tf5rHdm3EthTMPjcg3o5yNVfxJMCrmQBpwgiXNOreVyIgMLWnjyUz53Py7IUsmHKYf4CCcfWFXDUATirSofwb1xcgE+P/bctQc5SNe3e8CPpTL4K+iRdGh0HZH+DHgBuSBM+rngBpKfnG9Mnk4zcPZDCjp59jph3BUVNnM39gFof1TXWNKPWs5lS0YrGqBSFKNIC3/VIkoXKXmGrYFjuGX2DT4E42vrCd9c9vYffokP9v73fD4YMIHwwl3f+eBAhNJRkfQ/g9hIH9jtQsgHMcnTaY2TvArO4pzOidwszuAWcuemp1l4rtqXVF2fzRVsOlokdbTafWd40Nurug7hzby66RQbfrnUMHYA6o03QQ5TPk/GnRzDFJgEI+z+uo8WngcpiA0F3DGwNiBGMEg1PnBMGpdveyiloFW3LLwgOTf6PFtfwuPyeSSQKkLefwexjeyESKvkxnxfJj4DNx6/YkAarlXWScxzuAaxDO4ZUoyp3A5/ge3+Kb5ACTBNh3EW7mEkcJuAhh1iEO+k6U2xB3pe7KSO9MEuAA5XMcSb0gA2cj9B4ioI8A9wDfpMlKruFZXiEivFLlJo7H8BZgGXAmcBRC90ECfAx4BrgXuBvLXVzNE7wCRXg1yF/SSy+LyRwRXo+yFDge6EeQCWgHGgKeQFgN/IycexlhHb/PCC+bTBKg+uplyxyExcBilEUIx6AsQJgOTAFmIEgAmd3AXv+MpI0+N78eWIeyDsM214n7CpVJmZRJmZRJmZRJmZRJmZRJmZRJmZRJmZT/B1SpnBPNoYAnAAAAAElFTkSuQmCC"},function(e,t,n){"use strict";n.r(t),t.default="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAlA0lEQVR4Xu2dCbBdxXnnf93n3nff/rQLCe1iETL7vhtjgx1AeBnjeDLxjGucKgGG2LEn8aQSm4A95bgc18RLMMqMM05mpiYxnklsP7wbowQKEBhjiCUhoR3telrfdu89p3skna76St3V57zHe8IC3lfV1X36HGzV/f/7W7v78aaRCZmQCZmQCZmQCZmQCZmQCZmQCZmQCVG8AWUFVBswPYHFKm8LFSwC5gCTgQ7XV8glBQ4AAxYOKthmYaOFTRY2ZLChBfYuh+YEAU5B+RK01WBRAlcquFjB5cASoF2BZgxiwQCDwFoLqyw8l8FTddj4SRiaIMBvSL4OZwI3aLgGuAqYr6DGayAW6sAW4EkDTwCP3QXrJwhw8lX7LAvLFLwfuFZBG6eAWBgCHrfw7Sb03gs7JggwfqIegtuAOxTcomAqp7BY6LPwfeDhO6EXsBMEGL1wByQ3wu0afl/BDbwOxcJjBr7yKHz3YcgmCDBy+/4BB/w14waG9IWipB9PIjxh4Ct3wbcmCFBs488D7lfw3rECbQAjz1SBSjVBVSoorVFJBZSD2VpslmFNhs1S0kZGU4iAdm2sxLDwj8B9y+HFCQKI8DXorMKngI8p6Ho1oBsgAxKgpbWF9ulTmXrOQjrnzqXttFlMXbLo6Hg21a5ukrY2dGs7SlcAsCbFDA2S1YdIjxzhyNYd9K3dwNDunfRv3Ubfmk0M7u2jMdxw/x+gXyUZLBwBvtyEL9wD/W96AqyAa4GvKbjg1YLeohWTFpzO7OuvYMbFFzDz0vNpP30ula4OaG2DagukBoxrKLAWEUQbaAVJAhUNzToMDZP2DzD4ylZ2P/sCe577FTv++WkObt5Ow9hXTQYLvwLuWQ6Pv2kJ8BD8qcpbbTTAN4EEmDx/NgveeT0Lb7+ZqeedSzJ1CiRVaDQhTcHiwHYAK7HwKJ//FqzrsUIQ5VqSQEsVsiZZ3376/vXXbPrOj9n8o5Uc2LKDzJkZNcp8goXP3Xm0vUkIIEkcBQ9qeAcjFAOkQHutyoJbb2DRbTdx+nVXUTltBmQcB11A0wjQ2vUOSaSTQUgCrEXIIL0jRE4Grch27+GVf3mSjd87SoZHHmOw3qTC6NKPBn5q4W5JJr2BCbACbgW+qmDhaIDvaK9xxntv5i0f+SCTLzwvX+n1BmSGXDQoARxl8x4EQLSbshEToABCImHFbGDAGiFFoqFWg6zJgedfYPU3/p71//gTBgaHR0UEC5uAe5fDI29YAqyATyt4YDSqvr2txjm/cxvn/Pv303PuUjDWrXYHkPJWtzHiIVjlpqUXbRCKkMII7jnQQizteixYcyKZalXQcOjFNaz5u4dZ8396GRysj8o0WPjMcvjsG44AD8H9Gj5DqUjGZOGNl3PZH93JlMsugmYGzVRWKwkoBHSbgTUCsCMHuOb7ACDP1ssUOFBl3jmPANY4EiSgEyEOohVoqUI1Yf8zz/HMFx5i06OrAEhGbhIeuBPue8MQ4CH4oob/NNJVP23hbC79+IdZ/G9ugUoNhusOLA1aCxAmBZuFtl4lAnBAAhBV73olBPDBF3Bx85nMY0EloCugtXsvRKC1BRoNNvy/R3j2L7/Jvk07RqwNDPzFnfCHnGRJXgPw/0rDx0ay6g1w7vvewdv/6s+Ycc3lUG/mq17JasVkkA5D1pAVjwAp6l5stwBsvVyflQZCrHwgz3imARASZmAaYFLHMyEoaW6qplxyHme86zrSfX3sXrMRC+jylXn1rTCjF77/utUAK+DLCn6fEmkCbR1tXPXHv8eS//B+QEOjiajyBEwKWRNs5mkDDQp5Rla99AS5vDAA8AayykM1b/KxaAtxDFEaKi2gkhPnWyqgDGu/+W2e/PP/zlD/EFXKxcJXlsPHXncaYAV8XsEnKZEGMOucBdz8tU8z7/abYLgBaSbgY6E5nDdZ8bLa5VlEnkHZkdI9ng+wCPgIKTDyLN9mkDbAZKAT0TRZE4xl2uUXMveypfS98BKH9h0sBUDBFbdBay/87HVDgBXwJwo+MxLwF119Pu/86/vpXnIG9A+CFaRIG9AYBNMEFdpwkOcQZFXg5dvwE2sD8GU+9AVkPieGE3lnUkjr4idgwRioN2hfMIdFN1/JwX9dx75tu0dCgmtvg7QX/uWUJ8AK+C0F3yhz9lJgybuu5sYv/zEtkyfDUF1AxkJzEPkBlWfrPTsuJAjFRgB3YGO9b/BXPGEySMgQziMN47SBNTkJlMrHzQaV7i4W3nwVA5u2seflbaXpZAU33gareuHlU5YAD8IiDd9W0FMEfgZc8IGbuP7znyBpbcudPRBb3+jPnTylPbAlbAvmAKzygQ8dQgwyaTwn0EZsv8xh/HfgtIDnJyDfmQakDUcCFy00mujWGgvfcRXNfX3s+vUGoXhcrnsX9H4f9p9yBLgPdA98S8FFZWHehR98J9c8cC9Ka2g2HdA6B71+RLJ2KIexAB2P6Sm39VYGoRjAV+XOh7Am4hsYnwDS8OecSVAadJLPZSmqkjDvxito7u1j+79uKNQECnoUXLAM/ncvmFOKAP8W/kTDR8q8/fPec8NR8O/J8UszATOr5+BbZE55oGM9IiDfQxnqoKw3L02kqBYAQgYhQfC9gB/6C+kwKJWTAON+A5hz/SUMb9/NzrWbC0FRsMCC7YXHThkCPARXKfiGgkqRw7f46vO54Yt/gE4q0ExllTeHcrUfpGqlx3i231Jg+1WopsUs+JiHvoCNhYKe0yfAOuxD8MEnjM1JAKArgIU0QyWaudddxIEXR+QYXr0Mft4LW3/jBPgidLTCdxTMLlr5p505h3d+9Y+Ob8iQGN+BXx8IY3eQ3uLNxzx+KyQR4EPVrgCs3yLOHqGDR0zVG48UgZaQvlkHZUFXXZiYoWotzL36PHY+8UsO9x2OgqMgAa58K/ztT6D5GyXA++EBBe8ryvDV2mvc/MWP033WQhhyKhCdx/aNfg94b5WjBFiF907IIWAhAghYkTgfAUzmY4CLCZCxAYMjlhACG9EEQhIX5ahcE7jMYaWni5nnLGDjj56k2Wii4ySYXgM91vxAMkav/yINf6MgKdq1c/0nfof5t10PA0Mngl8/LOBbP8EjnYgSAJV8I8CqkAGh/Q/jeQE7NB1CmPB7iQLC6qCxJ84ZIURgDpR25sBAo0nb/Fl09bSz8ee/KIsMrlgGP+yFHa8tAcTr/3sFi4pU/9J3Xcmlf/DvoC4lXLImDB90z16hxvphnxK1LSvfI4R1Y7zwzCOHLXUCI6rf+JGArH7/G0uo9m3mAe+Zh+Yw6ARU4sxDkynnLmZw2w52rttWZgrOvgT+biXY15QAH4Q7iip8KTBl9jRu+sI9VNrbIc0ADdbA0CEwBpT2VnGE78pT9yCr3Y0F6IAE4cq2RfafAgfQMxmeNghrA4Q+gmvyDBiTm4OkJhpFwWnnncGWR59h8MhgkSmY3wGrH4Ffv2YEWAFVBX+rYFZR4HXDH3+IaZe8BYbqAm79sIuHBewQeFmtvlMnYj1meFogjOm9ZA9hwxYlg+IlYoyXE4iFgWFz30qxq1pzpiGjMrmbzp4ONjz6bKEpUHDmMvibXjCvCQGWwQcVfLRI9Z913flc/NE7TlT9zQGo9wNawC2uU4aRgC0u4oThXkCEOBh4Xrtn1z3ww+9N6PmHWULXjA3Jkrrsp66CMdBsMumseRxcu5k9W3YVmYLTgLW98OJJJ8B9UOmE/6bg9NgevtbWFm78s4/QNn2yJHtMCoMHfITDKp71wbd+4ScEnJAYAj5+ujecF7DDZA4+8N68Md43Aizgqf6oHyDkSetQqTqyZ1DRTJ47gw0/eJI0zYqSnPMugf+xEsxJJcBvwy1Jge1vAue/51rOfN/b8tIuADq3+6lL+4oAQfgX9mLvpffAD+2/9chAkRMY2nrRImBCOx+CiYCK8TSD11sbJ4bJ8lZtcw5hRtvp06jv6WP76s1FWuD0dnjmEVh3UglwO3xWwVtiq7+js423fup3aenugMwAOmf1kIR8cYcvvqIFIOWb+rj6DzWBPEdaWBQqcPaIqXtvs4jx3ok2QcyGRBpkDdAVVxzLAJh0lAQbf/g0zUZa9KtVeuHbJ4cAUu37rwpaorn+ZVezaNk1MNyQRM7QAcgyyeeH6p0SEWBR3rPrUB6IfnpXwA9MAkHKtiSdSwx8zxdAgAU/CoiPjckdworTAllGy/RJDO3ax/Y1W4pAW3AL/P0jcOCkEOB2+LCCZTF8ai0VrvvEb9M6pRtS4xy/IRg+Aiqu4gVI75VVERJ434MHfOC9Oynwyo3rA3+gzJsXsGUsRADfQZQ+0CziROYE0FWoVPJ5DZ1Tu3n5B09jMhOrgLQAW3vhyZNCgGX5Nq8Fsbh/8bXnsvSOt0EzFXCGDoLJiuu1QoYSMyCrXcaeJpC5MBdgomGgDIxnw00R6Cby38l3gQkITUTQCxlS8QUyQ+v0Hg6s28aeLfFikc23j31z3AnwIJyt4b/EKn4KuOL3bqVn4Wyp8TeHYfiw58GXVfCU62ws7A/HeKpd1HQAfmgGPIDxQMeE4CLPYdrXnGjnTWTzKKHaBxk7LQBJi9s/kEG1QkXDhkd/iSIqs26Bhx+BvnElwO3w3ti5/QyYOmfacQJoidVzzz9rePF+bCyoylQ01vdUfEwDRHoiOQAB3etlFUfA9Agizl3oG5hQ5RtfUzjimAysEV8gzeic2sPmx19g4PAgOuIIKvhVLzw3rgS4DT4eO8KdAktvuoS5b70QGimgIMty9T8mEdCEI77aDskSAh9GAZgCEuCrZBDQLAIWBZk979kDXMYWyBz/MjDuvWQIcwIowBh0ZysD2/fyyuq4M2jhUC/847gR4D5o7c7t/5QQIqgoxeUffiedp011iR+dZ/zqA/7BDV+9y7ONL/34Tt1QE0hP2AvoQNjkffmeP1n1YTgnaj9c7VCYGAojhbQJiYZKLZ9TikTBhp8+JzozlM5L4K9XQjouBPgALNXwR4pQ6xhg0szJXPqhm9BakjK5+k/LtmtFVr0q+dxG1L1IZDNHvBxsvXAwGrtHikFh4UfIEyaAPP/AH1vPHzDiDBpDa1c7Gx97nqGB4ViRqLsN/u/3Yfe4EODdsEzBe2Lqf9GVS1j0tgtdxU9Bmnrq39+143nzRE7llPkD+JqA0OsX8D3Qy5oA4DuJocceG3tgFvxvhFrEynOWQrXdpdQNuq2FvvXb2L0prA8gZ5ifEz9gjARYBssVXBJblOffegVTl87L7b/WUB8Q9R/4ehEvPkgORdR7YaUvZs85UcUTIYIpK/Far/lmwAOXULWHoWF5gogsA524SmEGLRUa+w+zedVLaKKyqxd6x0AAKf50wf2u4hSAX000l/7ODbRN6oTMAuT2v1kHVAi+iuTmBftQbGwcagzhiJ/9i0cA5aAbwAMRz9nzY39CgENCSRNSZWHUYDNHgFbct2gs637yHMZaVATbS+AbK8GMiQDvg9kVuC9M/4Ilz05d9P7r0IkWNvcfwDksJwKiYuo+ugnDT+lG7X6YsAGIrXh88D2gCzz4EOwy1S5gliV/sBDafzBOC9TaweZmoNpSYf1jL1AfrMcI0FWFb/4QDo+JAO+Fy4H/qAiJlgKnL5nDWcfsv0W2XQ0eEoBUyYFkS/TaFiGOt7oDjz9c/fI+/hxvBlnZJTt6wvlwzsS+CfIMrs/AhJVFWrtwZEYnmh2/2kDfzgMxEKsV+EEvbBwTAZbBLQpuiTmACy86g7lXnQ2NDBTQrOe5fyuVP7BewSYghD/nqcsC7UDoGoRgyxwm0BC+8ybzgUcu73yHLQQe5DkLNEmoXYR0GLwsofum2go6yce1CnvXbGPH+h1halaM7zO9sIoCqVAiFubHAjl93AR0IcBaaAxCmkKSgLHIPT6AQSqCmQYNKAMqQTaGWjenwSg3b/Nn+cY/NibvvLRzdAxgEFGxENM/5+eZFCXgByGhCfyJEZoB0RZgJStYH4RKLX9W6vhvr0uwo0QqlMucCDFIgK5jBEhTx2AFmZGxQsBzah6t5Dkj77UFtJtXrperX/Jm/GtfvDFgZM6JjCnabk4AepiECmoJscgiTCmHVT//nQ94WEsw2Ynp4WZK17RuEsDGqytzx0wA8f5DSRS09bgdv8aA1hK2WA3aCHjKgYx2pMiEEFn+jaxog9z2gb/ivVtBABtsKxdi+EoRym8JE9Aj28iIgC59sBeAiBMpfYQM4iPkBHBzWUZbdzuJUhhricjM8dAAk4mIriTU2logyySESZvCcAFNAMqcitfelS2i2h0pyHtjQfsq3rqxFfAt0scukrBuXCqRXcR+6Bmq/chmEcrKwa5lAXHEP5DfNl9kUGuvHsfANFMiMuWkEcACKtFUW6tOPbnJZkPIYORYF1qD2GwHsIVMO0DlfT6HgJkJ+GJOXI+QS4D2Vr8KiBATeR84m360UaD6ZRxJASNzROoCYbZRrp4h1wDVWhWVKGwzSutJ40GAdiKilaJSSSBzjhLCUgHLgHWmQdmcCAKUA196EJMhoCvRDNb6x8KidwCGJJBxVIywI6L2I3sOjF9I8ufCIpEpSg+HZkI0QK75kkoFrRQF0jYeBKgSFYXK89PiKZsUjNzSifYudDKAePYCHu5ZWd/Rk+8MzrcQF16iAzzg/XHZ5WiFDqAHbMz+Q5hIwttCTggw8vuJGXBj+Q6yNDe3zuHVqoTM0FJOgLGKCVmOMbJarQJtxMt3wIObF89f3NkAfCtzYve9Q59hBADh88jFlqScbeQZ1/thX0ma2eDGEefQZKAS0RyJxhpHsLiY8SBAk6hYrIsAEGfXhYJICGdB4nsC71/CPs/h8227AApKe3OuKXxz4OcARukERsLAICMZcwQLQ0IBumiTKEa0qhHn0DRTrC1kQGM8CDAYX/yWtN6gZtvByGrGZLLgxMYLaArIlLyT3s1rAR9HEHxCWCAS9wthvPlRiI1VJSk4MErcETQRk+ARIRjj+sxAFdEUKEcAQ4HUx4MAB4F5QOgsZxmNwWE6hLmAhiwjDAEtEhG47+Sd591bzwxYz957Nl5Al56CDODotUAB+ES9/pAUIeCAd7oo875FikFKI9pC0xgYxmYWVYjd2Amwn4iYzNAYqAOOoRUHhjGAeP0CEIj3DwJk4kyBcj0CLKINwCJzhGZBSCBjRqcJ4lfLRMPAUiLIs9fw0r9xP0EiK8jHiTpOAJNlJdiNnQC7iUhmYfDggDguRoOxCFsRrSCqXmy+iuX6w6QPIPNYeS6KAKQfhSMYqUhKXwp+uUMYRAXuOV4rkFSw+w4YPDSQ59VKsBtrMWhbJM9ME+jf7yp/Rmydp7I84EUtu2c3NoD2wNcA4hgi34IqAFwV1QHKxY4yEoAI8NJK7xbEI4ZnLhzwQgKgv6+fFGgpwG48agFbiIh1/wiyVFhaqQGuKOTwQ2tAVr2AbX0SeM6e8e4P8nrtq/4y9f/qUsHS2XAu3IQSAT+sFLq5yDUzeKEieTk4y3D1luOLz5ZiN3YTsNaK1Q7KwQf3HILhhrPtFipVsAAZZMYLA+UGcAHfeLbeNWJj5NkS0wThePROYIkZIAKuGxvExhO7YFrAdhFB5Jo5p02Taj7GwlD9+G+viym8dswEGIa1rTAIdOBJAhzcdZB0qE6lrSZZLIA0gyTJ58KSMFi/AmhD9Q8BKQRwIn3o+cfVvyqw+zETELP9FIeC5ZdNRw6Xuj5J8t7mmjMdrHNwZ+F184PD40GA/bBrNqwjvAMYBQweHuTQ7kNMXTADjPP6W9qhvl/0hDaAkaye9eJ4aWHoJ3PxRBBEIgHKvP/RRQTWHxdUBsM57znwCfzqofQmhbZuQDszqzm099Dx314RlXXHsBszAe6H9CFYpSIEaBjLnq17mbp4BjSdDdcJmEy8eKvF9gvAni0XJ1G+IQI+gPHjf6+0XKT6R31YRTobuS28PGUcJ4B8eyLwWEkCJRXJCOqEPVv30TA2CqCFVcewG5dagIJVwPJYsnn35j2c0zzbsRVo7QBcRlBrsH6ix7PpVnL+oJDv8E2BvA/ALvUDykkQNwXxZFAIfNwMhHPSIL47GAW1dreo8sujdm/agynHjPEqBj1jIVXh9yTA7k17SfvrVGpVlxKuQKUVhgdA5zZfwLUIAbQUeLRf23dgKBOaB4QgkeKPPz9eB1TLfQHx9CNqn0JChEWgNN8NrKqQGtCQ9tePEaDocGgKPDNuBNgB62fDJuBMPNHAof0D7N26l1lnz4ZmrqKodcDgYXKJOHlCBshsTP2HKz80ARKnjLEOEB5iKQj9nIRXx+FdIRtJH8t7aX5CKLNQa5cMYCVh75a9x39zTVQ2HcNs3AhwPww/BE8pR4DADwC2rN5+lACzxAy0dcJB5TxXCf/Qrg+dQKBgDPENn2qk6l+VW4B4GFhWGCrPDAICbmzHMDI2juStnZCl7jvNljXbaRYngJ46htn4EEDkceBDscMFW9fs4NK3D1FxW8TQCbR0wMBBSCqyKdQaUIQgQ4QEfn4/UvYtiwTUqH2A0mJQCL5oA8ArEUeIIaQItUGWQmcP6IrbD6BIDw+yde0OknKsGFcCGFipoK6gFhIA9u/vZ/v6ncy/YD40MtAKOnqg/4CkhTF5L6ldGSuKCBF+A0E4KOKZA5l/lZtBVEgAQrUu3xSlhfEIUnKVbPskSQVXNdvX72J/X3+R/a8bWDnuBLgb1jkz8NYIQVj//Fbmv2WOU/vOdrW0OWcwQcJCARUbWfUQZv80gEcGLKgQ+PIawOhrAgJyuUYQUuCDHMb6hDuIMVmu+mttkmpPLeuf34KBIgI8dQyr8SWAUP67RAhQAbau38WB7fuZPHuKXBHbOQUGjoD19u95DmEk5g8dPQKHsKTwoxib2JAMtpQMsYqhlzMo2SHUORmpsSTHfttjv3EhaA4jezIIgIF/UvCACtPCKGAoNax5dhNXv3uyK1gArZ0uMzgAmggBbLn6h/A9REyDHVsEIEJ4R1HsjMCIKoUh2KEpcKu/I3ekMzkuvuaZTQylpsj5GziGEcBJIcDdsHEFPAJ8IMam9S+8wrmXLaJ7RjekLofdMx129UtRw2UCo06eIh73C+Cj3wKm1Ni2hMlDQTQAYGKEiHj7QjJnPvPfzLpkWqI5vOMg6198pQywR45hdFL/ePSDcFsFvle0C/HCi+dzze0XQzOV1PDurblDmCTx+F7HQr4ISWJ1fxWz/+pVqv4CR1CeIyVhAH++YEtZlkLXJJgxX4pB1QpPfPcXPP/cFlqISwrL7obek6YBABL4kYVnFVwa0wIvHWXqkgvnMnXOVEhd/nrSdBg4LBGBt8LDur8NCBCq/yIiIATDvkoCqDDUC8fRXcPSx/4CCeGVtDqBSTNkU0gloW/rXl56cVshWBaePYbNa/Ln4x+C39XwP4v2kZ9xxgxu/sDlwnxdgUN9sHcb6CQS2rleSYgXnh0M/jsBq3jVj25HULk28AhQCnzxkTKArAnT50HPNDApAGjFj/9hFS+/vJsqcTHwoTvhf70mBFgBVfIK4YVEJANuuu0CFl80DxqZ3F21Z2tOhKRSoPaj5wGkP5ll4ND2x8lQ7gxGvH6PHFkGnZNg5nyZb6mw4fmt/OR7z5MU8/V54PLl0CSU8T8ZtByaX4fPJ/APFMjT//wSs+dNoa27DTLn3EyZBUODUB8EnSCVQMB6YMf3/ctY6gAyB2M+GBLPA4j6RvmOYCH48aqhyaBag6mzEdWvGdp/hKdXrqVMDHz+LgH/ZGsA+bNxs+HnCq4vMgVnnzWTt7/nItn6pJM8MbTjZdwGkkjoV6YBRuoIjtAU2JGfE4xvFinbJRS8l7zArEXQ0SVn/7Ti5999ntVrdtJSTNV/3gFvux/Ma0oAgK/D5RqeiN0gboEUuP6Gszj3ysXQSHOgkgocPgC7NgOOFLHTPUqDtdETwNKXev6jI4CKJ39ECq6thfimEWvlBJW1cNoC6J7sMn5ALWHdL7bwsx+vJikAyUJq4Jq7Cmr/J/Vw6F2wagV8CfhUjF0J8PTjLzN9Zjcz50+DZgY2ze3dtDm5T2AjiSFwYyi//0eJWmYMdYDo6g9tflwDlG4YkRNAM+bmtj916d7qsXLvfp5YuQ5VvkK/JOC/1gQQNf+5KixTsJRQ0EAjNaw8yuZl77+Utu5WFxpa6J6Ss37vdiRBVJbli5iEwhKwdNgxnA2Iqv4A/PKTRMbA9NOhZ2q+8o2FSsLQgUEe++GLDNVTqsX0XN2EzzFGUYyDrIBrgZ8p4uaqASycO4Wb330BlWoFMivq/+Bu2LtDdgl5W/wLzvuP8ghYOfLlN5bHAA+1gYwJN4lMmw2TZspegESRNTN+dNTub9q6v8zuN4Ebl8Pjv3kCSG7gTzV8tuys8tKzZnLDO5eitJZdQEmSh4a7t4AlOE8YAq19PCMkKFz63rMd7XHxEFxiqWEk1FMKZs5zK1+OxFtjeOxHq1m9bjct5V7/A3fCfQCnBgEkKvixgreXmAzOWzqL696xBFBgHAl0Av0HYfsmsOZEEkBBHgBHGiVAKDU+NLcRIiiQUFCN7MyAcRnQ0xdC12Qp8WoFWP7lp2t5cfVOqiPbl3GTxPynBAHkz8oleWg4r4wEb1lyGtfeeBZJkkBmRBMMHIE922B4UJJFUFANFCkvBpWxQUCOz5f6BmGyJ0vz6t6MOdDRnT9DrvbTjMcfXcev1+4qBd/CtibceA+8DHBqEUD8gd9S8P2yhdUEzlwwlRtuOoeW1ipkRnyCLIU9r+RmQXYQeWDGbgEbb36Xgx2PDKyrg0zLHb6k4kI/oKppDDV57CdrWL+5j+rIqHnLcvgBwClKgNAfKPMJ5s/q4cabl9De3QbN7MTs38F9sG8HNJuQJDIfLfOOeyo4Bm5x2dg6e19tgWmzYNJ0cfbIwR88PMyjP17Dlp2HaKFcDHz6TvH6T2ECiCb4cyX5gUJzMG1yO2+9/gxmzp0MqZGDJFpDow77dsLh/c43SHxgw/H4SzHg0out756Se/otNUn4KKCSsHvbflaufJl9BwepUi4WvrAc/jPA64MAQoIvK/h9SiQFWiqayy+bz3nnnw5KOb9AIgIGjkDfrryk7Mqmkvwp3QgyjoDLTR2BqlcqT+dOnQUdnW7eva9oMJYXX9jOqlVbaGSGysjA/8py+BjA64sAQoIHFdxFiRggA85ePI0rr1xAx6Q2aDptIPmBnAAH9ua9ycI0MieRAKH6l39DZ09u6zu6hSguYqCaMHBokKee3MxLG/aRAHpk4H99OdwN8PokgPgEX9TBn5yP1w56OmtcctEclpw9M185qQGQkjLA4BE4sM9tMmkCgNZeJDB+R8NE5GoXKlVo74bJ06C9C0DeYXH/dta+tJtf/PIVDvXXkbimWAz8xZ3whwCvbwKIJnhAwacpFzLAAPNn93DZpfOYMatHjkmBgG2BtJnnD44cgMEByFI5gaS0pwXsyNeFDVc6uEJWe2e+batzUk4CJcC78A60Ys+Owzzz7Ba27DiEBpKRU+6zy+EzAG8MAggJPq3ggVHUGahpxZlnzuAtS09j6vQOuX5G9gC4fQUmdxj7D7r+kDhfLukSPU4W1vClaqmUqPiW2jHQ815pB7qV3cKJBqBvbz+/Xr2L9ev3UDeW6uj0zWeWSwT1BiKAkOBW4KsKFiJSmjNoSzQLF0w5ToQZM7ogUS5iQMSBBU4zWCBrOjPhStFpM2/N+olgV2tQqebN2hz8jm5IqqDI50E2bDhBkwOfWfbsOXIU+N1s2tzHUGaojm4Lyibg3uXwCMAbkwCyj+BMBQ9qeAcjFAOkQE0p5s6dxOIFU5g7u4daRw0Q8yC3iYP02o3x7t0TQevwu/CAh7xPFKCoD9TZtuMQGzfvZ+u2g9StpQJoRi4Gfmrh7rtgPcAbmABhwkjlrYYnZY6iArrbW5g/ZxILFkzhtGmdVGqVHJjMAy3GfRVU+uIRhFZ5yyxpPWXXvn42HwV9yysHODzYxAKV0dcb6xY+5yV43jwEkFIyX/P+MvmotEIV6OpoYdZp3cyY3smMqR309LRSSTSqoiHREpML4HFCaIXLRWBTQ5oZDh0aZk/fAHv29rNz1xGODNRpQny1l4P/K+AeKem+SQkA8DXorMKngI8r6GSUYiWPgAaqWtHeWqG7s0ZXVyvdXS10HR13dNSoVROqVU1LS0UUANBopDSbhnozY2CgzpH+OoePNDhyZJjDR8eDwylNYzFAAuhXf960H/jLJnzhnnzMm5wAIn8F51fgfgXvYQxiXTOuOfVMRYFWCqXV8V4YAMZarLHH+9SKmdEC9ngcM/2nFO77KLyAyAQBQieRD+hcG1zFOIkteVYncWVYeNLAX94F36JcJggAcAckb4d3K7hXwQ28DsXCYxa++jP4zsOQAUwQYPSiHoLbgDsU3KJg6ikOeh/wAwvfuhN6PWUzQYCxyFdhdlXIcI2CtlME9CELTwAPN6H3XthBKBMEGOftZ2dreCtwrYIrgXkKaq8R4HVgq4WngMcNrLwbXuJ1KIo3gHwJ2tpgcZIT4WLgcuBsoEOBYuy1wAFygFcBz2Xw1BBs+CQM8ZuUCQLETy8bmKFgMbBYwSJgITAXmAR0AZO9PeMHgCPAQWAbsMnCRmCDhQ0a9shO3NefTMiETMiETMiETMiETMiETMiETMiETMiE/H+NKm6SUuq55AAAAABJRU5ErkJggg=="},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"GUMResource",{enumerable:!0,get:function(){return r.GUMResource}}),Object.defineProperty(t,"HAMResource",{enumerable:!0,get:function(){return o.HAMResource}}),Object.defineProperty(t,"SensorResource",{enumerable:!0,get:function(){return i.SensorResource}});var r=n(84),o=n(85),i=n(86)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GUMResource=void 0;var r,o=n(26);function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=new(((r=n(1))&&r.__esModule?r:{default:r}).default)("gum.js"),g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(s,e);var t,n,r,o=f(s);function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=o.call(this,e,t))._hasLocalVideoInput=!1,n._hasLocalAudioInput=!1,n._checkElapsedTime=0,n}return t=s,(n=[{key:"checkIfLocalUserMediaExists",value:function(){var e=this;return new Promise((function(t,n){e._nativeEnumerateDevices().then((function(n){n.forEach((function(t){switch(t.kind){case"videoinput":e._hasLocalVideoInput=!0;break;case"audioinput":e._hasLocalAudioInput=!0;break;case"audiooutput":break;default:d.error("Unknown device kind.")}})),t()})).catch((function(e){n(e)}))}))}},{key:"checkConstraintsType",value:function(e){return void 0!==e.video&&!1!==e.video?"CAMERA":void 0!==e.audio&&!1!==e.audio?"MIC":"NONE"}},{key:"checkLocalGumIsCallable",value:function(e){var t=this;return new Promise((function(n,r){try{void 0!==e.video&&!1!==e.video&&!1===t._hasLocalVideoInput&&n(!1),void 0!==e.audio&&!1!==e.audio&&!1===t._hasLocalAudioInput&&n(!1),n(!0)}catch(e){r(e)}}))}},{key:"printErrorMessage",value:function(e){d.error(e.name+": "+e.message)}},{key:"getUserMediaDeprecated",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=[].slice.call(n),i=o[0]||{},s=o[1],a=o[2],c=this.checkConstraintsType(i);"NONE"!==c?this.checkIfLocalUserMediaExists().then((function(){e.checkLocalGumIsCallable(i).then((function(t){e.startJob({feature:c,arguments:[i],successCallback:s,errorCallback:a,localGumIsCallable:t,nativeGetUserMedia:e._nativeGetUserMedia})})).catch((function(t){return e.printErrorMessage(t)}))})).catch((function(t){return e.printErrorMessage(t)})):a(new TypeError("The list of constraints specified is empty, or has all constraints set to false."))}},{key:"getUserMedia",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=[].slice.call(n),i=o[0]||{},s=this.checkConstraintsType(i);return new Promise((function(t,n){"NONE"!==s?e.checkIfLocalUserMediaExists().then((function(){e.checkLocalGumIsCallable(i).then((function(r){e.startJob({feature:s,arguments:[i],successCallback:t,errorCallback:n,localGumIsCallable:r,nativeGetUserMedia:e._nativeGetUserMedia})})).catch((function(t){return e.printErrorMessage(t)}))})).catch((function(t){return e.printErrorMessage(t)})):n(new TypeError("The list of constraints specified is empty, or has all constraints set to false."))}))}},{key:"checkAndAddRemoteMediaDeviceInfos",value:function(e,t,n){try{var r=this._workerManager.getWorkerInfos();if(!r.size&&this._checkElapsedTime<3e3)return setTimeout(this.checkAndAddRemoteMediaDeviceInfos.bind(this),500,e,t,n),void(this._checkElapsedTime+=500);r.forEach((function(t,n,r){t.mediaDeviceInfos.forEach((function(t){e.push(t)}))})),t(e)}catch(e){n(e)}}},{key:"injectOffloadAPI",value:function(){var e=this;d.debug("inject getUserMedia API"),this._nativeGetUserMediaDeprecated=navigator.getUserMedia.bind(navigator),this._nativeGetUserMedia=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices),navigator.getUserMedia=this.getUserMediaDeprecated.bind(this),navigator.mediaDevices.getUserMedia=this.getUserMedia.bind(this),this._nativeEnumerateDevices=navigator.mediaDevices.enumerateDevices.bind(navigator.mediaDevices),navigator.mediaDevices.enumerateDevices=function(){return new Promise((function(t,n){e._nativeEnumerateDevices().then((function(r){e.checkAndAddRemoteMediaDeviceInfos.call(e,r,t,n)})).catch((function(e){n(e)}))}))}}},{key:"startJob",value:function(e){var t=e.arguments[0];if(t.hasOwnProperty("video")&&null!==t.video.deviceId){var n=t.video.deviceId;"object"===a(t.video.deviceId)&&t.video.deviceId.hasOwnProperty("exact")&&(n=t.video.deviceId.exact);var r,o=this._workerManager.getWorkerInfos(),c=i(o.keys());try{for(c.s();!(r=c.n()).done;){var l,f=r.value,h=i(o.get(f).mediaDeviceInfos);try{for(h.s();!(l=h.n()).done;)if(l.value.deviceId===n)return void u(p(s.prototype),"startJobImpl",this).call(this,f,e)}catch(e){h.e(e)}finally{h.f()}}}catch(e){c.e(e)}finally{c.f()}}u(p(s.prototype),"startJob",this).call(this,e)}}])&&c(t.prototype,n),r&&c(t,r),s}(o.Resource);t.GUMResource=g},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.HAMResource=void 0;var o,i=n(26);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=new(((o=n(1))&&o.__esModule?o:{default:o}).default)("ham.js"),h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(i,e);var t,n,r,o=c(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t))._listenerId=0,n}return t=i,(n=[{key:"start",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=[].slice.call(t);this.startJob({feature:r[0],successCallback:r[1]})}},{key:"stop",value:function(e){this.stopJob(e)}},{key:"addGestureRecognitionListener",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=[].slice.call(t);return this.startJob({feature:"GESTURE",successCallback:r[1],errorCallback:r[2]}),++this._listenerId}},{key:"injectOffloadAPI",value:function(){"undefined"==typeof tizen&&(window.tizen={}),void 0===tizen.ppm&&(tizen.ppm={},tizen.ppm.requestPermission=function(){var e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1];t("PPM_ALLOW_FOREVER",e)},tizen.ppm.requestPermissions=function(){var e=arguments.length<=0?void 0:arguments[0],t=[];e.forEach((function(e){var n={};n.privilege=e,n.result="PPM_ALLOW_FOREVER",t.push(n)}));var n=arguments.length<=1?void 0:arguments[1];return n(t),t},tizen.ppm.checkPermission=function(){return"PPM_ALLOW"},tizen.ppm.checkPermissions=function(){var e=arguments.length<=0?void 0:arguments[0],t=[];return e.forEach((function(e){var n={};n.privilege=e,n.type="PPM_ALLOW",t.push(n)})),t}),tizen.humanactivitymonitor||(f.debug("inject tizen.humanactivitymonitor API"),tizen.humanactivitymonitor={},tizen.humanactivitymonitor.start=this.start.bind(this),tizen.humanactivitymonitor.stop=this.stop.bind(this),tizen.humanactivitymonitor.addGestureRecognitionListener=this.addGestureRecognitionListener.bind(this))}}])&&s(t.prototype,n),r&&s(t,r),i}(i.Resource);t.HAMResource=h},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.SensorResource=void 0;var o,i=n(26);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=new(((o=n(1))&&o.__esModule?o:{default:o}).default)("sensor.js"),h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(i,e);var t,n,r,o=c(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t))._type=null,n._intervalID=null,n._started=!1,n}return t=i,(n=[{key:"_convertSensorDataName",value:function(e){return e.split("_").map((function(e){return"HRM"===e?e:(e=e.toLowerCase()).charAt(0).toUpperCase()+e.slice(1)})).join("")}},{key:"_start",value:function(){var e=this;if(f.debug("start"),this._started)f.debug("sensor is already started");else{for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=[].slice.call(n);this.startJob({feature:"SENSOR",arguments:["start",this._type],successCallback:o[0],errorCallback:o[1],resolver:function(){e._started=!0}})}}},{key:"_stop",value:function(){f.debug("stop"),this._started&&(this.stopJob("SENSOR"),this._started=!1,null!==this._intervalID&&clearInterval(this._intervalID))}},{key:"_getSensorData",value:function(e,t){f.debug("getSensorData"),this.startJob({feature:"SENSOR",arguments:["getSensorData",this._convertSensorDataName(this._type)],successCallback:e,errorCallback:t})}},{key:"_setChangeListener",value:function(e,t,n){var r=this;f.debug("setChangeListener interval:".concat(t));var o=t||100;o<10?o=10:t>1e3&&(o=1e3),this._intervalID=setInterval((function(){r._started&&r.startJob({feature:"SENSOR",arguments:["getSensorData",r._convertSensorDataName(r._type)],successCallback:e})}),o)}},{key:"_unsetChangeListener",value:function(){f.debug("unsetChangeListener"),null!==this._intervalID&&clearInterval(this._intervalID)}},{key:"injectOffloadAPI",value:function(){var e=this;"undefined"==typeof tizen&&(f.debug("tizen is undefined"),window.tizen={}),void 0===tizen.sensorservice&&(f.debug("inject tizen.sensorservice API"),tizen.sensorservice={},tizen.sensorservice.getDefaultSensor=function(){var t={};return t.sensorType=e._type=arguments.length<=0?void 0:arguments[0],t.start=e._start.bind(e),t.stop=e._stop.bind(e),t["get".concat(e._convertSensorDataName(e._type),"SensorData")]=e._getSensorData.bind(e),t.setChangeListener=e._setChangeListener.bind(e),t.unsetChangeListener=e._unsetChangeListener.bind(e),t})}}])&&s(t.prototype,n),r&&s(t,r),i}(i.Resource);t.SensorResource=h}]).default;
\ No newline at end of file
+var n,r,o,i=String.fromCharCode;function s(t){for(var e,n,r=[],o=0,i=t.length;o<i;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<i?56320==(64512&(n=t.charCodeAt(o++)))?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--):r.push(e);return r}function a(t,e){if(t>=55296&&t<=57343){if(e)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function c(t,e){return i(t>>e&63|128)}function u(t,e){if(0==(4294967168&t))return i(t);var n="";return 0==(4294965248&t)?n=i(t>>6&31|192):0==(4294901760&t)?(a(t,e)||(t=65533),n=i(t>>12&15|224),n+=c(t,6)):0==(4292870144&t)&&(n=i(t>>18&7|240),n+=c(t,12),n+=c(t,6)),n+=i(63&t|128)}function f(){if(o>=r)throw Error("Invalid byte index");var t=255&n[o];if(o++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function l(t){var e,i;if(o>r)throw Error("Invalid byte index");if(o==r)return!1;if(e=255&n[o],o++,0==(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|f())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|f()<<6|f())>=2048)return a(i,t)?i:65533;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|f()<<12|f()<<6|f())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}t.exports={version:"2.1.2",encode:function(t,e){for(var n=!1!==(e=e||{}).strict,r=s(t),o=r.length,i=-1,a="";++i<o;)a+=u(r[i],n);return a},decode:function(t,e){var a=!1!==(e=e||{}).strict;n=s(t),r=n.length,o=0;for(var c,u=[];!1!==(c=l(a));)u.push(c);return function(t){for(var e,n=t.length,r=-1,o="";++r<n;)(e=t[r])>65535&&(o+=i((e-=65536)>>>10&1023|55296),e=56320|1023&e),o+=i(e);return o}(u)}}},function(t,e){!function(){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),r=0;r<t.length;r++)n[t.charCodeAt(r)]=r;e.encode=function(e){var n,r=new Uint8Array(e),o=r.length,i="";for(n=0;n<o;n+=3)i+=t[r[n]>>2],i+=t[(3&r[n])<<4|r[n+1]>>4],i+=t[(15&r[n+1])<<2|r[n+2]>>6],i+=t[63&r[n+2]];return o%3==2?i=i.substring(0,i.length-1)+"=":o%3==1&&(i=i.substring(0,i.length-2)+"=="),i},e.decode=function(t){var e,r,o,i,s,a=.75*t.length,c=t.length,u=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var f=new ArrayBuffer(a),l=new Uint8Array(f);for(e=0;e<c;e+=4)r=n[t.charCodeAt(e)],o=n[t.charCodeAt(e+1)],i=n[t.charCodeAt(e+2)],s=n[t.charCodeAt(e+3)],l[u++]=r<<2|o>>4,l[u++]=(15&o)<<4|i>>2,l[u++]=(3&i)<<6|63&s;return f}}()},function(t,e){var n=void 0!==n?n:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,r=function(){try{return 2===new Blob(["hi"]).size}catch(t){return!1}}(),o=r&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(t){return!1}}(),i=n&&n.prototype.append&&n.prototype.getBlob;function s(t){return t.map((function(t){if(t.buffer instanceof ArrayBuffer){var e=t.buffer;if(t.byteLength!==e.byteLength){var n=new Uint8Array(t.byteLength);n.set(new Uint8Array(e,t.byteOffset,t.byteLength)),e=n.buffer}return e}return t}))}function a(t,e){e=e||{};var r=new n;return s(t).forEach((function(t){r.append(t)})),e.type?r.getBlob(e.type):r.getBlob()}function c(t,e){return new Blob(s(t),e||{})}"undefined"!=typeof Blob&&(a.prototype=Blob.prototype,c.prototype=Blob.prototype),t.exports=r?o?Blob:c:i?a:void 0},function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,o=+new Date,i=o-(n||o);t.diff=i,t.prev=n,t.curr=o,n=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=e.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;c++;var o=e.formatters[r];if("function"==typeof o){var i=s[c];n=o.call(t,i),s.splice(c,1),c--}return n})),e.formatArgs.call(t,s);var u=r.log||e.log||console.log.bind(console);u.apply(t,s)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=o,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function o(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var n;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var i=e.instances[n];i.enabled=e.enabled(i.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(227),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e,n){(function(e){var r=n(324),o=n(174);t.exports=u;var i,s=/\n/g,a=/\\n/g;function c(){}function u(t){r.call(this,t),this.query=this.query||{},i||(e.___eio||(e.___eio=[]),i=e.___eio),this.index=i.length;var n=this;i.push((function(t){n.onData(t)})),this.query.j=this.index,e.document&&e.addEventListener&&e.addEventListener("beforeunload",(function(){n.script&&(n.script.onerror=c)}),!1)}o(u,r),u.prototype.supportsBinary=!1,u.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),r.prototype.doClose.call(this)},u.prototype.doPoll=function(){var t=this,e=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),e.async=!0,e.src=this.uri(),e.onerror=function(e){t.onError("jsonp poll error",e)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(e,n):(document.head||document.body).appendChild(e),this.script=e,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout((function(){var t=document.createElement("iframe");document.body.appendChild(t),document.body.removeChild(t)}),100)},u.prototype.doWrite=function(t,e){var n=this;if(!this.form){var r,o=document.createElement("form"),i=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index;o.className="socketio",o.style.position="absolute",o.style.top="-1000px",o.style.left="-1000px",o.target=c,o.method="POST",o.setAttribute("accept-charset","utf-8"),i.name="d",o.appendChild(i),document.body.appendChild(o),this.form=o,this.area=i}function u(){f(),e()}function f(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(t){n.onError("jsonp polling iframe removal error",t)}try{var t='<iframe src="javascript:0" name="'+n.iframeId+'">';r=document.createElement(t)}catch(t){(r=document.createElement("iframe")).name=n.iframeId,r.src="javascript:0"}r.id=n.iframeId,n.form.appendChild(r),n.iframe=r}this.form.action=this.uri(),f(),t=t.replace(a,"\\\n"),this.area.value=t.replace(s,"\\n");try{this.form.submit()}catch(t){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&u()}:this.iframe.onload=u}}).call(this,n(53))},function(t,e,n){(function(e){var r,o=n(230),i=n(118),s=n(173),a=n(174),c=n(325),u=n(175)("engine.io-client:websocket"),f=e.WebSocket||e.MozWebSocket;if("undefined"==typeof window)try{r=n(566)}catch(t){}var l=f;function h(t){t&&t.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=t.perMessageDeflate,this.usingBrowserWebSocket=f&&!t.forceNode,this.protocols=t.protocols,this.usingBrowserWebSocket||(l=r),o.call(this,t)}l||"undefined"!=typeof window||(l=r),t.exports=h,a(h,o),h.prototype.name="websocket",h.prototype.supportsBinary=!0,h.prototype.doOpen=function(){if(this.check()){var t=this.uri(),e=this.protocols,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket?e?new l(t,e):new l(t):new l(t,e,n)}catch(t){return this.emit("error",t)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},h.prototype.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.onOpen()},this.ws.onclose=function(){t.onClose()},this.ws.onmessage=function(e){t.onData(e.data)},this.ws.onerror=function(e){t.onError("websocket error",e)}},h.prototype.write=function(t){var n=this;this.writable=!1;for(var r=t.length,o=0,s=r;o<s;o++)!function(t){i.encodePacket(t,n.supportsBinary,(function(o){if(!n.usingBrowserWebSocket){var i={};if(t.options&&(i.compress=t.options.compress),n.perMessageDeflate)("string"==typeof o?e.Buffer.byteLength(o):o.length)<n.perMessageDeflate.threshold&&(i.compress=!1)}try{n.usingBrowserWebSocket?n.ws.send(o):n.ws.send(o,i)}catch(t){u("websocket closed before onclose event")}--r||a()}))}(t[o]);function a(){n.emit("flush"),setTimeout((function(){n.writable=!0,n.emit("drain")}),0)}},h.prototype.onClose=function(){o.prototype.onClose.call(this)},h.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},h.prototype.uri=function(){var t=this.query||{},e=this.secure?"wss":"ws",n="";return this.port&&("wss"===e&&443!==Number(this.port)||"ws"===e&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(t[this.timestampParam]=c()),this.supportsBinary||(t.b64=1),(t=s.encode(t)).length&&(t="?"+t),e+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+t},h.prototype.check=function(){return!(!l||"__initialize"in l&&this.name===h.prototype.name)}}).call(this,n(53))},function(t,e){},function(t,e){t.exports=function(t,e){for(var n=[],r=(e=e||0)||0;r<t.length;r++)n[r-e]=t[r];return n}},function(t,e){function n(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}t.exports=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}},function(t,e,n){var r=n(570);t.exports=r},function(t,e,n){var r=n(34),o=n(571),i=Array.prototype;t.exports=function(t){var e=t.some;return t===i||r(i,t)&&e===i.some?o:e}},function(t,e,n){n(572);var r=n(51);t.exports=r("Array").some},function(t,e,n){"use strict";var r=n(15),o=n(83).some;r({target:"Array",proto:!0,forced:!n(224)("some")},{some:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){n(330);var r=n(21);t.exports=r.setTimeout},function(t,e,n){var r=n(575);t.exports=r},function(t,e,n){var r=n(34),o=n(576),i=Array.prototype;t.exports=function(t){var e=t.filter;return t===i||r(i,t)&&e===i.filter?o:e}},function(t,e,n){n(577);var r=n(51);t.exports=r("Array").filter},function(t,e,n){"use strict";var r=n(15),o=n(83).filter;r({target:"Array",proto:!0,forced:!n(160)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){n(330);var r=n(21);t.exports=r.setInterval},function(t,e,n){var r=n(580);n(66),t.exports=r},function(t,e,n){n(71),n(82),n(581),n(109);var r=n(21);t.exports=r.Set},function(t,e,n){"use strict";n(165)("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(315))},function(t,e,n){var r=n(583);t.exports=r},function(t,e,n){n(584);var r=n(21);t.exports=r.Reflect.construct},function(t,e,n){var r=n(15),o=n(56),i=n(98),s=n(316),a=n(302),c=n(47),u=n(26),f=n(94),l=n(20),h=o("Reflect","construct"),p=Object.prototype,d=[].push,v=l((function(){function t(){}return!(h((function(){}),[],t)instanceof t)})),g=!l((function(){h((function(){}))})),y=v||g;r({target:"Reflect",stat:!0,forced:y,sham:y},{construct:function(t,e){a(t),c(e);var n=arguments.length<3?t:a(arguments[2]);if(g&&!v)return h(t,e,n);if(t==n){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 r=[null];return i(d,r,e),new(i(s,t,r))}var o=n.prototype,l=f(u(o)?o:p),y=i(t,l,e);return u(y)?y:l}})},function(t,e,n){t.exports=n(586)},function(t,e,n){var r=n(587);t.exports=r},function(t,e,n){var r=n(588);t.exports=r},function(t,e,n){var r=n(589);t.exports=r},function(t,e,n){n(590);var r=n(21);t.exports=r.Reflect.get},function(t,e,n){var r=n(15),o=n(50),i=n(26),s=n(47),a=n(591),c=n(78),u=n(136);r({target:"Reflect",stat:!0},{get:function t(e,n){var r,f,l=arguments.length<3?e:arguments[2];return s(e)===l?e[n]:(r=c.f(e,n))?a(r)?r.value:void 0===r.get?void 0:o(r.get,l):i(f=u(e))?t(f,n,l):void 0}})},function(t,e,n){var r=n(33);t.exports=function(t){return void 0!==t&&(r(t,"value")||r(t,"writable"))}},function(t,e,n){t.exports=n(593)},function(t,e,n){var r=n(594);t.exports=r},function(t,e,n){var r=n(595);t.exports=r},function(t,e,n){var r=n(596);t.exports=r},function(t,e,n){n(597);var r=n(21).Object,o=t.exports=function(t,e){return r.getOwnPropertyDescriptor(t,e)};r.getOwnPropertyDescriptor.sham&&(o.sham=!0)},function(t,e,n){var r=n(15),o=n(20),i=n(65),s=n(78).f,a=n(39),c=o((function(){s(1)}));r({target:"Object",stat:!0,forced:!a||c,sham:!a},{getOwnPropertyDescriptor:function(t,e){return s(i(t),e)}})},function(t,e,n){var r=n(48);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(600);t.exports=r},function(t,e,n){var r=n(601);t.exports=r},function(t,e,n){var r=n(602);t.exports=r},function(t,e,n){n(603);var r=n(21);t.exports=r.Object.setPrototypeOf},function(t,e,n){n(15)({target:"Object",stat:!0},{setPrototypeOf:n(164)})},function(t,e,n){t.exports=n(605)},function(t,e,n){var r=n(606);t.exports=r},function(t,e,n){var r=n(607);t.exports=r},function(t,e,n){var r=n(608);t.exports=r},function(t,e,n){n(609);var r=n(21);t.exports=r.Object.getPrototypeOf},function(t,e,n){var r=n(15),o=n(20),i=n(80),s=n(136),a=n(292);r({target:"Object",stat:!0,forced:o((function(){s(1)})),sham:!a},{getPrototypeOf:function(t){return s(i(t))}})},function(t,e,n){t.exports=n(611)},function(t,e,n){var r=n(612);t.exports=r},function(t,e,n){var r=n(613);t.exports=r},function(t,e,n){var r=n(614);t.exports=r},function(t,e,n){n(615);var r=n(21).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){n(15)({target:"Object",stat:!0,sham:!n(39)},{create:n(94)})},function(t,e,n){var r=n(331);function o(e,n){return t.exports=o=r||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,o(e,n)}t.exports=o,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(618);t.exports=r},function(t,e,n){var r=n(34),o=n(619),i=Array.prototype;t.exports=function(t){var e=t.map;return t===i||r(i,t)&&e===i.map?o:e}},function(t,e,n){n(620);var r=n(51);t.exports=r("Array").map},function(t,e,n){"use strict";var r=n(15),o=n(83).map;r({target:"Array",proto:!0,forced:!n(160)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return w}));var r=n(40),o=n.n(r),i=n(41),s=n.n(i),a=n(10),c=n.n(a),u=n(2),f=n.n(u),l=n(11),h=n.n(l),p=n(8),d=n(338),v=n.n(d);function g(t,e,n){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,n)}var y="[socket-web]",m=new h.a,b=new h.a,w=function(){function t(){o()(this,t),g(this,m,{writable:!0,value:null}),g(this,b,{writable:!0,value:null}),p.debug(y,"SocketWeb created")}return s()(t,[{key:"id",get:function(){return f()(this,b).id}},{key:"on",value:function(t,e){p.debug(y,"on: ".concat(t)),f()(this,b).on(t,e)}},{key:"emit",value:function(t,e){p.debug(y,"emit: ".concat(t)),f()(this,b).emit(t,e)}},{key:"connect",value:function(t){p.debug(y,"connect url:".concat(t)),c()(this,m,t),c()(this,b,v()(t,{transports:["websocket","polling"]}))}},{key:"close",value:function(){p.debug(y,"close"),f()(this,b).close()}}]),t}()},function(t,e,n){"use strict";e.a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAn5ElEQVR4Xu2dC7RdVXnvf99ce5933iQQkkBIQAiCgGCKEBVBKW+R1gdtrbW9bQIV7R212jF8MARu3721igjXoa3V21rtS5uArYigoBjQgrxDHkASyPMBOc+995rf5c4x15hjjrnX2ifJIQR6vj322WvPOXcYrP9/fu+1Fv9tZFImZVImZVImZVImZVImZVImZVImZVKEV6PcQp0Gs8lYjLj3MSiLEOYDM4B+9ynUAFBawG5gCNiDshFhPcoGlHXkrKOL7SynOUmAQ1H+kl66WUTGmQivR1mKcALQh2A4EFEsMIzyOMJqlJ+Rcy9jrOf3GZkkwMslX+A44BwMZ6O8ETgaoZuDIcoY8DTCj7HcA9zJVTw5SYCXXrXPRbkU+GVgGUIvh4IoI8DdwD/RZCXX8OwkASZOhJu5BHgXcBHCLA5lUXYCtwLfZAUrAZ0kwP7Iu8g4l8sQPoRwDq9EUe5E+Sx38G2+ST5JgPHb93d74M9mokTDZ6XIxJ8ZlHscEa7iG5MEqLbxJ6N8GuGdBwy0DW8EqEO9VqMmNYwYMskQj7KiWLXkmrt3o9WEJqCACe8DJobyrwjXspyHOETEcCjIjQzwBa5HuWe/wFcgB8YACz21bhZMn8f5x53D/zj9fXx82Uf52oVf5LtX/Dt3v/u73PfeH/DAlT/hwV+5z71fPGb1i2P3vDj33Su+7da++JsXf/vr7t948d9y/yYWGAPy/bPsjtjKPe7/9UYGJjUAwC0sQ7kR4ZR9Bt0COZguYeH0o3nzvLN4/exTOePw05jXP58ptQF66aVOFy1a5Fi0eCXYCOI/MzJqZDRpMMIIg61BNg1t4v6t/8XPtj/ADzb/iKf2PI1tKGSA2Y8zqTyI8EGWc/d/XwLczCeAT+xT/K5AE8jg6Bnz+cWF5/KOYy7mpFknMas2y4HXoOngBkURQAPEAfAEkdhNsMUqBBwluqiRk7OztYuHdz7Etzbcyn889T2e3r0JcqAOyD7nE25gBTe82gmQJnGEmxDexnjFAi3o7uvi4oVv59JFF/Gm+WdxeO1wFGWMBlYVAmyIePjCCJ1FUGygBIqqAvhxwYjQRZ0Mw9bWVn6w6W7+ff13WPXUfzI23IDaPhpX5XaUq10y6VVPgFu4GOVzCMfsC/B9/b2889iL+a3Xvo9TZ57iduQYY+RqY9ARgJABlgCkXxXATfSB+HXFaoOgqPpfBJcR/LGRjB66yGnxwK6f86VH/o5/WbuK4aGRfSOCsgHhGpaz6tVLgFv4JHDdvqj63r4efmXJL/H+E6/kpGmvxaI0tBGUOgIYD53GuxcCsAlJEgk7PhrRQCgUQxbNBnJBl3SRITz0/MN85dF/4B8e+2eGh0f31TR8iuVc/+ojwM0uvPsUHSV42ecuWsbH3vBhls46gwYtmtpsC6QlL8APs5hoJRiA1A+I9zZBNCYE1o8UdDPuFROnIEKdOnXu23k/f3LfZ7hj/d2FIzE+Ua5jBde+eghwM3+O8JHx7vpjDlvA/3zDVVyx+DK66GJExxDwJ10KO+2At9gCcA9ofFx8xjs//pTUBYzAjwD2b+vXGR83GEyY8Uc90k2DBv+y7tv81X1fYMOOjePXBspfsII/4CWW7CCA/3mED49r11v4pZMu4fNv+zOWzTmTMRpu10u822nRIKeJkqe7ui2vpeSbhneAPdEK0bf42JOw5T6ByMdo0UAFTp95Chceex47mzt5dOsavBqpFuEsLmEOK7n1lasBbuGvgQ/RSVow0N3HH571IX5jya8CODsv7mXc25I76BUbxoMpSFU+EmuBcOyDQ0ntPxKRISWExYY5/00LYgJaZBEQTEERFHVmQYC/eezv+ZMf/TWDY8NQYzzyWZbz4VdeJvAW/nhc4DdgyZxj+eplN/HbS37dAT9mx3DiwWow6lIyllZQ0cmu1HCcjgE2jKUrU7sfjrDF7yNiKF48EQQFR9IxRmgyGvkkDTvGmDbd/+PXLrvJ/T/TYDzyIXcuX1Em4At8fFwOXwPOPuYMvnjB/+aEaa9h0A4DivhXTtOdSEtejCV+feLWSaTio7VVqk+TI0XLjIIGeth03o+3nJkCIm3Q0DEWDhzN+YvewiO7H2PjzmfHg8IyLqbFKn546BPgJi4k40vjcfYuOOGtfO68P2JG9wyG7Wjw3sEB36KR2vj0bwKnCuF3SOLdCyWS2v70WB3oSKItAl1iD6HhPg1Z0Gg6xtT6FM4/5hw2DD3N2m1PdU4nC+dyEatZxVomUGoTDP4iMm4eT+HmPadcxnVnf5S66WbEgW/Aq9BCfRoyFEWivQWmgCnAiwSgEQ2K2kQk0HBcKVoa6ys2GQ/zNokmAGcUcprU6PZEgFE7Sl+9n8+cewNTu/+Mf3zoW5BVk8Cd2xs5jw+y9tDTANdimMI3EE7rtPN/5dTLuWHZH2Iko2Gb3p3z9lO9GRATQjQ/H0fwEs1W+/3B/esg5eo/jQbS0DCsbm8UtIGIYDCAkmuLmsk47+g3sb2xg4c3P95JE0zDcAqX8n9ZiT20CHAlH8fwW1RJE9550gVcv+xjuK+2VQBJjqu9RfCmCZug9hGQVLGH1E4860crJV2b5AKqHU+0kwNqvVkThAxQWpojIpwz/41sHnmWx7esrUZFWIiirOTOQ4cAN/NG4EsItUqHb9Eb+Iu3XkvN1Gh58AVo0fDgS2rdw2hq8aW0gSfJ+Usc3lWBX+IDkEQMKfgWIAY9zTF4EoDxJMg1JzMZb15wJg/tepRndnRwDIWzuJTvs5JnXn4C/Dn9dPMthCOr4vzj5izk87/4R0zrnkrDNgpgaTJGQ0diaCWGUxNNEESTldLe4ZP0l+k7zKmShpxRYJiYgsrQ1BbHaoskESKKoVaQgO5aF2fPP4MfPvcTdr6wpwqdDOVM3sJX+C7Nl5cAv8x1CFdUZfj6unv4q7dfy/HTj2UkH/NACk0aDnxJavUxCdKkbhDpmPdTSL5rp/EY8JgGFeBrCfjWgx//Cy2aiFA4u84nmN41jRPnHMd/bLiTsWajPFMjzKYbw0q+9/IR4CZOw/BlIKvq2vnI2b/DpYvOZ6g1XIBNy8E/nMTz5XG7BFBEkDSLVxL/R2PjJoOmZEicwk5+AB76aH0wDUETYDDUUKxzio8emM/0vincseFHMcNT+QUu5DvcyrMHlwDB6/86wqIq1X/RknP4yNIVzttX1Kd1W4zqYKruPYgaU6LK/ldLSZIGqFb/4Tj16tOIIIxpAnQCfkwurwl0zDepGhR19Y+TDzuBp4c2s2bL+mpTAMdzBn/HXejBJcB7eRemosKXw7wZh/OX532SvlofTW0VsTojOohiI+WekECqKvegpQ5fEBVK1HoqpL0AYUwj+GPQo3xgBfgakSfRCS2a1KQOCBaLGOGUOUu4feMP2TsyVGUKjqafR1nFIwePALdQB76CMLfiXPKJN13DGUecwkhrDBEBcHF+rk3/XRAFJCVBustTxR5gT4mQiCT7NXkno0qANVkV7eZqH0AtEvkDgRSKgihWXVWRTLoAXJQ0s2cG03uncHvRTyCUyXFcypdZiT04BLiU9yL8bpXqf8viX+BDZ3yA0byBxh5/2PeJ11+i/hOAi99oWypIhytBpCIK0ArzoaWJIFAtI4CFuFMAaG8qWrQQDBm1whRw/KzFPL57LU9t31SOlnAE8DgreeilJ8C11BjgiwjzaCcWenu6uf6c32dO3yyaeQsRgyVnVPeiqhBl+fynlLt/MTGI10gCcAxUDGa6nzuOAgkFYiqgSexfSYaw+9P1OQ0yqSMIqpa6yVgwbS63briDViunwiYexen8DXdhX1oCvIeLKm1/E6547QW864SLneovIB1lkFwdwxEoTAIlwV4skg6kOzb+JmUOoFDtBGoEWVuKgG1HjARM1IZv2OgIbPobLdrbLDW6UNSZgvlT5rJ1eAePPLumSgvMo4/7WMWal5YAl3I9wmvLdv9AXx+fXHYNU7sHnF0ryrqjOkSs9kGre3nicSlxABMPXtrufC2PACpyAInzF32ms0Hdo0HBk9DAJg6jakEK3PkykoVimCjzph7Oqg3fp9FslmsBocZK/mkiCZBW+4S/Qugqs/2Xn/h2Ln/N+Yy2QlPHiN2LxSJxyEcqnhTpFFq5+xUVvFSlbkCrE0FhPvkeQ462s+sWwmikMZJoIFpjieiiLilEXbqKegGH9x/GlqFtPPLck1WoLeQivs4qdr80BLiE38BwaQlydHXV+ehZy5nZO43c5j7hM8YYI0k9DyQ+rNAFmgQHaftWWGAh0RBaEurZhBZtfYDKHiQL2OqQryw81NRwFGtymmRkPkGkiAiz+qazav0d5NaCkIrQhfAMK/nxS0OAS/ljhIWlnv+ipbz3xEto5A3UYzKie7GSe6cmDfHCdwKEGpNDUiK0re2rxpoggEJ1wBeTIVHsCbgSOX0xPcIODwRRsFhUwm/QkCskcgqLdUpOTk26UbXkXgs8sXs9G6oiAuhhJX878QS4ieMR/ldpxU9gxRlXsmjGUTTyprf9DUYZblvNk4Bs2toBYUy0fRjY4co+laSAW54GTsPJ1PNPvH3bNjhMtcF4ehZt2zSxJSeTGhkZFks9q2NEuN2niEtkLhfxTVaxc2IJcBnvLL10O4ejZs5lxWlXIhIU9KgOkdOK+nI1Uf8O+MRAJCBL5CVEKxKnLakG+l3b+RUTSQO0pcQI46lDWAl+cAatpqaiIICqUpduXyyyzO6dyZ0bf8Lzw4NgShxBw4Os5GcTS4BL+L3SS7hbcMHxb+bchW/0ux+sWKf+450rsc0PbVrj9frbQy3B++/Q2Dnud/GiKuOnpHOQOHkkvkH7UBBNf2e9GRDEmYEp3f1s2ruFh5+tcAaV51nJv04cAa6lh6n8MTATUjSkJvz2ae9m7sAcWj70a+gIDR1F3CsGPpUwr4B08voFNFmZ7tV0xzJO8KuJoMmaAFcAkeoUsaaFIYslzActIGRk1N23zBiMCN956oegpadzgNP5P9xFa2II8G5ORPgokiodLMydOpvfPPWXMBLaNcd0kBxHBlAN4IsSUASNgI+1gyKIupng+EVkine+qib+gEpVu0b6stgUZE2rghQOXXD+UlOgikoYtzH4wT+Q2GlUDev8nDMDYMnVuhzL9576MYOjw2BIRZlKH//MrWydGAK8g0sRLi9T/8sWnsb5i87G9fg5vHNX8YMAGiJoRX1exI+UXrkDSAQtpMeAtlf9EtZ23vmAalkKOBkBG3+iSW2g0hFs5wSqjZzBLukGETfe19XDEzvXs3bbM+0RFAyGnzk/YEIIcDHLEU4vi/8vX3Ierz3sOJq2CRjGnPofiYo9Whr/V3frq4Ak+zr5mxAEtLoWkL5KfIiEIG0BBguQJoA0voAkLRVb0GAASIjgzYAYanS54+6szo7h3fxo4wPlZWLLFlax8kAIEIo/U/i0rzgl4Gf1jPe/7nKm90zBqgVxJd+i0wUgydKlYZ7EYPl4XkqjAK9yQ80/IYVK6VW+pS+S+bTaF4AKADmRDl3CqiA2IkdUFFJQP58WjCyuRij1YgYRuHX9D1GrICXYns6XuAt7YAS4giOpcW3b9K/CnP4ZXPnai6mZrFBmLvUbii8VOzyAD+l89NsAjqRKX7QiBRzWakfnL3Xg8ICnWQUC+B3ie7Dpv51qgnLToIpVS5f0AOLWdpkuvrfhRwyNjZQRYApd/C3f4YUDI8BlLEX4TSRFiBxOPHwx5y8+GwFUBUUZtYOR16+pxgeRkhpecBjL7LySsL48dZtQwpaEhAlAafyftnXFmb32PkMgkpKQLXIQNSFDpAm6pa+gD7Wsxk+3PMKze7aVmYE6httYxfoDI8Alrvx7UZkD+Ib5J7HsqNc7BxCFFk3GdAjV8no9SGIaYnsuBQfiS8M0NIVGNjvJ+tG+WUNCwEWpso9Vt5UAeJLxC+DEKl/ahX0a1khCtsSnSLqHcAkhBINiXQv5I9vX8sTWDWWOoIArD68+sGsDhaMr5pjdPwMjglVLRkZTR8k196Q0Hg3rQTcoIGIRBFEBBMUgAOQYDIjFFvOAXw2AW6s5IsVvc9Awr6GvIMkbigpUtY0lhsbzobS8DCRhIDEpoDQhFEhgYw2QRgRYrMur9EoNq4oRmN03A6QzdgdGAJhfeqYymNM/nVbegoKz6tksCmoBE4JBDyUIiviXceP4cSvWARXWEI4lVPtQicDWKOFM9F0lRHahBqEkohJpCiBJB3dONVGaAg6qnraZQjSMpaSxqOZFQclVW+f0z4Ss3IVCWTARBDiCEjGZuCt9cs2jDLZ7q4AEMARTgAxuzgAadmkBpBoHdBgJ8Iq60UAG8LNhHMJ4ACRoBOs1QSrBNIgSwAxsSuBO0s0aSJF6/eBABBzQEjudJIGiJZgHklxBy7Zc5GUywVqlrQiHTwQBZlAimckY6OpxBCiyW7nNfThYAKbebuV+txsQMGo9cDlhlQHywlxAgL7YuSgSSsuYAv6gtJGk6CReswSzUC0OmIJsaYdwUmqWeL+CAnGXT2mbuE1DRz9mo2gi900iqrbQtPTXexwG1rYokZkHTgCpIIBk7ibK1hNAMeTa9GGLIgIG0EL1Y0GC+iauAQaQNCoMh0yiRgYBsGiAOfUDRAJ2PnyS8V5OEsX4acgHpJ/xnAe5sxmAcBySRyQtY7k2sUWNQHN6a90OgyYlBBCmT4QG6KNEjAhdpo7VwPaWZykCYLDeQQvOnnPg/Hgx5o890KKeOMEwBIhF0OAgtt39IkRrgloXqCRBiEECrAF8IhIkaeeIKKo2AhHwflG80wOh0rAvjANqndq3ouBLwzVTcxiUitI7EQSok0oEiNXCelosedQVG3a5CdFAMM0IeSBHsPHYAHnhwaMCYhWRyAFMvX4lmI/gh5Amlan0BYDQ5VN9L8GoYUS1fSWQQI5iBJJcQEnPAIqE+yKiKhiRSjIjdE0EAaptZWLrrHsZC4igYhDUvw1YQUUiRw8gePcGhMJnwAnxrlcNTmBBMA2UiMyHWilvLUslLkVrWkiKyZM2ihLgTGMFJXH6FBubnBD/J/UAg4lMhjcHlUyeCAI0qyiQ563YbqljeAj41HroA6iiHlD/IjoOd/5UbLLP1RPHO2lJKEi8PoyooHSWFN6QCxDo0G+sqa8Q/gYtkJSMbKQZEp9Bg7uJFsQxLvzuoM0aE0GAYUokV2XMNjx7LeI9f6sWg0B4Y/HAYTEi4AExmGgdAqph72sgCZrcFEqC1x8+w5ok6xhGOjmA8UcYTb/F8X9KkATwWGOGimAMOhYgFIqwSYWz6R3uUhHGDpwAyh6Eo0jFAT3UHAZmYrGIj+Gt5gCI9TG9RDs+OIYiWGwBJuE3kEuOIAnQYgXEQy1E88R/oz2L9aNCpV4UTdrQy2L/cKygaUdxSgT1ayWAq4m2iEpPIbzGlYQDGUQYao6Qq63EbiI0wC5KpGVzBhvDAF4DePXuQ0LIUTUIkmYARUATMxB+o4KKIqQJH9STygoiCkkW0EviIAIqVEjSZl5yzVG6z5WyC0nSriFNLzPzQMd+Qdj9Uf3CurXGnfuWzSuxmwgNsLWsjU9zZffIXiTkv3EvVQTrAbMF8N4smJBaC6SIABZRHxVQzBG3gwUfoMQXKHk4jOyji0v6EJkY2pgKSqr6IQI9nbGBbGiSGiKcV1TVvy2CsGf0BYcBphy7iUgEbaRMLGwf3o04QDwJrBZqPXjxCkhw6YIqBxGTpHPF72x3LBTFogCn9YQRAsWK46Q2oH5svCKAltLBRm3jxOpdknRQmCt7BkFhFiQuE+PHkaIFJYCvCiKwfWgPWMCUYzcRGuBppGzOEcCpIcWSA65kaUHJQ1IFExI7EBS+hn0N3lT4XxVqXjR2BYO2AFRim6+h/QziOd0HHaAJ9NFoAFuJAVWS1G+oDrab0zDnPiONEBWIAFxLmP+eW+vOPVqN3UQQ4PGAZMIwntu7k5HmqNcCFkMWnCKshz4n90ch1y+RiSjG4zfxWoB2CSAJtj3KECY7uzwXUH1bydT2ixLv7qr0cEWDqWrVeCCFIBhqjgAiuHP+3N7tIJVJmscPnABNHqebYaA/mTOwee82dx+Avno3xNe5I5J56AUsWAEJsTxC4cgJiEQwg0Gsh9KbinRne31hCxRDKKkRrEm6KeGzRUuMgPqR2MZbDxyJ2idW/aogpL5BMScaRQQx8CG/asgAW5hDhlsjbNq7HUxF+N6cCALsYgtzWQOclswJ7Bndy5ah7Rw3YwFNdfvctTAP2TEMIJhC8WHURA9hEoIjJ+qIASFYDPG+grg/ye6PKwWqSbk3pIJj0X1JBmkyEwCNvP80KgBtu0a1bWIozQf4wk+P6fdnJcdIjS1DO9y5RyiTNQ67AybAp2lxM6vLCJA3Let2b+aEWUe7y8IU8WYg5LFBAOO1QpEEsjGQScJHShs80rEoEmj7vLD9kgBy+W3nyqICTeYSkClNEmn8ik0rmTHunOdNW4XgaofdhNQCLKvJWF52jp7Y+QxvX7QUi/qO1V5ogS1yA6LgqSFWQWIvHoxX5RJ2rBTQmqCW/bwFRALoaahH9JtYhMoCmpLaf0nyAe2B1wB80pauaX9iPBdFA9GcKHSZHl9oszRtkzU7nwHtgBkwMQTIuA+lhaTryWDNrmfYOzbk6tMOdIyLBsZ0GFGQOD4PtQAtSJB7qCW0bbkJiZ8WgoISagESAw5Sse/DWGkDTVkUoKT5gFTdx36DpoWg2Mkj9hWi8QC+xdItvRgMrtdSxJ3rJ3Y9U3VxaMthNmEEeJYnmcsG4LhkTmDH0POs27WZUw4/jtw2MWTUpYcRO4gh5Pwhj1LCxXEBUIBaIZ6Le/zQ4PFL+V2ENYG+o+2Pnb6Ki9BtFOaVVQjTNZqMp0Uh4iogddMDahyuNVNn3a717pwjlMkGh9mEPjXsZv4O4X1l9cLzX7OUD5xysbsvoKjbuWxvbALRokYQwEKQKK0blXfDGgXEf5e09o8GaIl+70XCcXUuoHpeY0cgDv/SSAAJwIbdH9aEsegCUiAUhiKSHFafjyFz63qyLv7mwVX855rV5Z0ayldZwa9P9CNj7oYSAmTwwLa1zivtrXf7TKChyzgtQIYSPP3U2VMVTwTiwhD+NxDAFoHkeSFhPuoH1ACmCuPuCbR+lSgVWiCtGRSw2STuB9H2N5UkrE8eSqXk9JoBDJkPBcWd4we2PQlZR6yYWAJY7sIw1vZR7wa27d3FwzvWcda8kxhtNTFi6DEDjOR7C3WZ7n4k+kZJiZewJl4HlT0BQfDkU8YlWjSxa+cHSkR/UzKkf6lIDMXkUHDnsNA49azG/TvWs23v7qr8/5jDasIJcDVruJl7gbeUEIQfb36EpUcuKXrW6JEenDNoRzCSRSeX0J8fdfpKXPTxc8UaUI2pAQKiHcM/DRqhoyiM6y7iQVWn1j+ZiXd5vDqdx2Lpkl66TQ+qOYDrt/zR5oer8/9wr8NqwgkACny7lAAZ/HzrOjbsfo6F0+fSzFsghl4zldF82HvzpoAz0QDarsc/WpPs9IrwT9CqFHBn6ZwSLukVTPZ/si4lQQCfqCGkrzbFdwNburKaO7cvnuNK9e8xUsYpss83ijT8HKGfdtKCty4+jQ+87gLGWq2imsfOxmZ/u5gMkVD6ITh5ASYJ31CQYgzCZwA/7hCWkuBPghYYnygSFfxKwkLR9GZ1SYjn0ZAkBIwTP1KAH64EntV1JPi1PbU6X/75bXx/3X+Vb1tlCMvruJr1E0+AEA38I8K7y8xAT72bTyz7VY4cOMxVCYWMUR1mV+NZQDBikmd6g8QjQjQWfwYiaBgr1QbsZz5Q056i+Kjk2Mf0JWs0aTJR2juAs7rmuquBlZyayXh2cCc33P01RptjVfb/G6zgPS/tgyMtXyUrIYCB0bExvrvhp/zG6y709wrO6aaXHulnyO4F1bDrw95JUsFJli8iRJr29WOVoAc4x98TYKORqvsJAtrheUMaQd+2cmg1py+b4s5ZrjkCGDF8d8P97txS64AN8NISIOM/sNyP4YySeX686RHOnn8yi2cc6XwBsAzUZjDSGMKGUmpoDXMSxtBAAsSNxp6DStsnBaZpXkH3Rw+09f+1PFVcVSPQMJPOpw0jhoyB2swicnKe/5O7NrlzSlYJ/v0Om4Py+Pib+TWkgm0tOGnuMVxzxhVYtaBgMAza59nT3Iohi5M+Eu3vRLFHhjztC0gBFoLsd0NYuvMpwEfQ/QgJIckPRGssOdPrcxgwM3BldAEjhs/99F956Nn11dtVeR8r+NrBIcAt1FFWI5xawUg+cOoFvGn+yYzkTcS/XiSAI0KGCQSIlXxS9g1HaZk3DgrjtRMjCkiV1U8BL/UBSMI9DeDTa6Yws34EfoXL+t2z6SG+/MBtYCrBfwBhKctpHhwCAHyBd2P4R8okh5n9U/jome9hZs8Umta3NWPZPraJpo5hyGLYSL19P54qcQlz5e6eHBDTNTlKdz9Rx2+HsnF7J9HfDbSL2d0LMJjiSSHsGh3kz+79OruG9nZS/+/hKr4BcPAIcC2GI/g+hjdXmYLT5h3L75x6cXjsOhlNHXEkUBSDAYnDvkACiaEV0jqAVIAuoEmtsLMomjKhDFwNI0hk+8Oa6HtUXvbVU1zI15P1YzXHIGTG8MUHb+X+jWs6OX4/YAtv5dPYg0eAoAWWItyDUKt6cOQVS5Zx4eI3MNZqFqEgw/ledjaeQwARg5O4cExMAUnDvxTY2CgIyXgJ90vmNHx0rA+WAF6VKlKLggv5+rKpDnxF6a11ccfTD/D3D90BprJ61UI5m6tYDXBwCRBI8CcYPlalR7tMjd894x2cMGuBI4EARjIG8z3sbmxFkJgEErt4KPFdaiUGmXbhnwLp7q/GP4EyFpXUAITKXnqMpD4/SpQQmtF1OAPZdKy2UKC7Vmft7s3ceP+3GKl6dCyA5U+5ij8EePkIcCMD1PgJwolV/sCcKdP58BsuZ0bPFJp5jiAYDC+0dvF8azviRxRF0t6/AGyJMxhE2u556YQ40pEAlO14bfcbbecERjeGmF6bzRQX8lnUh3y7R/fy2fv+ja17d1fbfeVRWvwCH2Tw4BMgjQqWoXyv8nr0Fhw/ez7LX38x3aZO01pvvw17/z8Jmts9oKboA0j9+nQMNHkCSWkXu19UrfY1mUvyFEmjqICm3cMomvDGYhGUqfU5TKnNwJFBoWYMDdvklv9axRPbNnXK0DSBc1nO3RygCBMlN/MJhOupkha8fv5xvP+ktxUtToBxr6H8eXY1nwPApJ5/lORJwK3oCSTWAp0prwSw02E6ewNxrj98ho6fmfW59GfT/HfX5IlVy1cevp2fbXqyE/igXMcKrgU4NAgQooL/xHAeVZLDmQuWcOWScxARcpu7TyFzvQM7GpsBRcQEda8AUpnoEUAkue1sSgWNaJOqaOn8cBoQtF3Yp3GYWBSAgrcvzOya5xw+pYWqkpkMUP7+0Tu5d+NjkHUE/y6Et7uY/xAiQKgWZnwfOKoTCZbOP573nvAWV+ho2RxEyCRjNB9id3MrDTuKkSxJ9Uii4lOzEFmQAw4DY+5IskY7pous5q47akb9cBfqOc0H1CWjaVt8/bG7WL35ifGAv5EW5/JB1gIcWgQIJLiQjFtJJU0XH7GQXzvxXPq7enzNAIwYcrXsbm1lqPV8YQ4QkQowpeRo3xmvlEgCrJRl/ZL+/r7adGbU55CRYQvwsxrDzVG++sgdPLzlqfFVZXIu4mpuAzhkCZD6A9UkWDTrCN5/8ts4rGcqY3kzgCvCYGsPe5rbybWFwfhxSnf+fuz5/dAIkpIh7RLCYqlJjWn12QzUpkcZQHe//9EXnM1fv2PL+MBXPskKbgA41AmQ5geqWc3hU6bzrhPexAmz5jtNYFWLsJCWNh0JhvMXUCxChlTtdZEJ5rkSiWqHLsEcwTg7P70+m7rUfZgHRtzO54mdm/jG4z9k6wt7EvA7xfuHNgHS8PCvgQ+NhwT1Wo0LF5/OOUedjEFo2nCzKBFxvsHzzZ2M2qGQQq64ACThxH6KaiUhoh4+Qdw1fNPqs5ytD/f7w+X2LZY7n3mI29b9lGarBRnjkc+ynA8DvLIIEEhwE3DVuDaahVPmHsM7jjuT2b3T3LWGQRsICozZIfa2djOSD6Fqiw6jyhSfIAeo/qV0zxe3xunNBphSm063GUDQ4oURoSurs33keb715L08+NwGAnc761GWczXAK5MAwSf4c4SPMB7JYUbfAG9beCpL576Gepa5zKGqIqFAxGg+wmBrt9MIubbCFccHwQQU8XwmNXpMn2t26cn6ow5fEaFuas7LX/3cGm5/6gF2Dw9CNm7m/QUr+AOAVzYBgia4Dvgk4xELKBw7ay4XLDqdY6fPRVVdSTlAagB14I/kg664NGZHsJpHVUbplPyvnA9/izjeSEa36XVtW73ZgCMBCOpJgVf3RoS1e57jtvU/Ze3O50AAw3jlepbzKYBXBQECCRwBrmO8kkNWM5x+xLEsm7eEBVNngxIRAXCgqFqa2mCkNUhLm44UikU1PIKV0j6CtG9PRDBkXus4FU9N6vTWBqhLFyKmCOki4BHY+MIO7t78KD/dspa8ZSFjX+RTLPcR1KuKAIEEF6N8DuGYcWvgHGr1jNfNOZqz553I0VPnkEmGu3kySrh3hIQb0WjLa4gc5y+QA4LVJi1t0bJxIq1m6i5sM1IH37fQm/WT+WSU2+nR075BfMtWTTJyzXn6hW3cs/kxfr7tKVrNHLJ9OMPKBoRrWM4qgFcnAYJrcxzCTQhv2ydTbMHUhCUzFnDy7KN5zcx5TOvuL+5ZGHrskmsIBUTSx7kEQZDYh1Btdx9ArxFwGUyA58eGWLN7Mw9tf5rHdm3EthTMPjcg3o5yNVfxJMCrmQBpwgiXNOreVyIgMLWnjyUz53Py7IUsmHKYf4CCcfWFXDUATirSofwb1xcgE+P/bctQc5SNe3e8CPpTL4K+iRdGh0HZH+DHgBuSBM+rngBpKfnG9Mnk4zcPZDCjp59jph3BUVNnM39gFof1TXWNKPWs5lS0YrGqBSFKNIC3/VIkoXKXmGrYFjuGX2DT4E42vrCd9c9vYffokP9v73fD4YMIHwwl3f+eBAhNJRkfQ/g9hIH9jtQsgHMcnTaY2TvArO4pzOidwszuAWcuemp1l4rtqXVF2fzRVsOlokdbTafWd40Nurug7hzby66RQbfrnUMHYA6o03QQ5TPk/GnRzDFJgEI+z+uo8WngcpiA0F3DGwNiBGMEg1PnBMGpdveyiloFW3LLwgOTf6PFtfwuPyeSSQKkLefwexjeyESKvkxnxfJj4DNx6/YkAarlXWScxzuAaxDO4ZUoyp3A5/ge3+Kb5ACTBNh3EW7mEkcJuAhh1iEO+k6U2xB3pe7KSO9MEuAA5XMcSb0gA2cj9B4ioI8A9wDfpMlKruFZXiEivFLlJo7H8BZgGXAmcBRC90ECfAx4BrgXuBvLXVzNE7wCRXg1yF/SSy+LyRwRXo+yFDge6EeQCWgHGgKeQFgN/IycexlhHb/PCC+bTBKg+uplyxyExcBilEUIx6AsQJgOTAFmIEgAmd3AXv+MpI0+N78eWIeyDsM214n7CpVJmZRJmZRJmZRJmZRJmZRJmZRJmZRJmZT/B1SpnBPNoYAnAAAAAElFTkSuQmCC"},,,,function(t,e,n){"use strict";var r=n(39),o=n(17),i=n(50),s=n(20),a=n(161),c=n(245),u=n(181),f=n(80),l=n(242),h=Object.assign,p=Object.defineProperty,d=o([].concat);t.exports=!h||s((function(){if(r&&1!==h({b:1},h(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol();return t[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=h({},t)[n]||"abcdefghijklmnopqrst"!=a(h({},e)).join("")}))?function(t,e){for(var n=f(t),o=arguments.length,s=1,h=c.f,p=u.f;o>s;)for(var v,g=l(arguments[s++]),y=h?d(a(g),h(g)):a(g),m=y.length,b=0;m>b;)v=y[b++],r&&!i(p,g,v)||(n[v]=g[v]);return n}:h},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return B}));var r=n(40),o=n.n(r),i=n(41),s=n.n(i),a=n(2),c=n.n(a),u=n(10),f=n.n(u),l=n(107),h=n.n(l),p=n(67),d=n.n(p),v=n(11),g=n.n(v),y=n(8),m=n(106),b=n(263),w=n(723);function A(t,e,n){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,n)}var x="[resource]",k=new g.a,C=new g.a,E=new g.a,S=new g.a,B=function(){function e(n,r){if(o()(this,e),A(this,k,{writable:!0,value:void 0}),A(this,C,{writable:!0,value:void 0}),A(this,E,{writable:!0,value:null}),A(this,S,{writable:!0,value:null}),this.constructor===e)throw new Error("Resource is abstract class");if(!(n instanceof b.a||r instanceof m.EventEmitter))throw new TypeError("Arguments are not correct");f()(this,k,n),f()(this,C,r),this.injectOffloadAPI(),"true"===t.env.TEST&&(h()(this,"alwaysConnect",{get:function(){return c()(this,S)},set:function(t){f()(this,S,t)}}),h()(this,"worker",{get:function(){return c()(this,E)},set:function(t){f()(this,E,t)}}))}return s()(e,[{key:"workerManager",get:function(){return c()(this,k)},set:function(t){f()(this,k,t)}},{key:"injectOffloadAPI",value:function(){throw new Error("Need to inject Offload API")}},{key:"startJob",value:function(t){var e=this;if(c()(this,S))this.startJobImpl(c()(this,S),t);else{var n=t.feature,r=t.localGumIsCallable;this.showResourcePopup(n,r).then((function(n){f()(e,S,n.always?n.workerId:null),e.startJobImpl(n.workerId,t)})).catch((function(e){y.error(x,e),t.errorCallback&&t.errorCallback(e)}))}}},{key:"startJobImpl",value:function(t,e){var n=this;"localdevice"!==c()(this,S)&&"localdevice"!==t?this.requestService(t).then((function(){f()(n,E,c()(n,k).getOrCreateWorker(t)),c()(n,E).connect(),c()(n,E).startJob(e)})).catch((function(t){y.error(x,t),e.errorCallback&&e.errorCallback(t)})):e.nativeGetUserMedia(e.arguments[0]).then(e.successCallback).catch(e.errorCallback)}},{key:"startJobWithExistingWorker",value:function(t){c()(this,E)&&c()(this,E).startJob(t)}},{key:"stopJob",value:function(t){c()(this,E)&&(c()(this,E).stopJob(t),f()(this,E,null))}},{key:"showResourcePopup",value:function(t,e){var n=this;return new d.a((function(r,o){new w.a(c()(n,k),c()(n,C)).show({feature:t,successCallback:r,errorCallback:o,localGumIsCallable:e})}))}},{key:"requestService",value:function(t){var e=this;return new d.a((function(n,r){c()(e,k).requestService(t,{successCallback:n,errorCallback:r})}))}}]),e}()}).call(this,n(90))},function(t,e,n){var r=n(20),o=n(24),i=n(70),s=o("iterator");t.exports=!r((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),i&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},function(t,e,n){"use strict";n(71);var r=n(15),o=n(14),i=n(56),s=n(50),a=n(17),c=n(632),u=n(101),f=n(144),l=n(102),h=n(346),p=n(74),d=n(137),v=n(27),g=n(33),y=n(81),m=n(92),b=n(47),w=n(26),A=n(93),x=n(94),k=n(91),C=n(247),E=n(146),S=n(211),B=n(24),I=n(830),O=B("iterator"),P=p.set,T=p.getterFor("URLSearchParams"),R=p.getterFor("URLSearchParamsIterator"),j=i("fetch"),D=i("Request"),F=i("Headers"),M=D&&D.prototype,L=F&&F.prototype,U=o.RegExp,N=o.TypeError,z=o.decodeURIComponent,Q=o.encodeURIComponent,G=a("".charAt),q=a([].join),H=a([].push),W=a("".replace),Y=a([].shift),J=a([].splice),X=a("".split),K=a("".slice),V=/\+/g,Z=Array(4),_=function(t){return Z[t-1]||(Z[t-1]=U("((?:%[\\da-f]{2}){"+t+"})","gi"))},$=function(t){try{return z(t)}catch(e){return t}},tt=function(t){var e=W(t,V," "),n=4;try{return z(e)}catch(t){for(;n;)e=W(e,_(n--),$);return e}},et=/[!'()~]|%20/g,nt={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},rt=function(t){return nt[t]},ot=function(t){return W(Q(t),et,rt)},it=h((function(t,e){P(this,{type:"URLSearchParamsIterator",iterator:C(T(t).entries),kind:e})}),"Iterator",(function(){var t=R(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n}),!0),st=function(t){this.entries=[],this.url=null,void 0!==t&&(w(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===G(t,0)?K(t,1):t:A(t)))};st.prototype={type:"URLSearchParams",bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,n,r,o,i,a,c,u=E(t);if(u)for(n=(e=C(t,u)).next;!(r=s(n,e)).done;){if(i=(o=C(b(r.value))).next,(a=s(i,o)).done||(c=s(i,o)).done||!s(i,o).done)throw N("Expected sequence with length 2");H(this.entries,{key:A(a.value),value:A(c.value)})}else for(var f in t)g(t,f)&&H(this.entries,{key:f,value:A(t[f])})},parseQuery:function(t){if(t)for(var e,n,r=X(t,"&"),o=0;o<r.length;)(e=r[o++]).length&&(n=X(e,"="),H(this.entries,{key:tt(Y(n)),value:tt(q(n,"="))}))},serialize:function(){for(var t,e=this.entries,n=[],r=0;r<e.length;)t=e[r++],H(n,ot(t.key)+"="+ot(t.value));return q(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var at=function(){d(this,ct);var t=arguments.length>0?arguments[0]:void 0;P(this,new st(t))},ct=at.prototype;if(f(ct,{append:function(t,e){S(arguments.length,2);var n=T(this);H(n.entries,{key:A(t),value:A(e)}),n.updateURL()},delete:function(t){S(arguments.length,1);for(var e=T(this),n=e.entries,r=A(t),o=0;o<n.length;)n[o].key===r?J(n,o,1):o++;e.updateURL()},get:function(t){S(arguments.length,1);for(var e=T(this).entries,n=A(t),r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){S(arguments.length,1);for(var e=T(this).entries,n=A(t),r=[],o=0;o<e.length;o++)e[o].key===n&&H(r,e[o].value);return r},has:function(t){S(arguments.length,1);for(var e=T(this).entries,n=A(t),r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){S(arguments.length,1);for(var n,r=T(this),o=r.entries,i=!1,s=A(t),a=A(e),c=0;c<o.length;c++)(n=o[c]).key===s&&(i?J(o,c--,1):(i=!0,n.value=a));i||H(o,{key:s,value:a}),r.updateURL()},sort:function(){var t=T(this);I(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,n=T(this).entries,r=y(t,arguments.length>1?arguments[1]:void 0),o=0;o<n.length;)r((e=n[o++]).value,e.key,this)},keys:function(){return new it(this,"keys")},values:function(){return new it(this,"values")},entries:function(){return new it(this,"entries")}},{enumerable:!0}),u(ct,O,ct.entries,{name:"entries"}),u(ct,"toString",(function(){return T(this).serialize()}),{enumerable:!0}),l(at,"URLSearchParams"),r({global:!0,forced:!c},{URLSearchParams:at}),!c&&v(F)){var ut=a(L.has),ft=a(L.set),lt=function(t){if(w(t)){var e,n=t.body;if("URLSearchParams"===m(n))return e=t.headers?new F(t.headers):new F,ut(e,"content-type")||ft(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),x(t,{body:k(0,A(n)),headers:k(0,e)})}return t};if(v(j)&&r({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return j(t,arguments.length>1?lt(arguments[1]):{})}}),v(D)){var ht=function(t){return d(this,M),new D(t,arguments.length>1?lt(arguments[1]):{})};M.constructor=ht,ht.prototype=M,r({global:!0,forced:!0},{Request:ht})}}t.exports={URLSearchParams:at,getState:T}},function(t,e,n){var r=n(839);r.Template=n(840).Template,r.template=r.Template,t.exports=r},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return O}));var r=n(176),o=n.n(r),i=n(40),s=n.n(i),a=n(41),c=n.n(a),u=n(2),f=n.n(u),l=n(10),h=n.n(l),p=n(719),d=n.n(p),v=n(335),g=n.n(v),y=n(11),m=n.n(y),b=n(8),w=n(106),A=n(191),x=n(755),k=n(275);function C(t,e,n){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,n)}var E="[offload]";b.info("offload.js version: ".concat(k.a));var S=new m.a,B=new m.a,I=new m.a,O=function(){function e(n){s()(this,e),C(this,S,{writable:!0,value:[]}),C(this,B,{writable:!0,value:new w.EventEmitter}),C(this,I,{writable:!0,value:void 0});var r={autoConnect:!0};"object"===o()(n)&&d()(r,n),h()(this,I,new A.b(f()(this,B))),r.autoConnect&&f()(this,I).connect();for(var i=0,a=g()(x);i<a.length;i++){var c=a[i];f()(this,S).push(new c(f()(this,I),f()(this,B)))}"true"===t.env.TEST&&(this.resources=f()(this,S),this.workerManager=f()(this,I),this.clientEventEmitter=f()(this,B))}return c()(e,[{key:"version",get:function(){return k.a}},{key:"connect",value:function(t){return f()(this,I).connect(t)}},{key:"getWorker",value:function(t){return t?f()(this,I).getOrCreateWorker(t):(b.error(E,"workerId is empty"),null)}},{key:"getWorkers",value:function(){return f()(this,I).getWorkers()}},{key:"on",value:function(t,e){switch(t){case"connected":case"disconnected":case"showDevicePopup":case"hideDevicePopup":case"joinWorker":f()(this,B).on(t,e);break;default:b.error(E,"unhandled event name: ".concat(t))}}},{key:"off",value:function(t,e){switch(t){case"connected":case"disconnected":case"showDevicePopup":case"hideDevicePopup":case"joinWorker":f()(this,B).off(t,e);break;default:b.error(E,"unhandled event name: ".concat(t))}}}]),e}()}).call(this,n(90))},function(t,e,n){t.exports=n(817)},function(t,e,n){t.exports=n(820)},function(t,e,n){t.exports=n(826)},function(t,e,n){"use strict";n.d(e,"a",(function(){return I}));var r=n(40),o=n.n(r),i=n(41),s=n.n(i),a=n(2),c=n.n(a),u=n(10),f=n.n(u),l=n(31),h=n.n(l),p=n(36),d=n.n(p),v=n(30),g=n.n(v),y=n(11),m=n.n(y),b=n(8),w=n(195);function A(t,e,n){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,n)}var x="[socket-tizen]",k=new m.a,C=new m.a,E=new m.a,S=new m.a,B=new m.a,I=function(){function t(){o()(this,t),A(this,k,{writable:!0,value:w.e()}),A(this,C,{writable:!0,value:null}),A(this,E,{writable:!0,value:null}),A(this,S,{writable:!0,value:{}}),A(this,B,{writable:!0,value:void 0});var e=tizen.application.getCurrentApplication();f()(this,B,e.appInfo.id),b.debug(x,"SocketTizen created. "+this.id)}return s()(t,[{key:"id",get:function(){return c()(this,B)+":"+c()(this,k)}},{key:"on",value:function(t,e){b.debug(x,"on event:".concat(t)),c()(this,S)[t]=h()(e).call(e,null)}},{key:"handleEvents",value:function(t,e){var n=c()(this,S)[t];n?n(e):b.error(x,"Not found ".concat(t," handler"))}},{key:"emit",value:function(t,e){b.debug(x,"emit: ".concat(t));var n=e||{};try{c()(this,E).sendMessage([{key:t,value:d()(n)}],c()(this,C))}catch(t){b.error(x,"Messageport emit failed. "+t),this.handleEvents("disconnect",{reason:"transport error",details:t.message})}}},{key:"connect",value:function(){var t,e,n=this;b.debug(x,g()(t=g()(e="connect message port from ".concat(c()(this,k)," to ")).call(e,"offload",":")).call(t,"org.tizen.chromium-efl.wrt-service"));try{f()(this,C,tizen.messageport.requestLocalMessagePort(c()(this,k))),c()(this,C).addMessagePortListener((function(t){if(0!==t.length){var e=t[0],r=e.key;"ping"!==r&&n.handleEvents(r,JSON.parse(e.value))}else b.error(x,"Not found message")})),f()(this,E,tizen.messageport.requestRemoteMessagePort("org.tizen.chromium-efl.wrt-service","offload")),this.emit("connect")}catch(t){throw b.error(x,"Message port connection failed: "+t),t}}},{key:"close",value:function(){b.debug(x,"close")}}]),t}()},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return Ct}));n(126);var r=n(62),o=n.n(r),i=n(119),s=n.n(i),a=n(120),c=n.n(a),u=n(110),f=n.n(u),l=n(40),h=n.n(l),p=n(41),d=n.n(p),v=n(2),g=n.n(v),y=n(10),m=n.n(y),b=(n(225),n(104),n(226),n(125),n(107)),w=n.n(b),A=n(30),x=n.n(A),k=n(274),C=n.n(k),E=n(724),S=n.n(E),B=n(232),I=n.n(B),O=n(238),P=n.n(O),T=n(68),R=n.n(T),j=n(139),D=n.n(j),F=n(31),M=n.n(F),L=n(11),U=n.n(L),N=n(18),z=n.n(N),Q=n(233),G=n.n(Q),q=n(725),H=n.n(q),W=n(8),Y=n(106),J=n(263),X=n(726),K=n.n(X),V=n(727),Z=n.n(V),_=n(728),$=n.n(_),tt=n(729),et=n(626),nt=n(730);function rt(t,e){var n=void 0!==s.a&&c()(t)||t["@@iterator"];if(!n){if(f()(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return ot(t,e);var r=o()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return R()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ot(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){l=!0,a=t},f:function(){try{u||null==n.return||n.return()}finally{if(l)throw a}}}}function ot(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function it(t,e,n){st(t,e),e.set(t,n)}function st(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function at(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}var ct="[device-popup]",ut={BACKSPACE:8,ENTER:13,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,XF86_BACK:10009},ft=new U.a,lt=new U.a,ht=new U.a,pt=new U.a,dt=new U.a,vt=new U.a,gt=new U.a,yt=new U.a,mt=new U.a,bt=new U.a,wt=new U.a,At=new U.a,xt=new U.a,kt=new z.a,Ct=function(){function e(n,r){var o,i;if(h()(this,e),st(o=this,i=kt),i.add(o),it(this,ft,{writable:!0,value:void 0}),it(this,lt,{writable:!0,value:void 0}),it(this,ht,{writable:!0,value:void 0}),it(this,pt,{writable:!0,value:void 0}),it(this,dt,{writable:!0,value:void 0}),it(this,vt,{writable:!0,value:void 0}),it(this,gt,{writable:!0,value:void 0}),it(this,yt,{writable:!0,value:void 0}),it(this,mt,{writable:!0,value:void 0}),it(this,bt,{writable:!0,value:void 0}),it(this,wt,{writable:!0,value:void 0}),it(this,At,{writable:!0,value:0}),it(this,xt,{writable:!0,value:0}),!(n instanceof J.a||r instanceof Y.EventEmitter))throw new TypeError("Arguments are not correct");m()(this,ft,n),m()(this,lt,r),this.createElement(),this.addQrImage(),"true"===t.env.TEST&&(w()(this,"element",{get:function(){return g()(this,dt)},set:function(t){m()(this,dt,t)}}),w()(this,"options",{get:function(){return g()(this,bt)},set:function(t){m()(this,bt,t)}}),w()(this,"shadow",{get:function(){return g()(this,pt)},set:function(t){m()(this,pt,t)}}),w()(this,"root",{get:function(){return g()(this,ht)},set:function(t){m()(this,ht,t)}}),w()(this,"signalingIntervalID",{get:function(){return g()(this,xt)},set:function(t){m()(this,xt,t)}}),w()(this,"updateIntervalID",{get:function(){return g()(this,At)},set:function(t){m()(this,At,t)}}))}return d()(e,[{key:"createElement",value:function(){var t=this;m()(this,ht,document.createElement("div")),m()(this,pt,g()(this,ht).attachShadow({mode:"open"}));var e=document.createElement("style");e.innerText=$.a.toString(),g()(this,pt).appendChild(e),m()(this,dt,document.createElement("div")),g()(this,dt).classList.add("modal"),g()(this,dt).id="__oFfLoAdPoPuP210426__",g()(this,dt).classList.add("overlay"),g()(this,dt).setAttribute("tabindex","-1"),g()(this,dt).setAttribute("role","dialog"),g()(this,pt).appendChild(g()(this,dt)),g()(this,dt).innerHTML=Z()({SIGNAL_IMG:tt.a,ENABLE_IMG:et.a,alwaysUseSameDevice:!0}),m()(this,vt,(function(e){var n,r,o=!1;switch(e.which){case ut.LEFT:case ut.UP:case ut.RIGHT:case ut.DOWN:t.moveElement(e.which),o=!0;break;case ut.BACKSPACE:case ut.XF86_BACK:g()(t,dt).querySelector("#closeBtn").click(),o=!0;break;case ut.ENTER:case ut.SPACE:o=t.selectElement()}o?(e.preventDefault(),e.stopPropagation()):W.debug(ct,x()(n=x()(r="Not handled keydown. ".concat(e.which," ")).call(r,e.code," ")).call(n,e.currentTarget.id))})),m()(this,gt,(function(t){var e,n,r;C()(e=S()(ut)).call(e,(function(e){return t.which===ut[e]&&(t.preventDefault(),t.stopPropagation(),!0)}))||W.debug(ct,x()(n=x()(r="Not handled keyup. ".concat(t.which," ")).call(r,t.code," ")).call(n,t.currentTarget.id))})),m()(this,yt,(function(e){t.setFocusBack()})),m()(this,mt,(function(e){I()((function(){t.setFocusBack()}),100)})),g()(this,dt).querySelector("#refreshBtn").addEventListener("click",(function(e){return t.startUpdateInterval()})),g()(this,dt).querySelector("#closeBtn").addEventListener("click",(function(e){"function"==typeof g()(t,bt).errorCallback&&g()(t,bt).errorCallback(new DOMException("Requested device not found")),t.hide()})),g()(this,dt).querySelector("#connectBtn").addEventListener("click",(function(e){var n=g()(t,dt).querySelector("input[type=radio]:checked");n&&("function"==typeof g()(t,bt).successCallback&&g()(t,bt).successCallback({workerId:n.value,always:g()(t,dt).querySelector("#alwaysCb").checked}),t.hide())}))}},{key:"addQrImage",value:function(){var t=this;g()(this,ft).getQrCode().then((function(e){var n=g()(t,dt).querySelector("#qrCodeImage");n.src=e,n.style.display="block";var r=document.createElement("span"),o=document.createTextNode("Scan QR code for connecting");r.appendChild(o),n.parentNode.appendChild(r)}))}},{key:"show",value:function(t){if(!document.body.contains(g()(this,ht))){m()(this,bt,t),document.body.appendChild(g()(this,ht)),g()(this,dt).style.display="block",g()(this,dt).addEventListener("keydown",g()(this,vt)),g()(this,dt).addEventListener("keyup",g()(this,gt)),document.addEventListener("focusin",g()(this,yt)),document.addEventListener("focusout",g()(this,mt));var e=g()(this,dt).querySelector("input[type=radio]:checked");e?e.focus():g()(this,dt).querySelector("#refreshBtn").focus(),this.startUpdateInterval(),this.startSignalingStatusInterval(),g()(this,lt).emit("showDevicePopup",this)}}},{key:"hide",value:function(){document.body.contains(g()(this,ht))&&(this.clearUpdateInterval(),this.clearSignalingStatusInterval(),document.body.removeChild(g()(this,ht)),g()(this,dt).style.display="none",g()(this,dt).removeEventListener("keydown",g()(this,vt)),g()(this,dt).removeEventListener("keyup",g()(this,gt)),document.removeEventListener("focusin",g()(this,yt)),document.removeEventListener("focusout",g()(this,mt)),g()(this,lt).emit("hideDevicePopup",this))}},{key:"setFocus",value:function(t){var e,n,r=P()(e=R()(g()(this,dt).querySelectorAll("[tabindex]"))).call(e,(function(t){return null!==t.offsetParent}));return r.length?(t>=r.length?t=0:t<0&&(t=r.length-1),r[t].focus(),W.debug(ct,x()(n="setFocus() >> [".concat(t,"] ")).call(n,r[t].id)),m()(this,wt,r[t]),r[t]):null}},{key:"setFocusBack",value:function(){var t,e;g()(this,dt).offsetParent&&g()(this,wt)!==document.activeElement&&(C()(t=R()(g()(this,dt).querySelectorAll("[tabindex]"))).call(t,(function(t){return t===document.activeElement}))||(g()(this,wt)&&g()(this,wt).closest("#".concat("__oFfLoAdPoPuP210426__"))&&null!==g()(this,wt).offsetParent?g()(this,wt).focus():m()(this,wt,this.setFocus(0)),W.debug(ct,x()(e="[focus] >> focus back to ".concat(g()(this,wt).id," ")).call(e,null!==g()(this,wt).offsetParent))))}},{key:"moveElement",value:function(t){for(var e,n=P()(e=R()(g()(this,dt).querySelectorAll("[tabindex]"))).call(e,(function(t){return null!==t.offsetParent})),r=0,o=0;o<n.length;o++)g()(this,pt).activeElement.id===n[o].id&&(r=o);switch(t){case ut.LEFT:case ut.UP:r--;break;case ut.RIGHT:case ut.DOWN:r++}this.setFocus(r)}},{key:"selectElement",value:function(){var t;if(!g()(this,pt).activeElement)return!1;for(var e=P()(t=R()(g()(this,dt).querySelectorAll("[tabindex]"))).call(t,(function(t){return null!==t.offsetParent})),n=0;n<e.length;n++)if(g()(this,pt).activeElement.id===e[n].id)return e[n].click(),"form-device-input"===e[n].className&&g()(this,dt).querySelector("#connectBtn").click(),!0;return W.debug(ct,"selectElement() : Not Handled "+g()(this,pt).activeElement.id),!1}},{key:"updateDeviceList",value:function(t){var e=this,n={id:"localdevice",name:"Local Device"};!this.isDeviceListUpdated&&g()(this,bt)&&g()(this,bt).localGumIsCallable&&at(this,kt,Et).call(this,[n]),g()(this,ft).updateCapability((function(){e.isDeviceListUpdated=!0;var r=g()(e,ft).getSupportedWorkers(g()(e,bt).feature);g()(e,bt).localGumIsCallable&&r.unshift(n),at(e,kt,Et).call(e,r),t&&t()&&(0!==r.length||g()(e,bt).localGumIsCallable||(g()(e,dt).querySelector("#deviceList").innerHTML="<p>None</p>"))}))}},{key:"updateSignalingStatus",value:function(){var t=g()(this,dt).querySelector("#signalingStatus");t&&g()(this,ft).signalingStatus?t.src=et.a:t.src=nt.a}},{key:"clearUpdateInterval",value:function(){g()(this,At)&&(W.debug(ct,"Capability Interval Ended."),clearInterval(g()(this,At)),m()(this,At,0))}},{key:"startUpdateInterval",value:function(){var t=this;this.clearUpdateInterval(),W.debug(ct,"Capability Interval Starting...");var e=0;this.isDeviceListUpdated=!1,m()(this,At,D()((function(){t.updateDeviceList((function(){return(e+=1e3)>=1e4&&(t.clearUpdateInterval(),!0)}))}),1e3)),this.updateDeviceList()}},{key:"clearSignalingStatusInterval",value:function(){g()(this,xt)&&(clearInterval(g()(this,xt)),m()(this,xt,0))}},{key:"startSignalingStatusInterval",value:function(){var t;this.clearSignalingStatusInterval(),m()(this,xt,D()(M()(t=this.updateSignalingStatus).call(t,this),1e3))}}]),e}();function Et(t){var e,n=g()(this,dt).querySelector("#deviceList"),r=n.querySelectorAll(".form-device-input"),o=new G.a,i=r.length,s=rt(r);try{var a=function(){var n=e.value;-1===H()(t).call(t,(function(t){return t.id===n.value}))?(n.parentNode.remove(),i--):o.add(n.id)};for(s.s();!(e=s.n()).done;)a()}catch(t){s.e(t)}finally{s.f()}0===r.length&&(n.innerHTML="");for(var c=0;c<t.length;c++)if(!o.has(t[c].id)){var u=document.createRange().createContextualFragment(K()({id:t[c].id,name:t[c].name,checked:0===i&&0===c}));n.appendChild(u),i++}g()(this,dt).querySelector("#alwaysForm").style.display=i>0?"block":"none",r.length>0!=i>0&&this.setFocus(0)}}).call(this,n(90))},function(t,e,n){t.exports=n(832)},function(t,e,n){t.exports=n(835)},function(t,e,n){var r=n(634);t.exports=function(){var t=new r.Template({code:function(t,e,n){var r=this;return r.b(n=n||""),r.b('<div class="form-check">'),r.b("\n"+n),r.b("  <input"),r.b("\n"+n),r.b('    class="form-device-input"'),r.b("\n"+n),r.b('    type="radio"'),r.b("\n"+n),r.b('    name="radios"'),r.b("\n"+n),r.b('    id="'),r.b(r.v(r.f("id",t,e,0))),r.b('"'),r.b("\n"+n),r.b('    value="'),r.b(r.v(r.f("id",t,e,0))),r.b('"'),r.b("\n"+n),r.b("    tabindex=0"),r.b("\n"+n),r.s(r.f("checked",t,e,1),t,e,0,165,182,"{{ }}")&&(r.rs(t,e,(function(t,e,r){r.b("    checked"),r.b("\n"+n)})),t.pop()),r.b("  >"),r.b("\n"+n),r.b('  <label class="form-check-label" for="'),r.b(r.v(r.f("id",t,e,0))),r.b('">'),r.b("\n"+n),r.b("    "),r.b(r.v(r.f("name",t,e,0))),r.b("\n"+n),r.b("  </label>"),r.b("\n"+n),r.b("</div>"),r.b("\n"),r.fl()},partials:{},subs:{}},'<div class="form-check">\n  <input\n    class="form-device-input"\n    type="radio"\n    name="radios"\n    id="{{id}}"\n    value="{{id}}"\n    tabindex=0\n    {{#checked}}\n    checked\n    {{/checked}}\n  >\n  <label class="form-check-label" for="{{id}}">\n    {{name}}\n  </label>\n</div>\n',r);return t.render.apply(t,arguments)}},function(t,e,n){var r=n(634);t.exports=function(){var t=new r.Template({code:function(t,e,n){var r=this;return r.b(n=n||""),r.b('<div class="modal-dialog" role="document">'),r.b("\n"+n),r.b('  <div class="modal-content">'),r.b("\n"+n),r.b('    <div class="modal-header">'),r.b("\n"+n),r.b('      <span class="modal-title mr-auto">Available devices</span>'),r.b("\n"+n),r.b('      <img width="24" src="'),r.b(r.v(r.f("SIGNAL_IMG",t,e,0))),r.b('" />'),r.b("\n"+n),r.b('      <img width="24" id="signalingStatus" src="'),r.b(r.v(r.f("ENABLE_IMG",t,e,0))),r.b('" />'),r.b("\n"+n),r.b("    </div>"),r.b("\n"+n),r.b('    <div class="modal-body">'),r.b("\n"+n),r.b('      <div class="row-container">'),r.b("\n"+n),r.b('        <div id="deviceList">'),r.b("\n"+n),r.b("        </div>"),r.b("\n"+n),r.b('        <div class="vertical-align-center">'),r.b("\n"+n),r.b("          <image"),r.b("\n"+n),r.b('            id="qrCodeImage"'),r.b("\n"+n),r.b('            width="132"'),r.b("\n"+n),r.b('            height="132"'),r.b("\n"+n),r.b('            style="display:none;"'),r.b("\n"+n),r.b("          />"),r.b("\n"+n),r.b("        </div>"),r.b("\n"+n),r.b("      </div>"),r.b("\n"+n),r.b('      <div class="form-check" id="alwaysForm">'),r.b("\n"+n),r.b("        <input"),r.b("\n"+n),r.b('          class="form-check-input"'),r.b("\n"+n),r.b('          type="checkbox"'),r.b("\n"+n),r.b('          id="alwaysCb"'),r.b("\n"+n),r.b("          tabindex=0"),r.b("\n"+n),r.s(r.f("alwaysUseSameDevice",t,e,1),t,e,0,817,846,"{{ }}")&&(r.rs(t,e,(function(t,e,r){r.b("          checked"),r.b("\n"+n)})),t.pop()),r.b("        >"),r.b("\n"+n),r.b('        <label class="form-check-label" for="alwaysCb">'),r.b("\n"+n),r.b("          Always connect to selected device"),r.b("\n"+n),r.b("        </label>"),r.b("\n"+n),r.b("      </div>"),r.b("\n"+n),r.b("    </div>"),r.b("\n"+n),r.b('    <div class="modal-footer">'),r.b("\n"+n),r.b('      <button type="button" class="btn btn-success mr-auto" id="refreshBtn" tabindex=0>Scan</button>'),r.b("\n"+n),r.b('      <button type="button" class="btn btn-primary" id="connectBtn" tabindex=0>Connect</button>'),r.b("\n"+n),r.b('      <button type="button" class="btn btn-secondary" id="closeBtn" tabindex=0>Close</button>'),r.b("\n"+n),r.b("    </div>"),r.b("\n"+n),r.b("  </div>"),r.b("\n"+n),r.b("</div>"),r.b("\n"),r.fl()},partials:{},subs:{}},'<div class="modal-dialog" role="document">\n  <div class="modal-content">\n    <div class="modal-header">\n      <span class="modal-title mr-auto">Available devices</span>\n      <img width="24" src="{{SIGNAL_IMG}}" />\n      <img width="24" id="signalingStatus" src="{{ENABLE_IMG}}" />\n    </div>\n    <div class="modal-body">\n      <div class="row-container">\n        <div id="deviceList">\n        </div>\n        <div class="vertical-align-center">\n          <image\n            id="qrCodeImage"\n            width="132"\n            height="132"\n            style="display:none;"\n          />\n        </div>\n      </div>\n      <div class="form-check" id="alwaysForm">\n        <input\n          class="form-check-input"\n          type="checkbox"\n          id="alwaysCb"\n          tabindex=0\n          {{#alwaysUseSameDevice}}\n          checked\n          {{/alwaysUseSameDevice}}\n        >\n        <label class="form-check-label" for="alwaysCb">\n          Always connect to selected device\n        </label>\n      </div>\n    </div>\n    <div class="modal-footer">\n      <button type="button" class="btn btn-success mr-auto" id="refreshBtn" tabindex=0>Scan</button>\n      <button type="button" class="btn btn-primary" id="connectBtn" tabindex=0>Connect</button>\n      <button type="button" class="btn btn-secondary" id="closeBtn" tabindex=0>Close</button>\n    </div>\n  </div>\n</div>\n',r);return t.render.apply(t,arguments)}},function(t,e,n){var r=n(841);t.exports="string"==typeof r?r:r.toString()},function(t,e,n){"use strict";e.a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGgUlEQVR4nO2bW2xVRRSGv7bcEgHBgiCE4hUCQVSQW4JFELEqD17ACyYEkAKCEeOD4hM+mIjEGDUx3ohACE+iBgQSJdUAikhijEFCJUVFCoIitwotbQ/Hh9ltNqf/2nv2OaeNl/MnkzRz/nWZtfeeWbNmCgUUUEAB/2MUdaCtfsA4YCBQGmoAJ0KtFtgT/P2vRi/gcWAtUAOkE7YDwBpgHnB5x7qePYqAycB6oJ7kg7baeWAdcDsd+9Ymwn1ANfkbtNWqA1v/GNwEfE77DzyzVQEjc3U+l9epM7ACeBooTiB3BjgE/AGcC/ouA/oCVwM9E+i6CLwGPAc0J5DLGQOBr/B7UnXAx8B8YJCH7sHAAmAjLkA+NnYA/fMyMg9MBo57OLUBmAZ0zcFWN6ACF4w4e0eBiTnY8kIFcCHGkc+AW9vB9gTgixjb9bgH1C6YhFuOLOM/AFPay3gI04hebepwwcorxgFnI4x+BHTPt9EI9AQ2R/hzGrglX8b6AscMQxeBF/BbTfrhJrf1wHZcplcXtANB3/qA089DXzFuFbKCUAtc4aEnFp8YBhqAB2NkOwGVwC4gFeFsZksFMpWBjijMAhoNPR94j9LAoggn58TIPkB+MsPqQFcUnsjBTxPXYK/Dr0bIlQLbIhzKtm0j+pV+y5Crwy//aIM1hsJPgRJDZjhwMIdBxrWawIZCZ9w8ouTesQZpTV43APvFQI8CI4BTQqYcNzP3sIwFqMHtHX4N9AEMAMpwy+j1MfJngenATvFbH2AfcGVGfxMwBPglRncr1qEjudDgX4srYFhPrgF4BRjmYXt4wG2I0HcC94kqLDVkVnnYBtyGpFkoqEHPyD1wSZDl7Abc002KskDW0rsX/bZ1xT3pTH4Tbg8Ti2cNg48Z/NUGPwUs8zEYg+dx+Yay8b4hM8fgL/UxuEcI7kNveUdir++zfYx5YrZhIwXcKPglwI+CvyPOUJlhaLnB32rwX4qx0wkYC8wEHgLG4GbxKFhZ3xaD/6LgpojJMp8yjIwS3LEGdzd2gaQXsBI4KeROBr91M2SLgW8Mm2MFf4LBXWDoB/TsX2twVxoGyg3+YOBnQybcvsVNxAqTDJmXBbcY+F1w3zV0A/CdELCSCPWNVRncQSRLkE5gB6FK8KsN7lrB3WVwKUGvvbMEd6jhuHq9SoDvDX5U22T4udDgDxXcuYJ3xtBrDkp9/48I3kV0XW5WgkFntulCX3/0sviw4FrzQGteEp6s+goFoOcAlVDU4uoGmXjU0OuDRaLvGHAkgU8KrWMNB8Bahv4UfQNE32+G/Dij3wdjjH5lS/l00pBvHWs4AF0EMRW0TKhX/bhhrI/R74NSo1/ZUj5dMORbxxoXAGvb+5fos2qC54x+Hxwy+pUt5ZPlvwxAvUFWJzXqW7cyrL1Gvw/2G/3KlvLJOmVqaPkjHAAr2urVUsbK0POItZz5QKW5XdC7S+XTVYZeOdYu6OXlHsG9S/DS6HOBXrjCR9Il8DD6s6ww+NME937BayT04MNvQCN6dlWnPNtxhySZUOv2aVz1uFH8ZqEZWGzIqKPx8+idnlpFDuMetIRKM/cY3E2CewrobfDnYu/rwy2FnTsMQJ9ObTT4KgPdanABV3xQGZ6adCqNAayI0D+F6OpRFdHnim8bcpWCO8jgPhOhn1GG0DzB7Y4+Ja4HRkfYKELXETZHOQbciS7VHcPdL8iEdaYxIspIkTEo6xV70jBSi87MWqBqfRsi+ENwn5eytcSQUUFWKXQbrBaCKXQ9vjPwk+A3AXdH2EgagDHow9mD6KX3ZvR8E1kLaMFoIZjGnQAr3IEbcHjwM2JsJA0AtD2eb8I+jt9ijMH7TtGXhgJrc7Ik5NRMD/3ZBAAuvaCx2OBMNHy3ijUSMwwl2yJk3sAVOH2QbQDAJTevR/y+U+hOA/d66gfcJmK/ocirth6DXAIQhWVCbxqXDyS+EVeOnkiagak5OtoeAZiOPqNIAeOzVbpKKEzjiiTX5eBsvgMwDFfrU76+mYNeemNfj/k6B735DoCqZres+0kuXkpM5dJlLo2LdtavFfkPQDmuIBLWdwF3uToSvhPDfOC94O+zuO3wbk9ZNbDxtC1iHjF0xuUULSjHZX8tafFs3EFP3rACt7VNWuRUr2aSlgS34a7ELE8o54Ui3M2RpOjIAIDbN3ijI/75IJtBhNGuPia55v6fRNwlxHzgww6wUUABBRRQQDb4G2AYTcK9lLV6AAAAAElFTkSuQmCC"},function(t,e,n){"use strict";e.a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAlA0lEQVR4Xu2dCbBdxXnnf93n3nff/rQLCe1iETL7vhtjgx1AeBnjeDLxjGucKgGG2LEn8aQSm4A95bgc18RLMMqMM05mpiYxnklsP7wbowQKEBhjiCUhoR3telrfdu89p3skna76St3V57zHe8IC3lfV1X36HGzV/f/7W7v78aaRCZmQCZmQCZmQCZmQCZmQCZmQCZmQCVG8AWUFVBswPYHFKm8LFSwC5gCTgQ7XV8glBQ4AAxYOKthmYaOFTRY2ZLChBfYuh+YEAU5B+RK01WBRAlcquFjB5cASoF2BZgxiwQCDwFoLqyw8l8FTddj4SRiaIMBvSL4OZwI3aLgGuAqYr6DGayAW6sAW4EkDTwCP3QXrJwhw8lX7LAvLFLwfuFZBG6eAWBgCHrfw7Sb03gs7JggwfqIegtuAOxTcomAqp7BY6LPwfeDhO6EXsBMEGL1wByQ3wu0afl/BDbwOxcJjBr7yKHz3YcgmCDBy+/4BB/w14waG9IWipB9PIjxh4Ct3wbcmCFBs488D7lfw3rECbQAjz1SBSjVBVSoorVFJBZSD2VpslmFNhs1S0kZGU4iAdm2sxLDwj8B9y+HFCQKI8DXorMKngI8p6Ho1oBsgAxKgpbWF9ulTmXrOQjrnzqXttFlMXbLo6Hg21a5ukrY2dGs7SlcAsCbFDA2S1YdIjxzhyNYd9K3dwNDunfRv3Ubfmk0M7u2jMdxw/x+gXyUZLBwBvtyEL9wD/W96AqyAa4GvKbjg1YLeohWTFpzO7OuvYMbFFzDz0vNpP30ula4OaG2DagukBoxrKLAWEUQbaAVJAhUNzToMDZP2DzD4ylZ2P/sCe577FTv++WkObt5Ow9hXTQYLvwLuWQ6Pv2kJ8BD8qcpbbTTAN4EEmDx/NgveeT0Lb7+ZqeedSzJ1CiRVaDQhTcHiwHYAK7HwKJ//FqzrsUIQ5VqSQEsVsiZZ3376/vXXbPrOj9n8o5Uc2LKDzJkZNcp8goXP3Xm0vUkIIEkcBQ9qeAcjFAOkQHutyoJbb2DRbTdx+nVXUTltBmQcB11A0wjQ2vUOSaSTQUgCrEXIIL0jRE4Grch27+GVf3mSjd87SoZHHmOw3qTC6NKPBn5q4W5JJr2BCbACbgW+qmDhaIDvaK9xxntv5i0f+SCTLzwvX+n1BmSGXDQoARxl8x4EQLSbshEToABCImHFbGDAGiFFoqFWg6zJgedfYPU3/p71//gTBgaHR0UEC5uAe5fDI29YAqyATyt4YDSqvr2txjm/cxvn/Pv303PuUjDWrXYHkPJWtzHiIVjlpqUXbRCKkMII7jnQQizteixYcyKZalXQcOjFNaz5u4dZ8396GRysj8o0WPjMcvjsG44AD8H9Gj5DqUjGZOGNl3PZH93JlMsugmYGzVRWKwkoBHSbgTUCsCMHuOb7ACDP1ssUOFBl3jmPANY4EiSgEyEOohVoqUI1Yf8zz/HMFx5i06OrAEhGbhIeuBPue8MQ4CH4oob/NNJVP23hbC79+IdZ/G9ugUoNhusOLA1aCxAmBZuFtl4lAnBAAhBV73olBPDBF3Bx85nMY0EloCugtXsvRKC1BRoNNvy/R3j2L7/Jvk07RqwNDPzFnfCHnGRJXgPw/0rDx0ay6g1w7vvewdv/6s+Ycc3lUG/mq17JasVkkA5D1pAVjwAp6l5stwBsvVyflQZCrHwgz3imARASZmAaYFLHMyEoaW6qplxyHme86zrSfX3sXrMRC+jylXn1rTCjF77/utUAK+DLCn6fEmkCbR1tXPXHv8eS//B+QEOjiajyBEwKWRNs5mkDDQp5Rla99AS5vDAA8AayykM1b/KxaAtxDFEaKi2gkhPnWyqgDGu/+W2e/PP/zlD/EFXKxcJXlsPHXncaYAV8XsEnKZEGMOucBdz8tU8z7/abYLgBaSbgY6E5nDdZ8bLa5VlEnkHZkdI9ng+wCPgIKTDyLN9mkDbAZKAT0TRZE4xl2uUXMveypfS98BKH9h0sBUDBFbdBay/87HVDgBXwJwo+MxLwF119Pu/86/vpXnIG9A+CFaRIG9AYBNMEFdpwkOcQZFXg5dvwE2sD8GU+9AVkPieGE3lnUkjr4idgwRioN2hfMIdFN1/JwX9dx75tu0dCgmtvg7QX/uWUJ8AK+C0F3yhz9lJgybuu5sYv/zEtkyfDUF1AxkJzEPkBlWfrPTsuJAjFRgB3YGO9b/BXPGEySMgQziMN47SBNTkJlMrHzQaV7i4W3nwVA5u2seflbaXpZAU33gareuHlU5YAD8IiDd9W0FMEfgZc8IGbuP7znyBpbcudPRBb3+jPnTylPbAlbAvmAKzygQ8dQgwyaTwn0EZsv8xh/HfgtIDnJyDfmQakDUcCFy00mujWGgvfcRXNfX3s+vUGoXhcrnsX9H4f9p9yBLgPdA98S8FFZWHehR98J9c8cC9Ka2g2HdA6B71+RLJ2KIexAB2P6Sm39VYGoRjAV+XOh7Am4hsYnwDS8OecSVAadJLPZSmqkjDvxito7u1j+79uKNQECnoUXLAM/ncvmFOKAP8W/kTDR8q8/fPec8NR8O/J8UszATOr5+BbZE55oGM9IiDfQxnqoKw3L02kqBYAQgYhQfC9gB/6C+kwKJWTAON+A5hz/SUMb9/NzrWbC0FRsMCC7YXHThkCPARXKfiGgkqRw7f46vO54Yt/gE4q0ExllTeHcrUfpGqlx3i231Jg+1WopsUs+JiHvoCNhYKe0yfAOuxD8MEnjM1JAKArgIU0QyWaudddxIEXR+QYXr0Mft4LW3/jBPgidLTCdxTMLlr5p505h3d+9Y+Ob8iQGN+BXx8IY3eQ3uLNxzx+KyQR4EPVrgCs3yLOHqGDR0zVG48UgZaQvlkHZUFXXZiYoWotzL36PHY+8UsO9x2OgqMgAa58K/ztT6D5GyXA++EBBe8ryvDV2mvc/MWP033WQhhyKhCdx/aNfg94b5WjBFiF907IIWAhAghYkTgfAUzmY4CLCZCxAYMjlhACG9EEQhIX5ahcE7jMYaWni5nnLGDjj56k2Wii4ySYXgM91vxAMkav/yINf6MgKdq1c/0nfof5t10PA0Mngl8/LOBbP8EjnYgSAJV8I8CqkAGh/Q/jeQE7NB1CmPB7iQLC6qCxJ84ZIURgDpR25sBAo0nb/Fl09bSz8ee/KIsMrlgGP+yFHa8tAcTr/3sFi4pU/9J3Xcmlf/DvoC4lXLImDB90z16hxvphnxK1LSvfI4R1Y7zwzCOHLXUCI6rf+JGArH7/G0uo9m3mAe+Zh+Yw6ARU4sxDkynnLmZw2w52rttWZgrOvgT+biXY15QAH4Q7iip8KTBl9jRu+sI9VNrbIc0ADdbA0CEwBpT2VnGE78pT9yCr3Y0F6IAE4cq2RfafAgfQMxmeNghrA4Q+gmvyDBiTm4OkJhpFwWnnncGWR59h8MhgkSmY3wGrH4Ffv2YEWAFVBX+rYFZR4HXDH3+IaZe8BYbqAm79sIuHBewQeFmtvlMnYj1meFogjOm9ZA9hwxYlg+IlYoyXE4iFgWFz30qxq1pzpiGjMrmbzp4ONjz6bKEpUHDmMvibXjCvCQGWwQcVfLRI9Z913flc/NE7TlT9zQGo9wNawC2uU4aRgC0u4oThXkCEOBh4Xrtn1z3ww+9N6PmHWULXjA3Jkrrsp66CMdBsMumseRxcu5k9W3YVmYLTgLW98OJJJ8B9UOmE/6bg9NgevtbWFm78s4/QNn2yJHtMCoMHfITDKp71wbd+4ScEnJAYAj5+ujecF7DDZA4+8N68Md43Aizgqf6oHyDkSetQqTqyZ1DRTJ47gw0/eJI0zYqSnPMugf+xEsxJJcBvwy1Jge1vAue/51rOfN/b8tIuADq3+6lL+4oAQfgX9mLvpffAD+2/9chAkRMY2nrRImBCOx+CiYCK8TSD11sbJ4bJ8lZtcw5hRtvp06jv6WP76s1FWuD0dnjmEVh3UglwO3xWwVtiq7+js423fup3aenugMwAOmf1kIR8cYcvvqIFIOWb+rj6DzWBPEdaWBQqcPaIqXtvs4jx3ok2QcyGRBpkDdAVVxzLAJh0lAQbf/g0zUZa9KtVeuHbJ4cAUu37rwpaorn+ZVezaNk1MNyQRM7QAcgyyeeH6p0SEWBR3rPrUB6IfnpXwA9MAkHKtiSdSwx8zxdAgAU/CoiPjckdworTAllGy/RJDO3ax/Y1W4pAW3AL/P0jcOCkEOB2+LCCZTF8ai0VrvvEb9M6pRtS4xy/IRg+Aiqu4gVI75VVERJ434MHfOC9Oynwyo3rA3+gzJsXsGUsRADfQZQ+0CziROYE0FWoVPJ5DZ1Tu3n5B09jMhOrgLQAW3vhyZNCgGX5Nq8Fsbh/8bXnsvSOt0EzFXCGDoLJiuu1QoYSMyCrXcaeJpC5MBdgomGgDIxnw00R6Cby38l3gQkITUTQCxlS8QUyQ+v0Hg6s28aeLfFikc23j31z3AnwIJyt4b/EKn4KuOL3bqVn4Wyp8TeHYfiw58GXVfCU62ws7A/HeKpd1HQAfmgGPIDxQMeE4CLPYdrXnGjnTWTzKKHaBxk7LQBJi9s/kEG1QkXDhkd/iSIqs26Bhx+BvnElwO3w3ti5/QyYOmfacQJoidVzzz9rePF+bCyoylQ01vdUfEwDRHoiOQAB3etlFUfA9Agizl3oG5hQ5RtfUzjimAysEV8gzeic2sPmx19g4PAgOuIIKvhVLzw3rgS4DT4eO8KdAktvuoS5b70QGimgIMty9T8mEdCEI77aDskSAh9GAZgCEuCrZBDQLAIWBZk979kDXMYWyBz/MjDuvWQIcwIowBh0ZysD2/fyyuq4M2jhUC/847gR4D5o7c7t/5QQIqgoxeUffiedp011iR+dZ/zqA/7BDV+9y7ONL/34Tt1QE0hP2AvoQNjkffmeP1n1YTgnaj9c7VCYGAojhbQJiYZKLZ9TikTBhp8+JzozlM5L4K9XQjouBPgALNXwR4pQ6xhg0szJXPqhm9BakjK5+k/LtmtFVr0q+dxG1L1IZDNHvBxsvXAwGrtHikFh4UfIEyaAPP/AH1vPHzDiDBpDa1c7Gx97nqGB4ViRqLsN/u/3Yfe4EODdsEzBe2Lqf9GVS1j0tgtdxU9Bmnrq39+143nzRE7llPkD+JqA0OsX8D3Qy5oA4DuJocceG3tgFvxvhFrEynOWQrXdpdQNuq2FvvXb2L0prA8gZ5ifEz9gjARYBssVXBJblOffegVTl87L7b/WUB8Q9R/4ehEvPkgORdR7YaUvZs85UcUTIYIpK/Far/lmwAOXULWHoWF5gogsA524SmEGLRUa+w+zedVLaKKyqxd6x0AAKf50wf2u4hSAX000l/7ODbRN6oTMAuT2v1kHVAi+iuTmBftQbGwcagzhiJ/9i0cA5aAbwAMRz9nzY39CgENCSRNSZWHUYDNHgFbct2gs637yHMZaVATbS+AbK8GMiQDvg9kVuC9M/4Ilz05d9P7r0IkWNvcfwDksJwKiYuo+ugnDT+lG7X6YsAGIrXh88D2gCzz4EOwy1S5gliV/sBDafzBOC9TaweZmoNpSYf1jL1AfrMcI0FWFb/4QDo+JAO+Fy4H/qAiJlgKnL5nDWcfsv0W2XQ0eEoBUyYFkS/TaFiGOt7oDjz9c/fI+/hxvBlnZJTt6wvlwzsS+CfIMrs/AhJVFWrtwZEYnmh2/2kDfzgMxEKsV+EEvbBwTAZbBLQpuiTmACy86g7lXnQ2NDBTQrOe5fyuVP7BewSYghD/nqcsC7UDoGoRgyxwm0BC+8ybzgUcu73yHLQQe5DkLNEmoXYR0GLwsofum2go6yce1CnvXbGPH+h1halaM7zO9sIoCqVAiFubHAjl93AR0IcBaaAxCmkKSgLHIPT6AQSqCmQYNKAMqQTaGWjenwSg3b/Nn+cY/NibvvLRzdAxgEFGxENM/5+eZFCXgByGhCfyJEZoB0RZgJStYH4RKLX9W6vhvr0uwo0QqlMucCDFIgK5jBEhTx2AFmZGxQsBzah6t5Dkj77UFtJtXrperX/Jm/GtfvDFgZM6JjCnabk4AepiECmoJscgiTCmHVT//nQ94WEsw2Ynp4WZK17RuEsDGqytzx0wA8f5DSRS09bgdv8aA1hK2WA3aCHjKgYx2pMiEEFn+jaxog9z2gb/ivVtBABtsKxdi+EoRym8JE9Aj28iIgC59sBeAiBMpfYQM4iPkBHBzWUZbdzuJUhhricjM8dAAk4mIriTU2logyySESZvCcAFNAMqcitfelS2i2h0pyHtjQfsq3rqxFfAt0scukrBuXCqRXcR+6Bmq/chmEcrKwa5lAXHEP5DfNl9kUGuvHsfANFMiMuWkEcACKtFUW6tOPbnJZkPIYORYF1qD2GwHsIVMO0DlfT6HgJkJ+GJOXI+QS4D2Vr8KiBATeR84m360UaD6ZRxJASNzROoCYbZRrp4h1wDVWhWVKGwzSutJ40GAdiKilaJSSSBzjhLCUgHLgHWmQdmcCAKUA196EJMhoCvRDNb6x8KidwCGJJBxVIywI6L2I3sOjF9I8ufCIpEpSg+HZkI0QK75kkoFrRQF0jYeBKgSFYXK89PiKZsUjNzSifYudDKAePYCHu5ZWd/Rk+8MzrcQF16iAzzg/XHZ5WiFDqAHbMz+Q5hIwttCTggw8vuJGXBj+Q6yNDe3zuHVqoTM0FJOgLGKCVmOMbJarQJtxMt3wIObF89f3NkAfCtzYve9Q59hBADh88jFlqScbeQZ1/thX0ma2eDGEefQZKAS0RyJxhpHsLiY8SBAk6hYrIsAEGfXhYJICGdB4nsC71/CPs/h8227AApKe3OuKXxz4OcARukERsLAICMZcwQLQ0IBumiTKEa0qhHn0DRTrC1kQGM8CDAYX/yWtN6gZtvByGrGZLLgxMYLaArIlLyT3s1rAR9HEHxCWCAS9wthvPlRiI1VJSk4MErcETQRk+ARIRjj+sxAFdEUKEcAQ4HUx4MAB4F5QOgsZxmNwWE6hLmAhiwjDAEtEhG47+Sd591bzwxYz957Nl5Al56CDODotUAB+ES9/pAUIeCAd7oo875FikFKI9pC0xgYxmYWVYjd2Amwn4iYzNAYqAOOoRUHhjGAeP0CEIj3DwJk4kyBcj0CLKINwCJzhGZBSCBjRqcJ4lfLRMPAUiLIs9fw0r9xP0EiK8jHiTpOAJNlJdiNnQC7iUhmYfDggDguRoOxCFsRrSCqXmy+iuX6w6QPIPNYeS6KAKQfhSMYqUhKXwp+uUMYRAXuOV4rkFSw+w4YPDSQ59VKsBtrMWhbJM9ME+jf7yp/Rmydp7I84EUtu2c3NoD2wNcA4hgi34IqAFwV1QHKxY4yEoAI8NJK7xbEI4ZnLhzwQgKgv6+fFGgpwG48agFbiIh1/wiyVFhaqQGuKOTwQ2tAVr2AbX0SeM6e8e4P8nrtq/4y9f/qUsHS2XAu3IQSAT+sFLq5yDUzeKEieTk4y3D1luOLz5ZiN3YTsNaK1Q7KwQf3HILhhrPtFipVsAAZZMYLA+UGcAHfeLbeNWJj5NkS0wThePROYIkZIAKuGxvExhO7YFrAdhFB5Jo5p02Taj7GwlD9+G+viym8dswEGIa1rTAIdOBJAhzcdZB0qE6lrSZZLIA0gyTJ58KSMFi/AmhD9Q8BKQRwIn3o+cfVvyqw+zETELP9FIeC5ZdNRw6Xuj5J8t7mmjMdrHNwZ+F184PD40GA/bBrNqwjvAMYBQweHuTQ7kNMXTADjPP6W9qhvl/0hDaAkaye9eJ4aWHoJ3PxRBBEIgHKvP/RRQTWHxdUBsM57znwCfzqofQmhbZuQDszqzm099Dx314RlXXHsBszAe6H9CFYpSIEaBjLnq17mbp4BjSdDdcJmEy8eKvF9gvAni0XJ1G+IQI+gPHjf6+0XKT6R31YRTobuS28PGUcJ4B8eyLwWEkCJRXJCOqEPVv30TA2CqCFVcewG5dagIJVwPJYsnn35j2c0zzbsRVo7QBcRlBrsH6ix7PpVnL+oJDv8E2BvA/ALvUDykkQNwXxZFAIfNwMhHPSIL47GAW1dreo8sujdm/agynHjPEqBj1jIVXh9yTA7k17SfvrVGpVlxKuQKUVhgdA5zZfwLUIAbQUeLRf23dgKBOaB4QgkeKPPz9eB1TLfQHx9CNqn0JChEWgNN8NrKqQGtCQ9tePEaDocGgKPDNuBNgB62fDJuBMPNHAof0D7N26l1lnz4ZmrqKodcDgYXKJOHlCBshsTP2HKz80ARKnjLEOEB5iKQj9nIRXx+FdIRtJH8t7aX5CKLNQa5cMYCVh75a9x39zTVQ2HcNs3AhwPww/BE8pR4DADwC2rN5+lACzxAy0dcJB5TxXCf/Qrg+dQKBgDPENn2qk6l+VW4B4GFhWGCrPDAICbmzHMDI2juStnZCl7jvNljXbaRYngJ46htn4EEDkceBDscMFW9fs4NK3D1FxW8TQCbR0wMBBSCqyKdQaUIQgQ4QEfn4/UvYtiwTUqH2A0mJQCL5oA8ArEUeIIaQItUGWQmcP6IrbD6BIDw+yde0OknKsGFcCGFipoK6gFhIA9u/vZ/v6ncy/YD40MtAKOnqg/4CkhTF5L6ldGSuKCBF+A0E4KOKZA5l/lZtBVEgAQrUu3xSlhfEIUnKVbPskSQVXNdvX72J/X3+R/a8bWDnuBLgb1jkz8NYIQVj//Fbmv2WOU/vOdrW0OWcwQcJCARUbWfUQZv80gEcGLKgQ+PIawOhrAgJyuUYQUuCDHMb6hDuIMVmu+mttkmpPLeuf34KBIgI8dQyr8SWAUP67RAhQAbau38WB7fuZPHuKXBHbOQUGjoD19u95DmEk5g8dPQKHsKTwoxib2JAMtpQMsYqhlzMo2SHUORmpsSTHfttjv3EhaA4jezIIgIF/UvCACtPCKGAoNax5dhNXv3uyK1gArZ0uMzgAmggBbLn6h/A9REyDHVsEIEJ4R1HsjMCIKoUh2KEpcKu/I3ekMzkuvuaZTQylpsj5GziGEcBJIcDdsHEFPAJ8IMam9S+8wrmXLaJ7RjekLofdMx129UtRw2UCo06eIh73C+Cj3wKm1Ni2hMlDQTQAYGKEiHj7QjJnPvPfzLpkWqI5vOMg6198pQywR45hdFL/ePSDcFsFvle0C/HCi+dzze0XQzOV1PDurblDmCTx+F7HQr4ISWJ1fxWz/+pVqv4CR1CeIyVhAH++YEtZlkLXJJgxX4pB1QpPfPcXPP/cFlqISwrL7obek6YBABL4kYVnFVwa0wIvHWXqkgvnMnXOVEhd/nrSdBg4LBGBt8LDur8NCBCq/yIiIATDvkoCqDDUC8fRXcPSx/4CCeGVtDqBSTNkU0gloW/rXl56cVshWBaePYbNa/Ln4x+C39XwP4v2kZ9xxgxu/sDlwnxdgUN9sHcb6CQS2rleSYgXnh0M/jsBq3jVj25HULk28AhQCnzxkTKArAnT50HPNDApAGjFj/9hFS+/vJsqcTHwoTvhf70mBFgBVfIK4YVEJANuuu0CFl80DxqZ3F21Z2tOhKRSoPaj5wGkP5ll4ND2x8lQ7gxGvH6PHFkGnZNg5nyZb6mw4fmt/OR7z5MU8/V54PLl0CSU8T8ZtByaX4fPJ/APFMjT//wSs+dNoa27DTLn3EyZBUODUB8EnSCVQMB6YMf3/ctY6gAyB2M+GBLPA4j6RvmOYCH48aqhyaBag6mzEdWvGdp/hKdXrqVMDHz+LgH/ZGsA+bNxs+HnCq4vMgVnnzWTt7/nItn6pJM8MbTjZdwGkkjoV6YBRuoIjtAU2JGfE4xvFinbJRS8l7zArEXQ0SVn/7Ti5999ntVrdtJSTNV/3gFvux/Ma0oAgK/D5RqeiN0gboEUuP6Gszj3ysXQSHOgkgocPgC7NgOOFLHTPUqDtdETwNKXev6jI4CKJ39ECq6thfimEWvlBJW1cNoC6J7sMn5ALWHdL7bwsx+vJikAyUJq4Jq7Cmr/J/Vw6F2wagV8CfhUjF0J8PTjLzN9Zjcz50+DZgY2ze3dtDm5T2AjiSFwYyi//0eJWmYMdYDo6g9tflwDlG4YkRNAM+bmtj916d7qsXLvfp5YuQ5VvkK/JOC/1gQQNf+5KixTsJRQ0EAjNaw8yuZl77+Utu5WFxpa6J6Ss37vdiRBVJbli5iEwhKwdNgxnA2Iqv4A/PKTRMbA9NOhZ2q+8o2FSsLQgUEe++GLDNVTqsX0XN2EzzFGUYyDrIBrgZ8p4uaqASycO4Wb330BlWoFMivq/+Bu2LtDdgl5W/wLzvuP8ghYOfLlN5bHAA+1gYwJN4lMmw2TZspegESRNTN+dNTub9q6v8zuN4Ebl8Pjv3kCSG7gTzV8tuys8tKzZnLDO5eitJZdQEmSh4a7t4AlOE8YAq19PCMkKFz63rMd7XHxEFxiqWEk1FMKZs5zK1+OxFtjeOxHq1m9bjct5V7/A3fCfQCnBgEkKvixgreXmAzOWzqL696xBFBgHAl0Av0HYfsmsOZEEkBBHgBHGiVAKDU+NLcRIiiQUFCN7MyAcRnQ0xdC12Qp8WoFWP7lp2t5cfVOqiPbl3GTxPynBAHkz8oleWg4r4wEb1lyGtfeeBZJkkBmRBMMHIE922B4UJJFUFANFCkvBpWxQUCOz5f6BmGyJ0vz6t6MOdDRnT9DrvbTjMcfXcev1+4qBd/CtibceA+8DHBqEUD8gd9S8P2yhdUEzlwwlRtuOoeW1ipkRnyCLIU9r+RmQXYQeWDGbgEbb36Xgx2PDKyrg0zLHb6k4kI/oKppDDV57CdrWL+5j+rIqHnLcvgBwClKgNAfKPMJ5s/q4cabl9De3QbN7MTs38F9sG8HNJuQJDIfLfOOeyo4Bm5x2dg6e19tgWmzYNJ0cfbIwR88PMyjP17Dlp2HaKFcDHz6TvH6T2ECiCb4cyX5gUJzMG1yO2+9/gxmzp0MqZGDJFpDow77dsLh/c43SHxgw/H4SzHg0out756Se/otNUn4KKCSsHvbflaufJl9BwepUi4WvrAc/jPA64MAQoIvK/h9SiQFWiqayy+bz3nnnw5KOb9AIgIGjkDfrryk7Mqmkvwp3QgyjoDLTR2BqlcqT+dOnQUdnW7eva9oMJYXX9jOqlVbaGSGysjA/8py+BjA64sAQoIHFdxFiRggA85ePI0rr1xAx6Q2aDptIPmBnAAH9ua9ycI0MieRAKH6l39DZ09u6zu6hSguYqCaMHBokKee3MxLG/aRAHpk4H99OdwN8PokgPgEX9TBn5yP1w56OmtcctEclpw9M185qQGQkjLA4BE4sM9tMmkCgNZeJDB+R8NE5GoXKlVo74bJ06C9C0DeYXH/dta+tJtf/PIVDvXXkbimWAz8xZ3whwCvbwKIJnhAwacpFzLAAPNn93DZpfOYMatHjkmBgG2BtJnnD44cgMEByFI5gaS0pwXsyNeFDVc6uEJWe2e+batzUk4CJcC78A60Ys+Owzzz7Ba27DiEBpKRU+6zy+EzAG8MAggJPq3ggVHUGahpxZlnzuAtS09j6vQOuX5G9gC4fQUmdxj7D7r+kDhfLukSPU4W1vClaqmUqPiW2jHQ815pB7qV3cKJBqBvbz+/Xr2L9ev3UDeW6uj0zWeWSwT1BiKAkOBW4KsKFiJSmjNoSzQLF0w5ToQZM7ogUS5iQMSBBU4zWCBrOjPhStFpM2/N+olgV2tQqebN2hz8jm5IqqDI50E2bDhBkwOfWfbsOXIU+N1s2tzHUGaojm4Lyibg3uXwCMAbkwCyj+BMBQ9qeAcjFAOkQE0p5s6dxOIFU5g7u4daRw0Q8yC3iYP02o3x7t0TQevwu/CAh7xPFKCoD9TZtuMQGzfvZ+u2g9StpQJoRi4Gfmrh7rtgPcAbmABhwkjlrYYnZY6iArrbW5g/ZxILFkzhtGmdVGqVHJjMAy3GfRVU+uIRhFZ5yyxpPWXXvn42HwV9yysHODzYxAKV0dcb6xY+5yV43jwEkFIyX/P+MvmotEIV6OpoYdZp3cyY3smMqR309LRSSTSqoiHREpML4HFCaIXLRWBTQ5oZDh0aZk/fAHv29rNz1xGODNRpQny1l4P/K+AeKem+SQkA8DXorMKngI8r6GSUYiWPgAaqWtHeWqG7s0ZXVyvdXS10HR13dNSoVROqVU1LS0UUANBopDSbhnozY2CgzpH+OoePNDhyZJjDR8eDwylNYzFAAuhXf960H/jLJnzhnnzMm5wAIn8F51fgfgXvYQxiXTOuOfVMRYFWCqXV8V4YAMZarLHH+9SKmdEC9ngcM/2nFO77KLyAyAQBQieRD+hcG1zFOIkteVYncWVYeNLAX94F36JcJggAcAckb4d3K7hXwQ28DsXCYxa++jP4zsOQAUwQYPSiHoLbgDsU3KJg6ikOeh/wAwvfuhN6PWUzQYCxyFdhdlXIcI2CtlME9CELTwAPN6H3XthBKBMEGOftZ2dreCtwrYIrgXkKaq8R4HVgq4WngMcNrLwbXuJ1KIo3gHwJ2tpgcZIT4WLgcuBsoEOBYuy1wAFygFcBz2Xw1BBs+CQM8ZuUCQLETy8bmKFgMbBYwSJgITAXmAR0AZO9PeMHgCPAQWAbsMnCRmCDhQ0a9shO3NefTMiETMiETMiETMiETMiETMiETMiETMiE/H+NKm6SUuq55AAAAABJRU5ErkJggg=="},,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.r(e),n.d(e,"GUMResource",(function(){return ot})),n.d(e,"HAMResource",(function(){return ct})),n.d(e,"SensorResource",(function(){return Ot}));var r=n(32),o=n.n(r),i=n(68),s=n.n(i),a=n(119),c=n.n(a),u=n(120),f=n.n(u),l=n(110),h=n.n(l),p=(n(104),n(126),n(176)),d=n.n(p),v=n(40),g=n.n(v),y=n(41),m=n.n(y),b=n(7),w=n.n(b),A=n(239),x=n.n(A),k=n(86),C=n.n(k),E=n(87),S=n.n(E),B=n(48),I=n.n(B),O=n(2),P=n.n(O),T=n(10),R=n.n(T),j=(n(125),n(30)),D=n.n(j),F=n(67),M=n.n(F),L=n(55),U=n.n(L),N=n(62),z=n.n(N),Q=n(232),G=n.n(Q),q=n(31),H=n.n(q),W=n(344),Y=n.n(W),J=n(11),X=n.n(J),K=n(8),V=n(191);function Z(t,e){var n=void 0!==c.a&&f()(t)||t["@@iterator"];if(!n){if(h()(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return _(t,e);var r=z()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return s()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function $(t){var e=function(){if("undefined"==typeof Reflect||!o.a)return!1;if(o.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(o()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=I()(t);if(e){var i=I()(this).constructor;n=o()(r,arguments,i)}else n=r.apply(this,arguments);return S()(this,n)}}function tt(t,e,n){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,n)}var et=new X.a,nt=new X.a,rt=new X.a,ot=function(t){C()(n,t);var e=$(n);function n(){var t,r;g()(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=e.call.apply(e,D()(t=[this]).call(t,i)),tt(w()(r),et,{writable:!0,value:!1}),tt(w()(r),nt,{writable:!0,value:!1}),tt(w()(r),rt,{writable:!0,value:0}),r}return m()(n,[{key:"checkIfLocalUserMediaExists",value:function(){var t=this;return new M.a((function(e,n){t._nativeEnumerateDevices().then((function(n){U()(n).call(n,(function(e){switch(e.kind){case"videoinput":R()(t,et,!0);break;case"audioinput":R()(t,nt,!0);break;case"audiooutput":break;default:K.error("[gum]","Unknown device kind.")}})),e()})).catch((function(t){n(t)}))}))}},{key:"checkConstraintsType",value:function(t){return void 0!==t.video&&!1!==t.video?"CAMERA":void 0!==t.audio&&!1!==t.audio?"MIC":"NONE"}},{key:"checkLocalGumIsCallable",value:function(t){var e=this;return new M.a((function(n,r){try{void 0!==t.video&&!1!==t.video&&!1===P()(e,et)&&n(!1),void 0!==t.audio&&!1!==t.audio&&!1===P()(e,nt)&&n(!1),n(!0)}catch(t){r(t)}}))}},{key:"printErrorMessage",value:function(t){K.error("[gum]",t.name+": "+t.message)}},{key:"getUserMediaDeprecated",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=z()([]).call(n),i=o[0]||{},s=o[1],a=o[2],c=this.checkConstraintsType(i);"NONE"!==c?this.checkIfLocalUserMediaExists().then((function(){t.checkLocalGumIsCallable(i).then((function(e){t.startJob({feature:c,arguments:[i],successCallback:s,errorCallback:a,localGumIsCallable:e,nativeGetUserMedia:t._nativeGetUserMedia})})).catch((function(e){return t.printErrorMessage(e)}))})).catch((function(e){return t.printErrorMessage(e)})):a(new TypeError("The list of constraints specified is empty, or has all constraints set to false."))}},{key:"getUserMedia",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=z()([]).call(n),i=o[0]||{},s=this.checkConstraintsType(i);return new M.a((function(e,n){"NONE"!==s?t.checkIfLocalUserMediaExists().then((function(){t.checkLocalGumIsCallable(i).then((function(r){t.startJob({feature:s,arguments:[i],successCallback:e,errorCallback:n,localGumIsCallable:r,nativeGetUserMedia:t._nativeGetUserMedia})})).catch((function(e){return t.printErrorMessage(e)}))})).catch((function(e){return t.printErrorMessage(e)})):n(new TypeError("The list of constraints specified is empty, or has all constraints set to false."))}))}},{key:"checkAndAddRemoteMediaDeviceInfos",value:function(t,e,n){try{var r,o=this.workerManager.getWorkerInfos();if(!o.size&&P()(this,rt)<3e3)return G()(H()(r=this.checkAndAddRemoteMediaDeviceInfos).call(r,this),500,t,e,n),void R()(this,rt,P()(this,rt)+500);t.push({kind:"videoinput",label:"Remote Camera"}),t.push({kind:"audioinput",label:"Remote Microphone"}),U()(o).call(o,(function(e,n,r){var o;U()(o=e.mediaDeviceInfos).call(o,(function(e){t.push(e)}))})),e(t)}catch(t){n(t)}}},{key:"injectOffloadAPI",value:function(){var t,e,n,r,o=this;K.debug("[gum]","inject getUserMedia API"),this._nativeGetUserMedia=H()(t=navigator.mediaDevices.getUserMedia).call(t,navigator.mediaDevices),navigator.getUserMedia=H()(e=this.getUserMediaDeprecated).call(e,this),navigator.mediaDevices.getUserMedia=H()(n=this.getUserMedia).call(n,this),this._nativeEnumerateDevices=H()(r=navigator.mediaDevices.enumerateDevices).call(r,navigator.mediaDevices),navigator.mediaDevices.enumerateDevices=function(){return new M.a((function(t,e){o._nativeEnumerateDevices().then((function(n){o.checkAndAddRemoteMediaDeviceInfos(n,t,e)})).catch((function(t){e(t)}))}))}}},{key:"startJob",value:function(t){var e=t.arguments[0];if(Object.hasOwnProperty.call(e,"video")&&null!==e.video.deviceId){var r=e.video.deviceId;"object"===d()(e.video.deviceId)&&Object.hasOwnProperty.call(e,"exact")&&(r=e.video.deviceId.exact);var o,i=this.workerManager.getWorkerInfos(),s=Z(Y()(i).call(i));try{for(s.s();!(o=s.n()).done;){var a,c=o.value,u=Z(i.get(c).mediaDeviceInfos);try{for(u.s();!(a=u.n()).done;){if(a.value.deviceId===r)return void x()(I()(n.prototype),"startJobImpl",this).call(this,c,t)}}catch(t){u.e(t)}finally{u.f()}}}catch(t){s.e(t)}finally{s.f()}}x()(I()(n.prototype),"startJob",this).call(this,t)}}]),n}(V.a);function it(t){var e=function(){if("undefined"==typeof Reflect||!o.a)return!1;if(o.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(o()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=I()(t);if(e){var i=I()(this).constructor;n=o()(r,arguments,i)}else n=r.apply(this,arguments);return S()(this,n)}}function st(t,e,n){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,n)}var at=new X.a,ct=function(t){C()(n,t);var e=it(n);function n(){var t,r;g()(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=e.call.apply(e,D()(t=[this]).call(t,i)),st(w()(r),at,{writable:!0,value:0}),r}return m()(n,[{key:"start",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=z()([]).call(e);this.startJob({feature:r[0],successCallback:r[1]})}},{key:"stop",value:function(t){this.stopJob(t)}},{key:"addGestureRecognitionListener",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=z()([]).call(e);return this.startJob({feature:"GESTURE",successCallback:r[1],errorCallback:r[2]}),R()(this,at,+P()(this,at)+1)}},{key:"injectOffloadAPI",value:function(){var t,e,n;("undefined"==typeof tizen&&(window.tizen={}),void 0===tizen.ppm&&(tizen.ppm={},tizen.ppm.requestPermission=function(){var t=arguments.length<=0?void 0:arguments[0],e=arguments.length<=1?void 0:arguments[1];e("PPM_ALLOW_FOREVER",t)},tizen.ppm.requestPermissions=function(){var t=arguments.length<=0?void 0:arguments[0],e=[];U()(t).call(t,(function(t){var n={};n.privilege=t,n.result="PPM_ALLOW_FOREVER",e.push(n)}));var n=arguments.length<=1?void 0:arguments[1];return n(e),e},tizen.ppm.checkPermission=function(){return"PPM_ALLOW"},tizen.ppm.checkPermissions=function(){var t=arguments.length<=0?void 0:arguments[0],e=[];return U()(t).call(t,(function(t){var n={};n.privilege=t,n.type="PPM_ALLOW",e.push(n)})),e}),tizen.humanactivitymonitor)||(K.debug("[ham]","inject tizen.humanactivitymonitor API"),tizen.humanactivitymonitor={},tizen.humanactivitymonitor.start=H()(t=this.start).call(t,this),tizen.humanactivitymonitor.stop=H()(e=this.stop).call(e,this),tizen.humanactivitymonitor.addGestureRecognitionListener=H()(n=this.addGestureRecognitionListener).call(n,this))}}]),n}(V.a),ut=(n(363),n(367),n(18)),ft=n.n(ut),lt=n(339),ht=n.n(lt),pt=n(139),dt=n.n(pt);function vt(t){var e=function(){if("undefined"==typeof Reflect||!o.a)return!1;if(o.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(o()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=I()(t);if(e){var i=I()(this).constructor;n=o()(r,arguments,i)}else n=r.apply(this,arguments);return S()(this,n)}}function gt(t,e){mt(t,e),e.add(t)}function yt(t,e,n){mt(t,e),e.set(t,n)}function mt(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function bt(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}var wt=new X.a,At=new X.a,xt=new X.a,kt=new ft.a,Ct=new ft.a,Et=new ft.a,St=new ft.a,Bt=new ft.a,It=new ft.a,Ot=function(t){C()(n,t);var e=vt(n);function n(){var t,r;g()(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=e.call.apply(e,D()(t=[this]).call(t,i)),gt(w()(r),It),gt(w()(r),Bt),gt(w()(r),St),gt(w()(r),Et),gt(w()(r),Ct),gt(w()(r),kt),yt(w()(r),wt,{writable:!0,value:null}),yt(w()(r),At,{writable:!0,value:null}),yt(w()(r),xt,{writable:!0,value:!1}),r}return m()(n,[{key:"injectOffloadAPI",value:function(){var t=this;"undefined"==typeof tizen&&(K.debug("[sensor]","tizen is undefined"),window.tizen={}),void 0===tizen.sensorservice&&(K.debug("[sensor]","inject tizen.sensorservice API"),tizen.sensorservice={},tizen.sensorservice.getDefaultSensor=function(){var e,n,r,o,i,s={};return s.sensorType=R()(t,wt,arguments.length<=0?void 0:arguments[0]),s.start=H()(e=bt(t,Ct,Tt)).call(e,t),s.stop=H()(n=bt(t,Et,Rt)).call(n,t),s["get".concat(bt(t,kt,Pt).call(t,P()(t,wt)),"SensorData")]=H()(r=bt(t,St,jt)).call(r,t),s.setChangeListener=H()(o=bt(t,Bt,Dt)).call(o,t),s.unsetChangeListener=H()(i=bt(t,It,Ft)).call(i,t),s})}}]),n}(V.a);function Pt(t){var e=t.split("_");return ht()(e).call(e,(function(t){return"HRM"===t?t:(t=t.toLowerCase()).charAt(0).toUpperCase()+z()(t).call(t,1)})).join("")}function Tt(){var t=this;if(K.debug("[sensor]","start"),P()(this,xt))K.debug("[sensor]","sensor is already started");else{for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=z()([]).call(n);this.startJob({feature:"SENSOR",arguments:["start",P()(this,wt)],successCallback:o[0],errorCallback:o[1],resolver:function(){R()(t,xt,!0)}})}}function Rt(){K.debug("[sensor]","stop"),P()(this,xt)&&(this.stopJob("SENSOR"),R()(this,xt,!1),null!==P()(this,At)&&clearInterval(P()(this,At)))}function jt(t,e){K.debug("[sensor]","getSensorData"),this.startJob({feature:"SENSOR",arguments:["getSensorData",bt(this,kt,Pt).call(this,P()(this,wt))],successCallback:t,errorCallback:e})}function Dt(t,e,n){var r=this;K.debug("[sensor]","setChangeListener interval:".concat(e));var o=e||100;o<10?o=10:e>1e3&&(o=1e3),R()(this,At,dt()((function(){P()(r,xt)&&r.startJob({feature:"SENSOR",arguments:["getSensorData",bt(r,kt,Pt).call(r,P()(r,wt))],successCallback:t})}),o))}function Ft(){K.debug("[sensor]","unsetChangeListener"),null!==P()(this,At)&&clearInterval(P()(this,At))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){t.exports=n(816)},function(t,e,n){"use strict";n.r(e);var r=n(8),o=n(718);r.setLevel("info");var i=new o.a;e.default=i},function(t,e,n){var r=n(818);t.exports=r},function(t,e,n){n(819);var r=n(21);t.exports=r.Object.assign},function(t,e,n){var r=n(15),o=n(630);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(t,e,n){n(66);var r=n(92),o=n(33),i=n(34),s=n(821),a=Array.prototype,c={DOMTokenList:!0,NodeList:!0};t.exports=function(t){var e=t.values;return t===a||i(a,t)&&e===a.values||o(c,r(t))?s:e}},function(t,e,n){var r=n(822);t.exports=r},function(t,e,n){n(71),n(82);var r=n(51);t.exports=r("Array").values},function(t,e,n){n(66);var r=n(92),o=n(33),i=n(34),s=n(824),a=Array.prototype,c={DOMTokenList:!0,NodeList:!0};t.exports=function(t){var e=t.keys;return t===a||i(a,t)&&e===a.keys||o(c,r(t))?s:e}},function(t,e,n){var r=n(825);t.exports=r},function(t,e,n){n(71),n(82);var r=n(51);t.exports=r("Array").keys},function(t,e,n){var r=n(827);t.exports=r},function(t,e,n){n(828),n(831),n(633);var r=n(21);t.exports=r.URL},function(t,e,n){"use strict";n(109);var r,o=n(15),i=n(39),s=n(632),a=n(14),c=n(81),u=n(17),f=n(243).f,l=n(101),h=n(137),p=n(33),d=n(630),v=n(362),g=n(288),y=n(347).codeAt,m=n(829),b=n(93),w=n(102),A=n(211),x=n(633),k=n(74),C=k.set,E=k.getterFor("URL"),S=x.URLSearchParams,B=x.getState,I=a.URL,O=a.TypeError,P=a.parseInt,T=Math.floor,R=Math.pow,j=u("".charAt),D=u(/./.exec),F=u([].join),M=u(1..toString),L=u([].pop),U=u([].push),N=u("".replace),z=u([].shift),Q=u("".split),G=u("".slice),q=u("".toLowerCase),H=u([].unshift),W=/[a-z]/i,Y=/[\d+-.a-z]/i,J=/\d/,X=/^0x/i,K=/^[0-7]+$/,V=/^\d+$/,Z=/^[\da-f]+$/i,_=/[\0\t\n\r #%/:<>?@[\\\]^|]/,$=/[\0\t\n\r #/:<>?@[\\\]^|]/,tt=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,et=/[\t\n\r]/g,nt=function(t){var e,n,r,o;if("number"==typeof t){for(e=[],n=0;n<4;n++)H(e,t%256),t=T(t/256);return F(e,".")}if("object"==typeof t){for(e="",r=function(t){for(var e=null,n=1,r=null,o=0,i=0;i<8;i++)0!==t[i]?(o>n&&(e=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(e=r,n=o),e}(t),n=0;n<8;n++)o&&0===t[n]||(o&&(o=!1),r===n?(e+=n?":":"::",o=!0):(e+=M(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},rt={},ot=d({},rt,{" ":1,'"':1,"<":1,">":1,"`":1}),it=d({},ot,{"#":1,"?":1,"{":1,"}":1}),st=d({},it,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),at=function(t,e){var n=y(t,0);return n>32&&n<127&&!p(e,t)?t:encodeURIComponent(t)},ct={ftp:21,file:null,http:80,https:443,ws:80,wss:443},ut=function(t,e){var n;return 2==t.length&&D(W,j(t,0))&&(":"==(n=j(t,1))||!e&&"|"==n)},ft=function(t){var e;return t.length>1&&ut(G(t,0,2))&&(2==t.length||"/"===(e=j(t,2))||"\\"===e||"?"===e||"#"===e)},lt=function(t){return"."===t||"%2e"===q(t)},ht={},pt={},dt={},vt={},gt={},yt={},mt={},bt={},wt={},At={},xt={},kt={},Ct={},Et={},St={},Bt={},It={},Ot={},Pt={},Tt={},Rt={},jt=function(t,e,n){var r,o,i,s=b(t);if(e){if(o=this.parse(s))throw O(o);this.searchParams=null}else{if(void 0!==n&&(r=new jt(n,!0)),o=this.parse(s,null,r))throw O(o);(i=B(new S)).bindURL(this),this.searchParams=i}};jt.prototype={type:"URL",parse:function(t,e,n){var o,i,s,a,c,u=this,f=e||ht,l=0,h="",d=!1,y=!1,m=!1;for(t=b(t),e||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,t=N(t,tt,"")),t=N(t,et,""),o=v(t);l<=o.length;){switch(i=o[l],f){case ht:if(!i||!D(W,i)){if(e)return"Invalid scheme";f=dt;continue}h+=q(i),f=pt;break;case pt:if(i&&(D(Y,i)||"+"==i||"-"==i||"."==i))h+=q(i);else{if(":"!=i){if(e)return"Invalid scheme";h="",f=dt,l=0;continue}if(e&&(u.isSpecial()!=p(ct,h)||"file"==h&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=h,e)return void(u.isSpecial()&&ct[u.scheme]==u.port&&(u.port=null));h="","file"==u.scheme?f=Et:u.isSpecial()&&n&&n.scheme==u.scheme?f=vt:u.isSpecial()?f=bt:"/"==o[l+1]?(f=gt,l++):(u.cannotBeABaseURL=!0,U(u.path,""),f=Pt)}break;case dt:if(!n||n.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(n.cannotBeABaseURL&&"#"==i){u.scheme=n.scheme,u.path=g(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,f=Rt;break}f="file"==n.scheme?Et:yt;continue;case vt:if("/"!=i||"/"!=o[l+1]){f=yt;continue}f=wt,l++;break;case gt:if("/"==i){f=At;break}f=Ot;continue;case yt:if(u.scheme=n.scheme,i==r)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=g(n.path),u.query=n.query;else if("/"==i||"\\"==i&&u.isSpecial())f=mt;else if("?"==i)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=g(n.path),u.query="",f=Tt;else{if("#"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=g(n.path),u.path.length--,f=Ot;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=g(n.path),u.query=n.query,u.fragment="",f=Rt}break;case mt:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,f=Ot;continue}f=At}else f=wt;break;case bt:if(f=wt,"/"!=i||"/"!=j(h,l+1))continue;l++;break;case wt:if("/"!=i&&"\\"!=i){f=At;continue}break;case At:if("@"==i){d&&(h="%40"+h),d=!0,s=v(h);for(var w=0;w<s.length;w++){var A=s[w];if(":"!=A||m){var x=at(A,st);m?u.password+=x:u.username+=x}else m=!0}h=""}else if(i==r||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(d&&""==h)return"Invalid authority";l-=v(h).length+1,h="",f=xt}else h+=i;break;case xt:case kt:if(e&&"file"==u.scheme){f=Bt;continue}if(":"!=i||y){if(i==r||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==h)return"Invalid host";if(e&&""==h&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(h))return a;if(h="",f=It,e)return;continue}"["==i?y=!0:"]"==i&&(y=!1),h+=i}else{if(""==h)return"Invalid host";if(a=u.parseHost(h))return a;if(h="",f=Ct,e==kt)return}break;case Ct:if(!D(J,i)){if(i==r||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||e){if(""!=h){var k=P(h,10);if(k>65535)return"Invalid port";u.port=u.isSpecial()&&k===ct[u.scheme]?null:k,h=""}if(e)return;f=It;continue}return"Invalid port"}h+=i;break;case Et:if(u.scheme="file","/"==i||"\\"==i)f=St;else{if(!n||"file"!=n.scheme){f=Ot;continue}if(i==r)u.host=n.host,u.path=g(n.path),u.query=n.query;else if("?"==i)u.host=n.host,u.path=g(n.path),u.query="",f=Tt;else{if("#"!=i){ft(F(g(o,l),""))||(u.host=n.host,u.path=g(n.path),u.shortenPath()),f=Ot;continue}u.host=n.host,u.path=g(n.path),u.query=n.query,u.fragment="",f=Rt}}break;case St:if("/"==i||"\\"==i){f=Bt;break}n&&"file"==n.scheme&&!ft(F(g(o,l),""))&&(ut(n.path[0],!0)?U(u.path,n.path[0]):u.host=n.host),f=Ot;continue;case Bt:if(i==r||"/"==i||"\\"==i||"?"==i||"#"==i){if(!e&&ut(h))f=Ot;else if(""==h){if(u.host="",e)return;f=It}else{if(a=u.parseHost(h))return a;if("localhost"==u.host&&(u.host=""),e)return;h="",f=It}continue}h+=i;break;case It:if(u.isSpecial()){if(f=Ot,"/"!=i&&"\\"!=i)continue}else if(e||"?"!=i)if(e||"#"!=i){if(i!=r&&(f=Ot,"/"!=i))continue}else u.fragment="",f=Rt;else u.query="",f=Tt;break;case Ot:if(i==r||"/"==i||"\\"==i&&u.isSpecial()||!e&&("?"==i||"#"==i)){if(".."===(c=q(c=h))||"%2e."===c||".%2e"===c||"%2e%2e"===c?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||U(u.path,"")):lt(h)?"/"==i||"\\"==i&&u.isSpecial()||U(u.path,""):("file"==u.scheme&&!u.path.length&&ut(h)&&(u.host&&(u.host=""),h=j(h,0)+":"),U(u.path,h)),h="","file"==u.scheme&&(i==r||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)z(u.path);"?"==i?(u.query="",f=Tt):"#"==i&&(u.fragment="",f=Rt)}else h+=at(i,it);break;case Pt:"?"==i?(u.query="",f=Tt):"#"==i?(u.fragment="",f=Rt):i!=r&&(u.path[0]+=at(i,rt));break;case Tt:e||"#"!=i?i!=r&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":at(i,rt)):(u.fragment="",f=Rt);break;case Rt:i!=r&&(u.fragment+=at(i,ot))}l++}},parseHost:function(t){var e,n,r;if("["==j(t,0)){if("]"!=j(t,t.length-1))return"Invalid host";if(!(e=function(t){var e,n,r,o,i,s,a,c=[0,0,0,0,0,0,0,0],u=0,f=null,l=0,h=function(){return j(t,l)};if(":"==h()){if(":"!=j(t,1))return;l+=2,f=++u}for(;h();){if(8==u)return;if(":"!=h()){for(e=n=0;n<4&&D(Z,h());)e=16*e+P(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,u>6)return;for(r=0;h();){if(o=null,r>0){if(!("."==h()&&r<4))return;l++}if(!D(J,h()))return;for(;D(J,h());){if(i=P(h(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;l++}c[u]=256*c[u]+o,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;c[u++]=e}else{if(null!==f)return;l++,f=++u}}if(null!==f)for(s=u-f,u=7;0!=u&&s>0;)a=c[u],c[u--]=c[f+s-1],c[f+--s]=a;else if(8!=u)return;return c}(G(t,1,-1))))return"Invalid host";this.host=e}else if(this.isSpecial()){if(t=m(t),D(_,t))return"Invalid host";if(null===(e=function(t){var e,n,r,o,i,s,a,c=Q(t,".");if(c.length&&""==c[c.length-1]&&c.length--,(e=c.length)>4)return t;for(n=[],r=0;r<e;r++){if(""==(o=c[r]))return t;if(i=10,o.length>1&&"0"==j(o,0)&&(i=D(X,o)?16:8,o=G(o,8==i?1:2)),""===o)s=0;else{if(!D(10==i?V:8==i?K:Z,o))return t;s=P(o,i)}U(n,s)}for(r=0;r<e;r++)if(s=n[r],r==e-1){if(s>=R(256,5-e))return null}else if(s>255)return null;for(a=L(n),r=0;r<n.length;r++)a+=n[r]*R(256,3-r);return a}(t)))return"Invalid host";this.host=e}else{if(D($,t))return"Invalid host";for(e="",n=v(t),r=0;r<n.length;r++)e+=at(n[r],rt);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return p(ct,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"==this.scheme&&1==e&&ut(t[0],!0)||t.length--},serialize:function(){var t=this,e=t.scheme,n=t.username,r=t.password,o=t.host,i=t.port,s=t.path,a=t.query,c=t.fragment,u=e+":";return null!==o?(u+="//",t.includesCredentials()&&(u+=n+(r?":"+r:"")+"@"),u+=nt(o),null!==i&&(u+=":"+i)):"file"==e&&(u+="//"),u+=t.cannotBeABaseURL?s[0]:s.length?"/"+F(s,"/"):"",null!==a&&(u+="?"+a),null!==c&&(u+="#"+c),u},setHref:function(t){var e=this.parse(t);if(e)throw O(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"==t)try{return new Dt(t.path[0]).origin}catch(t){return"null"}return"file"!=t&&this.isSpecial()?t+"://"+nt(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(b(t)+":",ht)},getUsername:function(){return this.username},setUsername:function(t){var e=v(b(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<e.length;n++)this.username+=at(e[n],st)}},getPassword:function(){return this.password},setPassword:function(t){var e=v(b(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<e.length;n++)this.password+=at(e[n],st)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?nt(t):nt(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,xt)},getHostname:function(){var t=this.host;return null===t?"":nt(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,kt)},getPort:function(){var t=this.port;return null===t?"":b(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""==(t=b(t))?this.port=null:this.parse(t,Ct))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+F(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,It))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){""==(t=b(t))?this.query=null:("?"==j(t,0)&&(t=G(t,1)),this.query="",this.parse(t,Tt)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){""!=(t=b(t))?("#"==j(t,0)&&(t=G(t,1)),this.fragment="",this.parse(t,Rt)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Dt=function(t){var e=h(this,Ft),n=A(arguments.length,1)>1?arguments[1]:void 0,r=C(e,new jt(t,!1,n));i||(e.href=r.serialize(),e.origin=r.getOrigin(),e.protocol=r.getProtocol(),e.username=r.getUsername(),e.password=r.getPassword(),e.host=r.getHost(),e.hostname=r.getHostname(),e.port=r.getPort(),e.pathname=r.getPathname(),e.search=r.getSearch(),e.searchParams=r.getSearchParams(),e.hash=r.getHash())},Ft=Dt.prototype,Mt=function(t,e){return{get:function(){return E(this)[t]()},set:e&&function(t){return E(this)[e](t)},configurable:!0,enumerable:!0}};if(i&&f(Ft,{href:Mt("serialize","setHref"),origin:Mt("getOrigin"),protocol:Mt("getProtocol","setProtocol"),username:Mt("getUsername","setUsername"),password:Mt("getPassword","setPassword"),host:Mt("getHost","setHost"),hostname:Mt("getHostname","setHostname"),port:Mt("getPort","setPort"),pathname:Mt("getPathname","setPathname"),search:Mt("getSearch","setSearch"),searchParams:Mt("getSearchParams"),hash:Mt("getHash","setHash")}),l(Ft,"toJSON",(function(){return E(this).serialize()}),{enumerable:!0}),l(Ft,"toString",(function(){return E(this).serialize()}),{enumerable:!0}),I){var Lt=I.createObjectURL,Ut=I.revokeObjectURL;Lt&&l(Dt,"createObjectURL",c(Lt,I)),Ut&&l(Dt,"revokeObjectURL",c(Ut,I))}w(Dt,"URL"),o({global:!0,forced:!s,sham:!i},{URL:Dt})},function(t,e,n){"use strict";var r=n(14),o=n(17),i=/[^\0-\u007E]/,s=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",c=r.RangeError,u=o(s.exec),f=Math.floor,l=String.fromCharCode,h=o("".charCodeAt),p=o([].join),d=o([].push),v=o("".replace),g=o("".split),y=o("".toLowerCase),m=function(t){return t+22+75*(t<26)},b=function(t,e,n){var r=0;for(t=n?f(t/700):t>>1,t+=f(t/e);t>455;)t=f(t/35),r+=36;return f(r+36*t/(t+38))},w=function(t){var e,n,r=[],o=(t=function(t){for(var e=[],n=0,r=t.length;n<r;){var o=h(t,n++);if(o>=55296&&o<=56319&&n<r){var i=h(t,n++);56320==(64512&i)?d(e,((1023&o)<<10)+(1023&i)+65536):(d(e,o),n--)}else d(e,o)}return e}(t)).length,i=128,s=0,u=72;for(e=0;e<t.length;e++)(n=t[e])<128&&d(r,l(n));var v=r.length,g=v;for(v&&d(r,"-");g<o;){var y=2147483647;for(e=0;e<t.length;e++)(n=t[e])>=i&&n<y&&(y=n);var w=g+1;if(y-i>f((2147483647-s)/w))throw c(a);for(s+=(y-i)*w,i=y,e=0;e<t.length;e++){if((n=t[e])<i&&++s>2147483647)throw c(a);if(n==i){for(var A=s,x=36;;){var k=x<=u?1:x>=u+26?26:x-u;if(A<k)break;var C=A-k,E=36-k;d(r,l(m(k+C%E))),A=f(C/E),x+=36}d(r,l(m(A))),u=b(s,w,g==v),s=0,g++}}s++,i++}return p(r,"")};t.exports=function(t){var e,n,r=[],o=g(v(y(t),s,"."),".");for(e=0;e<o.length;e++)n=o[e],d(r,u(i,n)?"xn--"+w(n):n);return p(r,".")}},function(t,e,n){var r=n(288),o=Math.floor,i=function(t,e){var n=t.length,c=o(n/2);return n<8?s(t,e):a(t,i(r(t,0,c),e),i(r(t,c),e),e)},s=function(t,e){for(var n,r,o=t.length,i=1;i<o;){for(r=i,n=t[i];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==i++&&(t[r]=n)}return t},a=function(t,e,n,r){for(var o=e.length,i=n.length,s=0,a=0;s<o||a<i;)t[s+a]=s<o&&a<i?r(e[s],n[a])<=0?e[s++]:n[a++]:s<o?e[s++]:n[a++];return t};t.exports=i},function(t,e){},function(t,e,n){var r=n(833);t.exports=r},function(t,e,n){n(834);var r=n(21);t.exports=r.Object.keys},function(t,e,n){var r=n(15),o=n(80),i=n(161);r({target:"Object",stat:!0,forced:n(20)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},function(t,e,n){var r=n(836);t.exports=r},function(t,e,n){var r=n(34),o=n(837),i=Array.prototype;t.exports=function(t){var e=t.findIndex;return t===i||r(i,t)&&e===i.findIndex?o:e}},function(t,e,n){n(838);var r=n(51);t.exports=r("Array").findIndex},function(t,e,n){"use strict";var r=n(15),o=n(83).findIndex,i=n(246),s=!0;"findIndex"in[]&&Array(1).findIndex((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("findIndex")},function(t,e,n){!function(t){var e=/\S/,n=/\"/g,r=/\n/g,o=/\r/g,i=/\\/g,s=/\u2028/,a=/\u2029/;function c(t){"}"===t.n.substr(t.n.length-1)&&(t.n=t.n.substring(0,t.n.length-1))}function u(t){return t.trim?t.trim():t.replace(/^\s*|\s*$/g,"")}function f(t,e,n){if(e.charAt(n)!=t.charAt(0))return!1;for(var r=1,o=t.length;r<o;r++)if(e.charAt(n+r)!=t.charAt(r))return!1;return!0}t.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},t.scan=function(n,r){var o=n.length,i=0,s=null,a=null,l="",h=[],p=!1,d=0,v=0,g="{{",y="}}";function m(){l.length>0&&(h.push({tag:"_t",text:new String(l)}),l="")}function b(n,r){if(m(),n&&function(){for(var n=!0,r=v;r<h.length;r++)if(!(n=t.tags[h[r].tag]<t.tags._v||"_t"==h[r].tag&&null===h[r].text.match(e)))return!1;return n}())for(var o,i=v;i<h.length;i++)h[i].text&&((o=h[i+1])&&">"==o.tag&&(o.indent=h[i].text.toString()),h.splice(i,1));else r||h.push({tag:"\n"});p=!1,v=h.length}function w(t,e){var n="="+y,r=t.indexOf(n,e),o=u(t.substring(t.indexOf("=",e)+1,r)).split(" ");return g=o[0],y=o[o.length-1],r+n.length-1}for(r&&(r=r.split(" "),g=r[0],y=r[1]),d=0;d<o;d++)0==i?f(g,n,d)?(--d,m(),i=1):"\n"==n.charAt(d)?b(p):l+=n.charAt(d):1==i?(d+=g.length-1,"="==(s=(a=t.tags[n.charAt(d+1)])?n.charAt(d+1):"_v")?(d=w(n,d),i=0):(a&&d++,i=2),p=d):f(y,n,d)?(h.push({tag:s,n:u(l),otag:g,ctag:y,i:"/"==s?p-g.length:d+y.length}),l="",d+=y.length-1,i=0,"{"==s&&("}}"==y?d++:c(h[h.length-1]))):l+=n.charAt(d);return b(p,!0),h};var l={_t:!0,"\n":!0,$:!0,"/":!0};function h(t,e){for(var n=0,r=e.length;n<r;n++)if(e[n].o==t.n)return t.tag="#",!0}function p(t,e,n){for(var r=0,o=n.length;r<o;r++)if(n[r].c==t&&n[r].o==e)return!0}function d(t){var e=[];for(var n in t.partials)e.push('"'+g(n)+'":{name:"'+g(t.partials[n].name)+'", '+d(t.partials[n])+"}");return"partials: {"+e.join(",")+"}, subs: "+function(t){var e=[];for(var n in t)e.push('"'+g(n)+'": function(c,p,t,i) {'+t[n]+"}");return"{ "+e.join(",")+" }"}(t.subs)}t.stringify=function(e,n,r){return"{code: function (c,p,i) { "+t.wrapMain(e.code)+" },"+d(e)+"}"};var v=0;function g(t){return t.replace(i,"\\\\").replace(n,'\\"').replace(r,"\\n").replace(o,"\\r").replace(s,"\\u2028").replace(a,"\\u2029")}function y(t){return~t.indexOf(".")?"d":"f"}function m(t,e){var n="<"+(e.prefix||"")+t.n+v++;return e.partials[n]={name:t.n,partials:{}},e.code+='t.b(t.rp("'+g(n)+'",c,p,"'+(t.indent||"")+'"));',n}function b(t,e){e.code+="t.b(t.t(t."+y(t.n)+'("'+g(t.n)+'",c,p,0)));'}function w(t){return"t.b("+t+");"}t.generate=function(e,n,r){v=0;var o={code:"",subs:{},partials:{}};return t.walk(e,o),r.asString?this.stringify(o,n,r):this.makeTemplate(o,n,r)},t.wrapMain=function(t){return'var t=this;t.b(i=i||"");'+t+"return t.fl();"},t.template=t.Template,t.makeTemplate=function(t,e,n){var r=this.makePartials(t);return r.code=new Function("c","p","i",this.wrapMain(t.code)),new this.template(r,e,this,n)},t.makePartials=function(t){var e,n={subs:{},partials:t.partials,name:t.name};for(e in n.partials)n.partials[e]=this.makePartials(n.partials[e]);for(e in t.subs)n.subs[e]=new Function("c","p","t","i",t.subs[e]);return n},t.codegen={"#":function(e,n){n.code+="if(t.s(t."+y(e.n)+'("'+g(e.n)+'",c,p,1),c,p,0,'+e.i+","+e.end+',"'+e.otag+" "+e.ctag+'")){t.rs(c,p,function(c,p,t){',t.walk(e.nodes,n),n.code+="});c.pop();}"},"^":function(e,n){n.code+="if(!t.s(t."+y(e.n)+'("'+g(e.n)+'",c,p,1),c,p,1,0,0,"")){',t.walk(e.nodes,n),n.code+="};"},">":m,"<":function(e,n){var r={partials:{},code:"",subs:{},inPartial:!0};t.walk(e.nodes,r);var o=n.partials[m(e,n)];o.subs=r.subs,o.partials=r.partials},$:function(e,n){var r={subs:{},code:"",partials:n.partials,prefix:e.n};t.walk(e.nodes,r),n.subs[e.n]=r.code,n.inPartial||(n.code+='t.sub("'+g(e.n)+'",c,p,i);')},"\n":function(t,e){e.code+=w('"\\n"'+(t.last?"":" + i"))},_v:function(t,e){e.code+="t.b(t.v(t."+y(t.n)+'("'+g(t.n)+'",c,p,0)));'},_t:function(t,e){e.code+=w('"'+g(t.text)+'"')},"{":b,"&":b},t.walk=function(e,n){for(var r,o=0,i=e.length;o<i;o++)(r=t.codegen[e[o].tag])&&r(e[o],n);return n},t.parse=function(e,n,r){return function e(n,r,o,i){var s,a=[],c=null,u=null;for(s=o[o.length-1];n.length>0;){if(u=n.shift(),s&&"<"==s.tag&&!(u.tag in l))throw new Error("Illegal content in < super tag.");if(t.tags[u.tag]<=t.tags.$||h(u,i))o.push(u),u.nodes=e(n,u.tag,o,i);else{if("/"==u.tag){if(0===o.length)throw new Error("Closing tag without opener: /"+u.n);if(c=o.pop(),u.n!=c.n&&!p(u.n,c.n,i))throw new Error("Nesting error: "+c.n+" vs. "+u.n);return c.end=u.i,a}"\n"==u.tag&&(u.last=0==n.length||"\n"==n[0].tag)}a.push(u)}if(o.length>0)throw new Error("missing closing tag: "+o.pop().n);return a}(e,0,[],(r=r||{}).sectionTags||[])},t.cache={},t.cacheKey=function(t,e){return[t,!!e.asString,!!e.disableLambda,e.delimiters,!!e.modelGet].join("||")},t.compile=function(e,n){n=n||{};var r=t.cacheKey(e,n),o=this.cache[r];if(o){var i=o.partials;for(var s in i)delete i[s].instance;return o}return o=this.generate(this.parse(this.scan(e,n.delimiters),e,n),e,n),this.cache[r]=o}}(e)},function(t,e,n){!function(t){function e(t,e,n){var r;return e&&"object"==typeof e&&(void 0!==e[t]?r=e[t]:n&&e.get&&"function"==typeof e.get&&(r=e.get(t))),r}t.Template=function(t,e,n,r){t=t||{},this.r=t.code||this.r,this.c=n,this.options=r||{},this.text=e||"",this.partials=t.partials||{},this.subs=t.subs||{},this.buf=""},t.Template.prototype={r:function(t,e,n){return""},v:function(t){return t=c(t),a.test(t)?t.replace(n,"&amp;").replace(r,"&lt;").replace(o,"&gt;").replace(i,"&#39;").replace(s,"&quot;"):t},t:c,render:function(t,e,n){return this.ri([t],e||{},n)},ri:function(t,e,n){return this.r(t,e,n)},ep:function(t,e){var n=this.partials[t],r=e[n.name];if(n.instance&&n.base==r)return n.instance;if("string"==typeof r){if(!this.c)throw new Error("No compiler available.");r=this.c.compile(r,this.options)}if(!r)return null;if(this.partials[t].base=r,n.subs){for(key in e.stackText||(e.stackText={}),n.subs)e.stackText[key]||(e.stackText[key]=void 0!==this.activeSub&&e.stackText[this.activeSub]?e.stackText[this.activeSub]:this.text);r=function(t,e,n,r,o,i){function s(){}function a(){}var c;s.prototype=t,a.prototype=t.subs;var u=new s;for(c in u.subs=new a,u.subsText={},u.buf="",r=r||{},u.stackSubs=r,u.subsText=i,e)r[c]||(r[c]=e[c]);for(c in r)u.subs[c]=r[c];for(c in o=o||{},u.stackPartials=o,n)o[c]||(o[c]=n[c]);for(c in o)u.partials[c]=o[c];return u}(r,n.subs,n.partials,this.stackSubs,this.stackPartials,e.stackText)}return this.partials[t].instance=r,r},rp:function(t,e,n,r){var o=this.ep(t,n);return o?o.ri(e,n,r):""},rs:function(t,e,n){var r=t[t.length-1];if(u(r))for(var o=0;o<r.length;o++)t.push(r[o]),n(t,e,this),t.pop();else n(t,e,this)},s:function(t,e,n,r,o,i,s){var a;return(!u(t)||0!==t.length)&&("function"==typeof t&&(t=this.ms(t,e,n,r,o,i,s)),a=!!t,!r&&a&&e&&e.push("object"==typeof t?t:e[e.length-1]),a)},d:function(t,n,r,o){var i,s=t.split("."),a=this.f(s[0],n,r,o),c=this.options.modelGet,f=null;if("."===t&&u(n[n.length-2]))a=n[n.length-1];else for(var l=1;l<s.length;l++)void 0!==(i=e(s[l],a,c))?(f=a,a=i):a="";return!(o&&!a)&&(o||"function"!=typeof a||(n.push(f),a=this.mv(a,n,r),n.pop()),a)},f:function(t,n,r,o){for(var i=!1,s=!1,a=this.options.modelGet,c=n.length-1;c>=0;c--)if(void 0!==(i=e(t,n[c],a))){s=!0;break}return s?(o||"function"!=typeof i||(i=this.mv(i,n,r)),i):!o&&""},ls:function(t,e,n,r,o){var i=this.options.delimiters;return this.options.delimiters=o,this.b(this.ct(c(t.call(e,r)),e,n)),this.options.delimiters=i,!1},ct:function(t,e,n){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(t,this.options).render(e,n)},b:function(t){this.buf+=t},fl:function(){var t=this.buf;return this.buf="",t},ms:function(t,e,n,r,o,i,s){var a,c=e[e.length-1],u=t.call(c);return"function"==typeof u?!!r||(a=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(u,c,n,a.substring(o,i),s)):u},mv:function(t,e,n){var r=e[e.length-1],o=t.call(r);return"function"==typeof o?this.ct(c(o.call(r)),r,n):o},sub:function(t,e,n,r){var o=this.subs[t];o&&(this.activeSub=t,o(e,n,this,r),this.activeSub=!1)}};var n=/&/g,r=/</g,o=/>/g,i=/\'/g,s=/\"/g,a=/[&<>\"\']/;function c(t){return String(null==t?"":t)}var u=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}}(e)},function(t,e,n){(e=n(842)(!1)).push([t.i,":host {\n  all: initial;\n}\n\n.modal {\n  position: fixed;\n  top: 0;\n  left: 0;\n  z-index: 1000;\n  width: 100%;\n  height: 100%;\n  outline: 0;\n  display: none;\n}\n\n.overlay {\n  position: fixed;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  background: rgba(0, 0, 0, 0.7);\n  visibility: visible;\n  opacity: 1;\n}\n\n.modal.show {\n  background: rgba(0, 0, 0, 0.7);\n  opacity: 1;\n  display: block;\n}\n\n.modal-open {\n  overflow: hidden;\n}\n\n.modal-open .modal {\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n\n.modal-dialog {\n  position: relative;\n  width: auto;\n}\n\n@media (min-width: 576px) {\n  .modal-dialog {\n    max-width: 500px;\n    margin: 10px auto;\n  }\n}\n\n.modal-content {\n  position: relative;\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  pointer-events: auto;\n  background-color: #fff;\n  background-clip: padding-box;\n  border: 1px solid rgba(0, 0, 0, 0.2);\n  border-radius: 10px;\n  color: #000;\n  outline: 0;\n}\n\n.modal-header {\n  display: flex;\n  align-items: flex-start;\n  justify-content: space-between;\n  padding: 10px;\n  border-bottom: 1px solid #dee2e6;\n  border-top-left-radius: 10px;\n  border-top-right-radius: 10px;\n}\n\n.modal-header img {\n  margin-left: 5px;\n}\n\n.modal-title {\n  color: #007bff;\n  font-weight: 900;\n}\n\n.modal-body {\n  position: relative;\n  flex: 1 1 auto;\n  padding: 10px;\n  border-radius: 10px;\n}\n\n.form-check-input:focus,\n.form-device-input:focus {\n  box-shadow: 0 0 0 5px black;\n}\n\n.modal-footer {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: center;\n  justify-content: center;\n  padding: 10px;\n  border-top: 1px solid #dee2e6;\n  border-bottom-left-radius: 10px;\n  border-bottom-right-radius: 10px;\n}\n\n.modal-footer > * {\n  margin: 0 5px;\n}\n\n.modal-footer > .btn {\n  display: inline-block;\n  font-weight: 400;\n  text-align: center;\n  vertical-align: middle;\n  user-select: none;\n  padding: 5px 10px;\n  font-size: 20px;\n  line-height: 1.5;\n  border-radius: 10px;\n}\n\n.modal-footer > .btn:focus {\n  box-shadow: 0 0 0 5px black;\n}\n\n.modal-footer > .btn.btn-primary {\n  color: #fff;\n  background-color: #007bff;\n  border-color: #007bff;\n}\n\n.modal-footer > .btn.btn-secondary {\n  color: #fff;\n  background-color: #6c757d;\n  border-color: #6c757d;\n}\n\n.modal-footer > .btn.btn-success {\n  color: #fff;\n  background-color: #28a745;\n  border-color: #28a745;\n}\n\n.mr-auto {\n  margin-right: auto !important;\n}\n\n.row-container {\n  display: flex;\n  justify-content: space-between;\n}\n\n.vertical-align-center {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var o=(s=r,a=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(c," */")),i=r.sources.map((function(t){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(t," */")}));return[n].concat(i).concat([o]).join("\n")}var s,a,c;return[n].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var s=this[i][0];null!=s&&(o[s]=!0)}for(var a=0;a<t.length;a++){var c=[].concat(t[a]);r&&o[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),e.push(c))}},e}}]).default;
\ No newline at end of file
diff --git a/device_home/signaling_server/gen/config.js b/device_home/signaling_server/gen/config.js
new file mode 100644 (file)
index 0000000..e2d758c
--- /dev/null
@@ -0,0 +1,48 @@
+const fs = require('fs');
+const os = require('os');
+const path = require('path');
+
+const TAG = 'offload-server:config';
+
+const defaultConfig = {
+  // domain
+  useDomainName: true,
+  domainName: 'addr.offloading.link',
+  // https certificate
+  useCertificateUpdate: true,
+  certificateServerHost: 'cert.offloading.link',
+  // meerkat
+  useMeerkat: false,
+  // message port
+  useMessagePort: true,
+  messagePortPingInterval: 1000,
+};
+
+function initialize() {
+  const config = Object.assign({}, defaultConfig);
+  const configFile = path.join(__dirname, 'config.json');
+  const homeConfigFile = path.join(os.homedir(), '.offload.config');
+
+  console.log(TAG, 'Home config file path:', homeConfigFile);
+  console.log(TAG, 'App config file path:', configFile);
+
+  if (fs.existsSync(homeConfigFile)) {
+    const conf = JSON.parse(fs.readFileSync(homeConfigFile));
+    console.log(TAG, 'config file loaded.', homeConfigFile, conf);
+    Object.assign(config, conf);
+  }
+
+  // Create empty config file once
+  if (!fs.existsSync(configFile)) {
+    fs.writeFileSync(configFile, JSON.stringify({}, null, 1));
+  }
+
+  const conf = JSON.parse(fs.readFileSync(configFile));
+  console.log(TAG, 'config file loaded.', configFile, conf);
+  Object.assign(config, conf);
+
+  console.log(TAG, 'config', config);
+  return config;
+}
+
+module.exports = initialize();
diff --git a/device_home/signaling_server/gen/config.json b/device_home/signaling_server/gen/config.json
new file mode 100644 (file)
index 0000000..250540a
--- /dev/null
@@ -0,0 +1,4 @@
+{
+  "useDomainName": false,
+  "useCertificateUpdate": false
+}
\ No newline at end of file
index 4751384..c15f131 100644 (file)
@@ -1,6 +1,6 @@
 const { getMyAddress } = require('./util');
 
-const TAG = 'edge.js';
+const TAG = 'offload-server:edge';
 const httpsPort = process.env.PORT || process.env.HTTPS_PORT || 5443;
 
 class Edge {
diff --git a/device_home/signaling_server/gen/public/offload-worker.js b/device_home/signaling_server/gen/public/offload-worker.js
deleted file mode 100644 (file)
index 46b17a4..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-window["offload-worker"]=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=87)}([function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(28))&&r.__esModule?r:{default:r};var i=["debug","error","info","log","warn","time","timeEnd","table"];t.default=function e(t){var n=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("Need a prefix when creating Logger class");i.forEach((function(e){e.indexOf("time")>-1?n[e]=(0,o.default)("".concat("offload",":TIME:")):n[e]=(0,o.default)("".concat("offload",":").concat(e.toUpperCase(),":").concat(t)),n[e].log=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.apply(this,t)}.bind(console[e])}))}},function(e,t,n){var r,o=n(47),i=n(15),s=n(48),a=n(49),c=n(50);"undefined"!=typeof ArrayBuffer&&(r=n(51));var u="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),f="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),l=u||f;t.protocol=3;var h=t.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},p=o(h),d={type:"error",data:"parser error"},y=n(52);function g(e,t,n){for(var r=new Array(e.length),o=a(e.length,n),i=function(e,n,o){t(n,(function(t,n){r[e]=n,o(t,r)}))},s=0;s<e.length;s++)i(s,e[s],o)}t.encodePacket=function(e,n,r,o){"function"==typeof n&&(o=n,n=!1),"function"==typeof r&&(o=r,r=null);var i=void 0===e.data?void 0:e.data.buffer||e.data;if("undefined"!=typeof ArrayBuffer&&i instanceof ArrayBuffer)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var o=e.data,i=new Uint8Array(o),s=new Uint8Array(1+o.byteLength);s[0]=h[e.type];for(var a=0;a<i.length;a++)s[a+1]=i[a];return r(s.buffer)}(e,n,o);if(void 0!==y&&i instanceof y)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);if(l)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var o=new FileReader;return o.onload=function(){t.encodePacket({type:e.type,data:o.result},n,!0,r)},o.readAsArrayBuffer(e.data)}(e,n,r);var o=new Uint8Array(1);o[0]=h[e.type];var i=new y([o.buffer,e.data]);return r(i)}(e,n,o);if(i&&i.base64)return function(e,n){var r="b"+t.packets[e.type]+e.data.data;return n(r)}(e,o);var s=h[e.type];return void 0!==e.data&&(s+=r?c.encode(String(e.data),{strict:!1}):String(e.data)),o(""+s)},t.encodeBase64Packet=function(e,n){var r,o="b"+t.packets[e.type];if(void 0!==y&&e.data instanceof y){var i=new FileReader;return i.onload=function(){var e=i.result.split(",")[1];n(o+e)},i.readAsDataURL(e.data)}try{r=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(t){for(var s=new Uint8Array(e.data),a=new Array(s.length),c=0;c<s.length;c++)a[c]=s[c];r=String.fromCharCode.apply(null,a)}return o+=btoa(r),n(o)},t.decodePacket=function(e,n,r){if(void 0===e)return d;if("string"==typeof e){if("b"===e.charAt(0))return t.decodeBase64Packet(e.substr(1),n);if(r&&!1===(e=function(e){try{e=c.decode(e,{strict:!1})}catch(e){return!1}return e}(e)))return d;var o=e.charAt(0);return Number(o)==o&&p[o]?e.length>1?{type:p[o],data:e.substring(1)}:{type:p[o]}:d}o=new Uint8Array(e)[0];var i=s(e,1);return y&&"blob"===n&&(i=new y([i])),{type:p[o],data:i}},t.decodeBase64Packet=function(e,t){var n=p[e.charAt(0)];if(!r)return{type:n,data:{base64:!0,data:e.substr(1)}};var o=r.decode(e.substr(1));return"blob"===t&&y&&(o=new y([o])),{type:n,data:o}},t.encodePayload=function(e,n,r){"function"==typeof n&&(r=n,n=null);var o=i(e);if(n&&o)return y&&!l?t.encodePayloadAsBlob(e,r):t.encodePayloadAsArrayBuffer(e,r);if(!e.length)return r("0:");g(e,(function(e,r){t.encodePacket(e,!!o&&n,!1,(function(e){r(null,function(e){return e.length+":"+e}(e))}))}),(function(e,t){return r(t.join(""))}))},t.decodePayload=function(e,n,r){if("string"!=typeof e)return t.decodePayloadAsBinary(e,n,r);var o;if("function"==typeof n&&(r=n,n=null),""===e)return r(d,0,1);for(var i,s,a="",c=0,u=e.length;c<u;c++){var f=e.charAt(c);if(":"===f){if(""===a||a!=(i=Number(a)))return r(d,0,1);if(a!=(s=e.substr(c+1,i)).length)return r(d,0,1);if(s.length){if(o=t.decodePacket(s,n,!1),d.type===o.type&&d.data===o.data)return r(d,0,1);if(!1===r(o,c+i,u))return}c+=i,a=""}else a+=f}return""!==a?r(d,0,1):void 0},t.encodePayloadAsArrayBuffer=function(e,n){if(!e.length)return n(new ArrayBuffer(0));g(e,(function(e,n){t.encodePacket(e,!0,!0,(function(e){return n(null,e)}))}),(function(e,t){var r=t.reduce((function(e,t){var n;return e+(n="string"==typeof t?t.length:t.byteLength).toString().length+n+2}),0),o=new Uint8Array(r),i=0;return t.forEach((function(e){var t="string"==typeof e,n=e;if(t){for(var r=new Uint8Array(e.length),s=0;s<e.length;s++)r[s]=e.charCodeAt(s);n=r.buffer}o[i++]=t?0:1;var a=n.byteLength.toString();for(s=0;s<a.length;s++)o[i++]=parseInt(a[s]);o[i++]=255;for(r=new Uint8Array(n),s=0;s<r.length;s++)o[i++]=r[s]})),n(o.buffer)}))},t.encodePayloadAsBlob=function(e,n){g(e,(function(e,n){t.encodePacket(e,!0,!0,(function(e){var t=new Uint8Array(1);if(t[0]=1,"string"==typeof e){for(var r=new Uint8Array(e.length),o=0;o<e.length;o++)r[o]=e.charCodeAt(o);e=r.buffer,t[0]=0}var i=(e instanceof ArrayBuffer?e.byteLength:e.size).toString(),s=new Uint8Array(i.length+1);for(o=0;o<i.length;o++)s[o]=parseInt(i[o]);if(s[i.length]=255,y){var a=new y([t.buffer,s.buffer,e]);n(null,a)}}))}),(function(e,t){return n(new y(t))}))},t.decodePayloadAsBinary=function(e,n,r){"function"==typeof n&&(r=n,n=null);for(var o=e,i=[];o.byteLength>0;){for(var a=new Uint8Array(o),c=0===a[0],u="",f=1;255!==a[f];f++){if(u.length>310)return r(d,0,1);u+=a[f]}o=s(o,2+u.length),u=parseInt(u);var l=s(o,0,u);if(c)try{l=String.fromCharCode.apply(null,new Uint8Array(l))}catch(e){var h=new Uint8Array(l);l="";for(f=0;f<h.length;f++)l+=String.fromCharCode(h[f])}i.push(l),o=s(o,u)}var p=i.length;i.forEach((function(e,o){r(t.decodePacket(e,n,!0),o,p)}))}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var c,u=[],f=!1,l=-1;function h(){f&&c&&(f=!1,c.length?u=c.concat(u):l=-1,u.length&&p())}function p(){if(!f){var e=a(h);f=!0;for(var t=u.length;t;){for(c=u,u=[];++l<t;)c&&c[l].run();l=-1,t=u.length}c=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function y(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new d(e,t)),1!==u.length||f||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){(function(r){function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(34)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))})),e.splice(i,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())}).call(this,n(3))},function(e,t){t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),r=0,o=n.length;r<o;r++){var i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}},function(e,t){e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){(function(r){function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(53)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))})),e.splice(i,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())}).call(this,n(3))},function(e,t,n){var r=n(35)("socket.io-parser"),o=n(9),i=n(15),s=n(42),a=n(16),c=n(17);function u(){}function f(e){var n=""+e.type;return t.BINARY_EVENT!==e.type&&t.BINARY_ACK!==e.type||(n+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(n+=e.nsp+","),null!=e.id&&(n+=e.id),null!=e.data&&(n+=JSON.stringify(e.data)),r("encoded %j as %s",e,n),n}function l(){this.reconstructor=null}function h(e){this.reconPack=e,this.buffers=[]}function p(e){return{type:t.ERROR,data:"parser error: "+e}}t.protocol=4,t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],t.CONNECT=0,t.DISCONNECT=1,t.EVENT=2,t.ACK=3,t.ERROR=4,t.BINARY_EVENT=5,t.BINARY_ACK=6,t.Encoder=u,t.Decoder=l,u.prototype.encode=function(e,n){(e.type!==t.EVENT&&e.type!==t.ACK||!i(e.data)||(e.type=e.type===t.EVENT?t.BINARY_EVENT:t.BINARY_ACK),r("encoding packet %j",e),t.BINARY_EVENT===e.type||t.BINARY_ACK===e.type)?function(e,t){s.removeBlobs(e,(function(e){var n=s.deconstructPacket(e),r=f(n.packet),o=n.buffers;o.unshift(r),t(o)}))}(e,n):n([f(e)])},o(l.prototype),l.prototype.add=function(e){var n;if("string"==typeof e)n=function(e){var n=0,o={type:Number(e.charAt(0))};if(null==t.types[o.type])return p("unknown packet type "+o.type);if(t.BINARY_EVENT===o.type||t.BINARY_ACK===o.type){for(var i="";"-"!==e.charAt(++n)&&(i+=e.charAt(n),n!=e.length););if(i!=Number(i)||"-"!==e.charAt(n))throw new Error("Illegal attachments");o.attachments=Number(i)}if("/"===e.charAt(n+1))for(o.nsp="";++n;){if(","===(c=e.charAt(n)))break;if(o.nsp+=c,n===e.length)break}else o.nsp="/";var s=e.charAt(n+1);if(""!==s&&Number(s)==s){for(o.id="";++n;){var c;if(null==(c=e.charAt(n))||Number(c)!=c){--n;break}if(o.id+=e.charAt(n),n===e.length)break}o.id=Number(o.id)}if(e.charAt(++n)){var u=function(e){try{return JSON.parse(e)}catch(e){return!1}}(e.substr(n));if(!(!1!==u&&(o.type===t.ERROR||a(u))))return p("invalid payload");o.data=u}return r("decoded %s as %j",e,o),o}(e),t.BINARY_EVENT===n.type||t.BINARY_ACK===n.type?(this.reconstructor=new h(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!c(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(n=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,this.emit("decoded",n))}},l.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},h.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=s.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},h.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(e,t,n){function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n)for(var r=0,o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t);return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){(function(t){var r=n(45);e.exports=function(e){var n=e.xdomain,o=e.xscheme,i=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!n||r))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!o&&i)return new XDomainRequest}catch(e){}if(!n)try{return new(t[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}}).call(this,n(0))},function(e,t,n){var r=n(2),o=n(12);function i(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.forceNode=e.forceNode,this.extraHeaders=e.extraHeaders,this.localAddress=e.localAddress}e.exports=i,o(i.prototype),i.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},i.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},i.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},i.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)},i.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},i.prototype.onData=function(e){var t=r.decodePacket(e,this.socket.binaryType);this.onPacket(t)},i.prototype.onPacket=function(e){this.emit("packet",e)},i.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(e,t,n){function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n)for(var r=0,o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t);return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var t=e,o=e.indexOf("["),i=e.indexOf("]");-1!=o&&-1!=i&&(e=e.substring(0,o)+e.substring(o,i).replace(/:/g,";")+e.substring(i,e.length));for(var s=n.exec(e||""),a={},c=14;c--;)a[r[c]]=s[c]||"";return-1!=o&&-1!=i&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a}},function(e,t){var n=1e3,r=6e4,o=60*r,i=24*o;function s(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var a,c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===c&&!1===isNaN(e))return t.long?s(a=e,i,"day")||s(a,o,"hour")||s(a,r,"minute")||s(a,n,"second")||a+" ms":function(e){if(e>=i)return Math.round(e/i)+"d";if(e>=o)return Math.round(e/o)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){(function(t){var r=n(41),o=Object.prototype.toString,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);e.exports=function e(n){if(!n||"object"!=typeof n)return!1;if(r(n)){for(var o=0,a=n.length;o<a;o++)if(e(n[o]))return!0;return!1}if("function"==typeof t&&t.isBuffer&&t.isBuffer(n)||"function"==typeof ArrayBuffer&&n instanceof ArrayBuffer||i&&n instanceof Blob||s&&n instanceof File)return!0;if(n.toJSON&&"function"==typeof n.toJSON&&1===arguments.length)return e(n.toJSON(),!0);for(var c in n)if(Object.prototype.hasOwnProperty.call(n,c)&&e(n[c]))return!0;return!1}}).call(this,n(37).Buffer)},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){(function(t){e.exports=function(e){return t.Buffer&&t.Buffer.isBuffer(e)||t.ArrayBuffer&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))}}).call(this,n(0))},function(e,t,n){var r=n(43),o=n(23),i=n(9),s=n(8),a=n(24),c=n(25),u=n(4)("socket.io-client:manager"),f=n(22),l=n(59),h=Object.prototype.hasOwnProperty;function p(e,t){if(!(this instanceof p))return new p(e,t);e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new l({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=t.parser||s;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.open()}e.exports=p,p.prototype.emitAll=function(){for(var e in this.emit.apply(this,arguments),this.nsps)h.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},p.prototype.updateSocketIds=function(){for(var e in this.nsps)h.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},p.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id},i(p.prototype),p.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},p.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},p.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},p.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},p.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},p.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},p.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},p.prototype.open=p.prototype.connect=function(e,t){if(u("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;u("opening %s",this.uri),this.engine=r(this.uri,this.opts);var n=this.engine,o=this;this.readyState="opening",this.skipReconnect=!1;var i=a(n,"open",(function(){o.onopen(),e&&e()})),s=a(n,"error",(function(t){if(u("connect_error"),o.cleanup(),o.readyState="closed",o.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else o.maybeReconnectOnOpen()}));if(!1!==this._timeout){var c=this._timeout;u("connect attempt will timeout after %d",c);var f=setTimeout((function(){u("connect attempt timed out after %d",c),i.destroy(),n.close(),n.emit("error","timeout"),o.emitAll("connect_timeout",c)}),c);this.subs.push({destroy:function(){clearTimeout(f)}})}return this.subs.push(i),this.subs.push(s),this},p.prototype.onopen=function(){u("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(a(e,"data",c(this,"ondata"))),this.subs.push(a(e,"ping",c(this,"onping"))),this.subs.push(a(e,"pong",c(this,"onpong"))),this.subs.push(a(e,"error",c(this,"onerror"))),this.subs.push(a(e,"close",c(this,"onclose"))),this.subs.push(a(this.decoder,"decoded",c(this,"ondecoded")))},p.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},p.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},p.prototype.ondata=function(e){this.decoder.add(e)},p.prototype.ondecoded=function(e){this.emit("packet",e)},p.prototype.onerror=function(e){u("error",e),this.emitAll("error",e)},p.prototype.socket=function(e,t){var n=this.nsps[e];if(!n){n=new o(this,e,t),this.nsps[e]=n;var r=this;n.on("connecting",i),n.on("connect",(function(){n.id=r.generateId(e)})),this.autoConnect&&i()}function i(){~f(r.connecting,n)||r.connecting.push(n)}return n},p.prototype.destroy=function(e){var t=f(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},p.prototype.packet=function(e){u("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,(function(n){for(var r=0;r<n.length;r++)t.engine.write(n[r],e.options);t.encoding=!1,t.processPacketQueue()})))},p.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},p.prototype.cleanup=function(){u("cleanup");for(var e=this.subs.length,t=0;t<e;t++){this.subs.shift().destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},p.prototype.close=p.prototype.disconnect=function(){u("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},p.prototype.onclose=function(e){u("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},p.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)u("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();u("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout((function(){e.skipReconnect||(u("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open((function(t){t?(u("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(u("reconnect success"),e.onreconnect())})))}),t);this.subs.push({destroy:function(){clearTimeout(n)}})}},p.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,n){(function(e){var r=n(10),o=n(46),i=n(55),s=n(56);t.polling=function(t){var n=!1,s=!1,a=!1!==t.jsonp;if(e.location){var c="https:"===location.protocol,u=location.port;u||(u=c?443:80),n=t.hostname!==location.hostname||u!==t.port,s=t.secure!==c}if(t.xdomain=n,t.xscheme=s,"open"in new r(t)&&!t.forceJSONP)return new o(t);if(!a)throw new Error("JSONP disabled");return new i(t)},t.websocket=s}).call(this,n(0))},function(e,t,n){var r=n(11),o=n(5),i=n(2),s=n(6),a=n(21),c=n(7)("engine.io-client:polling");e.exports=f;var u=null!=new(n(10))({xdomain:!1}).responseType;function f(e){var t=e&&e.forceBase64;u&&!t||(this.supportsBinary=!1),r.call(this,e)}s(f,r),f.prototype.name="polling",f.prototype.doOpen=function(){this.poll()},f.prototype.pause=function(e){var t=this;function n(){c("paused"),t.readyState="paused",e()}if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(c("we are currently polling - waiting to pause"),r++,this.once("pollComplete",(function(){c("pre-pause polling complete"),--r||n()}))),this.writable||(c("we are currently writing - waiting to pause"),r++,this.once("drain",(function(){c("pre-pause writing complete"),--r||n()})))}else n()},f.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},f.prototype.onData=function(e){var t=this;c("polling got data %s",e);i.decodePayload(e,this.socket.binaryType,(function(e,n,r){if("opening"===t.readyState&&t.onOpen(),"close"===e.type)return t.onClose(),!1;t.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():c('ignoring poll - transport state "%s"',this.readyState))},f.prototype.doClose=function(){var e=this;function t(){c("writing close packet"),e.write([{type:"close"}])}"open"===this.readyState?(c("transport open - closing"),t()):(c("transport not open - deferring close"),this.once("open",t))},f.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")};i.encodePayload(e,this.supportsBinary,(function(e){t.doWrite(e,n)}))},f.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=a()),this.supportsBinary||e.sid||(e.b64=1),e=o.encode(e),this.port&&("https"===t&&443!==Number(this.port)||"http"===t&&80!==Number(this.port))&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e}},function(e,t,n){"use strict";var r,o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),i={},s=0,a=0;function c(e){var t="";do{t=o[e%64]+t,e=Math.floor(e/64)}while(e>0);return t}function u(){var e=c(+new Date);return e!==r?(s=0,r=e):e+"."+c(s++)}for(;a<64;a++)i[o[a]]=a;u.encode=c,u.decode=function(e){var t=0;for(a=0;a<e.length;a++)t=64*t+i[e.charAt(a)];return t},e.exports=u},function(e,t){var n=[].indexOf;e.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},function(e,t,n){var r=n(8),o=n(9),i=n(58),s=n(24),a=n(25),c=n(4)("socket.io-client:socket"),u=n(5);e.exports=h;var f={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},l=o.prototype.emit;function h(e,t,n){this.io=e,this.nsp=t,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}o(h.prototype),h.prototype.subEvents=function(){if(!this.subs){var e=this.io;this.subs=[s(e,"open",a(this,"onopen")),s(e,"packet",a(this,"onpacket")),s(e,"close",a(this,"onclose"))]}},h.prototype.open=h.prototype.connect=function(){return this.connected||(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting")),this},h.prototype.send=function(){var e=i(arguments);return e.unshift("message"),this.emit.apply(this,e),this},h.prototype.emit=function(e){if(f.hasOwnProperty(e))return l.apply(this,arguments),this;var t=i(arguments),n={type:r.EVENT,data:t,options:{}};return n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof t[t.length-1]&&(c("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),delete this.flags,this},h.prototype.packet=function(e){e.nsp=this.nsp,this.io.packet(e)},h.prototype.onopen=function(){if(c("transport is open - connecting"),"/"!==this.nsp)if(this.query){var e="object"==typeof this.query?u.encode(this.query):this.query;c("sending connect packet with query %s",e),this.packet({type:r.CONNECT,query:e})}else this.packet({type:r.CONNECT})},h.prototype.onclose=function(e){c("close (%s)",e),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",e)},h.prototype.onpacket=function(e){if(e.nsp===this.nsp)switch(e.type){case r.CONNECT:this.onconnect();break;case r.EVENT:case r.BINARY_EVENT:this.onevent(e);break;case r.ACK:case r.BINARY_ACK:this.onack(e);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error",e.data)}},h.prototype.onevent=function(e){var t=e.data||[];c("emitting event %j",t),null!=e.id&&(c("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?l.apply(this,t):this.receiveBuffer.push(t)},h.prototype.ack=function(e){var t=this,n=!1;return function(){if(!n){n=!0;var o=i(arguments);c("sending ack %j",o),t.packet({type:r.ACK,id:e,data:o})}}},h.prototype.onack=function(e){var t=this.acks[e.id];"function"==typeof t?(c("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):c("bad ack %s",e.id)},h.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},h.prototype.emitBuffered=function(){var e;for(e=0;e<this.receiveBuffer.length;e++)l.apply(this,this.receiveBuffer[e]);for(this.receiveBuffer=[],e=0;e<this.sendBuffer.length;e++)this.packet(this.sendBuffer[e]);this.sendBuffer=[]},h.prototype.ondisconnect=function(){c("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},h.prototype.destroy=function(){if(this.subs){for(var e=0;e<this.subs.length;e++)this.subs[e].destroy();this.subs=null}this.io.destroy(this)},h.prototype.close=h.prototype.disconnect=function(){return this.connected&&(c("performing disconnect (%s)",this.nsp),this.packet({type:r.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},h.prototype.compress=function(e){return this.flags=this.flags||{},this.flags.compress=e,this}},function(e,t){e.exports=function(e,t,n){return e.on(t,n),{destroy:function(){e.removeListener(t,n)}}}},function(e,t){var n=[].slice;e.exports=function(e,t){if("string"==typeof t&&(t=e[t]),"function"!=typeof t)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return t.apply(e,r.concat(n.call(arguments)))}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getServerUrlFromLocation=function(){if(location){if("http:"===location.protocol)return"http://"+location.hostname+":9559";if("https:"===location.protocol)return"https://"+location.hostname+":5443"}return null},t.getServerUrlFromLocalhost=function(){if(location&&"https:"===location.protocol)return"https://127.0.0.1:5443";return"http://127.0.0.1:9559"},t.optionEnabled=function(e){return!("true"!==o()[e])},t.getOptions=o,t.getDeviceName=function(){var e=(new r.UAParser).getResult(),t="Unknown";e.device.vendor&&e.device.model?t="[".concat(e.device.vendor,"] ").concat(e.device.model):e.os.name&&e.browser.name&&(t="[".concat(e.os.name,"] ").concat(e.browser.name));return t},t.getClientId=function(){var e=localStorage.getItem("clientId");if(null===e){var t=(new r.UAParser).getResult(),n="Unknown";void 0!==t.device.vendor?n=t.device.vendor:void 0!==t.os.name&&(n=t.os.name),e=n+i(),localStorage.setItem("clientId",e)}return e},t.isPromise=function(e){return!!e&&"function"==typeof e.then},t.getUniqueId=i,t.getOffloadId=function(e){return e+"_"+e.toLowerCase().split("").reverse().join("")};var r=n(31);function o(){var e={},t=["debug","info"],n=function(){var e=window.location.search.substr(1).split("&");if(""===e)return{};for(var t={},n=0;n<e.length;n++){var r=e[n].split("=",2);1===r.length?t[r[0]]="":t[r[0]]=decodeURIComponent(r[1].replace(/\+/g," "))}return t}();for(var r in n)-1!==t.indexOf(r)&&(e[r]=n[r]);return e}function i(){return"_"+Math.random().toString(36).substr(2,9)}},function(e,t,n){(function(r){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))}),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(29)(t);const{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(3))},function(e,t,n){e.exports=function(e){function t(e){let n,o=null;function i(...e){if(!i.enabled)return;const r=i,o=Number(new Date),s=o-(n||o);r.diff=s,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n}),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return i.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=r,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:()=>null===o?t.enabled(e):o,set:e=>{o=e}}),"function"==typeof t.init&&t.init(i),i}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(30),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},function(e,t){var n=1e3,r=6e4,o=60*r,i=24*o;function s(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var a=typeof e;if("string"===a&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===a&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=i)return s(e,t,i,"day");if(t>=o)return s(e,t,o,"hour");if(t>=r)return s(e,t,r,"minute");if(t>=n)return s(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=i)return Math.round(e/i)+"d";if(t>=o)return Math.round(e/o)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){var r;
-/*!
- * UAParser.js v0.7.21
- * Lightweight JavaScript-based User-Agent string parser
- * https://github.com/faisalman/ua-parser-js
- *
- * Copyright © 2012-2019 Faisal Salman <f@faisalman.com>
- * Licensed under MIT License
- */!function(o,i){"use strict";var s="model",a="name",c="type",u="vendor",f="version",l="mobile",h="tablet",p="smarttv",d={extend:function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},y={rgx:function(e,t){for(var n,r,o,i,s,a,c=0;c<t.length&&!s;){var u=t[c],f=t[c+1];for(n=r=0;n<u.length&&!s;)if(s=u[n++].exec(e))for(o=0;o<f.length;o++)a=s[++r],"object"==typeof(i=f[o])&&i.length>0?2==i.length?"function"==typeof i[1]?this[i[0]]=i[1].call(this,a):this[i[0]]=i[1]:3==i.length?"function"!=typeof i[1]||i[1].exec&&i[1].test?this[i[0]]=a?a.replace(i[1],i[2]):void 0:this[i[0]]=a?i[1].call(this,a,i[2]):void 0:4==i.length&&(this[i[0]]=a?i[3].call(this,a.replace(i[1],i[2])):void 0):this[i]=a||void 0;c+=2}},str:function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(d.has(t[n][r],e))return"?"===n?void 0:n}else if(d.has(t[n],e))return"?"===n?void 0:n;return e}},g={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},m={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[a,f],[/(opios)[\/\s]+([\w\.]+)/i],[[a,"Opera Mini"],f],[/\s(opr)\/([\w\.]+)/i],[[a,"Opera"],f],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i],[a,f],[/(konqueror)\/([\w\.]+)/i],[[a,"Konqueror"],f],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[a,"IE"],f],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[a,"Edge"],f],[/(yabrowser)\/([\w\.]+)/i],[[a,"Yandex"],f],[/(Avast)\/([\w\.]+)/i],[[a,"Avast Secure Browser"],f],[/(AVG)\/([\w\.]+)/i],[[a,"AVG Secure Browser"],f],[/(puffin)\/([\w\.]+)/i],[[a,"Puffin"],f],[/(focus)\/([\w\.]+)/i],[[a,"Firefox Focus"],f],[/(opt)\/([\w\.]+)/i],[[a,"Opera Touch"],f],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[a,"UCBrowser"],f],[/(comodo_dragon)\/([\w\.]+)/i],[[a,/_/g," "],f],[/(windowswechat qbcore)\/([\w\.]+)/i],[[a,"WeChat(Win) Desktop"],f],[/(micromessenger)\/([\w\.]+)/i],[[a,"WeChat"],f],[/(brave)\/([\w\.]+)/i],[[a,"Brave"],f],[/(qqbrowserlite)\/([\w\.]+)/i],[a,f],[/(QQ)\/([\d\.]+)/i],[a,f],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[a,f],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[a,f],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[a,f],[/(MetaSr)[\/\s]?([\w\.]+)/i],[a],[/(LBBROWSER)/i],[a],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[f,[a,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[f,[a,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[a,f],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[f,[a,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[a,/(.+)/,"$1 WebView"],f],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[a,/(.+(?:g|us))(.+)/,"$1 $2"],f],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[f,[a,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[a,"Sailfish Browser"],f],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[a,f],[/(dolfin)\/([\w\.]+)/i],[[a,"Dolphin"],f],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[a,"360 Browser"]],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[a,"Chrome"],f],[/(coast)\/([\w\.]+)/i],[[a,"Opera Coast"],f],[/fxios\/([\w\.-]+)/i],[f,[a,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[f,[a,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[f,a],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[a,"GSA"],f],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[a,[f,y.str,g.browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[a,f],[/(navigator|netscape)\/([\w\.-]+)/i],[[a,"Netscape"],f],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[a,f]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",d.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",d.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[["architecture",d.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[s,u,[c,h]],[/applecoremedia\/[\w\.]+ \((ipad)/],[s,[u,"Apple"],[c,h]],[/(apple\s{0,1}tv)/i],[[s,"Apple TV"],[u,"Apple"],[c,p]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[u,s,[c,h]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[s,[u,"Amazon"],[c,h]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[s,y.str,g.device.amazon.model],[u,"Amazon"],[c,l]],[/android.+aft([bms])\sbuild/i],[s,[u,"Amazon"],[c,p]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[s,u,[c,l]],[/\((ip[honed|\s\w*]+);/i],[s,[u,"Apple"],[c,l]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[u,s,[c,l]],[/\(bb10;\s(\w+)/i],[s,[u,"BlackBerry"],[c,l]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[s,[u,"Asus"],[c,h]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[u,"Sony"],[s,"Xperia Tablet"],[c,h]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[s,[u,"Sony"],[c,l]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[u,s,[c,"console"]],[/android.+;\s(shield)\sbuild/i],[s,[u,"Nvidia"],[c,"console"]],[/(playstation\s[34portablevi]+)/i],[s,[u,"Sony"],[c,"console"]],[/(sprint\s(\w+))/i],[[u,y.str,g.device.sprint.vendor],[s,y.str,g.device.sprint.model],[c,l]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[u,[s,/_/g," "],[c,l]],[/(nexus\s9)/i],[s,[u,"HTC"],[c,h]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[s,[u,"Huawei"],[c,l]],[/android.+(bah2?-a?[lw]\d{2})/i],[s,[u,"Huawei"],[c,h]],[/(microsoft);\s(lumia[\s\w]+)/i],[u,s,[c,l]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[s,[u,"Microsoft"],[c,"console"]],[/(kin\.[onetw]{3})/i],[[s,/\./g," "],[u,"Microsoft"],[c,l]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[s,[u,"Motorola"],[c,l]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[s,[u,"Motorola"],[c,h]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[u,d.trim],[s,d.trim],[c,p]],[/hbbtv.+maple;(\d+)/i],[[s,/^/,"SmartTV"],[u,"Samsung"],[c,p]],[/\(dtv[\);].+(aquos)/i],[s,[u,"Sharp"],[c,p]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[u,"Samsung"],s,[c,h]],[/smart-tv.+(samsung)/i],[u,[c,p],s],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[u,"Samsung"],s,[c,l]],[/sie-(\w*)/i],[s,[u,"Siemens"],[c,l]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[u,"Nokia"],s,[c,l]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[s,[u,"Acer"],[c,h]],[/android.+([vl]k\-?\d{3})\s+build/i],[s,[u,"LG"],[c,h]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[u,"LG"],s,[c,h]],[/(lg) netcast\.tv/i],[u,s,[c,p]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[s,[u,"LG"],[c,l]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[u,s,[c,h]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[s,[u,"Lenovo"],[c,h]],[/(lenovo)[_\s-]?([\w-]+)/i],[u,s,[c,l]],[/linux;.+((jolla));/i],[u,s,[c,l]],[/((pebble))app\/[\d\.]+\s/i],[u,s,[c,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[u,s,[c,l]],[/crkey/i],[[s,"Chromecast"],[u,"Google"],[c,p]],[/android.+;\s(glass)\s\d/i],[s,[u,"Google"],[c,"wearable"]],[/android.+;\s(pixel c)[\s)]/i],[s,[u,"Google"],[c,h]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[s,[u,"Google"],[c,l]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i],[[s,/_/g," "],[u,"Xiaomi"],[c,l]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[s,/_/g," "],[u,"Xiaomi"],[c,h]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[s,[u,"Meizu"],[c,l]],[/(mz)-([\w-]{2,})/i],[[u,"Meizu"],s,[c,l]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[s,[u,"OnePlus"],[c,l]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[s,[u,"RCA"],[c,h]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[s,[u,"Dell"],[c,h]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[s,[u,"Verizon"],[c,h]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[u,"Barnes & Noble"],s,[c,h]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[s,[u,"NuVision"],[c,h]],[/android.+;\s(k88)\sbuild/i],[s,[u,"ZTE"],[c,h]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[s,[u,"Swiss"],[c,l]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[s,[u,"Swiss"],[c,h]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[s,[u,"Zeki"],[c,h]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[u,"Dragon Touch"],s,[c,h]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[s,[u,"Insignia"],[c,h]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[s,[u,"NextBook"],[c,h]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[u,"Voice"],s,[c,l]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[u,"LvTel"],s,[c,l]],[/android.+;\s(PH-1)\s/i],[s,[u,"Essential"],[c,l]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[s,[u,"Envizen"],[c,h]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[u,s,[c,h]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[s,[u,"MachSpeed"],[c,h]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[u,s,[c,h]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[s,[u,"Rotor"],[c,h]],[/android.+(KS(.+))\s+build/i],[s,[u,"Amazon"],[c,h]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[u,s,[c,h]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[c,d.lowerize],u,s],[/[\s\/\(](smart-?tv)[;\)]/i],[[c,p]],[/(android[\w\.\s\-]{0,9});.+build/i],[s,[u,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[f,[a,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[a,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[a,f],[/rv\:([\w\.]{1,9}).+(gecko)/i],[f,a]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[a,f],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[a,[f,y.str,g.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[a,"Windows"],[f,y.str,g.os.windows.version]],[/\((bb)(10);/i],[[a,"BlackBerry"],f],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[a,f],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[a,"Symbian"],f],[/\((series40);/i],[a],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[a,"Firefox OS"],f],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[a,f],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[a,"Chromium OS"],f],[/(sunos)\s?([\w\.\d]*)/i],[[a,"Solaris"],f],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[a,f],[/(haiku)\s(\w+)/i],[a,f],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[f,/_/g,"."],[a,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[a,"Mac OS"],[f,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[a,f]]},v=function(e,t){if("object"==typeof e&&(t=e,e=void 0),!(this instanceof v))return new v(e,t).getResult();var n=e||(o&&o.navigator&&o.navigator.userAgent?o.navigator.userAgent:""),r=t?d.extend(m,t):m;return this.getBrowser=function(){var e={name:void 0,version:void 0};return y.rgx.call(e,n,r.browser),e.major=d.major(e.version),e},this.getCPU=function(){var e={architecture:void 0};return y.rgx.call(e,n,r.cpu),e},this.getDevice=function(){var e={vendor:void 0,model:void 0,type:void 0};return y.rgx.call(e,n,r.device),e},this.getEngine=function(){var e={name:void 0,version:void 0};return y.rgx.call(e,n,r.engine),e},this.getOS=function(){var e={name:void 0,version:void 0};return y.rgx.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=e,this},this};v.VERSION="0.7.21",v.BROWSER={NAME:a,MAJOR:"major",VERSION:f},v.CPU={ARCHITECTURE:"architecture"},v.DEVICE={MODEL:s,VENDOR:u,TYPE:c,CONSOLE:"console",MOBILE:l,SMARTTV:p,TABLET:h,WEARABLE:"wearable",EMBEDDED:"embedded"},v.ENGINE={NAME:a,VERSION:f},v.OS={NAME:a,VERSION:f},void 0!==t?(void 0!==e&&e.exports&&(t=e.exports=v),t.UAParser=v):void 0===(r=function(){return v}.call(t,n,t,e))||(e.exports=r);var b=o&&(o.jQuery||o.Zepto);if(b&&!b.ua){var w=new v;b.ua=w.getResult(),b.ua.get=function(){return w.getUA()},b.ua.set=function(e){w.setUA(e);var t=w.getResult();for(var n in t)b.ua[n]=t[n]}}}("object"==typeof window?window:this)},function(e,t,n){var r=n(33),o=n(8),i=n(18),s=n(4)("socket.io-client");e.exports=t=c;var a=t.managers={};function c(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,o=r(e),c=o.source,u=o.id,f=o.path,l=a[u]&&f in a[u].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||l?(s("ignoring socket cache for %s",c),n=i(c,t)):(a[u]||(s("new io instance for %s",c),a[u]=i(c,t)),n=a[u]),o.query&&!t.query&&(t.query=o.query),n.socket(o.path,t)}t.protocol=o.protocol,t.connect=c,t.Manager=n(18),t.Socket=n(23)},function(e,t,n){(function(t){var r=n(13),o=n(4)("socket.io-client:url");e.exports=function(e,n){var i=e;n=n||t.location,null==e&&(e=n.protocol+"//"+n.host);"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(o("protocol-less url %s",e),e=void 0!==n?n.protocol+"//"+e:"https://"+e),o("parse %s",e),i=r(e));i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443"));i.path=i.path||"/";var s=-1!==i.host.indexOf(":")?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+s+":"+i.port,i.href=i.protocol+"://"+s+(n&&n.port===i.port?"":":"+i.port),i}}).call(this,n(0))},function(e,t,n){var r;function o(e){function n(){if(n.enabled){var e=n,o=+new Date,i=o-(r||o);e.diff=i,e.prev=r,e.curr=o,r=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;c++;var o=t.formatters[r];if("function"==typeof o){var i=s[c];n=o.call(e,i),s.splice(c,1),c--}return n})),t.formatArgs.call(e,s);var u=n.log||t.log||console.log.bind(console);u.apply(e,s)}}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),"function"==typeof t.init&&t.init(n),n}(t=e.exports=o.debug=o.default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,o=0;o<r;o++)n[o]&&("-"===(e=n[o].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(14),t.names=[],t.skips=[],t.formatters={}},function(e,t,n){(function(r){function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(36)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))})),e.splice(i,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())}).call(this,n(3))},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,o=+new Date,i=o-(n||o);e.diff=i,e.prev=n,e.curr=o,n=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;c++;var o=t.formatters[r];if("function"==typeof o){var i=s[c];n=o.call(e,i),s.splice(c,1),c--}return n})),t.formatArgs.call(e,s);var u=r.log||t.log||console.log.bind(console);u.apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),r.destroy=o,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function o(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var i=t.instances[n];i.enabled=t.enabled(i.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(14),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t,n){"use strict";(function(e){
-/*!
- * The buffer module from node.js, for the browser.
- *
- * @author   Feross Aboukhadijeh <http://feross.org>
- * @license  MIT
- */
-var r=n(38),o=n(39),i=n(40);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return u(this,e,t,n)}function u(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=h(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(t,n),o=(e=a(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|p(t.length);return 0===(e=a(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):h(e,t);if("Buffer"===t.type&&i(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t){if(f(t),e=a(e,t<0?0:0|p(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|p(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(c.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 r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(r)return U(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,o){var i,s=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var f=-1;for(i=n;i<a;i++)if(u(e,i)===u(t,-1===f?0:i-f)){if(-1===f&&(f=i),i-f+1===c)return f*s}else-1!==f&&(i-=i-f),f=-1}else for(n+c>a&&(n=a-c),i=n;i>=0;i--){for(var l=!0,h=0;h<c;h++)if(u(e,i+h)!==u(t,h)){l=!1;break}if(l)return i}return-1}function b(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function w(e,t,n,r){return z(U(t,e.length-n),e,n,r)}function C(e,t,n,r){return z(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function k(e,t,n,r){return C(e,t,n,r)}function _(e,t,n,r){return z(q(t),e,n,r)}function E(e,t,n,r){return z(function(e,t){for(var n,r,o,i=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,s,a,c,u=e[o],f=null,l=u>239?4:u>223?3:u>191?2:1;if(o+l<=n)switch(l){case 1:u<128&&(f=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(f=c);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(c=(15&u)<<12|(63&i)<<6|63&s)>2047&&(c<55296||c>57343)&&(f=c);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(f=c)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),o+=l}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return u(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,r){return f(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return l(null,e)},c.allocUnsafeSlow=function(e){return l(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=c.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,o),o+=s.length}return r},c.byteLength=d,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?S(this,0,e):y.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(i,s),u=this.slice(r,o),f=e.slice(t,n),l=0;l<a;++l)if(u[l]!==f[l]){i=u[l],s=f[l];break}return i<s?-1:s<i?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return C(this,e,t,n);case"latin1":case"binary":return k(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function R(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function O(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=L(e[i]);return o}function T(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function F(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function B(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function j(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(e,t,n,r,i){return i||j(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function I(e,t,n,r,i){return i||j(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var o=t-e;n=new c(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUInt8=function(e,t){return t||F(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||F(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||F(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||F(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||F(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||F(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||F(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||F(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||F(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);P(this,e,t,n,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i<n&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);P(this,e,t,n,o-1,-o)}var i=n-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return M(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return M(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return I(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return I(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var s=c.isBuffer(e)?e:U(new c(e,r).toString()),a=s.length;for(i=0;i<n-t;++i)this[i+t]=s[i%a]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function L(e){return e<16?"0"+e.toString(16):e.toString(16)}function U(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function q(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(0))},function(e,t,n){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=u(e),s=r[0],a=r[1],c=new i(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),f=0,l=a>0?s-4:s;for(n=0;n<l;n+=4)t=o[e.charCodeAt(n)]<<18|o[e.charCodeAt(n+1)]<<12|o[e.charCodeAt(n+2)]<<6|o[e.charCodeAt(n+3)],c[f++]=t>>16&255,c[f++]=t>>8&255,c[f++]=255&t;2===a&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,c[f++]=255&t);1===a&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,c[f++]=t>>8&255,c[f++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=0,a=n-o;s<a;s+=16383)i.push(f(e,s,s+16383>a?a:s+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a<c;++a)r[a]=s[a],o[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function f(e,t,n){for(var o,i,s=[],a=t;a<n;a+=3)o=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){
-/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
-t.read=function(e,t,n,r,o){var i,s,a=8*o-r-1,c=(1<<a)-1,u=c>>1,f=-7,l=n?o-1:0,h=n?-1:1,p=e[t+l];for(l+=h,i=p&(1<<-f)-1,p>>=-f,f+=a;f>0;i=256*i+e[t+l],l+=h,f-=8);for(s=i&(1<<-f)-1,i>>=-f,f+=r;f>0;s=256*s+e[t+l],l+=h,f-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),i-=u}return(p?-1:1)*s*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var s,a,c,u=8*i-o-1,f=(1<<u)-1,l=f>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+l>=1?h/c:h*Math.pow(2,1-l))*c>=2&&(s++,c/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(t*c-1)*Math.pow(2,o),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,o),s=0));o>=8;e[n+p]=255&a,p+=d,a/=256,o-=8);for(s=s<<o|a,u+=o;u>0;e[n+p]=255&s,p+=d,s/=256,u-=8);e[n+p-d]|=128*y}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){(function(e){var r=n(16),o=n(17),i=Object.prototype.toString,s="function"==typeof e.Blob||"[object BlobConstructor]"===i.call(e.Blob),a="function"==typeof e.File||"[object FileConstructor]"===i.call(e.File);t.deconstructPacket=function(e){var t=[],n=e.data,i=e;return i.data=function e(t,n){if(!t)return t;if(o(t)){var i={_placeholder:!0,num:n.length};return n.push(t),i}if(r(t)){for(var s=new Array(t.length),a=0;a<t.length;a++)s[a]=e(t[a],n);return s}if("object"==typeof t&&!(t instanceof Date)){s={};for(var c in t)s[c]=e(t[c],n);return s}return t}(n,t),i.attachments=t.length,{packet:i,buffers:t}},t.reconstructPacket=function(e,t){return e.data=function e(t,n){if(!t)return t;if(t&&t._placeholder)return n[t.num];if(r(t))for(var o=0;o<t.length;o++)t[o]=e(t[o],n);else if("object"==typeof t)for(var i in t)t[i]=e(t[i],n);return t}(e.data,t),e.attachments=void 0,e},t.removeBlobs=function(e,t){var n=0,i=e;!function e(c,u,f){if(!c)return c;if(s&&c instanceof Blob||a&&c instanceof File){n++;var l=new FileReader;l.onload=function(){f?f[u]=this.result:i=this.result,--n||t(i)},l.readAsArrayBuffer(c)}else if(r(c))for(var h=0;h<c.length;h++)e(c[h],h,c);else if("object"==typeof c&&!o(c))for(var p in c)e(c[p],p,c)}(i),n||t(i)}}).call(this,n(0))},function(e,t,n){e.exports=n(44),e.exports.parser=n(2)},function(e,t,n){(function(t){var r=n(19),o=n(12),i=n(7)("engine.io-client:socket"),s=n(22),a=n(2),c=n(13),u=n(5);function f(e,n){if(!(this instanceof f))return new f(e,n);n=n||{},e&&"object"==typeof e&&(n=e,e=null),e?(e=c(e),n.hostname=e.host,n.secure="https"===e.protocol||"wss"===e.protocol,n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=c(n.host).host),this.secure=null!=n.secure?n.secure:t.location&&"https:"===location.protocol,n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.agent=n.agent||!1,this.hostname=n.hostname||(t.location?location.hostname:"localhost"),this.port=n.port||(t.location&&location.port?location.port:this.secure?443:80),this.query=n.query||{},"string"==typeof this.query&&(this.query=u.decode(this.query)),this.upgrade=!1!==n.upgrade,this.path=(n.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!n.forceJSONP,this.jsonp=!1!==n.jsonp,this.forceBase64=!!n.forceBase64,this.enablesXDR=!!n.enablesXDR,this.timestampParam=n.timestampParam||"t",this.timestampRequests=n.timestampRequests,this.transports=n.transports||["polling","websocket"],this.transportOptions=n.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=n.policyPort||843,this.rememberUpgrade=n.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=n.onlyBinaryUpgrades,this.perMessageDeflate=!1!==n.perMessageDeflate&&(n.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=n.pfx||null,this.key=n.key||null,this.passphrase=n.passphrase||null,this.cert=n.cert||null,this.ca=n.ca||null,this.ciphers=n.ciphers||null,this.rejectUnauthorized=void 0===n.rejectUnauthorized||n.rejectUnauthorized,this.forceNode=!!n.forceNode;var r="object"==typeof t&&t;r.global===r&&(n.extraHeaders&&Object.keys(n.extraHeaders).length>0&&(this.extraHeaders=n.extraHeaders),n.localAddress&&(this.localAddress=n.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}e.exports=f,f.priorWebsocketSuccess=!1,o(f.prototype),f.protocol=a.protocol,f.Socket=f,f.Transport=n(11),f.transports=n(19),f.parser=n(2),f.prototype.createTransport=function(e){i('creating transport "%s"',e);var t=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(this.query);t.EIO=a.protocol,t.transport=e;var n=this.transportOptions[e]||{};return this.id&&(t.sid=this.id),new r[e]({query:t,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0})},f.prototype.open=function(){var e;if(this.rememberUpgrade&&f.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout((function(){t.emit("error","No transports available")}),0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},f.prototype.setTransport=function(e){i("setting transport %s",e.name);var t=this;this.transport&&(i("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",(function(){t.onDrain()})).on("packet",(function(e){t.onPacket(e)})).on("error",(function(e){t.onError(e)})).on("close",(function(){t.onClose("transport close")}))},f.prototype.probe=function(e){i('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),n=!1,r=this;function o(){if(r.onlyBinaryUpgrades){var o=!this.supportsBinary&&r.transport.supportsBinary;n=n||o}n||(i('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",(function(o){if(!n)if("pong"===o.type&&"probe"===o.data){if(i('probe transport "%s" pong',e),r.upgrading=!0,r.emit("upgrading",t),!t)return;f.priorWebsocketSuccess="websocket"===t.name,i('pausing current transport "%s"',r.transport.name),r.transport.pause((function(){n||"closed"!==r.readyState&&(i("changing transport and sending upgrade packet"),h(),r.setTransport(t),t.send([{type:"upgrade"}]),r.emit("upgrade",t),t=null,r.upgrading=!1,r.flush())}))}else{i('probe transport "%s" failed',e);var s=new Error("probe error");s.transport=t.name,r.emit("upgradeError",s)}})))}function s(){n||(n=!0,h(),t.close(),t=null)}function a(n){var o=new Error("probe error: "+n);o.transport=t.name,s(),i('probe transport "%s" failed because of error: %s',e,n),r.emit("upgradeError",o)}function c(){a("transport closed")}function u(){a("socket closed")}function l(e){t&&e.name!==t.name&&(i('"%s" works - aborting "%s"',e.name,t.name),s())}function h(){t.removeListener("open",o),t.removeListener("error",a),t.removeListener("close",c),r.removeListener("close",u),r.removeListener("upgrading",l)}f.priorWebsocketSuccess=!1,t.once("open",o),t.once("error",a),t.once("close",c),this.once("close",u),this.once("upgrading",l),t.open()},f.prototype.onOpen=function(){if(i("socket open"),this.readyState="open",f.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){i("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},f.prototype.onPacket=function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(i('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else i('packet received with socket readyState "%s"',this.readyState)},f.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},f.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout((function(){"closed"!==t.readyState&&t.onClose("ping timeout")}),e||t.pingInterval+t.pingTimeout)},f.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout((function(){i("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)}),e.pingInterval)},f.prototype.ping=function(){var e=this;this.sendPacket("ping",(function(){e.emit("ping")}))},f.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},f.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(i("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},f.prototype.write=f.prototype.send=function(e,t,n){return this.sendPacket("message",e,t,n),this},f.prototype.sendPacket=function(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var o={type:e,data:t,options:n};this.emit("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}},f.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var e=this;this.writeBuffer.length?this.once("drain",(function(){this.upgrading?r():t()})):this.upgrading?r():t()}function t(){e.onClose("forced close"),i("socket closing - telling transport to close"),e.transport.close()}function n(){e.removeListener("upgrade",n),e.removeListener("upgradeError",n),t()}function r(){e.once("upgrade",n),e.once("upgradeError",n)}return this},f.prototype.onError=function(e){i("socket error %j",e),f.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},f.prototype.onClose=function(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){i('socket close with reason: "%s"',e);clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),this.writeBuffer=[],this.prevBufferLen=0}},f.prototype.filterUpgrades=function(e){for(var t=[],n=0,r=e.length;n<r;n++)~s(this.transports,e[n])&&t.push(e[n]);return t}}).call(this,n(0))},function(e,t){try{e.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){e.exports=!1}},function(e,t,n){(function(t){var r=n(10),o=n(20),i=n(12),s=n(6),a=n(7)("engine.io-client:polling-xhr");function c(){}function u(e){if(o.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,t.location){var n="https:"===location.protocol,r=location.port;r||(r=n?443:80),this.xd=e.hostname!==t.location.hostname||r!==e.port,this.xs=e.secure!==n}}function f(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}function l(){for(var e in f.requests)f.requests.hasOwnProperty(e)&&f.requests[e].abort()}e.exports=u,e.exports.Request=f,s(u,o),u.prototype.supportsBinary=!0,u.prototype.request=function(e){return(e=e||{}).uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new f(e)},u.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,r=this.request({method:"POST",data:e,isBinary:n}),o=this;r.on("success",t),r.on("error",(function(e){o.onError("xhr post error",e)})),this.sendXhr=r},u.prototype.doPoll=function(){a("xhr poll");var e=this.request(),t=this;e.on("data",(function(e){t.onData(e)})),e.on("error",(function(e){t.onError("xhr poll error",e)})),this.pollXhr=e},i(f.prototype),f.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var n=this.xhr=new r(e),o=this;try{a("xhr open %s: %s",this.method,this.uri),n.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var i in n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this.extraHeaders[i])}catch(e){}if("POST"===this.method)try{this.isBinary?n.setRequestHeader("Content-type","application/octet-stream"):n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{n.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in n&&(n.withCredentials=!0),this.requestTimeout&&(n.timeout=this.requestTimeout),this.hasXDR()?(n.onload=function(){o.onLoad()},n.onerror=function(){o.onError(n.responseText)}):n.onreadystatechange=function(){if(2===n.readyState)try{var e=n.getResponseHeader("Content-Type");o.supportsBinary&&"application/octet-stream"===e&&(n.responseType="arraybuffer")}catch(e){}4===n.readyState&&(200===n.status||1223===n.status?o.onLoad():setTimeout((function(){o.onError(n.status)}),0))},a("xhr data %s",this.data),n.send(this.data)}catch(e){return void setTimeout((function(){o.onError(e)}),0)}t.document&&(this.index=f.requestsCount++,f.requests[this.index]=this)},f.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},f.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},f.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},f.prototype.cleanup=function(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=c:this.xhr.onreadystatechange=c,e)try{this.xhr.abort()}catch(e){}t.document&&delete f.requests[this.index],this.xhr=null}},f.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch(e){}e="application/octet-stream"===t&&this.xhr.response||this.xhr.responseText}catch(e){this.onError(e)}null!=e&&this.onData(e)},f.prototype.hasXDR=function(){return void 0!==t.XDomainRequest&&!this.xs&&this.enablesXDR},f.prototype.abort=function(){this.cleanup()},f.requestsCount=0,f.requests={},t.document&&(t.attachEvent?t.attachEvent("onunload",l):t.addEventListener&&t.addEventListener("beforeunload",l,!1))}).call(this,n(0))},function(e,t){e.exports=Object.keys||function(e){var t=[],n=Object.prototype.hasOwnProperty;for(var r in e)n.call(e,r)&&t.push(r);return t}},function(e,t){e.exports=function(e,t,n){var r=e.byteLength;if(t=t||0,n=n||r,e.slice)return e.slice(t,n);if(t<0&&(t+=r),n<0&&(n+=r),n>r&&(n=r),t>=r||t>=n||0===r)return new ArrayBuffer(0);for(var o=new Uint8Array(e),i=new Uint8Array(n-t),s=t,a=0;s<n;s++,a++)i[a]=o[s];return i.buffer}},function(e,t){function n(){}e.exports=function(e,t,r){var o=!1;return r=r||n,i.count=e,0===e?t():i;function i(e,n){if(i.count<=0)throw new Error("after called too many times");--i.count,e?(o=!0,t(e),t=r):0!==i.count||o||t(null,n)}}},function(e,t){
-/*! https://mths.be/utf8js v2.1.2 by @mathias */
-var n,r,o,i=String.fromCharCode;function s(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function a(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function c(e,t){return i(e>>t&63|128)}function u(e,t){if(0==(4294967168&e))return i(e);var n="";return 0==(4294965248&e)?n=i(e>>6&31|192):0==(4294901760&e)?(a(e,t)||(e=65533),n=i(e>>12&15|224),n+=c(e,6)):0==(4292870144&e)&&(n=i(e>>18&7|240),n+=c(e,12),n+=c(e,6)),n+=i(63&e|128)}function f(){if(o>=r)throw Error("Invalid byte index");var e=255&n[o];if(o++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function l(e){var t,i;if(o>r)throw Error("Invalid byte index");if(o==r)return!1;if(t=255&n[o],o++,0==(128&t))return t;if(192==(224&t)){if((i=(31&t)<<6|f())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&t)){if((i=(15&t)<<12|f()<<6|f())>=2048)return a(i,e)?i:65533;throw Error("Invalid continuation byte")}if(240==(248&t)&&(i=(7&t)<<18|f()<<12|f()<<6|f())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.exports={version:"2.1.2",encode:function(e,t){for(var n=!1!==(t=t||{}).strict,r=s(e),o=r.length,i=-1,a="";++i<o;)a+=u(r[i],n);return a},decode:function(e,t){var a=!1!==(t=t||{}).strict;n=s(e),r=n.length,o=0;for(var c,u=[];!1!==(c=l(a));)u.push(c);return function(e){for(var t,n=e.length,r=-1,o="";++r<n;)(t=e[r])>65535&&(o+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=i(t);return o}(u)}}},function(e,t){!function(){"use strict";for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),r=0;r<e.length;r++)n[e.charCodeAt(r)]=r;t.encode=function(t){var n,r=new Uint8Array(t),o=r.length,i="";for(n=0;n<o;n+=3)i+=e[r[n]>>2],i+=e[(3&r[n])<<4|r[n+1]>>4],i+=e[(15&r[n+1])<<2|r[n+2]>>6],i+=e[63&r[n+2]];return o%3==2?i=i.substring(0,i.length-1)+"=":o%3==1&&(i=i.substring(0,i.length-2)+"=="),i},t.decode=function(e){var t,r,o,i,s,a=.75*e.length,c=e.length,u=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var f=new ArrayBuffer(a),l=new Uint8Array(f);for(t=0;t<c;t+=4)r=n[e.charCodeAt(t)],o=n[e.charCodeAt(t+1)],i=n[e.charCodeAt(t+2)],s=n[e.charCodeAt(t+3)],l[u++]=r<<2|o>>4,l[u++]=(15&o)<<4|i>>2,l[u++]=(3&i)<<6|63&s;return f}}()},function(e,t){var n=void 0!==n?n:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,r=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),o=r&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),i=n&&n.prototype.append&&n.prototype.getBlob;function s(e){return e.map((function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var n=new Uint8Array(e.byteLength);n.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=n.buffer}return t}return e}))}function a(e,t){t=t||{};var r=new n;return s(e).forEach((function(e){r.append(e)})),t.type?r.getBlob(t.type):r.getBlob()}function c(e,t){return new Blob(s(e),t||{})}"undefined"!=typeof Blob&&(a.prototype=Blob.prototype,c.prototype=Blob.prototype),e.exports=r?o?Blob:c:i?a:void 0},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,o=+new Date,i=o-(n||o);e.diff=i,e.prev=n,e.curr=o,n=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;c++;var o=t.formatters[r];if("function"==typeof o){var i=s[c];n=o.call(e,i),s.splice(c,1),c--}return n})),t.formatArgs.call(e,s);var u=r.log||t.log||console.log.bind(console);u.apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),r.destroy=o,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function o(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var i=t.instances[n];i.enabled=t.enabled(i.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(54),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t){var n=1e3,r=6e4,o=60*r,i=24*o;function s(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var a,c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===c&&!1===isNaN(e))return t.long?s(a=e,i,"day")||s(a,o,"hour")||s(a,r,"minute")||s(a,n,"second")||a+" ms":function(e){if(e>=i)return Math.round(e/i)+"d";if(e>=o)return Math.round(e/o)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){(function(t){var r=n(20),o=n(6);e.exports=u;var i,s=/\n/g,a=/\\n/g;function c(){}function u(e){r.call(this,e),this.query=this.query||{},i||(t.___eio||(t.___eio=[]),i=t.___eio),this.index=i.length;var n=this;i.push((function(e){n.onData(e)})),this.query.j=this.index,t.document&&t.addEventListener&&t.addEventListener("beforeunload",(function(){n.script&&(n.script.onerror=c)}),!1)}o(u,r),u.prototype.supportsBinary=!1,u.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),r.prototype.doClose.call(this)},u.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(t,n):(document.head||document.body).appendChild(t),this.script=t,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout((function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)}),100)},u.prototype.doWrite=function(e,t){var n=this;if(!this.form){var r,o=document.createElement("form"),i=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index;o.className="socketio",o.style.position="absolute",o.style.top="-1000px",o.style.left="-1000px",o.target=c,o.method="POST",o.setAttribute("accept-charset","utf-8"),i.name="d",o.appendChild(i),document.body.appendChild(o),this.form=o,this.area=i}function u(){f(),t()}function f(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(e){n.onError("jsonp polling iframe removal error",e)}try{var e='<iframe src="javascript:0" name="'+n.iframeId+'">';r=document.createElement(e)}catch(e){(r=document.createElement("iframe")).name=n.iframeId,r.src="javascript:0"}r.id=n.iframeId,n.form.appendChild(r),n.iframe=r}this.form.action=this.uri(),f(),e=e.replace(a,"\\\n"),this.area.value=e.replace(s,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&u()}:this.iframe.onload=u}}).call(this,n(0))},function(e,t,n){(function(t){var r,o=n(11),i=n(2),s=n(5),a=n(6),c=n(21),u=n(7)("engine.io-client:websocket"),f=t.WebSocket||t.MozWebSocket;if("undefined"==typeof window)try{r=n(57)}catch(e){}var l=f;function h(e){e&&e.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=f&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(l=r),o.call(this,e)}l||"undefined"!=typeof window||(l=r),e.exports=h,a(h,o),h.prototype.name="websocket",h.prototype.supportsBinary=!0,h.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket?t?new l(e,t):new l(e):new l(e,t,n)}catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},h.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},h.prototype.write=function(e){var n=this;this.writable=!1;for(var r=e.length,o=0,s=r;o<s;o++)!function(e){i.encodePacket(e,n.supportsBinary,(function(o){if(!n.usingBrowserWebSocket){var i={};if(e.options&&(i.compress=e.options.compress),n.perMessageDeflate)("string"==typeof o?t.Buffer.byteLength(o):o.length)<n.perMessageDeflate.threshold&&(i.compress=!1)}try{n.usingBrowserWebSocket?n.ws.send(o):n.ws.send(o,i)}catch(e){u("websocket closed before onclose event")}--r||a()}))}(e[o]);function a(){n.emit("flush"),setTimeout((function(){n.writable=!0,n.emit("drain")}),0)}},h.prototype.onClose=function(){o.prototype.onClose.call(this)},h.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},h.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";return this.port&&("wss"===t&&443!==Number(this.port)||"ws"===t&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=c()),this.supportsBinary||(e.b64=1),(e=s.encode(e)).length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e},h.prototype.check=function(){return!(!l||"__initialize"in l&&this.name===h.prototype.name)}}).call(this,n(0))},function(e,t){},function(e,t){e.exports=function(e,t){for(var n=[],r=(t=t||0)||0;r<e.length;r++)n[r-t]=e[r];return n}},function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},function(e,t,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}m(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&m(e,"error",t,n)}(e,o,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var c=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function f(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var o,i,s,a;if(u(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),s=i[t]),void 0===s)s=i[t]=n,++e._eventsCount;else if("function"==typeof s?s=i[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(o=f(e))>0&&s.length>o&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=h.bind(r);return o.listener=n,r.wrapFn=o,o}function d(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):g(o,o.length)}function y(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function m(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return f(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else{var u=c.length,f=g(c,u);for(n=0;n<u;++n)i(f[n],this,t)}return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){return u(t),this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,o,i,s;if(u(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){s=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):y.call(e,t)},a.prototype.listenerCount=y,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e){e.exports=JSON.parse('{"name":"offload.js","version":"0.4.1","description":"","main":"dist/offload.js","scripts":{"build":"webpack --config ./webpack.dev.js","build:prod":"webpack --config ./webpack.prod.js","build:apps":"./script/build-script.js --all","dev":"npm-run-all --parallel watch:offload watch:server","lint":"npm run lint:prettier && npm run lint:eslint","lint:eslint":"eslint --fix \\"**/*.js\\"","lint:prettier":"prettier --write --ignore-unknown \\"**/*.js\\"","release":"release-it","castanets":"cp dist/offload-worker.js offload-worker/android/app/libs/","test":"karma start ./karma.conf.js","test:e2e":"cypress open","watch:offload":"nodemon --watch offload.js -e \'js,css\' --exec npm run build","watch:server":"nodemon --watch offload-server/src offload-server/src/app.js"},"author":"Hunseop Jeong <hs85.jeong@samsung.com>","dependencies":{"debug":"4.3.1","express":"4.17.1","filemanager-webpack-plugin":"2.0.5","lokijs":"1.5.11","qrcode":"1.4.4","serve-index":"1.9.1","socket.io":"2.3.0","socket.io-client":"2.0.2","ua-parser-js":"0.7.21","uuid":"8.2.0"},"devDependencies":{"@babel/core":"7.12.3","@babel/plugin-transform-modules-commonjs":"7.12.1","@babel/preset-env":"7.12.1","babel-eslint":"10.1.0","babel-loader":"8.1.0","commander":"6.2.0","css-loader":"3.5.3","cypress":"6.5.0","eslint":"7.30.0","eslint-config-google":"0.14.0","eslint-config-prettier":"8.3.0","filemanager-webpack-plugin":"2.0.5","fs-extra":"9.0.1","glob":"7.1.6","husky":"4.3.0","istanbul":"0.4.5","istanbul-instrumenter-loader":"3.0.1","karma":"5.2.3","karma-chrome-launcher":"3.1.0","karma-coverage":"2.0.3","karma-expect":"1.1.3","karma-mocha":"2.0.1","karma-sinon":"1.0.5","karma-webpack":"4.0.2","lint-staged":"10.3.0","mocha":"8.1.3","mustache-loader":"1.4.3","nodemon":"2.0.4","npm-run-all":"4.1.5","prettier":"2.3.2","release-it":"14.2.0","rimraf":"3.0.2","sinon":"9.2.0","to-string-loader":"1.1.6","url-loader":"4.1.1","webpack":"4.44.2","webpack-cli":"3.3.12","webpack-merge":"5.1.4"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"**/*.js":"npm run lint"},"repository":{"type":"git","url":"git@github.sec.samsung.net:HighPerformanceWeb/offload.js.git"},"release-it":{"npm":{"publish":false},"github":{"release":true,"assets":["dist/*"]},"hooks":{"before:init":["npm run lint"],"after:bump":["npm run build:prod","npm run castanets","npm run build:apps"]}}}')},function(e,t,n){"use strict";var r;function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.Worker=void 0;var i=new(((r=n(1))&&r.__esModule?r:{default:r}).default)("worker.js"),s=1e3,a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t||{},this.debugEnabled=this.options.debug||!1,this.dataChannel=null,this.peerConnection=null,this.features=new Set,this.confirmations=new Map}var t,n,r;return t=e,(n=[{key:"setPeerConnection",value:function(e){this.peerConnection=e}},{key:"setDataChannel",value:function(e){this.dataChannel=e}},{key:"hasFeature",value:function(e){return this.features.has(e)}},{key:"requestConfirmation",value:function(e,t,n){var r=this;return i.debug("requestConfirmation feature:".concat(e," clientId:").concat(t," deviceName:").concat(n)),new Promise((function(o){"undefined"!=typeof android?(android.emit("requestConfirmation",JSON.stringify({id:s,feature:e,clientId:t,deviceName:n})),r.confirmations.set(s,o),s++):o(!0)}))}},{key:"onConfirmationResult",value:function(e,t){return i.debug("onConfirmationResult id:".concat(e," allowed:").concat(t)),!!this.confirmations.has(e)&&(this.confirmations.get(e)(t),this.confirmations.delete(e),!0)}},{key:"sendData",value:function(e){this.dataChannel?this.dataChannel.send(JSON.stringify(e)):i.error("dataChannel is not open yet")}}])&&o(t.prototype,n),r&&o(t,r),e}();t.Worker=a},,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports=n(88)},function(e,t,n){"use strict";var r=n(89),o=n(95);window.localStorage.setItem("debug","offload:INFO*, offload:ERROR*");var i=new o.OffloadWorker(new r.OffloadWorkerImpl);window.offloadWorker=i},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.OffloadWorkerImpl=void 0;var o=u(n(60)),i=u(n(32)),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var a=i?Object.getOwnPropertyDescriptor(e,s):null;a&&(a.get||a.set)?Object.defineProperty(o,s,a):o[s]=e[s]}o.default=e,n&&n.set(e,o);return o}(n(90)),a=n(27);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u(e){return e&&e.__esModule?e:{default:e}}function f(e,t,n,r,o,i,s){try{var a=e[i](s),c=a.value}catch(e){return void n(e)}a.done?t(c):Promise.resolve(c).then(r,o)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){f(i,r,o,s,a,"next",e)}function a(e){f(i,r,o,s,a,"throw",e)}s(void 0)}))}}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=new(u(n(1)).default)("offload-worker-impl.js"),v=(0,a.optionEnabled)("debug"),b=Object.freeze({IDLE:0,CONNECTING:1,CONNECTED:2}),w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(f,e);var t,n,r,o,c,u=d(f);function f(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(e=u.call(this))._socket=null,e._peerConnection=null,e._dataChannel=null,e._id=null,e._peerId=null,e._currentUrl=null,e._features=null,e._mediaDeviceInfos=null,e._deviceName=null,e._workers=[],e._connectionStatus=b.IDLE,e._initialize(),e}return t=f,(n=[{key:"_initialize",value:function(){this._id=localStorage.getItem("workerId"),null===this._id&&(this._id=(0,a.getUniqueId)(),m.debug("New workerId : ".concat(this._id)),localStorage.setItem("workerId",this._id));for(var e=0,t=Object.values(s);e<t.length;e++){var n=t[e];this._workers.push(new n({debug:v}))}}},{key:"connect",value:function(e,t){if(this._deviceName=t&&t.deviceName||(0,a.getDeviceName)(),null===e||e.includes("file://"))m.error("No valid server URL found.");else{if(e.endsWith("/offload-js")||(e+="/offload-js"),this._connectionStatus!==b.IDLE){if(!t||!t.forceConnect)return void m.debug("Already connected or connecting to ".concat(this._currentUrl));this._socket.disconnect(),this._connectionStatus=b.IDLE}m.debug("Try to connect to ".concat(e)),this._createSocket(e),this._connectionStatus=b.CONNECTING,this._currentUrl=e}}},{key:"onConfirmationResult",value:function(e,t){this._workers.some((function(n){return n.onConfirmationResult(e,t)}))}},{key:"checkCapability",value:(c=l((function*(){m.debug("checkCapability");var e="";yield this._getCapability(),"undefined"!=typeof android&&(e=Array.from(this._features).toString(),android.emit("writeCapability",JSON.stringify({id:this._id,name:(0,a.getDeviceName)(),features:e})))})),function(){return c.apply(this,arguments)})},{key:"_createSocket",value:function(e){var t=this;this._socket=(0,i.default)(e,{transports:["websocket"],reconnectionAttempts:5}),this._socket.on("connect",l((function*(){m.debug("".concat(t._socket.id," connected")),t._connectionStatus=b.CONNECTED,yield t._getCapability(),t._join(),t.emit("connect",t._currentUrl)}))),this._socket.on("reconnect_attempt",(function(){m.debug("reconnect attempt"),t._socket.io.opts.transports=["polling","websocket"]})),this._socket.on("connect_error",(function(e){m.error("connect error: %o",e)})),this._socket.on("reconnect_failed",(function(){m.error("reconnect failed"),t._connectionStatus=b.IDLE})),this._socket.on("disconnect",(function(e){m.debug("disconnect ".concat(e)),t._connectionStatus=b.IDLE})),this._socket.on("client",this._handleClient.bind(this)),this._socket.on("message",this._handleMessage.bind(this))}},{key:"_getCapability",value:(o=l((function*(){var e=this;if(m.debug("_getCapability"),null===this._features&&(this._features=new Set,yield Promise.all(this._workers.map(function(){var t=l((function*(t){(yield t.checkCapability()).forEach((function(t){e._features.add(t)}))}));return function(e){return t.apply(this,arguments)}}())),this._features.has("CAMERA")||this._features.has("MIC")))try{this._mediaDeviceInfos=yield navigator.mediaDevices.enumerateDevices()}catch(e){m.error(e.name+": "+e.message)}})),function(){return o.apply(this,arguments)})},{key:"_join",value:function(){this._socket.emit("join",{id:this._id,name:this._deviceName,features:Array.from(this._features),mediaDeviceInfos:this._mediaDeviceInfos})}},{key:"_handleClient",value:function(e){"bye"===e.event?(m.debug("client bye: '".concat(e.socketId,"'")),this._hangup(e.socketId)):"forceQuit"===e.event&&(m.debug("offload-worker will be closed now!"),"undefined"!=typeof tizen?tizen.application.getCurrentApplication().exit():"undefined"!=typeof android?android.emit("destroyService",""):window.open("","_self").close())}},{key:"_hangup",value:function(e){e&&e!==this._peerId||(m.debug("hangup"),null!==this._peerConnection&&(null!==this._dataChannel&&(this._dataChannel.onopen=null,this._dataChannel.onclose=null,this._dataChannel.onmessage=null,this._dataChannel.close(),this._dataChannel=null,this._workers.forEach((function(e){e.setDataChannel(null)}))),this._peerConnection.onnegotiationneeded=null,this._peerConnection.onicecandidate=null,this._peerConnection.ondatachannel=null,this._peerConnection.close(),this._peerConnection=null,this._workers.forEach((function(e){e.setPeerConnection(null)}))),this._peerId=null)}},{key:"_handleMessage",value:function(e,t){"offer"===e.message.type?(this._setupPeerConnectionIfNeeded(e.from),this._handleOffer(e.message)):"answer"===e.message.type?this._handleAnswer(e.message):"candidate"===e.message.type?this._handleCandidate(e.message.candidate):m.error("unhandled message type: ".concat(e.message.type))}},{key:"_setupPeerConnectionIfNeeded",value:function(e){var t=this;null===this._peerConnection&&(m.debug("create peer connection. "+e),this._peerConnection=new RTCPeerConnection,this._peerConnection.onnegotiationneeded=this._handleNegotiationNeeded.bind(this),this._peerConnection.onicecandidate=this._handleIceCandidate.bind(this),this._peerConnection.ondatachannel=this._handleDataChannel.bind(this),this._workers.forEach((function(e){e.setPeerConnection(t._peerConnection)})),this._peerId=e)}},{key:"_handleNegotiationNeeded",value:function(){var e=this;this._peerConnection.createOffer().then((function(t){return"stable"!==e._peerConnection.signalingState?new DOMException("The RTCPeerConnection's signalingState is not 'statble'","InvalidStateError"):e._peerConnection.setLocalDescription(t)})).then((function(){m.debug("send offer"),e._sendPeerMessage(e._peerConnection.localDescription)})).catch((function(e){return m.error(TAG+"reason: "+e.message)}))}},{key:"_handleIceCandidate",value:function(e){e.candidate&&(m.debug("send candidate"),this._sendPeerMessage({type:"candidate",candidate:e.candidate}))}},{key:"_handleDataChannel",value:function(e){var t=this;this._dataChannel=e.channel,this._dataChannel.onopen=function(){m.debug("data channel opened"),t._workers.forEach((function(e){e.setDataChannel(t._dataChannel)}))},this._dataChannel.onclose=function(){m.debug("data channel closed"),t._hangup()},this._dataChannel.onmessage=function(e){var n=JSON.parse(e.data);t._workers.forEach((function(e){e.hasFeature(n.feature)&&e.handleMessage(n)}))}}},{key:"_handleOffer",value:function(e){var t=this;m.debug("got offer"),this._peerConnection.setRemoteDescription(e).then((function(){return t._peerConnection.createAnswer()})).then((function(e){return t._peerConnection.setLocalDescription(e)})).then((function(){m.debug("send answer"),t._sendPeerMessage(t._peerConnection.localDescription)})).catch((function(e){return m.error("reason: "+e.toString())}))}},{key:"_handleAnswer",value:function(e){m.debug("got answer"),this._peerConnection.setRemoteDescription(e).catch((function(e){return m.error("reason: "+e.toString())}))}},{key:"_handleCandidate",value:function(e){m.debug("got candidate"),this._peerConnection.addIceCandidate(e).catch((function(e){return m.error("reason: "+e.toString())}))}},{key:"_sendPeerMessage",value:function(e){null!==this._socket&&this._socket.emit("message",{to:this._peerId,from:this._id,message:e})}}])&&h(t.prototype,n),r&&h(t,r),f}(o.default);t.OffloadWorkerImpl=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HAMWorker",{enumerable:!0,get:function(){return r.HAMWorker}}),Object.defineProperty(t,"GUMWorker",{enumerable:!0,get:function(){return o.GUMWorker}}),Object.defineProperty(t,"SensorWorker",{enumerable:!0,get:function(){return i.SensorWorker}});var r=n(91),o=n(92),i=n(94)},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.HAMWorker=void 0;var o,i=n(62);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=new(((o=n(1))&&o.__esModule?o:{default:o}).default)("ham.js"),h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(i,e);var t,n,r,o=c(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).listenerId=0,e.intervalId=0,e}return t=i,(n=[{key:"checkCapability",value:function(){return("undefined"!=typeof tizen&&tizen.humanactivitymonitor||this.debugEnabled)&&(this.features.add("HRM"),this.features.add("PEDOMETER"),this.features.add("GESTURE")),this.features}},{key:"handleMessage",value:function(e){switch(e.feature){case"PEDOMETER":case"HRM":"start"===e.type?this.startHam(e.feature):this.stopHam(e.feature);break;case"GESTURE":"start"===e.type?this.startGestureRecognition():this.stopGestureRecognition();break;default:l.debug("unsupported feature",e.feature)}}},{key:"startHam",value:function(e){var t=this;l.debug("start HAM");var n=e,r={},o=this;this.debugEnabled?this.intervalId=setInterval((function(){"HRM"===n?(r.heartRate=Math.floor(150*Math.random()+50),r.rRInterval=0):"PEDOMETER"===n&&(r.stepStatus="WALKING",r.cumulativeTotalStepCount=Math.floor(150*Math.random()+50)),t.sendData({type:"data",feature:n,data:r})}),1e3):tizen.ppm.requestPermission("http://tizen.org/privilege/healthinfo",(function(){tizen.humanactivitymonitor.start(n,(function(e){"HRM"===n?(r.heartRate=e.heartRate,r.rRInterval=e.rRInterval):"PEDOMETER"===n&&(r.stepStatus=e.stepStatus,r.speed=e.speed,r.walkingFrequency=e.walkingFrequency,r.cumulativeDistance=e.cumulativeDistance,r.cumulativeCalorie=e.cumulativeCalorie,r.cumulativeTotalStepCount=e.cumulativeTotalStepCount,r.cumulativeWalkStepCount=e.cumulativeWalkStepCount,r.cumulativeRunStepCount=e.cumulativeRunStepCount,r.stepCountDifferences=e.stepCountDifferences.slice()),o.sendData({type:"data",feature:n,data:r})}))}),(function(e){return l.error("error: "+JSON.stringify(e))}))}},{key:"stopHam",value:function(e){tizen.humanactivitymonitor.stop(e)}},{key:"startGestureRecognition",value:function(){var e=this;if(!(this.listenerId>0))if(this.debugEnabled)this.intervalId=setInterval((function(){e.sendData({type:"data",feature:"GESTURE",data:{type:"GESTURE_WRIST_UP",event:"GESTURE_EVENT_DETECTED",timestamp:(new Date).getTime()}})}),3e3);else try{this.listenerId=tizen.humanactivitymonitor.addGestureRecognitionListener("GESTURE_WRIST_UP",(function(t){l.debug("Received "+t.event+" event on "+new Date(1e3*t.timestamp)+" for "+t.type+" type"),e.sendData({type:"data",feature:"GESTURE",data:{type:t.type,event:t.event,timestamp:t.timestamp}})}),(function(e){return l.error("error: "+JSON.stringify(e))}),!0),l.debug("Listener with id "+this.listenerId+" has been added")}catch(e){l.error("error: "+JSON.stringify(e))}}},{key:"stopGestureRecognition",value:function(){this.listenerId>0&&tizen.humanactivitymonitor.removeGestureRecognitionListener(this.listenerId)}}])&&s(t.prototype,n),r&&s(t,r),i}(i.Worker);t.HAMWorker=h},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.GUMWorker=void 0;var o=n(62),i=a(n(1)),s=a(n(93));function a(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var y=new i.default("gum.js"),g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(i,e);var t,n,r,o=h(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,e)).mediaStream=null,t}return t=i,(n=[{key:"checkCapability",value:function(){var e=this;return y.debug("checkCapability"),"undefined"!=typeof android&&alert(RTCRtpSender.getCapabilities("video")),this.debugEnabled?(this.features.add("CAMERA"),this.features.add("MIC"),this.features):new Promise((function(t,n){navigator.mediaDevices.enumerateDevices().then((function(n){n.forEach((function(t){"videoinput"===t.kind&&e.features.add("CAMERA"),"audioinput"===t.kind&&e.features.add("MIC")})),t(e.features)})).catch((function(t){y.error("err.code: "+t.code),y.error(t.name+": "+t.message),n(e.features)}))})).catch((function(t){return e.features}))}},{key:"handleMessage",value:function(e){var t=this;if("start"===e.type)this.requestConfirmation(e.feature,e.clientId,e.deviceName).then((function(n){n?t.startGum(e.arguments[0],e.feature):t.sendData({type:"error",feature:e.feature,error:{message:"Permission denied",name:"NotAllowedError"}})}));else if("applyConstraints"===e.type)this.applyConstraints(e.constraints,e.feature);else if("stopTrack"===e.type){var n=this.peerConnection.getTransceivers().find((function(t){return t.sender&&t.sender.track.id===e.trackId}));n&&n.sender?(n.sender.track.stop(),n.stop(),this.peerConnection.removeTrack(n.sender)):y.log("Failed to stopTrack() "+e.trackId)}}},{key:"setPreferredCodecs",value:function(e,t){var n=this.peerConnection.getTransceivers().find((function(t){return t.sender&&t.sender.track===e}));n?(t=s.default.getPreferredCodecs(t),n.direction="sendonly",n.setCodecPreferences(t)):(y.warn("Can't find transceiver for "+e.label),y.debug(JSON.stringify(e)))}},{key:"getStream",value:function(e,t,n){var r=this;y.debug("getStream feature:".concat(n," ").concat(e.id));var o,i=c(e.getTracks());try{for(i.s();!(o=i.n()).done;){var s=o.value;"video"===s.kind?y.info("[Track:video]"+" ".concat(s.label)+", size:".concat(s.getSettings().width,"x").concat(s.getSettings().height)+", frameRate:".concat(s.getSettings().frameRate)):console.info("[Track:".concat(s.kind,"] id:").concat(s.id)),y.debug("track:".concat(JSON.stringify(s))),y.debug("settings:".concat(JSON.stringify(s.getSettings()))),y.debug("constraints:".concat(JSON.stringify(s.getConstraints()))),y.debug("capabilities:".concat(JSON.stringify(s.getCapabilities())))}}catch(e){i.e(e)}finally{i.f()}if(this.mediaStream=e,e.peerConnection=this.peerConnection,e.onaddtrack=function(e){return y.debug("onaddtrack"+JSON.stringify(e))},e.onremovetrack=function(e){return y.debug("onremovetrack"+JSON.stringify(e))},e.onactive=function(e){return y.debug("onactive"+JSON.stringify(e))},e.oninactive=function(e){return y.debug("oninactive"+JSON.stringify(e))},e.getTracks().forEach((function(t){r.peerConnection.addTrack(t,e)})),t.offload&&t.offload.videoCodecs&&this.setPreferredCodecs(e.getVideoTracks()[0],t.offload.videoCodecs),"CAMERA"===n){var a=e.getVideoTracks()[0];if(void 0===a.getCapabilities){if(void 0===a.getConstraints)throw new Error("getCapabilities is not supported");a.getCapabilities=a.getConstraints}this.sendData({type:"data",feature:n,data:{capabilities:a.getCapabilities(),settings:a.getSettings(),constraints:a.getConstraints()}})}offloadWorker.impl.emit("stream",e)}},{key:"startGum",value:function(e,t){var n=this;y.debug("startGum constraints:".concat(JSON.stringify(e)," feature:").concat(t)),this.debugEnabled?navigator.mediaDevices.getDisplayMedia({video:!0}).then((function(r){return n.getStream(r,e,t)})).catch((function(e){y.error("error: "+e)})):navigator.mediaDevices.getUserMedia(e).then((function(r){return n.getStream(r,e,t)})).catch((function(e){y.error("error: "+e),n.sendData({type:"error",feature:t,error:{message:e.message,name:e.name}})}))}},{key:"applyConstraints",value:function(e,t){var n=this;y.debug("applyConstraints ".concat(JSON.stringify(e)," feature:").concat(t));var r=this.mediaStream.getVideoTracks()[0];r.applyConstraints(e).then((function(){n.sendData({type:"applyConstraints",feature:t,result:"success",data:{settings:r.getSettings(),constraints:r.getConstraints()}})})).catch((function(e){n.sendData({type:"applyConstraints",feature:t,result:"error",error:{message:e.message,name:e.name}})}))}}])&&f(t.prototype,n),r&&f(t,r),i}(o.Worker);t.GUMWorker=g},function(e,t,n){"use strict";var r;function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,s=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw s}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=new(((r=n(1))&&r.__esModule?r:{default:r}).default)("codec-helper.js"),c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"getPreferredCodecs",value:function(e){Array.isArray(e)||(e=[e]);var t=[];if(e.length>0){var n,r=RTCRtpSender.getCapabilities("video").codecs,i=o(e);try{var s=function(){var e=n.value;r=r.filter((function(n){return!n.mimeType.match(new RegExp(e,"i"))||(t.push(n),!1)}))};for(i.s();!(n=i.n()).done;)s()}catch(e){i.e(e)}finally{i.f()}var c,u="",f=o(t=t.concat(r));try{for(f.s();!(c=f.n()).done;){var l=c.value;-1===u.indexOf(l.mimeType)&&(u+=l.mimeType+", ")}}catch(e){f.e(e)}finally{f.f()}a.info("codec order : "+u)}return t}}],(n=null)&&s(t.prototype,n),r&&s(t,r),e}();t.default=c},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.SensorWorker=void 0;var o,i=n(62);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=new(((o=n(1))&&o.__esModule?o:{default:o}).default)("sensor.js"),h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(i,e);var t,n,r,o=c(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,e))._sensor=null,t}return t=i,(n=[{key:"checkCapability",value:function(){return l.debug("checkCapability sensor"),"undefined"!=typeof tizen&&tizen.sensorservice&&this.features.add("SENSOR"),this.debugEnabled?(this.features.add("SENSOR"),this.features):this.features}},{key:"handleMessage",value:function(e){"start"===e.arguments[0]?this._start(e.arguments[1]):"stop"===e.arguments[0]?this._stop():"getSensorData"===e.arguments[0]&&this._getSensorData(e.arguments[1])}},{key:"_getSensorData",value:function(e){l.debug("getSensorData:"+e);var t=this;this._sensor["get".concat(e,"SensorData")]((function(e){l.debug("successCallback:"+JSON.stringify(e)),t.sendData({type:"data",feature:"SENSOR",data:e})}))}},{key:"_start",value:function(e){var t=this;l.debug("startSensor: "+e);var n=this;try{this._sensor=tizen.sensorservice.getDefaultSensor(e),this._sensor.start((function(){l.debug("successCallback"),n.sendData({type:"data",feature:"SENSOR"})}),(function(e){l.error("errorCallback: "+JSON.stringify(e.message)),n.sendData({type:"error",feature:"SENSOR",error:{name:e.name,message:e.message}})}))}catch(e){l.error("error: "+JSON.stringify(e.message)),setTimeout((function(){t.sendData({type:"error",feature:"SENSOR",error:{message:e.message,name:e.name}})}),1e3)}}},{key:"_stop",value:function(){l.debug("stopSensor"),this._sensor&&this._sensor.stop(),this._sensor=null}}])&&s(t.prototype,n),r&&s(t,r),i}(i.Worker);t.SensorWorker=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OffloadWorker=void 0;var r,o=n(61);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}new(((r=n(1))&&r.__esModule?r:{default:r}).default)("offload-worker.js").info("offloadWorker version: ".concat(o.version));var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._impl=t,this.version=o.version}var t,n,r;return t=e,(n=[{key:"connect",value:function(e,t){this._impl.connect(e,t)}},{key:"on",value:function(e,t){this._impl.on(e,t)}},{key:"onConfirmationResult",value:function(e,t){this._impl.onConfirmationResult(e,t)}},{key:"checkCapability",value:function(){this._impl.checkCapability()}},{key:"impl",get:function(){return this._impl}}])&&i(t.prototype,n),r&&i(t,r),e}();t.OffloadWorker=s}]).default;
\ No newline at end of file
@@ -30,11 +30,11 @@ function makeLogMessage(message, level) {
   message =
     typeof message === 'object'
       ? JSON.stringify(message)
-      : message.replace(/(\w+:\w+:[\w-_.]+|\%c)/g, '').trim();
+      : message.replace(/(\w+:\w+:[\w-_.]+|%c)/g, '').trim();
   return (
     `<span style="color:${color[level]}">` +
     `${timeFormat(now)} ${message}` +
-    `</span><br>`
+    '</span><br>'
   );
 }
 
@@ -46,55 +46,11 @@ function setLogElement(targetId) {
 
   Object.keys(console).forEach(level => {
     console[level] = function (...params) {
-      log.innerHTML += makeLogMessage(params[0], level);
+      log.innerHTML += makeLogMessage(params[params.length - 1], level);
       this.apply(this, params);
     }.bind(console[level]);
   });
 }
 
-function toString(object, maxDepth, maxLength, depth) {
-  depth = depth || 0;
-  maxDepth = maxDepth || 3;
-  maxLength = maxLength || 120;
-  let str;
-  if (depth++ >= maxDepth) {
-    return object;
-  }
-  if (Array.isArray(object)) {
-    str = '[\n';
-    for (const key of object) {
-      str += `${' '.repeat(depth)}${toString(
-        key,
-        maxDepth,
-        maxLength,
-        depth
-      )},\n`;
-    }
-    str += `${' '.repeat(depth - 1)}]`;
-  } else if (typeof object === 'object') {
-    str = '{\n';
-    // eslint-disable-next-line guard-for-in
-    for (const key in object) {
-      str += `${' '.repeat(depth)}${key}:${toString(
-        object[key],
-        maxDepth,
-        maxLength,
-        depth
-      )},\n`;
-    }
-    str += `${' '.repeat(depth - 1)}}`;
-  } else if (typeof object === 'string') {
-    str = `'${object}'`;
-  } else if (typeof object === 'function') {
-    str = `<<function>>`;
-  } else {
-    str = `${object}`;
-  }
-  if (str.length < maxLength) {
-    str = str.replace(/\n */g, ' ');
-  }
-  return str;
-}
-
 // Print console log to offloadingText Element
 setLogElement('offloadLogText');
@@ -121,6 +121,10 @@ offloadWorker.on('stream', stream => {
   }
 });
 
+if (typeof offloadComputingWorker !== 'undefined') {
+  offloadComputingWorker.initialize(offloadWorker);
+}
+
 const params = new URLSearchParams(document.location.search);
 let serverUrl = params.get('server');
 if (serverUrl === null && location.protocol !== 'file:') {
diff --git a/device_home/signaling_server/gen/public/offload-worker/offload-worker.js b/device_home/signaling_server/gen/public/offload-worker/offload-worker.js
new file mode 100644 (file)
index 0000000..197d7de
--- /dev/null
@@ -0,0 +1,9134 @@
+window["offload-worker"]=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=843)}([function(e,t,n){"use strict";n.d(t,"Zc",(function(){return q.a})),n.d(t,"ad",(function(){return q.b})),n.d(t,"Td",(function(){return Ve.a})),n.d(t,"Zd",(function(){return Ve.b})),n.d(t,"kd",(function(){return We.a})),n.d(t,"ld",(function(){return We.b})),n.d(t,"pd",(function(){return We.c})),n.d(t,"qd",(function(){return We.d})),n.d(t,"rd",(function(){return We.e})),n.d(t,"sd",(function(){return We.f})),n.d(t,"td",(function(){return We.g})),n.d(t,"ud",(function(){return We.h})),n.d(t,"xd",(function(){return We.i})),n.d(t,"Ad",(function(){return We.j})),n.d(t,"Bd",(function(){return We.k})),n.d(t,"Hd",(function(){return We.n})),n.d(t,"Id",(function(){return We.o})),n.d(t,"Ld",(function(){return We.p})),n.d(t,"Md",(function(){return We.q})),n.d(t,"Nd",(function(){return We.r})),n.d(t,"Od",(function(){return We.s})),n.d(t,"Qd",(function(){return We.u})),n.d(t,"Rd",(function(){return We.v})),n.d(t,"Sd",(function(){return We.x})),n.d(t,"Ud",(function(){return We.y})),n.d(t,"Vd",(function(){return We.z})),n.d(t,"Wd",(function(){return We.A})),n.d(t,"Yd",(function(){return We.B})),n.d(t,"be",(function(){return We.C})),n.d(t,"Dd",(function(){return We.m})),n.d(t,"yd",(function(){return Ge.b})),n.d(t,"Xd",(function(){return Ge.f})),n.d(t,"wd",(function(){return Ge.a})),n.d(t,"Fd",(function(){return Ge.d})),n.d(t,"Cd",(function(){return Ge.c})),n.d(t,"Jd",(function(){return Ge.e})),n.d(t,"Kd",(function(){return me.d})),n.d(t,"zd",(function(){return l.b})),n.d(t,"od",(function(){return o})),n.d(t,"Ed",(function(){return r})),n.d(t,"ae",(function(){return Ue})),n.d(t,"md",(function(){return s})),n.d(t,"nd",(function(){return he})),n.d(t,"Pd",(function(){return a})),n.d(t,"vd",(function(){return Xt})),n.d(t,"Gd",(function(){return u})),n.d(t,"vb",(function(){return Zt.b})),n.d(t,"M",(function(){return Zt.a})),n.d(t,"a",(function(){return fe.a})),n.d(t,"b",(function(){return fe.b})),n.d(t,"c",(function(){return fe.c})),n.d(t,"d",(function(){return fe.d})),n.d(t,"e",(function(){return fe.e})),n.d(t,"f",(function(){return fe.f})),n.d(t,"g",(function(){return fe.g})),n.d(t,"h",(function(){return fe.h})),n.d(t,"i",(function(){return fe.i})),n.d(t,"j",(function(){return fe.j})),n.d(t,"k",(function(){return fe.k})),n.d(t,"l",(function(){return fe.l})),n.d(t,"n",(function(){return fe.n})),n.d(t,"m",(function(){return fe.m})),n.d(t,"o",(function(){return fe.o})),n.d(t,"r",(function(){return fe.r})),n.d(t,"p",(function(){return fe.p})),n.d(t,"q",(function(){return fe.q})),n.d(t,"s",(function(){return fe.s})),n.d(t,"t",(function(){return fe.t})),n.d(t,"u",(function(){return fe.u})),n.d(t,"v",(function(){return fe.v})),n.d(t,"w",(function(){return fe.w})),n.d(t,"x",(function(){return fe.x})),n.d(t,"y",(function(){return fe.y})),n.d(t,"z",(function(){return fe.z})),n.d(t,"A",(function(){return fe.A})),n.d(t,"B",(function(){return fe.B})),n.d(t,"C",(function(){return fe.C})),n.d(t,"D",(function(){return fe.D})),n.d(t,"E",(function(){return fe.E})),n.d(t,"F",(function(){return fe.F})),n.d(t,"G",(function(){return fe.G})),n.d(t,"H",(function(){return fe.H})),n.d(t,"I",(function(){return fe.I})),n.d(t,"J",(function(){return fe.J})),n.d(t,"L",(function(){return fe.L})),n.d(t,"K",(function(){return fe.K})),n.d(t,"N",(function(){return fe.M})),n.d(t,"O",(function(){return fe.N})),n.d(t,"P",(function(){return fe.O})),n.d(t,"Q",(function(){return fe.P})),n.d(t,"R",(function(){return fe.Q})),n.d(t,"S",(function(){return fe.R})),n.d(t,"T",(function(){return fe.S})),n.d(t,"jc",(function(){return fe.hc})),n.d(t,"U",(function(){return fe.T})),n.d(t,"V",(function(){return fe.U})),n.d(t,"W",(function(){return fe.V})),n.d(t,"Y",(function(){return fe.X})),n.d(t,"X",(function(){return fe.W})),n.d(t,"Z",(function(){return fe.Y})),n.d(t,"ab",(function(){return fe.Z})),n.d(t,"bb",(function(){return fe.ab})),n.d(t,"cb",(function(){return fe.bb})),n.d(t,"db",(function(){return fe.cb})),n.d(t,"eb",(function(){return fe.db})),n.d(t,"fb",(function(){return fe.eb})),n.d(t,"gb",(function(){return fe.fb})),n.d(t,"ib",(function(){return fe.hb})),n.d(t,"mb",(function(){return fe.lb})),n.d(t,"lb",(function(){return fe.kb})),n.d(t,"nb",(function(){return fe.mb})),n.d(t,"ob",(function(){return fe.nb})),n.d(t,"qb",(function(){return fe.pb})),n.d(t,"pb",(function(){return fe.ob})),n.d(t,"rb",(function(){return fe.qb})),n.d(t,"sb",(function(){return fe.rb})),n.d(t,"tb",(function(){return fe.sb})),n.d(t,"ub",(function(){return fe.tb})),n.d(t,"yb",(function(){return fe.wb})),n.d(t,"zb",(function(){return fe.xb})),n.d(t,"Ab",(function(){return fe.yb})),n.d(t,"Bb",(function(){return fe.zb})),n.d(t,"Cb",(function(){return fe.Ab})),n.d(t,"Db",(function(){return fe.Bb})),n.d(t,"Eb",(function(){return fe.Cb})),n.d(t,"Fb",(function(){return fe.Db})),n.d(t,"Gb",(function(){return fe.Eb})),n.d(t,"wb",(function(){return fe.ub})),n.d(t,"xb",(function(){return fe.vb})),n.d(t,"Hb",(function(){return fe.Fb})),n.d(t,"Nb",(function(){return fe.Lb})),n.d(t,"Ib",(function(){return fe.Gb})),n.d(t,"Lb",(function(){return fe.Jb})),n.d(t,"Jb",(function(){return fe.Hb})),n.d(t,"Kb",(function(){return fe.Ib})),n.d(t,"Mb",(function(){return fe.Kb})),n.d(t,"Ob",(function(){return fe.Mb})),n.d(t,"Pb",(function(){return fe.Nb})),n.d(t,"Qb",(function(){return fe.Ob})),n.d(t,"Rb",(function(){return fe.Pb})),n.d(t,"Sb",(function(){return fe.Qb})),n.d(t,"Tb",(function(){return fe.Rb})),n.d(t,"Ub",(function(){return fe.Sb})),n.d(t,"Vb",(function(){return fe.Tb})),n.d(t,"Zb",(function(){return fe.Xb})),n.d(t,"Wb",(function(){return fe.Ub})),n.d(t,"Xb",(function(){return fe.Vb})),n.d(t,"Yb",(function(){return fe.Wb})),n.d(t,"bc",(function(){return fe.Zb})),n.d(t,"ac",(function(){return fe.Yb})),n.d(t,"cc",(function(){return fe.ac})),n.d(t,"dc",(function(){return fe.bc})),n.d(t,"ec",(function(){return fe.cc})),n.d(t,"fc",(function(){return fe.dc})),n.d(t,"gc",(function(){return fe.ec})),n.d(t,"hc",(function(){return fe.fc})),n.d(t,"ic",(function(){return fe.gc})),n.d(t,"kc",(function(){return fe.ic})),n.d(t,"lc",(function(){return fe.jc})),n.d(t,"nc",(function(){return fe.lc})),n.d(t,"qc",(function(){return fe.oc})),n.d(t,"rc",(function(){return fe.pc})),n.d(t,"oc",(function(){return fe.mc})),n.d(t,"pc",(function(){return fe.nc})),n.d(t,"mc",(function(){return fe.kc})),n.d(t,"sc",(function(){return fe.qc})),n.d(t,"uc",(function(){return fe.sc})),n.d(t,"vc",(function(){return fe.tc})),n.d(t,"wc",(function(){return fe.uc})),n.d(t,"xc",(function(){return fe.vc})),n.d(t,"yc",(function(){return fe.wc})),n.d(t,"Dc",(function(){return fe.Bc})),n.d(t,"Bc",(function(){return fe.zc})),n.d(t,"Cc",(function(){return fe.Ac})),n.d(t,"Ac",(function(){return fe.yc})),n.d(t,"zc",(function(){return fe.xc})),n.d(t,"Fc",(function(){return fe.Dc})),n.d(t,"Nc",(function(){return fe.Lc})),n.d(t,"Wc",(function(){return fe.Uc})),n.d(t,"Gc",(function(){return fe.Ec})),n.d(t,"Mc",(function(){return fe.Kc})),n.d(t,"Ec",(function(){return fe.Cc})),n.d(t,"Hc",(function(){return fe.Fc})),n.d(t,"Ic",(function(){return fe.Gc})),n.d(t,"Jc",(function(){return fe.Hc})),n.d(t,"Kc",(function(){return fe.Ic})),n.d(t,"Lc",(function(){return fe.Jc})),n.d(t,"Pc",(function(){return fe.Nc})),n.d(t,"Oc",(function(){return fe.Mc})),n.d(t,"Rc",(function(){return fe.Pc})),n.d(t,"Sc",(function(){return fe.Qc})),n.d(t,"Tc",(function(){return fe.Rc})),n.d(t,"Uc",(function(){return fe.Sc})),n.d(t,"Vc",(function(){return fe.Tc})),n.d(t,"Xc",(function(){return fe.Vc})),n.d(t,"Yc",(function(){return fe.Wc})),n.d(t,"bd",(function(){return fe.Xc})),n.d(t,"cd",(function(){return fe.Yc})),n.d(t,"dd",(function(){return fe.Zc})),n.d(t,"ed",(function(){return fe.ad})),n.d(t,"fd",(function(){return fe.bd})),n.d(t,"gd",(function(){return fe.cd})),n.d(t,"hd",(function(){return fe.dd})),n.d(t,"id",(function(){return fe.ed})),n.d(t,"Qc",(function(){return fe.Oc})),n.d(t,"hb",(function(){return fe.gb})),n.d(t,"tc",(function(){return fe.rc})),n.d(t,"jd",(function(){return fe.fd})),n.d(t,"jb",(function(){return fe.ib})),n.d(t,"kb",(function(){return fe.jb}));var r={};n.r(r),n.d(r,"copyModel",(function(){return B})),n.d(r,"listModels",(function(){return P})),n.d(r,"moveModel",(function(){return z})),n.d(r,"removeModel",(function(){return L})),n.d(r,"browserFiles",(function(){return Z})),n.d(r,"browserHTTPRequest",(function(){return ue})),n.d(r,"concatenateArrayBuffers",(function(){return d.d})),n.d(r,"decodeWeights",(function(){return d.e})),n.d(r,"encodeWeights",(function(){return d.f})),n.d(r,"fromMemory",(function(){return de})),n.d(r,"getLoadHandlers",(function(){return g})),n.d(r,"getModelArtifactsForJSON",(function(){return d.g})),n.d(r,"getModelArtifactsInfoForJSON",(function(){return d.h})),n.d(r,"getSaveHandlers",(function(){return m})),n.d(r,"http",(function(){return se})),n.d(r,"isHTTPScheme",(function(){return ae})),n.d(r,"loadWeights",(function(){return ne})),n.d(r,"registerLoadRouter",(function(){return f})),n.d(r,"registerSaveRouter",(function(){return h})),n.d(r,"weightsLoaderFactory",(function(){return re})),n.d(r,"withSaveHandler",(function(){return pe}));var o={};n.r(o),n.d(o,"fromPixelsAsync",(function(){return Oe})),n.d(o,"toPixels",(function(){return ke})),n.d(o,"fromPixels",(function(){return Se}));var a={};n.r(a),n.d(a,"assertParamsValid",(function(){return Te})),n.d(a,"maskToAxes",(function(){return Ce})),n.d(a,"computeOutShape",(function(){return Ee})),n.d(a,"stridesWithElidedDims",(function(){return Ie})),n.d(a,"getNormalizedAxes",(function(){return Ae})),n.d(a,"startIndicesWithElidedDims",(function(){return Re})),n.d(a,"stopIndicesWithElidedDims",(function(){return _e})),n.d(a,"stridesForAxis",(function(){return $e})),n.d(a,"startForAxis",(function(){return Fe})),n.d(a,"stopForAxis",(function(){return De})),n.d(a,"isSliceContinous",(function(){return Me})),n.d(a,"computeFlatOffset",(function(){return Pe})),n.d(a,"parseSliceParams",(function(){return Le})),n.d(a,"sliceInfo",(function(){return Be}));var i={};n.r(i),n.d(i,"segOpComputeOptimalWindowSize",(function(){return Wt})),n.d(i,"computeOutShape",(function(){return Gt})),n.d(i,"collectGatherOpShapeInfo",(function(){return Ht}));var s={};n.r(s),n.d(s,"axesAreInnerMostDims",(function(){return He.b})),n.d(s,"combineLocations",(function(){return He.c})),n.d(s,"computeOutAndReduceShapes",(function(){return He.d})),n.d(s,"expandShapeToKeepDim",(function(){return He.e})),n.d(s,"assertAxesAreInnerMostDims",(function(){return He.a})),n.d(s,"getAxesPermutation",(function(){return He.f})),n.d(s,"getUndoAxesPermutation",(function(){return He.h})),n.d(s,"getInnerMostAxes",(function(){return He.g})),n.d(s,"getBroadcastDims",(function(){return he.getBroadcastDims})),n.d(s,"getReductionAxes",(function(){return he.getReductionAxes})),n.d(s,"assertAndGetBroadcastShape",(function(){return he.assertAndGetBroadcastShape})),n.d(s,"assertParamsConsistent",(function(){return qe})),n.d(s,"computeOutShape",(function(){return Ke})),n.d(s,"computeDilation2DInfo",(function(){return Xe.e})),n.d(s,"computePool2DInfo",(function(){return Xe.f})),n.d(s,"computePool3DInfo",(function(){return Xe.g})),n.d(s,"computeConv2DInfo",(function(){return Xe.b})),n.d(s,"computeConv3DInfo",(function(){return Xe.c})),n.d(s,"computeDefaultPad",(function(){return Xe.d})),n.d(s,"tupleValuesAreOne",(function(){return Xe.j})),n.d(s,"eitherStridesOrDilationsAreOne",(function(){return Xe.i})),n.d(s,"convertConv2DDataFormat",(function(){return Xe.h})),n.d(s,"checkPadOnDimRoundingMode",(function(){return Xe.a})),n.d(s,"getFusedDyActivation",(function(){return Ye.c})),n.d(s,"getFusedBiasGradient",(function(){return Ye.b})),n.d(s,"applyActivation",(function(){return Ye.a})),n.d(s,"shouldFuse",(function(){return Ye.d})),n.d(s,"PARALLELIZE_THRESHOLD",(function(){return Qe})),n.d(s,"computeOptimalWindowSize",(function(){return Ze})),n.d(s,"slice_util",(function(){return a})),n.d(s,"upcastType",(function(){return Ve.b})),n.d(s,"getImageCenter",(function(){return Je})),n.d(s,"getReshaped",(function(){return et})),n.d(s,"getPermuted",(function(){return tt})),n.d(s,"getReshapedPermuted",(function(){return nt})),n.d(s,"getSliceBeginCoords",(function(){return rt})),n.d(s,"getSliceSize",(function(){return ot})),n.d(s,"prepareAndValidate",(function(){return at})),n.d(s,"validateUpdateShape",(function(){return it.c})),n.d(s,"validateInput",(function(){return it.b})),n.d(s,"calculateShapes",(function(){return it.a})),n.d(s,"SELU_SCALEALPHA",(function(){return st})),n.d(s,"SELU_SCALE",(function(){return ut})),n.d(s,"ERF_P",(function(){return ct})),n.d(s,"ERF_A1",(function(){return lt})),n.d(s,"ERF_A2",(function(){return dt})),n.d(s,"ERF_A3",(function(){return pt})),n.d(s,"ERF_A4",(function(){return ht})),n.d(s,"ERF_A5",(function(){return ft})),n.d(s,"warn",(function(){return mt.b})),n.d(s,"log",(function(){return mt.a})),n.d(s,"mergeRealAndImagArrays",(function(){return gt})),n.d(s,"splitRealAndImagArrays",(function(){return bt})),n.d(s,"complexWithEvenIndex",(function(){return yt})),n.d(s,"complexWithOddIndex",(function(){return vt})),n.d(s,"getComplexWithIndex",(function(){return xt})),n.d(s,"assignToTypedArray",(function(){return wt})),n.d(s,"exponents",(function(){return Ot})),n.d(s,"exponent",(function(){return kt})),n.d(s,"decodeEinsumEquation",(function(){return Tt})),n.d(s,"getEinsumPermutation",(function(){return Ct})),n.d(s,"checkEinsumDimSizes",(function(){return Et})),n.d(s,"getEinsumComputePath",(function(){return It})),n.d(s,"isIdentityPermutation",(function(){return jt})),n.d(s,"prepareSplitSize",(function(){return At})),n.d(s,"getSparseFillEmptyRowsIndicesDenseShapeMismatch",(function(){return Rt})),n.d(s,"getSparseFillEmptyRowsNegativeIndexErrorMessage",(function(){return _t})),n.d(s,"getSparseFillEmptyRowsOutOfRangeIndexErrorMessage",(function(){return $t})),n.d(s,"getSparseReshapeMultipleNegativeOneOutputDimErrorMessage",(function(){return Ft})),n.d(s,"getSparseReshapeNegativeOutputDimErrorMessage",(function(){return Dt})),n.d(s,"getSparseReshapeEmptyTensorZeroOutputDimErrorMessage",(function(){return Mt})),n.d(s,"getSparseReshapeInputOutputMultipleErrorMessage",(function(){return Pt})),n.d(s,"getSparseReshapeInputOutputMismatchErrorMessage",(function(){return Lt})),n.d(s,"getSparseSegmentReductionNegativeSegmentIdsErrorMessage",(function(){return Bt})),n.d(s,"getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage",(function(){return zt})),n.d(s,"getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage",(function(){return Ut})),n.d(s,"getSparseSegmentReductionIndicesOutOfRangeErrorMessage",(function(){return Vt})),n.d(s,"segment_util",(function(){return i})),n.d(s,"fromUint8ToStringArray",(function(){return qt})),n.d(s,"fromStringArrayToUint8",(function(){return Kt}));var u={};n.r(u),n.d(u,"nonMaxSuppressionV3Impl",(function(){return Yt.a})),n.d(u,"nonMaxSuppressionV4Impl",(function(){return Yt.b})),n.d(u,"nonMaxSuppressionV5Impl",(function(){return Yt.c})),n.d(u,"whereImpl",(function(){return Qt.a}));var c=n(5),l=(n(333),n(19)),d=n(58);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class p{constructor(){this.saveRouters=[],this.loadRouters=[]}static getInstance(){return null==p.instance&&(p.instance=new p),p.instance}static registerSaveRouter(e){p.getInstance().saveRouters.push(e)}static registerLoadRouter(e){p.getInstance().loadRouters.push(e)}static getSaveHandlers(e){return p.getHandlers(e,"save")}static getLoadHandlers(e,t){return p.getHandlers(e,"load",t)}static getHandlers(e,t,n){const r=[];return("load"===t?p.getInstance().loadRouters:p.getInstance().saveRouters).forEach(t=>{const o=t(e,n);null!==o&&r.push(o)}),r}}const h=e=>p.registerSaveRouter(e),f=e=>p.registerLoadRouter(e),m=e=>p.getSaveHandlers(e),g=(e,t)=>p.getLoadHandlers(e,t)
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */;function b(){if(!Object(l.b)().getBool("IS_BROWSER"))throw new Error("Failed to obtain IndexedDB factory because the current environmentis not a web browser.");const e="undefined"==typeof window?self:window,t=e.indexedDB||e.mozIndexedDB||e.webkitIndexedDB||e.msIndexedDB||e.shimIndexedDB;if(null==t)throw new Error("The current browser does not appear to support IndexedDB.");return t}function y(e){const t=e.result;t.createObjectStore("models_store",{keyPath:"modelPath"}),t.createObjectStore("model_info_store",{keyPath:"modelPath"})}class v{constructor(e){if(this.indexedDB=b(),null==e||!e)throw new Error("For IndexedDB, modelPath must not be null, undefined or empty.");this.modelPath=e}async save(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");return this.databaseAction(this.modelPath,e)}async load(){return this.databaseAction(this.modelPath)}databaseAction(e,t){return new Promise((e,n)=>{const r=this.indexedDB.open("tensorflowjs",1);r.onupgradeneeded=()=>y(r),r.onsuccess=()=>{const o=r.result;if(null==t){const t=o.transaction("models_store","readonly"),r=t.objectStore("models_store").get(this.modelPath);r.onsuccess=()=>{if(null==r.result)return o.close(),n(new Error(`Cannot find model with path '${this.modelPath}' in IndexedDB.`));e(r.result.modelArtifacts)},r.onerror=e=>(o.close(),n(r.error)),t.oncomplete=()=>o.close()}else{const r=Object(d.h)(t),a=o.transaction("model_info_store","readwrite");let i=a.objectStore("model_info_store");const s=i.put({modelPath:this.modelPath,modelArtifactsInfo:r});let u;s.onsuccess=()=>{u=o.transaction("models_store","readwrite");const s=u.objectStore("models_store").put({modelPath:this.modelPath,modelArtifacts:t,modelArtifactsInfo:r});s.onsuccess=()=>e({modelArtifactsInfo:r}),s.onerror=e=>{i=a.objectStore("model_info_store");const t=i.delete(this.modelPath);t.onsuccess=()=>(o.close(),n(s.error)),t.onerror=e=>(o.close(),n(s.error))}},s.onerror=e=>(o.close(),n(s.error)),a.oncomplete=()=>{null==u?o.close():u.oncomplete=()=>o.close()}}},r.onerror=e=>n(r.error)})}}v.URL_SCHEME="indexeddb://";const x=e=>{return Object(l.b)().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(v.URL_SCHEME)?(t=e.slice(v.URL_SCHEME.length),new v(t)):null;var t};p.registerSaveRouter(x),p.registerLoadRouter(x);class w{constructor(){this.indexedDB=b()}async listModels(){return new Promise((e,t)=>{const n=this.indexedDB.open("tensorflowjs",1);n.onupgradeneeded=()=>y(n),n.onsuccess=()=>{const r=n.result,o=r.transaction("model_info_store","readonly"),a=o.objectStore("model_info_store").getAll();a.onsuccess=()=>{const t={};for(const e of a.result)t[e.modelPath]=e.modelArtifactsInfo;e(t)},a.onerror=e=>(r.close(),t(a.error)),o.oncomplete=()=>r.close()},n.onerror=e=>t(n.error)})}async removeModel(e){var t;return e=(t=e).startsWith(v.URL_SCHEME)?t.slice(v.URL_SCHEME.length):t,new Promise((t,n)=>{const r=this.indexedDB.open("tensorflowjs",1);r.onupgradeneeded=()=>y(r),r.onsuccess=()=>{const o=r.result,a=o.transaction("model_info_store","readwrite"),i=a.objectStore("model_info_store"),s=i.get(e);let u;s.onsuccess=()=>{if(null==s.result)return o.close(),n(new Error(`Cannot find model with path '${e}' in IndexedDB.`));{const r=i.delete(e),a=()=>{u=o.transaction("models_store","readwrite");const r=u.objectStore("models_store").delete(e);r.onsuccess=()=>t(s.result.modelArtifactsInfo),r.onerror=e=>n(s.error)};r.onsuccess=a,r.onerror=e=>(a(),o.close(),n(s.error))}},s.onerror=e=>(o.close(),n(s.error)),a.oncomplete=()=>{null==u?o.close():u.oncomplete=()=>o.close()}},r.onerror=e=>n(r.error)})}}var O=n(9);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const k="tensorflowjs_models",S="info",T="model_topology",C="weight_specs",E="weight_data",I="model_metadata";function j(e){return{info:[k,e,S].join("/"),topology:[k,e,T].join("/"),weightSpecs:[k,e,C].join("/"),weightData:[k,e,E].join("/"),modelMetadata:[k,e,I].join("/")}}function N(e){for(const t of Object.values(e))window.localStorage.removeItem(t)}function A(e){const t=e.split("/");if(t.length<3)throw new Error("Invalid key format: "+e);return t.slice(1,t.length-1).join("/")}class R{constructor(e){if(!Object(l.b)().getBool("IS_BROWSER")||"undefined"==typeof window||void 0===window.localStorage)throw new Error("The current environment does not support local storage.");if(this.LS=window.localStorage,null==e||!e)throw new Error("For local storage, modelPath must not be null, undefined or empty.");this.modelPath=e,this.keys=j(this.modelPath)}async save(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");{const t=JSON.stringify(e.modelTopology),n=JSON.stringify(e.weightSpecs),r=Object(d.h)(e);try{this.LS.setItem(this.keys.info,JSON.stringify(r)),this.LS.setItem(this.keys.topology,t),this.LS.setItem(this.keys.weightSpecs,n),this.LS.setItem(this.keys.weightData,Object(d.a)(e.weightData));const o={format:e.format,generatedBy:e.generatedBy,convertedBy:e.convertedBy,signature:null!=e.signature?e.signature:void 0,userDefinedMetadata:null!=e.userDefinedMetadata?e.userDefinedMetadata:void 0,modelInitializer:null!=e.modelInitializer?e.modelInitializer:void 0,trainingConfig:null!=e.trainingConfig?e.trainingConfig:void 0};return this.LS.setItem(this.keys.modelMetadata,JSON.stringify(o)),{modelArtifactsInfo:r}}catch(e){throw N(this.keys),new Error(`Failed to save model '${this.modelPath}' to local storage: size quota being exceeded is a possible cause of this failure: modelTopologyBytes=${r.modelTopologyBytes}, weightSpecsBytes=${r.weightSpecsBytes}, weightDataBytes=${r.weightDataBytes}.`)}}}async load(){const e=JSON.parse(this.LS.getItem(this.keys.info));if(null==e)throw new Error(`In local storage, there is no model with name '${this.modelPath}'`);if("JSON"!==e.modelTopologyType)throw new Error("BrowserLocalStorage does not support loading non-JSON model topology yet.");const t={},n=JSON.parse(this.LS.getItem(this.keys.topology));if(null==n)throw new Error(`In local storage, the topology of model '${this.modelPath}' is missing.`);t.modelTopology=n;const r=JSON.parse(this.LS.getItem(this.keys.weightSpecs));if(null==r)throw new Error(`In local storage, the weight specs of model '${this.modelPath}' are missing.`);t.weightSpecs=r;const o=this.LS.getItem(this.keys.modelMetadata);if(null!=o){const e=JSON.parse(o);t.format=e.format,t.generatedBy=e.generatedBy,t.convertedBy=e.convertedBy,null!=e.signature&&(t.signature=e.signature),null!=e.userDefinedMetadata&&(t.userDefinedMetadata=e.userDefinedMetadata),null!=e.modelInitializer&&(t.modelInitializer=e.modelInitializer),null!=e.trainingConfig&&(t.trainingConfig=e.trainingConfig)}const a=this.LS.getItem(this.keys.weightData);if(null==a)throw new Error(`In local storage, the binary weight values of model '${this.modelPath}' are missing.`);return t.weightData=Object(d.b)(a),t}}R.URL_SCHEME="localstorage://";const _=e=>{return Object(l.b)().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(R.URL_SCHEME)?(t=e.slice(R.URL_SCHEME.length),new R(t)):null;var t};p.registerSaveRouter(_),p.registerLoadRouter(_);class ${constructor(){Object(O.b)(Object(l.b)().getBool("IS_BROWSER"),()=>"Current environment is not a web browser"),Object(O.b)("undefined"==typeof window||void 0!==window.localStorage,()=>"Current browser does not appear to support localStorage"),this.LS=window.localStorage}async listModels(){const e={},t=k+"/",n="/"+S;for(let r=0;r<this.LS.length;++r){const o=this.LS.key(r);if(o.startsWith(t)&&o.endsWith(n)){e[A(o)]=JSON.parse(this.LS.getItem(o))}}return e}async removeModel(e){var t;const n=j(e=(t=e).startsWith(R.URL_SCHEME)?t.slice(R.URL_SCHEME.length):t);if(null==this.LS.getItem(n.info))throw new Error(`Cannot find model at path '${e}'`);const r=JSON.parse(this.LS.getItem(n.info));return N(n),r}}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class F{constructor(){this.managers={}}static getInstance(){return null==F.instance&&(F.instance=new F),F.instance}static registerManager(e,t){Object(O.b)(null!=e,()=>"scheme must not be undefined or null."),e.endsWith("://")&&(e=e.slice(0,e.indexOf("://"))),Object(O.b)(e.length>0,()=>"scheme must not be an empty string.");const n=F.getInstance();Object(O.b)(null==n.managers[e],()=>`A model store manager is already registered for scheme '${e}'.`),n.managers[e]=t}static getManager(e){const t=this.getInstance().managers[e];if(null==t)throw new Error(`Cannot find model manager for scheme '${e}'`);return t}static getSchemes(){return Object.keys(this.getInstance().managers)}}function D(e){if(-1===e.indexOf("://"))throw new Error("The url string provided does not contain a scheme. Supported schemes are: "+F.getSchemes().join(","));return{scheme:e.split("://")[0],path:e.split("://")[1]}}async function M(e,t,n=!1){Object(O.b)(e!==t,()=>`Old path and new path are the same: '${e}'`);const r=p.getLoadHandlers(e);Object(O.b)(r.length>0,()=>`Copying failed because no load handler is found for source URL ${e}.`),Object(O.b)(r.length<2,()=>`Copying failed because more than one (${r.length}) load handlers for source URL ${e}.`);const o=r[0],a=p.getSaveHandlers(t);Object(O.b)(a.length>0,()=>`Copying failed because no save handler is found for destination URL ${t}.`),Object(O.b)(a.length<2,()=>`Copying failed because more than one (${r.length}) save handlers for destination URL ${t}.`);const i=a[0],s=D(e).scheme,u=D(e).path,c=s===D(e).scheme,l=await o.load();n&&c&&await F.getManager(s).removeModel(u);const d=await i.save(l);return n&&!c&&await F.getManager(s).removeModel(u),d.modelArtifactsInfo}async function P(){const e=F.getSchemes(),t={};for(const n of e){const e=await F.getManager(n).listModels();for(const r in e){t[n+"://"+r]=e[r]}}return t}async function L(e){const t=D(e);return F.getManager(t.scheme).removeModel(t.path)}async function B(e,t){return M(e,t,!1)}async function z(e,t){return M(e,t,!0)}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class U{fetch(e,t){return fetch(e,t)}now(){return performance.now()}encode(e,t){if("utf-8"!==t&&"utf8"!==t)throw new Error("Browser's encoder only supports utf-8, but got "+t);return null==this.textEncoder&&(this.textEncoder=new TextEncoder),this.textEncoder.encode(e)}decode(e,t){return new TextDecoder(t).decode(e)}}if(Object(l.b)().get("IS_BROWSER")){Object(l.b)().setPlatform("browser",new U);try{F.registerManager(R.URL_SCHEME,new $)}catch(e){}try{F.registerManager(v.URL_SCHEME,new w)}catch(e){}}n(891);var V=n(122),W=n(46),G=n(129),H=n(370),q=n(42);
+/**
+ * @license
+ * Copyright 2020 Google Inc. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+Object(c.b)();const K={buffer:V.a,cast:W.a,clone:G.a,print:H.a};Object(q.e)(K);function X(e){return new Promise(e=>setTimeout(e)).then(e)}class Y{constructor(e){if(!Object(l.b)().getBool("IS_BROWSER"))throw new Error("browserDownloads() cannot proceed because the current environment is not a browser.");e.startsWith(Y.URL_SCHEME)&&(e=e.slice(Y.URL_SCHEME.length)),null!=e&&0!==e.length||(e="model"),this.modelJsonFileName=e+".json",this.weightDataFileName=e+".weights.bin"}async save(e){if("undefined"==typeof document)throw new Error("Browser downloads are not supported in this environment since `document` is not present");const t=window.URL.createObjectURL(new Blob([e.weightData],{type:"application/octet-stream"}));if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserDownloads.save() does not support saving model topology in binary formats yet.");{const n=[{paths:["./"+this.weightDataFileName],weights:e.weightSpecs}],r=Object(d.i)(e,n),o=window.URL.createObjectURL(new Blob([JSON.stringify(r)],{type:"application/json"})),a=null==this.modelJsonAnchor?document.createElement("a"):this.modelJsonAnchor;if(a.download=this.modelJsonFileName,a.href=o,await X(()=>a.dispatchEvent(new MouseEvent("click"))),null!=e.weightData){const e=null==this.weightDataAnchor?document.createElement("a"):this.weightDataAnchor;e.download=this.weightDataFileName,e.href=t,await X(()=>e.dispatchEvent(new MouseEvent("click")))}return{modelArtifactsInfo:Object(d.h)(e)}}}}Y.URL_SCHEME="downloads://";class Q{constructor(e){if(null==e||e.length<1)throw new Error("When calling browserFiles, at least 1 file is required, but received "+e);this.jsonFile=e[0],this.weightsFiles=e.slice(1)}async load(){return new Promise((e,t)=>{const n=new FileReader;n.onload=n=>{const r=JSON.parse(n.target.result),o=r.modelTopology;if(null==o)return void t(new Error("modelTopology field is missing from file "+this.jsonFile.name));if(null==r.weightsManifest)return void t(new Error("weightManifest field is missing from file "+this.jsonFile.name));if(0===this.weightsFiles.length)return void e({modelTopology:o});const a=Object(d.g)(r,e=>this.loadWeights(e));e(a)},n.onerror=e=>t(`Failed to read model topology and weights manifest JSON from file '${this.jsonFile.name}'. BrowserFiles supports loading Keras-style tf.Model artifacts only.`),n.readAsText(this.jsonFile)})}loadWeights(e){const t=[],n=[];for(const r of e)t.push(...r.weights),n.push(...r.paths);const r=this.checkManifestAndWeightFiles(e),o=n.map(e=>this.loadWeightsFile(e,r[e]));return Promise.all(o).then(e=>[t,Object(d.d)(e)])}loadWeightsFile(e,t){return new Promise((n,r)=>{const o=new FileReader;o.onload=e=>{const t=e.target.result;n(t)},o.onerror=t=>r(`Failed to weights data from file of path '${e}'.`),o.readAsArrayBuffer(t)})}checkManifestAndWeightFiles(e){const t=[],n=this.weightsFiles.map(e=>Object(d.c)(e.name)),r={};for(const o of e)o.paths.forEach(e=>{const o=Object(d.c)(e);if(-1!==t.indexOf(o))throw new Error(`Duplicate file basename found in weights manifest: '${o}'`);if(t.push(o),-1===n.indexOf(o))throw new Error(`Weight file with basename '${o}' is not provided.`);r[e]=this.weightsFiles[n.indexOf(o)]});if(t.length!==this.weightsFiles.length)throw new Error(`Mismatch in the number of files in weights manifest (${t.length}) and the number of weight files provided (${this.weightsFiles.length}).`);return r}}function Z(e){return new Q(e)}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function J(e,t,n,r){!function(e){Object(O.b)(null!=e&&Array.isArray(e)&&e.length>0,()=>"promises must be a none empty array")}(e),function(e,t){Object(O.b)(e>=0&&e<=1,()=>"Progress fraction must be in range [0, 1], but got startFraction "+e),Object(O.b)(t>=0&&t<=1,()=>"Progress fraction must be in range [0, 1], but got endFraction "+t),Object(O.b)(t>=e,()=>`startFraction must be no more than endFraction, but got startFraction ${e} and endFraction `+t)}(n=null==n?0:n,r=null==r?1:r);let o=0;return Promise.all(e.map(a=>(a.then(a=>{const i=n+ ++o/e.length*(r-n);return t(i),a}),a)))}p.registerSaveRouter(e=>Object(l.b)().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(Y.URL_SCHEME)?function(e="model"){return new Y(e)}(e.slice(Y.URL_SCHEME.length)):null);var ee=n(345);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */async function te(e,t){null==t&&(t={});const n=null==t.fetchFunc?Object(l.b)().platform.fetch:t.fetchFunc,r=e.map(e=>n(e,t.requestInit,{isBinary:!0})),o=(null==t.onProgress?await Promise.all(r):await J(r,t.onProgress,0,.5)).map(e=>e.arrayBuffer());return null==t.onProgress?await Promise.all(o):await J(o,t.onProgress,.5,1)}async function ne(e,t="",n,r){return re(e=>te(e,{requestInit:r}))(e,t,n)}function re(e){return async(t,n="",r)=>{const o=t.map(()=>!1),a={},i=null!=r?r.map(()=>!1):[],s=[];if(t.forEach((e,t)=>{let n=0;e.weights.forEach(e=>{const u="quantization"in e?e.quantization.dtype:e.dtype,c=ee.a[u]*O.O(e.shape),l=()=>{o[t]=!0,null==a[t]&&(a[t]=[]),a[t].push({manifestEntry:e,groupOffset:n,sizeBytes:c})};null!=r?r.forEach((t,n)=>{t===e.name&&(l(),i[n]=!0)}):l(),s.push(e.name),n+=c})}),!i.every(e=>e)){const e=r.filter((e,t)=>!i[t]);throw new Error("Could not find weights in manifest with names: "+e.join(", ")+". \nManifest JSON has weights with names: "+s.join(", ")+".")}const u=o.reduce((e,t,n)=>(t&&e.push(n),e),[]),c=[];u.forEach(e=>{t[e].paths.forEach(e=>{const t=n+(n.endsWith("/")?"":"/")+e;c.push(t)})});const l=await e(c),p={};let h=0;return u.forEach(e=>{const n=t[e].paths.length;let r=0;for(let e=0;e<n;e++)r+=l[h+e].byteLength;const o=new ArrayBuffer(r),i=new Uint8Array(o);let s=0;for(let e=0;e<n;e++){const t=new Uint8Array(l[h+e]);i.set(t,s),s+=t.byteLength}a[e].forEach(e=>{const t=o.slice(e.groupOffset,e.groupOffset+e.sizeBytes),n=Object(d.e)(t,[e.manifestEntry]);for(const e in n)p[e]=n[e]}),h+=n}),p}}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class oe{constructor(e,t){if(this.DEFAULT_METHOD="POST",null==t&&(t={}),this.weightPathPrefix=t.weightPathPrefix,this.onProgress=t.onProgress,this.weightUrlConverter=t.weightUrlConverter,null!=t.fetchFunc?(Object(O.b)("function"==typeof t.fetchFunc,()=>"Must pass a function that matches the signature of `fetch` (see https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)"),this.fetch=t.fetchFunc):this.fetch=Object(l.b)().platform.fetch,Object(O.b)(null!=e&&e.length>0,()=>"URL path for http must not be null, undefined or empty."),Array.isArray(e)&&Object(O.b)(2===e.length,()=>`URL paths for http must have a length of 2, (actual length is ${e.length}).`),this.path=e,null!=t.requestInit&&null!=t.requestInit.body)throw new Error("requestInit is expected to have no pre-existing body, but has one.");this.requestInit=t.requestInit||{}}async save(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserHTTPRequest.save() does not support saving model topology in binary formats yet.");const t=Object.assign({method:this.DEFAULT_METHOD},this.requestInit);t.body=new FormData;const n=[{paths:["./model.weights.bin"],weights:e.weightSpecs}],r=Object(d.i)(e,n);t.body.append("model.json",new Blob([JSON.stringify(r)],{type:"application/json"}),"model.json"),null!=e.weightData&&t.body.append("model.weights.bin",new Blob([e.weightData],{type:"application/octet-stream"}),"model.weights.bin");const o=await this.fetch(this.path,t);if(o.ok)return{modelArtifactsInfo:Object(d.h)(e),responses:[o]};throw new Error("BrowserHTTPRequest.save() failed due to HTTP response status "+o.status+".")}async load(){const e=await this.fetch(this.path,this.requestInit);if(!e.ok)throw new Error(`Request to ${this.path} failed with status code `+e.status+". Please verify this URL points to the model JSON of the model to load.");let t;try{t=await e.json()}catch(e){let t=`Failed to parse model JSON of response from ${this.path}.`;throw this.path.endsWith(".pb")?t+=" Your path contains a .pb file extension. Support for .pb models have been removed in TensorFlow.js 1.0 in favor of .json models. You can re-convert your Python TensorFlow model using the TensorFlow.js 1.0 conversion scripts or you can convert your.pb models with the 'pb2json'NPM script in the tensorflow/tfjs-converter repository.":t+=" Please make sure the server is serving valid JSON for this request.",new Error(t)}const n=t.modelTopology,r=t.weightsManifest;if(null==n&&null==r)throw new Error(`The JSON from HTTP path ${this.path} contains neither model topology or manifest for weights.`);return Object(d.g)(t,e=>this.loadWeights(e))}async loadWeights(e){const t=Array.isArray(this.path)?this.path[1]:this.path,[n,r]=function(e){const t=e.lastIndexOf("/"),n=e.lastIndexOf("?"),r=e.substring(0,t),o=n>t?e.substring(n):"";return[r+"/",o]}(t),o=this.weightPathPrefix||n,a=[];for(const t of e)a.push(...t.weights);const i=[],s=[];for(const t of e)for(const e of t.paths)null!=this.weightUrlConverter?s.push(this.weightUrlConverter(e)):i.push(o+e+r);this.weightUrlConverter&&i.push(...await Promise.all(s));const u=await te(i,{requestInit:this.requestInit,fetchFunc:this.fetch,onProgress:this.onProgress});return[a,Object(d.d)(u)]}}function ae(e){return null!=e.match(oe.URL_SCHEME_REGEX)}oe.URL_SCHEME_REGEX=/^https?:\/\//;const ie=(e,t)=>{if("undefined"==typeof fetch&&(null==t||null==t.fetchFunc))return null;{let n=!0;if(n=Array.isArray(e)?e.every(e=>ae(e)):ae(e),n)return se(e,t)}return null};function se(e,t){return new oe(e,t)}function ue(e,t){return se(e,t)}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */p.registerSaveRouter(ie),p.registerLoadRouter(ie);class ce{constructor(e){this.modelArtifacts=e}async load(){return this.modelArtifacts}}class le{constructor(e){this.saveHandler=e}async save(e){return this.saveHandler(e)}}function de(e,t,n,r){if(1===arguments.length){return null!=e.modelTopology||null!=e.weightSpecs?new ce(e):(console.warn("Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release."),new ce({modelTopology:e}))}return console.warn("Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release."),new ce({modelTopology:e,weightSpecs:t,weightData:n,trainingConfig:r})}function pe(e){return new le(e)}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */var he=n(35),fe=n(6),me=n(141),ge=n(3),be=n(4),ye=n(393);
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+let ve;function xe(e,t=3){if(t>4)throw new Error("Cannot construct Tensor with more than 4 channels from pixels.");if(null==e)throw new Error("pixels passed to tf.browser.fromPixels() can not be null");let n=!1,r=!1,o=!1,a=!1,i=!1,s=!1;if(e.data instanceof Uint8Array)n=!0;else if("undefined"!=typeof ImageData&&e instanceof ImageData)r=!0;else if("undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement)o=!0;else if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement)a=!0;else if(null!=e.getContext)i=!0;else{if(!("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap))throw new Error("pixels passed to tf.browser.fromPixels() must be either an HTMLVideoElement, HTMLImageElement, HTMLCanvasElement, ImageData in browser, or OffscreenCanvas, ImageData in webworker or {data: Uint32Array, width: number, height: number}, but was "+e.constructor.name);s=!0}if(o){const t=2;if(o&&e.readyState<t)throw new Error("The video element has not loaded data yet. Please wait for `loadeddata` event on the <video> element.")}if(null!=Object(me.b)(fe.gb,c.a.backendName)){const n={pixels:e},r={numChannels:t};return c.a.runKernel(fe.gb,n,r)}const[u,l]=o?[e.videoWidth,e.videoHeight]:[e.width,e.height];let d,p;if(i)d=e.getContext("2d").getImageData(0,0,u,l).data;else if(r||n)d=e.data;else if(a||o||s){if(null==ve)if("undefined"==typeof document){if("undefined"==typeof OffscreenCanvas||"undefined"==typeof OffscreenCanvasRenderingContext2D)throw new Error("Cannot parse input in current context. Reason: OffscreenCanvas Context2D rendering is not supported.");ve=new OffscreenCanvas(1,1).getContext("2d")}else ve=document.createElement("canvas").getContext("2d");ve.canvas.width=u,ve.canvas.height=l,ve.drawImage(e,0,0,u,l),d=ve.getImageData(0,0,u,l).data}if(4===t)p=new Int32Array(d);else{const e=u*l;p=new Int32Array(e*t);for(let n=0;n<e;n++)for(let e=0;e<t;++e)p[n*t+e]=d[4*n+e]}const h=[l,u,t];return Object(ye.a)(p,h,"int32")}function we(e){return"undefined"!=typeof window&&"undefined"!=typeof ImageBitmap&&window.hasOwnProperty("createImageBitmap")&&!(e instanceof ImageBitmap)&&function(e){return null!=e&&0!==e.width&&0!==e.height}(e)&&!function(e){return null!=e&&e.data instanceof Uint8Array}(e)}async function Oe(e,t=3){let n=null;if(Object(l.b)().getBool("WRAP_TO_IMAGEBITMAP")&&we(e)){let t;try{t=await createImageBitmap(e,{premultiplyAlpha:"none"})}catch(e){t=null}n=null!=t&&t.width===e.width&&t.height===e.height?t:e}else n=e;return xe(n,t)}async function ke(e,t){let n=Object(ge.a)(e,"img","toPixels");if(!(e instanceof q.a)){const e=n;n=Object(W.a)(e,"int32"),e.dispose()}if(2!==n.rank&&3!==n.rank)throw new Error(`toPixels only supports rank 2 or 3 tensors, got rank ${n.rank}.`);const[r,o]=n.shape.slice(0,2),a=2===n.rank?1:n.shape[2];if(a>4||2===a)throw new Error("toPixels only supports depth of size 1, 3 or 4 but got "+a);if("float32"!==n.dtype&&"int32"!==n.dtype)throw new Error(`Unsupported type for toPixels: ${n.dtype}. Please use float32 or int32 tensors.`);const i=await n.data(),s="float32"===n.dtype?255:1,u=new Uint8ClampedArray(o*r*4);for(let e=0;e<r*o;++e){const t=[0,0,0,255];for(let r=0;r<a;r++){const o=i[e*a+r];if("float32"===n.dtype){if(o<0||o>1)throw new Error(`Tensor values for a float32 Tensor must be in the range [0 - 1] but encountered ${o}.`)}else if("int32"===n.dtype&&(o<0||o>255))throw new Error(`Tensor values for a int32 Tensor must be in the range [0 - 255] but encountered ${o}.`);1===a?(t[0]=o*s,t[1]=o*s,t[2]=o*s):t[r]=o*s}const r=4*e;u[r+0]=Math.round(t[0]),u[r+1]=Math.round(t[1]),u[r+2]=Math.round(t[2]),u[r+3]=Math.round(t[3])}if(null!=t){t.width=o,t.height=r;const e=t.getContext("2d"),n=new ImageData(u,o,r);e.putImageData(n,0,0)}return n!==e&&n.dispose(),u}const Se=Object(be.a)({fromPixels_:xe});
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Te(e,t,n){const r=e.shape.length;O.b(r===t.length,()=>`Error in slice${r}D: Length of begin ${t} must match the rank of the array (${r}).`),O.b(r===n.length,()=>`Error in slice${r}D: Length of size ${n} must match the rank of the array (${r}).`);for(let o=0;o<r;++o)O.b(t[o]+n[o]<=e.shape[o],()=>`Error in slice${r}D: begin[${o}] + size[${o}] (${t[o]+n[o]}) would overflow input.shape[${o}] (${e.shape[o]})`)}function Ce(e){const t=[];let n=0;for(;e>0;)1&e&&t.push(n),e/=2,n++;return t}function Ee(e,t,n){const r=[];for(let o=0;o<e.length;o++)r[o]=Math.ceil((t[o]-e[o])/n[o]);return r}function Ie(e,t,n,r){const o=[...e];for(let e=o.length;e<r.length;e++)o.push(1);for(let e=0;e<n;e++)0===e?o[t]=1:(o.splice(t,0,1),o.pop());return o}function je(e,t,n){return n<=e?n:n-(t-1)}function Ne(e,t){const n=[];for(let r=0;r<e;r++)n.push(t+r);return n}function Ae(e,t,n,r,o,a,i,s,u){const c=e.length;let l=new Array(c),d=new Array(c),p=new Array(c);if(t.length&&n>0){const u=t[0],c=n+1;l=Re(i,u,c,r,e),d=_e(s,u,c,o,e),p=Ie(a,u,c,e)}else for(let t=0;t<c;t++)l[t]=Fe(i,r,a,e,t,u),d[t]=De(s,o,a,e,t,u),p[t]=$e(a,t,u);return{begin:l,end:d,strides:p}}function Re(e,t,n,r,o){const a=[...o],i=Ne(n,t);for(let o=0;o<a.length;o++)if(i.indexOf(o)>-1)a[o]=0;else{const i=je(t,n,o);let s=r[i];e&1<<i&&(s=0),a[o]=s}return a}function _e(e,t,n,r,o){const a=[...o],i=Ne(n,t);for(let o=0;o<a.length;o++)if(i.indexOf(o)>-1)a[o]=Number.MAX_SAFE_INTEGER;else{const i=je(t,n,o);let s=r[i];e&1<<i&&(s=Number.MAX_SAFE_INTEGER),a[o]=s}for(let e=0;e<a.length;e++){const t=o[e];a[e]<0&&(a[e]+=t),a[e]=O.i(0,a[e],o[e])}return a}function $e(e,t,n){let r=e[t];return(n&1<<t||null==r)&&(r=1),r}function Fe(e,t,n,r,o,a){let i=t[o];const s=n[o]||1;(e&1<<o||a&1<<o||null==i)&&(i=s>0?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER);const u=r[o];return i<0&&(i+=u),i=O.i(0,i,u-1),i}function De(e,t,n,r,o,a){let i=t[o];const s=n[o]||1;(e&1<<o||a&1<<o||null==i)&&(i=s>0?Number.MAX_SAFE_INTEGER:Number.MIN_SAFE_INTEGER);const u=r[o];return i<0&&(i+=u),i=s>0?O.i(0,i,u):O.i(-1,i,u-1),i}function Me(e,t,n){let r=n.length;for(let e=0;e<n.length;e++)if(n[e]>1){r=e;break}for(let o=r+1;o<n.length;o++)if(t[o]>0||n[o]!==e[o])return!1;return!0}function Pe(e,t){let n=e.length>0?e[e.length-1]:1;for(let r=0;r<e.length-1;r++)n+=e[r]*t[r];return n}function Le(e,t,n){let r;const o=e.shape.length;let a;return r="number"==typeof t?[t,...new Array(o-1).fill(0)]:t.length<o?t.concat(new Array(o-t.length).fill(0)):t.slice(),r.forEach(e=>{O.b(-1!==e,()=>"slice() does not support negative begin indexing.")}),a=null==n?new Array(o).fill(-1):"number"==typeof n?[n,...new Array(o-1).fill(-1)]:n.length<o?n.concat(new Array(o-n.length).fill(-1)):n,a=a.map((t,n)=>t>=0?t:(O.b(-1===t,()=>`Negative size values should be exactly -1 but got ${t} for the slice() size at index ${n}.`),e.shape[n]-r[n])),[r,a]}function Be(e,t,n,r,o,a,i,s,u){let c;if(null==r?(c=new Array(t.length),c.fill(1)):c=r,null!=i&&0!=(i&i-1))throw new Error("Multiple ellipses in slice is not allowed.");let l=!1;const d={dims:c.length,numAddAxisAfterEllipsis:0,begin:t.slice(),end:n.slice(),strides:c.slice(),beginMask:o,endMask:a,ellipsisMask:i,newAxisMask:s,shrinkAxisMask:u};for(let e=0;e<d.dims;e++)l&&0!=(1<<e&s)&&d.numAddAxisAfterEllipsis++,1<<e&i&&(l=!0);l||(d.ellipsisMask|=1<<d.dims,d.dims++);const p={dims:e.length,beginMask:0,endMask:0,beginValid:!1,endValid:!1};!function(e,t){t.beginMask=0,t.endMask=0,t.shrinkAxisMask=0;let n=0;t.beginValid=null!=e.begin,t.endValid=null!=e.end,t.begin=new Array(t.dims),t.end=new Array(t.dims),t.strides=new Array(t.dims),t.finalShapeGatherIndices=[],t.finalShapeGatherIndicesSparse=[],t.inputShapeGatherIndicesSparse=new Array(t.dims);for(let r=0;r<e.dims;r++)if(1<<r&e.ellipsisMask){const o=Math.min(t.dims-(e.dims-r)+1+e.numAddAxisAfterEllipsis,t.dims);for(;n<o;n++)t.begin[n]=0,t.end[n]=0,t.strides[n]=1,t.beginMask|=1<<n,t.endMask|=1<<n,t.finalShapeGatherIndices.push(n),t.finalShapeGatherIndicesSparse.push(-1),t.inputShapeGatherIndicesSparse[n]=r}else if(1<<r&e.newAxisMask)t.finalShapeGatherIndices.push(-2),t.finalShapeGatherIndicesSparse.push(-1);else{if(n===t.begin.length)throw Error(`Index out of range using input dim ${n}; input has only ${t.dims} dims, ${t.begin.length}.`);null!=e.begin&&(t.begin[n]=e.begin[r]),null!=e.end&&(t.end[n]=e.end[r]),t.strides[n]=e.strides[r],e.beginMask&1<<r&&(t.beginMask|=1<<n),e.endMask&1<<r&&(t.endMask|=1<<n),e.shrinkAxisMask&1<<r?(t.finalShapeGatherIndices.push(-1),t.finalShapeGatherIndicesSparse.push(-1),t.shrinkAxisMask|=1<<n):(t.finalShapeGatherIndices.push(n),t.finalShapeGatherIndicesSparse.push(r)),t.inputShapeGatherIndicesSparse[n]=r,n++}}(d,p);let h=!0,f=!0,m=!0;const g=[],b=[];for(let t=0;t<e.length;++t){if(0===p.strides[t])throw Error(`strides[${t}] must be non-zero`);const n=!!(p.shrinkAxisMask&1<<t),r=e[t];if(-1===r){g.push(n?1:-1);continue}const o=[p.beginMask&1<<t,p.endMask&1<<t],a=[p.strides[t]>0?0:-1,p.strides[t]>0?r:r-1];if(n&&p.strides[t]<=0)throw Error("only stride 1 allowed on non-range indexing.");m=m&&1===p.strides[t];const i=!!(p.beginMask&1<<t&&p.endMask&1<<t);if(p.beginValid&&p.endValid){if(n){const e=p.begin[t]<0?r+p.begin[t]:p.begin[t];if(p.begin[t]=e,p.end[t]=p.begin[t]+1,e<0||e>=r)throw Error(`slice index ${p.begin[t]} of dimension ${t} out of bounds.`)}else p.begin[t]=ze(p.begin[t],0,p.strides[t],r,o,a),p.end[t]=ze(p.end[t],1,p.strides[t],r,o,a);const e=1===p.strides[t]&&0===p.begin[t]&&p.end[t]===r;h=h&&e,f=f&&(0===t&&1===p.strides[t]||e)}else h=h&&1===p.strides[t]&&i,f=f&&(0===t&&1===p.strides[t]||i);let s,u=!1;if(p.beginValid&&p.endValid?(s=p.end[t]-p.begin[t],u=!0):n?(s=1,u=!0):i&&r>=0&&(s=p.strides[t]<0?-r:r,u=!0),u){let e;e=0===s||s<0!=p.strides[t]<0?0:Math.trunc(s/p.strides[t])+(s%p.strides[t]!=0?1:0),g.push(e)}else g.push(-1)}for(let e=0;e<p.finalShapeGatherIndices.length;++e){const t=p.finalShapeGatherIndices[e];t>=0?b.push(g[t]):-2===t&&b.push(1)}return{finalShapeSparse:b.filter((e,t)=>-2!==p.finalShapeGatherIndices[t]),finalShape:b,isIdentity:h,sliceDim0:f,isSimpleSlice:m,begin:p.begin,end:p.end,strides:p.strides}}function ze(e,t,n,r,o,a){if(o[t])return n>0?a[t]:a[t+1&1];{const t=e<0?r+e:e;return t<a[0]?a[0]:t>a[1]?a[1]:t}}var Ue=n(13),Ve=n(187),We=n(715),Ge=n(380),He=n(189);
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function qe(e,t){const n=e[0].length;e.forEach((e,t)=>{O.b(e.length===n,()=>`Error in concat${n}D: rank of tensors[${t}] must be the same as the rank of the rest (${n})`)}),O.b(t>=0&&t<n,()=>`Error in concat${n}D: axis must be between 0 and ${n-1}.`);const r=e[0];e.forEach((e,o)=>{for(let a=0;a<n;a++)O.b(a===t||e[a]===r[a],()=>`Error in concat${n}D: Shape of tensors[${o}] (${e}) does not match the shape of the rest (${r}) along the non-concatenated axis ${o}.`)})}function Ke(e,t){const n=e[0].slice();for(let r=1;r<e.length;r++)n[t]+=e[r][t];return n}var Xe=n(37),Ye=n(76);
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const Qe=30;function Ze(e){return e<=Qe?e:Object(O.G)(e,Math.floor(Math.sqrt(e)))}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Je(e,t,n){return[n*("number"==typeof e?e:e[0]),t*("number"==typeof e?e:e[1])]}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function et(e,t,n,r=!0){let o=[];if(r)o=o.concat(t.slice(0)),o.push(e[0]/n),o=o.concat(e.slice(1));else{o=o.concat(e[0]);const n=t.length;for(let r=0;r<n;++r)o=o.concat([e[r+1]/t[r],t[r]]);o=o.concat(e.slice(n+1))}return o}function tt(e,t,n=!0){const r=[];if(n){r.push(t);for(let n=t+1;n<e;++n)n<=2*t?(r.push(n),r.push(n-(t+1))):r.push(n)}else{const n=[],o=[];for(let r=1;r<e;++r)r>=2*t+1||r%2==1?o.push(r):n.push(r);r.push(...n),r.push(0),r.push(...o)}return r}function nt(e,t,n,r=!0){const o=[];r?o.push(e[0]/n):o.push(e[0]*n);for(let n=1;n<e.length;++n)n<=t.length?r?o.push(t[n-1]*e[n]):o.push(e[n]/t[n-1]):o.push(e[n]);return o}function rt(e,t){const n=[0];for(let r=0;r<t;++r)n.push(e[r][0]);return n}function ot(e,t,n){const r=e.slice(0,1);for(let o=0;o<n;++o)r.push(e[o+1]-t[o][0]-t[o][1]);return r}function at(e,t){const n=e.shape.length,r=t.shape.length;if(n<1)throw new Error(`tf.gatherND() expects the input to be rank 1 or higher, but the rank was ${n}.`);if(r<1)throw new Error(`tf.gatherND() expects the indices to be rank 1 or higher, but the rank was ${r}.`);if("int32"!==t.dtype)throw new Error(`tf.gatherND() expects the indices to be int32 type, but the dtype was ${t.dtype}.`);if(t.shape[r-1]>n)throw new Error(`index innermost dimension length must be <= tensor rank; saw: ${t.shape[r-1]} vs. ${n}`);if(0===Object(O.O)(e.shape))throw new Error(`Requested more than 0 entries, but input is empty. Input shape: ${e.shape}.`);const o=t.shape,a=o[o.length-1];let i=1;for(let e=0;e<o.length-1;++e)i*=o[e];const s=e.shape,u=o.slice();u.pop();let c=1;for(let e=a;e<n;++e)c*=s[e],u.push(s[e]);const l=[...Object(O.j)(e.shape).map(e=>e/c),1].slice(0,a);return[u,i,c,l]}var it=n(262);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const st=1.7580993408473768,ut=1.0507009873554805,ct=.3275911,lt=.254829592,dt=-.284496736,pt=1.421413741,ht=-1.453152027,ft=1.061405429;var mt=n(140);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function gt(e,t){if(e.length!==t.length)throw new Error(`Cannot merge real and imag arrays of different lengths. real:${e.length}, imag: ${t.length}.`);const n=new Float32Array(2*e.length);for(let r=0;r<n.length;r+=2)n[r]=e[r/2],n[r+1]=t[r/2];return n}function bt(e){const t=new Float32Array(e.length/2),n=new Float32Array(e.length/2);for(let r=0;r<e.length;r+=2)t[r/2]=e[r],n[r/2]=e[r+1];return{real:t,imag:n}}function yt(e){const t=Math.ceil(e.length/4),n=new Float32Array(t),r=new Float32Array(t);for(let t=0;t<e.length;t+=4)n[Math.floor(t/4)]=e[t],r[Math.floor(t/4)]=e[t+1];return{real:n,imag:r}}function vt(e){const t=Math.floor(e.length/4),n=new Float32Array(t),r=new Float32Array(t);for(let t=2;t<e.length;t+=4)n[Math.floor(t/4)]=e[t],r[Math.floor(t/4)]=e[t+1];return{real:n,imag:r}}function xt(e,t){return{real:e[2*t],imag:e[2*t+1]}}function wt(e,t,n,r){e[2*r]=t,e[2*r+1]=n}function Ot(e,t){const n=new Float32Array(e/2),r=new Float32Array(e/2);for(let o=0;o<Math.ceil(e/2);o++){const a=(t?2:-2)*Math.PI*(o/e);n[o]=Math.cos(a),r[o]=Math.sin(a)}return{real:n,imag:r}}function kt(e,t,n){const r=(n?2:-2)*Math.PI*(e/t);return{real:Math.cos(r),imag:Math.sin(r)}}
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const St=/->/g;function Tt(e,t){const n=((e=e.replace(/\s/g,"")).length-e.replace(St,"").length)/"->".length;if(n<1)throw new Error("Equations without an arrow are not supported.");if(n>1)throw new Error('Equation must contain exactly one arrow ("->").');const[r,o]=e.split("->");Object(O.b)(-1===r.indexOf("..."),()=>'The ellipsis notation ("...") is not supported yet.');const a=r.split(","),i=a.length;if(t!==i)throw new Error(`Expected ${i} input tensors, received ${t}`);if(i>2)throw new Error("Support for more than 2 input tensors is not implemented yet.");const s=[];for(let e=0;e<o.length;++e){const t=o[e];if(!a.some(e=>-1!==e.indexOf(t)))throw new Error(`Output subscripts contain the label ${t} not present in the input subscripts.`);-1===s.indexOf(t)&&s.push(t)}for(let e=0;e<r.length;++e){const t=r[e];-1===s.indexOf(t)&&","!==t&&s.push(t)}const u=new Array(a.length);for(let e=0;e<i;++e){if(new Set(a[e].split("")).size!==a[e].length)throw new Error(`Found duplicate axes in input component ${a[e]}. Support for duplicate axes in input is not implemented yet.`);u[e]=[];for(let t=0;t<a[e].length;++t)u[e].push(s.indexOf(a[e][t]))}const c=s.length,l=[];for(let e=o.length;e<c;++e)l.push(e);return{allDims:s,summedDims:l,idDims:u}}function Ct(e,t){let n=new Array(e);n.fill(-1);for(let e=0;e<t.length;++e)n[t[e]]=e;const r=[];for(let t=0;t<e;++t)-1===n[t]&&r.push(t);return n=n.filter(e=>-1!==e),{permutationIndices:n,expandDims:r}}function Et(e,t,n){const r=new Array(e);for(let e=0;e<n.length;++e){const o=n[e].shape;for(let n=0;n<t[e].length;++n)void 0===r[t[e][n]]?r[t[e][n]]=o[n]:Object(O.b)(r[t[e][n]]===o[n],()=>`Expected dimension ${r[t[e][n]]} at axis ${n} of input shaped ${JSON.stringify(o)}, but got dimension `+o[n])}}function It(e,t){const n=e,r=[];let o=0;0===e.length&&n.push(-1),o=e.length+1;for(let e=0;e<o;++e)r.push([]);const a=[];for(let e=0;e<n.length;++e){const o=Nt(t,n[e]);for(const t of o)-1===a.indexOf(t)&&(r[e].push(t),a.push(t))}return{path:n,steps:r}}function jt(e){return e.every((e,t)=>e===t)}function Nt(e,t){const n=[];for(let r=0;r<e.length;++r)0!==e[r].length&&-1===e[r].indexOf(t)&&-1!==t||n.push(r);return n}function At(e,t,n=0){let r=[];if("number"==typeof t)Object(O.b)(e.shape[n]%t==0,()=>"Number of splits must evenly divide the axis."),r=new Array(t).fill(e.shape[n]/t);else{const o=t.reduce((e,t)=>(-1===t&&(e+=1),e),0);Object(O.b)(o<=1,()=>"There should be only one negative value in split array.");const a=t.indexOf(-1);if(-1!==a){const r=t.reduce((e,t)=>t>0?e+t:e);t[a]=e.shape[n]-r}Object(O.b)(e.shape[n]===t.reduce((e,t)=>e+t),()=>"The sum of sizes must match the size of the axis dimension."),r=t}return r}
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Rt(e){return"Received SparseTensor with denseShape[0] = 0 but\n  indices.shape[0] = "+e}function _t(e,t){return`indices(${e}, 0) is invalid: ${t} < 0`}function $t(e,t,n){return`indices(${e}, 0) is invalid: ${t} >= ${n}`}
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Ft(e,t){return`only one output dimension may be -1, not both ${e} and ${t}`}function Dt(e,t){return`size ${e} must be non-negative, not ${t}`}function Mt(){return"reshape cannot infer the missing input size for an empty tensor unless all specified input sizes are non-zero"}function Pt(e,t){return`Input to reshape is a SparseTensor with ${Object(O.O)(e)}\n  dense values, but the requested shape requires a multiple of ${Object(O.O)(t)}. inputShape=${e} outputShape= ${t}`}function Lt(e,t){return`Input to reshape is a tensor with ${Object(O.O)(e)} dense values, but the requested shape has ${Object(O.O)(t)}. inputShape=${e} outputShape=${t}`}
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Bt(){return"segment ids must be >= 0"}function zt(){return"segment ids are not increasing"}function Ut(e,t){return`Segment id ${e} out of range [0, ${t}), possibly because segmentIds input is not sorted.`}function Vt(e,t,n){return`Bad: indices[${e}] == ${t} out of range [0, ${n})`}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Wt(e,t){let n,r=!1;for(e<=Qe?(n=e,r=!0):n=Object(O.G)(e,Math.floor(Math.sqrt(e)));!r;)n>t||n===e?r=!0:n=Object(O.G)(e,n+1);return n}function Gt(e,t,n){const r=[],o=e.length;for(let a=0;a<o;a++)a!==t?r.push(e[a]):r.push(n);return r}function Ht(e,t,n,r){const o=t.shape.length,a=e.shape.length;if(0!==r&&(r<-o||r>o))throw new Error(`Expect batchDims in the range of [-${o}, ${o}], but got ${r}`);if(r<0&&(r+=o),r>a)throw new Error(`batchDims (${r}) must be less than rank(x) (\n    ${a}).`);if(n<r)throw new Error(`batchDims (${r}) must be less than or equal to axis (${n}).`);for(let n=0;n<r;++n)if(e.shape[n]!==t.shape[n])throw new Error(`x.shape[${n}]: ${e.shape[n]} should be equal to indices.shape[${n}]: ${t.shape[n]}.`);const i=e.shape[n],s=[];let u=1,c=1,l=1;for(let t=0;t<r;++t)s.push(e.shape[t]),u*=e.shape[t];for(let t=r;t<n;t++)s.push(e.shape[t]),c*=e.shape[t];for(let e=r;e<o;e++)s.push(t.shape[e]);for(let t=n+1;t<a;t++)s.push(e.shape[t]),l*=e.shape[t];return{batchSize:u,sliceSize:l,outerSize:c,dimSize:i,outputShape:s}}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function qt(e){try{return e.map(e=>Object(Ue.decodeString)(e))}catch(e){throw new Error("Failed to decode encoded string bytes into utf-8, error: "+e)}}function Kt(e){return e.map(e=>Object(Ue.encodeString)(e))}var Xt=n(369),Yt=n(149),Qt=n(394),Zt=n(334)},function(e,t,n){"use strict";n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"f",(function(){return i})),n.d(t,"b",(function(){return s})),n.d(t,"g",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"a",(function(){return d}));var r=n(0);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function o(e,t,n,o,i){const s=t.inputParams[e];if(s&&void 0!==s.inputIndexStart){const e=s.inputIndexStart,u=0===s.inputIndexEnd?void 0:void 0===s.inputIndexEnd?e+1:s.inputIndexEnd;if("tensor"===s.type)return a(t.inputNames[s.inputIndexStart],n,o,i);if("tensors"===s.type){return t.inputNames.slice(e,u).map(e=>a(e,n,o,i))}const c=a(t.inputNames.slice(e)[0],n,o,i),l=c.dataSync();return"number"===s.type?l[0]:r.ae.toNestedArray(c.shape,l)}const u=t.attrParams[e];return u&&u.value}function a(e,t,n,r){const[o,a]=c(e);if(null!=r){const e=r.getHashTableHandleByName(o);if(null!=e)return e}const i=n.currentContextIds.find(e=>!!t[u(o,e)]);return void 0!==i?t[u(o,i)][a]:void 0}function i(e,t,n){return t[u(e,n.currentContextId)]}function s(e,t){const[n,r,o]=c(e);return[u(n,t&&t.currentContextId),r,o]}function u(e,t){return t?`${e}-${t}`:e}function c(e){const t=e.split(":");if(1===t.length)return[e,0,void 0];const n=t[0],r=3===t.length?t[1]:void 0;return[n,Number(t[t.length-1]),r]}function l(e,t,n){let r=o("pad",e,t,n);if("explicit"===r){r=o("explicitPaddings",e,t,n);const a=[[0,0],[0,0],[0,0],[0,0]];for(let e=0;e<4;e++)a[e][0]=r[2*e],a[e][1]=r[2*e+1];return a}return r}function d(e){return e.kept?e:Object(r.sd)(e)}},function(e,t,n){var r=n(446),o=n(293);e.exports=function(e,t){var n=o(e,t,"get");return r(e,n)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d}));var r=n(5),o=n(19),a=n(42),i=n(9),s=n(13);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function u(e,t){let n=e;if(Object(i.A)(e))return"string"===t?[]:[e.length];if(!Array.isArray(e))return[];const r=[];for(;Array.isArray(n)||Object(i.A)(n)&&"string"!==t;)r.push(n.length),n=n[0];return Array.isArray(e)&&Object(o.b)().getBool("TENSORLIKE_CHECK_SHAPE_CONSISTENCY")&&function e(t,n,r){if(r=r||[],!Array.isArray(t)&&!Object(i.A)(t))return void Object(i.b)(0===n.length,()=>`Element arr[${r.join("][")}] is a primitive, but should be an array/TypedArray of ${n[0]} elements`);Object(i.b)(n.length>0,()=>`Element arr[${r.join("][")}] should be a primitive, but is an array of ${t.length} elements`),Object(i.b)(t.length===n[0],()=>`Element arr[${r.join("][")}] should have ${n[0]} elements, but has ${t.length} elements`);const o=n.slice(1);for(let n=0;n<t.length;++n)e(t[n],o,r.concat(n))}(e,r,[]),r}function c(e,t,n,r){if("string_or_numeric"!==e){if(null==e)throw new Error("Expected dtype cannot be null.");if("numeric"!==e&&e!==t||"numeric"===e&&"string"===t)throw new Error(`Argument '${n}' passed to '${r}' must be ${e} tensor, but got ${t} tensor`)}}function l(e,t,n,o="numeric"){if(e instanceof a.a)return c(o,e.dtype,t,n),e;let l=Object(i.r)(e);if("string"!==l&&["bool","int32","float32"].indexOf(o)>=0&&(l=o),c(o,l,t,n),null==e||!Object(i.A)(e)&&!Array.isArray(e)&&"number"!=typeof e&&"boolean"!=typeof e&&"string"!=typeof e){const r=null==e?"null":e.constructor.name;throw new Error(`Argument '${t}' passed to '${n}' must be a Tensor or TensorLike, but got '${r}'`)}const d=u(e,l);Object(i.A)(e)||Array.isArray(e)||(e=[e]);const p="string"!==l?Object(s.toTypedArray)(e,l):Object(i.m)(e,[],!0);return r.a.makeTensor(p,d,l)}function d(e,t,n,r="numeric"){if(!Array.isArray(e))throw new Error(`Argument ${t} passed to ${n} must be a \`Tensor[]\` or \`TensorLike[]\``);return e.map((e,o)=>l(e,`${t}[${o}]`,n,r))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(5),o=n(9);function a(e){const t=Object.keys(e);if(1!==t.length)throw new Error("Please provide an object with a single key (operation name) mapping to a function. Got an object with "+t.length+" keys.");let n=t[0];const a=e[n];n.endsWith("_")&&(n=n.substring(0,n.length-1)),n+="__op";const i=(...e)=>{r.a.startScope(n);try{const t=a(...e);return Object(o.x)(t)&&console.error("Cannot return a Promise inside of tidy."),r.a.endScope(t),t}catch(e){throw r.a.endScope(null),e}};return Object.defineProperty(i,"name",{value:n,configurable:!0}),i}},function(e,t,n){"use strict";n.d(t,"b",(function(){return v})),n.d(t,"a",(function(){return x}));var r=n(334),o=n(19),a=n(240),i=n(6),s=n(141),u=n(140),c=n(13),l=n(9);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class d{constructor(e,t){this.backendTimer=e,this.logger=t,null==t&&(this.logger=new h)}profileKernel(e,t,n){let r;const a=()=>{r=n()};let i;const s=c.now();if(this.backendTimer.timerAvailable())i=this.backendTimer.time(a);else{a();for(const e of r)e.dataSync();i=Promise.resolve({kernelMs:c.now()-s})}if(Object(o.b)().getBool("CHECK_COMPUTATION_FOR_ERRORS"))for(let t=0;t<r.length;t++){const n=r[t];n.data().then(t=>{p(t,n.dtype,e)})}return{kernelName:e,outputs:r,inputs:t,timeMs:i.then(e=>e.kernelMs),extraInfo:i.then(e=>null!=e.getExtraProfileInfo?e.getExtraProfileInfo():"")}}logKernelProfile(e){const{kernelName:t,outputs:n,timeMs:r,inputs:o,extraInfo:a}=e;n.forEach(e=>{Promise.all([e.data(),r,a]).then(n=>{this.logger.logKernelProfile(t,e,n[0],n[1],o,n[2])})})}}function p(e,t,n){if("float32"!==t)return!1;for(let t=0;t<e.length;t++){const r=e[t];if(isNaN(r)||!isFinite(r))return console.warn(`Found ${r} in the result of '${n}'`),!0}return!1}class h{logKernelProfile(e,t,n,r,o,a){const i="number"==typeof r?l.L(r+"ms",9):r.error,s=l.L(e,25),u=t.rank,c=t.size,d=l.L(t.shape.toString(),14);let p="";for(const e in o){const n=o[e];if(null!=n){const r=n.shape||t.shape,o=r.length;p+=`${e}: ${o}D ${o>0?r:""} `}}console.log(`%c${s}\t%c${i}\t%c${u}D ${d}\t%c${c}\t%c${p}\t%c${a}`,"font-weight:bold","color:red","color:blue","color: orange","color: green","color: steelblue")}}
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */var f=n(42),m=n(22);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function g(e){return null!=e.kernelName}class b{constructor(){this.registeredVariables={},this.nextTapeNodeId=0,this.numBytes=0,this.numTensors=0,this.numStringTensors=0,this.numDataBuffers=0,this.gradientDepth=0,this.kernelDepth=0,this.scopeStack=[],this.numDataMovesStack=[],this.nextScopeId=0,this.tensorInfo=new WeakMap,this.profiling=!1,this.activeProfile={newBytes:0,newTensors:0,peakBytes:0,kernels:[],result:null,get kernelNames(){return Array.from(new Set(this.kernels.map(e=>e.name)))}}}dispose(){for(const e in this.registeredVariables)this.registeredVariables[e].dispose()}}class y{constructor(e){this.ENV=e,this.registry={},this.registryFactory={},this.pendingBackendInitId=0,this.state=new b}async ready(){if(null!=this.pendingBackendInit)return this.pendingBackendInit.then(()=>{});if(null!=this.backendInstance)return;const e=this.getSortedBackends();for(let t=0;t<e.length;t++){const n=e[t];if(await this.initializeBackend(n).success)return void await this.setBackend(n)}throw new Error("Could not initialize any backends, all backend initializations failed.")}get backend(){if(null!=this.pendingBackendInit)throw new Error(`Backend '${this.backendName}' has not yet been initialized. Make sure to await tf.ready() or await tf.setBackend() before calling other methods`);if(null==this.backendInstance){const{name:e,asyncInit:t}=this.initializeBackendsAndReturnBest();if(t)throw new Error(`The highest priority backend '${e}' has not yet been initialized. Make sure to await tf.ready() or await tf.setBackend() before calling other methods`);this.setBackend(e)}return this.backendInstance}backendNames(){return Object.keys(this.registryFactory)}findBackend(e){if(!(e in this.registry)){if(!(e in this.registryFactory))return null;{const{asyncInit:t}=this.initializeBackend(e);if(t)return null}}return this.registry[e]}findBackendFactory(e){return e in this.registryFactory?this.registryFactory[e].factory:null}registerBackend(e,t,n=1){return e in this.registryFactory?(u.b(e+" backend was already registered. Reusing existing backend factory."),!1):(this.registryFactory[e]={factory:t,priority:n},!0)}async setBackend(e){if(null==this.registryFactory[e])throw new Error(`Backend name '${e}' not found in registry`);if(this.backendName=e,null==this.registry[e]){this.backendInstance=null;const{success:t,asyncInit:n}=this.initializeBackend(e);if(!(n?await t:t))return!1}return this.backendInstance=this.registry[e],this.setupRegisteredKernels(),this.profiler=new d(this.backendInstance),!0}setupRegisteredKernels(){Object(s.c)(this.backendName).forEach(e=>{null!=e.setupFunc&&e.setupFunc(this.backendInstance)})}disposeRegisteredKernels(e){Object(s.c)(e).forEach(t=>{null!=t.disposeFunc&&t.disposeFunc(this.registry[e])})}initializeBackend(e){const t=this.registryFactory[e];if(null==t)throw new Error(`Cannot initialize backend ${e}, no registration found.`);try{const n=t.factory();if(!n||n instanceof r.b||"function"!=typeof n.then)return this.registry[e]=n,{success:!0,asyncInit:!1};{const t=++this.pendingBackendInitId,r=n.then(n=>!(t<this.pendingBackendInitId)&&(this.registry[e]=n,this.pendingBackendInit=null,!0)).catch(n=>(t<this.pendingBackendInitId||(this.pendingBackendInit=null,u.b(`Initialization of backend ${e} failed`),u.b(n.stack||n.message)),!1));return this.pendingBackendInit=r,{success:r,asyncInit:!0}}}catch(t){return u.b(`Initialization of backend ${e} failed`),u.b(t.stack||t.message),{success:!1,asyncInit:!1}}}removeBackend(e){if(!(e in this.registryFactory))throw new Error(e+" backend not found in registry");this.backendName===e&&null!=this.pendingBackendInit&&this.pendingBackendInitId++,e in this.registry&&(this.disposeRegisteredKernels(e),this.registry[e].dispose(),delete this.registry[e]),delete this.registryFactory[e],this.backendName===e&&(this.pendingBackendInit=null,this.backendName=null,this.backendInstance=null)}getSortedBackends(){if(0===Object.keys(this.registryFactory).length)throw new Error("No backend found in registry.");return Object.keys(this.registryFactory).sort((e,t)=>this.registryFactory[t].priority-this.registryFactory[e].priority)}initializeBackendsAndReturnBest(){const e=this.getSortedBackends();for(let t=0;t<e.length;t++){const n=e[t],{success:r,asyncInit:o}=this.initializeBackend(n);if(o||r)return{name:n,asyncInit:o}}throw new Error("Could not initialize any backends, all backend initializations failed.")}moveData(e,t){const n=this.state.tensorInfo.get(t),r=n.backend,o=this.readSync(t),a=r.refCount(t);r.disposeData(t,!0),n.backend=e,e.move(t,o,n.shape,n.dtype,a),this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack[this.state.numDataMovesStack.length-1]++}tidy(e,t){let n,r=null;if(null==t){if("function"!=typeof e)throw new Error("Please provide a function to tidy()");t=e}else{if("string"!=typeof e&&!(e instanceof String))throw new Error("When calling with two arguments, the first argument to tidy() must be a string");if("function"!=typeof t)throw new Error("When calling with two arguments, the 2nd argument to tidy() must be a function");r=e}return this.scopedRun(()=>this.startScope(r),()=>this.endScope(n),()=>(n=t(),n instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),n))}scopedRun(e,t,n){e();try{const e=n();return t(),e}catch(e){throw t(),e}}nextTensorId(){return y.nextTensorId++}nextVariableId(){return y.nextVariableId++}clone(e){const t=x.runKernel(i.pb,{x:e}),n={x:e};return this.addTapeNode(this.state.activeScope.name,n,[t],e=>({x:()=>{const t={x:e},n={dtype:"float32"};return x.runKernel(i.w,t,n)}}),[],{}),t}runKernel(e,t,n){null==this.backendName&&this.backend;if(!(null!=Object(s.b)(e,this.backendName)))throw new Error(`Kernel '${e}' not registered for backend '${this.backendName}'`);return this.runKernelFunc({kernelName:e,inputs:t,attrs:n})}shouldCheckForMemLeaks(){return this.ENV.getBool("IS_TEST")}checkKernelForMemLeak(e,t,n){const r=this.backend.numDataIds();let o=0;n.forEach(e=>{o+="complex64"===e.dtype?3:1});const a=this.state.numDataMovesStack[this.state.numDataMovesStack.length-1],i=r-t-o-a;if(i>0)throw new Error(`Backend '${this.backendName}' has an internal memory leak (${i} data ids) after running '${e}'`)}runKernelFunc(e){let t,n=[];const r=this.isTapeOn(),o=this.state.numBytes,a=this.state.numTensors;let i,u;this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack.push(0),null==this.backendName&&this.backend;const c=g(e)?e.kernelName:null!=this.state.activeScope?this.state.activeScope.name:"";if(g(e)){const{kernelName:t,inputs:o,attrs:a}=e;null==this.backendName&&this.backend;const c=Object(s.b)(t,this.backendName);l.b(null!=c,()=>`Cannot find registered kernel '${t}' for backend '${this.backendName}'`),i=()=>{const e=this.backend.numDataIds();u=c.kernelFunc({inputs:o,attrs:a,backend:this.backend});const i=Array.isArray(u)?u:[u];this.shouldCheckForMemLeaks()&&this.checkKernelForMemLeak(t,e,i);const s=i.map(e=>{if(null!=e.rank)return e;const{dataId:t,shape:n,dtype:r}=e;return this.makeTensorFromDataId(t,n,r)});if(r){const e=this.getTensorsForGradient(t,o,s);n=this.saveTensorsForBackwardMode(e)}return s}}else{const{forwardFunc:t}=e,o=e=>{r&&(n=e.map(e=>this.keep(this.clone(e))))};i=()=>{const e=this.backend.numDataIds();u=this.tidy(()=>t(this.backend,o));const n=Array.isArray(u)?u:[u];return this.shouldCheckForMemLeaks()&&this.checkKernelForMemLeak(c,e,n),n}}const{inputs:d,attrs:p}=e,h=g(e)?null:e.backwardsFunc;let f;return this.scopedRun(()=>this.state.kernelDepth++,()=>this.state.kernelDepth--,()=>{this.ENV.getBool("DEBUG")||this.state.profiling?(f=this.profiler.profileKernel(c,d,()=>i()),this.ENV.getBool("DEBUG")&&this.profiler.logKernelProfile(f),t=f.outputs):t=i()}),r&&this.addTapeNode(c,d,t,h,n,p),this.state.profiling&&this.state.activeProfile.kernels.push({name:c,bytesAdded:this.state.numBytes-o,totalBytesSnapshot:this.state.numBytes,tensorsAdded:this.state.numTensors-a,totalTensorsSnapshot:this.state.numTensors,inputShapes:Object.keys(d).map(e=>null!=d[e]?d[e].shape:null),outputShapes:t.map(e=>e.shape),kernelTimeMs:f.timeMs,extraInfo:f.extraInfo}),Array.isArray(u)?t:t[0]}saveTensorsForBackwardMode(e){return e.map(e=>this.keep(this.clone(e)))}getTensorsForGradient(e,t,n){const r=Object(s.a)(e);if(null!=r){const e=r.inputsToSave||[],o=r.outputsToSave||[];let a;r.saveAllInputs?(l.b(Array.isArray(t),()=>"saveAllInputs is true, expected inputs to be an array."),a=Object.keys(t).map(e=>t[e])):a=e.map(e=>t[e]);const i=n.filter((e,t)=>o[t]);return a.concat(i)}return[]}makeTensor(e,t,n,r){if(null==e)throw new Error("Values passed to engine.makeTensor() are null");n=n||"float32",r=r||this.backend;let o=e;"string"===n&&l.z(e[0])&&(o=e.map(e=>c.encodeString(e)));const a=r.write(o,t,n),i=new f.a(t,n,a,this.nextTensorId());if(this.trackTensor(i,r),"string"===n){const e=this.state.tensorInfo.get(a),t=Object(l.f)(o);this.state.numBytes+=t-e.bytes,e.bytes=t}return i}makeTensorFromDataId(e,t,n,r){n=n||"float32";const o=new f.a(t,n,e,this.nextTensorId());return this.trackTensor(o,r),o}makeVariable(e,t=!0,n,r){n=n||this.nextVariableId().toString(),null!=r&&r!==e.dtype&&(e=e.cast(r));const o=new f.c(e,t,n,this.nextTensorId());if(null!=this.state.registeredVariables[o.name])throw new Error(`Variable with name ${o.name} was already registered`);return this.state.registeredVariables[o.name]=o,this.incRef(o,this.backend),o}trackTensor(e,t){this.state.numTensors++,"string"===e.dtype&&this.state.numStringTensors++;let n=0;"complex64"!==e.dtype&&"string"!==e.dtype&&(n=e.size*l.g(e.dtype)),this.state.numBytes+=n,this.state.tensorInfo.has(e.dataId)||(this.state.numDataBuffers++,this.state.tensorInfo.set(e.dataId,{backend:t||this.backend,dtype:e.dtype,shape:e.shape,bytes:n})),e instanceof f.c||this.track(e)}incRef(e,t){this.trackTensor(e,t),this.backend.incRef(e.dataId)}removeDataId(e,t){this.state.tensorInfo.has(e)&&this.state.tensorInfo.get(e).backend===t&&(this.state.tensorInfo.delete(e),this.state.numDataBuffers--)}disposeTensor(e){if(!this.state.tensorInfo.has(e.dataId))return;const t=this.state.tensorInfo.get(e.dataId);if(this.state.numTensors--,"string"===e.dtype&&(this.state.numStringTensors--,this.state.numBytes-=t.bytes),"complex64"!==e.dtype&&"string"!==e.dtype){const t=e.size*l.g(e.dtype);this.state.numBytes-=t}t.backend.disposeData(e.dataId)&&this.removeDataId(e.dataId,t.backend)}disposeVariables(){for(const e in this.state.registeredVariables){const t=this.state.registeredVariables[e];this.disposeVariable(t)}}disposeVariable(e){this.disposeTensor(e),null!=this.state.registeredVariables[e.name]&&delete this.state.registeredVariables[e.name]}memory(){const e=this.backend.memory();return e.numTensors=this.state.numTensors,e.numDataBuffers=this.state.numDataBuffers,e.numBytes=this.state.numBytes,this.state.numStringTensors>0&&(e.unreliable=!0,null==e.reasons&&(e.reasons=[]),e.reasons.push("Memory usage by string tensors is approximate (2 bytes per character)")),e}async profile(e){this.state.profiling=!0;const t=this.state.numBytes,n=this.state.numTensors;this.state.activeProfile.kernels=[],this.state.activeProfile.result=await e(),this.state.profiling=!1,this.state.activeProfile.peakBytes=Math.max(...this.state.activeProfile.kernels.map(e=>e.totalBytesSnapshot)),this.state.activeProfile.newBytes=this.state.numBytes-t,this.state.activeProfile.newTensors=this.state.numTensors-n;for(const e of this.state.activeProfile.kernels)e.kernelTimeMs=await e.kernelTimeMs,e.extraInfo=await e.extraInfo;return this.state.activeProfile}isTapeOn(){return this.state.gradientDepth>0&&0===this.state.kernelDepth}addTapeNode(e,t,n,r,o,a){const i={id:this.state.nextTapeNodeId++,kernelName:e,inputs:t,outputs:n,saved:o},u=Object(s.a)(e);null!=u&&(r=u.gradFunc),null!=r&&(i.gradient=e=>(e=e.map((e,t)=>{if(null==e){const e=n[t],r=l.F(e.size,e.dtype);return this.makeTensor(r,e.shape,e.dtype)}return e}),r(e.length>1?e:e[0],o,a))),this.state.activeTape.push(i)}keep(e){return e.kept=!0,e}startTape(){0===this.state.gradientDepth&&(this.state.activeTape=[]),this.state.gradientDepth++}endTape(){this.state.gradientDepth--}startScope(e){const t={track:[],name:"unnamed scope",id:this.state.nextScopeId++};e&&(t.name=e),this.state.scopeStack.push(t),this.state.activeScope=t}endScope(e){const t=Object(m.a)(e),n=new Set(t.map(e=>e.id));for(let e=0;e<this.state.activeScope.track.length;e++){const t=this.state.activeScope.track[e];t.kept||n.has(t.id)||t.dispose()}const r=this.state.scopeStack.pop();this.state.activeScope=0===this.state.scopeStack.length?null:this.state.scopeStack[this.state.scopeStack.length-1],t.forEach(e=>{e.kept||e.scopeId!==r.id||this.track(e)})}gradients(e,t,n,r=!1){if(l.b(t.length>0,()=>"gradients() received an empty list of xs."),null!=n&&"float32"!==n.dtype)throw new Error(`dy must have 'float32' dtype, but has '${n.dtype}'`);const o=this.scopedRun(()=>this.startTape(),()=>this.endTape(),()=>this.tidy("forward",e));l.b(o instanceof f.a,()=>"The result y returned by f() must be a tensor.");const a=function(e,t,n){const r={},o={};for(let e=0;e<t.length;e++)r[t[e].id]=!0;for(let n=0;n<e.length;n++){const a=e[n],i=a.inputs;for(const e in i){const n=i[e];let s=!1;for(let e=0;e<t.length;e++)if(r[n.id]){a.outputs.forEach(e=>r[e.id]=!0),s=!0,o[a.id]=!0;break}if(s)break}}const a={};a[n.id]=!0;const i={};for(let t=e.length-1;t>=0;t--){const n=e[t],r=n.inputs;for(let e=0;e<n.outputs.length;e++)if(a[n.outputs[e].id]){for(const e in r)a[r[e].id]=!0,i[n.id]=!0;break}}const s=[];for(let t=0;t<e.length;t++){const n=e[t];if(o[n.id]&&i[n.id]){const e={};for(const t in n.inputs){const o=n.inputs[t];r[o.id]&&(e[t]=o)}const t=Object.assign({},n);t.inputs=e,t.outputs=n.outputs,s.push(t)}}return s}(this.state.activeTape,t,o);if(!r&&0===a.length&&t.length>0)throw new Error("Cannot compute gradient of y=f(x) with respect to x. Make sure that the f you passed encloses all operations that lead from x to y.");return this.tidy("backward",()=>{const e={};e[o.id]=null==n?function(e){const t=Object(l.D)(Object(l.O)(e),"float32");return x.makeTensor(t,e,"float32")}(o.shape):n,function(e,t,n,r){for(let o=t.length-1;o>=0;o--){const a=t[o],i=[];if(a.outputs.forEach(t=>{const n=e[t.id];null!=n?i.push(n):i.push(null)}),null==a.gradient)throw new Error(`Cannot compute gradient: gradient function not found for ${a.kernelName}.`);const s=a.gradient(i);for(const t in a.inputs){if(!(t in s))throw new Error(`Cannot backprop through input ${t}. Available gradients found: ${Object.keys(s)}.`);const o=n(()=>s[t]());if("float32"!==o.dtype)throw new Error(`Error in gradient for op ${a.kernelName}. The gradient of input ${t} must have 'float32' dtype, but has '${o.dtype}'`);const i=a.inputs[t];if(!l.a(o.shape,i.shape))throw new Error(`Error in gradient for op ${a.kernelName}. The gradient of input '${t}' has shape '${o.shape}', which does not match the shape of the input '${i.shape}'`);if(null==e[i.id])e[i.id]=o;else{const t=e[i.id];e[i.id]=r(t,o),t.dispose()}}}}(e,a,e=>this.tidy(e),w);const r=t.map(t=>e[t.id]);return 0===this.state.gradientDepth&&(this.state.activeTape.forEach(e=>{for(const t of e.saved)t.dispose()}),this.state.activeTape=null),{value:o,grads:r}})}customGrad(e){return l.b(l.u(e),()=>"The f passed in customGrad(f) must be a function."),(...t)=>{let n;l.b(t.every(e=>e instanceof f.a),()=>"The args passed in customGrad(f)(x1, x2,...) must all be tensors");const r={};t.forEach((e,t)=>{r[t]=e});return this.runKernelFunc({forwardFunc:(r,o)=>(n=e(...t,o),l.b(n.value instanceof f.a,()=>"The function f passed in customGrad(f) must return an object where `obj.value` is a tensor"),l.b(l.u(n.gradFunc),()=>"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function."),n.value),backwardsFunc:(e,r)=>{const o=n.gradFunc(e,r),a=Array.isArray(o)?o:[o];l.b(a.length===t.length,()=>"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns the same number of tensors as inputs passed to f(...)."),l.b(a.every(e=>e instanceof f.a),()=>"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns a list of only tensors.");const i={};return a.forEach((e,t)=>{i[t]=()=>e}),i},inputs:r})}}readSync(e){return this.state.tensorInfo.get(e).backend.readSync(e)}read(e){return this.state.tensorInfo.get(e).backend.read(e)}readToGPU(e,t){return this.state.tensorInfo.get(e).backend.readToGPU(e,t)}async time(e){const t=Object(c.now)(),n=await this.backend.time(e);return n.wallMs=Object(c.now)()-t,n}track(e){return null!=this.state.activeScope&&(e.scopeId=this.state.activeScope.id,this.state.activeScope.track.push(e)),e}get registeredVariables(){return this.state.registeredVariables}reset(){this.pendingBackendInitId++,this.state.dispose(),this.ENV.reset(),this.state=new b;for(const e in this.registry)this.disposeRegisteredKernels(e),this.registry[e].dispose(),delete this.registry[e];this.backendName=null,this.backendInstance=null,this.pendingBackendInit=null}}function v(){const e=Object(a.b)();if(null==e._tfengine){const t=new o.a(e);e._tfengine=new y(t)}return Object(o.c)(e._tfengine.ENV),Object(f.f)(()=>e._tfengine),e._tfengine}y.nextTensorId=0,y.nextVariableId=0;const x=v();function w(e,t){const n={a:e,b:t};return x.runKernel(i.d,n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return i})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return u})),n.d(t,"g",(function(){return c})),n.d(t,"h",(function(){return l})),n.d(t,"i",(function(){return d})),n.d(t,"j",(function(){return p})),n.d(t,"k",(function(){return h})),n.d(t,"l",(function(){return f})),n.d(t,"n",(function(){return m})),n.d(t,"m",(function(){return g})),n.d(t,"o",(function(){return b})),n.d(t,"r",(function(){return y})),n.d(t,"p",(function(){return v})),n.d(t,"q",(function(){return x})),n.d(t,"s",(function(){return w})),n.d(t,"t",(function(){return O})),n.d(t,"u",(function(){return k})),n.d(t,"v",(function(){return S})),n.d(t,"w",(function(){return T})),n.d(t,"x",(function(){return C})),n.d(t,"y",(function(){return E})),n.d(t,"z",(function(){return I})),n.d(t,"A",(function(){return j})),n.d(t,"B",(function(){return N})),n.d(t,"C",(function(){return A})),n.d(t,"D",(function(){return R})),n.d(t,"E",(function(){return _})),n.d(t,"F",(function(){return $})),n.d(t,"G",(function(){return F})),n.d(t,"H",(function(){return D})),n.d(t,"I",(function(){return M})),n.d(t,"J",(function(){return P})),n.d(t,"L",(function(){return L})),n.d(t,"K",(function(){return B})),n.d(t,"M",(function(){return z})),n.d(t,"N",(function(){return U})),n.d(t,"O",(function(){return V})),n.d(t,"P",(function(){return W})),n.d(t,"Q",(function(){return G})),n.d(t,"R",(function(){return H})),n.d(t,"S",(function(){return q})),n.d(t,"hc",(function(){return K})),n.d(t,"T",(function(){return X})),n.d(t,"U",(function(){return Y})),n.d(t,"V",(function(){return Q})),n.d(t,"X",(function(){return Z})),n.d(t,"W",(function(){return J})),n.d(t,"Y",(function(){return ee})),n.d(t,"Z",(function(){return te})),n.d(t,"ab",(function(){return ne})),n.d(t,"bb",(function(){return re})),n.d(t,"cb",(function(){return oe})),n.d(t,"db",(function(){return ae})),n.d(t,"eb",(function(){return ie})),n.d(t,"fb",(function(){return se})),n.d(t,"hb",(function(){return ue})),n.d(t,"lb",(function(){return ce})),n.d(t,"kb",(function(){return le})),n.d(t,"mb",(function(){return de})),n.d(t,"nb",(function(){return pe})),n.d(t,"pb",(function(){return he})),n.d(t,"ob",(function(){return fe})),n.d(t,"qb",(function(){return me})),n.d(t,"rb",(function(){return ge})),n.d(t,"sb",(function(){return be})),n.d(t,"tb",(function(){return ye})),n.d(t,"wb",(function(){return ve})),n.d(t,"xb",(function(){return xe})),n.d(t,"yb",(function(){return we})),n.d(t,"zb",(function(){return Oe})),n.d(t,"Ab",(function(){return ke})),n.d(t,"Bb",(function(){return Se})),n.d(t,"Cb",(function(){return Te})),n.d(t,"Db",(function(){return Ce})),n.d(t,"Eb",(function(){return Ee})),n.d(t,"ub",(function(){return Ie})),n.d(t,"vb",(function(){return je})),n.d(t,"Fb",(function(){return Ne})),n.d(t,"Lb",(function(){return Ae})),n.d(t,"Gb",(function(){return Re})),n.d(t,"Jb",(function(){return _e})),n.d(t,"Hb",(function(){return $e})),n.d(t,"Ib",(function(){return Fe})),n.d(t,"Kb",(function(){return De})),n.d(t,"Mb",(function(){return Me})),n.d(t,"Nb",(function(){return Pe})),n.d(t,"Ob",(function(){return Le})),n.d(t,"Pb",(function(){return Be})),n.d(t,"Qb",(function(){return ze})),n.d(t,"Rb",(function(){return Ue})),n.d(t,"Sb",(function(){return Ve})),n.d(t,"Tb",(function(){return We})),n.d(t,"Xb",(function(){return Ge})),n.d(t,"Ub",(function(){return He})),n.d(t,"Vb",(function(){return qe})),n.d(t,"Wb",(function(){return Ke})),n.d(t,"Zb",(function(){return Xe})),n.d(t,"Yb",(function(){return Ye})),n.d(t,"ac",(function(){return Qe})),n.d(t,"bc",(function(){return Ze})),n.d(t,"cc",(function(){return Je})),n.d(t,"dc",(function(){return et})),n.d(t,"ec",(function(){return tt})),n.d(t,"fc",(function(){return nt})),n.d(t,"gc",(function(){return rt})),n.d(t,"ic",(function(){return ot})),n.d(t,"jc",(function(){return at})),n.d(t,"lc",(function(){return it})),n.d(t,"oc",(function(){return st})),n.d(t,"pc",(function(){return ut})),n.d(t,"mc",(function(){return ct})),n.d(t,"nc",(function(){return lt})),n.d(t,"kc",(function(){return dt})),n.d(t,"qc",(function(){return pt})),n.d(t,"sc",(function(){return ht})),n.d(t,"tc",(function(){return ft})),n.d(t,"uc",(function(){return mt})),n.d(t,"vc",(function(){return gt})),n.d(t,"wc",(function(){return bt})),n.d(t,"Bc",(function(){return yt})),n.d(t,"zc",(function(){return vt})),n.d(t,"Ac",(function(){return xt})),n.d(t,"yc",(function(){return wt})),n.d(t,"xc",(function(){return Ot})),n.d(t,"Dc",(function(){return kt})),n.d(t,"Lc",(function(){return St})),n.d(t,"Uc",(function(){return Tt})),n.d(t,"Ec",(function(){return Ct})),n.d(t,"Kc",(function(){return Et})),n.d(t,"Cc",(function(){return It})),n.d(t,"Fc",(function(){return jt})),n.d(t,"Gc",(function(){return Nt})),n.d(t,"Hc",(function(){return At})),n.d(t,"Ic",(function(){return Rt})),n.d(t,"Jc",(function(){return _t})),n.d(t,"Nc",(function(){return $t})),n.d(t,"Mc",(function(){return Ft})),n.d(t,"Pc",(function(){return Dt})),n.d(t,"Qc",(function(){return Mt})),n.d(t,"Rc",(function(){return Pt})),n.d(t,"Sc",(function(){return Lt})),n.d(t,"Tc",(function(){return Bt})),n.d(t,"Vc",(function(){return zt})),n.d(t,"Wc",(function(){return Ut})),n.d(t,"Xc",(function(){return Vt})),n.d(t,"Yc",(function(){return Wt})),n.d(t,"Zc",(function(){return Gt})),n.d(t,"ad",(function(){return Ht})),n.d(t,"bd",(function(){return qt})),n.d(t,"cd",(function(){return Kt})),n.d(t,"dd",(function(){return Xt})),n.d(t,"ed",(function(){return Yt})),n.d(t,"Oc",(function(){return Qt})),n.d(t,"gb",(function(){return Zt})),n.d(t,"rc",(function(){return Jt})),n.d(t,"fd",(function(){return en})),n.d(t,"ib",(function(){return tn})),n.d(t,"jb",(function(){return nn}));const r="Abs",o="Acos",a="Acosh",i="Add",s="AddN",u="All",c="Any",l="ArgMax",d="ArgMin",p="Asin",h="Asinh",f="Atan",m="Atanh",g="Atan2",b="AvgPool",y="AvgPoolGrad",v="AvgPool3D",x="AvgPool3DGrad",w="BatchMatMul",O="BatchToSpaceND",k="Bincount",S="BroadcastArgs",T="Cast",C="Ceil",E="ClipByValue",I="Complex",j="ComplexAbs",N="Concat",A="Conv2D",R="Conv2DBackpropFilter",_="Conv2DBackpropInput",$="Conv3D",F="Conv3DBackpropFilterV2",D="Conv3DBackpropInputV2",M="Cos",P="Cosh",L="Cumsum",B="CropAndResize",z="DenseBincount",U="DepthToSpace",V="DepthwiseConv2dNative",W="DepthwiseConv2dNativeBackpropFilter",G="DepthwiseConv2dNativeBackpropInput",H="Diag",q="Dilation2D",K="RealDiv",X="Einsum",Y="Elu",Q="EluGrad",Z="Erf",J="Equal",ee="Exp",te="ExpandDims",ne="Expm1",re="FFT",oe="Fill",ae="FlipLeftRight",ie="Floor",se="FloorDiv",ue="FusedBatchNorm",ce="GatherV2",le="GatherNd",de="Greater",pe="GreaterEqual",he="Identity",fe="IFFT",me="Imag",ge="IsFinite",be="IsInf",ye="IsNan",ve="LeakyRelu",xe="Less",we="LessEqual",Oe="LinSpace",ke="Log",Se="Log1p",Te="LogicalAnd",Ce="LogicalNot",Ee="LogicalOr",Ie="LRN",je="LRNGrad",Ne="Max",Ae="Maximum",Re="MaxPool",_e="MaxPoolGrad",$e="MaxPool3D",Fe="MaxPool3DGrad",De="MaxPoolWithArgmax",Me="Mean",Pe="Min",Le="Minimum",Be="MirrorPad",ze="Mod",Ue="Multinomial",Ve="Multiply",We="Neg",Ge="NotEqual",He="NonMaxSuppressionV3",qe="NonMaxSuppressionV4",Ke="NonMaxSuppressionV5",Xe="OnesLike",Ye="OneHot",Qe="Pack",Ze="PadV2",Je="Pow",et="Prelu",tt="Prod",nt="Range",rt="Real",ot="Reciprocal",at="Relu",it="Reshape",st="ResizeNearestNeighbor",ut="ResizeNearestNeighborGrad",ct="ResizeBilinear",lt="ResizeBilinearGrad",dt="Relu6",pt="Reverse",ht="Round",ft="Rsqrt",mt="ScatterNd",gt="Select",bt="Selu",yt="Slice",vt="Sin",xt="Sinh",wt="Sign",Ot="Sigmoid",kt="Softplus",St="Sqrt",Tt="Sum",Ct="SpaceToBatchND",Et="SplitV",It="Softmax",jt="SparseFillEmptyRows",Nt="SparseReshape",At="SparseSegmentMean",Rt="SparseSegmentSum",_t="SparseToDense",$t="SquaredDifference",Ft="Square",Dt="StridedSlice",Mt="StringNGrams",Pt="StringSplit",Lt="StringToHashBucketFast",Bt="Sub",zt="Tan",Ut="Tanh",Vt="Tile",Wt="TopK",Gt="Transform",Ht="Transpose",qt="Unique",Kt="Unpack",Xt="UnsortedSegmentSum",Yt="ZerosLike",Qt="Step",Zt="FromPixels",Jt="RotateWithOffset",en="_FusedMatMul",tn="FusedConv2D",nn="FusedDepthwiseConv2D"},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r,o;!function(a,i){"use strict";void 0===(o="function"==typeof(r=function(){var e=function(){},t="undefined"!=typeof window&&void 0!==window.navigator&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function r(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(n){return"debug"===n&&(n="log"),"undefined"!=typeof console&&("trace"===n&&t?o:void 0!==console[n]?r(console,n):void 0!==console.log?r(console,"log"):e)}function i(t,r){for(var o=0;o<n.length;o++){var a=n[o];this[a]=o<t?e:this.methodFactory(a,t,r)}this.log=this.debug}function s(e,t,n){return function(){"undefined"!=typeof console&&(i.call(this,t,n),this[e].apply(this,arguments))}}function u(e,t,n){return a(e)||s.apply(this,arguments)}function c(e,t,r){var o,a=this;t=null==t?"WARN":t;var s="loglevel";function c(){var e;if("undefined"!=typeof window&&s){try{e=window.localStorage[s]}catch(e){}if(void 0===e)try{var t=window.document.cookie,n=t.indexOf(encodeURIComponent(s)+"=");-1!==n&&(e=/^([^;]+)/.exec(t.slice(n))[1])}catch(e){}return void 0===a.levels[e]&&(e=void 0),e}}"string"==typeof e?s+=":"+e:"symbol"==typeof e&&(s=void 0),a.name=e,a.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},a.methodFactory=r||u,a.getLevel=function(){return o},a.setLevel=function(t,r){if("string"==typeof t&&void 0!==a.levels[t.toUpperCase()]&&(t=a.levels[t.toUpperCase()]),!("number"==typeof t&&t>=0&&t<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+t;if(o=t,!1!==r&&function(e){var t=(n[e]||"silent").toUpperCase();if("undefined"!=typeof window&&s){try{return void(window.localStorage[s]=t)}catch(e){}try{window.document.cookie=encodeURIComponent(s)+"="+t+";"}catch(e){}}}(t),i.call(a,t,e),"undefined"==typeof console&&t<a.levels.SILENT)return"No console available for logging"},a.setDefaultLevel=function(e){t=e,c()||a.setLevel(e,!1)},a.resetLevel=function(){a.setLevel(t,!1),function(){if("undefined"!=typeof window&&s){try{return void window.localStorage.removeItem(s)}catch(e){}try{window.document.cookie=encodeURIComponent(s)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}()},a.enableAll=function(e){a.setLevel(a.levels.TRACE,e)},a.disableAll=function(e){a.setLevel(a.levels.SILENT,e)};var l=c();null==l&&(l=t),a.setLevel(l,!1)}var l=new c,d={};l.getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=d[e];return t||(t=d[e]=new c(e,l.getLevel(),l.methodFactory)),t};var p="undefined"!=typeof window?window.log:void 0;return l.noConflict=function(){return"undefined"!=typeof window&&window.log===l&&(window.log=p),l},l.getLoggers=function(){return d},l.default=l,l})?r.call(t,n,t,e):r)||(e.exports=o)}()},function(e,t,n){"use strict";
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function r(e){let t=e.length,n=0;for(;t>0;)n=Math.random()*t|0,t--,s(e,t,n)}function o(e,t){if(e.length!==t.length)throw new Error("Array sizes must match to be shuffled together First array length was "+e.length+"Second array length was "+t.length);let n=e.length,r=0;for(;n>0;)r=Math.random()*n|0,n--,s(e,n,r),s(t,n,r)}function a(e,t,n){return Math.max(e,Math.min(t,n))}function i(e){return e%2==0?e:e+1}function s(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function u(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t}function c(e,t){const n=Math.random();return t*n+(1-n)*e}function l(e,t){let n=0;for(let r=0;r<e.length;r++){const o=Number(e[r])-Number(t[r]);n+=o*o}return n}function d(e,t){if(!e)throw new Error("string"==typeof t?t:t())}function p(e,t,n=""){d(b(e,t),()=>n+` Shapes ${e} and ${t} must match`)}function h(e){d(null!=e,()=>"The input to the tensor constructor must be a non-null value.")}function f(e,t=[],n=!1){if(null==t&&(t=[]),Array.isArray(e)||R(e)&&!n)for(let r=0;r<e.length;++r)f(e[r],t,n);else t.push(e);return t}function m(e){if(0===e.length)return 1;let t=e[0];for(let n=1;n<e.length;n++)t*=e[n];return t}function g(e){return 0===e.length}function b(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function y(e){return e%1==0}function v(e){if(null!=Math.tanh)return Math.tanh(e);if(e===1/0)return 1;if(e===-1/0)return-1;{const t=Math.exp(2*e);return(t-1)/(t+1)}}function x(e){const t=Math.ceil(Math.sqrt(e));return[t,Math.ceil(e/t)]}function w(e){const t=new Uint32Array(e);for(let n=0;n<e;++n)t[n]=n;return r(t),t}function O(e,t){return t<=e.length?e:e+" ".repeat(t-e.length)}function k(e,t=(e=>0),n){return new Promise((r,o)=>{let a=0;const i=()=>{if(e())return void r();a++;const s=t(a);null!=n&&a>=n?o():setTimeout(i,s)};i()})}function S(e,t){let n=1,r=-1;for(let t=0;t<e.length;++t)if(e[t]>=0)n*=e[t];else if(-1===e[t]){if(-1!==r)throw Error(`Shapes can only have 1 implicit size. Found -1 at dim ${r} and dim ${t}`);r=t}else if(e[t]<0)throw Error(`Shapes can not be < 0. Found ${e[t]} at dim ${t}`);if(-1===r){if(t>0&&t!==n)throw Error(`Size(${t}) must match the product of shape ${e}`);return e}if(0===n)throw Error(`Cannot infer the missing size in [${e}] when there are 0 elements`);if(t%n!=0)throw Error(`The implicit shape can't be a fractional number. Got ${t} / ${n}`);const o=e.slice();return o[r]=t/n,o}function T(e,t){const n=t.length;return d((e=null==e?t.map((e,t)=>t):[].concat(e)).every(e=>e>=-n&&e<n),()=>`All values in axis param must be in range [-${n}, ${n}) but got axis `+e),d(e.every(e=>y(e)),()=>"All values in axis param must be integers but got axis "+e),e.map(e=>e<0?n+e:e)}function C(e,t){const n=[],r=[],o=null!=t&&Array.isArray(t)&&0===t.length,a=null==t||o?null:T(t,e).sort();let i=0;for(let t=0;t<e.length;++t){if(null!=a){if(a[i]===t&&1!==e[t])throw new Error(`Can't squeeze axis ${t} since its dim '${e[t]}' is not 1`);(null==a[i]||a[i]>t)&&1===e[t]&&(n.push(e[t]),r.push(t)),a[i]<=t&&i++}1!==e[t]&&(n.push(e[t]),r.push(t))}return{newShape:n,keptDims:r}}function E(e,t){let n=null;if(null==e||"float32"===e)n=new Float32Array(t);else if("int32"===e)n=new Int32Array(t);else{if("bool"!==e)throw new Error("Unknown data type "+e);n=new Uint8Array(t)}return n}function I(e,t){let n=null;if(null==e||"float32"===e)n=new Float32Array(t);else if("int32"===e)n=new Int32Array(t);else if("bool"===e)n=new Uint8Array(t);else{if("string"!==e)throw new Error("Unknown data type "+e);n=new Array(t)}return n}function j(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(isNaN(r)||!isFinite(r))throw Error(`A tensor of type ${t} being uploaded contains ${r}.`)}}function N(e){return"bool"===e||"complex64"===e||"float32"===e||"int32"===e||"string"===e}function A(e,t){return"complex64"!==t&&(("float32"!==t||"complex64"===e)&&(("int32"!==t||"float32"===e||"complex64"===e)&&("bool"!==t||"bool"!==e)))}function R(e){return e instanceof Float32Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray}function _(e){if("float32"===e||"int32"===e)return 4;if("complex64"===e)return 8;if("bool"===e)return 1;throw new Error("Unknown dtype "+e)}function $(e){if(null==e)return 0;let t=0;return e.forEach(e=>t+=e.length),t}function F(e){return"string"==typeof e||e instanceof String}function D(e){return"boolean"==typeof e}function M(e){return"number"==typeof e}function P(e){return Array.isArray(e)?P(e[0]):e instanceof Float32Array?"float32":e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray?"int32":M(e)?"float32":F(e)?"string":D(e)?"bool":"float32"}function L(e){return!!(e&&e.constructor&&e.call&&e.apply)}function B(e,t){for(let n=t;n<e;++n)if(e%n==0)return n;return e}function z(e){const t=e.length;if(t<2)return[];const n=new Array(t-1);n[t-2]=e[t-1];for(let r=t-3;r>=0;--r)n[r]=n[r+1]*e[r+1];return n}function U(e,t,n=!1){if(0===e.length)return t[0];const r=e.reduce((e,t)=>e*t)*(n?2:1);if(0===r)return[];if(r!==t.length)throw new Error(`[${e}] does not match the input size ${t.length}${n?" for a complex tensor":""}.`);return function e(t,n,r,o=!1){const a=new Array;if(1===n.length){const e=n[0]*(o?2:1);for(let n=0;n<e;n++)a[n]=r[t+n]}else{const i=n[0],s=n.slice(1),u=s.reduce((e,t)=>e*t)*(o?2:1);for(let n=0;n<i;n++)a[n]=e(t+n*u,s,r,o)}return a}(0,e,t,n)}function V(e,t){const n=W(e,t);for(let e=0;e<n.length;e++)n[e]=1;return n}function W(e,t){if(null==t||"float32"===t||"complex64"===t)return new Float32Array(e);if("int32"===t)return new Int32Array(e);if("bool"===t)return new Uint8Array(e);throw new Error("Unknown data type "+t)}function G(e,t){const n=e.reduce((e,t)=>e*t,1);if(null==t||"float32"===t)return U(e,new Float32Array(n));if("int32"===t)return U(e,new Int32Array(n));if("bool"===t)return U(e,new Uint8Array(n));throw new Error("Unknown data type "+t)}function H(e){e.forEach(t=>{d(Number.isInteger(t)&&t>=0,()=>`Tensor must have a shape comprised of positive integers but got shape [${e}].`)})}function q(e,t,n){if(0===t)return 0;if(1===t)return e[0];let r=e[e.length-1];for(let t=0;t<e.length-1;++t)r+=n[t]*e[t];return r}function K(e,t,n){if(0===t)return[];if(1===t)return[e];const r=new Array(t);for(let t=0;t<r.length-1;++t)r[t]=Math.floor(e/n[t]),e-=r[t]*n[t];return r[r.length-1]=e,r}function X(e){return e&&e.then&&"function"==typeof e.then}n.d(t,"M",(function(){return r})),n.d(t,"N",(function(){return o})),n.d(t,"i",(function(){return a})),n.d(t,"H",(function(){return i})),n.d(t,"S",(function(){return s})),n.d(t,"R",(function(){return u})),n.d(t,"J",(function(){return c})),n.d(t,"l",(function(){return l})),n.d(t,"b",(function(){return d})),n.d(t,"e",(function(){return p})),n.d(t,"d",(function(){return h})),n.d(t,"m",(function(){return f})),n.d(t,"O",(function(){return m})),n.d(t,"y",(function(){return g})),n.d(t,"a",(function(){return b})),n.d(t,"v",(function(){return y})),n.d(t,"T",(function(){return v})),n.d(t,"P",(function(){return x})),n.d(t,"k",(function(){return w})),n.d(t,"L",(function(){return O})),n.d(t,"K",(function(){return k})),n.d(t,"s",(function(){return S})),n.d(t,"I",(function(){return T})),n.d(t,"Q",(function(){return C})),n.d(t,"o",(function(){return E})),n.d(t,"n",(function(){return I})),n.d(t,"h",(function(){return j})),n.d(t,"B",(function(){return N})),n.d(t,"p",(function(){return A})),n.d(t,"A",(function(){return R})),n.d(t,"g",(function(){return _})),n.d(t,"f",(function(){return $})),n.d(t,"z",(function(){return F})),n.d(t,"t",(function(){return D})),n.d(t,"w",(function(){return M})),n.d(t,"r",(function(){return P})),n.d(t,"u",(function(){return L})),n.d(t,"G",(function(){return B})),n.d(t,"j",(function(){return z})),n.d(t,"U",(function(){return U})),n.d(t,"D",(function(){return V})),n.d(t,"F",(function(){return W})),n.d(t,"E",(function(){return G})),n.d(t,"c",(function(){return H})),n.d(t,"C",(function(){return q})),n.d(t,"q",(function(){return K})),n.d(t,"x",(function(){return X}))},function(e,t,n){var r=n(447),o=n(293);e.exports=function(e,t,n){var a=o(e,t,"set");return r(e,a,n),n},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(452)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({reshape_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){const n={x:Object(a.a)(e,"x","reshape","string_or_numeric")},i={shape:t};return r.a.runKernel(o.lc,n,i)}})},function(e,t,n){"use strict";n.r(t),n.d(t,"shuffle",(function(){return o.M})),n.d(t,"shuffleCombo",(function(){return o.N})),n.d(t,"clamp",(function(){return o.i})),n.d(t,"nearestLargerEven",(function(){return o.H})),n.d(t,"swap",(function(){return o.S})),n.d(t,"sum",(function(){return o.R})),n.d(t,"randUniform",(function(){return o.J})),n.d(t,"distSquared",(function(){return o.l})),n.d(t,"assert",(function(){return o.b})),n.d(t,"assertShapesMatch",(function(){return o.e})),n.d(t,"assertNonNull",(function(){return o.d})),n.d(t,"flatten",(function(){return o.m})),n.d(t,"sizeFromShape",(function(){return o.O})),n.d(t,"isScalarShape",(function(){return o.y})),n.d(t,"arraysEqual",(function(){return o.a})),n.d(t,"isInt",(function(){return o.v})),n.d(t,"tanh",(function(){return o.T})),n.d(t,"sizeToSquarishShape",(function(){return o.P})),n.d(t,"createShuffledIndices",(function(){return o.k})),n.d(t,"rightPad",(function(){return o.L})),n.d(t,"repeatedTry",(function(){return o.K})),n.d(t,"inferFromImplicitShape",(function(){return o.s})),n.d(t,"parseAxisParam",(function(){return o.I})),n.d(t,"squeezeShape",(function(){return o.Q})),n.d(t,"getTypedArrayFromDType",(function(){return o.o})),n.d(t,"getArrayFromDType",(function(){return o.n})),n.d(t,"checkConversionForErrors",(function(){return o.h})),n.d(t,"isValidDtype",(function(){return o.B})),n.d(t,"hasEncodingLoss",(function(){return o.p})),n.d(t,"isTypedArray",(function(){return o.A})),n.d(t,"bytesPerElement",(function(){return o.g})),n.d(t,"bytesFromStringArray",(function(){return o.f})),n.d(t,"isString",(function(){return o.z})),n.d(t,"isBoolean",(function(){return o.t})),n.d(t,"isNumber",(function(){return o.w})),n.d(t,"inferDtype",(function(){return o.r})),n.d(t,"isFunction",(function(){return o.u})),n.d(t,"nearestDivisor",(function(){return o.G})),n.d(t,"computeStrides",(function(){return o.j})),n.d(t,"toNestedArray",(function(){return o.U})),n.d(t,"makeOnesTypedArray",(function(){return o.D})),n.d(t,"makeZerosTypedArray",(function(){return o.F})),n.d(t,"makeZerosNestedTypedArray",(function(){return o.E})),n.d(t,"assertNonNegativeIntegerDimensions",(function(){return o.c})),n.d(t,"locToIndex",(function(){return o.C})),n.d(t,"indexToLoc",(function(){return o.q})),n.d(t,"isPromise",(function(){return o.x})),n.d(t,"hexToLong",(function(){return s})),n.d(t,"fingerPrint64",(function(){return y})),n.d(t,"createScalarValue",(function(){return v})),n.d(t,"toTypedArray",(function(){return x})),n.d(t,"now",(function(){return w})),n.d(t,"fetch",(function(){return O})),n.d(t,"encodeString",(function(){return k})),n.d(t,"decodeString",(function(){return S}));var r=n(19),o=n(9),a=n(627);
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const i=n.n(a).a||a;function s(e){return i.fromString(e,!0,16)}const u=s("c3a5c85c97cb3127"),c=s("b492b66fbe98f273"),l=s("9ae16a3b2f90404f");function d(e){return e.xor(e.shru(47))}function p(e,t,n){const r=e.slice(t,t+n);return i.fromBytes(Array.from(r),!0,!0)}function h(e,t){return p(e,t,8)}function f(e,t){return p(e,t,4)}function m(e,t){return 0===t?e:e.shru(t).or(e.shl(64-t))}function g(e,t,n=s("9ddfea08eb382d69")){let r=e.xor(t).mul(n);r=r.xor(r.shru(47));let o=t.xor(r).mul(n);return o=o.xor(o.shru(47)),o=o.mul(n),o}function b(e,t,n,r){return function(e,t,n,r,o,a){o=o.add(e),a=m(a.add(o).add(r),21);const i=o;return o=(o=o.add(t)).add(n),a=a.add(m(o,44)),[o.add(r),a.add(i)]}(h(e,t),h(e,t+8),h(e,t+16),h(e,t+24),n,r)}function y(e,t=e.length){const n=i.fromNumber(81,!0);if(t<=32)return t<=16?function(e,t=e.length){if(t>=8){const n=l.add(2*t),r=h(e,0).add(l),o=h(e,t-8);return g(m(o,37).mul(n).add(r),m(r,25).add(o).mul(n),n)}if(t>=4){const n=l.add(2*t);return g(f(e,0).shl(3).add(t),f(e,t-4),n)}if(t>0){const n=e[0]+(e[t>>1]<<8),r=t+(e[t-1]<<2);return d(l.mul(n).xor(u.mul(r))).mul(l)}return l}(e,t):function(e,t=e.length){const n=l.add(2*t),r=h(e,0).mul(c),o=h(e,8),a=h(e,t-8).mul(n),i=h(e,t-16).mul(l);return g(m(r.add(o),43).add(m(a,30)).add(i),r.add(m(o.add(l),18)).add(a),n)}(e,t);if(t<=64)return function(e,t=e.length){const n=l.add(2*t),r=h(e,0).mul(l),o=h(e,8),a=h(e,t-8).mul(n),i=h(e,t-16).mul(l),s=m(r.add(o),43).add(m(a,30)).add(i),u=g(s,r.add(m(o.add(l),18)).add(a),n),c=h(e,16).mul(n),d=h(e,24),p=s.add(h(e,t-32)).mul(n),f=u.add(h(e,t-24)).mul(n);return g(m(c.add(d),43).add(m(p,30)).add(f),c.add(m(d.add(r),18)).add(p),n)}(e,t);let r=n,o=n.mul(c).add(113),a=d(o.mul(l).add(113)).mul(l),s=[i.UZERO,i.UZERO],p=[i.UZERO,i.UZERO];r=r.mul(l).add(h(e,0));let y=0;const v=64*(t-1>>6),x=v+(t-1&63)-63;do{r=m(r.add(o).add(s[0]).add(h(e,y+8)),37).mul(c),o=m(o.add(s[1]).add(h(e,y+48)),42).mul(c),r=r.xor(p[1]),o=o.add(s[0]).add(h(e,y+40)),a=m(a.add(p[0]),33).mul(c),s=b(e,y,s[1].mul(c),r.add(p[0])),p=b(e,y+32,a.add(p[1]),o.add(h(e,y+16))),[a,r]=[r,a],y+=64}while(y!==v);const w=c.add(a.and(255).shl(1));return y=x,p[0]=p[0].add(t-1&63),s[0]=s[0].add(p[0]),p[0]=p[0].add(s[0]),r=m(r.add(o).add(s[0]).add(h(e,y+8)),37).mul(w),o=m(o.add(s[1]).add(h(e,y+48)),42).mul(w),r=r.xor(p[1].mul(9)),o=o.add(s[0].mul(9).add(h(e,y+40))),a=m(a.add(p[0]),33).mul(w),s=b(e,y,s[1].mul(w),r.add(p[0])),p=b(e,y+32,a.add(p[1]),o.add(h(e,y+16))),[a,r]=[r,a],g(g(s[0],p[0],w).add(d(o).mul(u)).add(a),g(s[1],p[1],w).add(r),w)}
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function v(e,t){return"string"===t?k(e):x([e],t)}function x(e,t){if("string"===t)throw new Error("Cannot convert a string[] to a TypedArray");if(Array.isArray(e)&&(e=o.m(e)),Object(r.b)().getBool("DEBUG")&&o.h(e,t),function(e,t){return e instanceof Float32Array&&"float32"===t||e instanceof Int32Array&&"int32"===t||e instanceof Uint8Array&&"bool"===t}(e,t))return e;if(null==t||"float32"===t||"complex64"===t)return new Float32Array(e);if("int32"===t)return new Int32Array(e);if("bool"===t){const t=new Uint8Array(e.length);for(let n=0;n<t.length;++n)0!==Math.round(e[n])&&(t[n]=1);return t}throw new Error("Unknown data type "+t)}function w(){return Object(r.b)().platform.now()}function O(e,t){return Object(r.b)().platform.fetch(e,t)}function k(e,t="utf-8"){return t=t||"utf-8",Object(r.b)().platform.encode(e,t)}function S(e,t="utf-8"){return t=t||"utf-8",Object(r.b)().platform.decode(e,t)}},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,n(53))},function(e,t,n){"use strict";var r=n(14),o=n(98),a=n(17),i=n(27),s=n(78).f,u=n(282),c=n(21),l=n(81),d=n(73),p=n(33),h=function(e){var t=function(n,r,a){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,a)}return o(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,o,f,m,g,b,y,v,x=e.target,w=e.global,O=e.stat,k=e.proto,S=w?r:O?r[x]:(r[x]||{}).prototype,T=w?c:c[x]||d(c,x,{})[x],C=T.prototype;for(f in t)n=!u(w?f:x+(O?".":"#")+f,e.forced)&&S&&p(S,f),g=T[f],n&&(b=e.noTargetGet?(v=s(S,f))&&v.value:S[f]),m=n&&b?b:t[f],n&&typeof g==typeof m||(y=e.bind&&n?l(m,r):e.wrap&&n?h(m):k&&i(m)?a(m):m,(e.sham||m&&m.sham||g&&g.sham)&&d(y,"sham",!0),d(T,f,y),k&&(p(c,o=x+"Prototype")||d(c,o,{}),d(c[o],f,m),e.real&&C&&!C[f]&&d(C,f,m)))}},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,n(53))},function(e,t,n){var r=n(132),o=Function.prototype,a=o.bind,i=o.call,s=r&&a.bind(i,i);e.exports=r?function(e){return e&&s(e)}:function(e){return e&&function(){return i.apply(e,arguments)}}},function(e,t,n){e.exports=n(520)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return u}));var r=n(9);
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class o{constructor(e){this.global=e,this.flags={},this.flagRegistry={},this.urlFlags={},this.getQueryParams=a,this.populateURLFlags()}setPlatform(e,t){null!=this.platform&&(i().getBool("IS_TEST")||i().getBool("PROD")||console.warn(`Platform ${this.platformName} has already been set. Overwriting the platform with ${t}.`)),this.platformName=e,this.platform=t}registerFlag(e,t,n){if(this.flagRegistry[e]={evaluationFn:t,setHook:n},null!=this.urlFlags[e]){const t=this.urlFlags[e];i().getBool("IS_TEST")||i().getBool("PROD")||console.warn(`Setting feature override from URL ${e}: ${t}.`),this.set(e,t)}}async getAsync(e){return e in this.flags||(this.flags[e]=await this.evaluateFlag(e)),this.flags[e]}get(e){if(e in this.flags)return this.flags[e];const t=this.evaluateFlag(e);if(Object(r.x)(t))throw new Error(`Flag ${e} cannot be synchronously evaluated. Please use getAsync() instead.`);return this.flags[e]=t,this.flags[e]}getNumber(e){return this.get(e)}getBool(e){return this.get(e)}getFlags(){return this.flags}get features(){return this.flags}set(e,t){if(null==this.flagRegistry[e])throw new Error(`Cannot set flag ${e} as it has not been registered.`);this.flags[e]=t,null!=this.flagRegistry[e].setHook&&this.flagRegistry[e].setHook(t)}evaluateFlag(e){if(null==this.flagRegistry[e])throw new Error(`Cannot evaluate flag '${e}': no evaluation function found.`);return this.flagRegistry[e].evaluationFn()}setFlags(e){this.flags=Object.assign({},e)}reset(){this.flags={},this.urlFlags={},this.populateURLFlags()}populateURLFlags(){if(void 0===this.global||void 0===this.global.location||void 0===this.global.location.search)return;const e=this.getQueryParams(this.global.location.search);if("tfjsflags"in e){e.tfjsflags.split(",").forEach(e=>{const[t,n]=e.split(":");this.urlFlags[t]=function(e,t){if("true"===(t=t.toLowerCase())||"false"===t)return"true"===t;if(""+ +t===t)return+t;throw new Error(`Could not parse value flag value ${t} for flag ${e}.`)}(t,n)})}}}function a(e){const t={};return e.replace(/[?&]([^=?&]+)(?:=([^&]*))?/g,(e,...n)=>(function(e,t,n){e[decodeURIComponent(t)]=decodeURIComponent(n||"")}(t,n[0],n[1]),n.join("="))),t}function i(){return s}let s=null;function u(e){s=e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports={}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return i}));var r=n(42),o=n(187);n(9);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function a(e,t){if(e.dtype===t.dtype)return[e,t];const n=Object(o.b)(e.dtype,t.dtype);return[e.cast(n),t.cast(n)]}function i(e){const t=[];return function e(t,n,o){if(null==t)return;if(t instanceof r.a)return void n.push(t);if(a=t,!Array.isArray(a)&&"object"!=typeof a)return;var a;const i=t;for(const t in i){const r=i[t];o.has(r)||(o.add(r),e(r,n,o))}}(e,t,new Set),t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(22),i=n(3),s=n(4);const u=Object(s.a)({mul_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){let n=Object(i.a)(e,"a","mul"),s=Object(i.a)(t,"b","mul");[n,s]=Object(a.b)(n,s);const u={a:n,b:s};return r.a.runKernel(o.Sb,u)}})},function(e,t,n){var r=n(14),o=n(200),a=n(33),i=n(157),s=n(198),u=n(280),c=o("wks"),l=r.Symbol,d=l&&l.for,p=u?l:l&&l.withoutSetter||i;e.exports=function(e){if(!a(c,e)||!s&&"string"!=typeof c[e]){var t="Symbol."+e;s&&a(l,e)?c[e]=l[e]:c[e]=u&&d?d(t):p(t)}return c[e]}},function(e,t){var n=Function.prototype,r=n.bind,o=n.call,a=r&&r.bind(o);e.exports=r?function(e){return e&&a(o,e)}:function(e){return e&&function(){return o.apply(e,arguments)}}},function(e,t,n){var r=n(27);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},function(e,t){e.exports=function(e){return"function"==typeof e}},function(e,t,n){var r=n(21),o=n(33),a=n(209),i=n(54).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||i(t,e,{value:a.f(e)})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(22),i=n(3),s=n(4);const u=Object(s.a)({sub_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){let n=Object(i.a)(e,"a","sub"),s=Object(i.a)(t,"b","sub");[n,s]=Object(a.b)(n,s);const u={a:n,b:s};return r.a.runKernel(o.Tc,u)}})},function(e,t,n){e.exports=n(526)},function(e,t,n){e.exports=n(507)},function(e,t,n){e.exports=n(582)},function(e,t,n){var r=n(17),o=n(80),a=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(o(e),t)}},function(e,t,n){var r=n(17);e.exports=r({}.isPrototypeOf)},function(e,t,n){"use strict";
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function r(e,t){const n=e.length,r=[];for(let o=0;o<n;o++){const a=n-1-o,i=e[a]||1;(t[t.length-1-o]||1)>1&&1===i&&r.unshift(a)}return r}function o(e,t){const n=[];for(let r=0;r<t.length;r++){const o=e[e.length-r-1],a=t.length-r-1,i=t[a];(null==o||1===o&&i>1)&&n.unshift(a)}return n}function a(e,t){const n=[],r=Math.max(e.length,t.length);for(let o=0;o<r;o++){let r=e[e.length-o-1];null==r&&(r=1);let a=t[t.length-o-1];if(null==a&&(a=1),1===r)n.unshift(a);else if(1===a)n.unshift(r);else{if(r!==a){throw Error(`Operands could not be broadcast together with shapes ${e} and ${t}.`)}n.unshift(r)}}return n}n.r(t),n.d(t,"getBroadcastDims",(function(){return r})),n.d(t,"getReductionAxes",(function(){return o})),n.d(t,"assertAndGetBroadcastShape",(function(){return a}))},function(e,t,n){e.exports=n(523)},function(e,t,n){"use strict";n.d(t,"e",(function(){return o})),n.d(t,"f",(function(){return a})),n.d(t,"g",(function(){return i})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return c})),n.d(t,"j",(function(){return f})),n.d(t,"i",(function(){return m})),n.d(t,"h",(function(){return g})),n.d(t,"a",(function(){return b}));var r=n(9);
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function o(e,t,n,r,o="NHWC",a){return s(e,[...t,e[3]],n,a,r,null,null,g(o))}function a(e,t,n,r,o,a,i="channelsLast"){const[u,c]=l(t);let d;if("channelsLast"===i)d=[u,c,e[3],e[3]];else{if("channelsFirst"!==i)throw new Error("Unknown dataFormat "+i);d=[u,c,e[1],e[1]]}return s(e,d,n,r,o,a,!1,i)}function i(e,t,n,r,o,a,i="NDHWC"){const[s,c,l]=d(t);let p,h;if("NDHWC"===i)h="channelsLast",p=[s,c,l,e[4],e[4]];else{if("NCDHW"!==i)throw new Error("Unknown dataFormat "+i);h="channelsFirst",p=[s,c,l,e[1],e[1]]}return u(e,p,n,r,o,!1,h,a)}function s(e,t,n,r,o,a,i=!1,s="channelsLast"){let[u,d,f,m]=[-1,-1,-1,-1];if("channelsLast"===s)[u,d,f,m]=e;else{if("channelsFirst"!==s)throw new Error("Unknown dataFormat "+s);[u,m,d,f]=e}const[g,b,,y]=t,[v,x]=l(n),[w,O]=l(r),k=p(g,w),S=p(b,O),{padInfo:T,outHeight:C,outWidth:E}=function(e,t,n,r,o,a,i,s,u){let l,d,p;if("number"==typeof e){l={top:e,bottom:e,left:e,right:e,type:0===e?"VALID":"NUMBER"};const o=function(e,t,n,r,o){null==r&&(r=c(e,t,n));const a=e[0],i=e[1],s=h((a-t+2*r)/n+1,o),u=h((i-t+2*r)/n+1,o);return[s,u]}([t,n],a,r,e,s);d=o[0],p=o[1]}else if("same"===e){d=Math.ceil(t/r),p=Math.ceil(n/o);const e=Math.max(0,(d-1)*r+a-t),s=Math.max(0,(p-1)*o+i-n),u=Math.floor(e/2),c=e-u,h=Math.floor(s/2);l={top:u,bottom:c,left:h,right:s-h,type:"SAME"}}else if("valid"===e)l={top:0,bottom:0,left:0,right:0,type:"VALID"},d=Math.ceil((t-a+1)/r),p=Math.ceil((n-i+1)/o);else{if("object"!=typeof e)throw Error("Unknown padding parameter: "+e);{const c="channelsLast"===u?e[1][0]:e[2][0],f="channelsLast"===u?e[1][1]:e[2][1],m="channelsLast"===u?e[2][0]:e[3][0],g="channelsLast"===u?e[2][1]:e[3][1];l={top:c,bottom:f,left:m,right:g,type:0===c&&0===f&&0===m&&0===g?"VALID":"EXPLICIT"},d=h((t-a+c+f)/r+1,s),p=h((n-i+m+g)/o+1,s)}}return{padInfo:l,outHeight:d,outWidth:p}}(o,d,f,v,x,k,S,a,s),I=i?y*m:y;let j;return"channelsFirst"===s?j=[u,I,C,E]:"channelsLast"===s&&(j=[u,C,E,I]),{batchSize:u,dataFormat:s,inHeight:d,inWidth:f,inChannels:m,outHeight:C,outWidth:E,outChannels:I,padInfo:T,strideHeight:v,strideWidth:x,filterHeight:g,filterWidth:b,effectiveFilterHeight:k,effectiveFilterWidth:S,dilationHeight:w,dilationWidth:O,inShape:e,outShape:j,filterShape:t}}function u(e,t,n,r,o,a=!1,i="channelsLast",s){let[u,l,f,m,g]=[-1,-1,-1,-1,-1];if("channelsLast"===i)[u,l,f,m,g]=e;else{if("channelsFirst"!==i)throw new Error("Unknown dataFormat "+i);[u,g,l,f,m]=e}const[b,y,v,,x]=t,[w,O,k]=d(n),[S,T,C]=d(r),E=p(b,S),I=p(y,T),j=p(v,C),{padInfo:N,outDepth:A,outHeight:R,outWidth:_}=function(e,t,n,r,o,a,i,s,u,l,d){let p,f,m,g;if("number"==typeof e){p={top:e,bottom:e,left:e,right:e,front:e,back:e,type:0===e?"VALID":"NUMBER"};const a=function(e,t,n,r,o,a){null==o&&(o=c(e,t,r));const i=e[0],s=e[1],u=e[2],l=h((i-t+2*o)/r+1,a),d=h((s-t+2*o)/r+1,a),p=h((u-t+2*o)/r+1,a);return[l,d,p,n]}([t,n,r,1],s,1,o,e,d);f=a[0],m=a[1],g=a[2]}else if("same"===e){f=Math.ceil(t/o),m=Math.ceil(n/a),g=Math.ceil(r/i);const e=(f-1)*o+s-t,c=(m-1)*a+u-n,d=(g-1)*i+l-r,h=Math.floor(e/2),b=e-h,y=Math.floor(c/2),v=c-y,x=Math.floor(d/2);p={top:y,bottom:v,left:x,right:d-x,front:h,back:b,type:"SAME"}}else{if("valid"!==e)throw Error("Unknown padding parameter: "+e);p={top:0,bottom:0,left:0,right:0,front:0,back:0,type:"VALID"},f=Math.ceil((t-s+1)/o),m=Math.ceil((n-u+1)/a),g=Math.ceil((r-l+1)/i)}return{padInfo:p,outDepth:f,outHeight:m,outWidth:g}}(o,l,f,m,w,O,k,E,I,j,s),$=a?x*g:x;let F;return"channelsFirst"===i?F=[u,$,A,R,_]:"channelsLast"===i&&(F=[u,A,R,_,$]),{batchSize:u,dataFormat:i,inDepth:l,inHeight:f,inWidth:m,inChannels:g,outDepth:A,outHeight:R,outWidth:_,outChannels:$,padInfo:N,strideDepth:w,strideHeight:O,strideWidth:k,filterDepth:b,filterHeight:y,filterWidth:v,effectiveFilterDepth:E,effectiveFilterHeight:I,effectiveFilterWidth:j,dilationDepth:S,dilationHeight:T,dilationWidth:C,inShape:e,outShape:F,filterShape:t}}function c(e,t,n,r=1){const o=p(t,r);return Math.floor((e[0]*(n-1)-n+o)/2)}function l(e){return"number"==typeof e?[e,e,e]:2===e.length?[e[0],e[1],1]:e}function d(e){return"number"==typeof e?[e,e,e]:e}function p(e,t){return t<=1?e:e+(e-1)*(t-1)}function h(e,t){if(!t)return Math.trunc(e);switch(t){case"round":return Math.round(e);case"ceil":return Math.ceil(e);case"floor":return Math.floor(e);default:throw new Error("Unknown roundingMode "+t)}}function f(e){const[t,n,r]=l(e);return 1===t&&1===n&&1===r}function m(e,t){return f(e)||f(t)}function g(e){if("NHWC"===e)return"channelsLast";if("NCHW"===e)return"channelsFirst";throw new Error("Unknown dataFormat "+e)}function b(e,t,n){if(null!=n){if("string"==typeof t)throw Error(`Error in ${e}: pad must be an integer when using dimRoundingMode ${n} but got pad ${t}.`);if("number"==typeof t)r.b(r.v(t),()=>`Error in ${e}: pad must be an integer when using dimRoundingMode ${n} but got pad ${t}.`);else{if("object"!=typeof t)throw Error(`Error in ${e}: Unknown padding parameter: ${t}`);t.forEach(t=>{t.forEach(t=>{r.b(r.v(t),()=>`Error in ${e}: pad must be an integer when using dimRoundingMode ${n} but got pad ${t}.`)})})}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(46),s=n(4);const u=Object(s.a)({sum_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=null,n=!1){let s=Object(a.a)(e,"x","sum");"bool"===s.dtype&&(s=Object(i.a)(s,"int32"));const u={x:s},c={axis:t,keepDims:n};return r.a.runKernel(o.Uc,u,c)}})},function(e,t,n){var r=n(20);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(348);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),r(e,o.key,o)}}e.exports=function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"f",(function(){return f})),n.d(t,"e",(function(){return m})),n.d(t,"d",(function(){return g})),n.d(t,"a",(function(){return b})),n.d(t,"c",(function(){return y}));var r=n(240),o=n(9);function a(e,t,n,r){const a=Object(o.j)(t),c=function(e,t,n,r){const a=Object(o.O)(t),s=r[r.length-1],c=new Array(s).fill(0),l=t.length,d="complex64"===n?u(e):e;if(l>1)for(let e=0;e<a/s;e++){const t=e*s;for(let e=0;e<s;e++)c[e]=Math.max(c[e],i(d[t+e],0,n).length)}return c}(e,t,n,a),l=t.length,d=function e(t,n,r,o,a,c=!0){const l="complex64"===r?2:1,d=n[0],p=n.length;if(0===p){if("complex64"===r){return[i(u(t)[0],0,r)]}return"bool"===r?[s(t[0])]:[t[0].toString()]}if(1===p){if(d>20){const e=3*l;let n=Array.from(t.slice(0,e)),o=Array.from(t.slice((d-3)*l,d*l));return"complex64"===r&&(n=u(n),o=u(o)),["["+n.map((e,t)=>i(e,a[t],r)).join(", ")+", ..., "+o.map((e,t)=>i(e,a[d-3+t],r)).join(", ")+"]"]}return["["+("complex64"===r?u(t):Array.from(t)).map((e,t)=>i(e,a[t],r)).join(", ")+"]"]}const h=n.slice(1),f=o.slice(1),m=o[0]*l,g=[];if(d>20){for(let n=0;n<3;n++){const o=n*m,i=o+m;g.push(...e(t.slice(o,i),h,r,f,a,!1))}g.push("...");for(let n=d-3;n<d;n++){const o=n*m,i=o+m;g.push(...e(t.slice(o,i),h,r,f,a,n===d-1))}}else for(let n=0;n<d;n++){const o=n*m,i=o+m;g.push(...e(t.slice(o,i),h,r,f,a,n===d-1))}const b=2===p?",":"";g[0]="["+g[0]+b;for(let e=1;e<g.length-1;e++)g[e]=" "+g[e]+b;let y=",\n";for(let e=2;e<p;e++)y+="\n";return g[g.length-1]=" "+g[g.length-1]+"]"+(c?"":y),g}(e,t,n,a,c),p=["Tensor"];return r&&(p.push("  dtype: "+n),p.push("  rank: "+l),p.push(`  shape: [${t}]`),p.push("  values:")),p.push(d.map(e=>"    "+e).join("\n")),p.join("\n")}function i(e,t,n){let r;return r=Array.isArray(e)?parseFloat(e[0].toFixed(7))+" + "+parseFloat(e[1].toFixed(7))+"j":Object(o.z)(e)?`'${e}'`:"bool"===n?s(e):parseFloat(e.toFixed(7)).toString(),Object(o.L)(r,t)}function s(e){return 0===e?"false":"true"}function u(e){const t=[];for(let n=0;n<e.length;n+=2)t.push([e[n],e[n+1]]);return t}var c=n(13);
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class l{constructor(e,t,n){if(this.dtype=t,this.shape=e.slice(),this.size=o.O(e),null!=n){const e=n.length;o.b(e===this.size,()=>`Length of values '${e}' does not match the size inferred by the shape '${this.size}'.`)}if("complex64"===t)throw new Error("complex64 dtype TensorBuffers are not supported. Please create a TensorBuffer for the real and imaginary parts separately and call tf.complex(real, imag).");this.values=n||o.n(t,this.size),this.strides=Object(o.j)(e)}set(e,...t){0===t.length&&(t=[0]),o.b(t.length===this.rank,()=>`The number of provided coordinates (${t.length}) must match the rank (${this.rank})`);const n=this.locToIndex(t);this.values[n]=e}get(...e){0===e.length&&(e=[0]);let t=0;for(const n of e){if(n<0||n>=this.shape[t]){const t=`Requested out of range element at ${e}.   Buffer shape=`+this.shape;throw new Error(t)}t++}let n=e[e.length-1];for(let t=0;t<e.length-1;++t)n+=this.strides[t]*e[t];return this.values[n]}locToIndex(e){if(0===this.rank)return 0;if(1===this.rank)return e[0];let t=e[e.length-1];for(let n=0;n<e.length-1;++n)t+=this.strides[n]*e[n];return t}indexToLoc(e){if(0===this.rank)return[];if(1===this.rank)return[e];const t=new Array(this.shape.length);for(let n=0;n<t.length-1;++n)t[n]=Math.floor(e/this.strides[n]),e-=t[n]*this.strides[n];return t[t.length-1]=e,t}get rank(){return this.shape.length}toTensor(){return d().makeTensor(this.values,this.shape,this.dtype)}}let d=null,p=null,h=null;function f(e){d=e}function m(e){p=e}function g(e){h=e}class b{constructor(e,t,n,r){this.kept=!1,this.isDisposedInternal=!1,this.shape=e.slice(),this.dtype=t||"float32",this.size=o.O(e),this.strides=Object(o.j)(e),this.dataId=n,this.id=r,this.rankType=this.rank<5?this.rank.toString():"higher"}get rank(){return this.shape.length}async buffer(){const e=await this.data();return p.buffer(this.shape,this.dtype,e)}bufferSync(){return p.buffer(this.shape,this.dtype,this.dataSync())}async array(){const e=await this.data();return Object(o.U)(this.shape,e,"complex64"===this.dtype)}arraySync(){return Object(o.U)(this.shape,this.dataSync(),"complex64"===this.dtype)}async data(){this.throwIfDisposed();const e=d().read(this.dataId);if("string"===this.dtype){const t=await e;try{return t.map(e=>c.decodeString(e))}catch(e){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}}return e}dataToGPU(e){return this.throwIfDisposed(),d().readToGPU(this.dataId,e)}dataSync(){this.throwIfDisposed();const e=d().readSync(this.dataId);if("string"===this.dtype)try{return e.map(e=>c.decodeString(e))}catch(e){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}return e}async bytes(){this.throwIfDisposed();const e=await d().read(this.dataId);return"string"===this.dtype?e:new Uint8Array(e.buffer)}dispose(){this.isDisposed||(d().disposeTensor(this),this.isDisposedInternal=!0)}get isDisposed(){return this.isDisposedInternal}throwIfDisposed(){if(this.isDisposed)throw new Error("Tensor is disposed.")}print(e=!1){return p.print(this,e)}clone(){return this.throwIfDisposed(),p.clone(this)}toString(e=!1){return a(this.dataSync(),this.shape,this.dtype,e)}cast(e){return this.throwIfDisposed(),p.cast(this,e)}variable(e=!0,t,n){return this.throwIfDisposed(),d().makeVariable(this,e,t,n)}}Object.defineProperty(b,Symbol.hasInstance,{value:e=>!!e&&null!=e.data&&null!=e.dataSync&&null!=e.throwIfDisposed}),Object(r.a)("Tensor",()=>b);class y extends b{constructor(e,t,n,r){super(e.shape,e.dtype,e.dataId,r),this.trainable=t,this.name=n}assign(e){if(e.dtype!==this.dtype)throw new Error(`dtype of the new value (${e.dtype}) and previous value (${this.dtype}) must match`);if(!o.a(e.shape,this.shape))throw new Error(`shape of the new value (${e.shape}) and previous value (${this.shape}) must match`);d().disposeTensor(this),this.dataId=e.dataId,d().incRef(this,null)}dispose(){d().disposeVariable(this),this.isDisposedInternal=!0}}Object.defineProperty(y,Symbol.hasInstance,{value:e=>e instanceof b&&null!=e.assign&&e.assign instanceof Function})},function(e,t){e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(9),o=n(152);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function a(e,t){if((Object(r.A)(e)&&"string"!==t||Array.isArray(e))&&"complex64"!==t)throw new Error("Error creating a new Scalar: value must be a primitive (number|boolean|string)");if("string"===t&&Object(r.A)(e)&&!(e instanceof Uint8Array))throw new Error("When making a scalar from encoded string, the value must be `Uint8Array`.");return Object(o.a)(e,[],[],t)}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(4);const u=Object(s.a)({cast_:
+/**
+ * @license
+ * Copyright 2020 Google Inc. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){const n=Object(a.a)(e,"x","cast");if(!i.B(t))throw new Error("Failed to cast to unknown dtype "+t);if("string"===t&&"string"!==n.dtype||"string"!==t&&"string"===n.dtype)throw new Error("Only strings can be casted to strings");const s={x:n},u={dtype:t};return r.a.runKernel(o.w,s,u)}})},function(e,t,n){var r=n(14),o=n(26),a=r.String,i=r.TypeError;e.exports=function(e){if(o(e))return e;throw i(a(e)+" is not an object")}},function(e,t,n){var r=n(331),o=n(604);function a(t){return e.exports=a=r?o:function(e){return e.__proto__||o(e)},e.exports.default=e.exports,e.exports.__esModule=!0,a(t)}e.exports=a,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(16),o=n(96),a=r.String,i=r.TypeError;e.exports=function(e){if(o(e))return e;throw i(a(e)+" is not an object")}},function(e,t,n){var r=n(132),o=Function.prototype.call;e.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},function(e,t,n){var r=n(21);e.exports=function(e){return r[e+"Prototype"]}},function(e,t,n){e.exports=n(875)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(14),o=n(39),a=n(281),i=n(283),s=n(47),u=n(154),c=r.TypeError,l=Object.defineProperty,d=Object.getOwnPropertyDescriptor;t.f=o?i?function(e,t,n){if(s(e),t=u(t),s(n),"function"==typeof e&&"prototype"===t&&"value"in n&&"writable"in n&&!n.writable){var r=d(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return l(e,t,n)}:l:function(e,t,n){if(s(e),t=u(t),s(n),a)try{return l(e,t,n)}catch(e){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=n(511)},function(e,t,n){var r=n(21),o=n(14),a=n(27),i=function(e){return a(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},function(e,t,n){var r=n(16),o=n(214),a=n(75),i=n(306),s=n(307),u=n(308),c=o("wks"),l=r.Symbol,d=l&&l.for,p=u?l:l&&l.withoutSetter||i;e.exports=function(e){if(!a(c,e)||!s&&"string"!=typeof c[e]){var t="Symbol."+e;s&&a(l,e)?c[e]=l[e]:c[e]=u&&d?d(t):p(t)}return c[e]}},function(e,t,n){"use strict";(function(e){n.d(t,"f",(function(){return s})),n.d(t,"e",(function(){return u})),n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return h})),n.d(t,"d",(function(){return f})),n.d(t,"c",(function(){return m})),n.d(t,"i",(function(){return g})),n.d(t,"g",(function(){return b})),n.d(t,"h",(function(){return y}));var r=n(121),o=n(192),a=n(9),i=n(345);async function s(e,t){const n=[],r=[],o=Array.isArray(e)?e.map(e=>e.name):Object.keys(e);for(let a=0;a<o.length;++a){const i=o[a],s=Array.isArray(e)?e[a].tensor:e[i];if("float32"!==s.dtype&&"int32"!==s.dtype&&"bool"!==s.dtype&&"string"!==s.dtype&&"complex64"!==s.dtype)throw new Error(`Unsupported dtype in weight '${i}': ${s.dtype}`);const u={name:i,shape:s.shape,dtype:s.dtype};if("string"===s.dtype){const e=new Promise(async e=>{const t=await s.bytes(),n=t.reduce((e,t)=>e+t.length,0)+4*t.length,r=new Uint8Array(n);let o=0;for(let e=0;e<t.length;e++){const n=t[e],a=new Uint8Array(new Uint32Array([n.length]).buffer);r.set(a,o),o+=4,r.set(n,o),o+=n.length}e(r)});r.push(e)}else r.push(s.data());null!=t&&(u.group=t),n.push(u)}return{data:c(await Promise.all(r)),specs:n}}function u(e,t){const n={};let s,u=0;for(const c of t){const t=c.name,l=c.dtype,d=c.shape,p=Object(a.O)(d);let h;if("quantization"in c){const n=c.quantization;if("uint8"===n.dtype||"uint16"===n.dtype){if(!("min"in n)||!("scale"in n))throw new Error(`Weight ${c.name} with quantization ${n.dtype} doesn't have corresponding metadata min and scale.`)}else{if("float16"!==n.dtype)throw new Error(`Weight ${c.name} has unknown quantization dtype ${n.dtype}. Supported quantization dtypes are: 'uint8', 'uint16', and 'float16'.`);if("float32"!==l)throw new Error(`Weight ${c.name} is quantized with ${n.dtype} which only supports weights of type float32 not ${l}.`)}const r=i.a[n.dtype],o=e.slice(u,u+p*r),a="uint8"===n.dtype?new Uint8Array(o):new Uint16Array(o);if("float32"===l)if("uint8"===n.dtype||"uint16"===n.dtype){h=new Float32Array(a.length);for(let e=0;e<a.length;e++){const t=a[e];h[e]=t*n.scale+n.min}}else{if("float16"!==n.dtype)throw new Error(`Unsupported quantization type ${n.dtype} for weight type float32.`);void 0===s&&(s=v()),h=s(a)}else{if("int32"!==l)throw new Error(`Unsupported dtype in weight '${t}': ${l}`);if("uint8"!==n.dtype&&"uint16"!==n.dtype)throw new Error(`Unsupported quantization type ${n.dtype} for weight type int32.`);h=new Int32Array(a.length);for(let e=0;e<a.length;e++){const t=a[e];h[e]=Math.round(t*n.scale+n.min)}}u+=p*r}else if("string"===l){const t=Object(a.O)(c.shape);h=[];for(let n=0;n<t;n++){const t=new Uint32Array(e.slice(u,u+4))[0];u+=4;const n=new Uint8Array(e.slice(u,u+t));h.push(n),u+=t}}else{const a=i.a[l],s=e.slice(u,u+p*a);if("float32"===l)h=new Float32Array(s);else if("int32"===l)h=new Int32Array(s);else if("bool"===l)h=new Uint8Array(s);else{if("complex64"!==l)throw new Error(`Unsupported dtype in weight '${t}': ${l}`);{h=new Float32Array(s);const e=new Float32Array(h.length/2),a=new Float32Array(h.length/2);for(let t=0;t<e.length;t++)e[t]=h[2*t],a[t]=h[2*t+1];const i=Object(o.a)(e,d,"float32"),u=Object(o.a)(a,d,"float32");n[t]=Object(r.a)(i,u),i.dispose(),u.dispose()}}u+=p*a}"complex64"!==l&&(n[t]=Object(o.a)(h,d,l))}return n}function c(e){if(null===e)throw new Error("Invalid input value: "+JSON.stringify(e));let t=0;const n=[];e.forEach(e=>{if(t+=e.byteLength,n.push(e.byteLength===e.buffer.byteLength?e:new e.constructor(e)),!(e instanceof Float32Array||e instanceof Int32Array||e instanceof Uint8Array))throw new Error("Unsupported TypedArray subtype: "+e.constructor.name)});const r=new Uint8Array(t);let o=0;return n.forEach(e=>{r.set(new Uint8Array(e.buffer),o),o+=e.byteLength}),r.buffer}const l=void 0!==e&&("undefined"==typeof Blob||"undefined"==typeof atob||"undefined"==typeof btoa);function d(t){return l?e.byteLength(t):new Blob([t]).size}function p(t){if(l)return e.from(t).toString("base64");const n=new Uint8Array(t);let r="";for(let e=0,t=n.length;e<t;e++)r+=String.fromCharCode(n[e]);return btoa(r)}function h(t){if(l){const n=e.from(t,"base64");return n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength)}const n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;++e)r.set([n.charCodeAt(e)],e);return r.buffer}function f(e){if(1===e.length)return e[0];let t=0;e.forEach(e=>{t+=e.byteLength});const n=new Uint8Array(t);let r=0;return e.forEach(e=>{n.set(new Uint8Array(e),r),r+=e.byteLength}),n.buffer}function m(e){for(e=e.trim();e.endsWith("/");)e=e.slice(0,e.length-1);const t=e.split("/");return t[t.length-1]}function g(e,t){const n={modelTopology:e.modelTopology,format:e.format,generatedBy:e.generatedBy,convertedBy:e.convertedBy,weightsManifest:t};return null!=e.signature&&(n.signature=e.signature),null!=e.userDefinedMetadata&&(n.userDefinedMetadata=e.userDefinedMetadata),null!=e.modelInitializer&&(n.modelInitializer=e.modelInitializer),null!=e.trainingConfig&&(n.trainingConfig=e.trainingConfig),n}async function b(e,t){const n={modelTopology:e.modelTopology,format:e.format,generatedBy:e.generatedBy,convertedBy:e.convertedBy};if(null!=e.trainingConfig&&(n.trainingConfig=e.trainingConfig),null!=e.weightsManifest){const[r,o]=await t(e.weightsManifest);n.weightSpecs=r,n.weightData=o}return null!=e.signature&&(n.signature=e.signature),null!=e.userDefinedMetadata&&(n.userDefinedMetadata=e.userDefinedMetadata),null!=e.modelInitializer&&(n.modelInitializer=e.modelInitializer),n}function y(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("Expected JSON model topology, received ArrayBuffer.");return{dateSaved:new Date,modelTopologyType:"JSON",modelTopologyBytes:null==e.modelTopology?0:d(JSON.stringify(e.modelTopology)),weightSpecsBytes:null==e.weightSpecs?0:d(JSON.stringify(e.weightSpecs)),weightDataBytes:null==e.weightData?0:e.weightData.byteLength}}function v(){const e=function(){const e=e=>{let t=e<<13,n=0;for(;0==(8388608&t);)n-=8388608,t<<=1;return t&=-8388609,n+=947912704,t|n},t=new Uint32Array(2048);t[0]=0;for(let n=1;n<1024;n++)t[n]=e(n);for(let e=1024;e<2048;e++)t[e]=939524096+(e-1024<<13);return t}(),t=function(){const e=new Uint32Array(64);e[0]=0,e[31]=1199570944,e[32]=2147483648,e[63]=3347054592;for(let t=1;t<31;t++)e[t]=t<<23;for(let t=33;t<63;t++)e[t]=2147483648+(t-32<<23);return e}(),n=function(){const e=new Uint32Array(64);for(let t=0;t<64;t++)e[t]=1024;return e[0]=e[32]=0,e}();return r=>{const o=new ArrayBuffer(4*r.length),a=new Uint32Array(o);for(let o=0;o<r.length;o++){const i=r[o],s=e[n[i>>10]+(1023&i)]+t[i>>10];a[o]=s}return new Float32Array(o)}}}).call(this,n(319).Buffer)},function(e,t){var n=Function.prototype.call;e.exports=n.bind?n.bind(n):function(){return n.apply(n,arguments)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(22),i=n(3),s=n(4);const u=Object(s.a)({add_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){let n=Object(i.a)(e,"a","add"),s=Object(i.a)(t,"b","add");[n,s]=Object(a.b)(n,s);const u={a:n,b:s};return r.a.runKernel(o.d,u)}})},function(e,t,n){"use strict";
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+var r;n.d(t,"a",(function(){return r})),function(e){e[e.NONE=0]="NONE",e[e.MEAN=1]="MEAN",e[e.SUM=2]="SUM",e[e.SUM_BY_NONZERO_WEIGHTS=3]="SUM_BY_NONZERO_WEIGHTS"}(r||(r={}))},function(e,t,n){e.exports=n(475)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({slice_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n){const i=Object(a.a)(e,"x","slice","string_or_numeric");if(0===i.rank)throw new Error("Slicing scalar is not possible");const s={x:i},u={begin:t,size:n};return r.a.runKernel(o.Bc,s,u)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(22),i=n(3),s=n(4);const u=Object(s.a)({matMul_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n=!1,s=!1){let u=Object(i.a)(e,"a","matMul"),c=Object(i.a)(t,"b","matMul");[u,c]=Object(a.b)(u,c);const l={a:u,b:c},d={transposeA:n,transposeB:s};return r.a.runKernel(o.s,l,d)}})},function(e,t,n){var r=n(242),o=n(123);e.exports=function(e){return r(o(e))}},function(e,t,n){n(71);var r=n(429),o=n(14),a=n(92),i=n(73),s=n(113),u=n(24)("toStringTag");for(var c in r){var l=o[c],d=l&&l.prototype;d&&a(d)!==u&&i(d,u,c),s[c]=s.Array}},function(e,t,n){e.exports=n(351)},function(e,t,n){e.exports=n(495)},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),o=n(6),a=n(22),i=n(3),s=n(371),u=n(4);const c=Object(u.a)({div_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){let n=Object(i.a)(e,"a","div"),u=Object(i.a)(t,"b","div");if([n,u]=Object(a.b)(n,u),"int32"===n.dtype&&"int32"===u.dtype)return Object(s.a)(n,u);const c={a:n,b:u};return r.a.runKernel(o.hc,c,{})}})},function(e,t){e.exports=!0},function(e,t,n){"use strict";var r=n(65),o=n(246),a=n(113),i=n(74),s=n(54).f,u=n(210),c=n(70),l=n(39),d=i.set,p=i.getterFor("Array Iterator");e.exports=u(Array,"Array",(function(e,t){d(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=p(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");var h=a.Arguments=a.Array;if(o("keys"),o("values"),o("entries"),!c&&l&&"values"!==h.name)try{s(h,"name",{value:"values"})}catch(e){}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(5);n(42),n(3),n(9);function o(e){return r.a.customGrad(e)}},function(e,t,n){var r=n(39),o=n(54),a=n(91);e.exports=r?function(e,t,n){return o.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r,o,a,i=n(289),s=n(14),u=n(17),c=n(26),l=n(73),d=n(33),p=n(201),h=n(162),f=n(134),m=s.TypeError,g=s.WeakMap;if(i||p.state){var b=p.state||(p.state=new g),y=u(b.get),v=u(b.has),x=u(b.set);r=function(e,t){if(v(b,e))throw new m("Object already initialized");return t.facade=e,x(b,e,t),t},o=function(e){return y(b,e)||{}},a=function(e){return v(b,e)}}else{var w=h("state");f[w]=!0,r=function(e,t){if(d(e,w))throw new m("Object already initialized");return t.facade=e,l(e,w,t),t},o=function(e){return d(e,w)?e[w]:{}},a=function(e){return d(e,w)}}e.exports={set:r,get:o,has:a,enforce:function(e){return a(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=o(t)).type!==e)throw m("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(25),o=n(249),a=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(o(e),t)}},function(e,t,n){"use strict";n.d(t,"c",(function(){return f})),n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return g})),n.d(t,"d",(function(){return b}));var r=n(35),o=n(388),a=n(391),i=n(23),s=n(390),u=n(190),c=n(389),l=n(12),d=n(372),p=n(387),h=n(38);
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function f(e,t,n){if(null==n||"linear"===n)return e;if("relu"===n)return Object(i.a)(e,Object(p.a)(t));throw new Error(`Cannot compute gradient for fused activation ${n}.`)}function m(e,t){let n=t;const o=r.getReductionAxes(e.shape,t.shape);return o.length>0&&(n=Object(h.a)(n,o)),Object(l.a)(n,e.shape)}function g(e,t,n,r){if("linear"===t)return e;if("relu"===t)return Object(u.a)(e);if("elu"===t)return Object(o.a)(e);if("relu6"===t)return Object(c.a)(e);if("prelu"===t)return Object(s.a)(e,n);if("leakyrelu"===t)return Object(a.a)(e,r);if("sigmoid"===t)return Object(d.a)(e);throw new Error(`Unknown fused activation ${t}.`)}const b=(e,t)=>!(e>0)||"linear"===t},,function(e,t,n){var r=n(39),o=n(50),a=n(181),i=n(91),s=n(65),u=n(154),c=n(33),l=n(281),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=s(e),t=u(t),l)try{return d(e,t)}catch(e){}if(c(e,t))return i(!o(a.f,e,t),e[t])}},function(e,t,n){var r=n(14),o=n(27),a=n(156),i=r.TypeError;e.exports=function(e){if(o(e))return e;throw i(a(e)+" is not a function")}},function(e,t,n){var r=n(14),o=n(123),a=r.Object;e.exports=function(e){return a(o(e))}},function(e,t,n){var r=n(17),o=n(79),a=n(132),i=r(r.bind);e.exports=function(e,t){return o(e),void 0===t?e:a?i(e,t):function(){return e.apply(t,arguments)}}},function(e,t){},function(e,t,n){var r=n(81),o=n(17),a=n(242),i=n(80),s=n(100),u=n(284),c=o([].push),l=function(e){var t=1==e,n=2==e,o=3==e,l=4==e,d=6==e,p=7==e,h=5==e||d;return function(f,m,g,b){for(var y,v,x=i(f),w=a(x),O=r(m,g),k=s(w),S=0,T=b||u,C=t?T(f,k):n||p?T(f,0):void 0;k>S;S++)if((h||S in w)&&(v=O(y=w[S],S,x),e))if(t)C[S]=v;else if(v)switch(e){case 3:return!0;case 5:return y;case 6:return S;case 2:c(C,y)}else switch(e){case 4:return!1;case 7:c(C,y)}return d?-1:o||l?l:C}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},function(e,t,n){var r=n(45);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(16),o=n(186),a=r.String;e.exports=function(e){if("Symbol"===o(e))throw TypeError("Cannot convert a Symbol value to a string");return a(e)}},function(e,t,n){var r=n(610),o=n(616);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=r(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(176).default,o=n(7);e.exports=function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return o(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(3),o=n(9),a=n(152);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function i(e,t){Object(o.d)(e);const n=Object(r.c)(e,t);if(1!==n.length)throw new Error("tensor1d() requires values to be a flat/TypedArray");return Object(a.a)(e,null,n,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({abs_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t=Object(a.a)(e,"x","abs");if("complex64"===t.dtype){const e={x:t};return r.a.runKernel(o.A,e)}{const e={x:t};return r.a.runKernel(o.a,e)}}})},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var u,c=[],l=!1,d=-1;function p(){l&&u&&(l=!1,u.length?c=u.concat(c):d=-1,c.length&&h())}function h(){if(!l){var e=s(p);l=!0;for(var t=c.length;t;){for(u=c,c=[];++d<t;)u&&u[d].run();d=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new f(e,t)),1!==c.length||l||s(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(14),o=n(205),a=n(27),i=n(99),s=n(24)("toStringTag"),u=r.Object,c="Arguments"==i(function(){return arguments}());e.exports=o?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=u(e),s))?n:c?i(t):"Object"==(r=i(t))&&a(t.callee)?"Arguments":r}},function(e,t,n){var r=n(14),o=n(92),a=r.String;e.exports=function(e){if("Symbol"===o(e))throw TypeError("Cannot convert a Symbol value to a string");return a(e)}},function(e,t,n){var r,o=n(47),a=n(243),i=n(208),s=n(134),u=n(286),c=n(202),l=n(162),d=l("IE_PROTO"),p=function(){},h=function(e){return"<script>"+e+"<\/script>"},f=function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t},m=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t;m="undefined"!=typeof document?document.domain&&r?f(r):((t=c("iframe")).style.display="none",u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F):f(r);for(var n=i.length;n--;)delete m.prototype[i[n]];return m()};s[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(p.prototype=o(e),n=new p,p.prototype=null,n[d]=e):n=m(),void 0===t?n:a.f(n,t)}},function(e,t,n){var r=n(16),o=n(43),a=n(75),i=n(124),s=n(216),u=n(184),c=n(166),l=n(185).CONFIGURABLE,d=c.get,p=c.enforce,h=String(String).split("String");(e.exports=function(e,t,n,u){var c,d=!!u&&!!u.unsafe,f=!!u&&!!u.enumerable,m=!!u&&!!u.noTargetGet,g=u&&void 0!==u.name?u.name:t;o(n)&&("Symbol("===String(g).slice(0,7)&&(g="["+String(g).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!a(n,"name")||l&&n.name!==g)&&i(n,"name",g),(c=p(n)).source||(c.source=h.join("string"==typeof g?g:""))),e!==r?(d?!m&&e[t]&&(f=!0):delete e[t],f?e[t]=n:i(e,t,n)):f?e[t]=n:s(t,n)})(Function.prototype,"toString",(function(){return o(this)&&d(this).source||u(this)}))},function(e,t,n){var r=n(43);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(129),u=n(4);const c=Object(u.a)({concat_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=0){Object(i.b)(e.length>=1,()=>"Pass at least one tensor to concat");const n=Object(a.b)(e,"tensors","concat","string_or_numeric");if("complex64"===n[0].dtype&&n.forEach(e=>{if("complex64"!==e.dtype)throw new Error(`Cannot concatenate complex64 tensors with a tensor\n          with dtype ${e.dtype}. `)}),1===n.length)return Object(s.a)(n[0]);const u=n,c={axis:t};return r.a.runKernel(o.B,u,c)}})},function(e,t,n){var r=n(132),o=Function.prototype,a=o.apply,i=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?i.bind(a):function(){return i.apply(a,arguments)})},function(e,t,n){var r=n(17),o=r({}.toString),a=r("".slice);e.exports=function(e){return a(o(e),8,-1)}},function(e,t,n){var r=n(203);e.exports=function(e){return r(e.length)}},function(e,t,n){var r=n(73);e.exports=function(e,t,n,o){o&&o.enumerable?e[t]=n:r(e,t,n)}},function(e,t,n){var r=n(205),o=n(54).f,a=n(73),i=n(33),s=n(410),u=n(24)("toStringTag");e.exports=function(e,t,n,c){if(e){var l=n?e:e.prototype;i(l,u)||o(l,u,{configurable:!0,value:t}),c&&!r&&a(l,"toString",s)}}},function(e,t,n){var r=n(14),o=n(81),a=n(50),i=n(47),s=n(156),u=n(295),c=n(100),l=n(34),d=n(247),p=n(146),h=n(296),f=r.TypeError,m=function(e,t){this.stopped=e,this.result=t},g=m.prototype;e.exports=function(e,t,n){var r,b,y,v,x,w,O,k=n&&n.that,S=!(!n||!n.AS_ENTRIES),T=!(!n||!n.IS_ITERATOR),C=!(!n||!n.INTERRUPTED),E=o(t,k),I=function(e){return r&&h(r,"normal",e),new m(!0,e)},j=function(e){return S?(i(e),C?E(e[0],e[1],I):E(e[0],e[1])):C?E(e,I):E(e)};if(T)r=e;else{if(!(b=p(e)))throw f(s(e)+" is not iterable");if(u(b)){for(y=0,v=c(e);v>y;y++)if((x=j(e[y]))&&l(g,x))return x;return new m(!1)}r=d(e,b)}for(w=r.next;!(O=a(w,r)).done;){try{x=j(O.value)}catch(e){h(r,"throw",e)}if("object"==typeof x&&x&&l(g,x))return x}return new m(!1)}},function(e,t,n){var r=n(213),o=n(95),a=n(474);r||o(Object.prototype,"toString",a,{unsafe:!0})},function(e,t,n){var r=n(16).TypeError;e.exports=function(e){if(null==e)throw r("Can't call method on "+e);return e}},function(e,t,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,a=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,a),r(n)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}b(e,t,a,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&b(e,"error",t,n)}(e,o,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var o,a,i,s;if(c(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),i=a[t]),void 0===i)i=a[t]=n,++e._eventsCount;else if("function"==typeof i?i=a[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(o=l(e))>0&&i.length>o&&!i.warned){i.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=i.length,s=u,console&&console.warn&&console.warn(s)}return e}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=p.bind(r);return o.listener=n,r.wrapFn=o,o}function f(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):g(o,o.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function b(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(a){r.once&&e.removeEventListener(t,o),n(a)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)a(u,this,t);else{var c=u.length,l=g(u,c);for(n=0;n<c;++n)a(l[n],this,t)}return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return c(t),this.on(e,h(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,h(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,o,a,i;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){i=n[a].listener,o=a;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,i||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(o=a[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return f(this,e,!0)},s.prototype.rawListeners=function(e){return f(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},,function(e,t,n){var r=n(844);function o(e,t,n,o,a,i,s){try{var u=e[i](s),c=u.value}catch(e){return void n(e)}u.done?t(c):r.resolve(c).then(o,a)}e.exports=function(e){return function(){var t=this,n=arguments;return new r((function(r,a){var i=e.apply(t,n);function s(e){o(i,r,a,s,u,"next",e)}function u(e){o(i,r,a,s,u,"throw",e)}s(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(347).charAt,o=n(93),a=n(74),i=n(210),s=a.set,u=a.getterFor("String Iterator");i(String,"String",(function(e){s(this,{type:"String Iterator",string:o(e),index:0})}),(function(){var e,t=u(this),n=t.string,o=t.index;return o>=n.length?{value:void 0,done:!0}:(e=r(n,o),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){e.exports=n(483)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return C})),n.d(t,"i",(function(){return I})),n.d(t,"c",(function(){return j})),n.d(t,"f",(function(){return N})),n.d(t,"e",(function(){return _})),n.d(t,"d",(function(){return $})),n.d(t,"k",(function(){return D})),n.d(t,"g",(function(){return M})),n.d(t,"h",(function(){return P})),n.d(t,"j",(function(){return L})),n.d(t,"b",(function(){return B}));var r=n(0),o=n(143),a=n(231),i=n(1),s=n(734),u=n(735),c=n(736),l=n(737),d=n(738),p=n(739),h=n(740),f=n(741),m=n(742),g=n(743),b=n(744),y=n(745),v=n(746),x=n(747),w=n(748),O=n(749),k=n(750),S=n(751),T=n(752);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class C{static get Instance(){return this._instance||(this._instance=new this)}constructor(){const e=[].concat(...[s,u,c,l,d,p,h,f,m,g,b,y,v,x,w,O,k,S,T].map(e=>e.json));this.opMappers=e.reduce((e,t)=>(e[t.tfOpName]=t,e),{})}transformGraph(e,t={}){const n=e.node,r=[],o=[],a=[],s=n.reduce((e,t)=>(e[t.name]=this.mapNode(t),t.op.startsWith("Placeholder")?r.push(e[t.name]):"Const"===t.op?o.push(e[t.name]):null!=t.input&&0!==t.input.length||a.push(e[t.name]),e),{});let u=[];const c=[];let l={},d={};null!=t&&(l=this.mapSignatureEntries(t.inputs),d=this.mapSignatureEntries(t.outputs));const p=Object.keys(s);p.forEach(e=>{const t=s[e];t.inputNames.forEach((e,n)=>{const[r,,o]=Object(i.b)(e),a=s[r];if(null!=a.outputs){const e=a.outputs.indexOf(o);if(-1!==e){const o=`${r}:${e}`;t.inputNames[n]=o}}t.inputs.push(a),a.children.push(t)})}),0===Object.keys(d).length?p.forEach(e=>{const t=s[e];0===t.children.length&&c.push(t)}):Object.keys(d).forEach(e=>{const[t]=Object(i.b)(e),n=s[t];null!=n&&(n.signatureKey=d[e],c.push(n))}),Object.keys(l).length>0?Object.keys(l).forEach(e=>{const[t]=Object(i.b)(e),n=s[t];n&&(n.signatureKey=l[e],u.push(n))}):u=r;let h={};null!=e.library&&null!=e.library.function&&(h=e.library.function.reduce((e,t)=>(e[t.signature.name]=this.mapFunction(t),e),{}));const f={nodes:s,inputs:u,outputs:c,weights:o,placeholders:r,signature:t,functions:h};return a.length>0&&(f.initNodes=a),f}mapSignatureEntries(e){return Object.keys(e||{}).reduce((t,n)=>(t[e[n].name]=n,t),{})}mapNode(e){const t=Object(a.a)(e.op)||this.opMappers[e.op]||{};null==e.attr&&(e.attr={});const n={name:e.name,op:e.op,category:t.category,inputNames:(e.input||[]).map(e=>e.startsWith("^")?e.substr(1):e),inputs:[],children:[],inputParams:{},attrParams:{},rawAttrs:e.attr,outputs:t.outputs};return null!=t.inputs&&(n.inputParams=t.inputs.reduce((e,t)=>(e[t.name]={type:t.type,inputIndexStart:t.start,inputIndexEnd:t.end},e),{})),null!=t.attrs&&(n.attrParams=t.attrs.reduce((t,n)=>{const r=n.type;let o=void 0;switch(n.type){case"string":o=I(e.attr,n.tfName,n.defaultValue),void 0===o&&n.tfDeprecatedName&&(o=I(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"string[]":o=P(e.attr,n.tfName,n.defaultValue),void 0===o&&n.tfDeprecatedName&&(o=P(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"number":o=N(e.attr,n.tfName,n.defaultValue||0),void 0===o&&n.tfDeprecatedName&&(o=N(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"number[]":o=M(e.attr,n.tfName,n.defaultValue),void 0===o&&n.tfDeprecatedName&&(o=M(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"bool":o=j(e.attr,n.tfName,n.defaultValue),void 0===o&&n.tfDeprecatedName&&(o=j(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"bool[]":o=B(e.attr,n.tfName,n.defaultValue),void 0===o&&n.tfDeprecatedName&&(o=B(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"shape":o=D(e.attr,n.tfName,n.defaultValue),void 0===o&&n.tfDeprecatedName&&(o=D(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"shape[]":o=L(e.attr,n.tfName,n.defaultValue),void 0===o&&n.tfDeprecatedName&&(o=L(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"dtype":o=_(e.attr,n.tfName,n.defaultValue),void 0===o&&n.tfDeprecatedName&&(o=_(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"dtype[]":o=$(e.attr,n.tfName,n.defaultValue),void 0===o&&n.tfDeprecatedName&&(o=$(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"func":o=R(e.attr,n.tfName,n.defaultValue),void 0===o&&n.tfDeprecatedName&&(o=R(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"tensor":case"tensors":break;default:throw new Error(`Unsupported param type: ${n.type} for op: ${e.op}`)}return t[n.name]={value:o,type:r},t},{})),n}mapFunction(e){const t=e.nodeDef,n=[];let r={};null!=t&&(r=t.reduce((e,t)=>(e[t.name]=this.mapNode(t),"Const"===t.op&&n.push(e[t.name]),e),{}));const o=[],a=[];e.signature.inputArg.forEach(e=>{const[t]=Object(i.b)(e.name),n={name:t,op:"Placeholder",inputs:[],inputNames:[],category:"graph",inputParams:{},attrParams:{dtype:{value:A(e.type),type:"dtype"}},children:[]};n.signatureKey=e.name,o.push(n),r[t]=n});Object.keys(r).forEach(e=>{const t=r[e];t.inputNames.forEach((e,n)=>{const[o,,a]=Object(i.b)(e),s=r[o];if(null!=s.outputs){const e=s.outputs.indexOf(a);if(-1!==e){const r=`${o}:${e}`;t.inputNames[n]=r}}t.inputs.push(s),s.children.push(t)})});const s=e.ret;e.signature.outputArg.forEach(e=>{const[t,n]=Object(i.b)(s[e.name]),o=r[t];null!=o&&(o.defaultOutput=n,a.push(o))});const u=this.mapArgsToSignature(e);return{nodes:r,inputs:o,outputs:a,weights:n,placeholders:[],signature:u}}mapArgsToSignature(e){return{methodName:e.signature.name,inputs:e.signature.inputArg.reduce((e,t)=>(e[t.name]=this.mapArgToTensorInfo(t),e),{}),outputs:e.signature.outputArg.reduce((t,n)=>(t[n.name]=this.mapArgToTensorInfo(n,e.ret),t),{})}}mapArgToTensorInfo(e,t){let n=e.name;return null!=t&&(n=t[n]),{name:n,dtype:e.type}}}function E(t,n){const o=Array.isArray(t)?String.fromCharCode.apply(null,t):function(t){const n=Object(r.zd)().global;if(void 0!==n.atob)return n.atob(t);if(void 0!==e)return new e(t,"base64").toString();throw new Error("Unable to decode base64 in this environment. Missing built-in atob() or Buffer()")}(t);return n?o:o.toLowerCase()}function I(e,t,n,r=!1){const o=e[t];return null!=o?E(o.s,r):n}function j(e,t,n){const r=e[t];return r?r.b:n}function N(e,t,n){const r=e[t]||{},o=null!=r.i?r.i:null!=r.f?r.f:n;return"number"==typeof o?o:parseInt(o,10)}function A(e){switch("string"==typeof e&&(e=o.a[e]),e){case o.a.DT_FLOAT:case o.a.DT_HALF:return"float32";case o.a.DT_INT32:case o.a.DT_INT64:case o.a.DT_INT8:case o.a.DT_UINT8:return"int32";case o.a.DT_BOOL:return"bool";case o.a.DT_DOUBLE:return"float32";case o.a.DT_STRING:return"string";default:return null}}function R(e,t,n){const r=e[t];return r&&r.func?r.func.name:n}function _(e,t,n){const r=e[t];return r&&r.type?A(r.type):n}function $(e,t,n){const r=e[t];return r&&r.list&&r.list.type?r.list.type.map(e=>A(e)):n}function F(e){if(!e.unknownRank)return null!=e.dim?e.dim.map(e=>"number"==typeof e.size?e.size:parseInt(e.size,10)):[]}function D(e,t,n){const r=e[t];return r&&r.shape?F(r.shape):n}function M(e,t,n){const r=e[t];return r?((r.list.f&&r.list.f.length?r.list.f:r.list.i)||[]).map(e=>"number"==typeof e?e:parseInt(e,10)):n}function P(e,t,n,r=!1){const o=e[t];return o&&o.list&&o.list.s?o.list.s.map(e=>E(e,r)):n}function L(e,t,n){const r=e[t];return r&&r.list&&r.list.shape?r.list.shape.map(e=>F(e)):n}function B(e,t,n){const r=e[t];return r&&r.list&&r.list.b?r.list.b:n}}).call(this,n(319).Buffer)},function(e,t,n){var r=n(99);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t){e.exports={}},function(e,t,n){var r=n(16),o=n(43),a=function(e){return o(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?a(r[e]):r[e]&&r[e][t]}},function(e,t,n){var r=n(16),o=n(84),a=n(309),i=n(49),s=n(310),u=r.TypeError,c=Object.defineProperty;t.f=o?c:function(e,t,n){if(i(e),t=s(t),i(n),a)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw u("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(218);e.exports=function(e,t){var n=e[t];return null==n?void 0:r(n)}},function(e,t,n){function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n)for(var r=0,o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t);return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){var r,o=n(557),a=n(318),i=n(558),s=n(559),u=n(560);"undefined"!=typeof ArrayBuffer&&(r=n(561));var c="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),l="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),d=c||l;t.protocol=3;var p=t.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},h=o(p),f={type:"error",data:"parser error"},m=n(562);function g(e,t,n){for(var r=new Array(e.length),o=s(e.length,n),a=function(e,n,o){t(n,(function(t,n){r[e]=n,o(t,r)}))},i=0;i<e.length;i++)a(i,e[i],o)}t.encodePacket=function(e,n,r,o){"function"==typeof n&&(o=n,n=!1),"function"==typeof r&&(o=r,r=null);var a=void 0===e.data?void 0:e.data.buffer||e.data;if("undefined"!=typeof ArrayBuffer&&a instanceof ArrayBuffer)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var o=e.data,a=new Uint8Array(o),i=new Uint8Array(1+o.byteLength);i[0]=p[e.type];for(var s=0;s<a.length;s++)i[s+1]=a[s];return r(i.buffer)}(e,n,o);if(void 0!==m&&a instanceof m)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);if(d)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var o=new FileReader;return o.onload=function(){t.encodePacket({type:e.type,data:o.result},n,!0,r)},o.readAsArrayBuffer(e.data)}(e,n,r);var o=new Uint8Array(1);o[0]=p[e.type];var a=new m([o.buffer,e.data]);return r(a)}(e,n,o);if(a&&a.base64)return function(e,n){var r="b"+t.packets[e.type]+e.data.data;return n(r)}(e,o);var i=p[e.type];return void 0!==e.data&&(i+=r?u.encode(String(e.data),{strict:!1}):String(e.data)),o(""+i)},t.encodeBase64Packet=function(e,n){var r,o="b"+t.packets[e.type];if(void 0!==m&&e.data instanceof m){var a=new FileReader;return a.onload=function(){var e=a.result.split(",")[1];n(o+e)},a.readAsDataURL(e.data)}try{r=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(t){for(var i=new Uint8Array(e.data),s=new Array(i.length),u=0;u<i.length;u++)s[u]=i[u];r=String.fromCharCode.apply(null,s)}return o+=btoa(r),n(o)},t.decodePacket=function(e,n,r){if(void 0===e)return f;if("string"==typeof e){if("b"===e.charAt(0))return t.decodeBase64Packet(e.substr(1),n);if(r&&!1===(e=function(e){try{e=u.decode(e,{strict:!1})}catch(e){return!1}return e}(e)))return f;var o=e.charAt(0);return Number(o)==o&&h[o]?e.length>1?{type:h[o],data:e.substring(1)}:{type:h[o]}:f}o=new Uint8Array(e)[0];var a=i(e,1);return m&&"blob"===n&&(a=new m([a])),{type:h[o],data:a}},t.decodeBase64Packet=function(e,t){var n=h[e.charAt(0)];if(!r)return{type:n,data:{base64:!0,data:e.substr(1)}};var o=r.decode(e.substr(1));return"blob"===t&&m&&(o=new m([o])),{type:n,data:o}},t.encodePayload=function(e,n,r){"function"==typeof n&&(r=n,n=null);var o=a(e);if(n&&o)return m&&!d?t.encodePayloadAsBlob(e,r):t.encodePayloadAsArrayBuffer(e,r);if(!e.length)return r("0:");g(e,(function(e,r){t.encodePacket(e,!!o&&n,!1,(function(e){r(null,function(e){return e.length+":"+e}(e))}))}),(function(e,t){return r(t.join(""))}))},t.decodePayload=function(e,n,r){if("string"!=typeof e)return t.decodePayloadAsBinary(e,n,r);var o;if("function"==typeof n&&(r=n,n=null),""===e)return r(f,0,1);for(var a,i,s="",u=0,c=e.length;u<c;u++){var l=e.charAt(u);if(":"===l){if(""===s||s!=(a=Number(s)))return r(f,0,1);if(s!=(i=e.substr(u+1,a)).length)return r(f,0,1);if(i.length){if(o=t.decodePacket(i,n,!1),f.type===o.type&&f.data===o.data)return r(f,0,1);if(!1===r(o,u+a,c))return}u+=a,s=""}else s+=l}return""!==s?r(f,0,1):void 0},t.encodePayloadAsArrayBuffer=function(e,n){if(!e.length)return n(new ArrayBuffer(0));g(e,(function(e,n){t.encodePacket(e,!0,!0,(function(e){return n(null,e)}))}),(function(e,t){var r=t.reduce((function(e,t){var n;return e+(n="string"==typeof t?t.length:t.byteLength).toString().length+n+2}),0),o=new Uint8Array(r),a=0;return t.forEach((function(e){var t="string"==typeof e,n=e;if(t){for(var r=new Uint8Array(e.length),i=0;i<e.length;i++)r[i]=e.charCodeAt(i);n=r.buffer}o[a++]=t?0:1;var s=n.byteLength.toString();for(i=0;i<s.length;i++)o[a++]=parseInt(s[i]);o[a++]=255;for(r=new Uint8Array(n),i=0;i<r.length;i++)o[a++]=r[i]})),n(o.buffer)}))},t.encodePayloadAsBlob=function(e,n){g(e,(function(e,n){t.encodePacket(e,!0,!0,(function(e){var t=new Uint8Array(1);if(t[0]=1,"string"==typeof e){for(var r=new Uint8Array(e.length),o=0;o<e.length;o++)r[o]=e.charCodeAt(o);e=r.buffer,t[0]=0}var a=(e instanceof ArrayBuffer?e.byteLength:e.size).toString(),i=new Uint8Array(a.length+1);for(o=0;o<a.length;o++)i[o]=parseInt(a[o]);if(i[a.length]=255,m){var s=new m([t.buffer,i.buffer,e]);n(null,s)}}))}),(function(e,t){return n(new m(t))}))},t.decodePayloadAsBinary=function(e,n,r){"function"==typeof n&&(r=n,n=null);for(var o=e,a=[];o.byteLength>0;){for(var s=new Uint8Array(o),u=0===s[0],c="",l=1;255!==s[l];l++){if(c.length>310)return r(f,0,1);c+=s[l]}o=i(o,2+c.length),c=parseInt(c);var d=i(o,0,c);if(u)try{d=String.fromCharCode.apply(null,new Uint8Array(d))}catch(e){var p=new Uint8Array(d);d="";for(l=0;l<p.length;l++)d+=String.fromCharCode(p[l])}a.push(d),o=i(o,c)}var h=a.length;a.forEach((function(e,o){r(t.decodePacket(e,n,!0),o,h)}))}},function(e,t,n){e.exports=n(278)},function(e,t,n){e.exports=n(479)},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(4);const u=Object(s.a)({complex_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){const n=Object(a.a)(e,"real","complex"),s=Object(a.a)(t,"imag","complex");i.e(n.shape,s.shape,`real and imag shapes, ${n.shape} and ${s.shape}, must match in call to tf.complex().`);const u={real:n,imag:s};return r.a.runKernel(o.z,u)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(42),o=n(9);
+/**
+ * @license
+ * Copyright 2020 Google Inc. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function a(e,t="float32",n){return t=t||"float32",o.c(e),new r.b(e,t,n)}},function(e,t,n){var r=n(14).TypeError;e.exports=function(e){if(null==e)throw r("Can't call method on "+e);return e}},function(e,t,n){var r=n(84),o=n(115),a=n(251);e.exports=r?function(e,t,n){return o.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(84),o=n(185).EXISTS,a=n(25),i=n(115).f,s=Function.prototype,u=a(s.toString),c=/^\s*function ([^ (]*)/,l=a(c.exec);r&&!o&&i(s,"name",{configurable:!0,get:function(){try{return l(c,u(this))[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(221),o=n(169);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(e,t,n){var r=n(312),o=n(105);e.exports=function(e){return r(o(e))}},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({clone_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","clone","string_or_numeric")};return r.a.runKernel(o.pb,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({exp_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","exp")};return r.a.runKernel(o.Y,t)}})},function(e,t,n){e.exports=n(499)},function(e,t,n){var r=n(20);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},function(e,t,n){var r=n(56);e.exports=r("navigator","userAgent")||""},function(e,t){e.exports={}},function(e,t,n){var r=n(17);e.exports=r([].slice)},function(e,t,n){var r=n(14),o=n(33),a=n(27),i=n(80),s=n(162),u=n(292),c=s("IE_PROTO"),l=r.Object,d=l.prototype;e.exports=u?l.getPrototypeOf:function(e){var t=i(e);if(o(t,c))return t[c];var n=t.constructor;return a(n)&&t instanceof n?n.prototype:t instanceof l?d:null}},function(e,t,n){var r=n(14),o=n(34),a=r.TypeError;e.exports=function(e,t){if(o(t,e))return e;throw a("Incorrect invocation")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),o=n(6),a=n(3),i=n(276),s=n(35),u=n(4);const c=Object(u.a)({where_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n){const u=Object(a.a)(t,"a","where"),c=Object(a.a)(n,"b","where"),l=Object(a.a)(e,"condition","where","bool"),d=Object(s.assertAndGetBroadcastShape)(Object(s.assertAndGetBroadcastShape)(l.shape,u.shape),c.shape),p={condition:Object(i.a)(l,d),t:Object(i.a)(u,d),e:Object(i.a)(c,d)};return r.a.runKernel(o.vc,p)}})},function(e,t,n){e.exports=n(578)},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(19);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function o(...e){Object(r.b)().getBool("IS_TEST")||Object(r.b)().getBool("PROD")||console.warn(...e)}function a(...e){Object(r.b)().getBool("IS_TEST")||Object(r.b)().getBool("PROD")||console.log(...e)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return u})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return l}));n(19);var r=n(240),o=n(140);
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const a=Object(r.a)("kernelRegistry",()=>new Map),i=Object(r.a)("gradRegistry",()=>new Map);function s(e,t){const n=d(e,t);return a.get(n)}function u(e){return i.get(e)}function c(e){const t=a.entries(),n=[];for(;;){const{done:r,value:o}=t.next();if(r)break;const[a,i]=o,[s]=a.split("_");s===e&&n.push(i)}return n}function l(e){const{kernelName:t,backendName:n}=e,r=d(t,n);a.has(r)&&o.b(`The kernel '${t}' for backend '${n}' is already registered`),a.set(r,e)}function d(e,t){return`${t}_${e}`}},function(e,t,n){"use strict";n.d(t,"a",(function(){return sn}));var r=n(0);
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */Object(r.zd)().registerFlag("KEEP_INTERMEDIATE_TENSORS",()=>!1,e=>{e&&console.warn("Keep intermediate tensors is ON. This will print the values of all intermediate tensors during model inference. Not all models support this mode. For details, check e2e/benchmarks/ model_config.js. This significantly impacts performance.")});var o=n(111),a=n(1);
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class i{constructor(e,t,n){this.node=e,this.tensorMap=t,this.context=n,this.inputs=[],this.attrs={},this.inputs=e.inputNames.map(e=>this.getInput(e)),null!=e.rawAttrs&&(this.attrs=Object.keys(e.rawAttrs).reduce((e,t)=>(e[t]=this.getAttr(t),e),{}))}getInput(e){return Object(a.e)(e,this.tensorMap,this.context)}getAttr(e,t){const n=this.node.rawAttrs[e];if(null!=n.tensor)return Object(a.e)(e,this.tensorMap,this.context);if(null!=n.i||null!=n.f)return Object(o.f)(this.node.rawAttrs,e,t);if(null!=n.s)return Object(o.i)(this.node.rawAttrs,e,t);if(null!=n.b)return Object(o.c)(this.node.rawAttrs,e,t);if(null!=n.shape)return Object(o.k)(this.node.rawAttrs,e,t);if(null!=n.type)return Object(o.e)(this.node.rawAttrs,e,t);if(null!=n.list){if(null!=n.list.i||null!=n.list.f)return Object(o.g)(this.node.rawAttrs,e,t);if(null!=n.list.s)return Object(o.h)(this.node.rawAttrs,e,t);if(null!=n.list.shape)return Object(o.j)(this.node.rawAttrs,e,t);if(null!=n.list.b)return Object(o.b)(this.node.rawAttrs,e,t);if(null!=n.list.type)return Object(o.d)(this.node.rawAttrs,e,t)}return t}}var s=n(231),u=n(60),c=n(647),l=n(648),d=n(23),p=n(69),h=n(649),f=n(371),m=n(29),g=n(384),b=n(650),y=n(379),v=n(385);var x=n(89),w=n(651),O=n(652),k=n(653),S=n(654),T=n(655),C=n(656),E=n(657),I=n(658),j=n(121),N=n(659),A=n(660),R=n(388),_=n(661),$=n(130),F=n(662),D=n(663),M=n(179),P=n(386),L=n(268),B=n(150),z=n(664),U=n(235),V=n(190),W=n(376),G=n(665),H=n(372),q=n(666),K=n(667),X=n(668),Y=n(669),Q=n(342),Z=n(271),J=n(670),ee=n(671),te=n(645),ne=n(389),re=n(672),oe=n(673),ae=n(391),ie=n(390),se=n(674);
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function ue(e,t,n=""){if("number"!=typeof e&&"number"!=typeof t){r.ae.assert(e.length===t.length,()=>n+` Shapes ${e} and ${t} must match`);for(let o=0;o<e.length;o++){const a=e[o],i=t[o];r.ae.assert(a<0||i<0||a===i,()=>n+` Shapes ${e} and ${t} must match`)}}}function ce(e){return"number"!=typeof e&&!e.some(e=>e<0)}function le(e,t,n){let r=de(e,n);const o=!ce(r);if(o&&0===t.length)throw new Error("Tried to calculate elements of an empty list with non-fully-defined elementShape: "+r);if(o&&t.forEach(e=>{r=de(e.shape,r)}),!ce(r))throw new Error("Non-fully-defined elementShape: "+r);return r}function de(e,t){if("number"==typeof e)return t;if("number"==typeof t)return e;if(e.length!==t.length)throw new Error(`Incompatible ranks during merge: ${e} vs. ${t}`);const n=[];for(let r=0;r<e.length;++r){const o=e[r],a=t[r];if(o>=0&&a>=0&&o!==a)throw new Error(`Incompatible shape during merge: ${e} vs. ${t}`);n[r]=o>=0?o:a}return n}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class pe{constructor(e,t,n,o,a,i,s){this.name=e,this.dtype=t,this.maxSize=n,this.elementShape=o,this.identicalElementShapes=a,this.dynamicSize=i,this.clearAfterRead=s,this.tensors=[],this.closed_=!1,this.idTensor=Object(r.Md)(0),Object(r.Fd)(this.idTensor)}get id(){return this.idTensor.id}get closed(){return this.closed_}clearAndClose(e){this.tensors.forEach(t=>{null!=e&&e.has(t.tensor.id)||t.tensor.dispose()}),this.tensors=[],this.closed_=!0,this.idTensor.dispose()}size(){return this.tensors.length}read(e){if(this.closed_)throw new Error(`TensorArray ${this.name} has already been closed.`);if(e<0||e>=this.size())throw new Error(`Tried to read from index ${e}, but array size is: ${this.size()}`);const t=this.tensors[e];if(t.cleared)throw new Error(`TensorArray ${this.name}: Could not read index ${e} twice because it was cleared after a previous read (perhaps try setting clear_after_read = false?).`);return this.clearAfterRead&&(t.cleared=!0),t.read=!0,t.tensor}readMany(e){return e.map(e=>this.read(e))}write(e,t){if(this.closed_)throw new Error(`TensorArray ${this.name} has already been closed.`);if(e<0||!this.dynamicSize&&e>=this.maxSize)throw new Error(`Tried to write to index ${e}, but array is not resizeable and size is: ${this.maxSize}`);const n=this.tensors[e]||{};if(t.dtype!==this.dtype)throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${e},\n          because the value dtype is ${t.dtype}, but TensorArray dtype is ${this.dtype}.`);if(0!==this.size()||null!=this.elementShape&&0!==this.elementShape.length||(this.elementShape=t.shape),ue(this.elementShape,t.shape,`TensorArray ${this.name}: Could not write to TensorArray index ${e}.`),n.read)throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${e}, because it has already been read.`);if(n.written)throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${e}, because it has already been written.`);n.tensor=t,Object(r.Fd)(t),n.written=!0,this.tensors[e]=n}writeMany(e,t){if(e.length!==t.length)throw new Error(`TensorArray ${this.name}: could not write multiple tensors,because the index size: ${e.length} is not the same as tensors size: ${t.length}.`);e.forEach((e,n)=>this.write(e,t[n]))}gather(e,t){if(t&&t!==this.dtype)throw new Error(`TensorArray dtype is ${this.dtype} but gather requested dtype ${t}`);if(e)e=e.slice(0,this.size());else{e=[];for(let t=0;t<this.size();t++)e.push(t)}if(0===e.length)return Object(r.Ud)([],[0].concat(this.elementShape));const n=this.readMany(e);return ue(this.elementShape,n[0].shape,"TensorArray shape mismatch: "),Object(r.Rd)(n,0)}concat(e){if(e&&e!==this.dtype)throw new Error(`TensorArray dtype is ${this.dtype} but concat requested dtype ${e}`);if(0===this.size())return Object(r.Ud)([],[0].concat(this.elementShape));const t=[];for(let e=0;e<this.size();e++)t.push(e);const n=this.readMany(t);return ue(this.elementShape,n[0].shape,`TensorArray shape mismatch: tensor array shape (${this.elementShape}) vs first tensor shape (${n[0].shape})`),Object(r.td)(n,0)}scatter(e,t){if(t.dtype!==this.dtype)throw new Error(`TensorArray dtype is ${this.dtype} but tensor has dtype ${t.dtype}`);if(e.length!==t.shape[0])throw new Error(`Expected len(indices) == tensor.shape[0], but saw: ${e.length} vs. ${t.shape[0]}`);const n=Math.max(...e);if(!this.dynamicSize&&n>=this.maxSize)throw new Error(`Max index must be < array size (${n}  vs. ${this.maxSize})`);this.writeMany(e,Object(r.Yd)(t,0))}split(e,t){if(t.dtype!==this.dtype)throw new Error(`TensorArray dtype is ${this.dtype} but tensor has dtype ${t.dtype}`);let n=0;const o=e.map(e=>(n+=e,n));if(n!==t.shape[0])throw new Error(`Expected sum of lengths to be equal to\n          tensor.shape[0], but sum of lengths is\n        ${n}, and tensor's shape is: ${t.shape}`);if(!this.dynamicSize&&e.length!==this.maxSize)throw new Error(`TensorArray's size is not equal to the size of lengths (${this.maxSize} vs. ${e.length}), and the TensorArray is not marked as dynamically resizeable`);const a=0===n?0:t.size/n,i=[];Object(r.Xd)(()=>{t=Object(r.Ld)(t,[1,n,a]);for(let n=0;n<e.length;++n){const s=[0,0===n?0:o[n-1],0],u=[1,e[n],a];i[n]=Object(r.Ld)(Object(r.Od)(t,s,u),this.elementShape)}return i});const s=[];for(let t=0;t<e.length;t++)s[t]=t;this.writeMany(s,i)}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class he{constructor(e,t,n,o=-1){this.tensors=e,this.elementShape=t,this.elementDtype=n,null!=e&&e.forEach(e=>{if(n!==e.dtype)throw new Error(`Invalid data types; op elements ${n}, but list elements ${e.dtype}`);ue(t,e.shape,"TensorList shape mismatch: "),Object(r.Fd)(e)}),this.idTensor=Object(r.Md)(0),this.maxNumElements=o,Object(r.Fd)(this.idTensor)}get id(){return this.idTensor.id}copy(){return new he([...this.tensors],this.elementShape,this.elementDtype)}clearAndClose(e){this.tensors.forEach(t=>{null!=e&&e.has(t.id)||t.dispose()}),this.tensors.length=0,this.idTensor.dispose()}size(){return this.tensors.length}stack(e,t,n=-1){if(t!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t}, but list elements ${this.elementDtype}`);if(-1!==n&&this.tensors.length!==n)throw new Error(`Operation expected a list with ${n} elements but got a list with ${this.tensors.length} elements.`);ue(e,this.elementShape,"TensorList shape mismatch: ");const o=le(this.elementShape,this.tensors,e);return Object(r.Xd)(()=>{const e=this.tensors.map(e=>Object(r.Ld)(e,o));return Object(r.Rd)(e,0)})}popBack(e,t){if(t!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t}, but list elements ${this.elementDtype}`);if(0===this.size())throw new Error("Trying to pop from an empty list.");const n=le(this.elementShape,this.tensors,e),o=this.tensors.pop();return ue(o.shape,e,"TensorList shape mismatch: "),Object(r.Ld)(o,n)}pushBack(e){if(e.dtype!==this.elementDtype)throw new Error(`Invalid data types; op elements ${e.dtype}, but list elements ${this.elementDtype}`);if(ue(e.shape,this.elementShape,"TensorList shape mismatch: "),this.maxNumElements===this.size())throw new Error("Trying to push element into a full list.");Object(r.Fd)(e),this.tensors.push(e)}resize(e){if(e<0)throw new Error("TensorListResize expects size to be non-negative. Got: "+e);if(-1!==this.maxNumElements&&e>this.maxNumElements)throw new Error(`TensorListResize input size ${e} is greater maxNumElement ${this.maxNumElements}.`);this.tensors.length=e}getItem(e,t,n){if(n!==this.elementDtype)throw new Error(`Invalid data types; op elements ${n}, but list elements ${this.elementDtype}`);if(e<0||e>this.tensors.length)throw new Error(`Trying to access element ${e} in a list with ${this.tensors.length} elements.`);if(null==this.tensors[e])throw new Error(`element at index ${e} is null.`);ue(this.tensors[e].shape,t,"TensorList shape mismatch: ");const o=le(this.elementShape,this.tensors,t);return Object(r.Ld)(this.tensors[e],o)}setItem(e,t){if(t.dtype!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t.dtype}, but list elements ${this.elementDtype}`);if(e<0||-1!==this.maxNumElements&&e>=this.maxNumElements)throw new Error(`Trying to set element ${e} in a list with max ${this.maxNumElements} elements.`);ue(this.elementShape,t.shape,"TensorList shape mismatch: "),Object(r.Fd)(t),this.tensors[e]=t}gather(e,t,n){if(t!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t}, but list elements ${this.elementDtype}`);ue(this.elementShape,n,"TensorList shape mismatch: "),e=e.slice(0,this.size());const o=le(this.elementShape,this.tensors,n);return 0===e.length?Object(r.Ud)([],[0].concat(o)):Object(r.Xd)(()=>{const t=e.map(e=>Object(r.Ld)(this.tensors[e],o));return Object(r.Rd)(t,0)})}concat(e,t){if(e&&e!==this.elementDtype)throw new Error(`TensorList dtype is ${this.elementDtype} but concat requested dtype ${e}`);ue(this.elementShape,t,"TensorList shape mismatch: ");const n=le(this.elementShape,this.tensors,t);return 0===this.size()?Object(r.Ud)([],[0].concat(n)):Object(r.Xd)(()=>{const e=this.tensors.map(e=>Object(r.Ld)(e,n));return Object(r.td)(e,0)})}}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const fe=async(e,t,n)=>{switch(e.op){case"If":case"StatelessIf":{const r=Object(a.d)("thenBranch",e,t,n),o=Object(a.d)("elseBranch",e,t,n),i=Object(a.d)("cond",e,t,n),s=Object(a.d)("args",e,t,n);return(await i.data())[0]?n.functionMap[r].executeFunctionAsync(s,n.tensorArrayMap,n.tensorListMap):n.functionMap[o].executeFunctionAsync(s,n.tensorArrayMap,n.tensorListMap)}case"While":case"StatelessWhile":{const r=Object(a.d)("body",e,t,n),o=Object(a.d)("cond",e,t,n),i=Object(a.d)("args",e,t,n),s=await n.functionMap[o].executeFunctionAsync(i,n.tensorArrayMap,n.tensorListMap),u=i.map(e=>e.id);let c=await s[0].data();s.forEach(e=>{e.kept||-1!==u.indexOf(e.id)||e.dispose()});let l=i;for(;c[0];){const e=l;l=await n.functionMap[r].executeFunctionAsync(l,n.tensorArrayMap,n.tensorListMap);const t=l.map(e=>e.id);e.forEach(e=>{e.kept||-1!==u.indexOf(e.id)||-1!==t.indexOf(e.id)||e.dispose()});const a=await n.functionMap[o].executeFunctionAsync(l,n.tensorArrayMap,n.tensorListMap);c=await a[0].data(),a.forEach(e=>{e.kept||-1!==u.indexOf(e.id)||-1!==t.indexOf(e.id)||e.dispose()})}return l}case"LoopCond":{const r=Object(a.d)("pred",e,t,n);return[Object(a.a)(r)]}case"Switch":{const r=Object(a.d)("pred",e,t,n);let o=Object(a.d)("data",e,t,n);return o.kept||(o=Object(a.a)(o)),(await r.data())[0]?[void 0,o]:[o,void 0]}case"Merge":{const r=e.inputNames.find(e=>void 0!==Object(a.e)(e,t,n));if(r){const e=Object(a.e)(r,t,n);return[Object(a.a)(e)]}return}case"Enter":{const r=Object(a.d)("frameName",e,t,n),o=Object(a.d)("tensor",e,t,n);return n.enterFrame(r),[Object(a.a)(o)]}case"Exit":{const r=Object(a.d)("tensor",e,t,n);return n.exitFrame(),[Object(a.a)(r)]}case"NextIteration":{const r=Object(a.d)("tensor",e,t,n);return n.nextIteration(),[Object(a.a)(r)]}case"TensorArrayV3":{const o=Object(a.d)("size",e,t,n),i=Object(a.d)("dtype",e,t,n),s=Object(a.d)("elementShape",e,t,n),u=Object(a.d)("dynamicSize",e,t,n),c=Object(a.d)("clearAfterRead",e,t,n),l=Object(a.d)("identicalElementShapes",e,t,n),d=Object(a.d)("name",e,t,n),p=new pe(d,i,o,s,l,u,c);return n.addTensorArray(p),[p.idTensor,Object(r.Md)(1)]}case"TensorArrayWriteV3":{const r=Object(a.d)("tensorArrayId",e,t,n),o=Object(a.d)("index",e,t,n),i=Object(a.d)("tensor",e,t,n),s=n.getTensorArray(r.id);return s.write(o,i),[s.idTensor]}case"TensorArrayReadV3":{const r=Object(a.d)("tensorArrayId",e,t,n),o=Object(a.d)("index",e,t,n);return[n.getTensorArray(r.id).read(o)]}case"TensorArrayGatherV3":{const r=Object(a.d)("tensorArrayId",e,t,n),o=Object(a.d)("indices",e,t,n),i=Object(a.d)("dtype",e,t,n);return[n.getTensorArray(r.id).gather(o,i)]}case"TensorArrayScatterV3":{const r=Object(a.d)("tensorArrayId",e,t,n),o=Object(a.d)("indices",e,t,n),i=Object(a.d)("tensor",e,t,n),s=n.getTensorArray(r.id);return s.scatter(o,i),[s.idTensor]}case"TensorArrayConcatV3":{const r=Object(a.d)("tensorArrayId",e,t,n),o=n.getTensorArray(r.id),i=Object(a.d)("dtype",e,t,n);return[o.concat(i)]}case"TensorArraySplitV3":{const r=Object(a.d)("tensorArrayId",e,t,n),o=Object(a.d)("tensor",e,t,n),i=Object(a.d)("lengths",e,t,n),s=n.getTensorArray(r.id);return s.split(i,o),[s.idTensor]}case"TensorArraySizeV3":{const o=Object(a.d)("tensorArrayId",e,t,n),i=n.getTensorArray(o.id);return[Object(r.Md)(i.size(),"int32")]}case"TensorArrayCloseV3":{const r=Object(a.d)("tensorArrayId",e,t,n),o=n.getTensorArray(r.id);return o.clearAndClose(),[o.idTensor]}case"TensorListSetItem":{const r=Object(a.d)("tensorListId",e,t,n),o=Object(a.d)("index",e,t,n),i=Object(a.d)("tensor",e,t,n),s=n.getTensorList(r.id);return s.setItem(o,i),[s.idTensor]}case"TensorListGetItem":{const r=Object(a.d)("tensorListId",e,t,n),o=Object(a.d)("index",e,t,n),i=Object(a.d)("elementShape",e,t,n),s=Object(a.d)("elementDType",e,t,n);return[n.getTensorList(r.id).getItem(o,i,s)]}case"TensorListScatterV2":case"TensorListScatter":{const o=Object(a.d)("indices",e,t,n),i=function(e,t,n,o){if(t.length!==e.shape[0])throw new Error(`Expected len(indices) == tensor.shape[0], but saw: ${t.length} vs. ${e.shape[0]}`);const a=Math.max(...t);if(null!=o&&-1!==o&&a>=o)throw new Error(`Max index must be < array size (${a}  vs. ${o})`);const i=new he([],n,e.dtype,o),s=Object(r.Yd)(e,0);return t.forEach((e,t)=>{i.setItem(e,s[t])}),i}(Object(a.d)("tensor",e,t,n),o,Object(a.d)("elementShape",e,t,n),Object(a.d)("numElements",e,t,n));return n.addTensorList(i),[i.idTensor]}case"TensorListReserve":case"EmptyTensorList":{const r=Object(a.d)("elementShape",e,t,n),o=Object(a.d)("elementDType",e,t,n);let i;i="TensorListReserve"===e.op?"numElements":"maxNumElements";const s=function(e,t,n){return new he([],e,t,n)}(r,o,Object(a.d)(i,e,t,n));return n.addTensorList(s),[s.idTensor]}case"TensorListGather":{const r=Object(a.d)("tensorListId",e,t,n),o=Object(a.d)("indices",e,t,n),i=Object(a.d)("elementShape",e,t,n),s=Object(a.d)("elementDType",e,t,n);return[n.getTensorList(r.id).gather(o,s,i)]}case"TensorListStack":{const r=Object(a.d)("tensorListId",e,t,n),o=Object(a.d)("elementShape",e,t,n),i=Object(a.d)("elementDType",e,t,n),s=Object(a.d)("numElements",e,t,n);return[n.getTensorList(r.id).stack(o,i,s)]}case"TensorListFromTensor":{const o=function(e,t,n){const o=e.dtype;if(e.shape.length<1)throw new Error("Tensor must be at least a vector, but saw shape: "+e.shape);if(e.dtype!==n)throw new Error(`Invalid data types; op elements ${e.dtype}, but list elements ${n}`);ue(e.shape.slice(1),t,"TensorList shape mismatch: ");const a=Object(r.Yd)(e);return new he(a,t,o)}(Object(a.d)("tensor",e,t,n),Object(a.d)("elementShape",e,t,n),Object(a.d)("elementDType",e,t,n));return n.addTensorList(o),[o.idTensor]}case"TensorListConcat":{const r=Object(a.d)("tensorListId",e,t,n),o=n.getTensorList(r.id),i=Object(a.d)("dtype",e,t,n),s=Object(a.d)("elementShape",e,t,n);return[o.concat(i,s)]}case"TensorListPushBack":{const r=Object(a.d)("tensorListId",e,t,n),o=Object(a.d)("tensor",e,t,n),i=n.getTensorList(r.id);return i.pushBack(o),[i.idTensor]}case"TensorListPopBack":{const r=Object(a.d)("tensorListId",e,t,n),o=Object(a.d)("elementShape",e,t,n),i=Object(a.d)("elementDType",e,t,n);return[n.getTensorList(r.id).popBack(o,i)]}case"TensorListSplit":{const o=Object(a.d)("tensor",e,t,n),i=Object(a.d)("elementShape",e,t,n),s=function(e,t,n){let o=0;const a=t.map(e=>(o+=e,o));if(o!==e.shape[0])throw new Error(`Expected sum of lengths to be equal to\n          tensor.shape[0], but sum of lengths is\n        ${o}, and tensor's shape is: ${e.shape}`);const i=de(e.shape.slice(1),n),s=0===o?0:e.size/o,u=Object(r.Xd)(()=>{const n=[];e=Object(r.Ld)(e,[1,o,s]);for(let o=0;o<t.length;++o){const u=[0,0===o?0:a[o-1],0],c=[1,t[o],s];n[o]=Object(r.Ld)(Object(r.Od)(e,u,c),i)}return e.dispose(),n}),c=new he([],n,e.dtype,t.length);for(let e=0;e<u.length;e++)c.setItem(e,u[e]);return c}(o,Object(a.d)("lengths",e,t,n),i);return n.addTensorList(s),[s.idTensor]}default:throw TypeError(`Node type ${e.op} is not implemented`)}};var me=n(675),ge=n(272),be=n(715),ye=n(676),ve=n(392),xe=n(677),we=n(678),Oe=n(679),ke=n(680),Se=n(681),Te=n(682),Ce=n(683);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function Ee(e,t,n){const[r,o]=Object(a.d)("fusedOps",e,t,n),i="biasadd"===r,s=!i,u="prelu"===o,c="fusedbatchnorm"===r,l=Object(a.d)("numArgs",e,t,n);if(i){if(u&&2!==l)throw new Error("FusedConv2d and DepthwiseConv2d with BiasAdd and Prelu must have two extra arguments: bias and alpha.");if(!u&&i&&1!==l)throw new Error("FusedConv2d and DepthwiseConv2d with BiasAdd must have one extra argument: bias.")}if(c)throw new Error("FusedConv2d and DepthwiseConv2d with FusedBatchNorm is not supported");const d=Object(a.d)("strides",e,t,n),p=Object(a.c)(e,t,n),h=Object(a.d)("dataFormat",e,t,n).toUpperCase(),f=Object(a.d)("dilations",e,t,n);let[m,g]=Object(a.d)("args",e,t,n);s&&(g=m,m=void 0);return{stride:d,pad:p,dataFormat:h,dilations:f,biasArg:m,preluArg:g,activationFunc:o,leakyreluAlpha:Object(a.d)("leakyreluAlpha",e,t,n)}}var Ie=n(269),je=n(684),Ne=n(685),Ae=n(686),Re=n(382),_e=n(687),$e=n(688),Fe=n(194),De=n(689),Me=n(188),Pe=n(267);var Le=n(46),Be=n(690),ze=n(691);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function Ue(e,t,n){return{boxes:Object(a.d)("boxes",e,t,n),scores:Object(a.d)("scores",e,t,n),maxOutputSize:Object(a.d)("maxOutputSize",e,t,n),iouThreshold:Object(a.d)("iouThreshold",e,t,n),scoreThreshold:Object(a.d)("scoreThreshold",e,t,n),softNmsSigma:Object(a.d)("softNmsSigma",e,t,n)}}var Ve=n(692),We=n(693);var Ge=n(88),He=n(44);
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class qe{constructor(e,t){this.keyDType=e,this.valueDType=t,this.handle=Object(r.Md)(0),this.tensorMap=new Map,Object(r.Fd)(this.handle)}get id(){return this.handle.id}clearAndClose(){this.tensorMap.forEach(e=>e.dispose()),this.tensorMap.clear(),this.handle.dispose()}size(){return this.tensorMap.size}tensorSize(){return He.a(this.size(),"int32")}async import(e,t){this.checkKeyAndValueTensor(e,t);const n=await e.data();return this.tensorMap.forEach(e=>e.dispose()),this.tensorMap.clear(),Object(r.Xd)(()=>{const e=Object(r.Yd)(t),o=n.length,a=e.length;r.ae.assert(o===a,()=>`The number of elements doesn't match, keys has ${o} elements, the values has ${a} elements.`);for(let t=0;t<o;t++){const o=n[t],a=e[t];Object(r.Fd)(a),this.tensorMap.set(o,a)}return this.handle})}async find(e,t){this.checkKeyAndValueTensor(e,t);const n=await e.data();return Object(r.Xd)(()=>{const e=[];for(let r=0;r<n.length;r++){const o=n[r],a=this.findWithDefault(o,t);e.push(a)}return Object(r.Rd)(e)})}findWithDefault(e,t){const n=this.tensorMap.get(e);return null!=n?n:t}checkKeyAndValueTensor(e,t){if(e.dtype!==this.keyDType)throw new Error(`Expect key dtype ${this.keyDType}, but got `+e.dtype);if(t.dtype!==this.valueDType)throw new Error(`Expect value dtype ${this.valueDType}, but got `+t.dtype)}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */var Ke=n(395),Xe=n(383),Ye=n(236),Qe=n(378),Ze=n(694),Je=n(270),et=n(377),tt=n(695),nt=n(696),rt=n(138);var ot=n(64),at=n(697),it=n(343);var st=n(716),ut=n(698),ct=n(699),lt=n(700),dt=n(717);var pt=n(153),ht=n(381),ft=n(341),mt=n(38),gt=n(701),bt=n(702),yt=n(644),vt=n(703),xt=n(704),wt=n(375),Ot=n(705);var kt=n(97),St=n(706),Tt=n(340),Ct=n(63),Et=n(707),It=n(373),jt=n(12),Nt=n(177),At=n(264),Rt=n(193),_t=n(178),$t=n(708),Ft=n(709);var Dt=n(265),Mt=n(234),Pt=n(266),Lt=n(374);var Bt=n(180),zt=n(710),Ut=n(646),Vt=n(711),Wt=n(712),Gt=n(713),Ht=n(276),qt=n(714);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function Kt(e,t,n,o){const ue=((e,t,n)=>{switch(e.category){case"arithmetic":return r.Xd(()=>((e,t,n)=>{switch(e.op){case"BiasAdd":case"AddV2":case"Add":return[u.a(Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n))];case"AddN":return[c.a(Object(a.d)("tensors",e,t,n))];case"FloorMod":case"Mod":return[l.a(Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n))];case"Mul":return[d.a(Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n))];case"RealDiv":case"Div":return[p.a(Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n))];case"DivNoNan":return[h.a(Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n))];case"FloorDiv":return[f.a(Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n))];case"Sub":return[m.a(Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n))];case"Minimum":return[g.a(Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n))];case"Maximum":return[b.a(Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n))];case"Pow":return[y.a(Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n))];case"SquaredDifference":return[v.a(Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n));case"basic_math":return r.Xd(()=>((e,t,n)=>{switch(e.op){case"Abs":case"ComplexAbs":return[x.a(Object(a.d)("x",e,t,n))];case"Acos":return[w.a(Object(a.d)("x",e,t,n))];case"Acosh":return[O.a(Object(a.d)("x",e,t,n))];case"Asin":return[k.a(Object(a.d)("x",e,t,n))];case"Asinh":return[S.a(Object(a.d)("x",e,t,n))];case"Atan":return[T.a(Object(a.d)("x",e,t,n))];case"Atan2":return[C.a(Object(a.d)("x",e,t,n),Object(a.d)("y",e,t,n))];case"Atanh":return[E.a(Object(a.d)("x",e,t,n))];case"Ceil":return[I.a(Object(a.d)("x",e,t,n))];case"Complex":return[j.a(Object(a.d)("real",e,t,n),Object(a.d)("imag",e,t,n))];case"Cos":return[N.a(Object(a.d)("x",e,t,n))];case"Cosh":return[A.a(Object(a.d)("x",e,t,n))];case"Elu":return[R.a(Object(a.d)("x",e,t,n))];case"Erf":return[_.a(Object(a.d)("x",e,t,n))];case"Exp":return[$.a(Object(a.d)("x",e,t,n))];case"Expm1":return[F.a(Object(a.d)("x",e,t,n))];case"Floor":return[D.a(Object(a.d)("x",e,t,n))];case"Log":return[M.a(Object(a.d)("x",e,t,n))];case"Log1p":return[P.a(Object(a.d)("x",e,t,n))];case"Imag":return[L.a(Object(a.d)("x",e,t,n))];case"Neg":return[B.a(Object(a.d)("x",e,t,n))];case"Reciprocal":return[z.a(Object(a.d)("x",e,t,n))];case"Real":return[U.a(Object(a.d)("x",e,t,n))];case"Relu":return[V.a(Object(a.d)("x",e,t,n))];case"Round":return[W.a(Object(a.d)("x",e,t,n))];case"Selu":return[G.a(Object(a.d)("x",e,t,n))];case"Sigmoid":return[H.a(Object(a.d)("x",e,t,n))];case"Sin":return[q.a(Object(a.d)("x",e,t,n))];case"Sign":return[K.a(Object(a.d)("x",e,t,n))];case"Sinh":return[X.a(Object(a.d)("x",e,t,n))];case"Softplus":return[Y.a(Object(a.d)("x",e,t,n))];case"Sqrt":return[Q.a(Object(a.d)("x",e,t,n))];case"Square":return[Z.a(Object(a.d)("x",e,t,n))];case"Tanh":return[J.a(Object(a.d)("x",e,t,n))];case"Tan":return[ee.a(Object(a.d)("x",e,t,n))];case"ClipByValue":return[te.a(Object(a.d)("x",e,t,n),Object(a.d)("clipValueMin",e,t,n),Object(a.d)("clipValueMax",e,t,n))];case"Relu6":return[ne.a(Object(a.d)("x",e,t,n))];case"Rsqrt":return[re.a(Object(a.e)(e.inputNames[0],t,n))];case"Prod":return[oe.a(Object(a.d)("x",e,t,n),Object(a.d)("axes",e,t,n))];case"LeakyRelu":return[ae.a(Object(a.d)("x",e,t,n),Object(a.d)("alpha",e,t,n))];case"Prelu":return[ie.a(Object(a.d)("x",e,t,n),Object(a.d)("alpha",e,t,n))];case"IsNan":return[se.a(Object(a.e)(e.inputNames[0],t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n));case"control":return fe(e,t,n);case"convolution":return r.Xd(()=>((e,t,n)=>{switch(e.op){case"Conv1D":{const r=Object(a.d)("stride",e,t,n),o=Object(a.d)("pad",e,t,n),i=Object(a.d)("dataFormat",e,t,n).toUpperCase(),s=Object(a.d)("dilation",e,t,n);return[me.a(Object(a.d)("x",e,t,n),Object(a.d)("filter",e,t,n),r,o,i,s)]}case"Conv2D":{const r=Object(a.d)("strides",e,t,n),o=Object(a.c)(e,t,n),i=Object(a.d)("dataFormat",e,t,n).toUpperCase(),s=Object(a.d)("dilations",e,t,n);return[ge.a(Object(a.d)("x",e,t,n),Object(a.d)("filter",e,t,n),[r[1],r[2]],o,i,[s[1],s[2]])]}case"_FusedConv2D":{const{stride:r,pad:o,dataFormat:i,dilations:s,biasArg:u,preluArg:c,activationFunc:l,leakyreluAlpha:d}=Ee(e,t,n);return[be.l.conv2d({x:Object(a.d)("x",e,t,n),filter:Object(a.d)("filter",e,t,n),strides:[r[1],r[2]],pad:o,dataFormat:i,dilations:[s[1],s[2]],bias:u,activation:l,preluActivationWeights:c,leakyreluAlpha:d})]}case"FusedDepthwiseConv2dNative":{const{stride:r,pad:o,dataFormat:i,dilations:s,biasArg:u,preluArg:c,activationFunc:l,leakyreluAlpha:d}=Ee(e,t,n);return[be.l.depthwiseConv2d({x:Object(a.d)("x",e,t,n),filter:Object(a.d)("filter",e,t,n),strides:[r[1],r[2]],pad:o,dataFormat:i,dilations:[s[1],s[2]],bias:u,activation:l,preluActivationWeights:c,leakyreluAlpha:d})]}case"Conv2DBackpropInput":case"Conv2dTranspose":{const r=Object(a.d)("outputShape",e,t,n),o=Object(a.d)("strides",e,t,n),i=Object(a.c)(e,t,n);return[ye.a(Object(a.d)("x",e,t,n),Object(a.d)("filter",e,t,n),r,[o[1],o[2]],i)]}case"DepthwiseConv2dNative":case"DepthwiseConv2d":{const r=Object(a.d)("strides",e,t,n),o=Object(a.c)(e,t,n),i=Object(a.d)("dilations",e,t,n),s=Object(a.d)("dataFormat",e,t,n).toUpperCase();return[ve.a(Object(a.d)("input",e,t,n),Object(a.d)("filter",e,t,n),[r[1],r[2]],o,s,[i[1],i[2]])]}case"Conv3D":{const r=Object(a.d)("strides",e,t,n),o=Object(a.d)("pad",e,t,n),i=Object(a.d)("dataFormat",e,t,n).toUpperCase(),s=Object(a.d)("dilations",e,t,n);return[xe.a(Object(a.d)("x",e,t,n),Object(a.d)("filter",e,t,n),[r[1],r[2],r[3]],o,i,[s[1],s[2],s[3]])]}case"AvgPool":{const r=Object(a.d)("strides",e,t,n),o=Object(a.d)("pad",e,t,n),i=Object(a.d)("kernelSize",e,t,n);return[we.a(Object(a.d)("x",e,t,n),[i[1],i[2]],[r[1],r[2]],o)]}case"MaxPool":{const r=Object(a.d)("strides",e,t,n),o=Object(a.d)("pad",e,t,n),i=Object(a.d)("kernelSize",e,t,n);return[Oe.a(Object(a.d)("x",e,t,n),[i[1],i[2]],[r[1],r[2]],o)]}case"MaxPoolWithArgmax":{const r=Object(a.d)("strides",e,t,n),o=Object(a.d)("pad",e,t,n),i=Object(a.d)("kernelSize",e,t,n),s=Object(a.d)("includeBatchInIndex",e,t,n),{result:u,indexes:c}=ke.a(Object(a.d)("x",e,t,n),[i[1],i[2]],[r[1],r[2]],o,s);return[u,c]}case"AvgPool3D":{const r=Object(a.d)("strides",e,t,n),o=Object(a.d)("pad",e,t,n),i=Object(a.d)("kernelSize",e,t,n);return[Se.a(Object(a.d)("x",e,t,n),[i[1],i[2],i[3]],[r[1],r[2],r[3]],o)]}case"MaxPool3D":{const r=Object(a.d)("strides",e,t,n),o=Object(a.d)("pad",e,t,n),i=Object(a.d)("kernelSize",e,t,n);return[Te.a(Object(a.d)("x",e,t,n),[i[1],i[2],i[3]],[r[1],r[2],r[3]],o)]}case"Dilation2D":{const r=Object(a.d)("strides",e,t,n),o=Object(a.d)("pad",e,t,n),i=Object(a.d)("dilations",e,t,n),s=r[1],u=r[2],c=i[1],l=i[2];return[Ce.a(Object(a.d)("x",e,t,n),Object(a.d)("filter",e,t,n),[s,u],o,[c,l],"NHWC")]}default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n));case"creation":return r.Xd(()=>((e,t,n)=>{switch(e.op){case"Fill":{const r=Object(a.d)("shape",e,t,n),o=Object(a.d)("dtype",e,t,n),i=Object(a.d)("value",e,t,n);return[Ie.a(r,i,o)]}case"LinSpace":{const r=Object(a.d)("start",e,t,n),o=Object(a.d)("stop",e,t,n),i=Object(a.d)("num",e,t,n);return[je.a(r,o,i)]}case"Multinomial":{const r=Object(a.d)("logits",e,t,n),o=Object(a.d)("numSamples",e,t,n),i=Object(a.d)("seed",e,t,n);return[Ne.a(r,o,i)]}case"OneHot":{const r=Object(a.d)("indices",e,t,n),o=Object(a.d)("depth",e,t,n),i=Object(a.d)("onValue",e,t,n),s=Object(a.d)("offValue",e,t,n);return[Ae.a(r,o,i,s)]}case"Ones":return[Re.a(Object(a.d)("shape",e,t,n),Object(a.d)("dtype",e,t,n))];case"OnesLike":return[_e.a(Object(a.d)("x",e,t,n))];case"RandomUniform":return[$e.a(Object(a.d)("shape",e,t,n),Object(a.d)("minval",e,t,n),Object(a.d)("maxval",e,t,n),Object(a.d)("dtype",e,t,n))];case"Range":{const r=Object(a.d)("start",e,t,n),o=Object(a.d)("stop",e,t,n),i=Object(a.d)("step",e,t,n);return[Fe.a(r,o,i,Object(a.d)("dtype",e,t,n))]}case"TruncatedNormal":{const r=Object(a.d)("shape",e,t,n),o=Object(a.d)("mean",e,t,n),i=Object(a.d)("stdDev",e,t,n),s=Object(a.d)("seed",e,t,n);return[De.a(r,o,i,Object(a.d)("dtype",e,t,n),s)]}case"Zeros":return[Me.a(Object(a.d)("shape",e,t,n),Object(a.d)("dtype",e,t,n))];case"ZerosLike":return[Pe.a(Object(a.d)("x",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n));case"dynamic":return(async(e,t,n)=>{switch(e.op){case"NonMaxSuppressionV5":{const{boxes:r,scores:o,maxOutputSize:a,iouThreshold:i,scoreThreshold:s,softNmsSigma:u}=Ue(e,t,n),c=await be.m.nonMaxSuppressionWithScoreAsync(r,o,a,i,s,u);return[c.selectedIndices,c.selectedScores]}case"NonMaxSuppressionV4":{const{boxes:r,scores:o,maxOutputSize:i,iouThreshold:s,scoreThreshold:u}=Ue(e,t,n),c=Object(a.d)("padToMaxOutputSize",e,t,n),l=await be.m.nonMaxSuppressionPaddedAsync(r,o,i,s,u,c);return[l.selectedIndices,l.validOutputs]}case"NonMaxSuppressionV3":case"NonMaxSuppressionV2":{const{boxes:r,scores:o,maxOutputSize:a,iouThreshold:i,scoreThreshold:s}=Ue(e,t,n);return[await be.m.nonMaxSuppressionAsync(r,o,a,i,s)]}case"Where":{const r=Le.a(Object(a.d)("condition",e,t,n),"bool"),o=[await Be.a(r)];return r.dispose(),o}case"ListDiff":return ze.a(Object(a.d)("x",e,t,n),Object(a.d)("y",e,t,n));default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n);case"evaluation":return r.Xd(()=>((e,t,n)=>{switch(e.op){case"TopKV2":{const r=Object(a.d)("x",e,t,n),o=Object(a.d)("k",e,t,n),i=Object(a.d)("sorted",e,t,n),s=Ve.a(r,o,i);return[s.values,s.indices]}case"Unique":{const r=Object(a.d)("x",e,t,n),o=We.a(r);return[o.values,o.indices]}case"UniqueV2":{const r=Object(a.d)("x",e,t,n),o=Object(a.d)("axis",e,t,n),i=We.a(r,o);return[i.values,i.indices]}default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n));case"image":return r.Xd(()=>((e,t,n)=>{switch(e.op){case"ResizeBilinear":{const r=Object(a.d)("images",e,t,n),o=Object(a.d)("size",e,t,n),i=Object(a.d)("alignCorners",e,t,n),s=Object(a.d)("halfPixelCenters",e,t,n);return[be.m.resizeBilinear(r,[o[0],o[1]],i,s)]}case"ResizeNearestNeighbor":{const r=Object(a.d)("images",e,t,n),o=Object(a.d)("size",e,t,n),i=Object(a.d)("alignCorners",e,t,n),s=Object(a.d)("halfPixelCenters",e,t,n);return[be.m.resizeNearestNeighbor(r,[o[0],o[1]],i,s)]}case"CropAndResize":{const r=Object(a.d)("image",e,t,n),o=Object(a.d)("boxes",e,t,n),i=Object(a.d)("boxInd",e,t,n),s=Object(a.d)("cropSize",e,t,n),u=Object(a.d)("method",e,t,n),c=Object(a.d)("extrapolationValue",e,t,n);return[be.m.cropAndResize(r,o,i,s,u,c)]}default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n));case"graph":return r.Xd(()=>((e,t,n)=>{switch(e.op){case"Const":return t[e.name];case"PlaceholderWithDefault":const r=Object(a.d)("default",e,t,n);return[Object(a.e)(e.name,t,n)||r];case"Placeholder":return[Object(a.e)(e.name,t,n)];case"Identity":case"StopGradient":case"FakeQuantWithMinMaxVars":{const r=Object(a.d)("x",e,t,n);return[Object(a.a)(r)]}case"IdentityN":return Object(a.d)("x",e,t,n).map(e=>Object(a.a)(e));case"Snapshot":const o=Object(a.d)("x",e,t,n);return[Object(a.a)(o)];case"Shape":return[Ge.a(Object(a.d)("x",e,t,n).shape,"int32")];case"ShapeN":return Object(a.d)("x",e,t,n).map(e=>Ge.a(e.shape));case"Size":return[He.a(Object(a.d)("x",e,t,n).size,"int32")];case"Rank":return[He.a(Object(a.d)("x",e,t,n).rank,"int32")];case"NoOp":return[He.a(1)];case"Print":const i=Object(a.d)("x",e,t,n),s=Object(a.d)("data",e,t,n),u=Object(a.d)("message",e,t,n),c=Object(a.d)("summarize",e,t,n);console.warn("The graph has a tf.print() operation,usually used for debugging, which slows down performance."),console.log(u);for(let e=0;e<s.length;e++)console.log(Array.prototype.slice.call(s[e].dataSync()).slice(0,c));return[i];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n));case"logical":return r.Xd(()=>((e,t,n)=>{switch(e.op){case"Equal":return[Ke.a(Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n))];case"NotEqual":return[Xe.a(Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n))];case"Greater":return[Ye.a(Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n))];case"GreaterEqual":return[Qe.a(Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n))];case"Less":return[Ze.a(Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n))];case"LessEqual":return[Je.a(Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n))];case"LogicalAnd":return[et.a(Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n))];case"LogicalNot":return[tt.a(Object(a.d)("a",e,t,n))];case"LogicalOr":return[nt.a(Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n))];case"Select":case"SelectV2":return[rt.a(Object(a.d)("condition",e,t,n),Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n));case"matrices":return r.Xd(()=>((e,t,n)=>{switch(e.op){case"BatchMatMul":case"BatchMatMulV2":case"MatMul":return[ot.a(Object(a.d)("a",e,t,n),Object(a.d)("b",e,t,n),Object(a.d)("transposeA",e,t,n),Object(a.d)("transposeB",e,t,n))];case"Einsum":return[at.a(Object(a.d)("equation",e,t,n),...Object(a.d)("tensors",e,t,n))];case"Transpose":return[it.a(Object(a.d)("x",e,t,n),Object(a.d)("perm",e,t,n))];case"_FusedMatMul":const[r,o]=Object(a.d)("fusedOps",e,t,n),i="biasadd"===r,s="prelu"===o,u=Object(a.d)("numArgs",e,t,n),c=Object(a.d)("leakyreluAlpha",e,t,n);if(i){if(s&&2!==u)throw new Error("Fused MatMul with BiasAdd and Prelu must have two extra arguments: bias and alpha.");if(!s&&1!==u)throw new Error("Fused MatMul with BiasAdd must have one extra argument: bias.")}const[l,d]=Object(a.d)("args",e,t,n);return[be.l.matMul({a:Object(a.d)("a",e,t,n),b:Object(a.d)("b",e,t,n),transposeA:Object(a.d)("transposeA",e,t,n),transposeB:Object(a.d)("transposeB",e,t,n),bias:l,activation:o,preluActivationWeights:d,leakyreluAlpha:c})];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n));case"normalization":return r.Xd(()=>((e,t,n)=>{switch(e.op){case"FusedBatchNorm":case"FusedBatchNormV2":case"FusedBatchNormV3":return[st.a(Object(a.d)("x",e,t,n),Object(a.d)("mean",e,t,n),Object(a.d)("variance",e,t,n),Object(a.d)("offset",e,t,n),Object(a.d)("scale",e,t,n),Object(a.d)("epsilon",e,t,n))];case"LRN":return[ut.a(Object(a.d)("x",e,t,n),Object(a.d)("radius",e,t,n),Object(a.d)("bias",e,t,n),Object(a.d)("alpha",e,t,n),Object(a.d)("beta",e,t,n))];case"Softmax":return[ct.a(Object(a.d)("x",e,t,n))];case"LogSoftmax":return[lt.a(Object(a.d)("x",e,t,n))];case"SparseToDense":return[dt.a(Object(a.d)("sparseIndices",e,t,n),Object(a.d)("outputShape",e,t,n),Object(a.d)("sparseValues",e,t,n),Object(a.d)("defaultValue",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n));case"reduction":return r.Xd(()=>((e,t,n)=>{switch(e.op){case"Max":{const r=Object(a.d)("axis",e,t,n),o=Object(a.d)("keepDims",e,t,n);return[pt.a(Object(a.d)("x",e,t,n),r,o)]}case"Mean":{const r=Object(a.d)("axis",e,t,n),o=Object(a.d)("keepDims",e,t,n);return[ht.a(Object(a.d)("x",e,t,n),r,o)]}case"Min":{const r=Object(a.d)("axis",e,t,n),o=Object(a.d)("keepDims",e,t,n);return[ft.a(Object(a.d)("x",e,t,n),r,o)]}case"Sum":{const r=Object(a.d)("axis",e,t,n),o=Object(a.d)("keepDims",e,t,n);return[mt.a(Object(a.d)("x",e,t,n),r,o)]}case"All":{const r=Object(a.d)("axis",e,t,n),o=Object(a.d)("keepDims",e,t,n);return[gt.a(Object(a.d)("x",e,t,n),r,o)]}case"Any":{const r=Object(a.d)("axis",e,t,n),o=Object(a.d)("keepDims",e,t,n);return[bt.a(Object(a.d)("x",e,t,n),r,o)]}case"ArgMax":{const r=Object(a.d)("axis",e,t,n);return[yt.a(Object(a.d)("x",e,t,n),r)]}case"ArgMin":{const r=Object(a.d)("axis",e,t,n);return[vt.a(Object(a.d)("x",e,t,n),r)]}case"Prod":{const r=Object(a.d)("axis",e,t,n),o=Object(a.d)("keepDims",e,t,n);return[oe.a(Object(a.d)("x",e,t,n),r,o)]}case"Cumsum":{const r=Object(a.d)("axis",e,t,n),o=Object(a.d)("exclusive",e,t,n),i=Object(a.d)("reverse",e,t,n);return[xt.a(Object(a.d)("x",e,t,n),r,o,i)]}case"Bincount":const r=Object(a.d)("x",e,t,n),o=Object(a.d)("weights",e,t,n),i=Object(a.d)("size",e,t,n);return[wt.a(r,o,i)];case"DenseBincount":{const r=Object(a.d)("x",e,t,n),o=Object(a.d)("weights",e,t,n),i=Object(a.d)("size",e,t,n),s=Object(a.d)("binaryOutput",e,t,n);return[Ot.a(r,o,i,s)]}default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n));case"slice_join":return r.Xd(()=>((e,t,n)=>{switch(e.op){case"ConcatV2":case"Concat":{const r=Object(a.d)("n",e,t,n),o=Object(a.d)("axis",e,t,n);let i=Object(a.d)("tensors",e,t,n);return i=i.slice(0,r),[kt.a(i,o)]}case"Gather":{const r=Object(a.d)("x",e,t,n),o=Object(a.d)("indices",e,t,n);return[St.a(r,Le.a(o,"int32"),0)]}case"GatherV2":{const r=Object(a.d)("axis",e,t,n),o=Object(a.d)("batchDims",e,t,n),i=Object(a.d)("x",e,t,n),s=Object(a.d)("indices",e,t,n);return[St.a(i,Le.a(s,"int32"),r,o)]}case"Reverse":{const r=Object(a.d)("dims",e,t,n),o=[];for(let e=0;e<r.length;e++)r[e]&&o.push(e);const i=Object(a.d)("x",e,t,n);return[Tt.a(i,o)]}case"ReverseV2":{const r=Object(a.d)("axis",e,t,n),o=Object(a.d)("x",e,t,n);return[Tt.a(o,r)]}case"Slice":{const r=Object(a.d)("begin",e,t,n),o=Object(a.d)("size",e,t,n);return[Ct.a(Object(a.d)("x",e,t,n),r,o)]}case"StridedSlice":{const r=Object(a.d)("begin",e,t,n),o=Object(a.d)("end",e,t,n),i=Object(a.d)("strides",e,t,n),s=Object(a.d)("beginMask",e,t,n),u=Object(a.d)("endMask",e,t,n),c=Object(a.d)("ellipsisMask",e,t,n),l=Object(a.d)("newAxisMask",e,t,n),d=Object(a.d)("shrinkAxisMask",e,t,n),p=Object(a.d)("x",e,t,n);return[Et.a(p,r,o,i,s,u,c,l,d)]}case"Pack":return Object(r.Xd)(()=>{const o=Object(a.d)("axis",e,t,n),i=Object(a.d)("tensors",e,t,n),s=i[0].shape,u=It.a(i[0]).shape,c=i.map(e=>{const t=r.ae.arraysEqual(e.shape,s);if(!t&&!r.ae.arraysEqual(It.a(e).shape,u))throw new Error("the input tensors shape does not match");return t?e:jt.a(e,s)});return[Nt.a(c,o)]});case"Unpack":{const r=Object(a.d)("axis",e,t,n),o=Object(a.d)("tensor",e,t,n);return At.a(o,r)}case"Tile":{const r=Object(a.d)("reps",e,t,n);return[Rt.a(Object(a.d)("x",e,t,n),r)]}case"Split":case"SplitV":{const r=Object(a.d)("axis",e,t,n),o=Object(a.d)("numOrSizeSplits",e,t,n),i=Object(a.d)("x",e,t,n);return _t.a(i,o,r)}case"ScatterNd":{const r=Object(a.d)("indices",e,t,n),o=Object(a.d)("values",e,t,n),i=Object(a.d)("shape",e,t,n);return[$t.a(r,o,i)]}case"GatherNd":{const r=Object(a.d)("x",e,t,n),o=Object(a.d)("indices",e,t,n);return[Ft.a(r,o)]}case"SparseToDense":{const r=Object(a.d)("sparseIndices",e,t,n),o=Object(a.d)("outputShape",e,t,n),i=Object(a.d)("sparseValues",e,t,n),s=Object(a.d)("defaultValue",e,t,n);return[dt.a(r,i,o,i.dtype===s.dtype?s:Le.a(s,i.dtype))]}default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n));case"sparse":return r.Xd(()=>((e,t,n)=>{switch(e.op){case"SparseFillEmptyRows":{const{outputIndices:r,outputValues:o,emptyRowIndicator:i,reverseIndexMap:s}=be.t.sparseFillEmptyRows(Object(a.d)("indices",e,t,n),Object(a.d)("values",e,t,n),Object(a.d)("denseShape",e,t,n),Object(a.d)("defaultValue",e,t,n));return[r,o,i,s]}case"SparseReshape":{const{outputIndices:r,outputShape:o}=be.t.sparseReshape(Object(a.d)("inputIndices",e,t,n),Object(a.d)("inputShape",e,t,n),Object(a.d)("newShape",e,t,n));return[r,o]}case"SparseSegmentMean":return[be.t.sparseSegmentMean(Object(a.d)("data",e,t,n),Object(a.d)("indices",e,t,n),Object(a.d)("segmentIds",e,t,n))];case"SparseSegmentSum":return[be.t.sparseSegmentSum(Object(a.d)("data",e,t,n),Object(a.d)("indices",e,t,n),Object(a.d)("segmentIds",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n));case"spectral":return r.Xd(()=>((e,t,n)=>{switch(e.op){case"FFT":return[Dt.a(Object(a.d)("x",e,t,n))];case"IFFT":return[Mt.a(Object(a.d)("x",e,t,n))];case"RFFT":return[Pt.a(Object(a.d)("x",e,t,n))];case"IRFFT":return[Lt.a(Object(a.d)("x",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n));case"string":return r.Xd(()=>((e,t,n)=>{switch(e.op){case"StringNGrams":{const{nGrams:r,nGramsSplits:o}=be.w.stringNGrams(Object(a.d)("data",e,t,n),Object(a.d)("dataSplits",e,t,n),Object(a.d)("separator",e,t,n),Object(a.d)("nGramWidths",e,t,n),Object(a.d)("leftPad",e,t,n),Object(a.d)("rightPad",e,t,n),Object(a.d)("padWidth",e,t,n),Object(a.d)("preserveShortSequences",e,t,n));return[r,o]}case"StringSplit":{const{indices:r,values:o,shape:i}=be.w.stringSplit(Object(a.d)("input",e,t,n),Object(a.d)("delimiter",e,t,n),Object(a.d)("skipEmpty",e,t,n));return[r,o,i]}case"StringToHashBucketFast":return[be.w.stringToHashBucketFast(Object(a.d)("input",e,t,n),Object(a.d)("numBuckets",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n));case"transformation":return r.Xd(()=>((e,t,n)=>{switch(e.op){case"Cast":return[Le.a(Object(a.d)("x",e,t,n),Object(a.d)("dtype",e,t,n))];case"ExpandDims":{const r=Object(a.d)("axis",e,t,n);return[Bt.a(Object(a.d)("x",e,t,n),r)]}case"Squeeze":{const r=Object(a.d)("axis",e,t,n);return[It.a(Object(a.d)("x",e,t,n),r)]}case"Reshape":return[jt.a(Object(a.d)("x",e,t,n),Object(a.d)("shape",e,t,n))];case"MirrorPad":return[zt.a(Object(a.d)("x",e,t,n),Object(a.d)("padding",e,t,n),Object(a.d)("mode",e,t,n))];case"PadV2":case"Pad":return[Ut.a(Object(a.d)("x",e,t,n),Object(a.d)("padding",e,t,n),Object(a.d)("constantValue",e,t,n))];case"SpaceToBatchND":{const r=Object(a.d)("blockShape",e,t,n),o=Object(a.d)("paddings",e,t,n);return[Vt.a(Object(a.d)("x",e,t,n),r,o)]}case"BatchToSpaceND":{const r=Object(a.d)("blockShape",e,t,n),o=Object(a.d)("crops",e,t,n);return[Wt.a(Object(a.d)("x",e,t,n),r,o)]}case"DepthToSpace":{const r=Object(a.d)("blockSize",e,t,n),o=Object(a.d)("dataFormat",e,t,n).toUpperCase();return[Gt.a(Object(a.d)("x",e,t,n),r,o)]}case"BroadcastTo":return[Ht.a(Object(a.d)("x",e,t,n),Object(a.d)("shape",e,t,n))];case"BroadcastArgs":return[qt.a(Object(a.d)("s0",e,t,n),Object(a.d)("s1",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n));case"hash_table":return(async(e,t,n,r)=>{switch(e.op){case"HashTable":case"HashTableV2":{const o=Object(a.d)("keyDType",e,t,n),i=Object(a.d)("valueDType",e,t,n),s=new qe(o,i);return r.addHashTable(e.name,s),[s.handle]}case"LookupTableImport":case"LookupTableImportV2":{const o=Object(a.d)("tableHandle",e,t,n,r),i=Object(a.d)("keys",e,t,n),s=Object(a.d)("values",e,t,n),u=r.getHashTableById(o.id);return[await u.import(i,s)]}case"LookupTableFind":case"LookupTableFindV2":{const o=Object(a.d)("tableHandle",e,t,n,r),i=Object(a.d)("keys",e,t,n),s=Object(a.d)("defaultValue",e,t,n),u=r.getHashTableById(o.id);return[await u.find(i,s)]}case"LookupTableSize":case"LookupTableSizeV2":{const o=Object(a.d)("tableHandle",e,t,n,r);return[r.getHashTableById(o.id).tensorSize()]}default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n,o);case"custom":const ue=Object(s.a)(e.op);if(ue&&ue.customExecutor)return ue.customExecutor(new i(e,t,n));throw TypeError(`Custom op ${e.op} is not registered.`);default:throw TypeError(`Unknown op '${e.op}'. File an issue at https://github.com/tensorflow/tfjs/issues so we can add it, or register a custom execution with tf.registerOp()`)}})(e,t,n);return r.ae.isPromise(ue)?ue.then(e=>[].concat(e)):[].concat(ue)}class Xt{constructor(e={},t={},n={},r={}){this.weightMap=e,this.tensorArrayMap=t,this.tensorListMap=n,this.functionMap=r,this.rootContext={id:0,frameName:"",iterationId:0},this.contexts=[this.rootContext],this.lastId=0,this.generateCurrentContextIds()}newFrame(e,t){return{id:e,frameName:t,iterationId:0}}set currentContext(e){this.contexts!==e&&(this.contexts=e,this.generateCurrentContextIds())}get currentContext(){return this.contexts}get currentContextId(){return this._currentContextIds[0]}get currentContextIds(){return this._currentContextIds}generateCurrentContextIds(){const e=[];for(let t=0;t<this.contexts.length-1;t++){const n=this.contexts.slice(0,this.contexts.length-t);e.push(this.contextIdforContexts(n))}e.push(""),this._currentContextIds=e}contextIdforContexts(e){return e?e.map(e=>0===e.id&&0===e.iterationId?"":`${e.frameName}-${e.iterationId}`).join("/"):""}enterFrame(e){this.contexts&&(this.lastId++,this.contexts=this.contexts.slice(),this.contexts.push(this.newFrame(this.lastId,e)),this._currentContextIds.unshift(this.contextIdforContexts(this.contexts)))}exitFrame(){if(!(this.contexts&&this.contexts.length>1))throw new Error("Cannot exit frame, the context is empty");this.contexts=this.contexts.slice(),this.contexts.splice(-1),this.currentContextIds.shift()}nextIteration(){if(!(this.contexts&&this.contexts.length>0))throw new Error("Cannot increase frame iteration, the context is empty");{this.contexts=this.contexts.slice(),this.lastId++;const e=Object.assign({},this.contexts[this.contexts.length-1]);e.iterationId+=1,e.id=this.lastId,this.contexts.splice(-1,1,e),this._currentContextIds.splice(0,1,this.contextIdforContexts(this.contexts))}}getWeight(e){return this.weightMap[e]}addTensorArray(e){this.tensorArrayMap[e.id]=e}getTensorArray(e){return this.tensorArrayMap[e]}addTensorList(e){this.tensorListMap[e.id]=e}getTensorList(e){return this.tensorListMap[e]}dispose(e){for(const t in this.tensorArrayMap)this.tensorArrayMap[t].clearAndClose(e);for(const t in this.tensorListMap)this.tensorListMap[t].clearAndClose(e)}}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Yt(e,t,n,r){const o=new Set,i=[];let s=null,u=null;const c=new Set,l=Object.keys(e).map(e=>Object(a.g)(e)[0]);let d=[];null!=r&&(d=r.map(e=>Object(a.g)(e.name)[0]));const p=[...t];for(;p.length>0;){const e=p.pop();(en(e)||tn(e)||nn(e))&&null==s&&(s=e,u=s.children.map(e=>e.name).filter(e=>o.has(e))),o.add(e.name),null==n[e.name]&&(-1===l.indexOf(e.name)&&-1===d.indexOf(e.name)&&(0!==e.inputs.length?e.inputs.forEach(e=>{c.has(e.name)||(c.add(e.name),p.push(e))}):i.push(e.name)))}return{inputs:e,outputs:t,usedNodes:o,missingInputs:i,dynamicNode:s,syncInputs:u}}const Qt=["Switch","Merge","Enter","Exit","NextIteration","StatelessIf","StatelessWhile","if","While"],Zt=["NonMaxSuppressionV2","NonMaxSuppressionV3","NonMaxSuppressionV5","Where"],Jt=["HashTable","HashTableV2","LookupTableImport","LookupTableImportV2","LookupTableFind","LookupTableFindV2","LookupTableSize","LookupTableSizeV2"];function en(e){return Qt.indexOf(e.op)>=0}function tn(e){return Zt.indexOf(e.op)>=0}function nn(e){return Jt.indexOf(e.op)>=0}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class rn{constructor(e,t){this.graph=e,this.parent=t,this.compiledMap=new Map,this._weightMap={},this.SEPERATOR=",",this._functions={},this._functionExecutorMap={},this.intermediateTensors={},this.keepTensorForDebug=!1,this._outputs=e.outputs,this._inputs=e.inputs,this._initNodes=e.initNodes,this._signature=e.signature,this._functions=e.functions,null!=e.functions&&Object.keys(e.functions).forEach(t=>{this._functionExecutorMap[t]=new rn(e.functions[t],this)})}get weightIds(){return this.parent?this.parent.weightIds:this._weightIds}get functionExecutorMap(){return this.parent?this.parent.functionExecutorMap:this._functionExecutorMap}get weightMap(){return this.parent?this.parent.weightMap:this._weightMap}set weightMap(e){const t=Object.keys(e).map(t=>e[t].map(e=>e.id));this._weightIds=[].concat(...t),this._weightMap=e}set resourceManager(e){this._resourceManager=e}get inputs(){return this._inputs.map(e=>({name:e.name,shape:e.attrParams.shape?e.attrParams.shape.value:void 0,dtype:e.attrParams.dtype?e.attrParams.dtype.value:void 0}))}get outputs(){return this._outputs.map(e=>({name:e.name,shape:e.attrParams.shape?e.attrParams.shape.value:void 0,dtype:e.attrParams.dtype?e.attrParams.dtype.value:void 0}))}get inputNodes(){return this._inputs.map(e=>e.signatureKey||e.name)}get outputNodes(){return this._outputs.map(e=>{const t=e.signatureKey||e.name;return e.defaultOutput?`${t}:${e.defaultOutput}`:t})}get functions(){return Object.keys(this._functions).reduce((e,t)=>(e[t]=this._functions[t].signature,e),{})}getCompilationKey(e,t){const n=e.map(e=>e.name).sort(),r=t.map(e=>e.name).sort();return n.join(this.SEPERATOR)+"--"+r.join(this.SEPERATOR)}compile(e,t){const n=Yt(e,t,this.weightMap,this._initNodes),{missingInputs:r,dynamicNode:o,syncInputs:i}=n;if(null!=o)throw new Error(`This execution contains the node '${o.name}', which has the dynamic op '${o.op}'. Please use model.executeAsync() instead. Alternatively, to avoid the dynamic ops, specify the inputs [${i}]`);if(r.length>0){const n=t.map(e=>e.name),o=Object.keys(e);throw new Error(`Cannot compute the outputs [${n}] from the provided inputs [${o}]. Missing the following inputs: [${r}]`)}return function(e,t,n){const{usedNodes:r,inputs:o}=n,i=[],s=Object.keys(o).map(e=>Object(a.g)(e)[0]).map(t=>e.nodes[t]),u=e.initNodes;s.forEach(e=>{r.has(e.name)&&i.push(e)}),e.weights.forEach(e=>{r.has(e.name)&&i.push(e)}),null!=u&&u.forEach(e=>{r.has(e.name)&&i.push(e)});const c=new Set,l=[];for(;i.length>0;){const e=i.pop();c.add(e.name),t[e.name]||l.push(e),e.children.forEach(e=>{!c.has(e.name)&&r.has(e.name)&&e.inputs.every(e=>c.has(e.name))&&i.push(e)})}return l}(this.graph,this.weightMap,n)}execute(e,t){e=this.mapInputs(e);const n=Object.keys(e).sort();this.checkInputs(e),this.checkInputShapeAndType(e),t=this.mapOutputs(t),this.checkOutputs(t);const o=n.map(e=>this.graph.nodes[Object(a.g)(e)[0]]),i=t.map(e=>Object(a.g)(e)[0]);let s=i.map(e=>this.graph.nodes[e]);this.resetIntermediateTensors(),0===s.length&&(s=this._outputs);const u=this.getCompilationKey(o,s);let c=this.compiledMap.get(u);null==c&&(c=this.compile(e,s),this.compiledMap.set(u,c));const l={},d={};return Object(r.Xd)(()=>{const n=new Xt(this.weightMap,l,d,this.functionExecutorMap),o=Object.assign({},this.weightMap);Object.keys(e).forEach(t=>{const[n,r]=Object(a.g)(t),i=[];i[r]=e[t],o[n]=i});const s=this.getFrozenTensorIds(o),u={};for(let e=0;e<c.length;e++){const t=c[e];if(!o[t.name]){const e=Kt(t,o,n,this._resourceManager);if(r.ae.isPromise(e))throw new Error(`The execution of the op '${t.op}' returned a promise. Please use model.executeAsync() instead.`);o[t.name]=e,this.checkTensorForDisposal(t.name,t,o,n,s,i,u)}}return null==this.parent&&n.dispose(s),t.map(e=>Object(a.e)(e,o,n))})}getFrozenTensorIds(e){const t=[].concat.apply([],Object.keys(e).map(t=>e[t]).map(e=>e.map(e=>e.id)));return new Set(t)}checkTensorForDisposal(e,t,n,r,o,i,s){"control"!==t.category&&-1===i.indexOf(e)&&(n[e].forEach(e=>{null!=e&&(s[e.id]=(s[e.id]||0)+t.children.length)}),t.inputs.forEach(e=>{if("control"!==e.category){const i=Object(a.f)(e.name,n,r);null!=i&&i.forEach(e=>{if(e&&!e.kept&&!o.has(e.id)){const n=s[e.id];if(1===n){if(this.keepTensorForDebug){const[n,o]=Object(a.b)(t.name,r);this.intermediateTensors[n]||(this.intermediateTensors[n]=[]),this.intermediateTensors[n][o]=e}else e.dispose();delete s[e.id]}else null!=n&&s[e.id]--}})}}))}async executeAsync(e,t){return this._executeAsync(e,t)}disposeIntermediateTensors(){this.intermediateTensors&&(Object.keys(this.intermediateTensors).forEach(e=>this.intermediateTensors[e].forEach(e=>e.dispose())),this.disposeTensorsMap())}disposeTensorsMap(){this.tensorsMap&&Object.keys(this.tensorsMap).forEach(e=>{this.tensorsMap[e].forEach(e=>{!e||e.kept||e.isDisposed||this.keepIds.has(e.id)||e.dispose()})})}getIntermediateTensors(){return this.tensorsMap}resetIntermediateTensors(){for(const e in this.intermediateTensors)this.intermediateTensors[e].forEach(e=>e.dispose()),delete this.intermediateTensors[e]}async _executeAsync(e,t,n=!1,o={},i={}){n||(e=this.mapInputs(e),this.checkInputs(e),this.checkInputShapeAndType(e),t=this.mapOutputs(t),this.checkOutputs(t));try{this.keepTensorForDebug=Object(r.zd)().getBool("KEEP_INTERMEDIATE_TENSORS")}catch(e){console.warn(e.message)}this.resetIntermediateTensors();const s=new Xt(this.weightMap,o,i,this.functionExecutorMap);this.tensorsMap=await this.executeWithControlFlow(e,s,t,n);const u=t.map(e=>Object(a.e)(e,this.tensorsMap,s)),c=u.map(e=>e.id),l=Object.keys(e).map(t=>e[t].id);return this.keepIds=new Set([...c,...l,...this.weightIds]),this.keepTensorForDebug||this.disposeTensorsMap(),null==this.parent&&s.dispose(this.keepIds),u}async executeFunctionAsync(e,t,n){const r=e.reduce((e,t,n)=>(e[this.inputs[n].name]=t,e),{});return this._executeAsync(r,this.outputNodes,!0,t,n)}async executeWithControlFlow(e,t,n,r){const o=Object.keys(e),i=o.map(e=>this.graph.nodes[Object(a.g)(e)[0]]),s=n.map(e=>Object(a.g)(e)[0]);let u=s.map(e=>this.graph.nodes[e]);0===u.length&&(u=this._outputs);const{usedNodes:c,missingInputs:l,dynamicNode:d,syncInputs:p}=Yt(e,u,this.weightMap,this._initNodes),h=[...i,...this.graph.weights,...this._initNodes||[]].map(e=>({node:e,contexts:t.currentContext})),f=Object.assign({},this.weightMap);Object.keys(e).forEach(t=>{const[n,r]=Object(a.g)(t),o=[];o[r]=e[t],f[n]=o});const m={},g=this.getFrozenTensorIds(f),b={};for(;h.length>0;){const e=this.processStack(i,h,t,f,b,g,s,m,c);await Promise.all(e)}null!=d||r||console.warn("This model execution did not contain any nodes with control flow or dynamic output shapes. You can use model.execute() instead.");const y=u.filter(e=>!en(e)&&!Object(a.e)(e.name,f,t)).map(e=>e.name);if(y.length>0){let e="";throw null!=d&&(e=`Alternatively, to avoid the dynamic ops, use model.execute() and specify the inputs [${p}]`),new Error(`Cannot compute the outputs [${y}] from the provided inputs [${o}]. Consider providing the following inputs: [${l}]. ${e}`)}return f}processStack(e,t,n,o,i,s,u,c,l){const d=[];for(;t.length>0;){const e=t.pop();n.currentContext=e.contexts;let p="";if("Enter"===e.node.op&&Object(a.d)("isConstant",e.node,o,n)&&([p]=Object(a.b)(e.node.name,n)),null==o[e.node.name]){const h=Kt(e.node,o,n,this._resourceManager);p||([p]=Object(a.b)(e.node.name,n));const f=n.currentContext;r.ae.isPromise(h)?d.push(h.then(r=>(o[p]=r,n.currentContext=f,this.checkTensorForDisposal(p,e.node,o,n,s,u,c),this.processChildNodes(e.node,t,n,o,i,l),r))):(o[p]=h,this.checkTensorForDisposal(p,e.node,o,n,s,u,c),this.processChildNodes(e.node,t,n,o,i,l))}else this.processChildNodes(e.node,t,n,o,i,l)}return d}processChildNodes(e,t,n,r,o,i){e.children.forEach(e=>{const[s]=Object(a.b)(e.name,n);!o[s]&&i.has(e.name)&&("Merge"===e.op?e.inputNames.some(e=>!!Object(a.e)(e,r,n))&&(o[s]=!0,t.push({contexts:n.currentContext,node:e})):e.inputNames.every(e=>!!Object(a.e)(e,r,n))&&(o[s]=!0,t.push({contexts:n.currentContext,node:e})))})}dispose(){Object.keys(this.weightMap).forEach(e=>this.weightMap[e].forEach(e=>e.dispose()))}checkInputShapeAndType(e){Object.keys(e).forEach(t=>{const n=e[t],[o]=Object(a.g)(t),i=this.graph.nodes[o];if(i.attrParams.shape&&i.attrParams.shape.value){const e=i.attrParams.shape.value,t=e.length===n.shape.length&&n.shape.every((t,n)=>-1===e[n]||e[n]===t);r.ae.assert(t,()=>`The shape of dict['${i.name}'] provided in model.execute(dict) must be [${e}], but was [${n.shape}]`)}i.attrParams.dtype&&i.attrParams.dtype.value&&r.ae.assert(n.dtype===i.attrParams.dtype.value,()=>`The dtype of dict['${i.name}'] provided in model.execute(dict) must be ${i.attrParams.dtype.value}, but was ${n.dtype}`)})}mapInputs(e){const t={};for(const n in e)if(null!=this._signature&&null!=this._signature.inputs&&null!=this._signature.inputs[n]){t[this._signature.inputs[n].name]=e[n]}else t[n]=e[n];return t}checkInputs(e){const t=Object.keys(e).filter(e=>{const[t]=Object(a.g)(e);return null==this.graph.nodes[t]});if(t.length>0)throw new Error(`The dict provided in model.execute(dict) has keys: [${t}] that are not part of graph`)}mapOutputs(e){return e.map(e=>{if(null!=this._signature&&null!=this._signature.outputs&&null!=this._signature.outputs[e]){return this._signature.outputs[e].name}return e},{})}checkOutputs(e){e.forEach(e=>{const[t]=Object(a.g)(e);if(!this.graph.nodes[t])throw new Error(`The output '${e}' is not found in the graph`)})}}class on{constructor(e={},t={}){this.hashTableNameToHandle=e,this.hashTableMap=t}addHashTable(e,t){this.hashTableNameToHandle[e]=t.handle,this.hashTableMap[t.id]=t}getHashTableHandleByName(e){return this.hashTableNameToHandle[e]}getHashTableById(e){return this.hashTableMap[e]}dispose(){for(const e in this.hashTableMap)this.hashTableMap[e].clearAndClose(),delete this.hashTableMap[e];for(const e in this.hashTableNameToHandle)this.hashTableNameToHandle[e].dispose(),delete this.hashTableNameToHandle[e]}}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class an{constructor(e,t={}){this.modelUrl=e,this.loadOptions=t,this.version="n/a",null==t&&(this.loadOptions={}),this.resourceManager=new on}get modelVersion(){return this.version}get inputNodes(){return this.executor.inputNodes}get outputNodes(){return this.executor.outputNodes}get inputs(){return this.executor.inputs}get outputs(){return this.executor.outputs}get weights(){return this.executor.weightMap}get metadata(){return this.artifacts.userDefinedMetadata}get modelSignature(){return this.signature}findIOHandler(){const e=this.modelUrl;if(null!=e.load)this.handler=e;else if(null!=this.loadOptions.requestInit)this.handler=r.Ed.browserHTTPRequest(e,this.loadOptions);else{const t=r.Ed.getLoadHandlers(e,this.loadOptions);if(0===t.length)t.push(r.Ed.browserHTTPRequest(e,this.loadOptions));else if(t.length>1)throw new Error(`Found more than one (${t.length}) load handlers for URL '${[e]}'`);this.handler=t[0]}}async load(){if(this.findIOHandler(),null==this.handler.load)throw new Error("Cannot proceed with model loading because the IOHandler provided does not have the `load` method implemented.");const e=await this.handler.load();return this.loadSync(e)}loadSync(e){this.artifacts=e;const t=this.artifacts.modelTopology;let n;n=null!=this.artifacts.userDefinedMetadata&&null!=this.artifacts.userDefinedMetadata.signature?this.artifacts.userDefinedMetadata.signature:this.artifacts.signature,this.signature=n,this.version=`${t.versions.producer}.${t.versions.minConsumer}`;const a=r.Ed.decodeWeights(this.artifacts.weightData,this.artifacts.weightSpecs);if(this.executor=new rn(o.a.Instance.transformGraph(t,this.signature)),this.executor.weightMap=this.convertTensorMapToTensorsMap(a),this.executor.resourceManager=this.resourceManager,null!=e.modelInitializer&&null!=e.modelInitializer.node){const t=o.a.Instance.transformGraph(e.modelInitializer);this.initializer=new rn(t),this.initializer.weightMap=this.executor.weightMap,this.initializer.resourceManager=this.resourceManager,this.initializer.executeAsync({},[])}return!0}async save(e,t){if("string"==typeof e){const t=r.Ed.getSaveHandlers(e);if(0===t.length)throw new Error(`Cannot find any save handlers for URL '${e}'`);if(t.length>1)throw new Error(`Found more than one (${t.length}) save handlers for URL '${e}'`);e=t[0]}if(null==e.save)throw new Error("GraphModel.save() cannot proceed because the IOHandler provided does not have the `save` attribute defined.");return e.save(this.artifacts)}predict(e,t){return this.execute(e,this.outputNodes)}normalizeInputs(e){if(!(e instanceof r.Zc||Array.isArray(e)))return e;if((e=Array.isArray(e)?e:[e]).length!==this.inputNodes.length)throw new Error(`Input tensor count mismatch,the graph model has ${this.inputNodes.length} placeholders, while there are ${e.length} input tensors.`);return this.inputNodes.reduce((t,n,r)=>(t[n]=e[r],t),{})}normalizeOutputs(e){return e=e||this.outputNodes,Array.isArray(e)?e:[e]}execute(e,t){e=this.normalizeInputs(e),t=this.normalizeOutputs(t);const n=this.executor.execute(e,t);return n.length>1?n:n[0]}async executeAsync(e,t){e=this.normalizeInputs(e),t=this.normalizeOutputs(t);const n=await this.executor.executeAsync(e,t);return n.length>1?n:n[0]}getIntermediateTensors(){return this.executor.getIntermediateTensors()}disposeIntermediateTensors(){this.executor.disposeIntermediateTensors()}convertTensorMapToTensorsMap(e){return Object.keys(e).reduce((t,n)=>(t[n]=[e[n]],t),{})}dispose(){this.executor.dispose(),this.initializer&&this.initializer.dispose(),this.resourceManager.dispose()}}async function sn(e,t={}){if(null==e)throw new Error("modelUrl in loadGraphModel() cannot be null. Please provide a url or an IOHandler that loads the model");null==t&&(t={}),t.fromTFHub&&null==e.load&&(e.endsWith("/")||(e+="/"),e+="model.json?tfjs-format=file");const n=new an(e,t);return await n.load(),n}
+/** @license See the LICENSE file. */},function(e,t,n){"use strict";
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * =============================================================================
+ */
+var r,o;n.d(t,"a",(function(){return r})),function(e){e[e.DT_INVALID=0]="DT_INVALID",e[e.DT_FLOAT=1]="DT_FLOAT",e[e.DT_DOUBLE=2]="DT_DOUBLE",e[e.DT_INT32=3]="DT_INT32",e[e.DT_UINT8=4]="DT_UINT8",e[e.DT_INT16=5]="DT_INT16",e[e.DT_INT8=6]="DT_INT8",e[e.DT_STRING=7]="DT_STRING",e[e.DT_COMPLEX64=8]="DT_COMPLEX64",e[e.DT_INT64=9]="DT_INT64",e[e.DT_BOOL=10]="DT_BOOL",e[e.DT_QINT8=11]="DT_QINT8",e[e.DT_QUINT8=12]="DT_QUINT8",e[e.DT_QINT32=13]="DT_QINT32",e[e.DT_BFLOAT16=14]="DT_BFLOAT16",e[e.DT_QINT16=15]="DT_QINT16",e[e.DT_QUINT16=16]="DT_QUINT16",e[e.DT_UINT16=17]="DT_UINT16",e[e.DT_COMPLEX128=18]="DT_COMPLEX128",e[e.DT_HALF=19]="DT_HALF",e[e.DT_RESOURCE=20]="DT_RESOURCE",e[e.DT_VARIANT=21]="DT_VARIANT",e[e.DT_UINT32=22]="DT_UINT32",e[e.DT_UINT64=23]="DT_UINT64",e[e.DT_FLOAT_REF=101]="DT_FLOAT_REF",e[e.DT_DOUBLE_REF=102]="DT_DOUBLE_REF",e[e.DT_INT32_REF=103]="DT_INT32_REF",e[e.DT_UINT8_REF=104]="DT_UINT8_REF",e[e.DT_INT16_REF=105]="DT_INT16_REF",e[e.DT_INT8_REF=106]="DT_INT8_REF",e[e.DT_STRING_REF=107]="DT_STRING_REF",e[e.DT_COMPLEX64_REF=108]="DT_COMPLEX64_REF",e[e.DT_INT64_REF=109]="DT_INT64_REF",e[e.DT_BOOL_REF=110]="DT_BOOL_REF",e[e.DT_QINT8_REF=111]="DT_QINT8_REF",e[e.DT_QUINT8_REF=112]="DT_QUINT8_REF",e[e.DT_QINT32_REF=113]="DT_QINT32_REF",e[e.DT_BFLOAT16_REF=114]="DT_BFLOAT16_REF",e[e.DT_QINT16_REF=115]="DT_QINT16_REF",e[e.DT_QUINT16_REF=116]="DT_QUINT16_REF",e[e.DT_UINT16_REF=117]="DT_UINT16_REF",e[e.DT_COMPLEX128_REF=118]="DT_COMPLEX128_REF",e[e.DT_HALF_REF=119]="DT_HALF_REF",e[e.DT_RESOURCE_REF=120]="DT_RESOURCE_REF",e[e.DT_VARIANT_REF=121]="DT_VARIANT_REF",e[e.DT_UINT32_REF=122]="DT_UINT32_REF",e[e.DT_UINT64_REF=123]="DT_UINT64_REF"}(r||(r={})),function(e){let t;!function(e){e[e.LEGACY=0]="LEGACY",e[e.V1=1]="V1",e[e.V2=2]="V2"}(t=e.CheckpointFormatVersion||(e.CheckpointFormatVersion={}))}(o||(o={}))},function(e,t,n){var r=n(101);e.exports=function(e,t,n){for(var o in t)n&&n.unsafe&&e[o]?e[o]=t[o]:r(e,o,t[o],n);return e}},function(e,t,n){var r=n(15),o=n(17),a=n(134),i=n(26),s=n(33),u=n(54).f,c=n(163),l=n(287),d=n(294),p=n(157),h=n(350),f=!1,m=p("meta"),g=0,b=function(e){u(e,m,{value:{objectID:"O"+g++,weakData:{}}})},y=e.exports={enable:function(){y.enable=function(){},f=!0;var e=c.f,t=o([].splice),n={};n[m]=1,e(n).length&&(c.f=function(n){for(var r=e(n),o=0,a=r.length;o<a;o++)if(r[o]===m){t(r,o,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,m)){if(!d(e))return"F";if(!t)return"E";b(e)}return e[m].objectID},getWeakData:function(e,t){if(!s(e,m)){if(!d(e))return!0;if(!t)return!1;b(e)}return e[m].weakData},onFreeze:function(e){return h&&f&&d(e)&&!s(e,m)&&b(e),e}};a[m]=!0},function(e,t,n){var r=n(92),o=n(199),a=n(113),i=n(24)("iterator");e.exports=function(e){if(null!=e)return o(e,i)||o(e,"@@iterator")||a[r(e)]}},function(e,t,n){"use strict";var r=n(79),o=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new o(e)}},function(e,t,n){var r=n(25),o=r({}.toString),a=r("".slice);e.exports=function(e){return a(o(e),8,-1)}},function(e,t,n){"use strict";
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function r(e,t,n){const r=function(e,t,n){return function(e,t,n){let r=0,o=e.length,a=0,i=!1;for(;r<o;){a=r+(o-r>>>1);const s=n(t,e[a]);s>0?r=a+1:(o=a,i=!s)}return i?r:-r-1}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */(e,t,n||o)}(e,t,n),a=r<0?-(r+1):r;e.splice(a,0,t)}function o(e,t){return e>t?1:e<t?-1:0}function a(e,t,n,r,o){return u(e,t,n,r,o,0)}function i(e,t,n,r,o,a){return u(e,t,n,r,o,0,!1,a,!0)}function s(e,t,n,r,o,a){return u(e,t,n,r,o,a,!0)}function u(e,t,n,o,a,i,s=!1,u=!1,p=!1){const h=[];for(let e=0;e<t.length;e++)t[e]>a&&h.push({score:t[e],boxIndex:e,suppressBeginIndex:0});h.sort(d);const f=i>0?-.5/i:0,m=[],g=[];for(;m.length<n&&h.length>0;){const t=h.pop(),{score:n,boxIndex:i,suppressBeginIndex:s}=t;if(n<a)break;let u=!1;for(let n=m.length-1;n>=s;--n){const r=c(e,i,m[n]);if(r>=o){u=!0;break}if(t.score=t.score*l(o,f,r),t.score<=a)break}t.suppressBeginIndex=m.length,u||(t.score===n?(m.push(i),g.push(t.score)):t.score>a&&r(h,t,d))}const b=m.length,y=n-b;u&&y>0&&(m.push(...new Array(y).fill(0)),g.push(...new Array(y).fill(0)));const v={selectedIndices:m};return s&&(v.selectedScores=g),p&&(v.validOutputs=b),v}function c(e,t,n){const r=e.subarray(4*t,4*t+4),o=e.subarray(4*n,4*n+4),a=Math.min(r[0],r[2]),i=Math.min(r[1],r[3]),s=Math.max(r[0],r[2]),u=Math.max(r[1],r[3]),c=Math.min(o[0],o[2]),l=Math.min(o[1],o[3]),d=Math.max(o[0],o[2]),p=Math.max(o[1],o[3]),h=(s-a)*(u-i),f=(d-c)*(p-l);if(h<=0||f<=0)return 0;const m=Math.max(a,c),g=Math.max(i,l),b=Math.min(s,d),y=Math.min(u,p),v=Math.max(b-m,0)*Math.max(y-g,0);return v/(h+f-v)}function l(e,t,n){const r=Math.exp(t*n*n);return n<=e?r:0}function d(e,t){return e.score-t.score||e.score===t.score&&t.boxIndex-e.boxIndex}n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return s}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({neg_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","neg")};return r.a.runKernel(o.Tb,t)}})},function(e,t,n){e.exports=n(516)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(5),o=n(9),a=n(13);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function i(e,t,n,i){if(null==i&&(i=Object(o.r)(e)),"complex64"===i)throw new Error("Cannot construct a complex64 tensor directly. Please use tf.complex(real, imag).");if(!Object(o.A)(e)&&!Array.isArray(e)&&"number"!=typeof e&&"boolean"!=typeof e&&"string"!=typeof e)throw new Error("values passed to tensor(values) must be a number/boolean/string or an array of numbers/booleans/strings, or a TypedArray");if(null!=t){Object(o.c)(t);const e=Object(o.O)(t),r=Object(o.O)(n);Object(o.b)(e===r,()=>`Based on the provided shape, [${t}], the tensor should have ${e} values but has ${r}`);for(let e=0;e<n.length;++e){const r=n[e],a=e!==n.length-1||r!==Object(o.O)(t.slice(e));Object(o.b)(n[e]===t[e]||!a,()=>`Error creating a new Tensor. Inferred shape (${n}) does not match the provided shape (${t}). `)}}return Object(o.A)(e)||Array.isArray(e)||(e=[e]),t=t||n,e="string"!==i?Object(a.toTypedArray)(e,i):Object(o.m)(e,[],!0),r.a.makeTensor(e,t,i)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({max_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=null,n=!1){const i={x:Object(a.a)(e,"x","max")},s={reductionIndices:t,keepDims:n};return r.a.runKernel(o.Fb,i,s)}})},function(e,t,n){var r=n(405),o=n(197);e.exports=function(e){var t=r(e,"string");return o(t)?t:t+""}},function(e,t,n){var r,o,a=n(14),i=n(133),s=a.process,u=a.Deno,c=s&&s.versions||u&&u.version,l=c&&c.v8;l&&(o=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&i&&(!(r=i.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=i.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},function(e,t,n){var r=n(14).String;e.exports=function(e){try{return r(e)}catch(e){return"Object"}}},function(e,t,n){var r=n(17),o=0,a=Math.random(),i=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++o+a,36)}},function(e,t,n){"use strict";var r=n(154),o=n(54),a=n(91);e.exports=function(e,t,n){var i=r(t);i in e?o.f(e,i,a(0,n)):e[i]=n}},function(e,t,n){var r=n(17),o=n(20),a=n(27),i=n(92),s=n(56),u=n(206),c=function(){},l=[],d=s("Reflect","construct"),p=/^\s*(?:class|function)\b/,h=r(p.exec),f=!p.exec(c),m=function(e){if(!a(e))return!1;try{return d(c,l,e),!0}catch(e){return!1}},g=function(e){if(!a(e))return!1;switch(i(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!h(p,u(e))}catch(e){return!0}};g.sham=!0,e.exports=!d||o((function(){var e;return m(m.call)||!m(Object)||!m((function(){e=!0}))||e}))?g:m},function(e,t,n){var r=n(20),o=n(24),a=n(155),i=o("species");e.exports=function(e){return a>=51||!r((function(){var t=[];return(t.constructor={})[i]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){var r=n(285),o=n(208);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(200),o=n(157),a=r("keys");e.exports=function(e){return a[e]||(a[e]=o(e))}},function(e,t,n){var r=n(285),o=n(208).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){var r=n(17),o=n(47),a=n(428);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return o(n),a(r),t?e(n,r):n.__proto__=r,n}}():void 0)},function(e,t,n){"use strict";var r=n(15),o=n(14),a=n(145),i=n(20),s=n(73),u=n(103),c=n(137),l=n(27),d=n(26),p=n(102),h=n(54).f,f=n(83).forEach,m=n(39),g=n(74),b=g.set,y=g.getterFor;e.exports=function(e,t,n){var g,v=-1!==e.indexOf("Map"),x=-1!==e.indexOf("Weak"),w=v?"set":"add",O=o[e],k=O&&O.prototype,S={};if(m&&l(O)&&(x||k.forEach&&!i((function(){(new O).entries().next()})))){var T=(g=t((function(t,n){b(c(t,T),{type:e,collection:new O}),null!=n&&u(n,t[w],{that:t,AS_ENTRIES:v})}))).prototype,C=y(e);f(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in k)||x&&"clear"==e||s(T,e,(function(n,r){var o=C(this).collection;if(!t&&x&&!d(n))return"get"==e&&void 0;var a=o[e](0===n?0:n,r);return t?this:a}))})),x||h(T,"size",{configurable:!0,get:function(){return C(this).collection.size}})}else g=n.getConstructor(t,e,v,w),a.enable();return p(g,e,!1,!0),S[e]=g,r({global:!0,forced:!0},S),x||n.setStrong(g,e,v),g}},function(e,t,n){var r,o,a,i=n(473),s=n(16),u=n(25),c=n(96),l=n(124),d=n(75),p=n(215),h=n(252),f=n(220),m=s.TypeError,g=s.WeakMap;if(i||p.state){var b=p.state||(p.state=new g),y=u(b.get),v=u(b.has),x=u(b.set);r=function(e,t){if(v(b,e))throw new m("Object already initialized");return t.facade=e,x(b,e,t),t},o=function(e){return y(b,e)||{}},a=function(e){return v(b,e)}}else{var w=h("state");f[w]=!0,r=function(e,t){if(d(e,w))throw new m("Object already initialized");return t.facade=e,l(e,w,t),t},o=function(e){return d(e,w)?e[w]:{}},a=function(e){return d(e,w)}}e.exports={set:r,get:o,has:a,enforce:function(e){return a(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=o(t)).type!==e)throw m("Incompatible receiver, "+e+" required");return n}}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){var t=+e;return t!=t||0===t?0:(t>0?r:n)(t)}},function(e,t,n){var r=n(167),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){"use strict";var r,o,a=n(59),i=n(25),s=n(85),u=n(254),c=n(255),l=n(214),d=n(256),p=n(166).get,h=n(359),f=n(360),m=l("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,b=g,y=i("".charAt),v=i("".indexOf),x=i("".replace),w=i("".slice),O=(o=/b*/g,a(g,r=/a/,"a"),a(g,o,"a"),0!==r.lastIndex||0!==o.lastIndex),k=c.UNSUPPORTED_Y||c.BROKEN_CARET,S=void 0!==/()??/.exec("")[1];(O||S||k||h||f)&&(b=function(e){var t,n,r,o,i,c,l,h=this,f=p(h),T=s(e),C=f.raw;if(C)return C.lastIndex=h.lastIndex,t=a(b,C,T),h.lastIndex=C.lastIndex,t;var E=f.groups,I=k&&h.sticky,j=a(u,h),N=h.source,A=0,R=T;if(I&&(j=x(j,"y",""),-1===v(j,"g")&&(j+="g"),R=w(T,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==y(T,h.lastIndex-1))&&(N="(?: "+N+")",R=" "+R,A++),n=new RegExp("^(?:"+N+")",j)),S&&(n=new RegExp("^"+N+"$(?!\\s)",j)),O&&(r=h.lastIndex),o=a(g,I?n:h,R),I?o?(o.input=w(o.input,A),o[0]=w(o[0],A),o.index=h.lastIndex,h.lastIndex+=o[0].length):h.lastIndex=0:O&&o&&(h.lastIndex=h.global?o.index+o[0].length:r),S&&o&&o.length>1&&a(m,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&E)for(o.groups=c=d(null),i=0;i<E.length;i++)c[(l=E[i])[0]]=o[l[1]];return o}),e.exports=b},function(e,t,n){"use strict";n(126);var r=n(25),o=n(95),a=n(169),i=n(45),s=n(57),u=n(124),c=s("species"),l=RegExp.prototype;e.exports=function(e,t,n,d){var p=s(e),h=!i((function(){var t={};return t[p]=function(){return 7},7!=""[e](t)})),f=h&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return t=!0,null},n[p](""),!t}));if(!h||!f||n){var m=r(/./[p]),g=t(p,""[e],(function(e,t,n,o,i){var s=r(e),u=t.exec;return u===a||u===l.exec?h&&!i?{done:!0,value:m(t,n,o)}:{done:!0,value:s(n,t,o)}:{done:!1}}));o(String.prototype,e,g[0]),o(l,p,g[1])}d&&u(l[p],"sham",!0)}},function(e,t,n){var r=n(16),o=n(59),a=n(49),i=n(43),s=n(148),u=n(169),c=r.TypeError;e.exports=function(e,t){var n=e.exec;if(i(n)){var r=o(n,e,t);return null!==r&&a(r),r}if("RegExp"===s(e))return o(u,e,t);throw c("RegExp#exec called on incompatible receiver")}},function(e,t,n){(function(r){function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(545)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,a=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(a=o))})),e.splice(a,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())}).call(this,n(90))},function(e,t){t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),r=0,o=n.length;r<o;r++){var a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}},function(e,t){e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){(function(r){function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(563)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,a=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(a=o))})),e.splice(a,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())}).call(this,n(90))},function(e,t,n){var r=n(401),o=n(437);function a(t){return"function"==typeof r&&"symbol"==typeof o?(e.exports=a=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=a=function(e){return e&&"function"==typeof r&&e.constructor===r&&e!==r.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),a(t)}e.exports=a,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(4);const u=Object(s.a)({stack_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=0){const n=Object(a.b)(e,"tensors","stack","string_or_numeric");i.b(n.length>=1,()=>"Pass at least one tensor to tf.stack"),n.length>0&&i.b(t<=n[0].rank,()=>"Axis must be <= rank of the tensor");const s=n,u={axis:t};return r.a.runKernel(o.ac,s,u)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({split_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n=0){const i={x:Object(a.a)(e,"x","split")},s={numOrSizeSplits:t,axis:n};return r.a.runKernel(o.Kc,i,s)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({log_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","log","float32")};return r.a.runKernel(o.Ab,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(4);const u=Object(s.a)({expandDims_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=0){const n=Object(a.a)(e,"x","expandDims","string_or_numeric");i.b(t<=n.rank,()=>"Axis must be <= rank of the tensor");const s={input:n},u={dim:t};return r.a.runKernel(o.Z,s,u)}})},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,a=o&&!r.call({1:2},1);t.f=a?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},function(e,t,n){var r=n(25);e.exports=r({}.isPrototypeOf)},function(e,t,n){var r=n(25),o=n(43),a=n(215),i=r(Function.toString);o(a.inspectSource)||(a.inspectSource=function(e){return i(e)}),e.exports=a.inspectSource},function(e,t,n){var r=n(84),o=n(75),a=Function.prototype,i=r&&Object.getOwnPropertyDescriptor,s=o(a,"name"),u=s&&"something"===function(){}.name,c=s&&(!r||r&&i(a,"name").configurable);e.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},function(e,t,n){var r=n(16),o=n(213),a=n(43),i=n(148),s=n(57)("toStringTag"),u=r.Object,c="Arguments"==i(function(){return arguments}());e.exports=o?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=u(e),s))?n:c?i(t):"Object"==(r=i(t))&&a(t.callee)?"Arguments":r}},function(e,t,n){"use strict";
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+var r,o,a,i,s;n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l})),function(e){e.R0="R0",e.R1="R1",e.R2="R2",e.R3="R3",e.R4="R4",e.R5="R5",e.R6="R6"}(r||(r={})),function(e){e.float32="float32",e.int32="int32",e.bool="int32",e.complex64="complex64"}(o||(o={})),function(e){e.float32="float32",e.int32="int32",e.bool="bool",e.complex64="complex64"}(a||(a={})),function(e){e.float32="float32",e.int32="float32",e.bool="float32",e.complex64="complex64"}(i||(i={})),function(e){e.float32="complex64",e.int32="complex64",e.bool="complex64",e.complex64="complex64"}(s||(s={}));const u={float32:i,int32:o,bool:a,complex64:s};function c(e,t){if("string"===e||"string"===t){if("string"===e&&"string"===t)return"string";throw new Error(`Can not upcast ${e} with ${t}`)}return u[e][t]}function l(e){return c(e,"int32")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(5),o=n(9),a=n(121);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function i(e,t="float32"){if("complex64"===t){const t=i(e,"float32"),n=i(e,"float32");return Object(a.a)(t,n)}const n=Object(o.F)(Object(o.O)(e),t);return r.a.makeTensor(n,e,t)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return i})),n.d(t,"e",(function(){return s})),n.d(t,"a",(function(){return u})),n.d(t,"f",(function(){return c})),n.d(t,"h",(function(){return l})),n.d(t,"g",(function(){return d}));var r=n(9);
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function o(e,t){for(let n=0;n<e.length;++n)if(e[e.length-n-1]!==t-1-n)return!1;return!0}function a(e,t,n){const r=e.length+t.length,o=[];let a=0,i=0;for(let s=0;s<r;s++)-1===n.indexOf(s)?o.push(e[a++]):o.push(t[i++]);return o}function i(e,t){const n=[],r=e.length;for(let o=0;o<r;o++)-1===t.indexOf(o)&&n.push(e[o]);return[n,t.map(t=>e[t])]}function s(e,t){return a(e,t.map(e=>1),t)}function u(e,t,n){r.b(o(t,n),()=>e+" supports only inner-most axes for now. "+`Got axes ${t} and rank-${n} input.`)}function c(e,t){if(o(e,t))return null;const n=[];for(let r=0;r<t;++r)-1===e.indexOf(r)&&n.push(r);return e.forEach(e=>n.push(e)),n}function l(e){return e.map((e,t)=>[t,e]).sort((e,t)=>e[1]-t[1]).map(e=>e[0])}function d(e,t){const n=[];for(let r=t-e;r<t;++r)n.push(r);return n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({relu_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","relu")};return r.a.runKernel(o.jc,t)}})},,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(3),o=n(152);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function a(e,t,n){const a=Object(r.c)(e,n);return Object(o.a)(e,t,a,n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(4);const u=Object(s.a)({tile_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){const n=Object(a.a)(e,"x","tile","string_or_numeric");i.b(n.rank===t.length,()=>`Error in transpose: rank of input ${n.rank} must match length of reps ${t}.`);const s={x:n},u={reps:t};return r.a.runKernel(o.Xc,s,u)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(5),o=n(6);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function a(e,t,n=1,a="float32"){if(0===n)throw new Error("Cannot have a step of zero");const i={start:e,stop:t,step:n,dtype:a};return r.a.runKernel(o.fc,{},i)}},,function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return p}));var r,o={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){return 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1}},Back:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-o.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*o.Bounce.In(2*e):.5*o.Bounce.Out(2*e-1)+.5}}},a="undefined"==typeof self&&void 0!==e&&e.hrtime?function(){var t=e.hrtime();return 1e3*t[0]+t[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()},i=function(){function e(){this._tweens={},this._tweensAddedDuringUpdate={}}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map((function(t){return e._tweens[t]}))},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},e.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},e.prototype.update=function(e,t){void 0===e&&(e=a()),void 0===t&&(t=!1);var n=Object.keys(this._tweens);if(0===n.length)return!1;for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var r=0;r<n.length;r++){var o=this._tweens[n[r]],i=!t;o&&!1===o.update(e,i)&&!t&&delete this._tweens[n[r]]}n=Object.keys(this._tweensAddedDuringUpdate)}return!0},e}(),s={Linear:function(e,t){var n=e.length-1,r=n*t,o=Math.floor(r),a=s.Utils.Linear;return t<0?a(e[0],e[1],r):t>1?a(e[n],e[n-1],n-r):a(e[o],e[o+1>n?n:o+1],r-o)},Bezier:function(e,t){for(var n=0,r=e.length-1,o=Math.pow,a=s.Utils.Bernstein,i=0;i<=r;i++)n+=o(1-t,r-i)*o(t,i)*e[i]*a(r,i);return n},CatmullRom:function(e,t){var n=e.length-1,r=n*t,o=Math.floor(r),a=s.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(o=Math.floor(r=n*(1+t))),a(e[(o-1+n)%n],e[o],e[(o+1)%n],e[(o+2)%n],r-o)):t<0?e[0]-(a(e[0],e[0],e[1],e[1],-r)-e[0]):t>1?e[n]-(a(e[n],e[n],e[n-1],e[n-1],r-n)-e[n]):a(e[o?o-1:0],e[o],e[n<o+1?n:o+1],e[n<o+2?n:o+2],r-o)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=s.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:(r=[1],function(e){var t=1;if(r[e])return r[e];for(var n=e;n>1;n--)t*=n;return r[e]=t,t}),CatmullRom:function(e,t,n,r,o){var a=.5*(n-e),i=.5*(r-t),s=o*o;return(2*t-2*n+a+i)*(o*s)+(-3*t+3*n-2*a-i)*s+a*o+t}}},u=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),c=new i,l=function(){function e(e,t){void 0===t&&(t=c),this._object=e,this._group=t,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=o.Linear.None,this._interpolationFunction=s.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=u.nextId(),this._isChainStopped=!1,this._goToEnd=!1}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.to=function(e,t){return this._valuesEnd=Object.create(e),void 0!==t&&(this._duration=t),this},e.prototype.duration=function(e){return this._duration=e,this},e.prototype.start=function(e){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var t in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(t),this._valuesStart[t]=this._valuesStartRepeat[t];return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=void 0!==e?"string"==typeof e?a()+parseFloat(e):e:a(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},e.prototype._setupProperties=function(e,t,n,r){for(var o in n){var a=e[o],i=Array.isArray(a),s=i?"array":typeof a,u=!i&&Array.isArray(n[o]);if("undefined"!==s&&"function"!==s){if(u){var c=n[o];if(0===c.length)continue;c=c.map(this._handleRelativeValue.bind(this,a)),n[o]=[a].concat(c)}if("object"!==s&&!i||!a||u)void 0===t[o]&&(t[o]=a),i||(t[o]*=1),r[o]=u?n[o].slice().reverse():t[o]||0;else{for(var l in t[o]=i?[]:{},a)t[o][l]=a[l];r[o]=i?[]:{},this._setupProperties(a,t[o],n[o],r[o])}}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(e){return void 0===e&&(e=a()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this)),this},e.prototype.resume=function(e){return void 0===e&&(e=a()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},e.prototype.stopChainedTweens=function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop();return this},e.prototype.group=function(e){return this._group=e,this},e.prototype.delay=function(e){return this._delayTime=e,this},e.prototype.repeat=function(e){return this._initialRepeat=e,this._repeat=e,this},e.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},e.prototype.yoyo=function(e){return this._yoyo=e,this},e.prototype.easing=function(e){return this._easingFunction=e,this},e.prototype.interpolation=function(e){return this._interpolationFunction=e,this},e.prototype.chain=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._chainedTweens=e,this},e.prototype.onStart=function(e){return this._onStartCallback=e,this},e.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},e.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},e.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},e.prototype.onStop=function(e){return this._onStopCallback=e,this},e.prototype.update=function(e,t){if(void 0===e&&(e=a()),void 0===t&&(t=!0),this._isPaused)return!0;var n,r,o=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>o)return!1;t&&this.start(e)}if(this._goToEnd=!1,e<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),r=(e-this._startTime)/this._duration,r=0===this._duration||r>1?1:r;var i=this._easingFunction(r);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,i),this._onUpdateCallback&&this._onUpdateCallback(this._object,r),1===r){if(this._repeat>0){for(n in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[n]||(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var s=0,u=this._chainedTweens.length;s<u;s++)this._chainedTweens[s].start(this._startTime+this._duration);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(e,t,n,r){for(var o in n)if(void 0!==t[o]){var a=t[o]||0,i=n[o],s=Array.isArray(e[o]),u=Array.isArray(i);!s&&u?e[o]=this._interpolationFunction(i,r):"object"==typeof i&&i?this._updateProperties(e[o],a,i,r):"number"==typeof(i=this._handleRelativeValue(a,i))&&(e[o]=a+(i-a)*r)}},e.prototype._handleRelativeValue=function(e,t){return"string"!=typeof t?t:"+"===t.charAt(0)||"-"===t.charAt(0)?e+parseFloat(t):parseFloat(t)},e.prototype._swapEndStartRepeatValues=function(e){var t=this._valuesStartRepeat[e],n=this._valuesEnd[e];this._valuesStartRepeat[e]="string"==typeof n?this._valuesStartRepeat[e]+parseFloat(n):this._valuesEnd[e],this._valuesEnd[e]=t},e}(),d=(u.nextId,c),p=(d.getAll.bind(d),d.removeAll.bind(d),d.add.bind(d),d.remove.bind(d),d.update.bind(d))}).call(this,n(90))},function(e,t,n){var r=n(14),o=n(56),a=n(27),i=n(34),s=n(280),u=r.Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=o("Symbol");return a(t)&&i(t.prototype,u(e))}},function(e,t,n){var r=n(155),o=n(20);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(e,t,n){var r=n(79);e.exports=function(e,t){var n=e[t];return null==n?void 0:r(n)}},function(e,t,n){var r=n(70),o=n(201);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.21.1",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE",source:"https://github.com/zloirock/core-js"})},function(e,t,n){var r=n(14),o=n(407),a=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=a},function(e,t,n){var r=n(14),o=n(26),a=r.document,i=o(a)&&o(a.createElement);e.exports=function(e){return i?a.createElement(e):{}}},function(e,t,n){var r=n(204),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){var t=+e;return t!=t||0===t?0:(t>0?r:n)(t)}},function(e,t,n){var r={};r[n(24)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){var r=n(17),o=n(27),a=n(201),i=r(Function.toString);o(a.inspectSource)||(a.inspectSource=function(e){return i(e)}),e.exports=a.inspectSource},function(e,t,n){var r=n(204),o=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):a(n,t)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){var r=n(24);t.f=r},function(e,t,n){"use strict";var r=n(15),o=n(50),a=n(70),i=n(427),s=n(27),u=n(346),c=n(136),l=n(164),d=n(102),p=n(73),h=n(101),f=n(24),m=n(113),g=n(291),b=i.PROPER,y=i.CONFIGURABLE,v=g.IteratorPrototype,x=g.BUGGY_SAFARI_ITERATORS,w=f("iterator"),O=function(){return this};e.exports=function(e,t,n,i,f,g,k){u(n,t,i);var S,T,C,E=function(e){if(e===f&&R)return R;if(!x&&e in N)return N[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},I=t+" Iterator",j=!1,N=e.prototype,A=N[w]||N["@@iterator"]||f&&N[f],R=!x&&A||E(f),_="Array"==t&&N.entries||A;if(_&&(S=c(_.call(new e)))!==Object.prototype&&S.next&&(a||c(S)===v||(l?l(S,v):s(S[w])||h(S,w,O)),d(S,I,!0,!0),a&&(m[I]=O)),b&&"values"==f&&A&&"values"!==A.name&&(!a&&y?p(N,"name","values"):(j=!0,R=function(){return o(A,this)})),f)if(T={values:E("values"),keys:g?R:E("keys"),entries:E("entries")},k)for(C in T)(x||j||!(C in N))&&h(N,C,T[C]);else r({target:t,proto:!0,forced:x||j},T);return a&&!k||N[w]===R||h(N,w,R,{name:f}),m[t]=R,T}},function(e,t,n){var r=n(14).TypeError;e.exports=function(e,t){if(e<t)throw r("Not enough arguments");return e}},function(e,t,n){var r=n(99),o=n(14);e.exports="process"==r(o.process)},function(e,t,n){var r={};r[n(57)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){var r=n(248),o=n(215);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.1",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(16),o=n(216),a=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=a},function(e,t,n){var r=n(16),o=Object.defineProperty;e.exports=function(e,t){try{o(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(16),o=n(96),a=r.document,i=o(a)&&o(a.createElement);e.exports=function(e){return i?a.createElement(e):{}}},function(e,t,n){var r=n(16),o=n(43),a=n(219),i=r.TypeError;e.exports=function(e){if(o(e))return e;throw i(a(e)+" is not a function")}},function(e,t,n){var r=n(16).String;e.exports=function(e){try{return r(e)}catch(e){return"Object"}}},function(e,t){e.exports={}},function(e,t,n){var r=n(16),o=n(253).f,a=n(124),i=n(95),s=n(216),u=n(487),c=n(314);e.exports=function(e,t){var n,l,d,p,h,f=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[f]||s(f,{}):(r[f]||{}).prototype)for(l in t){if(p=t[l],d=e.noTargetGet?(h=o(n,l))&&h.value:n[l],!c(m?l:f+(g?".":"#")+l,e.forced)&&void 0!==d){if(typeof p==typeof d)continue;u(p,d)}(e.sham||d&&d.sham)&&a(p,"sham",!0),i(n,l,p,e)}}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){"use strict";var r=n(361).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){"use strict";var r=n(20);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){return 1},1)}))}},function(e,t,n){var r=n(25),o=n(95),a=Date.prototype,i=r(a.toString),s=r(a.getTime);"Invalid Date"!=String(new Date(NaN))&&o(a,"toString",(function(){var e=s(this);return e==e?i(this):"Invalid Date"}))},function(e,t,n){"use strict";var r=n(25),o=n(185).PROPER,a=n(95),i=n(49),s=n(183),u=n(85),c=n(45),l=n(254),d=RegExp.prototype,p=d.toString,h=r(l),f=c((function(){return"/a/b"!=p.call({source:"a",flags:"b"})})),m=o&&"toString"!=p.name;(f||m)&&a(RegExp.prototype,"toString",(function(){var e=i(this),t=u(e.source),n=e.flags;return"/"+t+"/"+u(void 0===n&&s(d,e)&&!("flags"in d)?h(e):n)}),{unsafe:!0})},function(e,t){var n=1e3,r=6e4,o=60*r,a=24*o;function i(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var s,u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var i=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*i;case"days":case"day":case"d":return i*a;case"hours":case"hour":case"hrs":case"hr":case"h":return i*o;case"minutes":case"minute":case"mins":case"min":case"m":return i*r;case"seconds":case"second":case"secs":case"sec":case"s":return i*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?i(s=e,a,"day")||i(s,o,"hour")||i(s,r,"minute")||i(s,n,"second")||s+" ms":function(e){if(e>=a)return Math.round(e/a)+"d";if(e>=o)return Math.round(e/o)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){var r=n(546)("socket.io-parser"),o=n(117),a=n(318),i=n(552),s=n(320),u=n(321);function c(){}function l(e){var n=""+e.type;return t.BINARY_EVENT!==e.type&&t.BINARY_ACK!==e.type||(n+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(n+=e.nsp+","),null!=e.id&&(n+=e.id),null!=e.data&&(n+=JSON.stringify(e.data)),r("encoded %j as %s",e,n),n}function d(){this.reconstructor=null}function p(e){this.reconPack=e,this.buffers=[]}function h(e){return{type:t.ERROR,data:"parser error: "+e}}t.protocol=4,t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],t.CONNECT=0,t.DISCONNECT=1,t.EVENT=2,t.ACK=3,t.ERROR=4,t.BINARY_EVENT=5,t.BINARY_ACK=6,t.Encoder=c,t.Decoder=d,c.prototype.encode=function(e,n){(e.type!==t.EVENT&&e.type!==t.ACK||!a(e.data)||(e.type=e.type===t.EVENT?t.BINARY_EVENT:t.BINARY_ACK),r("encoding packet %j",e),t.BINARY_EVENT===e.type||t.BINARY_ACK===e.type)?function(e,t){i.removeBlobs(e,(function(e){var n=i.deconstructPacket(e),r=l(n.packet),o=n.buffers;o.unshift(r),t(o)}))}(e,n):n([l(e)])},o(d.prototype),d.prototype.add=function(e){var n;if("string"==typeof e)n=function(e){var n=0,o={type:Number(e.charAt(0))};if(null==t.types[o.type])return h("unknown packet type "+o.type);if(t.BINARY_EVENT===o.type||t.BINARY_ACK===o.type){for(var a="";"-"!==e.charAt(++n)&&(a+=e.charAt(n),n!=e.length););if(a!=Number(a)||"-"!==e.charAt(n))throw new Error("Illegal attachments");o.attachments=Number(a)}if("/"===e.charAt(n+1))for(o.nsp="";++n;){if(","===(u=e.charAt(n)))break;if(o.nsp+=u,n===e.length)break}else o.nsp="/";var i=e.charAt(n+1);if(""!==i&&Number(i)==i){for(o.id="";++n;){var u;if(null==(u=e.charAt(n))||Number(u)!=u){--n;break}if(o.id+=e.charAt(n),n===e.length)break}o.id=Number(o.id)}if(e.charAt(++n)){var c=function(e){try{return JSON.parse(e)}catch(e){return!1}}(e.substr(n));if(!(!1!==c&&(o.type===t.ERROR||s(c))))return h("invalid payload");o.data=c}return r("decoded %s as %j",e,o),o}(e),t.BINARY_EVENT===n.type||t.BINARY_ACK===n.type?(this.reconstructor=new p(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!u(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(n=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,this.emit("decoded",n))}},d.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},p.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=i.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},p.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(e,t,n){(function(t){var r=n(555);e.exports=function(e){var n=e.xdomain,o=e.xscheme,a=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!n||r))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!o&&a)return new XDomainRequest}catch(e){}if(!n)try{return new(t[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}}).call(this,n(53))},function(e,t,n){var r=n(118),o=n(117);function a(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.forceNode=e.forceNode,this.extraHeaders=e.extraHeaders,this.localAddress=e.localAddress}e.exports=a,o(a.prototype),a.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},a.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},a.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},a.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)},a.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},a.prototype.onData=function(e){var t=r.decodePacket(e,this.socket.binaryType);this.onPacket(t)},a.prototype.onPacket=function(e){this.emit("packet",e)},a.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r={};function o(e){return r[e]}},function(e,t,n){e.exports=n(573)},function(e,t,n){e.exports=n(579)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(9),i=n(4);const s=Object(i.a)({ifft_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){Object(a.b)("complex64"===e.dtype,()=>`The dtype for tf.spectral.ifft() must be complex64 but got ${e.dtype}.`);const t={input:e};return r.a.runKernel(o.ob,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({real_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={input:Object(a.a)(e,"input","real")};return r.a.runKernel(o.gc,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),o=n(6),a=n(22),i=n(3),s=n(35),u=n(4);const c=Object(u.a)({greater_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){let n=Object(i.a)(e,"a","greater","string_or_numeric"),u=Object(i.a)(t,"b","greater","string_or_numeric");[n,u]=Object(a.b)(n,u),Object(s.assertAndGetBroadcastShape)(n.shape,u.shape);const c={a:n,b:u};return r.a.runKernel(o.mb,c)}})},function(e,t,n){var r;
+/*!
+ * UAParser.js v0.7.21
+ * Lightweight JavaScript-based User-Agent string parser
+ * https://github.com/faisalman/ua-parser-js
+ *
+ * Copyright © 2012-2019 Faisal Salman <f@faisalman.com>
+ * Licensed under MIT License
+ */!function(o,a){"use strict";var i="model",s="name",u="type",c="vendor",l="version",d="mobile",p="tablet",h="smarttv",f={extend:function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},m={rgx:function(e,t){for(var n,r,o,a,i,s,u=0;u<t.length&&!i;){var c=t[u],l=t[u+1];for(n=r=0;n<c.length&&!i;)if(i=c[n++].exec(e))for(o=0;o<l.length;o++)s=i[++r],"object"==typeof(a=l[o])&&a.length>0?2==a.length?"function"==typeof a[1]?this[a[0]]=a[1].call(this,s):this[a[0]]=a[1]:3==a.length?"function"!=typeof a[1]||a[1].exec&&a[1].test?this[a[0]]=s?s.replace(a[1],a[2]):void 0:this[a[0]]=s?a[1].call(this,s,a[2]):void 0:4==a.length&&(this[a[0]]=s?a[3].call(this,s.replace(a[1],a[2])):void 0):this[a]=s||void 0;u+=2}},str:function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(f.has(t[n][r],e))return"?"===n?void 0:n}else if(f.has(t[n],e))return"?"===n?void 0:n;return e}},g={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},b={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[s,l],[/(opios)[\/\s]+([\w\.]+)/i],[[s,"Opera Mini"],l],[/\s(opr)\/([\w\.]+)/i],[[s,"Opera"],l],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i],[s,l],[/(konqueror)\/([\w\.]+)/i],[[s,"Konqueror"],l],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[s,"IE"],l],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[s,"Edge"],l],[/(yabrowser)\/([\w\.]+)/i],[[s,"Yandex"],l],[/(Avast)\/([\w\.]+)/i],[[s,"Avast Secure Browser"],l],[/(AVG)\/([\w\.]+)/i],[[s,"AVG Secure Browser"],l],[/(puffin)\/([\w\.]+)/i],[[s,"Puffin"],l],[/(focus)\/([\w\.]+)/i],[[s,"Firefox Focus"],l],[/(opt)\/([\w\.]+)/i],[[s,"Opera Touch"],l],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[s,"UCBrowser"],l],[/(comodo_dragon)\/([\w\.]+)/i],[[s,/_/g," "],l],[/(windowswechat qbcore)\/([\w\.]+)/i],[[s,"WeChat(Win) Desktop"],l],[/(micromessenger)\/([\w\.]+)/i],[[s,"WeChat"],l],[/(brave)\/([\w\.]+)/i],[[s,"Brave"],l],[/(qqbrowserlite)\/([\w\.]+)/i],[s,l],[/(QQ)\/([\d\.]+)/i],[s,l],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[s,l],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[s,l],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[s,l],[/(MetaSr)[\/\s]?([\w\.]+)/i],[s],[/(LBBROWSER)/i],[s],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[l,[s,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[l,[s,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[s,l],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[l,[s,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[s,/(.+)/,"$1 WebView"],l],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[s,/(.+(?:g|us))(.+)/,"$1 $2"],l],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[l,[s,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[s,"Sailfish Browser"],l],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[s,l],[/(dolfin)\/([\w\.]+)/i],[[s,"Dolphin"],l],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[s,"360 Browser"]],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[s,"Chrome"],l],[/(coast)\/([\w\.]+)/i],[[s,"Opera Coast"],l],[/fxios\/([\w\.-]+)/i],[l,[s,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[l,[s,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[l,s],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[s,"GSA"],l],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[s,[l,m.str,g.browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[s,l],[/(navigator|netscape)\/([\w\.-]+)/i],[[s,"Netscape"],l],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[s,l]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",f.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",f.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[["architecture",f.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[i,c,[u,p]],[/applecoremedia\/[\w\.]+ \((ipad)/],[i,[c,"Apple"],[u,p]],[/(apple\s{0,1}tv)/i],[[i,"Apple TV"],[c,"Apple"],[u,h]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[c,i,[u,p]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[i,[c,"Amazon"],[u,p]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[i,m.str,g.device.amazon.model],[c,"Amazon"],[u,d]],[/android.+aft([bms])\sbuild/i],[i,[c,"Amazon"],[u,h]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[i,c,[u,d]],[/\((ip[honed|\s\w*]+);/i],[i,[c,"Apple"],[u,d]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[c,i,[u,d]],[/\(bb10;\s(\w+)/i],[i,[c,"BlackBerry"],[u,d]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[i,[c,"Asus"],[u,p]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[c,"Sony"],[i,"Xperia Tablet"],[u,p]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[i,[c,"Sony"],[u,d]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[c,i,[u,"console"]],[/android.+;\s(shield)\sbuild/i],[i,[c,"Nvidia"],[u,"console"]],[/(playstation\s[34portablevi]+)/i],[i,[c,"Sony"],[u,"console"]],[/(sprint\s(\w+))/i],[[c,m.str,g.device.sprint.vendor],[i,m.str,g.device.sprint.model],[u,d]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[c,[i,/_/g," "],[u,d]],[/(nexus\s9)/i],[i,[c,"HTC"],[u,p]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[i,[c,"Huawei"],[u,d]],[/android.+(bah2?-a?[lw]\d{2})/i],[i,[c,"Huawei"],[u,p]],[/(microsoft);\s(lumia[\s\w]+)/i],[c,i,[u,d]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[i,[c,"Microsoft"],[u,"console"]],[/(kin\.[onetw]{3})/i],[[i,/\./g," "],[c,"Microsoft"],[u,d]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[i,[c,"Motorola"],[u,d]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[i,[c,"Motorola"],[u,p]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[c,f.trim],[i,f.trim],[u,h]],[/hbbtv.+maple;(\d+)/i],[[i,/^/,"SmartTV"],[c,"Samsung"],[u,h]],[/\(dtv[\);].+(aquos)/i],[i,[c,"Sharp"],[u,h]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[c,"Samsung"],i,[u,p]],[/smart-tv.+(samsung)/i],[c,[u,h],i],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[c,"Samsung"],i,[u,d]],[/sie-(\w*)/i],[i,[c,"Siemens"],[u,d]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[c,"Nokia"],i,[u,d]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[i,[c,"Acer"],[u,p]],[/android.+([vl]k\-?\d{3})\s+build/i],[i,[c,"LG"],[u,p]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[c,"LG"],i,[u,p]],[/(lg) netcast\.tv/i],[c,i,[u,h]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[i,[c,"LG"],[u,d]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[c,i,[u,p]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[i,[c,"Lenovo"],[u,p]],[/(lenovo)[_\s-]?([\w-]+)/i],[c,i,[u,d]],[/linux;.+((jolla));/i],[c,i,[u,d]],[/((pebble))app\/[\d\.]+\s/i],[c,i,[u,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[c,i,[u,d]],[/crkey/i],[[i,"Chromecast"],[c,"Google"],[u,h]],[/android.+;\s(glass)\s\d/i],[i,[c,"Google"],[u,"wearable"]],[/android.+;\s(pixel c)[\s)]/i],[i,[c,"Google"],[u,p]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[i,[c,"Google"],[u,d]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i],[[i,/_/g," "],[c,"Xiaomi"],[u,d]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[i,/_/g," "],[c,"Xiaomi"],[u,p]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[i,[c,"Meizu"],[u,d]],[/(mz)-([\w-]{2,})/i],[[c,"Meizu"],i,[u,d]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[i,[c,"OnePlus"],[u,d]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[i,[c,"RCA"],[u,p]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[i,[c,"Dell"],[u,p]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[i,[c,"Verizon"],[u,p]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[c,"Barnes & Noble"],i,[u,p]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[i,[c,"NuVision"],[u,p]],[/android.+;\s(k88)\sbuild/i],[i,[c,"ZTE"],[u,p]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[i,[c,"Swiss"],[u,d]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[i,[c,"Swiss"],[u,p]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[i,[c,"Zeki"],[u,p]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[c,"Dragon Touch"],i,[u,p]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[i,[c,"Insignia"],[u,p]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[i,[c,"NextBook"],[u,p]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[c,"Voice"],i,[u,d]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[c,"LvTel"],i,[u,d]],[/android.+;\s(PH-1)\s/i],[i,[c,"Essential"],[u,d]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[i,[c,"Envizen"],[u,p]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[c,i,[u,p]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[i,[c,"MachSpeed"],[u,p]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[c,i,[u,p]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[i,[c,"Rotor"],[u,p]],[/android.+(KS(.+))\s+build/i],[i,[c,"Amazon"],[u,p]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[c,i,[u,p]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[u,f.lowerize],c,i],[/[\s\/\(](smart-?tv)[;\)]/i],[[u,h]],[/(android[\w\.\s\-]{0,9});.+build/i],[i,[c,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[l,[s,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[l,[s,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[s,l],[/rv\:([\w\.]{1,9}).+(gecko)/i],[l,s]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[s,l],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[s,[l,m.str,g.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[s,"Windows"],[l,m.str,g.os.windows.version]],[/\((bb)(10);/i],[[s,"BlackBerry"],l],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[s,l],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[s,"Symbian"],l],[/\((series40);/i],[s],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[s,"Firefox OS"],l],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[s,l],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[s,"Chromium OS"],l],[/(sunos)\s?([\w\.\d]*)/i],[[s,"Solaris"],l],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[s,l],[/(haiku)\s(\w+)/i],[s,l],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[l,/_/g,"."],[s,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[s,"Mac OS"],[l,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[s,l]]},y=function(e,t){if("object"==typeof e&&(t=e,e=void 0),!(this instanceof y))return new y(e,t).getResult();var n=e||(o&&o.navigator&&o.navigator.userAgent?o.navigator.userAgent:""),r=t?f.extend(b,t):b;return this.getBrowser=function(){var e={name:void 0,version:void 0};return m.rgx.call(e,n,r.browser),e.major=f.major(e.version),e},this.getCPU=function(){var e={architecture:void 0};return m.rgx.call(e,n,r.cpu),e},this.getDevice=function(){var e={vendor:void 0,model:void 0,type:void 0};return m.rgx.call(e,n,r.device),e},this.getEngine=function(){var e={name:void 0,version:void 0};return m.rgx.call(e,n,r.engine),e},this.getOS=function(){var e={name:void 0,version:void 0};return m.rgx.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=e,this},this};y.VERSION="0.7.21",y.BROWSER={NAME:s,MAJOR:"major",VERSION:l},y.CPU={ARCHITECTURE:"architecture"},y.DEVICE={MODEL:i,VENDOR:c,TYPE:u,CONSOLE:"console",MOBILE:d,SMARTTV:h,TABLET:p,WEARABLE:"wearable",EMBEDDED:"embedded"},y.ENGINE={NAME:s,VERSION:l},y.OS={NAME:s,VERSION:l},void 0!==t?(void 0!==e&&e.exports&&(t=e.exports=y),t.UAParser=y):void 0===(r=function(){return y}.call(t,n,t,e))||(e.exports=r);var v=o&&(o.jQuery||o.Zepto);if(v&&!v.ua){var x=new y;v.ua=x.getResult(),v.ua.get=function(){return x.getUA()},v.ua.set=function(e){x.setUA(e);var t=x.getResult();for(var n in t)v.ua[n]=t[n]}}}("object"==typeof window?window:this)},function(e,t,n){e.exports=n(574)},function(e,t,n){var r=n(585),o=n(592),a=n(598);function i(t,n,s){return"undefined"!=typeof Reflect&&r?(e.exports=i=r,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=i=function(e,t,n){var r=a(e,t);if(r){var i=o(r,t);return i.get?i.get.call(n):i.value}},e.exports.default=e.exports,e.exports.__esModule=!0),i(t,n,s||t)}e.exports=i,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";(function(e,r){
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+let o;function a(){if(null==o){let t;if("undefined"!=typeof window)t=window;else if(void 0!==e)t=e;else if(void 0!==r)t=r;else{if("undefined"==typeof self)throw new Error("Could not find a global object");t=self}o=t}return o}function i(e,t){const n=function(){const e=a();return null==e._tfGlobals&&(e._tfGlobals=new Map),e._tfGlobals}();if(n.has(e))return n.get(e);{const r=t();return n.set(e,r),n.get(e)}}n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return i}))}).call(this,n(53),n(90))},function(e,t,n){"use strict";n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return l}));var r=n(151),o=n.n(r),a=n(30),i=n.n(a),s=(n(337),n(126),n(363),n(539),n(541),n(125),n(225),n(104),n(226),n(367),n(237));function u(e){return!("true"!==function(){var e={},t=["debug","info"],n=function(){var e=window.location.search.substr(1).split("&");if(""===e)return{};for(var t={},n=0;n<e.length;n++){var r=e[n].split("=",2);1===r.length?t[r[0]]="":t[r[0]]=decodeURIComponent(r[1].replace(/\+/g," "))}return t}();for(var r in n)-1!==o()(t).call(t,r)&&(e[r]=n[r]);return e}()[e])}function c(){var e,t=(new s.UAParser).getResult(),n="Unknown";if(t.device.vendor&&t.device.model)n=i()(e="[".concat(t.device.vendor,"] ")).call(e,t.device.model);else if(t.os.name&&t.browser.name){var r;n=i()(r="[".concat(t.os.name,"] ")).call(r,t.browser.name)}return n}function l(){return Math.random().toString(36).substr(2,9)}},function(e,t,n){var r=n(14),o=n(17),a=n(20),i=n(99),s=r.Object,u=o("".split);e.exports=a((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?u(e,""):s(e)}:s},function(e,t,n){var r=n(39),o=n(283),a=n(54),i=n(47),s=n(65),u=n(161);t.f=r&&!o?Object.defineProperties:function(e,t){i(e);for(var n,r=s(t),o=u(t),c=o.length,l=0;c>l;)a.f(e,n=o[l++],r[n]);return e}},function(e,t,n){var r=n(65),o=n(207),a=n(100),i=function(e){return function(t,n,i){var s,u=r(t),c=a(u),l=o(i,c);if(e&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){e.exports=function(){}},function(e,t,n){var r=n(14),o=n(50),a=n(79),i=n(47),s=n(156),u=n(146),c=r.TypeError;e.exports=function(e,t){var n=arguments.length<2?u(e):t;if(a(n))return i(o(n,e));throw c(s(e)+" is not iterable")}},function(e,t){e.exports=!1},function(e,t,n){var r=n(16),o=n(105),a=r.Object;e.exports=function(e){return a(o(e))}},function(e,t,n){var r=n(114);e.exports=r("navigator","userAgent")||""},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(214),o=n(306),a=r("keys");e.exports=function(e){return a[e]||(a[e]=o(e))}},function(e,t,n){var r=n(84),o=n(59),a=n(486),i=n(251),s=n(127),u=n(310),c=n(75),l=n(309),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=s(e),t=u(t),l)try{return d(e,t)}catch(e){}if(c(e,t))return i(!o(a.f,e,t),e[t])}},function(e,t,n){"use strict";var r=n(49);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(45),o=n(16).RegExp;t.UNSUPPORTED_Y=r((function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},function(e,t,n){var r,o=n(49),a=n(492),i=n(222),s=n(220),u=n(358),c=n(217),l=n(252),d=l("IE_PROTO"),p=function(){},h=function(e){return"<script>"+e+"<\/script>"},f=function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t},m=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t;m="undefined"!=typeof document?document.domain&&r?f(r):((t=c("iframe")).style.display="none",u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F):f(r);for(var n=i.length;n--;)delete m.prototype[i[n]];return m()};s[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(p.prototype=o(e),n=new p,p.prototype=null,n[d]=e):n=m(),void 0===t?n:a(n,t)}},function(e,t,n){var r=n(14),o=n(506),a=r.TypeError;e.exports=function(e){if(o(e))throw a("The method doesn't accept regular expressions");return e}},function(e,t,n){var r=n(24)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t){var n=Function.prototype,r=n.apply,o=n.bind,a=n.call;e.exports="object"==typeof Reflect&&Reflect.apply||(o?a.bind(r):function(){return a.apply(r,arguments)})},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return i}));var r=n(9);function o(e,t,n){const r=t.rank>1?t.shape[t.rank-1]:1,o=t.rank>1?t.rank-1:1,a="Must have updates.shape = indices.shape[:batchDim] + shape[sliceDim:], got updates.shape: "+n.shape+`, indices.shape: ${t.shape}, shape: ${e}`+`, sliceDim: ${r}, and batchDim: ${o}.`;if(n.rank<o)throw new Error(a+` update.rank < ${o}. `);if(e.length<r+(n.rank-o))throw new Error(a+" Output shape length < "+(r+(n.rank-o)));if(n.rank!==o+e.length-r)throw new Error(a+" update.rank != "+(o+e.length-r));for(let e=0;e<o;++e)if(n.shape[e]!==t.shape[e])throw new Error(a+` updates.shape[${e}] (${n.shape[e]}) != indices.shape[${e}] (${t.shape[e]}).`);for(let t=0;t<n.rank-o;++t)if(n.shape[t+o]!==e[t+r])throw new Error(a+` updates.shape[${t+o}] (${n.shape[t+o]}) != shape[${t+o}] (${e[t+o]})`)}function a(e,t,n){if(t.rank<1)throw new Error(`tf.scatterND() expects the indices to be rank 1 or higher, but the rank was ${t.rank}.`);if(e.rank<1)throw new Error(`tf.scatterND() expects the updates to be rank 1 or higher, but the rank was ${e.rank}.`);if("int32"!==t.dtype)throw new Error("The dtype of 'indices' should be int32, but got dtype: "+t.dtype);if(n.length<1)throw new Error("Output rank must be greater or equal to 1, but got shape: "+n);if(0===n.length){if(0===t.size)throw new Error("Indices specified for empty output. indices shape: "+t.shape);if(0===e.size)throw new Error("Updates specified for empty output. updates shape: "+e.shape)}o(n,t,e)}function i(e,t,n){const o=t.shape.length,a=o>1?t.shape[o-1]:1,i=n.length;let s=1;for(let e=a;e<i;++e)s*=n[e];const u=a<1?1:a;return{sliceRank:a,numUpdates:Object(r.O)(t.shape)/u,sliceSize:s,strides:[...Object(r.j)(n.slice(0,a)),1],outputSize:Object(r.O)(n)}}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(4);const u=Object(s.a)({unstack_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=0){const n=Object(a.a)(e,"x","unstack","string_or_numeric");i.b(t>=-n.shape.length&&t<n.shape.length,()=>`Axis = ${t} is not in [-${n.shape.length}, ${n.shape.length})`);const s={value:n},u={axis:t};return r.a.runKernel(o.cd,s,u)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(9),i=n(4);const s=Object(i.a)({fft_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){Object(a.b)("complex64"===e.dtype,()=>`The dtype for tf.spectral.fft() must be complex64 but got ${e.dtype}.`);const t={input:e};return r.a.runKernel(o.bb,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(9),o=n(121),a=n(97),i=n(268),s=n(4),u=n(235),c=n(12),l=n(63),d=n(178),p=n(188),h=n(267),f=n(265);const m=Object(s.a)({rfft_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){Object(r.b)("float32"===e.dtype,()=>"The dtype for rfft() must be real value but got "+e.dtype);let n=e.shape[e.shape.length-1];const s=e.size/n;let m;if(null!=t&&t<n){const r=e.shape.map(e=>0),o=e.shape.map(e=>e);o[e.shape.length-1]=t,m=Object(l.a)(e,r,o),n=t}else if(null!=t&&t>n){const r=e.shape.map(e=>e);r[e.shape.length-1]=t-n,m=Object(a.a)([e,Object(p.a)(r)],e.shape.length-1),n=t}else m=e;const g=Object(h.a)(m),b=Object(c.a)(Object(o.a)(m,g),[s,n]),y=Object(f.a)(b),v=Math.floor(n/2)+1,x=Object(u.a)(y),w=Object(i.a)(y),O=Object(d.a)(x,[v,n-v],x.shape.length-1),k=Object(d.a)(w,[v,n-v],w.shape.length-1),S=m.shape.slice();return S[m.shape.length-1]=v,Object(c.a)(Object(o.a)(O[0],k[0]),S)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({zerosLike_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","zerosLike")};return r.a.runKernel(o.ed,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({imag_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={input:Object(a.a)(e,"input","imag")};return r.a.runKernel(o.qb,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(5),o=n(6);
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function a(e,t,n){const a={shape:e,value:t,dtype:n};return r.a.runKernel(o.cb,{},a)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),o=n(6),a=n(22),i=n(3),s=n(35),u=n(4);const c=Object(u.a)({lessEqual_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){let n=Object(i.a)(e,"a","lessEqual","string_or_numeric"),u=Object(i.a)(t,"b","lessEqual","string_or_numeric");[n,u]=Object(a.b)(n,u),Object(s.assertAndGetBroadcastShape)(n.shape,u.shape);const c={a:n,b:u};return r.a.runKernel(o.yb,c)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(5),o=n(3),a=n(4);const i=Object(a.a)({square_:
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t=Object(o.a)(e,"x","square");return r.a.runKernel("Square",{x:t},{})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(37),u=n(4),c=n(12);const l=Object(u.a)({conv2d_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n,u,l="NHWC",d=[1,1],p){const h=Object(a.a)(e,"x","conv2d","float32"),f=Object(a.a)(t,"filter","conv2d","float32");let m=h,g=!1;3===h.rank&&(g=!0,m=Object(c.a)(h,[1,h.shape[0],h.shape[1],h.shape[2]])),i.b(4===m.rank,()=>`Error in conv2d: input must be rank 4, but got rank ${m.rank}.`),i.b(4===f.rank,()=>"Error in conv2d: filter must be rank 4, but got rank "+f.rank+"."),s.a("conv2d",u,p);const b="NHWC"===l?m.shape[3]:m.shape[1];i.b(b===f.shape[2],()=>`Error in conv2d: depth of input (${b}) must match input depth for filter ${f.shape[2]}.`),i.b(s.i(n,d),()=>`Error in conv2D: Either strides or dilations must be 1. Got strides ${n} and dilations '${d}'`);const y={x:m,filter:f},v={strides:n,pad:u,dataFormat:l,dilations:d,dimRoundingMode:p},x=r.a.runKernel(o.C,y,v);return g?Object(c.a)(x,[x.shape[1],x.shape[2],x.shape[3]]):x}})},function(e,t,n){e.exports=n(529)},function(e,t,n){e.exports=n(569)},function(e){e.exports=JSON.parse('{"a":"0.5.0"}')},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),o=n(6),a=n(3),i=n(129),s=n(4),u=n(12);const c=Object(s.a)({broadcastTo_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){let n=Object(a.a)(e,"broadcastTo","x");const s=n.shape;if(t.some(e=>!(e>0)||e%1!=0))throw new Error(`broadcastTo(): Invalid broadcast shape [${t}].`);if(t.length<n.rank)throw new Error(`broadcastTo(): shape.length=${t.length} < input.rank=${n.rank}.`);if(t.length>n.rank){const e=n.shape.slice();for(;e.length<t.length;)e.unshift(1);n=Object(u.a)(n,e)}const c=n.shape,l=Array.from(t);for(let e=t.length-1;e>=0;e--)if(c[e]===t[e])l[e]=1;else if(1!==n.shape[e])throw new Error(`broadcastTo(): [${s}] cannot be broadcast to [${t}].`);if(0===l.map((e,t)=>e>1?t:-1).filter(e=>e>=0).length)return Object(i.a)(n);const d={x:n},p={reps:l};return r.a.runKernel(o.Xc,d,p)}})},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(5);n(3),n(9),n(13);function o(){return 32===r.a.backend.floatPrecision()?.001:.1}function a(e,t,n){if(null==n&&(n=o()),!i(e,t,n))throw new Error(`Numbers differ: actual === ${e}, expected === ${t}`)}function i(e,t,n){return!isFinite(e)&&!isFinite(t)||!(isNaN(e)||isNaN(t)||Math.abs(e-t)>n)}},function(e,t,n){var r=n(404);n(66),e.exports=r},function(e,t,n){"use strict";var r=n(15),o=n(14),a=n(20),i=n(112),s=n(26),u=n(80),c=n(100),l=n(158),d=n(284),p=n(160),h=n(24),f=n(155),m=h("isConcatSpreadable"),g=o.TypeError,b=f>=51||!a((function(){var e=[];return e[m]=!1,e.concat()[0]!==e})),y=p("concat"),v=function(e){if(!s(e))return!1;var t=e[m];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,forced:!b||!y},{concat:function(e){var t,n,r,o,a,i=u(this),s=d(i,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(v(a=-1===t?i:arguments[t])){if(p+(o=c(a))>9007199254740991)throw g("Maximum allowed index exceeded");for(n=0;n<o;n++,p++)n in a&&l(s,p,a[n])}else{if(p>=9007199254740991)throw g("Maximum allowed index exceeded");l(s,p++,a)}return s.length=p,s}})},function(e,t,n){var r=n(198);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r=n(39),o=n(20),a=n(202);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(20),o=n(27),a=/#|\.prototype\./,i=function(e,t){var n=u[s(e)];return n==l||n!=c&&(o(t)?r(t):!!t)},s=i.normalize=function(e){return String(e).replace(a,".").toLowerCase()},u=i.data={},c=i.NATIVE="N",l=i.POLYFILL="P";e.exports=i},function(e,t,n){var r=n(39),o=n(20);e.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(e,t,n){var r=n(408);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},function(e,t,n){var r=n(17),o=n(33),a=n(65),i=n(244).indexOf,s=n(134),u=r([].push);e.exports=function(e,t){var n,r=a(e),c=0,l=[];for(n in r)!o(s,n)&&o(r,n)&&u(l,n);for(;t.length>c;)o(r,n=t[c++])&&(~i(l,n)||u(l,n));return l}},function(e,t,n){var r=n(56);e.exports=r("document","documentElement")},function(e,t,n){var r=n(99),o=n(65),a=n(163).f,i=n(288),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"==r(e)?function(e){try{return a(e)}catch(e){return i(s)}}(e):a(o(e))}},function(e,t,n){var r=n(14),o=n(207),a=n(100),i=n(158),s=r.Array,u=Math.max;e.exports=function(e,t,n){for(var r=a(e),c=o(t,r),l=o(void 0===n?r:n,r),d=s(u(l-c,0)),p=0;c<l;c++,p++)i(d,p,e[c]);return d.length=p,d}},function(e,t,n){var r=n(14),o=n(27),a=n(206),i=r.WeakMap;e.exports=o(i)&&/native code/.test(a(i))},function(e,t,n){n(28)("iterator")},function(e,t,n){"use strict";var r,o,a,i=n(20),s=n(27),u=n(94),c=n(136),l=n(101),d=n(24),p=n(70),h=d("iterator"),f=!1;[].keys&&("next"in(a=[].keys())?(o=c(c(a)))!==Object.prototype&&(r=o):f=!0),null==r||i((function(){var e={};return r[h].call(e)!==e}))?r={}:p&&(r=u(r)),s(r[h])||l(r,h,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:f}},function(e,t,n){var r=n(20);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t){e.exports=function(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(20),o=n(26),a=n(99),i=n(455),s=Object.isExtensible,u=r((function(){s(1)}));e.exports=u||i?function(e){return!!o(e)&&((!i||"ArrayBuffer"!=a(e))&&(!s||s(e)))}:s},function(e,t,n){var r=n(24),o=n(113),a=r("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||i[a]===e)}},function(e,t,n){var r=n(50),o=n(47),a=n(199);e.exports=function(e,t,n){var i,s;o(e);try{if(!(i=a(e,"return"))){if("throw"===t)throw n;return n}i=r(i,e)}catch(e){s=!0,i=e}if("throw"===t)throw n;if(s)throw i;return o(i),n}},function(e,t,n){"use strict";var r=n(17),o=n(144),a=n(145).getWeakData,i=n(47),s=n(26),u=n(137),c=n(103),l=n(83),d=n(33),p=n(74),h=p.set,f=p.getterFor,m=l.find,g=l.findIndex,b=r([].splice),y=0,v=function(e){return e.frozen||(e.frozen=new x)},x=function(){this.entries=[]},w=function(e,t){return m(e.entries,(function(e){return e[0]===t}))};x.prototype={get:function(e){var t=w(this,e);if(t)return t[1]},has:function(e){return!!w(this,e)},set:function(e,t){var n=w(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=g(this.entries,(function(t){return t[0]===e}));return~t&&b(this.entries,t,1),!!~t}},e.exports={getConstructor:function(e,t,n,r){var l=e((function(e,o){u(e,p),h(e,{type:t,id:y++,frozen:void 0}),null!=o&&c(o,e[r],{that:e,AS_ENTRIES:n})})),p=l.prototype,m=f(t),g=function(e,t,n){var r=m(e),o=a(i(t),!0);return!0===o?v(r).set(t,n):o[r.id]=n,e};return o(p,{delete:function(e){var t=m(this);if(!s(e))return!1;var n=a(e);return!0===n?v(t).delete(e):n&&d(n,t.id)&&delete n[t.id]},has:function(e){var t=m(this);if(!s(e))return!1;var n=a(e);return!0===n?v(t).has(e):n&&d(n,t.id)}}),o(p,n?{get:function(e){var t=m(this);if(s(e)){var n=a(e);return!0===n?v(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return g(this,e,t)}}:{add:function(e){return g(this,e,!0)}}),l}}},function(e,t,n){var r=n(14);e.exports=r.Promise},function(e,t,n){"use strict";var r=n(56),o=n(54),a=n(24),i=n(39),s=a("species");e.exports=function(e){var t=r(e),n=o.f;i&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(24)("iterator"),o=!1;try{var a=0,i={next:function(){return{done:!!a++}},return:function(){o=!0}};i[r]=function(){return this},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var a={};a[r]=function(){return{next:function(){return{done:n=!0}}}},e(a)}catch(e){}return n}},function(e,t,n){var r=n(47),o=n(302),a=n(24)("species");e.exports=function(e,t){var n,i=r(e).constructor;return void 0===i||null==(n=r(i)[a])?t:o(n)}},function(e,t,n){var r=n(14),o=n(159),a=n(156),i=r.TypeError;e.exports=function(e){if(o(e))return e;throw i(a(e)+" is not a constructor")}},function(e,t,n){var r,o,a,i,s=n(14),u=n(98),c=n(81),l=n(27),d=n(33),p=n(20),h=n(286),f=n(135),m=n(202),g=n(211),b=n(304),y=n(212),v=s.setImmediate,x=s.clearImmediate,w=s.process,O=s.Dispatch,k=s.Function,S=s.MessageChannel,T=s.String,C=0,E={};try{r=s.location}catch(e){}var I=function(e){if(d(E,e)){var t=E[e];delete E[e],t()}},j=function(e){return function(){I(e)}},N=function(e){I(e.data)},A=function(e){s.postMessage(T(e),r.protocol+"//"+r.host)};v&&x||(v=function(e){g(arguments.length,1);var t=l(e)?e:k(e),n=f(arguments,1);return E[++C]=function(){u(t,void 0,n)},o(C),C},x=function(e){delete E[e]},y?o=function(e){w.nextTick(j(e))}:O&&O.now?o=function(e){O.now(j(e))}:S&&!b?(i=(a=new S).port2,a.port1.onmessage=N,o=c(i.postMessage,i)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&r&&"file:"!==r.protocol&&!p(A)?(o=A,s.addEventListener("message",N,!1)):o="onreadystatechange"in m("script")?function(e){h.appendChild(m("script")).onreadystatechange=function(){h.removeChild(this),I(e)}}:function(e){setTimeout(j(e),0)}),e.exports={set:v,clear:x}},function(e,t,n){var r=n(133);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},function(e,t,n){var r=n(47),o=n(26),a=n(147);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=a.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){var r=n(25),o=0,a=Math.random(),i=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++o+a,36)}},function(e,t,n){var r=n(355),o=n(45);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(e,t,n){var r=n(307);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r=n(84),o=n(45),a=n(217);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(471),o=n(311);e.exports=function(e){var t=r(e,"string");return o(t)?t:t+""}},function(e,t,n){var r=n(16),o=n(114),a=n(43),i=n(183),s=n(308),u=r.Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=o("Symbol");return a(t)&&i(t.prototype,u(e))}},function(e,t,n){var r=n(16),o=n(25),a=n(45),i=n(148),s=r.Object,u=o("".split);e.exports=a((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?u(e,""):s(e)}:s},function(e,t,n){var r=n(25),o=n(75),a=n(127),i=n(489).indexOf,s=n(220),u=r([].push);e.exports=function(e,t){var n,r=a(e),c=0,l=[];for(n in r)!o(s,n)&&o(r,n)&&u(l,n);for(;t.length>c;)o(r,n=t[c++])&&(~i(l,n)||u(l,n));return l}},function(e,t,n){var r=n(45),o=n(43),a=/#|\.prototype\./,i=function(e,t){var n=u[s(e)];return n==l||n!=c&&(o(t)?r(t):!!t)},s=i.normalize=function(e){return String(e).replace(a,".").toLowerCase()},u=i.data={},c=i.NATIVE="N",l=i.POLYFILL="P";e.exports=i},function(e,t,n){"use strict";var r=n(54).f,o=n(94),a=n(144),i=n(81),s=n(137),u=n(103),c=n(210),l=n(299),d=n(39),p=n(145).fastKey,h=n(74),f=h.set,m=h.getterFor;e.exports={getConstructor:function(e,t,n,c){var l=e((function(e,r){s(e,h),f(e,{type:t,index:o(null),first:void 0,last:void 0,size:0}),d||(e.size=0),null!=r&&u(r,e[c],{that:e,AS_ENTRIES:n})})),h=l.prototype,g=m(t),b=function(e,t,n){var r,o,a=g(e),i=y(e,t);return i?i.value=n:(a.last=i={index:o=p(t,!0),key:t,value:n,previous:r=a.last,next:void 0,removed:!1},a.first||(a.first=i),r&&(r.next=i),d?a.size++:e.size++,"F"!==o&&(a.index[o]=i)),e},y=function(e,t){var n,r=g(e),o=p(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==t)return n};return a(h,{clear:function(){for(var e=g(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,d?e.size=0:this.size=0},delete:function(e){var t=g(this),n=y(this,e);if(n){var r=n.next,o=n.previous;delete t.index[n.index],n.removed=!0,o&&(o.next=r),r&&(r.previous=o),t.first==n&&(t.first=r),t.last==n&&(t.last=o),d?t.size--:this.size--}return!!n},forEach:function(e){for(var t,n=g(this),r=i(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!y(this,e)}}),a(h,n?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return b(this,0===e?0:e,t)}}:{add:function(e){return b(this,e=0===e?0:e,e)}}),d&&r(h,"size",{get:function(){return g(this).size}}),l},setStrong:function(e,t,n){var r=t+" Iterator",o=m(t),a=m(r);c(e,t,(function(e,t){f(this,{type:r,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),l(t)}}},function(e,t,n){"use strict";var r=n(14),o=n(17),a=n(79),i=n(26),s=n(33),u=n(135),c=n(132),l=r.Function,d=o([].concat),p=o([].join),h={},f=function(e,t,n){if(!s(h,t)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";h[t]=l("C,a","return new C("+p(r,",")+")")}return h[t](e,n)};e.exports=c?l.bind:function(e){var t=a(this),n=t.prototype,r=u(arguments,1),o=function(){var n=d(r,u(arguments));return this instanceof o?f(t,n.length,n):t.apply(e,n)};return i(n)&&(o.prototype=n),o}},function(e,t){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var t=e,o=e.indexOf("["),a=e.indexOf("]");-1!=o&&-1!=a&&(e=e.substring(0,o)+e.substring(o,a).replace(/:/g,";")+e.substring(a,e.length));for(var i=n.exec(e||""),s={},u=14;u--;)s[r[u]]=i[u]||"";return-1!=o&&-1!=a&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s}},function(e,t,n){(function(t){var r=n(551),o=Object.prototype.toString,a="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),i="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);e.exports=function e(n){if(!n||"object"!=typeof n)return!1;if(r(n)){for(var o=0,s=n.length;o<s;o++)if(e(n[o]))return!0;return!1}if("function"==typeof t&&t.isBuffer&&t.isBuffer(n)||"function"==typeof ArrayBuffer&&n instanceof ArrayBuffer||a&&n instanceof Blob||i&&n instanceof File)return!0;if(n.toJSON&&"function"==typeof n.toJSON&&1===arguments.length)return e(n.toJSON(),!0);for(var u in n)if(Object.prototype.hasOwnProperty.call(n,u)&&e(n[u]))return!0;return!1}}).call(this,n(319).Buffer)},function(e,t,n){"use strict";(function(e){
+/*!
+ * The buffer module from node.js, for the browser.
+ *
+ * @author   Feross Aboukhadijeh <http://feross.org>
+ * @license  MIT
+ */
+var r=n(548),o=n(549),a=n(550);function i(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(i()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=p(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|f(t,n),o=(e=s(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|h(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):p(e,t);if("Buffer"===t.type&&a(t.data))return p(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(l(t),e=s(e,t<0?0:0|h(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function p(e,t){var n=t.length<0?0:0|h(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function h(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function f(e,t){if(u.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 r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return B(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return E(this,t,n);case"latin1":case"binary":return I(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,o);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,o){var a,i=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,s/=2,u/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){var l=-1;for(a=n;a<s;a++)if(c(e,a)===c(t,-1===l?0:a-l)){if(-1===l&&(l=a),a-l+1===u)return l*i}else-1!==l&&(a-=a-l),l=-1}else for(n+u>s&&(n=s-u),a=n;a>=0;a--){for(var d=!0,p=0;p<u;p++)if(c(e,a+p)!==c(t,p)){d=!1;break}if(d)return a}return-1}function v(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var i=0;i<r;++i){var s=parseInt(t.substr(2*i,2),16);if(isNaN(s))return i;e[n+i]=s}return i}function x(e,t,n,r){return U(B(t,e.length-n),e,n,r)}function w(e,t,n,r){return U(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function O(e,t,n,r){return w(e,t,n,r)}function k(e,t,n,r){return U(z(t),e,n,r)}function S(e,t,n,r){return U(function(e,t){for(var n,r,o,a=[],i=0;i<e.length&&!((t-=2)<0);++i)n=e.charCodeAt(i),r=n>>8,o=n%256,a.push(o),a.push(r);return a}(t,e.length-n),e,n,r)}function T(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var a,i,s,u,c=e[o],l=null,d=c>239?4:c>223?3:c>191?2:1;if(o+d<=n)switch(d){case 1:c<128&&(l=c);break;case 2:128==(192&(a=e[o+1]))&&(u=(31&c)<<6|63&a)>127&&(l=u);break;case 3:a=e[o+1],i=e[o+2],128==(192&a)&&128==(192&i)&&(u=(15&c)<<12|(63&a)<<6|63&i)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:a=e[o+1],i=e[o+2],s=e[o+3],128==(192&a)&&128==(192&i)&&128==(192&s)&&(u=(15&c)<<18|(63&a)<<12|(63&i)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,d=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=i(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return c(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return d(null,e)},u.allocUnsafeSlow=function(e){return d(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,a=Math.min(n,r);o<a;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var i=e[n];if(!u.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,o),o+=i.length}return r},u.byteLength=f,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?C(this,0,e):m.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,o){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(o>>>=0)-(r>>>=0),i=(n>>>=0)-(t>>>=0),s=Math.min(a,i),c=this.slice(r,o),l=e.slice(t,n),d=0;d<s;++d)if(c[d]!==l[d]){a=c[d],i=l[d];break}return a<i?-1:i<a?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return O(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function E(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function I(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function j(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",a=t;a<n;++a)o+=L(e[a]);return o}function N(e,t,n){for(var r=e.slice(t,n),o="",a=0;a<r.length;a+=2)o+=String.fromCharCode(r[a]+256*r[a+1]);return o}function A(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,r,o,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function _(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,a=Math.min(e.length-n,2);o<a;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function $(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,a=Math.min(e.length-n,4);o<a;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function F(e,t,n,r,o,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(e,t,n,r,a){return a||F(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function M(e,t,n,r,a){return a||F(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var o=t-e;n=new u(o,void 0);for(var a=0;a<o;++a)n[a]=this[a+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],o=1,a=0;++a<t&&(o*=256);)r+=this[e+a]*o;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUInt8=function(e,t){return t||A(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||A(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||A(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],o=1,a=0;++a<t&&(o*=256);)r+=this[e+a]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=t,o=1,a=this[e+--r];r>0&&(o*=256);)a+=this[e+--r]*o;return a>=(o*=128)&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||A(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||A(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||A(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||A(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||A(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||A(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,a=0;for(this[t]=255&e;++a<n&&(o*=256);)this[t+a]=e/o&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):_(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):_(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):$(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):$(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);R(this,e,t,n,o-1,-o)}var a=0,i=1,s=0;for(this[t]=255&e;++a<n&&(i*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/i>>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);R(this,e,t,n,o-1,-o)}var a=n-1,i=1,s=0;for(this[t+a]=255&e;--a>=0&&(i*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/i>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):_(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):_(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):$(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):$(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return M(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return M(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,a=r-n;if(this===e&&n<t&&t<r)for(o=a-1;o>=0;--o)e[o+t]=this[o+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var i=u.isBuffer(e)?e:B(new u(e,r).toString()),s=i.length;for(a=0;a<n-t;++a)this[a+t]=i[a%s]}return this};var P=/[^+\/0-9A-Za-z-_]/g;function L(e){return e<16?"0"+e.toString(16):e.toString(16)}function B(e,t){var n;t=t||1/0;for(var r=e.length,o=null,a=[],i=0;i<r;++i){if((n=e.charCodeAt(i))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&a.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(P,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(53))},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){(function(t){e.exports=function(e){return t.Buffer&&t.Buffer.isBuffer(e)||t.ArrayBuffer&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))}}).call(this,n(53))},function(e,t,n){var r=n(553),o=n(327),a=n(117),i=n(228),s=n(328),u=n(329),c=n(172)("socket.io-client:manager"),l=n(326),d=n(568),p=Object.prototype.hasOwnProperty;function h(e,t){if(!(this instanceof h))return new h(e,t);e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new d({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=t.parser||i;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.open()}e.exports=h,h.prototype.emitAll=function(){for(var e in this.emit.apply(this,arguments),this.nsps)p.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},h.prototype.updateSocketIds=function(){for(var e in this.nsps)p.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},h.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id},a(h.prototype),h.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},h.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},h.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},h.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},h.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},h.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},h.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},h.prototype.open=h.prototype.connect=function(e,t){if(c("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;c("opening %s",this.uri),this.engine=r(this.uri,this.opts);var n=this.engine,o=this;this.readyState="opening",this.skipReconnect=!1;var a=s(n,"open",(function(){o.onopen(),e&&e()})),i=s(n,"error",(function(t){if(c("connect_error"),o.cleanup(),o.readyState="closed",o.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else o.maybeReconnectOnOpen()}));if(!1!==this._timeout){var u=this._timeout;c("connect attempt will timeout after %d",u);var l=setTimeout((function(){c("connect attempt timed out after %d",u),a.destroy(),n.close(),n.emit("error","timeout"),o.emitAll("connect_timeout",u)}),u);this.subs.push({destroy:function(){clearTimeout(l)}})}return this.subs.push(a),this.subs.push(i),this},h.prototype.onopen=function(){c("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(s(e,"data",u(this,"ondata"))),this.subs.push(s(e,"ping",u(this,"onping"))),this.subs.push(s(e,"pong",u(this,"onpong"))),this.subs.push(s(e,"error",u(this,"onerror"))),this.subs.push(s(e,"close",u(this,"onclose"))),this.subs.push(s(this.decoder,"decoded",u(this,"ondecoded")))},h.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},h.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},h.prototype.ondata=function(e){this.decoder.add(e)},h.prototype.ondecoded=function(e){this.emit("packet",e)},h.prototype.onerror=function(e){c("error",e),this.emitAll("error",e)},h.prototype.socket=function(e,t){var n=this.nsps[e];if(!n){n=new o(this,e,t),this.nsps[e]=n;var r=this;n.on("connecting",a),n.on("connect",(function(){n.id=r.generateId(e)})),this.autoConnect&&a()}function a(){~l(r.connecting,n)||r.connecting.push(n)}return n},h.prototype.destroy=function(e){var t=l(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},h.prototype.packet=function(e){c("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,(function(n){for(var r=0;r<n.length;r++)t.engine.write(n[r],e.options);t.encoding=!1,t.processPacketQueue()})))},h.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},h.prototype.cleanup=function(){c("cleanup");for(var e=this.subs.length,t=0;t<e;t++){this.subs.shift().destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},h.prototype.close=h.prototype.disconnect=function(){c("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},h.prototype.onclose=function(e){c("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},h.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)c("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();c("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout((function(){e.skipReconnect||(c("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open((function(t){t?(c("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(c("reconnect success"),e.onreconnect())})))}),t);this.subs.push({destroy:function(){clearTimeout(n)}})}},h.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,n){(function(e){var r=n(229),o=n(556),a=n(564),i=n(565);t.polling=function(t){var n=!1,i=!1,s=!1!==t.jsonp;if(e.location){var u="https:"===location.protocol,c=location.port;c||(c=u?443:80),n=t.hostname!==location.hostname||c!==t.port,i=t.secure!==u}if(t.xdomain=n,t.xscheme=i,"open"in new r(t)&&!t.forceJSONP)return new o(t);if(!s)throw new Error("JSONP disabled");return new a(t)},t.websocket=i}).call(this,n(53))},function(e,t,n){var r=n(230),o=n(173),a=n(118),i=n(174),s=n(325),u=n(175)("engine.io-client:polling");e.exports=l;var c=null!=new(n(229))({xdomain:!1}).responseType;function l(e){var t=e&&e.forceBase64;c&&!t||(this.supportsBinary=!1),r.call(this,e)}i(l,r),l.prototype.name="polling",l.prototype.doOpen=function(){this.poll()},l.prototype.pause=function(e){var t=this;function n(){u("paused"),t.readyState="paused",e()}if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(u("we are currently polling - waiting to pause"),r++,this.once("pollComplete",(function(){u("pre-pause polling complete"),--r||n()}))),this.writable||(u("we are currently writing - waiting to pause"),r++,this.once("drain",(function(){u("pre-pause writing complete"),--r||n()})))}else n()},l.prototype.poll=function(){u("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},l.prototype.onData=function(e){var t=this;u("polling got data %s",e);a.decodePayload(e,this.socket.binaryType,(function(e,n,r){if("opening"===t.readyState&&t.onOpen(),"close"===e.type)return t.onClose(),!1;t.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():u('ignoring poll - transport state "%s"',this.readyState))},l.prototype.doClose=function(){var e=this;function t(){u("writing close packet"),e.write([{type:"close"}])}"open"===this.readyState?(u("transport open - closing"),t()):(u("transport not open - deferring close"),this.once("open",t))},l.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")};a.encodePayload(e,this.supportsBinary,(function(e){t.doWrite(e,n)}))},l.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=s()),this.supportsBinary||e.sid||(e.b64=1),e=o.encode(e),this.port&&("https"===t&&443!==Number(this.port)||"http"===t&&80!==Number(this.port))&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e}},function(e,t,n){"use strict";var r,o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),a={},i=0,s=0;function u(e){var t="";do{t=o[e%64]+t,e=Math.floor(e/64)}while(e>0);return t}function c(){var e=u(+new Date);return e!==r?(i=0,r=e):e+"."+u(i++)}for(;s<64;s++)a[o[s]]=s;c.encode=u,c.decode=function(e){var t=0;for(s=0;s<e.length;s++)t=64*t+a[e.charAt(s)];return t},e.exports=c},function(e,t){var n=[].indexOf;e.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},function(e,t,n){var r=n(228),o=n(117),a=n(567),i=n(328),s=n(329),u=n(172)("socket.io-client:socket"),c=n(173);e.exports=p;var l={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},d=o.prototype.emit;function p(e,t,n){this.io=e,this.nsp=t,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}o(p.prototype),p.prototype.subEvents=function(){if(!this.subs){var e=this.io;this.subs=[i(e,"open",s(this,"onopen")),i(e,"packet",s(this,"onpacket")),i(e,"close",s(this,"onclose"))]}},p.prototype.open=p.prototype.connect=function(){return this.connected||(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting")),this},p.prototype.send=function(){var e=a(arguments);return e.unshift("message"),this.emit.apply(this,e),this},p.prototype.emit=function(e){if(l.hasOwnProperty(e))return d.apply(this,arguments),this;var t=a(arguments),n={type:r.EVENT,data:t,options:{}};return n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof t[t.length-1]&&(u("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),delete this.flags,this},p.prototype.packet=function(e){e.nsp=this.nsp,this.io.packet(e)},p.prototype.onopen=function(){if(u("transport is open - connecting"),"/"!==this.nsp)if(this.query){var e="object"==typeof this.query?c.encode(this.query):this.query;u("sending connect packet with query %s",e),this.packet({type:r.CONNECT,query:e})}else this.packet({type:r.CONNECT})},p.prototype.onclose=function(e){u("close (%s)",e),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",e)},p.prototype.onpacket=function(e){if(e.nsp===this.nsp)switch(e.type){case r.CONNECT:this.onconnect();break;case r.EVENT:case r.BINARY_EVENT:this.onevent(e);break;case r.ACK:case r.BINARY_ACK:this.onack(e);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error",e.data)}},p.prototype.onevent=function(e){var t=e.data||[];u("emitting event %j",t),null!=e.id&&(u("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?d.apply(this,t):this.receiveBuffer.push(t)},p.prototype.ack=function(e){var t=this,n=!1;return function(){if(!n){n=!0;var o=a(arguments);u("sending ack %j",o),t.packet({type:r.ACK,id:e,data:o})}}},p.prototype.onack=function(e){var t=this.acks[e.id];"function"==typeof t?(u("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):u("bad ack %s",e.id)},p.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},p.prototype.emitBuffered=function(){var e;for(e=0;e<this.receiveBuffer.length;e++)d.apply(this,this.receiveBuffer[e]);for(this.receiveBuffer=[],e=0;e<this.sendBuffer.length;e++)this.packet(this.sendBuffer[e]);this.sendBuffer=[]},p.prototype.ondisconnect=function(){u("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},p.prototype.destroy=function(){if(this.subs){for(var e=0;e<this.subs.length;e++)this.subs[e].destroy();this.subs=null}this.io.destroy(this)},p.prototype.close=p.prototype.disconnect=function(){return this.connected&&(u("performing disconnect (%s)",this.nsp),this.packet({type:r.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},p.prototype.compress=function(e){return this.flags=this.flags||{},this.flags.compress=e,this}},function(e,t){e.exports=function(e,t,n){return e.on(t,n),{destroy:function(){e.removeListener(t,n)}}}},function(e,t){var n=[].slice;e.exports=function(e,t){if("string"==typeof t&&(t=e[t]),"function"!=typeof t)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return t.apply(e,r.concat(n.call(arguments)))}}},function(e,t,n){var r=n(15),o=n(14),a=n(98),i=n(27),s=n(133),u=n(135),c=n(211),l=/MSIE .\./.test(s),d=o.Function,p=function(e){return function(t,n){var r=c(arguments.length,1)>2,o=i(t)?t:d(t),s=r?u(arguments,2):void 0;return e(r?function(){a(o,this,s)}:o,n)}};r({global:!0,bind:!0,forced:l},{setTimeout:p(o.setTimeout),setInterval:p(o.setInterval)})},function(e,t,n){e.exports=n(599)},function(e,t){e.exports={}},function(e,t,n){"use strict";(function(e){n(5);var t=n(369),r=n(19);
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const o=Object(r.b)();o.registerFlag("DEBUG",()=>!1,e=>{e&&console.warn("Debugging mode is ON. The output of every math call will be downloaded to CPU and checked for NaNs. This significantly impacts performance.")}),o.registerFlag("IS_BROWSER",()=>t.isBrowser()),o.registerFlag("IS_NODE",()=>void 0!==e&&void 0!==e.versions&&void 0!==e.versions.node),o.registerFlag("IS_CHROME",()=>"undefined"!=typeof navigator&&null!=navigator&&null!=navigator.userAgent&&/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)),o.registerFlag("PROD",()=>!1),o.registerFlag("TENSORLIKE_CHECK_SHAPE_CONSISTENCY",()=>o.getBool("DEBUG")),o.registerFlag("DEPRECATION_WARNINGS_ENABLED",()=>!0),o.registerFlag("IS_TEST",()=>!1),o.registerFlag("CHECK_COMPUTATION_FOR_ERRORS",()=>!0),o.registerFlag("WRAP_TO_IMAGEBITMAP",()=>!1)}).call(this,n(90))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));class r{constructor(e,t){this.backend=e,this.dataMover=t,this.data=new WeakMap,this.dataIdsCount=0}get(e){return this.data.has(e)||this.dataMover.moveData(this.backend,e),this.data.get(e)}set(e,t){this.dataIdsCount++,this.data.set(e,t)}has(e){return this.data.has(e)}delete(e){return this.dataIdsCount--,this.data.delete(e)}numDataIds(){return this.dataIdsCount}}class o{refCount(e){return a("refCount")}incRef(e){return a("incRef")}timerAvailable(){return!0}time(e){return a("time")}read(e){return a("read")}readSync(e){return a("readSync")}readToGPU(e,t){return a("readToGPU")}numDataIds(){return a("numDataIds")}disposeData(e,t){return a("disposeData")}write(e,t,n){return a("write")}move(e,t,n,r,o){return a("move")}memory(){return a("memory")}floatPrecision(){return a("floatPrecision")}epsilon(){return 32===this.floatPrecision()?1e-7:1e-4}dispose(){return a("dispose")}}function a(e){throw new Error(`'${e}' not yet implemented or not found in the registry. This kernel may not be supported by the tfjs backend you have chosen`)}},function(e,t,n){e.exports=n(448)},function(e,t,n){e.exports=n(502)},function(e,t,n){e.exports=n(533)},function(e,t,n){var r=n(544),o=n(228),a=n(322),i=n(172)("socket.io-client");e.exports=t=u;var s=t.managers={};function u(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,o=r(e),u=o.source,c=o.id,l=o.path,d=s[c]&&l in s[c].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||d?(i("ignoring socket cache for %s",u),n=a(u,t)):(s[c]||(i("new io instance for %s",u),s[c]=a(u,t)),n=s[c]),o.query&&!t.query&&(t.query=o.query),n.socket(o.path,t)}t.protocol=o.protocol,t.connect=u,t.Manager=n(322),t.Socket=n(327)},function(e,t,n){e.exports=n(617)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({reverse_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){const n={x:Object(a.a)(e,"x","reverse")},i={dims:t};return r.a.runKernel(o.qc,n,i)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({min_:
+/**
+ * @license
+ * Copyright 2020 Google Inc. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=null,n=!1){const i={x:Object(a.a)(e,"x","min")},s={axis:t,keepDims:n};return r.a.runKernel(o.Nb,i,s)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({sqrt_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","sqrt","float32")};return r.a.runKernel(o.Lc,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(4);const u=Object(s.a)({transpose_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){const n=Object(a.a)(e,"x","transpose");if(null==t&&(t=n.shape.map((e,t)=>t).reverse()),i.b(n.rank===t.length,()=>`Error in transpose: rank of input ${n.rank} must match length of perm ${t}.`),t.forEach(e=>{i.b(e>=0&&e<n.rank,()=>"All entries in 'perm' must be between 0 and "+(n.rank-1)+" but got "+t)}),n.rank<=1)return n.clone();const s={x:n},u={perm:t};return r.a.runKernel(o.ad,s,u)}})},,function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r={float32:4,float16:2,int32:4,uint16:2,uint8:1,bool:1,complex64:8}},function(e,t,n){"use strict";var r=n(291).IteratorPrototype,o=n(94),a=n(91),i=n(102),s=n(113),u=function(){return this};e.exports=function(e,t,n,c){var l=t+" Iterator";return e.prototype=o(r,{next:a(+!c,n)}),i(e,l,!1,!0),s[l]=u,e}},function(e,t,n){var r=n(17),o=n(204),a=n(93),i=n(123),s=r("".charAt),u=r("".charCodeAt),c=r("".slice),l=function(e){return function(t,n){var r,l,d=a(i(t)),p=o(n),h=d.length;return p<0||p>=h?e?"":void 0:(r=u(d,p))<55296||r>56319||p+1===h||(l=u(d,p+1))<56320||l>57343?e?s(d,p):r:e?c(d,p,p+2):l-56320+(r-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},function(e,t,n){e.exports=n(442)},function(e,t,n){var r=n(444);e.exports=r},function(e,t,n){var r=n(20);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){var r=n(456);n(66),e.exports=r},function(e,t,n){"use strict";var r=n(15),o=n(14),a=n(34),i=n(136),s=n(164),u=n(457),c=n(94),l=n(73),d=n(91),p=n(459),h=n(460),f=n(103),m=n(461),g=n(24),b=n(462),y=g("toStringTag"),v=o.Error,x=[].push,w=function(e,t){var n,r=arguments.length>2?arguments[2]:void 0,o=a(O,this);s?n=s(new v,o?i(this):O):(n=o?this:c(O),l(n,y,"Error")),void 0!==t&&l(n,"message",m(t)),b&&l(n,"stack",p(n.stack,1)),h(n,r);var u=[];return f(e,x,{that:u}),l(n,"errors",u),n};s?s(w,v):u(w,v,{name:!0});var O=w.prototype=c(v.prototype,{constructor:d(1,w),message:d(1,""),name:d(1,"AggregateError")});r({global:!0},{AggregateError:w})},function(e,t,n){"use strict";var r=n(15),o=n(50),a=n(79),i=n(147),s=n(182),u=n(103);r({target:"Promise",stat:!0},{allSettled:function(e){var t=this,n=i.f(t),r=n.resolve,c=n.reject,l=s((function(){var n=a(t.resolve),i=[],s=0,c=1;u(e,(function(e){var a=s++,u=!1;c++,o(n,t,e).then((function(e){u||(u=!0,i[a]={status:"fulfilled",value:e},--c||r(i))}),(function(e){u||(u=!0,i[a]={status:"rejected",reason:e},--c||r(i))}))})),--c||r(i)}));return l.error&&c(l.value),n.promise}})},function(e,t,n){"use strict";var r=n(15),o=n(79),a=n(56),i=n(50),s=n(147),u=n(182),c=n(103);r({target:"Promise",stat:!0},{any:function(e){var t=this,n=a("AggregateError"),r=s.f(t),l=r.resolve,d=r.reject,p=u((function(){var r=o(t.resolve),a=[],s=0,u=1,p=!1;c(e,(function(e){var o=s++,c=!1;u++,i(r,t,e).then((function(e){c||p||(p=!0,l(e))}),(function(e){c||p||(c=!0,a[o]=e,--u||d(new n(a,"No one promise resolved")))}))})),--u||d(new n(a,"No one promise resolved"))}));return p.error&&d(p.value),r.promise}})},function(e,t,n){var r,o,a=n(16),i=n(250),s=a.process,u=a.Deno,c=s&&s.versions||u&&u.version,l=c&&c.v8;l&&(o=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&i&&(!(r=i.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=i.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},function(e,t,n){var r=n(313),o=n(222).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){var r=n(168);e.exports=function(e){return r(e.length)}},function(e,t,n){var r=n(114);e.exports=r("document","documentElement")},function(e,t,n){var r=n(45),o=n(16).RegExp;e.exports=r((function(){var e=o(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},function(e,t,n){var r=n(45),o=n(16).RegExp;e.exports=r((function(){var e=o("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},function(e,t,n){var r=n(25),o=n(167),a=n(85),i=n(105),s=r("".charAt),u=r("".charCodeAt),c=r("".slice),l=function(e){return function(t,n){var r,l,d=a(i(t)),p=o(n),h=d.length;return p<0||p>=h?e?"":void 0:(r=u(d,p))<55296||r>56319||p+1===h||(l=u(d,p+1))<56320||l>57343?e?s(d,p):r:e?c(d,p,p+2):l-56320+(r-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},function(e,t,n){"use strict";var r=n(14),o=n(81),a=n(50),i=n(80),s=n(498),u=n(295),c=n(159),l=n(100),d=n(158),p=n(247),h=n(146),f=r.Array;e.exports=function(e){var t=i(e),n=c(this),r=arguments.length,m=r>1?arguments[1]:void 0,g=void 0!==m;g&&(m=o(m,r>2?arguments[2]:void 0));var b,y,v,x,w,O,k=h(t),S=0;if(!k||this==f&&u(k))for(b=l(t),y=n?new this(b):f(b);b>S;S++)O=g?m(t[S],S):t[S],d(y,S,O);else for(w=(x=p(t,k)).next,y=n?new this:[];!(v=a(w,x)).done;S++)O=g?s(x,m,[v.value,S],!0):v.value,d(y,S,O);return y.length=S,y}},function(e,t,n){"use strict";var r=n(259),o=n(59),a=n(25),i=n(170),s=n(364),u=n(49),c=n(105),l=n(365),d=n(223),p=n(168),h=n(85),f=n(116),m=n(366),g=n(171),b=n(169),y=n(255),v=n(45),x=y.UNSUPPORTED_Y,w=Math.min,O=[].push,k=a(/./.exec),S=a(O),T=a("".slice);i("split",(function(e,t,n){var a;return a="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var a=h(c(this)),i=void 0===n?4294967295:n>>>0;if(0===i)return[];if(void 0===e)return[a];if(!s(e))return o(t,a,e,i);for(var u,l,d,p=[],f=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),g=0,y=new RegExp(e.source,f+"g");(u=o(b,y,a))&&!((l=y.lastIndex)>g&&(S(p,T(a,g,u.index)),u.length>1&&u.index<a.length&&r(O,p,m(u,1)),d=u[0].length,g=l,p.length>=i));)y.lastIndex===u.index&&y.lastIndex++;return g===a.length?!d&&k(y,"")||S(p,""):S(p,T(a,g)),p.length>i?m(p,0,i):p}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:o(t,this,e,n)}:t,[function(t,n){var r=c(this),i=null==t?void 0:f(t,e);return i?o(i,t,r,n):o(a,h(r),t,n)},function(e,r){var o=u(this),i=h(e),s=n(a,o,i,r,a!==t);if(s.done)return s.value;var c=l(o,RegExp),f=o.unicode,m=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(x?"g":"y"),b=new c(x?"^(?:"+o.source+")":o,m),y=void 0===r?4294967295:r>>>0;if(0===y)return[];if(0===i.length)return null===g(b,i)?[i]:[];for(var v=0,O=0,k=[];O<i.length;){b.lastIndex=x?0:O;var C,E=g(b,x?T(i,O):i);if(null===E||(C=w(p(b.lastIndex+(x?O:0)),i.length))===v)O=d(i,O,f);else{if(S(k,T(i,v,O)),k.length===y)return k;for(var I=1;I<=E.length-1;I++)if(S(k,E[I]),k.length===y)return k;O=v=C}}return S(k,T(i,v)),k}]}),!!v((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),x)},function(e,t,n){var r=n(96),o=n(148),a=n(57)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==o(e))}},function(e,t,n){var r=n(49),o=n(537),a=n(57)("species");e.exports=function(e,t){var n,i=r(e).constructor;return void 0===i||null==(n=r(i)[a])?t:o(n)}},function(e,t,n){var r=n(25);e.exports=r([].slice)},function(e,t,n){"use strict";var r=n(221),o=n(25),a=n(312),i=n(127),s=n(543),u=o([].join),c=a!=Object,l=s("join",",");r({target:"Array",proto:!0,forced:c||!l},{join:function(e){return u(i(this),void 0===e?",":e)}})},,function(e,t,n){"use strict";let r;function o(e){r=e}function a(e){if(void 0!==r)return r;if(e||"undefined"!=typeof navigator&&null!=navigator){if(e||(e=navigator),"ReactNative"===e.product)return!0;const t=e.userAgent||e.vendor||("undefined"!=typeof window?window.opera:"");if(!t){const t=e;return t.userAgentData&&t.userAgentData.mobile}return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))}return!1}function i(){return"undefined"!=typeof window&&null!=window.document||"undefined"!=typeof WorkerGlobalScope}n.r(t),n.d(t,"mockIsMobile",(function(){return o})),n.d(t,"isMobile",(function(){return a})),n.d(t,"isBrowser",(function(){return i}))},function(e,t,n){"use strict";
+/**
+ * @license
+ * Copyright 2020 Google Inc. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function r(e,t=!1){console.log(e.toString(t))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(22),i=n(3),s=n(4);const u=Object(s.a)({floorDiv_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){let n=Object(i.a)(e,"a","floorDiv"),s=Object(i.a)(t,"b","floorDiv");[n,s]=Object(a.b)(n,s);const u={a:n,b:s};return r.a.runKernel(o.fb,u)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({sigmoid_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","sigmoid","float32")};return r.a.runKernel(o.xc,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(3),o=n(9),a=n(4),i=n(12);const s=Object(a.a)({squeeze_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){const n=Object(r.a)(e,"x","squeeze");return Object(i.a)(n,Object(o.Q)(n.shape,t).newShape)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(121),o=n(97),a=n(268),i=n(23),s=n(4),u=n(235),c=n(12),l=n(340),d=n(44),p=n(63),h=n(234);const f=Object(s.a)({irfft_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t=e.shape[e.shape.length-1],n=e.size/t;let s;if(t<=2){const r=Object(c.a)(e,[n,t]);s=Object(h.a)(r)}else{const f=[n,2*(t-1)],m=Object(c.a)(Object(u.a)(e),[n,t]),g=Object(c.a)(Object(a.a)(e),[n,t]),b=Object(l.a)(Object(p.a)(m,[0,1],[n,t-2]),1),y=Object(i.a)(Object(l.a)(Object(p.a)(g,[0,1],[n,t-2]),1),Object(d.a)(-1)),v=Object(o.a)([m,b],1),x=Object(o.a)([g,y],1),w=Object(c.a)(Object(r.a)(v,x),[f[0],f[1]]);s=Object(h.a)(w)}if(s=Object(u.a)(s),3===e.rank&&0!==e.shape[0]){const t=s,n=e.shape[0];s=Object(c.a)(s,[n,s.shape[0]/n,s.shape[1]]),t.dispose()}return s}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(4);const u=Object(s.a)({bincount_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n){const s=Object(a.a)(e,"x","bincount"),u=Object(a.a)(t,"weights","bincount");i.b("int32"===s.dtype,()=>"Error in bincount: input dtype must be int32, but got "+s.dtype),i.b(n>=0,()=>`size must be non-negative, but got ${n}.`),i.b(u.size===s.size||0===u.size,()=>`Error in bincount: weights must have the same size as input or0-length, but got input shape: ${s.shape}, weights shape: `+u.shape+".");const c={x:s,weights:u},l={size:n};return r.a.runKernel(o.u,c,l)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({round_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","round")};return r.a.runKernel(o.sc,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(35),s=n(4);const u=Object(s.a)({logicalAnd_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){const n=Object(a.a)(e,"a","logicalAnd","bool"),s=Object(a.a)(t,"b","logicalAnd","bool");Object(i.assertAndGetBroadcastShape)(n.shape,s.shape);const u={a:n,b:s};return r.a.runKernel(o.Cb,u)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),o=n(6),a=n(22),i=n(3),s=n(35),u=n(4);const c=Object(u.a)({greaterEqual_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){let n=Object(i.a)(e,"a","greaterEqual","string_or_numeric"),u=Object(i.a)(t,"b","greaterEqual","string_or_numeric");[n,u]=Object(a.b)(n,u),Object(s.assertAndGetBroadcastShape)(n.shape,u.shape);const c={a:n,b:u};return r.a.runKernel(o.nb,c)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(22),i=n(3),s=n(4);const u=Object(s.a)({pow_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){let n=Object(i.a)(e,"base","pow"),s=Object(i.a)(t,"exp","pow");[n,s]=Object(a.b)(n,s);const u={a:n,b:s};return r.a.runKernel(o.cc,u)}})},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"f",(function(){return u})),n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return l})),n.d(t,"c",(function(){return d})),n.d(t,"e",(function(){return p}));var r=n(5),o=n(19),a=n(42),i=n(22);function s(){return r.a}function u(e,t){return r.a.tidy(e,t)}function c(e){Object(i.a)(e).forEach(e=>e.dispose())}function l(e){return r.a.keep(e)}function d(){return r.a.backendName}function p(e,t,n=1){return r.a.registerBackend(e,t,n)}Object(a.d)((function(e){Object(o.b)().getBool("DEPRECATION_WARNINGS_ENABLED")&&console.warn(e+" You can disable deprecation warnings with tf.disableDeprecationWarnings().")}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({mean_:
+/**
+ * @license
+ * Copyright 2020 Google Inc. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=null,n=!1){const i={x:Object(a.a)(e,"x","mean")},s={axis:t,keepDims:n};return r.a.runKernel(o.Mb,i,s)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(9),a=n(121),i=n(188);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function s(e,t="float32"){if("complex64"===t){const t=s(e,"float32"),n=Object(i.a)(e,"float32");return Object(a.a)(t,n)}const n=Object(o.D)(Object(o.O)(e),t);return r.a.makeTensor(n,e,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),o=n(6),a=n(22),i=n(3),s=n(35),u=n(4);const c=Object(u.a)({notEqual_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){let n=Object(i.a)(e,"a","notEqual","string_or_numeric"),u=Object(i.a)(t,"b","notEqual","string_or_numeric");[n,u]=Object(a.b)(n,u),Object(s.assertAndGetBroadcastShape)(n.shape,u.shape);const c={a:n,b:u};return r.a.runKernel(o.Xb,c)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(5),o=n(6),a=n(22),i=n(3),s=n(35),u=n(46),c=n(4);const l=Object(c.a)({minimum_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){let n=Object(i.a)(e,"a","minimum"),c=Object(i.a)(t,"b","minimum");[n,c]=Object(a.b)(n,c),"bool"===n.dtype&&(n=Object(u.a)(n,"int32"),c=Object(u.a)(c,"int32")),Object(s.assertAndGetBroadcastShape)(n.shape,c.shape);const l={a:n,b:c};return r.a.runKernel(o.Ob,l)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),o=n(6),a=n(22),i=n(3),s=n(35),u=n(4);const c=Object(u.a)({squaredDifference_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){let n=Object(i.a)(e,"a","squaredDifference"),u=Object(i.a)(t,"b","squaredDifference");[n,u]=Object(a.b)(n,u),Object(s.assertAndGetBroadcastShape)(n.shape,u.shape);const c={a:n,b:u};return r.a.runKernel(o.Nc,c,{})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({log1p_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","log1p")};return r.a.runKernel(o.Bb,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({step_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=0){const n={x:Object(a.a)(e,"x","step")},i={alpha:t};return r.a.runKernel(o.Oc,n,i)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({elu_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","elu","float32")};return r.a.runKernel(o.U,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({relu6_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","relu6")};return r.a.runKernel(o.kc,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({prelu_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){const n={x:Object(a.a)(e,"x","prelu"),alpha:Object(a.a)(t,"alpha","prelu")};return r.a.runKernel(o.dc,n)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({leakyRelu_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=.2){const n={x:Object(a.a)(e,"x","leakyRelu")},i={alpha:t};return r.a.runKernel(o.wb,n,i)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(37),u=n(4),c=n(12);const l=Object(u.a)({depthwiseConv2d_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n,u,l="NHWC",d=[1,1],p){const h=Object(a.a)(e,"x","depthwiseConv2d","float32"),f=Object(a.a)(t,"filter","depthwiseConv2d","float32");let m=h,g=!1;3===h.rank&&(g=!0,m=Object(c.a)(h,[1,h.shape[0],h.shape[1],h.shape[2]])),i.b(4===m.rank,()=>`Error in depthwiseConv2d: input must be rank 4, but got rank ${m.rank}.`),i.b(4===f.rank,()=>"Error in depthwiseConv2d: filter must be rank 4, but got rank "+f.rank+"."),i.b(m.shape[3]===f.shape[2],()=>`Error in depthwiseConv2d: number of input channels (${m.shape[3]}) must match the inChannels dimension in filter ${f.shape[2]}.`),s.a("depthwiseConv2d",u,p);const b={x:m,filter:f},y={strides:n,pad:u,dataFormat:l,dilations:d,dimRoundingMode:p},v=r.a.runKernel(o.O,b,y);return g?Object(c.a)(v,[v.shape[1],v.shape[2],v.shape[3]]):v}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(3),o=n(9),a=n(152);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function i(e,t,n){if(Object(o.d)(e),null!=t&&3!==t.length)throw new Error("tensor3d() requires shape to have three numbers");const i=Object(r.c)(e,n);if(3!==i.length&&1!==i.length)throw new Error("tensor3d() requires values to be number[][][] or flat/TypedArray");if(1===i.length&&null==t)throw new Error("tensor3d() requires shape to be provided when `values` are a flat array");return Object(a.a)(e,t,i,n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(122);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function o(e,t){const n=[];for(let e=0;e<t.length;e++)t[e]&&n.push(e);const o=Object(r.a)(e,"int32"),a=Object(r.a)([n.length,e.length],"int32");for(let t=0;t<n.length;t++){const r=o.indexToLoc(n[t]),i=t*e.length;a.values.set(r,i)}return a.toTensor()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),o=n(6),a=n(22),i=n(3),s=n(35),u=n(4);const c=Object(u.a)({equal_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){let n=Object(i.a)(e,"a","equal","string_or_numeric"),u=Object(i.a)(t,"b","equal","string_or_numeric");[n,u]=Object(a.b)(n,u),Object(s.assertAndGetBroadcastShape)(n.shape,u.shape);const c={a:n,b:u};return r.a.runKernel(o.W,c)}})},function(e,t,n){e.exports=n(879)},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),o=n(6),a=n(9),i=n(37),s=n(4),u=n(12);const c=Object(s.a)({conv2DBackpropInput_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n,s,c,l="NHWC",d){a.b(e.length===t.rank,()=>`Length of inShape (${e.length}) and rank of dy (${t.rank}) must match`);let p=e,h=t,f=!1;3===t.rank&&(f=!0,h=Object(u.a)(t,[1,t.shape[0],t.shape[1],t.shape[2]]),p=[1,e[0],e[1],e[2]]),a.b(4===p.length,()=>"Error in conv2dDerInput: inShape must be length 4, but got length "+p.length+"."),a.b(4===h.rank,()=>"Error in conv2dDerInput: dy must be rank 4, but got rank "+h.rank),a.b(4===n.rank,()=>"Error in conv2dDerInput: filter must be rank 4, but got rank "+n.rank);const m="NHWC"===l?p[3]:p[1],g="NHWC"===l?h.shape[3]:h.shape[1];a.b(m===n.shape[2],()=>`Error in conv2dDerInput: depth of input (${m}) must match input depth for filter ${n.shape[2]}.`),a.b(g===n.shape[3],()=>`Error in conv2dDerInput: depth of output (${g}) must match output depth for filter ${n.shape[3]}.`),i.a("conv2dDerInput",c,d);const b={dy:h,filter:n},y={strides:s,pad:c,dataFormat:l,dimRoundingMode:d,inputShape:p},v=r.a.runKernel(o.E,b,y);return f?Object(u.a)(v,[v.shape[1],v.shape[2],v.shape[3]]):v}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(400);n(277);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class o{constructor(e,t,n,o,a){this.mean=e,this.stdDev=t,this.dtype=n,this.nextVal=NaN,this.truncated=o,this.truncated&&(this.upper=this.mean+2*this.stdDev,this.lower=this.mean-2*this.stdDev);const i=a||Math.random();this.random=r.alea(i.toString())}nextValue(){if(!isNaN(this.nextVal)){const e=this.nextVal;return this.nextVal=NaN,e}let e,t,n=!1;for(;!n;){let r,o,a;do{r=2*this.random()-1,o=2*this.random()-1,a=r*r+o*o}while(a>=1||0===a);const i=Math.sqrt(-2*Math.log(a)/a);e=this.mean+this.stdDev*r*i,t=this.mean+this.stdDev*o*i,this.truncated&&!this.isValidTruncated(e)||(n=!0)}return this.truncated&&!this.isValidTruncated(t)||(this.nextVal=this.convertValue(t)),this.convertValue(e)}convertValue(e){return null==this.dtype||"float32"===this.dtype?e:Math.round(e)}isValidTruncated(e){return e<=this.upper&&e>=this.lower}}class a{constructor(e=0,t=1,n,o){if(this.canReturnFloat=()=>null==this.dtype||"float32"===this.dtype,this.min=e,this.range=t-e,this.dtype=n,null==o&&(o=Math.random()),"number"==typeof o&&(o=o.toString()),!this.canReturnFloat()&&this.range<=1)throw new Error(`The difference between ${e} - ${t} <= 1 and dtype is not float`);this.random=r.alea(o)}convertValue(e){return this.canReturnFloat()?e:Math.round(e)}nextValue(){return this.convertValue(this.min+this.range*this.random())}}},function(e,t,n){e.exports=n(885)},function(e,t,n){var r=n(894),o=n(895),a=n(896),i=n(897),s=n(898),u=n(899),c=n(900);c.alea=r,c.xor128=o,c.xorwow=a,c.xorshift7=i,c.xor4096=s,c.tychei=u,e.exports=c},function(e,t,n){e.exports=n(402)},function(e,t,n){var r=n(403);n(430),n(431),n(432),n(433),n(434),n(435),n(436),e.exports=r},function(e,t,n){var r=n(278);e.exports=r},function(e,t,n){n(279),n(82),n(409),n(411),n(412),n(413),n(414),n(290),n(415),n(416),n(417),n(418),n(419),n(420),n(421),n(422),n(423),n(424),n(425),n(426);var r=n(21);e.exports=r.Symbol},function(e,t,n){var r=n(14),o=n(50),a=n(26),i=n(197),s=n(199),u=n(406),c=n(24),l=r.TypeError,d=c("toPrimitive");e.exports=function(e,t){if(!a(e)||i(e))return e;var n,r=s(e,d);if(r){if(void 0===t&&(t="default"),n=o(r,e,t),!a(n)||i(n))return n;throw l("Can't convert object to primitive value")}return void 0===t&&(t="number"),u(e,t)}},function(e,t,n){var r=n(14),o=n(50),a=n(27),i=n(26),s=r.TypeError;e.exports=function(e,t){var n,r;if("string"===t&&a(n=e.toString)&&!i(r=o(n,e)))return r;if(a(n=e.valueOf)&&!i(r=o(n,e)))return r;if("string"!==t&&a(n=e.toString)&&!i(r=o(n,e)))return r;throw s("Can't convert object to primitive value")}},function(e,t,n){var r=n(14),o=Object.defineProperty;e.exports=function(e,t){try{o(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(14),o=n(112),a=n(159),i=n(26),s=n(24)("species"),u=r.Array;e.exports=function(e){var t;return o(e)&&(t=e.constructor,(a(t)&&(t===u||o(t.prototype))||i(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?u:t}},function(e,t,n){"use strict";var r=n(15),o=n(14),a=n(56),i=n(98),s=n(50),u=n(17),c=n(70),l=n(39),d=n(198),p=n(20),h=n(33),f=n(112),m=n(27),g=n(26),b=n(34),y=n(197),v=n(47),x=n(80),w=n(65),O=n(154),k=n(93),S=n(91),T=n(94),C=n(161),E=n(163),I=n(287),j=n(245),N=n(78),A=n(54),R=n(243),_=n(181),$=n(135),F=n(101),D=n(200),M=n(162),P=n(134),L=n(157),B=n(24),z=n(209),U=n(28),V=n(102),W=n(74),G=n(83).forEach,H=M("hidden"),q=B("toPrimitive"),K=W.set,X=W.getterFor("Symbol"),Y=Object.prototype,Q=o.Symbol,Z=Q&&Q.prototype,J=o.TypeError,ee=o.QObject,te=a("JSON","stringify"),ne=N.f,re=A.f,oe=I.f,ae=_.f,ie=u([].push),se=D("symbols"),ue=D("op-symbols"),ce=D("string-to-symbol-registry"),le=D("symbol-to-string-registry"),de=D("wks"),pe=!ee||!ee.prototype||!ee.prototype.findChild,he=l&&p((function(){return 7!=T(re({},"a",{get:function(){return re(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=ne(Y,t);r&&delete Y[t],re(e,t,n),r&&e!==Y&&re(Y,t,r)}:re,fe=function(e,t){var n=se[e]=T(Z);return K(n,{type:"Symbol",tag:e,description:t}),l||(n.description=t),n},me=function(e,t,n){e===Y&&me(ue,t,n),v(e);var r=O(t);return v(n),h(se,r)?(n.enumerable?(h(e,H)&&e[H][r]&&(e[H][r]=!1),n=T(n,{enumerable:S(0,!1)})):(h(e,H)||re(e,H,S(1,{})),e[H][r]=!0),he(e,r,n)):re(e,r,n)},ge=function(e,t){v(e);var n=w(t),r=C(n).concat(xe(n));return G(r,(function(t){l&&!s(be,n,t)||me(e,t,n[t])})),e},be=function(e){var t=O(e),n=s(ae,this,t);return!(this===Y&&h(se,t)&&!h(ue,t))&&(!(n||!h(this,t)||!h(se,t)||h(this,H)&&this[H][t])||n)},ye=function(e,t){var n=w(e),r=O(t);if(n!==Y||!h(se,r)||h(ue,r)){var o=ne(n,r);return!o||!h(se,r)||h(n,H)&&n[H][r]||(o.enumerable=!0),o}},ve=function(e){var t=oe(w(e)),n=[];return G(t,(function(e){h(se,e)||h(P,e)||ie(n,e)})),n},xe=function(e){var t=e===Y,n=oe(t?ue:w(e)),r=[];return G(n,(function(e){!h(se,e)||t&&!h(Y,e)||ie(r,se[e])})),r};(d||(F(Z=(Q=function(){if(b(Z,this))throw J("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?k(arguments[0]):void 0,t=L(e),n=function(e){this===Y&&s(n,ue,e),h(this,H)&&h(this[H],t)&&(this[H][t]=!1),he(this,t,S(1,e))};return l&&pe&&he(Y,t,{configurable:!0,set:n}),fe(t,e)}).prototype,"toString",(function(){return X(this).tag})),F(Q,"withoutSetter",(function(e){return fe(L(e),e)})),_.f=be,A.f=me,R.f=ge,N.f=ye,E.f=I.f=ve,j.f=xe,z.f=function(e){return fe(B(e),e)},l&&(re(Z,"description",{configurable:!0,get:function(){return X(this).description}}),c||F(Y,"propertyIsEnumerable",be,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!d,sham:!d},{Symbol:Q}),G(C(de),(function(e){U(e)})),r({target:"Symbol",stat:!0,forced:!d},{for:function(e){var t=k(e);if(h(ce,t))return ce[t];var n=Q(t);return ce[t]=n,le[n]=t,n},keyFor:function(e){if(!y(e))throw J(e+" is not a symbol");if(h(le,e))return le[e]},useSetter:function(){pe=!0},useSimple:function(){pe=!1}}),r({target:"Object",stat:!0,forced:!d,sham:!l},{create:function(e,t){return void 0===t?T(e):ge(T(e),t)},defineProperty:me,defineProperties:ge,getOwnPropertyDescriptor:ye}),r({target:"Object",stat:!0,forced:!d},{getOwnPropertyNames:ve,getOwnPropertySymbols:xe}),r({target:"Object",stat:!0,forced:p((function(){j.f(1)}))},{getOwnPropertySymbols:function(e){return j.f(x(e))}}),te)&&r({target:"JSON",stat:!0,forced:!d||p((function(){var e=Q();return"[null]"!=te([e])||"{}"!=te({a:e})||"{}"!=te(Object(e))}))},{stringify:function(e,t,n){var r=$(arguments),o=t;if((g(t)||void 0!==e)&&!y(e))return f(t)||(t=function(e,t){if(m(o)&&(t=s(o,this,e,t)),!y(t))return t}),r[1]=t,i(te,null,r)}});if(!Z[q]){var we=Z.valueOf;F(Z,q,(function(e){return s(we,this)}))}V(Q,"Symbol"),P[H]=!0},function(e,t,n){"use strict";var r=n(205),o=n(92);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(e,t,n){n(28)("asyncIterator")},function(e,t){},function(e,t,n){n(28)("hasInstance")},function(e,t,n){n(28)("isConcatSpreadable")},function(e,t,n){n(28)("match")},function(e,t,n){n(28)("matchAll")},function(e,t,n){n(28)("replace")},function(e,t,n){n(28)("search")},function(e,t,n){n(28)("species")},function(e,t,n){n(28)("split")},function(e,t,n){n(28)("toPrimitive")},function(e,t,n){n(28)("toStringTag")},function(e,t,n){n(28)("unscopables")},function(e,t,n){var r=n(14);n(102)(r.JSON,"JSON",!0)},function(e,t){},function(e,t){},function(e,t,n){var r=n(39),o=n(33),a=Function.prototype,i=r&&Object.getOwnPropertyDescriptor,s=o(a,"name"),u=s&&"something"===function(){}.name,c=s&&(!r||r&&i(a,"name").configurable);e.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},function(e,t,n){var r=n(14),o=n(27),a=r.String,i=r.TypeError;e.exports=function(e){if("object"==typeof e||o(e))return e;throw i("Can't set "+a(e)+" as a prototype")}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){n(28)("asyncDispose")},function(e,t,n){n(28)("dispose")},function(e,t,n){n(28)("matcher")},function(e,t,n){n(28)("metadata")},function(e,t,n){n(28)("observable")},function(e,t,n){n(28)("patternMatch")},function(e,t,n){n(28)("replaceAll")},function(e,t,n){e.exports=n(438)},function(e,t,n){var r=n(439);e.exports=r},function(e,t,n){var r=n(440);e.exports=r},function(e,t,n){var r=n(441);n(66),e.exports=r},function(e,t,n){n(71),n(82),n(109),n(290);var r=n(209);e.exports=r.f("iterator")},function(e,t,n){var r=n(443);e.exports=r},function(e,t,n){var r=n(349);e.exports=r},function(e,t,n){n(445);var r=n(21).Object,o=e.exports=function(e,t,n){return r.defineProperty(e,t,n)};r.defineProperty.sham&&(o.sham=!0)},function(e,t,n){var r=n(15),o=n(39),a=n(54).f;r({target:"Object",stat:!0,forced:Object.defineProperty!==a,sham:!o},{defineProperty:a})},function(e,t){e.exports=function(e,t){return t.get?t.get.call(e):t.value},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(449);e.exports=r},function(e,t,n){n(450);var r=n(21);e.exports=r.Object.values},function(e,t,n){var r=n(15),o=n(451).values;r({target:"Object",stat:!0},{values:function(e){return o(e)}})},function(e,t,n){var r=n(39),o=n(17),a=n(161),i=n(65),s=o(n(181).f),u=o([].push),c=function(e){return function(t){for(var n,o=i(t),c=a(o),l=c.length,d=0,p=[];l>d;)n=c[d++],r&&!s(o,n)||u(p,e?[n,o[n]]:o[n]);return p}};e.exports={entries:c(!0),values:c(!1)}},function(e,t,n){var r=n(453);n(66),e.exports=r},function(e,t,n){n(71),n(82),n(454);var r=n(21);e.exports=r.WeakMap},function(e,t,n){"use strict";var r,o=n(14),a=n(17),i=n(144),s=n(145),u=n(165),c=n(297),l=n(26),d=n(294),p=n(74).enforce,h=n(289),f=!o.ActiveXObject&&"ActiveXObject"in o,m=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},g=u("WeakMap",m,c);if(h&&f){r=c.getConstructor(m,"WeakMap",!0),s.enable();var b=g.prototype,y=a(b.delete),v=a(b.has),x=a(b.get),w=a(b.set);i(b,{delete:function(e){if(l(e)&&!d(e)){var t=p(this);return t.frozen||(t.frozen=new r),y(this,e)||t.frozen.delete(e)}return y(this,e)},has:function(e){if(l(e)&&!d(e)){var t=p(this);return t.frozen||(t.frozen=new r),v(this,e)||t.frozen.has(e)}return v(this,e)},get:function(e){if(l(e)&&!d(e)){var t=p(this);return t.frozen||(t.frozen=new r),v(this,e)?x(this,e):t.frozen.get(e)}return x(this,e)},set:function(e,t){if(l(e)&&!d(e)){var n=p(this);n.frozen||(n.frozen=new r),v(this,e)?w(this,e,t):n.frozen.set(e,t)}else w(this,e,t);return this}})}},function(e,t,n){var r=n(20);e.exports=r((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},function(e,t,n){n(352),n(71),n(82),n(463),n(353),n(354),n(470),n(109);var r=n(21);e.exports=r.Promise},function(e,t,n){var r=n(33),o=n(458),a=n(78),i=n(54);e.exports=function(e,t,n){for(var s=o(t),u=i.f,c=a.f,l=0;l<s.length;l++){var d=s[l];r(e,d)||n&&r(n,d)||u(e,d,c(t,d))}}},function(e,t,n){var r=n(56),o=n(17),a=n(163),i=n(245),s=n(47),u=o([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=a.f(s(e)),n=i.f;return n?u(t,n(e)):t}},function(e,t,n){var r=n(17)("".replace),o=String(Error("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,i=a.test(o);e.exports=function(e,t){if(i&&"string"==typeof e)for(;t--;)e=r(e,a,"");return e}},function(e,t,n){var r=n(26),o=n(73);e.exports=function(e,t){r(t)&&"cause"in t&&o(e,"cause",t.cause)}},function(e,t,n){var r=n(93);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:r(e)}},function(e,t,n){var r=n(20),o=n(91);e.exports=!r((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",o(1,7)),7!==e.stack)}))},function(e,t,n){"use strict";var r,o,a,i,s=n(15),u=n(70),c=n(14),l=n(56),d=n(50),p=n(298),h=n(101),f=n(144),m=n(164),g=n(102),b=n(299),y=n(79),v=n(27),x=n(26),w=n(137),O=n(206),k=n(103),S=n(300),T=n(301),C=n(303).set,E=n(464),I=n(305),j=n(467),N=n(147),A=n(182),R=n(468),_=n(74),$=n(282),F=n(24),D=n(469),M=n(212),P=n(155),L=F("species"),B="Promise",z=_.getterFor(B),U=_.set,V=_.getterFor(B),W=p&&p.prototype,G=p,H=W,q=c.TypeError,K=c.document,X=c.process,Y=N.f,Q=Y,Z=!!(K&&K.createEvent&&c.dispatchEvent),J=v(c.PromiseRejectionEvent),ee=!1,te=$(B,(function(){var e=O(G),t=e!==String(G);if(!t&&66===P)return!0;if(u&&!H.finally)return!0;if(P>=51&&/native code/.test(e))return!1;var n=new G((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[L]=r,!(ee=n.then((function(){}))instanceof r)||!t&&D&&!J})),ne=te||!S((function(e){G.all(e).catch((function(){}))})),re=function(e){var t;return!(!x(e)||!v(t=e.then))&&t},oe=function(e,t){var n,r,o,a=t.value,i=1==t.state,s=i?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(i||(2===t.rejection&&ce(t),t.rejection=1),!0===s?n=a:(l&&l.enter(),n=s(a),l&&(l.exit(),o=!0)),n===e.promise?c(q("Promise-chain cycle")):(r=re(n))?d(r,n,u,c):u(n)):c(a)}catch(e){l&&!o&&l.exit(),c(e)}},ae=function(e,t){e.notified||(e.notified=!0,E((function(){for(var n,r=e.reactions;n=r.get();)oe(n,e);e.notified=!1,t&&!e.rejection&&se(e)})))},ie=function(e,t,n){var r,o;Z?((r=K.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),c.dispatchEvent(r)):r={promise:t,reason:n},!J&&(o=c["on"+e])?o(r):"unhandledrejection"===e&&j("Unhandled promise rejection",n)},se=function(e){d(C,c,(function(){var t,n=e.facade,r=e.value;if(ue(e)&&(t=A((function(){M?X.emit("unhandledRejection",r,n):ie("unhandledrejection",n,r)})),e.rejection=M||ue(e)?2:1,t.error))throw t.value}))},ue=function(e){return 1!==e.rejection&&!e.parent},ce=function(e){d(C,c,(function(){var t=e.facade;M?X.emit("rejectionHandled",t):ie("rejectionhandled",t,e.value)}))},le=function(e,t,n){return function(r){e(t,r,n)}},de=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,ae(e,!0))},pe=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw q("Promise can't be resolved itself");var r=re(t);r?E((function(){var n={done:!1};try{d(r,t,le(pe,n,e),le(de,n,e))}catch(t){de(n,t,e)}})):(e.value=t,e.state=1,ae(e,!1))}catch(t){de({done:!1},t,e)}}};if(te&&(H=(G=function(e){w(this,H),y(e),d(r,this);var t=z(this);try{e(le(pe,t),le(de,t))}catch(e){de(t,e)}}).prototype,(r=function(e){U(this,{type:B,done:!1,notified:!1,parent:!1,reactions:new R,rejection:!1,state:0,value:void 0})}).prototype=f(H,{then:function(e,t){var n=V(this),r=Y(T(this,G));return n.parent=!0,r.ok=!v(e)||e,r.fail=v(t)&&t,r.domain=M?X.domain:void 0,0==n.state?n.reactions.add(r):E((function(){oe(r,n)})),r.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r,t=z(e);this.promise=e,this.resolve=le(pe,t),this.reject=le(de,t)},N.f=Y=function(e){return e===G||e===a?new o(e):Q(e)},!u&&v(p)&&W!==Object.prototype)){i=W.then,ee||(h(W,"then",(function(e,t){var n=this;return new G((function(e,t){d(i,n,e,t)})).then(e,t)}),{unsafe:!0}),h(W,"catch",H.catch,{unsafe:!0}));try{delete W.constructor}catch(e){}m&&m(W,H)}s({global:!0,wrap:!0,forced:te},{Promise:G}),g(G,B,!1,!0),b(B),a=l(B),s({target:B,stat:!0,forced:te},{reject:function(e){var t=Y(this);return d(t.reject,void 0,e),t.promise}}),s({target:B,stat:!0,forced:u||te},{resolve:function(e){return I(u&&this===a?G:this,e)}}),s({target:B,stat:!0,forced:ne},{all:function(e){var t=this,n=Y(t),r=n.resolve,o=n.reject,a=A((function(){var n=y(t.resolve),a=[],i=0,s=1;k(e,(function(e){var u=i++,c=!1;s++,d(n,t,e).then((function(e){c||(c=!0,a[u]=e,--s||r(a))}),o)})),--s||r(a)}));return a.error&&o(a.value),n.promise},race:function(e){var t=this,n=Y(t),r=n.reject,o=A((function(){var o=y(t.resolve);k(e,(function(e){d(o,t,e).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},function(e,t,n){var r,o,a,i,s,u,c,l,d=n(14),p=n(81),h=n(78).f,f=n(303).set,m=n(304),g=n(465),b=n(466),y=n(212),v=d.MutationObserver||d.WebKitMutationObserver,x=d.document,w=d.process,O=d.Promise,k=h(d,"queueMicrotask"),S=k&&k.value;S||(r=function(){var e,t;for(y&&(e=w.domain)&&e.exit();o;){t=o.fn,o=o.next;try{t()}catch(e){throw o?i():a=void 0,e}}a=void 0,e&&e.enter()},m||y||b||!v||!x?!g&&O&&O.resolve?((c=O.resolve(void 0)).constructor=O,l=p(c.then,c),i=function(){l(r)}):y?i=function(){w.nextTick(r)}:(f=p(f,d),i=function(){f(r)}):(s=!0,u=x.createTextNode(""),new v(r).observe(u,{characterData:!0}),i=function(){u.data=s=!s})),e.exports=S||function(e){var t={fn:e,next:void 0};a&&(a.next=t),o||(o=t,i()),a=t}},function(e,t,n){var r=n(133),o=n(14);e.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==o.Pebble},function(e,t,n){var r=n(133);e.exports=/web0s(?!.*chrome)/i.test(r)},function(e,t,n){var r=n(14);e.exports=function(e,t){var n=r.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))}},function(e,t){var n=function(){this.head=null,this.tail=null};n.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},e.exports=n},function(e,t){e.exports="object"==typeof window},function(e,t,n){"use strict";var r=n(15),o=n(70),a=n(298),i=n(20),s=n(56),u=n(27),c=n(301),l=n(305),d=n(101);if(r({target:"Promise",proto:!0,real:!0,forced:!!a&&i((function(){a.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=c(this,s("Promise")),n=u(e);return this.then(n?function(n){return l(t,e()).then((function(){return n}))}:e,n?function(n){return l(t,e()).then((function(){throw n}))}:e)}}),!o&&u(a)){var p=s("Promise").prototype.finally;a.prototype.finally!==p&&d(a.prototype,"finally",p,{unsafe:!0})}},function(e,t,n){var r=n(16),o=n(59),a=n(96),i=n(311),s=n(116),u=n(472),c=n(57),l=r.TypeError,d=c("toPrimitive");e.exports=function(e,t){if(!a(e)||i(e))return e;var n,r=s(e,d);if(r){if(void 0===t&&(t="default"),n=o(r,e,t),!a(n)||i(n))return n;throw l("Can't convert object to primitive value")}return void 0===t&&(t="number"),u(e,t)}},function(e,t,n){var r=n(16),o=n(59),a=n(43),i=n(96),s=r.TypeError;e.exports=function(e,t){var n,r;if("string"===t&&a(n=e.toString)&&!i(r=o(n,e)))return r;if(a(n=e.valueOf)&&!i(r=o(n,e)))return r;if("string"!==t&&a(n=e.toString)&&!i(r=o(n,e)))return r;throw s("Can't convert object to primitive value")}},function(e,t,n){var r=n(16),o=n(43),a=n(184),i=r.WeakMap;e.exports=o(i)&&/native code/.test(a(i))},function(e,t,n){"use strict";var r=n(213),o=n(186);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(e,t,n){var r=n(476);e.exports=r},function(e,t,n){var r=n(34),o=n(477),a=Array.prototype;e.exports=function(e){var t=e.slice;return e===a||r(a,e)&&t===a.slice?o:t}},function(e,t,n){n(478);var r=n(51);e.exports=r("Array").slice},function(e,t,n){"use strict";var r=n(15),o=n(14),a=n(112),i=n(159),s=n(26),u=n(207),c=n(100),l=n(65),d=n(158),p=n(24),h=n(160),f=n(135),m=h("slice"),g=p("species"),b=o.Array,y=Math.max;r({target:"Array",proto:!0,forced:!m},{slice:function(e,t){var n,r,o,p=l(this),h=c(p),m=u(e,h),v=u(void 0===t?h:t,h);if(a(p)&&(n=p.constructor,(i(n)&&(n===b||a(n.prototype))||s(n)&&null===(n=n[g]))&&(n=void 0),n===b||void 0===n))return f(p,m,v);for(r=new(void 0===n?b:n)(y(v-m,0)),o=0;m<v;m++,o++)m in p&&d(r,o,p[m]);return r.length=o,r}})},function(e,t,n){var r=n(480);e.exports=r},function(e,t,n){var r=n(481);e.exports=r},function(e,t,n){var r=n(482);n(66),e.exports=r},function(e,t,n){n(71),n(109);var r=n(146);e.exports=r},function(e,t,n){var r=n(484);e.exports=r},function(e,t,n){n(485);var r=n(21);e.exports=r.Array.isArray},function(e,t,n){n(15)({target:"Array",stat:!0},{isArray:n(112)})},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,a=o&&!r.call({1:2},1);t.f=a?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(75),o=n(488),a=n(253),i=n(115);e.exports=function(e,t){for(var n=o(t),s=i.f,u=a.f,c=0;c<n.length;c++){var l=n[c];r(e,l)||s(e,l,u(t,l))}}},function(e,t,n){var r=n(114),o=n(25),a=n(356),i=n(491),s=n(49),u=o([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=a.f(s(e)),n=i.f;return n?u(t,n(e)):t}},function(e,t,n){var r=n(127),o=n(490),a=n(357),i=function(e){return function(t,n,i){var s,u=r(t),c=a(u),l=o(i,c);if(e&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},function(e,t,n){var r=n(167),o=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):a(n,t)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(84),o=n(115),a=n(49),i=n(127),s=n(493);e.exports=r?Object.defineProperties:function(e,t){a(e);for(var n,r=i(t),u=s(t),c=u.length,l=0;c>l;)o.f(e,n=u[l++],r[n]);return e}},function(e,t,n){var r=n(313),o=n(222);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){"use strict";var r=n(59),o=n(170),a=n(49),i=n(168),s=n(85),u=n(105),c=n(116),l=n(223),d=n(171);o("match",(function(e,t,n){return[function(t){var n=u(this),o=null==t?void 0:c(t,e);return o?r(o,t,n):new RegExp(t)[e](s(n))},function(e){var r=a(this),o=s(e),u=n(t,r,o);if(u.done)return u.value;if(!r.global)return d(r,o);var c=r.unicode;r.lastIndex=0;for(var p,h=[],f=0;null!==(p=d(r,o));){var m=s(p[0]);h[f]=m,""===m&&(r.lastIndex=l(o,i(r.lastIndex),c)),f++}return 0===f?null:h}]}))},function(e,t,n){var r=n(496);e.exports=r},function(e,t,n){n(109),n(497);var r=n(21);e.exports=r.Array.from},function(e,t,n){var r=n(15),o=n(362);r({target:"Array",stat:!0,forced:!n(300)((function(e){Array.from(e)}))},{from:o})},function(e,t,n){var r=n(47),o=n(296);e.exports=function(e,t,n,a){try{return a?t(r(n)[0],n[1]):t(n)}catch(t){o(e,"throw",t)}}},function(e,t,n){var r=n(500);n(66),e.exports=r},function(e,t,n){n(71),n(501),n(82),n(109);var r=n(21);e.exports=r.Map},function(e,t,n){"use strict";n(165)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),n(315))},function(e,t,n){var r=n(503);e.exports=r},function(e,t,n){var r=n(34),o=n(504),a=String.prototype;e.exports=function(e){var t=e.endsWith;return"string"==typeof e||e===a||r(a,e)&&t===a.endsWith?o:t}},function(e,t,n){n(505);var r=n(51);e.exports=r("String").endsWith},function(e,t,n){"use strict";var r,o=n(15),a=n(17),i=n(78).f,s=n(203),u=n(93),c=n(257),l=n(123),d=n(258),p=n(70),h=a("".endsWith),f=a("".slice),m=Math.min,g=d("endsWith");o({target:"String",proto:!0,forced:!!(p||g||(r=i(String.prototype,"endsWith"),!r||r.writable))&&!g},{endsWith:function(e){var t=u(l(this));c(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,o=void 0===n?r:m(s(n),r),a=u(e);return h?h(t,a,o):f(t,o-a.length,o)===a}})},function(e,t,n){var r=n(26),o=n(99),a=n(24)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==o(e))}},function(e,t,n){var r=n(508);e.exports=r},function(e,t,n){var r=n(34),o=n(509),a=Function.prototype;e.exports=function(e){var t=e.bind;return e===a||r(a,e)&&t===a.bind?o:t}},function(e,t,n){n(510);var r=n(51);e.exports=r("Function").bind},function(e,t,n){var r=n(15),o=n(316);r({target:"Function",proto:!0,forced:Function.bind!==o},{bind:o})},function(e,t,n){n(66);var r=n(92),o=n(33),a=n(34),i=n(512),s=Array.prototype,u={DOMTokenList:!0,NodeList:!0};e.exports=function(e){var t=e.forEach;return e===s||a(s,e)&&t===s.forEach||o(u,r(e))?i:t}},function(e,t,n){var r=n(513);e.exports=r},function(e,t,n){n(514);var r=n(51);e.exports=r("Array").forEach},function(e,t,n){"use strict";var r=n(15),o=n(515);r({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},function(e,t,n){"use strict";var r=n(83).forEach,o=n(224)("forEach");e.exports=o?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},function(e,t,n){var r=n(517);e.exports=r},function(e,t,n){var r=n(34),o=n(518),a=Array.prototype;e.exports=function(e){var t=e.indexOf;return e===a||r(a,e)&&t===a.indexOf?o:t}},function(e,t,n){n(519);var r=n(51);e.exports=r("Array").indexOf},function(e,t,n){"use strict";var r=n(15),o=n(17),a=n(244).indexOf,i=n(224),s=o([].indexOf),u=!!s&&1/s([1],1,-0)<0,c=i("indexOf");r({target:"Array",proto:!0,forced:u||!c},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return u?s(this,e,t)||0:a(this,e,t)}})},function(e,t,n){var r=n(521);n(66),e.exports=r},function(e,t,n){n(71),n(82),n(522);var r=n(21);e.exports=r.WeakSet},function(e,t,n){"use strict";n(165)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),n(297))},function(e,t,n){var r=n(524);e.exports=r},function(e,t,n){n(525);var r=n(21),o=n(98);r.JSON||(r.JSON={stringify:JSON.stringify}),e.exports=function(e,t,n){return o(r.JSON.stringify,null,arguments)}},function(e,t,n){var r=n(15),o=n(14),a=n(56),i=n(98),s=n(17),u=n(20),c=o.Array,l=a("JSON","stringify"),d=s(/./.exec),p=s("".charAt),h=s("".charCodeAt),f=s("".replace),m=s(1..toString),g=/[\uD800-\uDFFF]/g,b=/^[\uD800-\uDBFF]$/,y=/^[\uDC00-\uDFFF]$/,v=function(e,t,n){var r=p(n,t-1),o=p(n,t+1);return d(b,e)&&!d(y,o)||d(y,e)&&!d(b,r)?"\\u"+m(h(e,0),16):e},x=u((function(){return'"\\udf06\\ud834"'!==l("\udf06\ud834")||'"\\udead"'!==l("\udead")}));l&&r({target:"JSON",stat:!0,forced:x},{stringify:function(e,t,n){for(var r=0,o=arguments.length,a=c(o);r<o;r++)a[r]=arguments[r];var s=i(l,null,a);return"string"==typeof s?f(s,g,v):s}})},function(e,t,n){var r=n(527);e.exports=r},function(e,t,n){var r=n(34),o=n(528),a=Array.prototype;e.exports=function(e){var t=e.concat;return e===a||r(a,e)&&t===a.concat?o:t}},function(e,t,n){n(279);var r=n(51);e.exports=r("Array").concat},function(e,t,n){var r=n(530);e.exports=r},function(e,t,n){var r=n(34),o=n(531),a=String.prototype;e.exports=function(e){var t=e.startsWith;return"string"==typeof e||e===a||r(a,e)&&t===a.startsWith?o:t}},function(e,t,n){n(532);var r=n(51);e.exports=r("String").startsWith},function(e,t,n){"use strict";var r,o=n(15),a=n(17),i=n(78).f,s=n(203),u=n(93),c=n(257),l=n(123),d=n(258),p=n(70),h=a("".startsWith),f=a("".slice),m=Math.min,g=d("startsWith");o({target:"String",proto:!0,forced:!!(p||g||(r=i(String.prototype,"startsWith"),!r||r.writable))&&!g},{startsWith:function(e){var t=u(l(this));c(e);var n=s(m(arguments.length>1?arguments[1]:void 0,t.length)),r=u(e);return h?h(t,r,n):f(t,n,n+r.length)===r}})},function(e,t,n){var r=n(534);e.exports=r},function(e,t,n){var r=n(34),o=n(535),a=Array.prototype;e.exports=function(e){var t=e.reverse;return e===a||r(a,e)&&t===a.reverse?o:t}},function(e,t,n){n(536);var r=n(51);e.exports=r("Array").reverse},function(e,t,n){"use strict";var r=n(15),o=n(17),a=n(112),i=o([].reverse),s=[1,2];r({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return a(this)&&(this.length=this.length),i(this)}})},function(e,t,n){var r=n(16),o=n(538),a=n(219),i=r.TypeError;e.exports=function(e){if(o(e))return e;throw i(a(e)+" is not a constructor")}},function(e,t,n){var r=n(25),o=n(45),a=n(43),i=n(186),s=n(114),u=n(184),c=function(){},l=[],d=s("Reflect","construct"),p=/^\s*(?:class|function)\b/,h=r(p.exec),f=!p.exec(c),m=function(e){if(!a(e))return!1;try{return d(c,l,e),!0}catch(e){return!1}};e.exports=!d||o((function(){var e;return m(m.call)||!m(Object)||!m((function(){e=!0}))||e}))?function(e){if(!a(e))return!1;switch(i(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return f||!!h(p,u(e))}:m},function(e,t,n){"use strict";var r=n(59),o=n(170),a=n(49),i=n(105),s=n(540),u=n(85),c=n(116),l=n(171);o("search",(function(e,t,n){return[function(t){var n=i(this),o=null==t?void 0:c(t,e);return o?r(o,t,n):new RegExp(t)[e](u(n))},function(e){var r=a(this),o=u(e),i=n(t,r,o);if(i.done)return i.value;var c=r.lastIndex;s(c,0)||(r.lastIndex=0);var d=l(r,o);return s(r.lastIndex,c)||(r.lastIndex=c),null===d?-1:d.index}]}))},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var r=n(259),o=n(59),a=n(25),i=n(170),s=n(45),u=n(49),c=n(43),l=n(167),d=n(168),p=n(85),h=n(105),f=n(223),m=n(116),g=n(542),b=n(171),y=n(57)("replace"),v=Math.max,x=Math.min,w=a([].concat),O=a([].push),k=a("".indexOf),S=a("".slice),T="$0"==="a".replace(/./,"$0"),C=!!/./[y]&&""===/./[y]("a","$0");i("replace",(function(e,t,n){var a=C?"$":"$0";return[function(e,n){var r=h(this),a=null==e?void 0:m(e,y);return a?o(a,e,r,n):o(t,p(r),e,n)},function(e,o){var i=u(this),s=p(e);if("string"==typeof o&&-1===k(o,a)&&-1===k(o,"$<")){var h=n(t,i,s,o);if(h.done)return h.value}var m=c(o);m||(o=p(o));var y=i.global;if(y){var T=i.unicode;i.lastIndex=0}for(var C=[];;){var E=b(i,s);if(null===E)break;if(O(C,E),!y)break;""===p(E[0])&&(i.lastIndex=f(s,d(i.lastIndex),T))}for(var I,j="",N=0,A=0;A<C.length;A++){for(var R=p((E=C[A])[0]),_=v(x(l(E.index),s.length),0),$=[],F=1;F<E.length;F++)O($,void 0===(I=E[F])?I:String(I));var D=E.groups;if(m){var M=w([R],$,_,s);void 0!==D&&O(M,D);var P=p(r(o,void 0,M))}else P=g(R,s,_,$,D,o);_>=N&&(j+=S(s,N,_)+P,N=_+R.length)}return j+S(s,N)}]}),!!s((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!T||C)},function(e,t,n){var r=n(25),o=n(249),a=Math.floor,i=r("".charAt),s=r("".replace),u=r("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,r,d,p){var h=n+e.length,f=r.length,m=l;return void 0!==d&&(d=o(d),m=c),s(p,m,(function(o,s){var c;switch(i(s,0)){case"$":return"$";case"&":return e;case"`":return u(t,0,n);case"'":return u(t,h);case"<":c=d[u(s,1,-1)];break;default:var l=+s;if(0===l)return o;if(l>f){var p=a(l/10);return 0===p?o:p<=f?void 0===r[p-1]?i(s,1):r[p-1]+i(s,1):o}c=r[l-1]}return void 0===c?"":c}))}},function(e,t,n){"use strict";var r=n(45);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){(function(t){var r=n(317),o=n(172)("socket.io-client:url");e.exports=function(e,n){var a=e;n=n||t.location,null==e&&(e=n.protocol+"//"+n.host);"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(o("protocol-less url %s",e),e=void 0!==n?n.protocol+"//"+e:"https://"+e),o("parse %s",e),a=r(e));a.port||(/^(http|ws)$/.test(a.protocol)?a.port="80":/^(http|ws)s$/.test(a.protocol)&&(a.port="443"));a.path=a.path||"/";var i=-1!==a.host.indexOf(":")?"["+a.host+"]":a.host;return a.id=a.protocol+"://"+i+":"+a.port,a.href=a.protocol+"://"+i+(n&&n.port===a.port?"":":"+a.port),a}}).call(this,n(53))},function(e,t,n){var r;function o(e){function n(){if(n.enabled){var e=n,o=+new Date,a=o-(r||o);e.diff=a,e.prev=r,e.curr=o,r=o;for(var i=new Array(arguments.length),s=0;s<i.length;s++)i[s]=arguments[s];i[0]=t.coerce(i[0]),"string"!=typeof i[0]&&i.unshift("%O");var u=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var o=t.formatters[r];if("function"==typeof o){var a=i[u];n=o.call(e,a),i.splice(u,1),u--}return n})),t.formatArgs.call(e,i);var c=n.log||t.log||console.log.bind(console);c.apply(e,i)}}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),"function"==typeof t.init&&t.init(n),n}(t=e.exports=o.debug=o.default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,o=0;o<r;o++)n[o]&&("-"===(e=n[o].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(227),t.names=[],t.skips=[],t.formatters={}},function(e,t,n){(function(r){function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(547)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,a=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(a=o))})),e.splice(a,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())}).call(this,n(90))},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,o=+new Date,a=o-(n||o);e.diff=a,e.prev=n,e.curr=o,n=o;for(var i=new Array(arguments.length),s=0;s<i.length;s++)i[s]=arguments[s];i[0]=t.coerce(i[0]),"string"!=typeof i[0]&&i.unshift("%O");var u=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var o=t.formatters[r];if("function"==typeof o){var a=i[u];n=o.call(e,a),i.splice(u,1),u--}return n})),t.formatArgs.call(e,i);var c=r.log||t.log||console.log.bind(console);c.apply(e,i)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),r.destroy=o,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function o(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var a=t.instances[n];a.enabled=t.enabled(a.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(227),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),i=r[0],s=r[1],u=new a(function(e,t,n){return 3*(t+n)/4-n}(0,i,s)),l=0,d=s>0?i-4:i;for(n=0;n<d;n+=4)t=o[e.charCodeAt(n)]<<18|o[e.charCodeAt(n+1)]<<12|o[e.charCodeAt(n+2)]<<6|o[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,u[l++]=255&t);1===s&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,a=[],i=0,s=n-o;i<s;i+=16383)a.push(l(e,i,i+16383>s?s:i+16383));1===o?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return a.join("")};for(var r=[],o=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=i.length;s<u;++s)r[s]=i[s],o[i.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var o,a,i=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),i.push(r[(a=o)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return i.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){
+/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
+t.read=function(e,t,n,r,o){var a,i,s=8*o-r-1,u=(1<<s)-1,c=u>>1,l=-7,d=n?o-1:0,p=n?-1:1,h=e[t+d];for(d+=p,a=h&(1<<-l)-1,h>>=-l,l+=s;l>0;a=256*a+e[t+d],d+=p,l-=8);for(i=a&(1<<-l)-1,a>>=-l,l+=r;l>0;i=256*i+e[t+d],d+=p,l-=8);if(0===a)a=1-c;else{if(a===u)return i?NaN:1/0*(h?-1:1);i+=Math.pow(2,r),a-=c}return(h?-1:1)*i*Math.pow(2,a-r)},t.write=function(e,t,n,r,o,a){var i,s,u,c=8*a-o-1,l=(1<<c)-1,d=l>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,i=l):(i=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-i))<1&&(i--,u*=2),(t+=i+d>=1?p/u:p*Math.pow(2,1-d))*u>=2&&(i++,u/=2),i+d>=l?(s=0,i=l):i+d>=1?(s=(t*u-1)*Math.pow(2,o),i+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,o),i=0));o>=8;e[n+h]=255&s,h+=f,s/=256,o-=8);for(i=i<<o|s,c+=o;c>0;e[n+h]=255&i,h+=f,i/=256,c-=8);e[n+h-f]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){(function(e){var r=n(320),o=n(321),a=Object.prototype.toString,i="function"==typeof e.Blob||"[object BlobConstructor]"===a.call(e.Blob),s="function"==typeof e.File||"[object FileConstructor]"===a.call(e.File);t.deconstructPacket=function(e){var t=[],n=e.data,a=e;return a.data=function e(t,n){if(!t)return t;if(o(t)){var a={_placeholder:!0,num:n.length};return n.push(t),a}if(r(t)){for(var i=new Array(t.length),s=0;s<t.length;s++)i[s]=e(t[s],n);return i}if("object"==typeof t&&!(t instanceof Date)){i={};for(var u in t)i[u]=e(t[u],n);return i}return t}(n,t),a.attachments=t.length,{packet:a,buffers:t}},t.reconstructPacket=function(e,t){return e.data=function e(t,n){if(!t)return t;if(t&&t._placeholder)return n[t.num];if(r(t))for(var o=0;o<t.length;o++)t[o]=e(t[o],n);else if("object"==typeof t)for(var a in t)t[a]=e(t[a],n);return t}(e.data,t),e.attachments=void 0,e},t.removeBlobs=function(e,t){var n=0,a=e;!function e(u,c,l){if(!u)return u;if(i&&u instanceof Blob||s&&u instanceof File){n++;var d=new FileReader;d.onload=function(){l?l[c]=this.result:a=this.result,--n||t(a)},d.readAsArrayBuffer(u)}else if(r(u))for(var p=0;p<u.length;p++)e(u[p],p,u);else if("object"==typeof u&&!o(u))for(var h in u)e(u[h],h,u)}(a),n||t(a)}}).call(this,n(53))},function(e,t,n){e.exports=n(554),e.exports.parser=n(118)},function(e,t,n){(function(t){var r=n(323),o=n(117),a=n(175)("engine.io-client:socket"),i=n(326),s=n(118),u=n(317),c=n(173);function l(e,n){if(!(this instanceof l))return new l(e,n);n=n||{},e&&"object"==typeof e&&(n=e,e=null),e?(e=u(e),n.hostname=e.host,n.secure="https"===e.protocol||"wss"===e.protocol,n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=u(n.host).host),this.secure=null!=n.secure?n.secure:t.location&&"https:"===location.protocol,n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.agent=n.agent||!1,this.hostname=n.hostname||(t.location?location.hostname:"localhost"),this.port=n.port||(t.location&&location.port?location.port:this.secure?443:80),this.query=n.query||{},"string"==typeof this.query&&(this.query=c.decode(this.query)),this.upgrade=!1!==n.upgrade,this.path=(n.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!n.forceJSONP,this.jsonp=!1!==n.jsonp,this.forceBase64=!!n.forceBase64,this.enablesXDR=!!n.enablesXDR,this.timestampParam=n.timestampParam||"t",this.timestampRequests=n.timestampRequests,this.transports=n.transports||["polling","websocket"],this.transportOptions=n.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=n.policyPort||843,this.rememberUpgrade=n.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=n.onlyBinaryUpgrades,this.perMessageDeflate=!1!==n.perMessageDeflate&&(n.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=n.pfx||null,this.key=n.key||null,this.passphrase=n.passphrase||null,this.cert=n.cert||null,this.ca=n.ca||null,this.ciphers=n.ciphers||null,this.rejectUnauthorized=void 0===n.rejectUnauthorized||n.rejectUnauthorized,this.forceNode=!!n.forceNode;var r="object"==typeof t&&t;r.global===r&&(n.extraHeaders&&Object.keys(n.extraHeaders).length>0&&(this.extraHeaders=n.extraHeaders),n.localAddress&&(this.localAddress=n.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}e.exports=l,l.priorWebsocketSuccess=!1,o(l.prototype),l.protocol=s.protocol,l.Socket=l,l.Transport=n(230),l.transports=n(323),l.parser=n(118),l.prototype.createTransport=function(e){a('creating transport "%s"',e);var t=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(this.query);t.EIO=s.protocol,t.transport=e;var n=this.transportOptions[e]||{};return this.id&&(t.sid=this.id),new r[e]({query:t,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0})},l.prototype.open=function(){var e;if(this.rememberUpgrade&&l.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout((function(){t.emit("error","No transports available")}),0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},l.prototype.setTransport=function(e){a("setting transport %s",e.name);var t=this;this.transport&&(a("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",(function(){t.onDrain()})).on("packet",(function(e){t.onPacket(e)})).on("error",(function(e){t.onError(e)})).on("close",(function(){t.onClose("transport close")}))},l.prototype.probe=function(e){a('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),n=!1,r=this;function o(){if(r.onlyBinaryUpgrades){var o=!this.supportsBinary&&r.transport.supportsBinary;n=n||o}n||(a('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",(function(o){if(!n)if("pong"===o.type&&"probe"===o.data){if(a('probe transport "%s" pong',e),r.upgrading=!0,r.emit("upgrading",t),!t)return;l.priorWebsocketSuccess="websocket"===t.name,a('pausing current transport "%s"',r.transport.name),r.transport.pause((function(){n||"closed"!==r.readyState&&(a("changing transport and sending upgrade packet"),p(),r.setTransport(t),t.send([{type:"upgrade"}]),r.emit("upgrade",t),t=null,r.upgrading=!1,r.flush())}))}else{a('probe transport "%s" failed',e);var i=new Error("probe error");i.transport=t.name,r.emit("upgradeError",i)}})))}function i(){n||(n=!0,p(),t.close(),t=null)}function s(n){var o=new Error("probe error: "+n);o.transport=t.name,i(),a('probe transport "%s" failed because of error: %s',e,n),r.emit("upgradeError",o)}function u(){s("transport closed")}function c(){s("socket closed")}function d(e){t&&e.name!==t.name&&(a('"%s" works - aborting "%s"',e.name,t.name),i())}function p(){t.removeListener("open",o),t.removeListener("error",s),t.removeListener("close",u),r.removeListener("close",c),r.removeListener("upgrading",d)}l.priorWebsocketSuccess=!1,t.once("open",o),t.once("error",s),t.once("close",u),this.once("close",c),this.once("upgrading",d),t.open()},l.prototype.onOpen=function(){if(a("socket open"),this.readyState="open",l.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){a("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},l.prototype.onPacket=function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(a('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else a('packet received with socket readyState "%s"',this.readyState)},l.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},l.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout((function(){"closed"!==t.readyState&&t.onClose("ping timeout")}),e||t.pingInterval+t.pingTimeout)},l.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout((function(){a("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)}),e.pingInterval)},l.prototype.ping=function(){var e=this;this.sendPacket("ping",(function(){e.emit("ping")}))},l.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},l.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(a("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},l.prototype.write=l.prototype.send=function(e,t,n){return this.sendPacket("message",e,t,n),this},l.prototype.sendPacket=function(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var o={type:e,data:t,options:n};this.emit("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}},l.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var e=this;this.writeBuffer.length?this.once("drain",(function(){this.upgrading?r():t()})):this.upgrading?r():t()}function t(){e.onClose("forced close"),a("socket closing - telling transport to close"),e.transport.close()}function n(){e.removeListener("upgrade",n),e.removeListener("upgradeError",n),t()}function r(){e.once("upgrade",n),e.once("upgradeError",n)}return this},l.prototype.onError=function(e){a("socket error %j",e),l.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},l.prototype.onClose=function(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){a('socket close with reason: "%s"',e);clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),this.writeBuffer=[],this.prevBufferLen=0}},l.prototype.filterUpgrades=function(e){for(var t=[],n=0,r=e.length;n<r;n++)~i(this.transports,e[n])&&t.push(e[n]);return t}}).call(this,n(53))},function(e,t){try{e.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){e.exports=!1}},function(e,t,n){(function(t){var r=n(229),o=n(324),a=n(117),i=n(174),s=n(175)("engine.io-client:polling-xhr");function u(){}function c(e){if(o.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,t.location){var n="https:"===location.protocol,r=location.port;r||(r=n?443:80),this.xd=e.hostname!==t.location.hostname||r!==e.port,this.xs=e.secure!==n}}function l(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}function d(){for(var e in l.requests)l.requests.hasOwnProperty(e)&&l.requests[e].abort()}e.exports=c,e.exports.Request=l,i(c,o),c.prototype.supportsBinary=!0,c.prototype.request=function(e){return(e=e||{}).uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new l(e)},c.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,r=this.request({method:"POST",data:e,isBinary:n}),o=this;r.on("success",t),r.on("error",(function(e){o.onError("xhr post error",e)})),this.sendXhr=r},c.prototype.doPoll=function(){s("xhr poll");var e=this.request(),t=this;e.on("data",(function(e){t.onData(e)})),e.on("error",(function(e){t.onError("xhr poll error",e)})),this.pollXhr=e},a(l.prototype),l.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var n=this.xhr=new r(e),o=this;try{s("xhr open %s: %s",this.method,this.uri),n.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var a in n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(a)&&n.setRequestHeader(a,this.extraHeaders[a])}catch(e){}if("POST"===this.method)try{this.isBinary?n.setRequestHeader("Content-type","application/octet-stream"):n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{n.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in n&&(n.withCredentials=!0),this.requestTimeout&&(n.timeout=this.requestTimeout),this.hasXDR()?(n.onload=function(){o.onLoad()},n.onerror=function(){o.onError(n.responseText)}):n.onreadystatechange=function(){if(2===n.readyState)try{var e=n.getResponseHeader("Content-Type");o.supportsBinary&&"application/octet-stream"===e&&(n.responseType="arraybuffer")}catch(e){}4===n.readyState&&(200===n.status||1223===n.status?o.onLoad():setTimeout((function(){o.onError(n.status)}),0))},s("xhr data %s",this.data),n.send(this.data)}catch(e){return void setTimeout((function(){o.onError(e)}),0)}t.document&&(this.index=l.requestsCount++,l.requests[this.index]=this)},l.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},l.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},l.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},l.prototype.cleanup=function(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=u:this.xhr.onreadystatechange=u,e)try{this.xhr.abort()}catch(e){}t.document&&delete l.requests[this.index],this.xhr=null}},l.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch(e){}e="application/octet-stream"===t&&this.xhr.response||this.xhr.responseText}catch(e){this.onError(e)}null!=e&&this.onData(e)},l.prototype.hasXDR=function(){return void 0!==t.XDomainRequest&&!this.xs&&this.enablesXDR},l.prototype.abort=function(){this.cleanup()},l.requestsCount=0,l.requests={},t.document&&(t.attachEvent?t.attachEvent("onunload",d):t.addEventListener&&t.addEventListener("beforeunload",d,!1))}).call(this,n(53))},function(e,t){e.exports=Object.keys||function(e){var t=[],n=Object.prototype.hasOwnProperty;for(var r in e)n.call(e,r)&&t.push(r);return t}},function(e,t){e.exports=function(e,t,n){var r=e.byteLength;if(t=t||0,n=n||r,e.slice)return e.slice(t,n);if(t<0&&(t+=r),n<0&&(n+=r),n>r&&(n=r),t>=r||t>=n||0===r)return new ArrayBuffer(0);for(var o=new Uint8Array(e),a=new Uint8Array(n-t),i=t,s=0;i<n;i++,s++)a[s]=o[i];return a.buffer}},function(e,t){function n(){}e.exports=function(e,t,r){var o=!1;return r=r||n,a.count=e,0===e?t():a;function a(e,n){if(a.count<=0)throw new Error("after called too many times");--a.count,e?(o=!0,t(e),t=r):0!==a.count||o||t(null,n)}}},function(e,t){
+/*! https://mths.be/utf8js v2.1.2 by @mathias */
+var n,r,o,a=String.fromCharCode;function i(e){for(var t,n,r=[],o=0,a=e.length;o<a;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<a?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function s(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function u(e,t){return a(e>>t&63|128)}function c(e,t){if(0==(4294967168&e))return a(e);var n="";return 0==(4294965248&e)?n=a(e>>6&31|192):0==(4294901760&e)?(s(e,t)||(e=65533),n=a(e>>12&15|224),n+=u(e,6)):0==(4292870144&e)&&(n=a(e>>18&7|240),n+=u(e,12),n+=u(e,6)),n+=a(63&e|128)}function l(){if(o>=r)throw Error("Invalid byte index");var e=255&n[o];if(o++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function d(e){var t,a;if(o>r)throw Error("Invalid byte index");if(o==r)return!1;if(t=255&n[o],o++,0==(128&t))return t;if(192==(224&t)){if((a=(31&t)<<6|l())>=128)return a;throw Error("Invalid continuation byte")}if(224==(240&t)){if((a=(15&t)<<12|l()<<6|l())>=2048)return s(a,e)?a:65533;throw Error("Invalid continuation byte")}if(240==(248&t)&&(a=(7&t)<<18|l()<<12|l()<<6|l())>=65536&&a<=1114111)return a;throw Error("Invalid UTF-8 detected")}e.exports={version:"2.1.2",encode:function(e,t){for(var n=!1!==(t=t||{}).strict,r=i(e),o=r.length,a=-1,s="";++a<o;)s+=c(r[a],n);return s},decode:function(e,t){var s=!1!==(t=t||{}).strict;n=i(e),r=n.length,o=0;for(var u,c=[];!1!==(u=d(s));)c.push(u);return function(e){for(var t,n=e.length,r=-1,o="";++r<n;)(t=e[r])>65535&&(o+=a((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=a(t);return o}(c)}}},function(e,t){!function(){"use strict";for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),r=0;r<e.length;r++)n[e.charCodeAt(r)]=r;t.encode=function(t){var n,r=new Uint8Array(t),o=r.length,a="";for(n=0;n<o;n+=3)a+=e[r[n]>>2],a+=e[(3&r[n])<<4|r[n+1]>>4],a+=e[(15&r[n+1])<<2|r[n+2]>>6],a+=e[63&r[n+2]];return o%3==2?a=a.substring(0,a.length-1)+"=":o%3==1&&(a=a.substring(0,a.length-2)+"=="),a},t.decode=function(e){var t,r,o,a,i,s=.75*e.length,u=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var l=new ArrayBuffer(s),d=new Uint8Array(l);for(t=0;t<u;t+=4)r=n[e.charCodeAt(t)],o=n[e.charCodeAt(t+1)],a=n[e.charCodeAt(t+2)],i=n[e.charCodeAt(t+3)],d[c++]=r<<2|o>>4,d[c++]=(15&o)<<4|a>>2,d[c++]=(3&a)<<6|63&i;return l}}()},function(e,t){var n=void 0!==n?n:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,r=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),o=r&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),a=n&&n.prototype.append&&n.prototype.getBlob;function i(e){return e.map((function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var n=new Uint8Array(e.byteLength);n.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=n.buffer}return t}return e}))}function s(e,t){t=t||{};var r=new n;return i(e).forEach((function(e){r.append(e)})),t.type?r.getBlob(t.type):r.getBlob()}function u(e,t){return new Blob(i(e),t||{})}"undefined"!=typeof Blob&&(s.prototype=Blob.prototype,u.prototype=Blob.prototype),e.exports=r?o?Blob:u:a?s:void 0},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,o=+new Date,a=o-(n||o);e.diff=a,e.prev=n,e.curr=o,n=o;for(var i=new Array(arguments.length),s=0;s<i.length;s++)i[s]=arguments[s];i[0]=t.coerce(i[0]),"string"!=typeof i[0]&&i.unshift("%O");var u=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var o=t.formatters[r];if("function"==typeof o){var a=i[u];n=o.call(e,a),i.splice(u,1),u--}return n})),t.formatArgs.call(e,i);var c=r.log||t.log||console.log.bind(console);c.apply(e,i)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),r.destroy=o,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function o(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var a=t.instances[n];a.enabled=t.enabled(a.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(227),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t,n){(function(t){var r=n(324),o=n(174);e.exports=c;var a,i=/\n/g,s=/\\n/g;function u(){}function c(e){r.call(this,e),this.query=this.query||{},a||(t.___eio||(t.___eio=[]),a=t.___eio),this.index=a.length;var n=this;a.push((function(e){n.onData(e)})),this.query.j=this.index,t.document&&t.addEventListener&&t.addEventListener("beforeunload",(function(){n.script&&(n.script.onerror=u)}),!1)}o(c,r),c.prototype.supportsBinary=!1,c.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),r.prototype.doClose.call(this)},c.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(t,n):(document.head||document.body).appendChild(t),this.script=t,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout((function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)}),100)},c.prototype.doWrite=function(e,t){var n=this;if(!this.form){var r,o=document.createElement("form"),a=document.createElement("textarea"),u=this.iframeId="eio_iframe_"+this.index;o.className="socketio",o.style.position="absolute",o.style.top="-1000px",o.style.left="-1000px",o.target=u,o.method="POST",o.setAttribute("accept-charset","utf-8"),a.name="d",o.appendChild(a),document.body.appendChild(o),this.form=o,this.area=a}function c(){l(),t()}function l(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(e){n.onError("jsonp polling iframe removal error",e)}try{var e='<iframe src="javascript:0" name="'+n.iframeId+'">';r=document.createElement(e)}catch(e){(r=document.createElement("iframe")).name=n.iframeId,r.src="javascript:0"}r.id=n.iframeId,n.form.appendChild(r),n.iframe=r}this.form.action=this.uri(),l(),e=e.replace(s,"\\\n"),this.area.value=e.replace(i,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&c()}:this.iframe.onload=c}}).call(this,n(53))},function(e,t,n){(function(t){var r,o=n(230),a=n(118),i=n(173),s=n(174),u=n(325),c=n(175)("engine.io-client:websocket"),l=t.WebSocket||t.MozWebSocket;if("undefined"==typeof window)try{r=n(566)}catch(e){}var d=l;function p(e){e&&e.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=l&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(d=r),o.call(this,e)}d||"undefined"!=typeof window||(d=r),e.exports=p,s(p,o),p.prototype.name="websocket",p.prototype.supportsBinary=!0,p.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket?t?new d(e,t):new d(e):new d(e,t,n)}catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},p.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},p.prototype.write=function(e){var n=this;this.writable=!1;for(var r=e.length,o=0,i=r;o<i;o++)!function(e){a.encodePacket(e,n.supportsBinary,(function(o){if(!n.usingBrowserWebSocket){var a={};if(e.options&&(a.compress=e.options.compress),n.perMessageDeflate)("string"==typeof o?t.Buffer.byteLength(o):o.length)<n.perMessageDeflate.threshold&&(a.compress=!1)}try{n.usingBrowserWebSocket?n.ws.send(o):n.ws.send(o,a)}catch(e){c("websocket closed before onclose event")}--r||s()}))}(e[o]);function s(){n.emit("flush"),setTimeout((function(){n.writable=!0,n.emit("drain")}),0)}},p.prototype.onClose=function(){o.prototype.onClose.call(this)},p.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},p.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";return this.port&&("wss"===t&&443!==Number(this.port)||"ws"===t&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=u()),this.supportsBinary||(e.b64=1),(e=i.encode(e)).length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e},p.prototype.check=function(){return!(!d||"__initialize"in d&&this.name===p.prototype.name)}}).call(this,n(53))},function(e,t){},function(e,t){e.exports=function(e,t){for(var n=[],r=(t=t||0)||0;r<e.length;r++)n[r-t]=e[r];return n}},function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},function(e,t,n){var r=n(570);e.exports=r},function(e,t,n){var r=n(34),o=n(571),a=Array.prototype;e.exports=function(e){var t=e.some;return e===a||r(a,e)&&t===a.some?o:t}},function(e,t,n){n(572);var r=n(51);e.exports=r("Array").some},function(e,t,n){"use strict";var r=n(15),o=n(83).some;r({target:"Array",proto:!0,forced:!n(224)("some")},{some:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){n(330);var r=n(21);e.exports=r.setTimeout},function(e,t,n){var r=n(575);e.exports=r},function(e,t,n){var r=n(34),o=n(576),a=Array.prototype;e.exports=function(e){var t=e.filter;return e===a||r(a,e)&&t===a.filter?o:t}},function(e,t,n){n(577);var r=n(51);e.exports=r("Array").filter},function(e,t,n){"use strict";var r=n(15),o=n(83).filter;r({target:"Array",proto:!0,forced:!n(160)("filter")},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){n(330);var r=n(21);e.exports=r.setInterval},function(e,t,n){var r=n(580);n(66),e.exports=r},function(e,t,n){n(71),n(82),n(581),n(109);var r=n(21);e.exports=r.Set},function(e,t,n){"use strict";n(165)("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),n(315))},function(e,t,n){var r=n(583);e.exports=r},function(e,t,n){n(584);var r=n(21);e.exports=r.Reflect.construct},function(e,t,n){var r=n(15),o=n(56),a=n(98),i=n(316),s=n(302),u=n(47),c=n(26),l=n(94),d=n(20),p=o("Reflect","construct"),h=Object.prototype,f=[].push,m=d((function(){function e(){}return!(p((function(){}),[],e)instanceof e)})),g=!d((function(){p((function(){}))})),b=m||g;r({target:"Reflect",stat:!0,forced:b,sham:b},{construct:function(e,t){s(e),u(t);var n=arguments.length<3?e:s(arguments[2]);if(g&&!m)return p(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return a(f,r,t),new(a(i,e,r))}var o=n.prototype,d=l(c(o)?o:h),b=a(e,d,t);return c(b)?b:d}})},function(e,t,n){e.exports=n(586)},function(e,t,n){var r=n(587);e.exports=r},function(e,t,n){var r=n(588);e.exports=r},function(e,t,n){var r=n(589);e.exports=r},function(e,t,n){n(590);var r=n(21);e.exports=r.Reflect.get},function(e,t,n){var r=n(15),o=n(50),a=n(26),i=n(47),s=n(591),u=n(78),c=n(136);r({target:"Reflect",stat:!0},{get:function e(t,n){var r,l,d=arguments.length<3?t:arguments[2];return i(t)===d?t[n]:(r=u.f(t,n))?s(r)?r.value:void 0===r.get?void 0:o(r.get,d):a(l=c(t))?e(l,n,d):void 0}})},function(e,t,n){var r=n(33);e.exports=function(e){return void 0!==e&&(r(e,"value")||r(e,"writable"))}},function(e,t,n){e.exports=n(593)},function(e,t,n){var r=n(594);e.exports=r},function(e,t,n){var r=n(595);e.exports=r},function(e,t,n){var r=n(596);e.exports=r},function(e,t,n){n(597);var r=n(21).Object,o=e.exports=function(e,t){return r.getOwnPropertyDescriptor(e,t)};r.getOwnPropertyDescriptor.sham&&(o.sham=!0)},function(e,t,n){var r=n(15),o=n(20),a=n(65),i=n(78).f,s=n(39),u=o((function(){i(1)}));r({target:"Object",stat:!0,forced:!s||u,sham:!s},{getOwnPropertyDescriptor:function(e,t){return i(a(e),t)}})},function(e,t,n){var r=n(48);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(600);e.exports=r},function(e,t,n){var r=n(601);e.exports=r},function(e,t,n){var r=n(602);e.exports=r},function(e,t,n){n(603);var r=n(21);e.exports=r.Object.setPrototypeOf},function(e,t,n){n(15)({target:"Object",stat:!0},{setPrototypeOf:n(164)})},function(e,t,n){e.exports=n(605)},function(e,t,n){var r=n(606);e.exports=r},function(e,t,n){var r=n(607);e.exports=r},function(e,t,n){var r=n(608);e.exports=r},function(e,t,n){n(609);var r=n(21);e.exports=r.Object.getPrototypeOf},function(e,t,n){var r=n(15),o=n(20),a=n(80),i=n(136),s=n(292);r({target:"Object",stat:!0,forced:o((function(){i(1)})),sham:!s},{getPrototypeOf:function(e){return i(a(e))}})},function(e,t,n){e.exports=n(611)},function(e,t,n){var r=n(612);e.exports=r},function(e,t,n){var r=n(613);e.exports=r},function(e,t,n){var r=n(614);e.exports=r},function(e,t,n){n(615);var r=n(21).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){n(15)({target:"Object",stat:!0,sham:!n(39)},{create:n(94)})},function(e,t,n){var r=n(331);function o(t,n){return e.exports=o=r||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,o(t,n)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(618);e.exports=r},function(e,t,n){var r=n(34),o=n(619),a=Array.prototype;e.exports=function(e){var t=e.map;return e===a||r(a,e)&&t===a.map?o:t}},function(e,t,n){n(620);var r=n(51);e.exports=r("Array").map},function(e,t,n){"use strict";var r=n(15),o=n(83).map;r({target:"Array",proto:!0,forced:!n(160)("map")},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(115).f,o=n(75),a=n(57)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},function(e,t,n){var r=n(25),o=n(49),a=n(854);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return o(n),a(r),t?e(n,r):n.__proto__=r,n}}():void 0)},function(e,t,n){var r=n(25),o=n(218),a=r(r.bind);e.exports=function(e,t){return o(e),void 0===t?e:a?a(e,t):function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(148),o=n(16);e.exports="process"==r(o.process)},,,function(e,t){e.exports=r;var n=null;try{n=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function r(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function o(e){return!0===(e&&e.__isLong__)}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=o;var a={},i={};function s(e,t){var n,r,o;return t?(o=0<=(e>>>=0)&&e<256)&&(r=i[e])?r:(n=c(e,(0|e)<0?-1:0,!0),o&&(i[e]=n),n):(o=-128<=(e|=0)&&e<128)&&(r=a[e])?r:(n=c(e,e<0?-1:0,!1),o&&(a[e]=n),n)}function u(e,t){if(isNaN(e))return t?y:b;if(t){if(e<0)return y;if(e>=f)return k}else{if(e<=-m)return S;if(e+1>=m)return O}return e<0?u(-e,t).neg():c(e%h|0,e/h|0,t)}function c(e,t,n){return new r(e,t,n)}r.fromInt=s,r.fromNumber=u,r.fromBits=c;var l=Math.pow;function d(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return b;if("number"==typeof t?(n=t,t=!1):t=!!t,(n=n||10)<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return d(e.substring(1),t,n).neg();for(var o=u(l(n,8)),a=b,i=0;i<e.length;i+=8){var s=Math.min(8,e.length-i),c=parseInt(e.substring(i,i+s),n);if(s<8){var p=u(l(n,s));a=a.mul(p).add(u(c))}else a=(a=a.mul(o)).add(u(c))}return a.unsigned=t,a}function p(e,t){return"number"==typeof e?u(e,t):"string"==typeof e?d(e,t):c(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}r.fromString=d,r.fromValue=p;var h=4294967296,f=h*h,m=f/2,g=s(1<<24),b=s(0);r.ZERO=b;var y=s(0,!0);r.UZERO=y;var v=s(1);r.ONE=v;var x=s(1,!0);r.UONE=x;var w=s(-1);r.NEG_ONE=w;var O=c(-1,2147483647,!1);r.MAX_VALUE=O;var k=c(-1,-1,!0);r.MAX_UNSIGNED_VALUE=k;var S=c(0,-2147483648,!1);r.MIN_VALUE=S;var T=r.prototype;T.toInt=function(){return this.unsigned?this.low>>>0:this.low},T.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},T.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(S)){var t=u(e),n=this.div(t),r=n.mul(t).sub(this);return n.toString(e)+r.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var o=u(l(e,6),this.unsigned),a=this,i="";;){var s=a.div(o),c=(a.sub(s.mul(o)).toInt()>>>0).toString(e);if((a=s).isZero())return c+i;for(;c.length<6;)c="0"+c;i=""+c+i}},T.getHighBits=function(){return this.high},T.getHighBitsUnsigned=function(){return this.high>>>0},T.getLowBits=function(){return this.low},T.getLowBitsUnsigned=function(){return this.low>>>0},T.getNumBitsAbs=function(){if(this.isNegative())return this.eq(S)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},T.isZero=function(){return 0===this.high&&0===this.low},T.eqz=T.isZero,T.isNegative=function(){return!this.unsigned&&this.high<0},T.isPositive=function(){return this.unsigned||this.high>=0},T.isOdd=function(){return 1==(1&this.low)},T.isEven=function(){return 0==(1&this.low)},T.equals=function(e){return o(e)||(e=p(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},T.eq=T.equals,T.notEquals=function(e){return!this.eq(e)},T.neq=T.notEquals,T.ne=T.notEquals,T.lessThan=function(e){return this.comp(e)<0},T.lt=T.lessThan,T.lessThanOrEqual=function(e){return this.comp(e)<=0},T.lte=T.lessThanOrEqual,T.le=T.lessThanOrEqual,T.greaterThan=function(e){return this.comp(e)>0},T.gt=T.greaterThan,T.greaterThanOrEqual=function(e){return this.comp(e)>=0},T.gte=T.greaterThanOrEqual,T.ge=T.greaterThanOrEqual,T.compare=function(e){if(o(e)||(e=p(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},T.comp=T.compare,T.negate=function(){return!this.unsigned&&this.eq(S)?S:this.not().add(v)},T.neg=T.negate,T.add=function(e){o(e)||(e=p(e));var t=this.high>>>16,n=65535&this.high,r=this.low>>>16,a=65535&this.low,i=e.high>>>16,s=65535&e.high,u=e.low>>>16,l=0,d=0,h=0,f=0;return h+=(f+=a+(65535&e.low))>>>16,d+=(h+=r+u)>>>16,l+=(d+=n+s)>>>16,l+=t+i,c((h&=65535)<<16|(f&=65535),(l&=65535)<<16|(d&=65535),this.unsigned)},T.subtract=function(e){return o(e)||(e=p(e)),this.add(e.neg())},T.sub=T.subtract,T.multiply=function(e){if(this.isZero())return b;if(o(e)||(e=p(e)),n)return c(n.mul(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned);if(e.isZero())return b;if(this.eq(S))return e.isOdd()?S:b;if(e.eq(S))return this.isOdd()?S:b;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(g)&&e.lt(g))return u(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,r=65535&this.high,a=this.low>>>16,i=65535&this.low,s=e.high>>>16,l=65535&e.high,d=e.low>>>16,h=65535&e.low,f=0,m=0,y=0,v=0;return y+=(v+=i*h)>>>16,m+=(y+=a*h)>>>16,y&=65535,m+=(y+=i*d)>>>16,f+=(m+=r*h)>>>16,m&=65535,f+=(m+=a*d)>>>16,m&=65535,f+=(m+=i*l)>>>16,f+=t*h+r*d+a*l+i*s,c((y&=65535)<<16|(v&=65535),(f&=65535)<<16|(m&=65535),this.unsigned)},T.mul=T.multiply,T.divide=function(e){if(o(e)||(e=p(e)),e.isZero())throw Error("division by zero");var t,r,a;if(n)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?c((this.unsigned?n.div_u:n.div_s)(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?y:b;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return y;if(e.gt(this.shru(1)))return x;a=y}else{if(this.eq(S))return e.eq(v)||e.eq(w)?S:e.eq(S)?v:(t=this.shr(1).div(e).shl(1)).eq(b)?e.isNegative()?v:w:(r=this.sub(e.mul(t)),a=t.add(r.div(e)));if(e.eq(S))return this.unsigned?y:b;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();a=b}for(r=this;r.gte(e);){t=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));for(var i=Math.ceil(Math.log(t)/Math.LN2),s=i<=48?1:l(2,i-48),d=u(t),h=d.mul(e);h.isNegative()||h.gt(r);)h=(d=u(t-=s,this.unsigned)).mul(e);d.isZero()&&(d=v),a=a.add(d),r=r.sub(h)}return a},T.div=T.divide,T.modulo=function(e){return o(e)||(e=p(e)),n?c((this.unsigned?n.rem_u:n.rem_s)(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},T.mod=T.modulo,T.rem=T.modulo,T.not=function(){return c(~this.low,~this.high,this.unsigned)},T.and=function(e){return o(e)||(e=p(e)),c(this.low&e.low,this.high&e.high,this.unsigned)},T.or=function(e){return o(e)||(e=p(e)),c(this.low|e.low,this.high|e.high,this.unsigned)},T.xor=function(e){return o(e)||(e=p(e)),c(this.low^e.low,this.high^e.high,this.unsigned)},T.shiftLeft=function(e){return o(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?c(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):c(0,this.low<<e-32,this.unsigned)},T.shl=T.shiftLeft,T.shiftRight=function(e){return o(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?c(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):c(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},T.shr=T.shiftRight,T.shiftRightUnsigned=function(e){if(o(e)&&(e=e.toInt()),0===(e&=63))return this;var t=this.high;return e<32?c(this.low>>>e|t<<32-e,t>>>e,this.unsigned):c(32===e?t:t>>>e-32,0,this.unsigned)},T.shru=T.shiftRightUnsigned,T.shr_u=T.shiftRightUnsigned,T.toSigned=function(){return this.unsigned?c(this.low,this.high,!1):this},T.toUnsigned=function(){return this.unsigned?this:c(this.low,this.high,!0)},T.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},T.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},T.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},r.fromBytes=function(e,t,n){return n?r.fromBytesLE(e,t):r.fromBytesBE(e,t)},r.fromBytesLE=function(e,t){return new r(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},r.fromBytesBE=function(e,t){return new r(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return ce})),n.d(t,"b",(function(){return st}));var r=n(754),o=n(142),a=n(0),i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function s(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function c(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}var d=["nose","left_eye","right_eye","left_ear","right_ear","left_shoulder","right_shoulder","left_elbow","right_elbow","left_wrist","right_wrist","left_hip","right_hip","left_knee","right_knee","left_ankle","right_ankle"],p=["nose","left_eye_inner","left_eye","left_eye_outer","right_eye_inner","right_eye","right_eye_outer","left_ear","right_ear","mouth_left","mouth_right","left_shoulder","right_shoulder","left_elbow","right_elbow","left_wrist","right_wrist","left_pinky","right_pinky","left_index","right_index","left_thumb","right_thumb","left_hip","right_hip","left_knee","right_knee","left_ankle","right_ankle","left_heel","right_heel","left_foot_index","right_foot_index"],h={left:[1,2,3,7,9,11,13,15,17,19,21,23,25,27,29,31],right:[4,5,6,8,10,12,14,16,18,20,22,24,26,28,30,32],middle:[0]},f={left:[1,3,5,7,9,11,13,15],right:[2,4,6,8,10,12,14,16],middle:[0]},m=[[0,1],[0,2],[1,3],[2,4],[5,6],[5,7],[5,11],[6,8],[6,12],[7,9],[8,10],[11,12],[11,13],[12,14],[13,15],[14,16]],g=[[0,1],[0,4],[1,2],[2,3],[3,7],[4,5],[5,6],[6,8],[9,10],[11,12],[11,13],[11,23],[12,14],[14,16],[12,24],[13,15],[15,17],[16,18],[16,20],[15,17],[15,19],[15,21],[16,22],[17,19],[18,20],[23,25],[23,24],[24,26],[25,27],[26,28],[27,29],[28,30],[27,31],[28,32],[29,31],[30,32]],b={runtime:"mediapipe",enableSmoothing:!0,modelType:"full"},y=function(){function e(e){var t,n=this;switch(this.width=0,this.height=0,this.selfieMode=!1,this.poseSolution=new r.Pose({locateFile:function(t,n){return e.solutionPath?e.solutionPath.replace(/\/+$/,"")+"/"+t:n+"/"+t}}),e.modelType){case"lite":t=0;break;case"heavy":t=2;break;case"full":default:t=1}this.poseSolution.setOptions({modelComplexity:t,smoothLandmarks:e.enableSmoothing||!0,selfieMode:this.selfieMode}),this.poseSolution.onResults((function(e){n.height=e.image.height,n.width=e.image.width,null==e.poseLandmarks?n.poses=[]:n.poses=[n.translateOutput(e.poseLandmarks,e.poseWorldLandmarks)]}))}return e.prototype.translateOutput=function(e,t){var n=this,r={keypoints:e.map((function(e,t){return{x:e.x*n.width,y:e.y*n.height,z:e.z,score:e.visibility,name:p[t]}}))};return null!=t&&(r.keypoints3D=t.map((function(e,t){return{x:e.x,y:e.y,z:e.z,score:e.visibility,name:p[t]}}))),r},e.prototype.estimatePoses=function(e,t,n){return c(this,void 0,void 0,(function(){return l(this,(function(r){switch(r.label){case 0:return t&&t.flipHorizontal&&t.flipHorizontal!==this.selfieMode&&(this.selfieMode=t.flipHorizontal,this.poseSolution.setOptions({selfieMode:this.selfieMode})),[4,this.poseSolution.send({image:e},n)];case 1:return r.sent(),[2,this.poses]}}))}))},e.prototype.dispose=function(){this.poseSolution.close()},e.prototype.reset=function(){this.poseSolution.reset()},e.prototype.initialize=function(){return this.poseSolution.initialize()},e}();function v(e){return c(this,void 0,void 0,(function(){var t,n;return l(this,(function(r){switch(r.label){case 0:return t=function(e){if(null==e)return u({},b);var t=u({},e);return t.runtime="mediapipe",null==t.enableSmoothing&&(t.enableSmoothing=b.enableSmoothing),null==t.modelType&&(t.modelType=b.modelType),t}(e),[4,(n=new y(t)).initialize()];case 1:return r.sent(),[2,n]}}))}))}function x(e){return e instanceof a.Zc?{height:e.shape[0],width:e.shape[1]}:{height:e.height,width:e.width}}function w(e){return e-2*Math.PI*Math.floor((e+Math.PI)/(2*Math.PI))}function O(e){return e instanceof a.Zc?e:a.od.fromPixels(e)}function k(e,t){a.ae.assert(0!==e.width,(function(){return t+" width cannot be 0."})),a.ae.assert(0!==e.height,(function(){return t+" height cannot be 0."}))}function S(e,t,n){var r=t.inputResolution,o=t.keepAspectRatio,i=x(e),s=function(e,t){return t?{xCenter:t.xCenter*e.width,yCenter:t.yCenter*e.height,width:t.width*e.width,height:t.height*e.height,rotation:t.rotation}:{xCenter:.5*e.width,yCenter:.5*e.height,width:e.width,height:e.height,rotation:0}}(i,n),u=function(e,t,n){if(void 0===n&&(n=!1),!n)return{top:0,left:0,right:0,bottom:0};var r=t.height,o=t.width;k(t,"targetSize"),k(e,"roi");var a,i,s=r/o,u=e.height/e.width,c=0,l=0;return s>u?(a=e.width,i=e.width*s,l=(1-u/s)/2):(a=e.height/s,i=e.height,c=(1-s/u)/2),e.width=a,e.height=i,{top:l,left:c,right:c,bottom:l}}(s,r,o);return{imageTensor:Object(a.Xd)((function(){var t=O(e),n=Object(a.Wd)(function(e,t,n,r){k(r,"inputResolution");var o=1/t.width,a=1/t.height,i=e.xCenter,s=e.yCenter,u=Math.cos(e.rotation),c=Math.sin(e.rotation),l=e.width,d=e.height;return[1/r.width*l*u*1*o*t.width,1/r.height*-d*c*o*t.width,(-.5*l*u*1+.5*d*c+i)*o*t.width,1/r.width*l*c*1*a*t.height,1/r.height*d*u*a*t.height,(-.5*d*u-.5*l*c*1+s)*a*t.height,0,0]}(s,i,0,r),[1,8]);return a.Dd.transform(Object(a.Bd)(Object(a.qd)(t,"float32")),n,"bilinear","nearest",0,[r.height,r.width])})),padding:u}}function T(e){return null!=e&&null!=e.currentTime}var C=function(){function e(e){this.alpha=e,this.initialized=!1}return e.prototype.apply=function(e,t){var n;return this.initialized?n=null==t?this.storedValue+this.alpha*(e-this.storedValue):this.storedValue+this.alpha*t*Math.asinh((e-this.storedValue)/t):(n=e,this.initialized=!0),this.rawValue=e,this.storedValue=n,n},e.prototype.applyWithAlpha=function(e,t,n){return this.alpha=t,this.apply(e,n)},e.prototype.hasLastRawValue=function(){return this.initialized},e.prototype.lastRawValue=function(){return this.rawValue},e.prototype.reset=function(){this.initialized=!1},e}(),E=function(){function e(e){this.frequency=e.frequency,this.minCutOff=e.minCutOff,this.beta=e.beta,this.thresholdCutOff=e.thresholdCutOff,this.thresholdBeta=e.thresholdBeta,this.derivateCutOff=e.derivateCutOff,this.x=new C(this.getAlpha(this.minCutOff)),this.dx=new C(this.getAlpha(this.derivateCutOff)),this.lastTimestamp=0}return e.prototype.apply=function(e,t,n){if(null==e)return e;var r=Math.trunc(t);if(this.lastTimestamp>=r)return e;0!==this.lastTimestamp&&0!==r&&(this.frequency=1/(1e-6*(r-this.lastTimestamp))),this.lastTimestamp=r;var o=this.x.hasLastRawValue()?(e-this.x.lastRawValue())*n*this.frequency:0,a=this.dx.applyWithAlpha(o,this.getAlpha(this.derivateCutOff)),i=this.minCutOff+this.beta*Math.abs(a),s=null!=this.thresholdCutOff?this.thresholdCutOff+this.thresholdBeta*Math.abs(a):null;return this.x.applyWithAlpha(e,this.getAlpha(i),s)},e.prototype.getAlpha=function(e){return 1/(1+this.frequency/(2*Math.PI*e))},e}(),I=function(){function e(e){this.config=e}return e.prototype.apply=function(e,t,n){var r=this;if(null==e)return this.reset(),null;this.initializeFiltersIfEmpty(e);var o=1;if(!this.config.disableValueScaling){if(n<this.config.minAllowedObjectScale)return e.slice();o=1/n}return e.map((function(e,n){var a=u({},e,{x:r.xFilters[n].apply(e.x,t,o),y:r.yFilters[n].apply(e.y,t,o)});return null!=e.z&&(a.z=r.zFilters[n].apply(e.z,t,o)),a}))},e.prototype.reset=function(){this.xFilters=null,this.yFilters=null,this.zFilters=null},e.prototype.initializeFiltersIfEmpty=function(e){var t=this;null!=this.xFilters&&this.xFilters.length===e.length||(this.xFilters=e.map((function(e){return new E(t.config)})),this.yFilters=e.map((function(e){return new E(t.config)})),this.zFilters=e.map((function(e){return new E(t.config)})))},e}();function j(e,t){return e.map((function(e){var n=u({},e,{x:e.x/t.width,y:e.y/t.height});return null!=e.z&&(e.z=e.z/t.width),n}))}var N=function(){function e(e){this.config=e,this.window=[],this.lowPassFilter=new C(1),this.lastValue=0,this.lastValueScale=1,this.lastTimestamp=-1}return e.prototype.apply=function(e,t,n){if(null==e)return e;var r,o=Math.trunc(t);if(this.lastTimestamp>=o)return e;if(-1===this.lastTimestamp)r=1;else{for(var a=e*n-this.lastValue*this.lastValueScale,i=o-this.lastTimestamp,s=a,u=i,c=(1+this.window.length)*(1e6/30),l=0,d=this.window;l<d.length;l++){var p=d[l];if(u+p.duration>c)break;s+=p.distance,u+=p.duration}var h=s/(1e-6*u);r=1-1/(1+this.config.velocityScale*Math.abs(h)),this.window.unshift({distance:a,duration:i}),this.window.length>this.config.windowSize&&this.window.pop()}return this.lastValue=e,this.lastValueScale=n,this.lastTimestamp=o,this.lowPassFilter.applyWithAlpha(e,r)},e}(),A=function(){function e(e){this.config=e}return e.prototype.apply=function(e,t,n){var r=this;if(null==e)return this.reset(),null;var o=1;if(!this.config.disableValueScaling){if(n<this.config.minAllowedObjectScale)return e.slice();o=1/n}return this.initializeFiltersIfEmpty(e),e.map((function(e,n){var a=u({},e,{x:r.xFilters[n].apply(e.x,t,o),y:r.yFilters[n].apply(e.y,t,o)});return null!=e.z&&(a.z=r.zFilters[n].apply(e.z,t,o)),a}))},e.prototype.reset=function(){this.xFilters=null,this.yFilters=null,this.zFilters=null},e.prototype.initializeFiltersIfEmpty=function(e){var t=this;null!=this.xFilters&&this.xFilters.length===e.length||(this.xFilters=e.map((function(e){return new N(t.config)})),this.yFilters=e.map((function(e){return new N(t.config)})),this.zFilters=e.map((function(e){return new N(t.config)})))},e}();function R(e,t){return e.map((function(e){var n=u({},e,{x:e.x*t.width,y:e.y*t.height});return null!=e.z&&(n.z=e.z*t.width),n}))}var _=function(){function e(e){if(null!=e.velocityFilter)this.keypointsFilter=new A(e.velocityFilter);else{if(null==e.oneEuroFilter)throw new Error("Either configure velocityFilter or oneEuroFilter, but got "+e+".");this.keypointsFilter=new I(e.oneEuroFilter)}}return e.prototype.apply=function(e,t,n,r,o){if(void 0===r&&(r=!1),null==e)return this.keypointsFilter.reset(),null;var a=null!=o?function(e,t){return(e.width*t.width+e.height*t.height)/2}(o,n):1,i=r?R(e,n):e,s=this.keypointsFilter.apply(i,t,a);return r?j(s,n):s},e}();function $(e,t){var n=function(e,t,n,r){var o=(r-n)/255;return{scale:o,offset:n-0*o}}(0,0,t[0],t[1]);return Object(a.Xd)((function(){return Object(a.kd)(Object(a.Hd)(e,n.scale),n.offset)}))}function F(e,t,n){var r=n.rotationVectorStartKeypointIndex,o=n.rotationVectorEndKeypointIndex,a=e.locationData,i=a.relativeKeypoints[r].x*t.width,s=a.relativeKeypoints[r].y*t.height,u=a.relativeKeypoints[o].x*t.width,c=a.relativeKeypoints[o].y*t.height,l=2*Math.sqrt((u-i)*(u-i)+(c-s)*(c-s)),d=function(e,t,n){var r,o=e.locationData,a=n.rotationVectorStartKeypointIndex,i=n.rotationVectorEndKeypointIndex;r=n.rotationVectorTargetAngle?n.rotationVectorTargetAngle:Math.PI*n.rotationVectorTargetAngleDegree/180;var s=o.relativeKeypoints[a].x*t.width,u=o.relativeKeypoints[a].y*t.height,c=o.relativeKeypoints[i].x*t.width,l=o.relativeKeypoints[i].y*t.height;return w(r-Math.atan2(-(l-u),c-s))}(e,t,n);return{xCenter:i/t.width,yCenter:s/t.height,width:l/t.width,height:l/t.height,rotation:d}}function D(e,t,n,r){return 1===r?.5*(e+t):e+(t-e)*n/(r-1)}function M(e){for(var t={locationData:{relativeKeypoints:[]}},n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER,o=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,i=0;i<e.length;++i){var s=e[i];n=Math.min(n,s.x),r=Math.max(r,s.x),o=Math.min(o,s.y),a=Math.max(a,s.y),t.locationData.relativeKeypoints.push({x:s.x,y:s.y})}return t.locationData.relativeBoundingBox={xMin:n,yMin:o,xMax:r,yMax:a,width:r-n,height:a-o},t}function P(e,t,n,r){return c(this,void 0,void 0,(function(){var o,i,s,u,c;return l(this,(function(l){switch(l.label){case 0:return o=Object(a.Wd)(e.map((function(e){return[e.locationData.relativeBoundingBox.yMin,e.locationData.relativeBoundingBox.xMin,e.locationData.relativeBoundingBox.yMax,e.locationData.relativeBoundingBox.xMax]}))),i=Object(a.Vd)(e.map((function(e){return e.score[0]}))),[4,a.Dd.nonMaxSuppressionAsync(o,i,t,n,r)];case 1:return[4,(s=l.sent()).array()];case 2:return u=l.sent(),c=e.filter((function(e,t){return u.indexOf(t)>-1})),Object(a.wd)([o,i,s]),[2,c]}}))}))}function L(e,t,n){return c(this,void 0,void 0,(function(){var r,o,i,s,c,d,p,h,f,m,g,b,y,v,x,w,O,k,S,T,C,E,I,j;return l(this,(function(l){switch(l.label){case 0:if(r=Object(a.Qd)(t,[0]),o=r.shape,i=o[0],s=o[1],c=o[2],e.length!==c)throw new Error("Expected heatmap to have same number of channels as the number of landmarks. But got landmarks length: "+e.length+", heatmap length: "+c);return d=[],[4,r.buffer()];case 1:for(p=l.sent(),h=0;h<e.length;h++)if(f=e[h],m=u({},f),d.push(m),g=Math.trunc(m.x*s),b=Math.trunc(m.y*i),!(g<0||g>=s||b<0||g>=i)){for(y=Math.trunc((n.kernelSize-1)/2),v=Math.max(0,g-y),x=Math.min(s,g+y+1),w=Math.max(0,b-y),O=Math.min(i,b+y+1),k=0,S=0,T=0,C=0,E=w;E<O;++E)for(I=v;I<x;++I)j=p.get(E,I,h),k+=j,C=Math.max(C,j),S+=I*j,T+=E*j;C>=n.minConfidenceToRefine&&k>0&&(m.x=S/s/k,m.y=T/i/k)}return r.dispose(),[2,d]}}))}))}function B(e,t,n){return c(this,void 0,void 0,(function(){var r,o,i,s,u;return l(this,(function(c){switch(c.label){case 0:return r=e[0],o=e[1],i=function(e,t,n){return Object(a.Xd)((function(){var r,o,i,s;n.reverseOutputOrder?(o=Object(a.Qd)(Object(a.Od)(e,[0,n.boxCoordOffset+0],[-1,1])),r=Object(a.Qd)(Object(a.Od)(e,[0,n.boxCoordOffset+1],[-1,1])),s=Object(a.Qd)(Object(a.Od)(e,[0,n.boxCoordOffset+2],[-1,1])),i=Object(a.Qd)(Object(a.Od)(e,[0,n.boxCoordOffset+3],[-1,1]))):(r=Object(a.Qd)(Object(a.Od)(e,[0,n.boxCoordOffset+0],[-1,1])),o=Object(a.Qd)(Object(a.Od)(e,[0,n.boxCoordOffset+1],[-1,1])),i=Object(a.Qd)(Object(a.Od)(e,[0,n.boxCoordOffset+2],[-1,1])),s=Object(a.Qd)(Object(a.Od)(e,[0,n.boxCoordOffset+3],[-1,1]))),o=Object(a.kd)(Object(a.Hd)(Object(a.xd)(o,n.xScale),t.w),t.x),r=Object(a.kd)(Object(a.Hd)(Object(a.xd)(r,n.yScale),t.h),t.y),n.applyExponentialOnBoxSize?(i=Object(a.Hd)(Object(a.Ad)(Object(a.xd)(i,n.hScale)),t.h),s=Object(a.Hd)(Object(a.Ad)(Object(a.xd)(s,n.wScale)),t.w)):(i=Object(a.Hd)(Object(a.xd)(i,n.hScale),t.h),s=Object(a.Hd)(Object(a.xd)(s,n.wScale),t.h));var u=Object(a.Sd)(r,Object(a.xd)(i,2)),c=Object(a.Sd)(o,Object(a.xd)(s,2)),l=Object(a.kd)(r,Object(a.xd)(i,2)),d=Object(a.kd)(o,Object(a.xd)(s,2)),p=Object(a.td)([Object(a.Ld)(u,[n.numBoxes,1]),Object(a.Ld)(c,[n.numBoxes,1]),Object(a.Ld)(l,[n.numBoxes,1]),Object(a.Ld)(d,[n.numBoxes,1])],1);if(n.numKeypoints)for(var h=0;h<n.numKeypoints;++h){var f=n.keypointCoordOffset+h*n.numValuesPerKeypoint,m=void 0,g=void 0;n.reverseOutputOrder?(m=Object(a.Qd)(Object(a.Od)(e,[0,f],[-1,1])),g=Object(a.Qd)(Object(a.Od)(e,[0,f+1],[-1,1]))):(g=Object(a.Qd)(Object(a.Od)(e,[0,f],[-1,1])),m=Object(a.Qd)(Object(a.Od)(e,[0,f+1],[-1,1])));var b=Object(a.kd)(Object(a.Hd)(Object(a.xd)(m,n.xScale),t.w),t.x),y=Object(a.kd)(Object(a.Hd)(Object(a.xd)(g,n.yScale),t.h),t.y);p=Object(a.td)([p,Object(a.Ld)(b,[n.numBoxes,1]),Object(a.Ld)(y,[n.numBoxes,1])],1)}return p}))}(o,t,n),s=Object(a.Xd)((function(){var e=r;return n.sigmoidScore?(null!=n.scoreClippingThresh&&(e=Object(a.rd)(r,-n.scoreClippingThresh,n.scoreClippingThresh)),e=Object(a.Nd)(e)):e})),[4,z(i,s,n)];case 1:return u=c.sent(),Object(a.wd)([i,s]),[2,u]}}))}))}function z(e,t,n){return c(this,void 0,void 0,(function(){var r,o,a,i,s,u,c,d,p,h,f,m;return l(this,(function(l){switch(l.label){case 0:return r=[],[4,e.data()];case 1:return o=l.sent(),[4,t.data()];case 2:for(a=l.sent(),i=0;i<n.numBoxes;++i)if(!(null!=n.minScoreThresh&&a[i]<n.minScoreThresh||(s=i*n.numCoords,u=U(o[s+0],o[s+1],o[s+2],o[s+3],a[i],n.flipVertically,i),(c=u.locationData.relativeBoundingBox).width<0||c.height<0))){if(n.numKeypoints>0)for((d=u.locationData).relativeKeypoints=[],p=n.numKeypoints*n.numValuesPerKeypoint,h=0;h<p;h+=n.numValuesPerKeypoint)f=s+n.keypointCoordOffset+h,m={x:o[f+0],y:n.flipVertically?1-o[f+1]:o[f+1]},d.relativeKeypoints.push(m);r.push(u)}return[2,r]}}))}))}function U(e,t,n,r,o,a,i){return{score:[o],ind:i,locationData:{relativeBoundingBox:{xMin:t,yMin:a?1-n:e,xMax:r,yMax:a?1-e:n,width:r-t,height:n-e}}}}function V(e,t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!1),c(this,void 0,void 0,(function(){var o,a,i,s,u,c,d,p;return l(this,(function(l){switch(l.label){case 0:return o=e.size,a=o/t.numLandmarks,[4,e.data()];case 1:for(i=l.sent(),s=[],u=0;u<t.numLandmarks;++u)c=u*a,(p={x:0,y:0}).x=n?t.inputImageWidth-i[c]:i[c],a>1&&(p.y=r?t.inputImageHeight-i[c+1]:i[c+1]),a>2&&(p.z=i[c+2]),a>3&&(p.score=(h=i[c+3],1/(1+Math.exp(-h)))),s.push(p);for(d=0;d<s.length;++d)(p=s[d]).x=p.x/t.inputImageWidth,p.y=p.y/t.inputImageHeight,p.z=p.z/t.inputImageWidth/(t.normalizeZ||1);return[2,s]}var h}))}))}function W(e,t,n){var r=e.width,o=e.height,a=e.rotation;if(null==n.rotation&&null==n.rotationDegree||(a=function(e,t){return null!=t.rotation?e+=t.rotation:null!=t.rotationDegree&&(e+=Math.PI*t.rotationDegree/180),w(e)}(a,n)),0===a)e.xCenter=e.xCenter+r*n.shiftX,e.yCenter=e.yCenter+o*n.shiftY;else{var i=(t.width*r*n.shiftX*Math.cos(a)-t.height*o*n.shiftY*Math.sin(a))/t.width,s=(t.width*r*n.shiftX*Math.sin(a)+t.height*o*n.shiftY*Math.cos(a))/t.height;e.xCenter=e.xCenter+i,e.yCenter=e.yCenter+s}if(n.squareLong){var u=Math.max(r*t.width,o*t.height);r=u/t.width,o=u/t.height}else if(n.squareShort){var c=Math.min(r*t.width,o*t.height);r=c/t.width,o=c/t.height}return e.width=r*n.scaleX,e.height=o*n.scaleY,e}var G=function(){function e(e){this.alpha=e.alpha}return e.prototype.apply=function(e){var t=this;if(null==e)return this.visibilityFilters=null,null;null!=this.visibilityFilters&&this.visibilityFilters.length===e.length||(this.visibilityFilters=e.map((function(e){return new C(t.alpha)})));for(var n=[],r=0;r<e.length;++r){var o=e[r],a=u({},o);a.score=this.visibilityFilters[r].apply(o.score),n.push(a)}return n},e}(),H={reduceBoxesInLowestlayer:!1,interpolatedScaleAspectRatio:1,featureMapHeight:[],featureMapWidth:[],numLayers:5,minScale:.1484375,maxScale:.75,inputSizeHeight:224,inputSizeWidth:224,anchorOffsetX:.5,anchorOffsetY:.5,strides:[8,16,32,32,32],aspectRatios:[1],fixedAnchorSize:!0},q={runtime:"tfjs",modelType:"full",enableSmoothing:!0,detectorModelUrl:"https://tfhub.dev/mediapipe/tfjs-model/blazepose_3d/detector/1",landmarkModelUrl:"https://tfhub.dev/mediapipe/tfjs-model/blazepose_3d/landmark/full/1"},K={maxPoses:1,flipHorizontal:!1},X={applyExponentialOnBoxSize:!1,flipVertically:!1,ignoreClasses:[],numClasses:1,numBoxes:2254,numCoords:12,boxCoordOffset:0,keypointCoordOffset:4,numKeypoints:4,numValuesPerKeypoint:2,sigmoidScore:!0,scoreClippingThresh:100,reverseOutputOrder:!0,xScale:224,yScale:224,hScale:224,wScale:224,minScoreThresh:.5},Y={shiftX:0,shiftY:0,scaleX:1.25,scaleY:1.25,squareLong:!0},Q={inputResolution:{width:224,height:224},keepAspectRatio:!0},Z={inputResolution:{width:256,height:256},keepAspectRatio:!0},J={numLandmarks:39,inputImageWidth:256,inputImageHeight:256},ee={numLandmarks:39,inputImageWidth:1,inputImageHeight:1},te={kernelSize:7,minConfidenceToRefine:.5},ne={alpha:.1},re={oneEuroFilter:{frequency:30,minCutOff:.05,beta:80,derivateCutOff:1,minAllowedObjectScale:1e-6}},oe={oneEuroFilter:{frequency:30,minCutOff:.01,beta:10,derivateCutOff:1,minAllowedObjectScale:1e-6}},ae={oneEuroFilter:{frequency:30,minCutOff:.1,beta:40,derivateCutOff:1,minAllowedObjectScale:1e-6,disableValueScaling:!0}},ie=function(){function e(e,t,n,r){this.detectorModel=e,this.landmarkModel=t,this.enableSmoothing=n,this.modelType=r,this.regionOfInterest=null,this.anchors=function(e){for(var t=[],n=0;n<e.numLayers;){for(var r=[],o=[],a=[],i=[],s=n;s<e.strides.length&&e.strides[s]===e.strides[n];){var u=D(e.minScale,e.maxScale,s,e.strides.length);if(0===s&&e.reduceBoxesInLowestLayer)a.push(1),a.push(2),a.push(.5),i.push(.1),i.push(u),i.push(u);else{for(var c=0;c<e.aspectRatios.length;++c)a.push(e.aspectRatios[c]),i.push(u);if(e.interpolatedScaleAspectRatio>0){var l=s===e.strides.length-1?1:D(e.minScale,e.maxScale,s+1,e.strides.length);i.push(Math.sqrt(u*l)),a.push(e.interpolatedScaleAspectRatio)}}s++}for(var d=0;d<a.length;++d){var p=Math.sqrt(a[d]);r.push(i[d]/p),o.push(i[d]*p)}var h=0,f=0;if(e.featureMapHeight.length>0)h=e.featureMapHeight[n],f=e.featureMapWidth[n];else{var m=e.strides[n];h=Math.ceil(e.inputSizeHeight/m),f=Math.ceil(e.inputSizeWidth/m)}for(var g=0;g<h;++g)for(var b=0;b<f;++b)for(var y=0;y<r.length;++y){var v={xCenter:(b+e.anchorOffsetX)/f,yCenter:(g+e.anchorOffsetY)/h,width:0,height:0};e.fixedAnchorSize?(v.width=1,v.height=1):(v.width=o[y],v.height=r[y]),t.push(v)}n=s}return t}(H);var o=Object(a.Vd)(this.anchors.map((function(e){return e.width}))),i=Object(a.Vd)(this.anchors.map((function(e){return e.height}))),s=Object(a.Vd)(this.anchors.map((function(e){return e.xCenter}))),u=Object(a.Vd)(this.anchors.map((function(e){return e.yCenter})));this.anchorTensor={x:s,y:u,w:o,h:i}}return e.prototype.estimatePoses=function(e,t,n){return c(this,void 0,void 0,(function(){var r,o,i,s,c,d,h,f,m,g,b,y,v,w,k,S,C,E;return l(this,(function(l){switch(l.label){case 0:return r=function(e){var t;if(null==(t=null==e?K:u({},e)).maxPoses&&(t.maxPoses=1),t.maxPoses<=0)throw new Error("Invalid maxPoses "+t.maxPoses+". Should be > 0.");if(t.maxPoses>1)throw new Error("Multi-pose detection is not implemented yet. Please set maxPoses to 1.");return t}(t),null==e?(this.reset(),[2,[]]):(this.maxPoses=r.maxPoses,this.timestamp=null!=n?1e3*n:T(e)?1e6*e.currentTime:null,o=x(e),i=Object(a.Xd)((function(){return Object(a.qd)(O(e),"float32")})),null!=(s=this.regionOfInterest)?[3,2]:[4,this.detectPose(i)]);case 1:if(0===(c=l.sent()).length)return this.reset(),i.dispose(),[2,[]];d=c[0],s=this.poseDetectionToRoi(d,o),l.label=2;case 2:return[4,this.poseLandmarksByRoi(s,i)];case 3:return h=l.sent(),i.dispose(),null==h?(this.reset(),[2,[]]):(f=h.actualLandmarks,m=h.auxiliaryLandmarks,g=h.poseScore,b=h.actualWorldLandmarks,y=this.poseLandmarkFiltering(f,m,b,o),v=y.actualLandmarksFiltered,w=y.auxiliaryLandmarksFiltered,k=y.actualWorldLandmarksFiltered,S=this.poseLandmarksToRoi(w,o),this.regionOfInterest=S,null!=(C=null!=v?R(v,o):null)&&C.forEach((function(e,t){e.name=p[t]})),null!=(E=k)&&E.forEach((function(e,t){e.name=p[t]})),[2,[{score:g,keypoints:C,keypoints3D:E}]])}}))}))},e.prototype.dispose=function(){this.detectorModel.dispose(),this.landmarkModel.dispose(),Object(a.wd)([this.anchorTensor.x,this.anchorTensor.y,this.anchorTensor.w,this.anchorTensor.h])},e.prototype.reset=function(){this.regionOfInterest=null,this.visibilitySmoothingFilterActual=null,this.visibilitySmoothingFilterAuxiliary=null,this.landmarksSmoothingFilterActual=null,this.landmarksSmoothingFilterAuxiliary=null},e.prototype.detectPose=function(e){return c(this,void 0,void 0,(function(){var t,n,r,o,i,s,u,c,d;return l(this,(function(l){switch(l.label){case 0:return t=S(e,Q),n=t.imageTensor,r=t.padding,o=$(n,[-1,1]),i=function(e,t){return Object(a.Xd)((function(){var n=function(e){return Object(a.Xd)((function(){var t=Object(a.Od)(e,[0,0,0],[1,-1,1]);return[Object(a.Nd)(t),Object(a.Od)(e,[0,0,1],[1,-1,-1])]}))}(t.predict(e)),r=n[0],o=n[1];return{boxes:Object(a.Qd)(o),scores:Object(a.Qd)(r)}}))}(o,this.detectorModel),s=i.boxes,[4,B([u=i.scores,s],this.anchorTensor,X)];case 1:return[4,P(l.sent(),this.maxPoses,.3,-1)];case 2:return c=l.sent(),d=function(e,t){void 0===e&&(e=[]);for(var n=t.left,r=t.top,o=t.left+t.right,a=t.top+t.bottom,i=0;i<e.length;i++){var s=e[i],u=s.locationData.relativeBoundingBox,c=(u.xMin-n)/(1-o),l=(u.yMin-r)/(1-a),d=u.width/(1-o),p=u.height/(1-a);u.xMin=c,u.yMin=l,u.width=d,u.height=p;for(var h=0;h<s.locationData.relativeKeypoints.length;++h){var f=s.locationData.relativeKeypoints[h],m=(f.x-n)/(1-o),g=(f.y-r)/(1-a);f.x=m,f.y=g}}return e}(c,r),Object(a.wd)([n,o,u,s]),[2,d]}}))}))},e.prototype.poseDetectionToRoi=function(e,t){return W(F(e,t,{rotationVectorEndKeypointIndex:1,rotationVectorStartKeypointIndex:0,rotationVectorTargetAngleDegree:90}),t,Y)},e.prototype.poseLandmarksByRoi=function(e,t){return c(this,void 0,void 0,(function(){var n,r,o,i,s,c,d,p,h,f,m,g,b,y,v,x,w,O,k,T;return l(this,(function(l){switch(l.label){case 0:if(n=S(t,Z,e),r=n.imageTensor,o=n.padding,i=$(r,[0,1]),"lite"!==this.modelType&&"full"!==this.modelType&&"heavy"!==this.modelType)throw new Error("Model type must be one of lite, full or heavy,but got "+this.modelType);return s=this.landmarkModel.execute(i,["ld_3d","output_poseflag","activation_heatmap","world_3d"]),c=s[0],d=s[1],p=s[2],h=s[3],[4,d.data()];case 1:return(f=l.sent()[0])<.5?(Object(a.wd)(s),Object(a.wd)([r,i]),[2,null]):[4,V(c,J)];case 2:return[4,L(m=l.sent(),p,te)];case 3:return g=l.sent(),b=function(e,t){var n=t.left,r=t.top,o=t.left+t.right,a=t.top+t.bottom;return e.map((function(e){return u({},e,{x:(e.x-n)/(1-o),y:(e.y-r)/(1-a),z:e.z/(1-o)})}))}(g,o),y=function(e,t,n){void 0===n&&(n={ignoreRotation:!1});for(var r=[],o=0,a=e;o<a.length;o++){var i=a[o],s=i.x-.5,c=i.y-.5,l=n.ignoreRotation?0:t.rotation,d=Math.cos(l)*s-Math.sin(l)*c,p=Math.sin(l)*s+Math.cos(l)*c;d=d*t.width+t.xCenter,p=p*t.height+t.yCenter;var h=i.z*t.width,f=u({},i);f.x=d,f.y=p,f.z=h,r.push(f)}return r}(b,e),v=y.slice(0,33),x=y.slice(33,35),[4,V(h,ee)];case 4:return w=l.sent(),O=function(e,t,n){void 0===n&&(n=!0);for(var r=[],o=0;o<e.length;o++){var a=u({},t[o]);n&&(a.score=e[o].score),r.push(a)}return r}(m,w,!0),k=function(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var a=o[r],i=a.x,s=a.y,c=t.rotation,l=Math.cos(c)*i-Math.sin(c)*s,d=Math.sin(c)*i+Math.cos(c)*s,p=u({},a);p.x=l,p.y=d,n.push(p)}return n}(O,e),T=k.slice(0,33),Object(a.wd)(s),Object(a.wd)([r,i]),[2,{actualLandmarks:v,auxiliaryLandmarks:x,poseScore:f,actualWorldLandmarks:T}]}}))}))},e.prototype.poseLandmarksToRoi=function(e,t){return W(F(M(e),t,{rotationVectorStartKeypointIndex:0,rotationVectorEndKeypointIndex:1,rotationVectorTargetAngleDegree:90}),t,Y)},e.prototype.poseLandmarkFiltering=function(e,t,n,r){var o,a,i;if(null!=this.timestamp&&this.enableSmoothing){var s=F(M(t),r,{rotationVectorEndKeypointIndex:0,rotationVectorStartKeypointIndex:1,rotationVectorTargetAngleDegree:90});null==this.visibilitySmoothingFilterActual&&(this.visibilitySmoothingFilterActual=new G(ne)),o=this.visibilitySmoothingFilterActual.apply(e),null==this.visibilitySmoothingFilterAuxiliary&&(this.visibilitySmoothingFilterAuxiliary=new G(ne)),a=this.visibilitySmoothingFilterAuxiliary.apply(t),i=this.visibilitySmoothingFilterActual.apply(n),null==this.landmarksSmoothingFilterActual&&(this.landmarksSmoothingFilterActual=new _(re)),o=this.landmarksSmoothingFilterActual.apply(o,this.timestamp,r,!0,s),null==this.landmarksSmoothingFilterAuxiliary&&(this.landmarksSmoothingFilterAuxiliary=new _(oe)),a=this.landmarksSmoothingFilterAuxiliary.apply(a,this.timestamp,r,!0,s),null==this.worldLandmarksSmoothingFilterActual&&(this.worldLandmarksSmoothingFilterActual=new _(ae)),i=this.worldLandmarksSmoothingFilterActual.apply(n,this.timestamp)}else o=e,a=t,i=n;return{actualLandmarksFiltered:o,auxiliaryLandmarksFiltered:a,actualWorldLandmarksFiltered:i}},e}();function se(e){return c(this,void 0,void 0,(function(){var t,n,r,a,i,s;return l(this,(function(c){switch(c.label){case 0:return t=function(e){var t=u({},null==e?q:e);if(null==t.enableSmoothing&&(t.enableSmoothing=q.enableSmoothing),null==t.modelType&&(t.modelType=q.modelType),null==t.detectorModelUrl&&(t.detectorModelUrl=q.detectorModelUrl),null==t.landmarkModelUrl)switch(t.modelType){case"lite":t.landmarkModelUrl="https://tfhub.dev/mediapipe/tfjs-model/blazepose_3d/landmark/lite/1";break;case"heavy":t.landmarkModelUrl="https://tfhub.dev/mediapipe/tfjs-model/blazepose_3d/landmark/heavy/1";break;case"full":default:t.landmarkModelUrl="https://tfhub.dev/mediapipe/tfjs-model/blazepose_3d/landmark/full/1"}return t}(e),n=t.detectorModelUrl.indexOf("https://tfhub.dev")>-1,r=t.landmarkModelUrl.indexOf("https://tfhub.dev")>-1,[4,Promise.all([Object(o.a)(t.detectorModelUrl,{fromTFHub:n}),Object(o.a)(t.landmarkModelUrl,{fromTFHub:r})])];case 1:return a=c.sent(),i=a[0],s=a[1],[2,new ie(i,s,t.enableSmoothing,t.modelType)]}}))}))}var ue,ce,le,de=function(){function e(e){!function(e){if(e.maxTracks<1)throw new Error("Must specify 'maxTracks' to be at least 1, but encountered "+e.maxTracks);if(e.maxAge<=0)throw new Error("Must specify 'maxAge' to be positive, but encountered "+e.maxAge);if(void 0!==e.keypointTrackerParams){if(e.keypointTrackerParams.keypointConfidenceThreshold<0||e.keypointTrackerParams.keypointConfidenceThreshold>1)throw new Error("Must specify 'keypointConfidenceThreshold' to be in the range [0, 1], but encountered "+e.keypointTrackerParams.keypointConfidenceThreshold);if(e.keypointTrackerParams.minNumberOfKeypoints<1)throw new Error("Must specify 'minNumberOfKeypoints' to be at least 1, but encountered "+e.keypointTrackerParams.minNumberOfKeypoints);for(var t=0,n=e.keypointTrackerParams.keypointFalloff;t<n.length;t++){var r=n[t];if(r<=0)throw new Error("Must specify each keypoint falloff parameterto be positive but encountered "+r)}}}(e),this.tracks=[],this.maxTracks=e.maxTracks,this.maxAge=1e3*e.maxAge,this.minSimilarity=e.minSimilarity,this.nextID=1}return e.prototype.apply=function(e,t){this.filterOldTracks(t);var n=this.computeSimilarity(e);return this.assignTracks(e,n,t),this.updateTracks(t),e},e.prototype.getTracks=function(){return this.tracks.slice()},e.prototype.getTrackIDs=function(){return new Set(this.tracks.map((function(e){return e.id})))},e.prototype.filterOldTracks=function(e){var t=this;this.tracks=this.tracks.filter((function(n){return e-n.lastTimestamp<=t.maxAge}))},e.prototype.assignTracks=function(e,t,n){for(var r=Array.from(Array(t[0].length).keys()),o=[],a=0,i=Array.from(Array(e.length).keys());a<i.length;a++){var s=i[a];if(0!==r.length){for(var u=-1,c=-1,l=0,d=r;l<d.length;l++){var p=d[l],h=t[s][p];h>=this.minSimilarity&&h>c&&(u=p,c=h)}if(u>=0){var f=this.tracks[u];f=Object.assign(f,this.createTrack(e[s],n,f.id)),e[s].id=f.id;var m=r.indexOf(u);r.splice(m,1)}else o.push(s)}else o.push(s)}for(var g=0,b=o;g<b.length;g++){s=b[g];var y=this.createTrack(e[s],n);this.tracks.push(y),e[s].id=y.id}},e.prototype.updateTracks=function(e){this.tracks.sort((function(e,t){return t.lastTimestamp-e.lastTimestamp})),this.tracks=this.tracks.slice(0,this.maxTracks)},e.prototype.createTrack=function(e,t,n){var r={id:n||this.nextTrackID(),lastTimestamp:t,keypoints:e.keypoints.slice().map((function(e){return u({},e)}))};return void 0!==e.box&&(r.box=u({},e.box)),r},e.prototype.nextTrackID=function(){var e=this.nextID;return this.nextID+=1,e},e.prototype.remove=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.tracks=this.tracks.filter((function(t){return!e.includes(t.id)}))},e.prototype.reset=function(){this.tracks=[]},e}(),pe=function(e){function t(t){return e.call(this,t)||this}return s(t,e),t.prototype.computeSimilarity=function(e){var t=this;return 0===e.length||0===this.tracks.length?[[]]:e.map((function(e){return t.tracks.map((function(n){return t.iou(e,n)}))}))},t.prototype.iou=function(e,t){var n=Math.max(e.box.xMin,t.box.xMin),r=Math.max(e.box.yMin,t.box.yMin),o=Math.min(e.box.xMax,t.box.xMax),a=Math.min(e.box.yMax,t.box.yMax);if(n>=o||r>=a)return 0;var i=(o-n)*(a-r);return i/(e.box.width*e.box.height+t.box.width*t.box.height-i)},t}(de),he=function(e){function t(t){var n=e.call(this,t)||this;return n.keypointThreshold=t.keypointTrackerParams.keypointConfidenceThreshold,n.keypointFalloff=t.keypointTrackerParams.keypointFalloff,n.minNumKeyoints=t.keypointTrackerParams.minNumberOfKeypoints,n}return s(t,e),t.prototype.computeSimilarity=function(e){if(0===e.length||0===this.tracks.length)return[[]];for(var t=[],n=0,r=e;n<r.length;n++){for(var o=r[n],a=[],i=0,s=this.tracks;i<s.length;i++){var u=s[i];a.push(this.oks(o,u))}t.push(a)}return t},t.prototype.oks=function(e,t){for(var n=this.area(t.keypoints)+1e-6,r=0,o=0,a=0;a<e.keypoints.length;++a){var i=e.keypoints[a],s=t.keypoints[a];if(!(i.score<this.keypointThreshold||s.score<this.keypointThreshold)){o+=1;var u=Math.pow(i.x-s.x,2)+Math.pow(i.y-s.y,2),c=2*this.keypointFalloff[a];r+=Math.exp(-1*u/(2*n*Math.pow(c,2)))}}return o<this.minNumKeyoints?0:r/o},t.prototype.area=function(e){var t=this,n=e.filter((function(e){return e.score>t.keypointThreshold})),r=Math.min.apply(Math,[1].concat(n.map((function(e){return e.x})))),o=Math.max.apply(Math,[0].concat(n.map((function(e){return e.x})))),a=Math.min.apply(Math,[1].concat(n.map((function(e){return e.y}))));return(o-r)*(Math.max.apply(Math,[0].concat(n.map((function(e){return e.y}))))-a)},t}(de);function fe(e){switch(e){case ce.BlazePose:return p.reduce((function(e,t,n){return e[t]=n,e}),{});case ce.PoseNet:case ce.MoveNet:return d.reduce((function(e,t,n){return e[t]=n,e}),{});default:throw new Error("Model "+e+" is not supported.")}}(le=ue||(ue={})).Keypoint="keypoint",le.BoundingBox="boundingBox",function(e){e.MoveNet="MoveNet",e.BlazePose="BlazePose",e.PoseNet="PoseNet"}(ce||(ce={}));Object.freeze({__proto__:null,getKeypointIndexBySide:function(e){switch(e){case ce.BlazePose:return h;case ce.PoseNet:case ce.MoveNet:return f;default:throw new Error("Model "+e+" is not supported.")}},getAdjacentPairs:function(e){switch(e){case ce.BlazePose:return g;case ce.PoseNet:case ce.MoveNet:return m;default:throw new Error("Model "+e+" is not supported.")}},getKeypointIndexByName:fe});var me=["SinglePose.Lightning","SinglePose.Thunder","MultiPose.Lightning"],ge={modelType:"SinglePose.Lightning",enableSmoothing:!0},be={},ye={frequency:30,minCutOff:2.5,beta:300,derivateCutOff:2.5,thresholdCutOff:.5,thresholdBeta:5,disableValueScaling:!0},ve={maxTracks:18,maxAge:1e3,minSimilarity:.2,keypointTrackerParams:{keypointConfidenceThreshold:.3,keypointFalloff:[.026,.025,.025,.035,.035,.079,.079,.072,.072,.062,.062,.107,.107,.087,.087,.089,.089],minNumberOfKeypoints:4}},xe={maxTracks:18,maxAge:1e3,minSimilarity:.15,trackerParams:{}};function we(e,t){var n,r,o,a;return e?t.width>t.height?(n=1,r=t.height/t.width,o=0,a=(t.width/2-t.height/2)/t.width):(n=t.width/t.height,r=1,o=(t.height/2-t.width/2)/t.height,a=0):t.width>t.height?(n=t.width/t.height,r=1,o=(t.height/2-t.width/2)/t.height,a=0):(n=1,r=t.height/t.width,o=0,a=(t.width/2-t.height/2)/t.width),{yMin:o,xMin:a,yMax:o+n,xMax:a+r,height:n,width:r}}function Oe(e,t){var n={maxTracks:e.maxTracks,maxAge:e.maxAge,minSimilarity:e.minSimilarity};return null!=t.maxTracks&&(n.maxTracks=t.maxTracks),null!=t.maxAge&&(n.maxAge=t.maxAge),null!=t.minSimilarity&&(n.minSimilarity=t.minSimilarity),n}var ke=function(){function e(e,t){this.moveNetModel=e,this.modelInputResolution={height:0,width:0},this.keypointIndexByName=fe(ce.MoveNet),"SinglePose.Lightning"===t.modelType?(this.modelInputResolution.width=192,this.modelInputResolution.height=192):"SinglePose.Thunder"===t.modelType&&(this.modelInputResolution.width=256,this.modelInputResolution.height=256),this.multiPoseModel="MultiPose.Lightning"===t.modelType,this.multiPoseModel||(this.keypointFilter=new I(ye),this.cropRegionFilterYMin=new C(.9),this.cropRegionFilterXMin=new C(.9),this.cropRegionFilterYMax=new C(.9),this.cropRegionFilterXMax=new C(.9)),this.enableSmoothing=t.enableSmoothing,t.minPoseScore?this.minPoseScore=t.minPoseScore:this.minPoseScore=.25,t.multiPoseMaxDimension?this.multiPoseMaxDimension=t.multiPoseMaxDimension:this.multiPoseMaxDimension=256,this.enableTracking=t.enableTracking,this.multiPoseModel&&this.enableTracking&&(t.trackerType===ue.Keypoint?this.tracker=new he(t.trackerConfig):t.trackerType===ue.BoundingBox&&(this.tracker=new pe(t.trackerConfig)),this.enableSmoothing&&(this.keypointFilterMap=new Map))}return e.prototype.runSinglePersonPoseModel=function(e){return c(this,void 0,void 0,(function(){var t,n,r,o,i;return l(this,(function(s){switch(s.label){case 0:if(4!==(t=this.moveNetModel.execute(e)).shape.length||1!==t.shape[0]||1!==t.shape[1]||17!==t.shape[2]||3!==t.shape[3])throw t.dispose(),new Error("Unexpected output shape from model: ["+t.shape+"]");return"webgpu"===Object(a.Cd)()?[3,1]:(n=t.dataSync(),[3,3]);case 1:return[4,t.data()];case 2:n=s.sent(),s.label=3;case 3:for(t.dispose(),r={keypoints:[],score:0},o=0,i=0;i<17;++i)r.keypoints[i]={y:n[3*i],x:n[3*i+1],score:n[3*i+2]},r.keypoints[i].score>.2&&(++o,r.score+=r.keypoints[i].score);return o>0&&(r.score/=o),[2,r]}}))}))},e.prototype.runMultiPersonPoseModel=function(e){return c(this,void 0,void 0,(function(){var t,n,r,o,i,s,u,c;return l(this,(function(l){switch(l.label){case 0:if(3!==(t=this.moveNetModel.execute(e)).shape.length||1!==t.shape[0]||56!==t.shape[2])throw t.dispose(),new Error("Unexpected output shape from model: ["+t.shape+"]");return"webgpu"===Object(a.Cd)()?[3,1]:(n=t.dataSync(),[3,3]);case 1:return[4,t.data()];case 2:n=l.sent(),l.label=3;case 3:for(t.dispose(),r=[],o=n.length/56,i=0;i<o;++i)for(r[i]={keypoints:[]},s=56*i+51,r[i].box={yMin:n[s],xMin:n[s+1],yMax:n[s+2],xMax:n[s+3],width:n[s+3]-n[s+1],height:n[s+2]-n[s]},u=56*i+55,r[i].score=n[u],r[i].keypoints=[],c=0;c<17;++c)r[i].keypoints[c]={y:n[56*i+3*c],x:n[56*i+3*c+1],score:n[56*i+3*c+2]};return[2,r]}}))}))},e.prototype.estimatePoses=function(e,t,n){return void 0===t&&(t=be),c(this,void 0,void 0,(function(){var r,o,i,s,c,p;return l(this,(function(l){switch(l.label){case 0:return t=function(e){return null==e?be:u({},e)}(t),null==e?(this.reset(),[2,[]]):(null==n?T(e)&&(n=1e6*e.currentTime):n*=1e3,r=O(e),o=x(r),i=Object(a.Bd)(r,0),e instanceof a.Zc||r.dispose(),s=[],this.multiPoseModel?[3,2]:[4,this.estimateSinglePose(i,o,n)]);case 1:return s=l.sent(),[3,4];case 2:return[4,this.estimateMultiplePoses(i,o,n)];case 3:s=l.sent(),l.label=4;case 4:for(c=0;c<s.length;++c)for(p=0;p<s[c].keypoints.length;++p)s[c].keypoints[p].name=d[p],s[c].keypoints[p].y*=o.height,s[c].keypoints[p].x*=o.width;return[2,s]}}))}))},e.prototype.estimateSinglePose=function(e,t,n){return c(this,void 0,void 0,(function(){var r,o,i,s,u=this;return l(this,(function(c){switch(c.label){case 0:return this.cropRegion||(this.cropRegion=we(null==this.cropRegion,t)),r=Object(a.Xd)((function(){var t=Object(a.Wd)([[u.cropRegion.yMin,u.cropRegion.xMin,u.cropRegion.yMax,u.cropRegion.xMax]]),n=Object(a.be)([1],"int32"),r=[u.modelInputResolution.height,u.modelInputResolution.width];return Object(a.qd)(a.Dd.cropAndResize(e,t,n,r,"bilinear",0),"int32")})),e.dispose(),[4,this.runSinglePersonPoseModel(r)];case 1:if(o=c.sent(),r.dispose(),o.score<this.minPoseScore)return this.reset(),[2,[]];for(i=0;i<o.keypoints.length;++i)o.keypoints[i].y=this.cropRegion.yMin+o.keypoints[i].y*this.cropRegion.height,o.keypoints[i].x=this.cropRegion.xMin+o.keypoints[i].x*this.cropRegion.width;return null!=n&&this.enableSmoothing&&(o.keypoints=this.keypointFilter.apply(o.keypoints,n,1)),s=function(e,t,n,r){for(var o={},a=0,i=d;a<i.length;a++){var s=i[a];o[s]=[t[n[s]].y*r.height,t[n[s]].x*r.width]}if(function(e,t){return(e[t.left_hip].score>.2||e[t.right_hip].score>.2)&&(e[t.left_shoulder].score>.2||e[t.right_shoulder].score>.2)}(t,n)){var u=(o.left_hip[0]+o.right_hip[0])/2,c=(o.left_hip[1]+o.right_hip[1])/2,l=function(e,t,n,r,o){for(var a=["left_shoulder","right_shoulder","left_hip","right_hip"],i=0,s=0,u=0;u<a.length;u++)(h=Math.abs(r-n[a[u]][0]))>i&&(i=h),(f=Math.abs(o-n[a[u]][1]))>s&&(s=f);for(var c=0,l=0,d=0,p=Object.keys(n);d<p.length;d++){var h,f,m=p[d];e[t[m]].score<.2||((h=Math.abs(r-n[m][0]))>c&&(c=h),(f=Math.abs(o-n[m][1]))>l&&(l=f))}return[i,s,c,l]}(t,n,o,u,c),p=l[0],h=l[1],f=l[2],m=l[3],g=Math.max(1.9*h,1.9*p,1.2*f,1.2*m),b=[u-(g=Math.min(g,Math.max(c,r.width-c,u,r.height-u))),c-g];if(g>Math.max(r.width,r.height)/2)return we(null==e,r);var y=2*g;return{yMin:b[0]/r.height,xMin:b[1]/r.width,yMax:(b[0]+y)/r.height,xMax:(b[1]+y)/r.width,height:(b[0]+y)/r.height-b[0]/r.height,width:(b[1]+y)/r.width-b[1]/r.width}}return we(null==e,r)}(this.cropRegion,o.keypoints,this.keypointIndexByName,t),this.cropRegion=this.filterCropRegion(s),[2,[o]]}}))}))},e.prototype.estimateMultiplePoses=function(e,t,n){return c(this,void 0,void 0,(function(){var r,o,i,s,u,c,d,p,h,f,m,g=this;return l(this,(function(l){switch(l.label){case 0:return t.width>t.height?(o=this.multiPoseMaxDimension,i=Math.round(this.multiPoseMaxDimension*t.height/t.width),r=a.Dd.resizeBilinear(e,[i,o]),u=o,c=32*Math.ceil(i/32),s=Object(a.Id)(r,[[0,0],[0,c-i],[0,0],[0,0]])):(o=Math.round(this.multiPoseMaxDimension*t.width/t.height),i=this.multiPoseMaxDimension,r=a.Dd.resizeBilinear(e,[i,o]),u=32*Math.ceil(o/32),c=i,s=Object(a.Id)(r,[[0,0],[0,0],[0,u-o],[0,0]])),r.dispose(),e.dispose(),d=Object(a.qd)(s,"int32"),s.dispose(),[4,this.runMultiPersonPoseModel(d)];case 1:for(p=l.sent(),d.dispose(),p=p.filter((function(e){return e.score>=g.minPoseScore})),f=0;f<p.length;++f)for(h=0;h<p[f].keypoints.length;++h)p[f].keypoints[h].y*=c/i,p[f].keypoints[h].x*=u/o;if(this.enableTracking&&(this.tracker.apply(p,n),this.enableSmoothing)){for(f=0;f<p.length;++f)this.keypointFilterMap.has(p[f].id)||this.keypointFilterMap.set(p[f].id,new I(ye)),p[f].keypoints=this.keypointFilterMap.get(p[f].id).apply(p[f].keypoints,n,1);m=this.tracker.getTrackIDs(),this.keypointFilterMap.forEach((function(e,t){m.has(t)||g.keypointFilterMap.delete(t)}))}return[2,p]}}))}))},e.prototype.filterCropRegion=function(e){if(e){var t=this.cropRegionFilterYMin.apply(e.yMin),n=this.cropRegionFilterXMin.apply(e.xMin),r=this.cropRegionFilterYMax.apply(e.yMax),o=this.cropRegionFilterXMax.apply(e.xMax);return{yMin:t,xMin:n,yMax:r,xMax:o,height:r-t,width:o-n}}return this.cropRegionFilterYMin.reset(),this.cropRegionFilterXMin.reset(),this.cropRegionFilterYMax.reset(),this.cropRegionFilterXMax.reset(),null},e.prototype.dispose=function(){this.moveNetModel.dispose()},e.prototype.reset=function(){this.cropRegion=null,this.resetFilters()},e.prototype.resetFilters=function(){this.keypointFilter.reset(),this.cropRegionFilterYMin.reset(),this.cropRegionFilterXMin.reset(),this.cropRegionFilterYMax.reset(),this.cropRegionFilterXMax.reset()},e}();function Se(e){return void 0===e&&(e=ge),c(this,void 0,void 0,(function(){var t,n,r,i;return l(this,(function(s){switch(s.label){case 0:return t=function(e){var t,n=null==e?ge:u({},e);if(null==n.modelType)n.modelType="SinglePose.Lightning";else if(me.indexOf(n.modelType)<0)throw new Error("Invalid architecture "+n.modelType+". Should be one of "+me);if(null==n.enableSmoothing&&(n.enableSmoothing=!0),null!=n.minPoseScore&&(n.minPoseScore<0||n.minPoseScore>1))throw new Error("minPoseScore should be between 0.0 and 1.0");if(null!=n.multiPoseMaxDimension&&(n.multiPoseMaxDimension%32!=0||n.multiPoseMaxDimension<128||n.multiPoseMaxDimension>512))throw new Error("multiPoseResolution must be a multiple of 32 and between 128 and 512");if("MultiPose.Lightning"===n.modelType&&null==n.enableTracking&&(n.enableTracking=!0),"MultiPose.Lightning"===n.modelType&&!0===n.enableTracking)if(null==n.trackerType&&(n.trackerType=ue.BoundingBox),n.trackerType===ue.Keypoint)null!=n.trackerConfig?n.trackerConfig=function(e){var t=Oe(ve,e);return t.keypointTrackerParams=u({},ve.keypointTrackerParams),null!=e.keypointTrackerParams&&(null!=e.keypointTrackerParams.keypointConfidenceThreshold&&(t.keypointTrackerParams.keypointConfidenceThreshold=e.keypointTrackerParams.keypointConfidenceThreshold),null!=e.keypointTrackerParams.keypointFalloff&&(t.keypointTrackerParams.keypointFalloff=e.keypointTrackerParams.keypointFalloff),null!=e.keypointTrackerParams.minNumberOfKeypoints&&(t.keypointTrackerParams.minNumberOfKeypoints=e.keypointTrackerParams.minNumberOfKeypoints)),t}(n.trackerConfig):n.trackerConfig=ve;else{if(n.trackerType!==ue.BoundingBox)throw new Error("Tracker type not supported by MoveNet");null!=n.trackerConfig?n.trackerConfig=(t=n.trackerConfig,Oe(xe,t)):n.trackerConfig=xe}return n}(e),r=!0,t.modelUrl?(r=t.modelUrl.indexOf("https://tfhub.dev")>-1,[4,Object(o.a)(t.modelUrl,{fromTFHub:r})]):[3,2];case 1:return n=s.sent(),[3,4];case 2:return i=void 0,"SinglePose.Lightning"===t.modelType?i="https://tfhub.dev/google/tfjs-model/movenet/singlepose/lightning/4":"SinglePose.Thunder"===t.modelType?i="https://tfhub.dev/google/tfjs-model/movenet/singlepose/thunder/4":"MultiPose.Lightning"===t.modelType&&(i="https://tfhub.dev/google/tfjs-model/movenet/multipose/lightning/1"),[4,Object(o.a)(i,{fromTFHub:r})];case 3:n=s.sent(),s.label=4;case 4:return"webgl"===Object(a.Cd)()&&Object(a.zd)().set("TOPK_LAST_DIM_CPU_HANDOFF_SIZE_THRESHOLD",0),[2,new ke(n,t)]}}))}))}var Te={architecture:"MobileNetV1",outputStride:16,multiplier:.75,inputResolution:{height:257,width:257}},Ce=["MobileNetV1","ResNet50"],Ee={MobileNetV1:[8,16],ResNet50:[16]},Ie=[8,16,32],je={MobileNetV1:[.5,.75,1],ResNet50:[1]},Ne=[1,2,4],Ae={maxPoses:1,flipHorizontal:!1},Re={maxPoses:5,flipHorizontal:!1,scoreThreshold:.5,nmsRadius:20},_e=[-123.15,-115.9,-103.06];function $e(e){return Math.floor(e/2)}var Fe=function(){function e(e,t){this.priorityQueue=new Array(e),this.numberOfElements=-1,this.getElementValue=t}return e.prototype.enqueue=function(e){this.priorityQueue[++this.numberOfElements]=e,this.swim(this.numberOfElements)},e.prototype.dequeue=function(){var e=this.priorityQueue[0];return this.exchange(0,this.numberOfElements--),this.sink(0),this.priorityQueue[this.numberOfElements+1]=null,e},e.prototype.empty=function(){return-1===this.numberOfElements},e.prototype.size=function(){return this.numberOfElements+1},e.prototype.all=function(){return this.priorityQueue.slice(0,this.numberOfElements+1)},e.prototype.max=function(){return this.priorityQueue[0]},e.prototype.swim=function(e){for(;e>0&&this.less($e(e),e);)this.exchange(e,$e(e)),e=$e(e)},e.prototype.sink=function(e){for(;2*e<=this.numberOfElements;){var t=2*e;if(t<this.numberOfElements&&this.less(t,t+1)&&t++,!this.less(e,t))break;this.exchange(e,t),e=t}},e.prototype.getValueAt=function(e){return this.getElementValue(this.priorityQueue[e])},e.prototype.less=function(e,t){return this.getValueAt(e)<this.getValueAt(t)},e.prototype.exchange=function(e,t){var n=this.priorityQueue[e];this.priorityQueue[e]=this.priorityQueue[t],this.priorityQueue[t]=n},e}();function De(e,t,n,r,o,a){for(var i=a.shape,s=i[0],u=i[1],c=!0,l=Math.max(n-o,0),d=Math.min(n+o+1,s),p=l;p<d;++p){for(var h=Math.max(r-o,0),f=Math.min(r+o+1,u),m=h;m<f;++m)if(a.get(p,m,e)>t){c=!1;break}if(!c)break}return c}function Me(e){return c(this,void 0,void 0,(function(){return l(this,(function(t){return[2,Promise.all(e.map((function(e){return e.buffer()})))]}))}))}function Pe(e,t,n,r){return{y:r.get(e,t,n),x:r.get(e,t,n+17)}}function Le(e,t,n){var r=Pe(e.heatmapY,e.heatmapX,e.id,n),o=r.y,a=r.x;return{x:e.heatmapX*t+a,y:e.heatmapY*t+o}}function Be(e,t,n,r){var o=n.x,a=n.y;return e.some((function(e){var n,i,s,u,c=e.keypoints;return n=a,i=o,(s=c[r].y-n)*s+(u=c[r].x-i)*u<=t}))}var ze=d.reduce((function(e,t,n){return e[t]=n,e}),{}),Ue=[["nose","left_eye"],["left_eye","left_ear"],["nose","right_eye"],["right_eye","right_ear"],["nose","left_shoulder"],["left_shoulder","left_elbow"],["left_elbow","left_wrist"],["left_shoulder","left_hip"],["left_hip","left_knee"],["left_knee","left_ankle"],["nose","right_shoulder"],["right_shoulder","right_elbow"],["right_elbow","right_wrist"],["right_shoulder","right_hip"],["right_hip","right_knee"],["right_knee","right_ankle"]].map((function(e){var t=e[0],n=e[1];return[ze[t],ze[n]]})),Ve=Ue.map((function(e){return e[1]})),We=Ue.map((function(e){return e[0]}));function Ge(e,t,n){return e<t?t:e>n?n:e}function He(e,t,n,r){return{y:Ge(Math.round(e.y/t),0,n-1),x:Ge(Math.round(e.x/t),0,r-1)}}function qe(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ke(e,t,n,r,o,a,i,s){void 0===s&&(s=2);for(var u=r.shape,c=u[0],l=u[1],p={y:t.y,x:t.x},h=qe(p,function(e,t,n){var r=n.shape[2]/2;return{y:n.get(t.y,t.x,e),x:n.get(t.y,t.x,r+e)}}(e,He(p,a,c,l),i)),f=0;f<s;f++){var m=He(h,a,c,l),g=Pe(m.y,m.x,n,o);h=qe({x:m.x*a,y:m.y*a},{x:g.x,y:g.y})}var b=He(h,a,c,l),y=r.get(b.y,b.x,n);return{y:h.y,x:h.x,name:d[n],score:y}}function Xe(e,t,n,r,o,a){var i=t.shape[2],s=Ve.length,u=new Array(i),c=e.part,l=e.score,p=Le(c,r,n);u[c.id]={score:l,name:d[c.id],y:p.y,x:p.x};for(var h=s-1;h>=0;--h){var f=Ve[h],m=We[h];u[f]&&!u[m]&&(u[m]=Ke(h,u[f],m,t,n,r,a))}for(h=0;h<s;++h)f=We[h],m=Ve[h],u[f]&&!u[m]&&(u[m]=Ke(h,u[f],m,t,n,r,o));return u}function Ye(e,t,n){return n.reduce((function(n,r,o){var a=r.y,i=r.x,s=r.score;return Be(e,t,{y:a,x:i},o)||(n+=s),n}),0)/n.length}function Qe(e,t,n,r,o,a,i,s){return void 0===i&&(i=.5),void 0===s&&(s=20),c(this,void 0,void 0,(function(){var u,c,d,p,h,f,m,g,b,y,v,x;return l(this,(function(l){switch(l.label){case 0:return[4,Me([e,t,n,r])];case 1:for(u=l.sent(),c=u[0],d=u[1],p=u[2],h=u[3],f=[],m=function(e,t,n){for(var r=n.shape,o=r[0],a=r[1],i=r[2],s=new Fe(o*a*i,(function(e){return e.score})),u=0;u<o;++u)for(var c=0;c<a;++c)for(var l=0;l<i;++l){var d=n.get(u,c,l);d<e||De(l,d,u,c,1,n)&&s.enqueue({score:d,part:{heatmapY:u,heatmapX:c,id:l}})}return s}(i,0,c),g=s*s;f.length<a&&!m.empty();)b=m.dequeue(),y=Le(b.part,o,d),Be(f,g,y,b.part.id)||(v=Xe(b,c,d,o,p,h),x=Ye(f,g,v),f.push({keypoints:v,score:x}));return[2,f]}}))}))}function Ze(e,t,n){return Object(a.Xd)((function(){var r=function(e,t){for(var n=[],r=0;r<d.length;r++){var o=Je(e.get(r,0).valueOf(),e.get(r,1).valueOf(),r,t),i=o.x,s=o.y;n.push(s),n.push(i)}return Object(a.Wd)(n,[d.length,2])}(e,n);return Object(a.kd)(Object(a.qd)(Object(a.Hd)(e.toTensor(),Object(a.Md)(t,"int32")),"float32"),r)}))}function Je(e,t,n,r){return{y:r.get(e,t,n),x:r.get(e,t,n+d.length)}}function et(e,t,n){return c(this,void 0,void 0,(function(){var r,o,i,s,u,c,p,h,f,m;return l(this,(function(l){switch(l.label){case 0:return r=0,o=function(e){var t=e.shape,n=t[0],r=t[1],o=t[2];return Object(a.Xd)((function(){var t,i,s=Object(a.Ld)(e,[n*r,o]),u=Object(a.ld)(s,0),c=Object(a.Bd)(Object(a.xd)(u,Object(a.Md)(r,"int32")),1),l=Object(a.Bd)((t=u,i=r,Object(a.Xd)((function(){var e=Object(a.xd)(t,Object(a.Md)(i,"int32"));return Object(a.Sd)(t,Object(a.Hd)(e,Object(a.Md)(i,"int32")))}))),1);return Object(a.td)([c,l],1)}))}(e),[4,Promise.all([e.buffer(),t.buffer(),o.buffer()])];case 1:return i=l.sent(),s=i[0],u=i[1],c=i[2],[4,(p=Ze(c,n,u)).buffer()];case 2:return h=l.sent(),f=Array.from(function(e,t){for(var n=t.shape[0],r=new Float32Array(n),o=0;o<n;o++){var a=t.get(o,0),i=t.get(o,1);r[o]=e.get(a,i,o)}return r}(s,c)),m=f.map((function(e,t){return r+=e,{y:h.get(t,0),x:h.get(t,1),score:e,name:d[t]}})),o.dispose(),p.dispose(),[2,{keypoints:m,score:r/m.length}]}}))}))}function tt(e,t){return(e-1)%t==0}var nt="https://storage.googleapis.com/tfjs-models/savedmodel/posenet/mobilenet/",rt="https://storage.googleapis.com/tfjs-models/savedmodel/posenet/resnet50/";function ot(e,t){return function(e,t){return(e-1)%t==0}(e,t)?e:Math.floor(e/t)*t+1}var at=function(){function e(e,t){this.posenetModel=e;var n=this.posenetModel.inputs[0].shape;a.ae.assert(-1===n[1]&&-1===n[2],(function(){return"Input shape ["+n[1]+", "+n[2]+"] must both be equal to or -1"}));var r,o,i=(r=t.inputResolution,o=t.outputStride,{height:ot(r.height,o),width:ot(r.width,o)});!function(e){a.ae.assert(Ie.indexOf(e)>=0,(function(){return"outputStride of "+e+" is invalid. It must be either 8 or 16."}))}(t.outputStride),function(e,t){a.ae.assert(tt(e.height,t),(function(){return"height of "+e.height+" is invalid for output stride "+t+"."})),a.ae.assert(tt(e.width,t),(function(){return"width of "+e.width+" is invalid for output stride "+t+"."}))}(i,t.outputStride),this.inputResolution=i,this.outputStride=t.outputStride,this.architecture=t.architecture}return e.prototype.estimatePoses=function(e,t){return void 0===t&&(t=Ae),c(this,void 0,void 0,(function(){var n,r,o,i,s,c,d,p,h,f,m,g,b,y,v;return l(this,(function(l){switch(l.label){case 0:return n=function(e){var t=e;if(null==t.maxPoses&&(t.maxPoses=1),t.maxPoses<=0)throw new Error("Invalid maxPoses "+t.maxPoses+". Should be > 0.");if(t.maxPoses>1){if((t=u({},Re,t)).scoreThreshold<0||t.scoreThreshold>1)throw new Error("Invalid scoreThreshold "+t.scoreThreshold+". Should be in range [0.0, 1.0]");if(t.nmsRadius<=0)throw new Error("Invalid nmsRadius "+t.nmsRadius+".")}return t}(t),null==e?[2,[]]:(this.maxPoses=n.maxPoses,r=S(e,{inputResolution:this.inputResolution,keepAspectRatio:!0}),o=r.imageTensor,i=r.padding,s="ResNet50"===this.architecture?Object(a.kd)(o,_e):$(o,[-1,1]),c=this.posenetModel.predict(s),"ResNet50"===this.architecture?(d=Object(a.Qd)(c[2],[0]),p=Object(a.Qd)(c[3],[0]),h=Object(a.Qd)(c[0],[0]),f=Object(a.Qd)(c[1],[0])):(d=Object(a.Qd)(c[0],[0]),p=Object(a.Qd)(c[1],[0]),h=Object(a.Qd)(c[2],[0]),f=Object(a.Qd)(c[3],[0])),m=Object(a.Nd)(p),1!==this.maxPoses?[3,2]:[4,et(m,d,this.outputStride)]);case 1:return b=l.sent(),g=[b],[3,4];case 2:return[4,Qe(m,d,h,f,this.outputStride,this.maxPoses,n.scoreThreshold,n.nmsRadius)];case 3:g=l.sent(),l.label=4;case 4:return y=x(e),v=function(e,t,n,r){var o=t.height,a=t.width,i=o/(n.height*(1-r.top-r.bottom)),s=a/(n.width*(1-r.left-r.right)),u=-r.top*n.height,c=-r.left*n.width;if(1===s&&1===i&&0===u&&0===c)return e;for(var l=0,d=e;l<d.length;l++)for(var p=0,h=d[l].keypoints;p<h.length;p++){var f=h[p];f.x=(f.x+c)*s,f.y=(f.y+u)*i}return e}(g,y,this.inputResolution,i),n.flipHorizontal&&(v=function(e,t){for(var n=0,r=e;n<r.length;n++)for(var o=0,a=r[n].keypoints;o<a.length;o++){var i=a[o];i.x=t.width-1-i.x}return e}(v,y)),o.dispose(),s.dispose(),Object(a.wd)(c),d.dispose(),p.dispose(),h.dispose(),f.dispose(),m.dispose(),[2,v]}}))}))},e.prototype.dispose=function(){this.posenetModel.dispose()},e.prototype.reset=function(){},e}();function it(e){return void 0===e&&(e=Te),c(this,void 0,void 0,(function(){var t,n,r,a,i;return l(this,(function(s){switch(s.label){case 0:return"ResNet50"!==(t=function(e){var t=e||Te;if(null==t.architecture&&(t.architecture="MobileNetV1"),Ce.indexOf(t.architecture)<0)throw new Error("Invalid architecture "+t.architecture+". Should be one of "+Ce);if(null==t.inputResolution&&(t.inputResolution={height:257,width:257}),null==t.outputStride&&(t.outputStride=16),Ee[t.architecture].indexOf(t.outputStride)<0)throw new Error("Invalid outputStride "+t.outputStride+". Should be one of "+Ee[t.architecture]+" for architecture "+t.architecture+".");if(null==t.multiplier&&(t.multiplier=1),je[t.architecture].indexOf(t.multiplier)<0)throw new Error("Invalid multiplier "+t.multiplier+". Should be one of "+je[t.architecture]+" for architecture "+t.architecture+".");if(null==t.quantBytes&&(t.quantBytes=4),Ne.indexOf(t.quantBytes)<0)throw new Error("Invalid quantBytes "+t.quantBytes+". Should be one of "+Ne+" for architecture "+t.architecture+".");if("MobileNetV1"===t.architecture&&32===t.outputStride&&1!==t.multiplier)throw new Error("When using an output stride of 32, you must select 1 as the multiplier.");return t}(e)).architecture?[3,2]:(u=t.outputStride,c=t.quantBytes,l="model-stride"+u+".json",n=4===c?rt+"float/"+l:rt+"quant"+c+"/"+l,[4,Object(o.a)(t.modelUrl||n)]);case 1:return r=s.sent(),[2,new at(r,t)];case 2:return a=function(e,t,n){var r={1:"100",.75:"075",.5:"050"},o="model-stride"+e+".json";return 4===n?nt+"float/"+r[t]+"/"+o:nt+"quant"+n+"/"+r[t]+"/"+o}(t.outputStride,t.multiplier,t.quantBytes),[4,Object(o.a)(t.modelUrl||a)];case 3:return i=s.sent(),[2,new at(i,t)]}var u,c,l}))}))}function st(e,t){return c(this,void 0,void 0,(function(){var n,r;return l(this,(function(o){switch(e){case ce.PoseNet:return[2,it(t)];case ce.BlazePose:if(r=void 0,null!=(n=t)){if("tfjs"===n.runtime)return[2,se(t)];if("mediapipe"===n.runtime)return[2,v(t)];r=n.runtime}throw new Error("Expect modelConfig.runtime to be either 'tfjs' or 'mediapipe', but got "+r);case ce.MoveNet:return[2,Se(t)];default:throw new Error(e+" is not a supported model name.")}}))}))}},function(e,t,n){var r;e.exports=((r=function(){function e(e){return o.appendChild(e.dom),e}function t(e){for(var t=0;t<o.children.length;t++)o.children[t].style.display=t===e?"block":"none";n=e}var n=0,o=document.createElement("div");o.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",o.addEventListener("click",(function(e){e.preventDefault(),t(++n%o.children.length)}),!1);var a=(performance||Date).now(),i=a,s=0,u=e(new r.Panel("FPS","#0ff","#002")),c=e(new r.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var l=e(new r.Panel("MB","#f08","#201"));return t(0),{REVISION:16,dom:o,addPanel:e,showPanel:t,begin:function(){a=(performance||Date).now()},end:function(){s++;var e=(performance||Date).now();if(c.update(e-a,200),e>i+1e3&&(u.update(1e3*s/(e-i),100),i=e,s=0,l)){var t=performance.memory;l.update(t.usedJSHeapSize/1048576,t.jsHeapSizeLimit/1048576)}return e},update:function(){a=this.end()},domElement:o,setMode:t}}).Panel=function(e,t,n){var r=1/0,o=0,a=Math.round,i=a(window.devicePixelRatio||1),s=80*i,u=48*i,c=3*i,l=2*i,d=3*i,p=15*i,h=74*i,f=30*i,m=document.createElement("canvas");m.width=s,m.height=u,m.style.cssText="width:80px;height:48px";var g=m.getContext("2d");return g.font="bold "+9*i+"px Helvetica,Arial,sans-serif",g.textBaseline="top",g.fillStyle=n,g.fillRect(0,0,s,u),g.fillStyle=t,g.fillText(e,c,l),g.fillRect(d,p,h,f),g.fillStyle=n,g.globalAlpha=.9,g.fillRect(d,p,h,f),{dom:m,update:function(u,b){r=Math.min(r,u),o=Math.max(o,u),g.fillStyle=n,g.globalAlpha=1,g.fillRect(0,0,s,p),g.fillStyle=t,g.fillText(a(u)+" "+e+" ("+a(r)+"-"+a(o)+")",c,l),g.drawImage(m,d+i,p,h-i,f,d,p,h-i,f),g.fillRect(d+h-i,p,i,f),g.fillStyle=n,g.globalAlpha=.9,g.fillRect(d+h-i,p,i,a((1-u/b)*f))}}},r)},,,,,,function(e,t,n){"use strict";var r=n(127),o=n(851),a=n(332),i=n(166),s=n(636),u=i.set,c=i.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){u(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=c(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),a.Arguments=a.Array,o("keys"),o("values"),o("entries")},function(e,t,n){"use strict";var r=n(221),o=n(59),a=n(248),i=n(185),s=n(43),u=n(852),c=n(638),l=n(622),d=n(621),p=n(124),h=n(95),f=n(57),m=n(332),g=n(637),b=i.PROPER,y=i.CONFIGURABLE,v=g.IteratorPrototype,x=g.BUGGY_SAFARI_ITERATORS,w=f("iterator"),O=function(){return this};e.exports=function(e,t,n,i,f,g,k){u(n,t,i);var S,T,C,E=function(e){if(e===f&&R)return R;if(!x&&e in N)return N[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},I=t+" Iterator",j=!1,N=e.prototype,A=N[w]||N["@@iterator"]||f&&N[f],R=!x&&A||E(f),_="Array"==t&&N.entries||A;if(_&&(S=c(_.call(new e)))!==Object.prototype&&S.next&&(a||c(S)===v||(l?l(S,v):s(S[w])||h(S,w,O)),d(S,I,!0,!0),a&&(m[I]=O)),b&&"values"==f&&A&&"values"!==A.name&&(!a&&y?p(N,"name","values"):(j=!0,R=function(){return o(A,this)})),f)if(T={values:E("values"),keys:g?R:E("keys"),entries:E("entries")},k)for(C in T)(x||j||!(C in N))&&h(N,C,T[C]);else r({target:t,proto:!0,forced:x||j},T);return a&&!k||N[w]===R||h(N,w,R,{name:f}),m[t]=R,T}},function(e,t,n){"use strict";var r,o,a,i=n(45),s=n(43),u=n(256),c=n(638),l=n(95),d=n(57),p=n(248),h=d("iterator"),f=!1;[].keys&&("next"in(a=[].keys())?(o=c(c(a)))!==Object.prototype&&(r=o):f=!0),null==r||i((function(){var e={};return r[h].call(e)!==e}))?r={}:p&&(r=u(r)),s(r[h])||l(r,h,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:f}},function(e,t,n){var r=n(16),o=n(75),a=n(43),i=n(249),s=n(252),u=n(853),c=s("IE_PROTO"),l=r.Object,d=l.prototype;e.exports=u?l.getPrototypeOf:function(e){var t=i(e);if(o(t,c))return t[c];var n=t.constructor;return a(n)&&t instanceof n?n.prototype:t instanceof l?d:null}},function(e,t,n){"use strict";var r=n(114),o=n(115),a=n(57),i=n(84),s=a("species");e.exports=function(e){var t=r(e),n=o.f;i&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(186),o=n(116),a=n(332),i=n(57)("iterator");e.exports=function(e){if(null!=e)return o(e,i)||o(e,"@@iterator")||a[r(e)]}},function(e,t,n){var r,o,a,i,s=n(16),u=n(259),c=n(623),l=n(43),d=n(75),p=n(45),h=n(358),f=n(366),m=n(217),g=n(642),b=n(624),y=s.setImmediate,v=s.clearImmediate,x=s.process,w=s.Dispatch,O=s.Function,k=s.MessageChannel,S=s.String,T=0,C={};try{r=s.location}catch(e){}var E=function(e){if(d(C,e)){var t=C[e];delete C[e],t()}},I=function(e){return function(){E(e)}},j=function(e){E(e.data)},N=function(e){s.postMessage(S(e),r.protocol+"//"+r.host)};y&&v||(y=function(e){var t=f(arguments,1);return C[++T]=function(){u(l(e)?e:O(e),void 0,t)},o(T),T},v=function(e){delete C[e]},b?o=function(e){x.nextTick(I(e))}:w&&w.now?o=function(e){w.now(I(e))}:k&&!g?(i=(a=new k).port2,a.port1.onmessage=j,o=c(i.postMessage,i)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&r&&"file:"!==r.protocol&&!p(N)?(o=N,s.addEventListener("message",j,!1)):o="onreadystatechange"in m("script")?function(e){h.appendChild(m("script")).onreadystatechange=function(){h.removeChild(this),E(e)}}:function(e){setTimeout(I(e),0)}),e.exports={set:y,clear:v}},function(e,t,n){var r=n(250);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},function(e,t,n){"use strict";var r=n(218),o=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new o(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({argMax_:
+/**
+ * @license
+ * Copyright 2020 Google Inc. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=0){const n={x:Object(a.a)(e,"x","argMax")},i={axis:t};return r.a.runKernel(o.h,n,i)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(4);const u=Object(s.a)({clipByValue_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n){const s=Object(a.a)(e,"x","clipByValue");i.b(t<=n,()=>`Error in clip: min (${t}) must be less than or equal to max (${n}).`);const u={x:s},c={clipValueMin:t,clipValueMax:n};return r.a.runKernel(o.y,u,c)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({pad_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n=0){const i=Object(a.a)(e,"x","pad");if(0===i.rank)throw new Error("pad(scalar) is not defined. Pass non-scalar to pad");const s={paddings:t,constantValue:n},u={x:i};return r.a.runKernel(o.bc,u,s)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(4);const u=Object(s.a)({addN_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){i.b(Array.isArray(e),()=>"The argument passed to tf.addN() must be a list of tensors"),i.b(e.length>=1,()=>"Must pass at least one tensor to tf.addN(), but got "+e.length);const t=e.map((e,t)=>Object(a.a)(e,"tensors"+t,"addN")),n=t[0];t.forEach(e=>{if(e.dtype!==n.dtype)throw new Error("All tensors passed to tf.addN() must have the same dtype")}),t.forEach(e=>{if(!i.a(e.shape,n.shape))throw new Error("All tensors passed to tf.addN() must have the same shape")});const s=t;return r.a.runKernel(o.e,s)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(22),i=n(3),s=n(4);const u=Object(s.a)({mod_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){let n=Object(i.a)(e,"a","mod"),s=Object(i.a)(t,"b","mod");[n,s]=Object(a.b)(n,s);const u={a:n,b:s};return r.a.runKernel(o.Qb,u)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(22),o=n(3),a=n(69),i=n(395),s=n(4),u=n(138),c=n(267);const l=Object(s.a)({divNoNan_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){let n=Object(o.a)(e,"a","div"),s=Object(o.a)(t,"b","div");[n,s]=Object(r.b)(n,s);const l=Object(a.a)(n,s),d=Object(c.a)(l),p=Object(i.a)(s,d);return Object(u.a)(p,d,l)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(5),o=n(6),a=n(22),i=n(3),s=n(35),u=n(46),c=n(4);const l=Object(c.a)({maximum_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){let n=Object(i.a)(e,"a","maximum"),c=Object(i.a)(t,"b","maximum");[n,c]=Object(a.b)(n,c),"bool"===n.dtype&&(n=Object(u.a)(n,"int32"),c=Object(u.a)(c,"int32")),Object(s.assertAndGetBroadcastShape)(n.shape,c.shape);const l={a:n,b:c};return r.a.runKernel(o.Lb,l)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({acos_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","acos")};return r.a.runKernel(o.b,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({acosh_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","acosh")};return r.a.runKernel(o.c,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({asin_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","asin")};return r.a.runKernel(o.j,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({asinh_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","asinh")};return r.a.runKernel(o.k,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({atan_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","atan")};return r.a.runKernel(o.l,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(22),i=n(3),s=n(4);const u=Object(s.a)({atan2_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){let n=Object(i.a)(e,"a","atan2"),s=Object(i.a)(t,"b","atan2");[n,s]=Object(a.b)(n,s);const u={a:n,b:s};return r.a.runKernel(o.m,u)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({atanh_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","atanh")};return r.a.runKernel(o.n,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({ceil_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","ceil","float32")};return r.a.runKernel(o.x,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({cos_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","cos","float32")};return r.a.runKernel(o.I,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({cosh_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","cosh","float32")};return r.a.runKernel(o.J,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(46),u=n(4);const c=Object(u.a)({erf_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){let t=Object(a.a)(e,"x","erf");i.b("int32"===t.dtype||"float32"===t.dtype,()=>"Input dtype must be `int32` or `float32`."),"int32"===t.dtype&&(t=Object(s.a)(t,"float32"));const n={x:t};return r.a.runKernel(o.X,n)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({expm1_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","expm1")};return r.a.runKernel(o.ab,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({floor_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","floor","float32")};return r.a.runKernel(o.eb,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({reciprocal_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","reciprocal")};return r.a.runKernel(o.ic,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({selu_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","selu")};return r.a.runKernel(o.wc,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({sin_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","sin","float32")};return r.a.runKernel(o.zc,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({sign_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","sign")};return r.a.runKernel(o.yc,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({sinh_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","sinh")};return r.a.runKernel(o.Ac,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({softplus_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","softplus")};return r.a.runKernel(o.Dc,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({tanh_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","tanh","float32")};return r.a.runKernel(o.Wc,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({tan_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","tan","float32")};return r.a.runKernel(o.Vc,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({rsqrt_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","rsqrt","float32")};return r.a.runKernel(o.tc,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(46),s=n(4);const u=Object(s.a)({prod_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=null,n=!1){let s=Object(a.a)(e,"x","prod");"bool"===s.dtype&&(s=Object(i.a)(s,"int32"));const u={x:s},c={axis:t,keepDims:n};return r.a.runKernel(o.ec,u,c)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({isNaN_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","isNaN")};return r.a.runKernel(o.tb,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(3),o=n(9),a=n(272),i=n(37),s=n(4),u=n(12);const c=Object(s.a)({conv1d_:function(e,t,n,s,c="NWC",l=1,d){const p=Object(r.a)(e,"x","conv1d"),h=Object(r.a)(t,"filter","conv1d");let f=p,m=!1;2===p.rank&&(m=!0,f=Object(u.a)(p,[1,p.shape[0],p.shape[1]])),o.b(3===f.rank,()=>`Error in conv1d: input must be rank 3, but got rank ${f.rank}.`),o.b(3===h.rank,()=>"Error in conv1d: filter must be rank 3, but got rank "+h.rank+"."),i.a("conv1d",s,d),o.b(f.shape[2]===h.shape[1],()=>`Error in conv1d: depth of input (${f.shape[2]}) must match input depth for filter ${h.shape[1]}.`),o.b(i.i(n,l),()=>`Error in conv1D: Either stride or dilation must be 1. Got stride ${n} and dilation '${l}'`),o.b("NWC"===c,()=>`Error in conv1d: got dataFormat of ${c} but only NWC is currently supported.`);const g=Object(u.a)(h,[1,h.shape[0],h.shape[1],h.shape[2]]),b=Object(u.a)(f,[f.shape[0],1,f.shape[1],f.shape[2]]),y=[1,n],v=[1,l],x=Object(a.a)(b,g,y,s,"NHWC",v,d);return m?Object(u.a)(x,[x.shape[2],x.shape[3]]):Object(u.a)(x,[x.shape[0],x.shape[2],x.shape[3]])}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(3),o=n(397),a=n(4);const i=Object(a.a)({conv2dTranspose_:function(e,t,n,a,i,s){const u=Object(r.a)(e,"x","conv2dTranspose"),c=Object(r.a)(t,"filter","conv2dTranspose");return Object(o.a)(n,u,c,a,i,"NHWC",s)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(37),u=n(4),c=n(12);const l=Object(u.a)({conv3d_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n,u,l="NDHWC",d=[1,1,1]){const p=Object(a.a)(e,"x","conv3d"),h=Object(a.a)(t,"filter","conv3d");let f=p,m=!1;4===p.rank&&(m=!0,f=Object(c.a)(p,[1,p.shape[0],p.shape[1],p.shape[2],p.shape[3]])),i.b(5===f.rank,()=>`Error in conv3d: input must be rank 5, but got rank ${f.rank}.`),i.b(5===h.rank,()=>"Error in conv3d: filter must be rank 5, but got rank "+h.rank+"."),i.b(f.shape[4]===h.shape[3],()=>`Error in conv3d: depth of input (${f.shape[4]}) must match input depth for filter ${h.shape[3]}.`),i.b(Object(s.i)(n,d),()=>`Error in conv3D: Either strides or dilations must be 1. Got strides ${n} and dilations '${d}'`),i.b("NDHWC"===l,()=>`Error in conv3d: got dataFormat of ${l} but only NDHWC is currently supported.`);const g={x:f,filter:h},b={strides:n,pad:u,dataFormat:l,dilations:d},y=r.a.runKernel(o.F,g,b);return m?Object(c.a)(y,[y.shape[1],y.shape[2],y.shape[3],y.shape[4]]):y}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(46),u=n(37),c=n(4),l=n(12);const d=Object(c.a)({avgPool_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n,c,d){const p=Object(a.a)(e,"x","avgPool","float32");i.b(u.i(n,1),()=>`Error in avgPool: Either strides or dilations must be 1. Got strides ${n} and dilations '1'`);let h=p,f=!1;3===p.rank&&(f=!0,h=Object(l.a)(p,[1,p.shape[0],p.shape[1],p.shape[2]])),i.b(4===h.rank,()=>`Error in avgPool: x must be rank 4 but got rank ${h.rank}.`),u.a("avgPool",c,d);const m={x:h},g={filterSize:t,strides:n,pad:c,dimRoundingMode:d};let b=r.a.runKernel(o.o,m,g);return b=Object(s.a)(b,p.dtype),f?Object(l.a)(b,[b.shape[1],b.shape[2],b.shape[3]]):b}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(37),u=n(4),c=n(12);const l=Object(u.a)({maxPool_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n,u,l){const d=Object(a.a)(e,"x","maxPool");let p=d,h=!1;3===d.rank&&(h=!0,p=Object(c.a)(d,[1,d.shape[0],d.shape[1],d.shape[2]])),i.b(4===p.rank,()=>`Error in maxPool: input must be rank 4 but got rank ${p.rank}.`),i.b(s.i(n,1),()=>`Error in maxPool: Either strides or dilations must be 1. Got strides ${n} and dilations '1'`),s.a("maxPool",u,l);const f={x:p},m={filterSize:t,strides:n,pad:u,dimRoundingMode:l},g=r.a.runKernel(o.Gb,f,m);return h?Object(c.a)(g,[g.shape[1],g.shape[2],g.shape[3]]):g}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({maxPoolWithArgmax_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n,i,s=!1){const u={x:Object(a.a)(e,"x","maxPoolWithArgmax")},c={filterSize:t,strides:n,pad:i,includeBatchInIndex:s},l=r.a.runKernel(o.Kb,u,c);return{result:l[0],indexes:l[1]}}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(37),u=n(46),c=n(4),l=n(12);const d=Object(c.a)({avgPool3d_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n,c,d,p="NDHWC"){const h=Object(a.a)(e,"x","avgPool3d","float32");let f=h,m=!1;4===h.rank&&(m=!0,f=Object(l.a)(h,[1,h.shape[0],h.shape[1],h.shape[2],h.shape[3]])),i.b(5===f.rank,()=>`Error in avgPool3d: x must be rank 5 but got rank ${f.rank}.`),i.b("NDHWC"===p,()=>"Error in avgPool3d: Only NDHWC is currently supported, but got dataFormat of "+p),Object(s.a)("avgPool3d",c,d);const g={x:f},b={filterSize:t,strides:n,pad:c,dimRoundingMode:d,dataFormat:p};let y=r.a.runKernel(o.p,g,b);return y=Object(u.a)(y,f.dtype),m?Object(l.a)(y,[y.shape[1],y.shape[2],y.shape[3],y.shape[4]]):y}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(37),u=n(4),c=n(12);const l=Object(u.a)({maxPool3d_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=[1,1,1],n,u,l,d="NDHWC"){const p=Object(a.a)(e,"x","maxPool3d");let h=p,f=!1;4===p.rank&&(f=!0,h=Object(c.a)(p,[1,p.shape[0],p.shape[1],p.shape[2],p.shape[3]])),i.b(5===h.rank,()=>`Error in maxPool3d: x must be rank 5 but got rank ${h.rank}.`),i.b("NDHWC"===d,()=>"Error in maxPool3d: Only NDHWC is currently supported, but got dataFormat of "+d),Object(s.a)("maxPool3d",u,l);const m={x:h},g={filterSize:t,strides:n,pad:u,dimRoundingMode:l,dataFormat:d},b=r.a.runKernel(o.Hb,m,g);return f?Object(c.a)(b,[b.shape[1],b.shape[2],b.shape[3],b.shape[4]]):b}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(4),u=n(12);const c=Object(s.a)({dilation2d_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n,s,c=[1,1],l="NHWC"){const d=Object(a.a)(e,"x","dilation2d"),p=Object(a.a)(t,"filter","dilation2d");i.b(3===d.rank||4===d.rank,()=>"Error in dilation2d: input must be rank 3 or 4, but got rank "+d.rank+"."),i.b(3===p.rank,()=>"Error in dilation2d: filter must be rank 3, but got rank "+p.rank+"."),i.b("NHWC"===l,()=>"Error in dilation2d: Only NHWC is currently supported, but got dataFormat of "+l);let h=d,f=!1;3===d.rank&&(h=Object(u.a)(d,[1,d.shape[0],d.shape[1],d.shape[2]]),f=!0);const m={x:h,filter:p},g={strides:n,pad:s,dilations:c},b=r.a.runKernel(o.S,m,g);return f?Object(u.a)(b,[b.shape[1],b.shape[2],b.shape[3]]):b}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(5),o=n(6);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function a(e,t,n){if(n<=0)throw new Error("The number of values should be positive.");const a={start:e,stop:t,num:n};return r.a.runKernel(o.zb,{},a)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(4),s=n(12);const u=Object(i.a)({multinomial_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n,i=!1){const u=Object(a.a)(e,"logits","multinomial"),c=u.size,l=u.rank;if(c<2)throw new Error("Error in multinomial: you need at least 2 outcomes, but got "+c+".");if(l>2)throw new Error("Rank of probabilities must be 1 or 2, but is "+l);n=n||Math.random();const d={logits:1===l?Object(s.a)(u,[1,-1]):u},p={numSamples:t,seed:n,normalized:i},h=r.a.runKernel(o.Rb,d,p);return 1===l?Object(s.a)(h,[h.size]):h}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({oneHot_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n=1,i=0){if(t<2)throw new Error("Error in oneHot: depth must be >=2, but it is "+t);const s={indices:Object(a.a)(e,"indices","oneHot","int32")},u={depth:t,onValue:n,offValue:i};return r.a.runKernel(o.Yb,s,u)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({onesLike_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","onesLike")};return r.a.runKernel(o.Zb,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(122),o=n(4),a=n(398);const i=Object(o.a)({randomUniform_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=0,n=1,o="float32",i){const s=Object(r.a)(e,o),u=new a.b(t,n,null,i);for(let e=0;e<s.values.length;e++)s.values[e]=u.nextValue();return s.toTensor()}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(122),o=n(4),a=n(398);const i=Object(o.a)({truncatedNormal_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=0,n=1,o,i){if(null!=o&&"bool"===o)throw new Error("Unsupported data type $ { dtype }");const s=new a.a(t,n,o,!0,i),u=Object(r.a)(e,o);for(let e=0;e<u.values.length;e++)u.values[e]=s.nextValue();return u.toTensor()}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(394),o=n(3);const a=
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+async function(e){const t=Object(o.a)(e,"condition","whereAsync","bool"),n=await t.data(),a=Object(r.a)(t.shape,n);return e!==t&&t.dispose(),a}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(42),o=n(3),a=n(9);const i=
+/**
+ * @license
+ * Copyright 2020 Google Inc. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+async function(e,t){const n=Object(o.a)(e,"x","setdiff1d"),i=Object(o.a)(t,"y","setdiff1d");a.b(n.dtype===i.dtype,()=>`x and y should have the same dtype, but got x (${n.dtype}) and y (${i.dtype}).`),a.b(1===n.rank,()=>`x should be 1D tensor, but got x (${n.shape}).`),a.b(1===i.rank,()=>`y should be 1D tensor, but got y (${i.shape}).`);const s=await n.data(),u=await i.data(),c=new Set(u);let l=0;for(let e=0;e<s.length;e++)c.has(s[e])||l++;const d=new r.b([l],n.dtype),p=new r.b([l],"int32");for(let e=0,t=0;e<s.length;e++)c.has(s[e])||(d.values[t]=s[e],p.values[t]=e,t++);return[d.toTensor(),p.toTensor()]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({topk_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=1,n=!0){const i=Object(a.a)(e,"x","topk");if(0===i.rank)throw new Error("topk() expects the input to be of rank 1 or higher");const s=i.shape[i.shape.length-1];if(t<0)throw new Error("'k' passed to topk() must be >= 0 but got "+t);if(t>s)throw new Error(`'k' passed to topk() must be <= the last dimension (${s}) but got `+t);const u={x:i},c={k:t,sorted:n},[l,d]=r.a.runKernel(o.Yc,u,c);return{values:l,indices:d}}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(4);const u=Object(s.a)({unique_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=0){const n=Object(a.a)(e,"x","unique","string_or_numeric");Object(i.b)(n.rank>0,()=>"The input tensor must be at least 1D");const s={x:n},u={axis:t},[c,l]=r.a.runKernel(o.bd,s,u);return{values:c,indices:l}}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),o=n(6),a=n(22),i=n(3),s=n(35),u=n(4);const c=Object(u.a)({less_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){let n=Object(i.a)(e,"a","less","string_or_numeric"),u=Object(i.a)(t,"b","less","string_or_numeric");[n,u]=Object(a.b)(n,u),Object(s.assertAndGetBroadcastShape)(n.shape,u.shape);const c={a:n,b:u};return r.a.runKernel(o.xb,c)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({logicalNot_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const t={x:Object(a.a)(e,"x","logicalNot","bool")};return r.a.runKernel(o.Db,t)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(35),s=n(4);const u=Object(s.a)({logicalOr_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){const n=Object(a.a)(e,"a","logicalOr","bool"),s=Object(a.a)(t,"b","logicalOr","bool");Object(i.assertAndGetBroadcastShape)(n.shape,s.shape);const u={a:n,b:s};return r.a.runKernel(o.Eb,u)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({einsum_:
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,...t){const n=t.map((e,t)=>Object(a.a)(e,"tensors"+t,"einsum")),i={equation:e};return r.a.runKernel(o.T,n,i)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(4),u=n(12);const c=Object(s.a)({localResponseNormalization_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=5,n=1,s=1,c=.5){const l=Object(a.a)(e,"x","localResponseNormalization");i.b(4===l.rank||3===l.rank,()=>`Error in localResponseNormalization: x must be rank 3 or 4 but got\n               rank ${l.rank}.`),i.b(i.v(t),()=>`Error in localResponseNormalization: depthRadius must be an integer but got depthRadius ${t}.`);let d=l,p=!1;3===l.rank&&(p=!0,d=Object(u.a)(l,[1,l.shape[0],l.shape[1],l.shape[2]]));const h={x:d},f={depthRadius:t,bias:n,alpha:s,beta:c},m=r.a.runKernel(o.ub,h,f);return p?Object(u.a)(m,[m.shape[1],m.shape[2],m.shape[3]]):m}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({softmax_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=-1){const n=Object(a.a)(e,"logits","softmax","float32");if(-1===t&&(t=n.rank-1),t!==n.rank-1)throw Error(`Softmax along a non-last dimension is not yet supported. Logits was rank ${n.rank} and dim was ${t}`);const i={logits:n},s={dim:t};return r.a.runKernel(o.Cc,i,s)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(72),o=n(3),a=n(46),i=n(130),s=n(179),u=n(153),c=n(23),l=n(4),d=n(29),p=n(38);const h=Object(l.a)({logSoftmax_:
+/**
+ * @license
+ * Copyright 2020 Google Inc. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=-1){const n=Object(o.a)(e,"logits","logSoftmax");if(-1===t&&(t=n.rank-1),t!==n.rank-1)throw Error(`Log Softmax along a non-last dimension is not yet supported. Logits was rank ${n.rank} and axis was ${t}`);return Object(r.a)((e,n)=>{const r=Object(u.a)(e,t,!0),o=Object(d.a)(e,r),l=Object(d.a)(Object(a.a)(o,"float32"),Object(s.a)(Object(p.a)(Object(i.a)(o),t,!0)));n([l]);return{value:l,gradFunc:(e,n)=>{const[r]=n,o=Object(i.a)(r);return Object(d.a)(e,Object(c.a)(Object(p.a)(e,t,!0),o))}}})(n)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({all_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=null,n=!1){const i={x:Object(a.a)(e,"x","all","bool")},s={axis:t,keepDims:n};return r.a.runKernel(o.f,i,s)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({any_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=null,n=!1){const i={x:Object(a.a)(e,"x","any","bool")},s={axis:t,keepDims:n};return r.a.runKernel(o.g,i,s)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({argMin_:
+/**
+ * @license
+ * Copyright 2020 Google Inc. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=0){const n={x:Object(a.a)(e,"x","argMin")},i={axis:t};return r.a.runKernel(o.i,n,i)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({cumsum_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=0,n=!1,i=!1){const s={x:Object(a.a)(e,"x","cumsum")},u={axis:t,exclusive:n,reverse:i};return r.a.runKernel(o.L,s,u)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(4);const u=Object(s.a)({denseBincount_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n,s=!1){const u=Object(a.a)(e,"x","denseBincount"),c=Object(a.a)(t,"weights","denseBincount");i.b("int32"===u.dtype,()=>"Error in denseBincount: input dtype must be int32, but got "+u.dtype),i.b(u.rank<=2,()=>`Error in denseBincount: input must be at most rank 2, but got rank ${u.rank}.`),i.b(n>=0,()=>`size must be non-negative, but got ${n}.`),i.b(c.size===u.size||0===c.size,()=>`Error in denseBincount: weights must have the same shape as x or 0-length, but got x shape: ${u.shape}, weights shape: `+c.shape+".");const l={x:u,weights:c},d={size:n,binaryOutput:s};return r.a.runKernel(o.M,l,d)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({gather_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n=0,i=0){const s={x:Object(a.a)(e,"x","gather"),indices:Object(a.a)(t,"indices","gather","int32")},u={axis:n,batchDims:i};return r.a.runKernel(o.lb,s,u)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({stridedSlice_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n,i,s=0,u=0,c=0,l=0,d=0){const p={x:Object(a.a)(e,"x","stridedSlice","string_or_numeric")},h={begin:t,end:n,strides:i,beginMask:s,endMask:u,ellipsisMask:c,newAxisMask:l,shrinkAxisMask:d};return r.a.runKernel(o.Pc,p,h)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(4),s=n(262);const u=Object(i.a)({scatterND_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n){const i=Object(a.a)(e,"indices","scatterND","int32"),u=Object(a.a)(t,"updates","scatterND");s.b(u,i,n);const c={indices:i,updates:u},l={shape:n};return r.a.runKernel(o.uc,c,l)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({gatherND_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){const n=Object(a.a)(t,"indices","gatherND","int32"),i={params:Object(a.a)(e,"x","gatherND","string_or_numeric"),indices:n};return r.a.runKernel(o.kb,i)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(4);const u=Object(s.a)({mirrorPad_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n){i.b("reflect"===n||"symmetric"===n,()=>`Invalid mode. Mode must be either reflect or symmetric. Got ${n}.`);const s=Object(a.a)(e,"x","mirrorPad");if(0===s.rank)throw new Error("mirrorPad(scalar) is not defined. Pass non-scalar to mirrorPad");i.b(t.length===s.rank,()=>`Padding doesn't match input. Must be ${s.rank}. Got ${t.length}.`);const u="reflect"===n?1:0;for(let e=0;e<s.rank;e++)i.b(2===t[e].length,()=>"Invalid number of paddings. Must be length of 2 each."),i.b(t[e][0]>=0&&t[e][0]<=s.shape[e]-u&&t[e][1]>=0&&t[e][1]<=s.shape[e]-u,()=>`Padding in dimension ${e} cannot be greater than or equal to ${s.shape[e]-u} or less than 0 for input of shape `+s.shape);const c={paddings:t,mode:n},l={x:s};return r.a.runKernel(o.Pb,l,c)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(4);const u=Object(s.a)({spaceToBatchND_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n){const s=Object(a.a)(e,"x","spaceToBatchND");i.b(s.rank>=1+t.length,()=>`input rank ${s.rank} should be > than [blockShape] ${t.length}`),i.b(n.length===t.length,()=>`paddings.shape[0] ${n.length} must be equal to [blockShape] ${t.length}`),i.b(s.shape.reduce((e,r,o)=>o>0&&o<=t.length?e&&(r+n[o-1][0]+n[o-1][1])%t[o-1]==0:e,!0),()=>`input spatial dimensions ${s.shape.slice(1)} with paddings ${n.toString()} must be divisible by blockShapes ${t.toString()}`);const u={x:s},c={blockShape:t,paddings:n};return r.a.runKernel(o.Ec,u,c)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(4);const u=Object(s.a)({batchToSpaceND_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n){const s=Object(a.a)(e,"x","batchToSpaceND"),u=t.reduce((e,t)=>e*t);i.b(s.rank>=1+t.length,()=>`input rank is ${s.rank} but should be > than blockShape.length ${t.length}`),i.b(n.length===t.length,()=>`crops.length is ${n.length} but should be equal to blockShape.length  ${t.length}`),i.b(s.shape[0]%u==0,()=>`input tensor batch is ${s.shape[0]} but is not divisible by the product of the elements of blockShape ${t.join(" * ")} === ${u}`);const c={x:s},l={blockShape:t,crops:n};return r.a.runKernel(o.t,c,l)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(4);const u=Object(s.a)({depthToSpace_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n="NHWC"){const s=Object(a.a)(e,"x","depthToSpace","float32"),u="NHWC"===n?s.shape[1]:s.shape[2],c="NHWC"===n?s.shape[2]:s.shape[3],l="NHWC"===n?s.shape[3]:s.shape[1];i.b(t>1,()=>"blockSize should be > 1 for depthToSpace, but was: "+t),i.b(u*t>=0,()=>`Negative dimension size caused by overflow when multiplying\n    ${u} and ${t}  for depthToSpace with input shape\n    ${s.shape}`),i.b(c*t>=0,()=>`Negative dimension size caused by overflow when multiplying\n    ${c} and ${t} for depthToSpace with input shape\n        ${s.shape}`),i.b(l%(t*t)==0,()=>`Dimension size must be evenly divisible by ${t*t} but is ${l} for depthToSpace with input shape ${s.shape}`);const d={x:s},p={blockSize:t,dataFormat:n};return r.a.runKernel(o.N,d,p)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6),a=n(3),i=n(4);const s=Object(i.a)({broadcastArgs_:
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t){const n=Object(a.a)(e,"s0","broadcastArgs","int32"),i=Object(a.a)(t,"s1","broadcastArgs","int32");if(1!==n.rank)throw new Error("broadcastArgs(): first input must be a vector (rank=1). Has rank "+n.rank);if(1!==i.rank)throw new Error("broadcastArgs(): second input must be a vector (rank=1). Has rank "+i.rank);const s={s0:n,s1:i};return r.a.runKernel(o.v,s)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return o.a})),n.d(t,"b",(function(){return a.a})),n.d(t,"c",(function(){return i.a})),n.d(t,"d",(function(){return s.a})),n.d(t,"e",(function(){return u.a})),n.d(t,"f",(function(){return c.a})),n.d(t,"g",(function(){return l.a})),n.d(t,"h",(function(){return p})),n.d(t,"i",(function(){return h.a})),n.d(t,"j",(function(){return f.a})),n.d(t,"k",(function(){return m.a})),n.d(t,"n",(function(){return g.a})),n.d(t,"o",(function(){return b.a})),n.d(t,"p",(function(){return y.a})),n.d(t,"q",(function(){return v.a})),n.d(t,"r",(function(){return x.a})),n.d(t,"s",(function(){return w.a})),n.d(t,"u",(function(){return O.a})),n.d(t,"v",(function(){return k.a})),n.d(t,"x",(function(){return S.a})),n.d(t,"y",(function(){return T.a})),n.d(t,"z",(function(){return C.a})),n.d(t,"A",(function(){return N})),n.d(t,"B",(function(){return A.a})),n.d(t,"C",(function(){return R.a})),n.d(t,"m",(function(){return ut})),n.d(t,"l",(function(){return r})),n.d(t,"t",(function(){return ct})),n.d(t,"w",(function(){return lt}));var r={};n.r(r),n.d(r,"conv2d",(function(){return q})),n.d(r,"depthwiseConv2d",(function(){return Q})),n.d(r,"matMul",(function(){return J}));var o=n(60),a=n(644),i=n(122),s=n(46),u=n(645),c=n(129),l=n(97),d=n(4);const p=Object(d.a)({concat2d_:function(e,t){return Object(l.a)(e,t)}});var h=n(69),f=n(130),m=n(180),g=n(23),b=n(646),y=n(12),v=n(44),x=n(372),w=n(63),O=n(373),k=n(177),S=n(29),T=n(192),C=n(88),E=n(3),I=n(9),j=n(152);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function N(e,t,n){if(Object(I.d)(e),null!=t&&2!==t.length)throw new Error("tensor2d() requires shape to have two numbers");const r=Object(E.c)(e,n);if(2!==r.length&&1!==r.length)throw new Error("tensor2d() requires values to be number[][] or flat/TypedArray");if(1===r.length&&null==t)throw new Error("tensor2d() requires shape to be provided when `values` are a flat/TypedArray");return Object(j.a)(e,t,r,n)}var A=n(264),R=n(188),_=n(266),$=n(265),F=n(234),D=n(374),M=n(5),P=n(72),L=n(6),B=n(22),z=n(35),U=n(272),V=n(37);const W=Object(d.a)({conv2DBackpropFilter_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n,r,o,a="NHWC",i){let s=e;3===e.rank&&(s=Object(y.a)(e,[1,e.shape[0],e.shape[1],e.shape[2]]));let u=t;3===u.rank&&(u=Object(y.a)(t,[1,t.shape[0],t.shape[1],t.shape[2]])),I.b(4===s.rank,()=>"Error in conv2dDerFilter: input must be rank 4, but got shape "+s.shape+"."),I.b(4===u.rank,()=>"Error in conv2dDerFilter: dy must be rank 4, but got shape "+u.shape+"."),I.b(4===n.length,()=>"Error in conv2dDerFilter: filterShape must be length 4, but got "+n+".");const c="NHWC"===a?s.shape[3]:s.shape[1],l="NHWC"===a?u.shape[3]:u.shape[1];I.b(c===n[2],()=>`Error in conv2dDerFilter: depth of input ${c}) must match input depth in filter (${n[2]}.`),I.b(l===n[3],()=>`Error in conv2dDerFilter: depth of dy (${l}) must match output depth for filter (${n[3]}).`),V.a("conv2dDerFilter",o,i);const d={x:s,dy:u},p={strides:r,pad:o,dataFormat:a,dimRoundingMode:i,filterShape:n};return M.a.runKernel(L.D,d,p)}});var G=n(397),H=n(76);const q=Object(d.a)({fusedConv2d_:
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function({x:e,filter:t,strides:n,pad:r,dataFormat:a="NHWC",dilations:i=[1,1],dimRoundingMode:s,bias:u,activation:c="linear",preluActivationWeights:l,leakyreluAlpha:d}){if(c=c||"linear",!1===Object(H.d)(M.a.state.gradientDepth,c)){let p=Object(U.a)(e,t,n,r,a,i,s);return null!=u&&(p=Object(o.a)(p,u)),Object(H.a)(p,c,l,d)}const p=Object(E.a)(e,"x","conv2d","float32"),h=Object(E.a)(t,"filter","conv2d","float32");let f=p,m=!1;3===p.rank&&(m=!0,f=Object(y.a)(p,[1,p.shape[0],p.shape[1],p.shape[2]])),I.b(4===f.rank,()=>"Error in fused conv2d: input must be rank 4, but got rank "+f.rank+"."),I.b(4===h.rank,()=>"Error in fused conv2d: filter must be rank 4, but got rank "+h.rank+"."),V.a("fused conv2d",r,s),I.b(f.shape[3]===h.shape[2],()=>`Error in conv2d: depth of input (${f.shape[3]}) must match input depth for filter ${h.shape[2]}.`),I.b(V.i(n,i),()=>`Error in conv2D: Either strides or dilations must be 1. Got strides ${n} and dilations '${i}'`),I.b("NHWC"===a,()=>`Error in conv2d: got dataFormat of ${a} but only NHWC is currently supported.`);const g=V.b(f.shape,h.shape,n,i,r,s);let b,v;null!=u&&(b=Object(E.a)(u,"bias","fused conv2d"),[b]=Object(B.b)(b,p),z.assertAndGetBroadcastShape(g.outShape,b.shape)),null!=l&&(v=Object(E.a)(l,"prelu weights","fused conv2d"));const x=(e,t)=>{const[o,a,s,u]=t,l=Object(H.c)(e,s,c);I.b(V.j(i),()=>`Error in gradient of fused conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${i}'`);const d=[Object(G.a)(a.shape,l,o,n,r),W(a,l,o.shape,n,r)];if(null!=u){const e=Object(H.b)(u,l);d.push(e)}return d},w={x:f,filter:h,bias:b,preluActivationWeights:v},O={strides:n,pad:r,dataFormat:a,dilations:i,dimRoundingMode:s,activation:c,leakyreluAlpha:d};if(null==u){return Object(P.a)((e,t,n)=>{let r=M.a.runKernel(L.ib,w,O);return n([t,e,r]),m&&(r=Object(y.a)(r,[r.shape[1],r.shape[2],r.shape[3]])),{value:r,gradFunc:x}})(f,h)}return Object(P.a)((e,t,n,r)=>{let o=M.a.runKernel(L.ib,w,O);return r([t,e,o,n]),m&&(o=Object(y.a)(o,[o.shape[1],o.shape[2],o.shape[3]])),{value:o,gradFunc:x}})(f,h,b)}});var K=n(392);
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const X=Object(d.a)({depthwiseConv2dNativeBackpropFilter_:function(e,t,n,r,o,a=[1,1],i){let s=e;3===e.rank&&(s=Object(y.a)(e,[1,e.shape[0],e.shape[1],e.shape[2]]));let u=t;3===u.rank&&(u=Object(y.a)(t,[1,t.shape[0],t.shape[1],t.shape[2]]));const c={x:s,dy:u},l={strides:r,pad:o,dimRoundingMode:i,dilations:a,filterShape:n};return M.a.runKernel(L.P,c,l)}});
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Y=Object(d.a)({depthwiseConv2dNativeBackpropInput_:function(e,t,n,r,o,a=[1,1],i){let s=t,u=!1;3===t.rank&&(u=!0,s=Object(y.a)(t,[1,t.shape[0],t.shape[1],t.shape[2]]));const c={dy:s,filter:n},l={strides:r,pad:o,dimRoundingMode:i,dilations:a,inputShape:e},d=M.a.runKernel(L.Q,c,l);return u?Object(y.a)(d,[d.shape[1],d.shape[2],d.shape[3]]):d}});
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Q=Object(d.a)({fusedDepthwiseConv2d_:function({x:e,filter:t,strides:n,pad:r,dataFormat:a="NHWC",dilations:i=[1,1],dimRoundingMode:s,bias:u,activation:c="linear",preluActivationWeights:l,leakyreluAlpha:d}){if(!1===Object(H.d)(M.a.state.gradientDepth,c)){let p=Object(K.a)(e,t,n,r,a,i,s);return null!=u&&(p=Object(o.a)(p,u)),Object(H.a)(p,c,l,d)}const p=Object(E.a)(e,"x","depthwiseConv2d","float32"),h=Object(E.a)(t,"filter","depthwiseConv2d","float32");let f=p,m=!1;3===p.rank&&(m=!0,f=Object(y.a)(p,[1,p.shape[0],p.shape[1],p.shape[2]])),I.b(4===f.rank,()=>`Error in fused depthwiseConv2d: input must be rank 4, but got rank ${f.rank}.`),I.b(4===h.rank,()=>`Error in fused depthwiseConv2d: filter must be rank 4, but got rank ${h.rank}.`),I.b(f.shape[3]===h.shape[2],()=>`Error in fused depthwiseConv2d: number of input channels (${f.shape[3]}) must match the inChannels dimension in filter ${h.shape[2]}.`),null==i&&(i=[1,1]),I.b(V.i(n,i),()=>`Error in fused depthwiseConv2d: Either strides or dilations must be 1. Got strides ${n} and dilations '${i}'`),V.a("fused depthwiseConv2d",r,s);const g=V.b(f.shape,h.shape,n,i,r,s,!0);let b,v;null!=u&&(b=Object(E.a)(u,"bias","fused conv2d"),[b]=Object(B.b)(b,p),z.assertAndGetBroadcastShape(g.outShape,b.shape)),null!=l&&(v=Object(E.a)(l,"prelu weights","fused depthwiseConv2d"));const x=(e,t)=>{I.b(V.j(i),()=>`Error in gradient of fused depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '${i}'`);const[o,a,u,l]=t,d=Object(H.c)(e,u,c),p=Y(a.shape,d,o,n,r,i,s),h=X(a,d,o.shape,n,r,i,s);if(null!=l){return[p,h,Object(H.b)(b,d)]}return[p,h]},w={x:f,filter:h,bias:b,preluActivationWeights:v},O={strides:n,pad:r,dataFormat:a,dilations:i,dimRoundingMode:s,activation:c,leakyreluAlpha:d};if(null==u){return Object(P.a)((e,t,n)=>{let r=M.a.runKernel(L.jb,w,O);return n([t,e,r]),m&&(r=Object(y.a)(r,[r.shape[1],r.shape[2],r.shape[3]])),{value:r,gradFunc:x}})(f,h)}return Object(P.a)((e,t,n,r)=>{let o=M.a.runKernel(L.jb,w,O);return r([t,e,o,n]),m&&(o=Object(y.a)(o,[o.shape[1],o.shape[2],o.shape[3]])),{value:o,gradFunc:x}})(f,h,b)}});var Z=n(64);
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const J=Object(d.a)({fusedMatMul_:function({a:e,b:t,transposeA:n=!1,transposeB:r=!1,bias:a,activation:i="linear",preluActivationWeights:s,leakyreluAlpha:u}){if(!1===Object(H.d)(M.a.state.gradientDepth,i)){let c=Object(Z.a)(e,t,n,r);return null!=a&&(c=Object(o.a)(c,a)),Object(H.a)(c,i,s,u)}let c=Object(E.a)(e,"a","fused matMul"),l=Object(E.a)(t,"b","fused matMul");[c,l]=Object(B.b)(c,l);const d=n?c.shape[c.rank-2]:c.shape[c.rank-1],p=r?l.shape[l.rank-1]:l.shape[l.rank-2],h=n?c.shape[c.rank-1]:c.shape[c.rank-2],f=r?l.shape[l.rank-2]:l.shape[l.rank-1],m=c.shape.slice(0,-2),g=l.shape.slice(0,-2),b=I.O(m),v=I.O(g);I.b(d===p,()=>`Error in fused matMul: inner shapes (${d}) and (${p}) of Tensors with shapes ${c.shape} and ${l.shape} and transposeA=${n} and transposeB=${r} must match.`);const x=z.assertAndGetBroadcastShape(c.shape.slice(0,-2),l.shape.slice(0,-2)).concat([h,f]),w=n?Object(y.a)(c,[b,d,h]):Object(y.a)(c,[b,h,d]),O=r?Object(y.a)(l,[v,f,p]):Object(y.a)(l,[v,p,f]);let k,S;null!=a&&(k=Object(E.a)(a,"bias","fused matMul"),[k]=Object(B.b)(k,c),z.assertAndGetBroadcastShape(x,k.shape)),null!=s&&(S=Object(E.a)(s,"prelu weights","fused matMul"));const T=(e,t)=>{const[o,s,u,c]=t,l=Object(H.c)(Object(y.a)(e,u.shape),u,i);let d,p;if(n||r?!n&&r?(d=Object(Z.a)(l,s,!1,!1),p=Object(Z.a)(l,o,!0,!1)):n&&!r?(d=Object(Z.a)(s,l,!1,!0),p=Object(Z.a)(o,l,!1,!1)):(d=Object(Z.a)(s,l,!0,!0),p=Object(Z.a)(l,o,!0,!0)):(d=Object(Z.a)(l,s,!1,!0),p=Object(Z.a)(o,l,!0,!1)),null!=a){return[d,p,Object(H.b)(c,l)]}return[d,p]},C={a:w,b:O,bias:k,preluActivationWeights:S},j={transposeA:n,transposeB:r,activation:i,leakyreluAlpha:u};if(null==a){return Object(P.a)((e,t,n)=>{const r=M.a.runKernel(L.fd,C,j);return n([e,t,r]),{value:Object(y.a)(r,x),gradFunc:T}})(w,O)}return Object(P.a)((e,t,n,r)=>{const o=M.a.runKernel(L.fd,C,j);return r([e,t,o,n]),{value:Object(y.a)(o,x),gradFunc:T}})(w,O,k)}});
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function ee(e,t,n){const r=1-e%2,o=new Float32Array(e);for(let a=0;a<e;++a){const i=2*Math.PI*a/(e+r-1);o[a]=t-n*Math.cos(i)}return Object(C.a)(o,"float32")}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */Object(d.a)({hammingWindow_:function(e){return ee(e,.54,.46)}});
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const te=Object(d.a)({hannWindow_:function(e){return ee(e,.5,.5)}});var ne=n(269);
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const re=Object(d.a)({frame_:function(e,t,n,r=!1,o=0){let a=0;const i=[];for(;a+t<=e.size;)i.push(Object(w.a)(e,a,t)),a+=n;if(r)for(;a<e.size;){const r=a+t-e.size,s=Object(l.a)([Object(w.a)(e,a,t-r),Object(ne.a)([r],o)]);i.push(s),a+=n}return 0===i.length?N([],[0,t]):Object(y.a)(Object(l.a)(i),[i.length,t])}});
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */Object(d.a)({stft_:function(e,t,n,r,o=te){var a;null==r&&(a=t,r=Math.floor(Math.pow(2,Math.ceil(Math.log(a)/Math.log(2)))));const i=re(e,t,n),s=Object(g.a)(i,o(t));return Object(_.a)(s,r)}});
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const oe=Object(d.a)({cropAndResize_:function(e,t,n,r,o="bilinear",a=0){const i=Object(E.a)(e,"image","cropAndResize"),s=Object(E.a)(t,"boxes","cropAndResize","float32"),u=Object(E.a)(n,"boxInd","cropAndResize","int32"),c=s.shape[0];I.b(4===i.rank,()=>`Error in cropAndResize: image must be rank 4,but got rank ${i.rank}.`),I.b(2===s.rank&&4===s.shape[1],()=>`Error in cropAndResize: boxes must be have size [${c},4] but had shape ${s.shape}.`),I.b(1===u.rank&&u.shape[0]===c,()=>`Error in cropAndResize: boxInd must be have size [${c}] but had shape ${s.shape}.`),I.b(2===r.length,()=>`Error in cropAndResize: cropSize must be of length 2, but got length ${r.length}.`),I.b(r[0]>=1&&r[1]>=1,()=>"cropSize must be atleast [1,1], but was "+r),I.b("bilinear"===o||"nearest"===o,()=>"method must be bilinear or nearest, but was "+o);const l={image:i,boxes:s,boxInd:u},d={method:o,extrapolationValue:a,cropSize:r};return M.a.runKernel(L.K,l,d)}});
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ae=Object(d.a)({flipLeftRight_:function(e){const t=Object(E.a)(e,"image","flipLeftRight","float32");I.b(4===t.rank,()=>`Error in flipLeftRight: image must be rank 4,but got rank ${t.rank}.`);const n={image:t};return M.a.runKernel(L.db,n,{})}});var ie=n(193);
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const se=Object(d.a)({grayscaleToRGB_:function(e){const t=Object(E.a)(e,"image","grayscaleToRGB"),n=t.rank-1,r=t.shape[n];I.b(t.rank>=2,()=>`Error in grayscaleToRGB: images must be at least rank 2, but got rank ${t.rank}.`),I.b(1===r,()=>`Error in grayscaleToRGB: last dimension of a grayscale image should be size 1, but got size ${r}.`);const o=new Array(t.rank);return o.fill(1,0,n),o[n]=3,Object(ie.a)(t,o)}});
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ue=Object(d.a)({rotateWithOffset_:function(e,t,n=0,r=.5){const o=Object(E.a)(e,"image","rotateWithOffset","float32");I.b(4===o.rank,()=>`Error in rotateWithOffset: image must be rank 4,but got rank ${o.rank}.`);const a={image:o},i={radians:t,fillValue:n,center:r};return M.a.runKernel(L.rc,a,i)}});
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function ce(e,t,n,r,o,a){null==r&&(r=.5),null==o&&(o=Number.NEGATIVE_INFINITY),null==a&&(a=0);const i=e.shape[0];return n=Math.min(n,i),I.b(0<=r&&r<=1,()=>`iouThreshold must be in [0, 1], but was '${r}'`),I.b(2===e.rank,()=>`boxes must be a 2D tensor, but was of rank '${e.rank}'`),I.b(4===e.shape[1],()=>"boxes must have 4 columns, but 2nd dimension was "+e.shape[1]),I.b(1===t.rank,()=>"scores must be a 1D tensor"),I.b(t.shape[0]===i,()=>`scores has incompatible shape with boxes. Expected ${i}, but was `+t.shape[0]),I.b(0<=a&&a<=1,()=>`softNmsSigma must be in [0, 1], but was '${a}'`),{maxOutputSize:n,iouThreshold:r,scoreThreshold:o,softNmsSigma:a}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const le=Object(d.a)({nonMaxSuppression_:function(e,t,n,r=.5,o=Number.NEGATIVE_INFINITY){const a=Object(E.a)(e,"boxes","nonMaxSuppression","float32"),i=Object(E.a)(t,"scores","nonMaxSuppression","float32"),s=ce(a,i,n,r,o),u={maxOutputSize:n=s.maxOutputSize,iouThreshold:r=s.iouThreshold,scoreThreshold:o=s.scoreThreshold};return M.a.runKernel(L.Ub,{boxes:a,scores:i},u)}});var de=n(149);
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const pe=async function(e,t,n,r=.5,o=Number.NEGATIVE_INFINITY){const a=Object(E.a)(e,"boxes","nonMaxSuppressionAsync"),i=Object(E.a)(t,"scores","nonMaxSuppressionAsync"),s=ce(a,i,n,r,o);n=s.maxOutputSize,r=s.iouThreshold,o=s.scoreThreshold;const u=await Promise.all([a.data(),i.data()]),c=u[0],l=u[1],{selectedIndices:d}=Object(de.a)(c,l,n,r,o);return a!==e&&a.dispose(),i!==t&&i.dispose(),Object(C.a)(d,"int32")};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const he=Object(d.a)({nonMaxSuppressionWithScore_:function(e,t,n,r=.5,o=Number.NEGATIVE_INFINITY,a=0){const i=Object(E.a)(e,"boxes","nonMaxSuppression"),s=Object(E.a)(t,"scores","nonMaxSuppression"),u=ce(i,s,n,r,o,a),c={boxes:i,scores:s},l={maxOutputSize:n=u.maxOutputSize,iouThreshold:r=u.iouThreshold,scoreThreshold:o=u.scoreThreshold,softNmsSigma:a=u.softNmsSigma},d=M.a.runKernel(L.Wb,c,l);return{selectedIndices:d[0],selectedScores:d[1]}}});
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const fe=async function(e,t,n,r=.5,o=Number.NEGATIVE_INFINITY,a=0){const i=Object(E.a)(e,"boxes","nonMaxSuppressionAsync"),s=Object(E.a)(t,"scores","nonMaxSuppressionAsync"),u=ce(i,s,n,r,o,a);n=u.maxOutputSize,r=u.iouThreshold,o=u.scoreThreshold,a=u.softNmsSigma;const c=await Promise.all([i.data(),s.data()]),l=c[0],d=c[1],{selectedIndices:p,selectedScores:h}=Object(de.c)(l,d,n,r,o,a);return i!==e&&i.dispose(),s!==t&&s.dispose(),{selectedIndices:Object(C.a)(p,"int32"),selectedScores:Object(C.a)(h)}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const me=Object(d.a)({nonMaxSuppressionPadded_:function(e,t,n,r=.5,o=Number.NEGATIVE_INFINITY,a=!1){const i=Object(E.a)(e,"boxes","nonMaxSuppression"),s=Object(E.a)(t,"scores","nonMaxSuppression"),u=ce(i,s,n,r,o,null),c={boxes:i,scores:s},l={maxOutputSize:u.maxOutputSize,iouThreshold:u.iouThreshold,scoreThreshold:u.scoreThreshold,padToMaxOutputSize:a},d=M.a.runKernel(L.Vb,c,l);return{selectedIndices:d[0],validOutputs:d[1]}}});
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ge=async function(e,t,n,r=.5,o=Number.NEGATIVE_INFINITY,a=!1){const i=Object(E.a)(e,"boxes","nonMaxSuppressionAsync"),s=Object(E.a)(t,"scores","nonMaxSuppressionAsync"),u=ce(i,s,n,r,o,null),c=u.maxOutputSize,l=u.iouThreshold,d=u.scoreThreshold,[p,h]=await Promise.all([i.data(),s.data()]),{selectedIndices:f,validOutputs:m}=Object(de.b)(p,h,c,l,d,a);return i!==e&&i.dispose(),s!==t&&s.dispose(),{selectedIndices:Object(C.a)(f,"int32"),validOutputs:Object(v.a)(m,"int32")}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const be=Object(d.a)({resizeBilinear_:function(e,t,n=!1,r=!1){const o=Object(E.a)(e,"images","resizeBilinear");I.b(3===o.rank||4===o.rank,()=>`Error in resizeBilinear: x must be rank 3 or 4, but got rank ${o.rank}.`),I.b(2===t.length,()=>"Error in resizeBilinear: new shape must 2D, but got shape "+t+"."),I.b(!1===r||!1===n,()=>"Error in resizeBilinear: If halfPixelCenters is true, alignCorners must be false.");let a=o,i=!1;3===o.rank&&(i=!0,a=Object(y.a)(o,[1,o.shape[0],o.shape[1],o.shape[2]]));const[]=t,s={images:a},u={alignCorners:n,halfPixelCenters:r,size:t},c=M.a.runKernel(L.mc,s,u);return i?Object(y.a)(c,[c.shape[1],c.shape[2],c.shape[3]]):c}});
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ye=Object(d.a)({resizeNearestNeighbor_:function(e,t,n=!1,r=!1){const o=Object(E.a)(e,"images","resizeNearestNeighbor");I.b(3===o.rank||4===o.rank,()=>`Error in resizeNearestNeighbor: x must be rank 3 or 4, but got rank ${o.rank}.`),I.b(2===t.length,()=>"Error in resizeNearestNeighbor: new shape must 2D, but got shape "+t+"."),I.b("float32"===o.dtype||"int32"===o.dtype,()=>"`images` must have `int32` or `float32` as dtype"),I.b(!1===r||!1===n,()=>"Error in resizeNearestNeighbor: If halfPixelCenters is true, alignCorners must be false.");let a=o,i=!1;3===o.rank&&(i=!0,a=Object(y.a)(o,[1,o.shape[0],o.shape[1],o.shape[2]]));const[]=t,s={images:a},u={alignCorners:n,halfPixelCenters:r,size:t},c=M.a.runKernel(L.oc,s,u);return i?Object(y.a)(c,[c.shape[1],c.shape[2],c.shape[3]]):c}});var ve=n(178),xe=n(375),we=n(270),Oe=n(236),ke=n(38),Se=n(376),Te=n(138),Ce=n(194);const Ee=Object(d.a)({threshold_:
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t="binary",n=!1,r=.5){const a=Object(E.a)(e,"image","threshold"),i=a.shape[0]*a.shape[1];let u,c,l,d,p=Object(g.a)(Object(C.a)([r]),255);if(I.b(3===a.rank,()=>`Error in threshold: image must be rank 3,but got rank ${a.rank}.`),I.b(3===a.shape[2]||1===a.shape[2],()=>`Error in threshold: image color channel must be equal to 3 or 1but got ${a.shape[2]}.`),I.b("int32"===a.dtype||"float32"===a.dtype,()=>`Error in dtype: image dtype must be int32 or float32,but got dtype ${a.dtype}.`),I.b("otsu"===t||"binary"===t,()=>"Method must be binary or otsu, but was "+t),3===a.shape[2]){[u,c,l]=Object(ve.a)(a,[1,1,1],-1);const e=Object(g.a)(u,.2989),t=Object(g.a)(c,.587),n=Object(g.a)(l,.114);d=Object(o.a)(Object(o.a)(e,t),n)}else d=e;if("otsu"===t){p=function(e,t){let n,r,a,i,s,u,c=Object(C.a)([-1]),l=Object(C.a)([0]),d=Object(C.a)([0]);for(let p=0;p<e.size-1;p++){n=Object(w.a)(e,0,p+1),r=Object(w.a)(e,p+1),s=Object(h.a)(Object(ke.a)(n),t),u=Object(h.a)(Object(ke.a)(r),t);const f=Object(ke.a)(Object(g.a)(n,Object(Ce.a)(0,n.size)));a=Object(h.a)(f,Object(ke.a)(n));const m=Object(ne.a)(r.shape,n.size),b=Object(o.a)(Object(Ce.a)(0,r.size),m),y=Object(g.a)(r,b);i=Object(h.a)(Object(ke.a)(y),Object(ke.a)(r));const v=Object(S.a)(a,i),x=Object(S.a)(a,i),O=Object(g.a)(s,u);d=Object(g.a)(Object(g.a)(O,v),x);const k=Object(Oe.a)(d,l);l=Object(Te.a)(k,d,l),c=Object(Te.a)(k,Object(C.a)([p]),c)}return c}(Object(xe.a)(Object(s.a)(Object(Se.a)(d),"int32"),Object(T.a)([]),256),i)}const f=n?Object(we.a)(d,p):Object(Oe.a)(d,p);return Object(s.a)(Object(g.a)(f,255),"int32")}});
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Ie=Object(d.a)({transform_:function(e,t,n="nearest",r="constant",o=0,a){const i=Object(E.a)(e,"image","transform","float32"),s=Object(E.a)(t,"transforms","transform","float32");I.b(4===i.rank,()=>`Error in transform: image must be rank 4,but got rank ${i.rank}.`),I.b(2===s.rank&&(s.shape[0]===i.shape[0]||1===s.shape[0])&&8===s.shape[1],()=>"Error in transform: Input transform should be batch x 8 or 1 x 8"),I.b(null==a||2===a.length,()=>`Error in transform: outputShape must be [height, width] or null, but got ${a}.`);const u={image:i,transforms:s},c={interpolation:n,fillMode:r,fillValue:o,outputShape:a};return M.a.runKernel(L.Zc,u,c)}});var je=n(378),Ne=n(377);Object(d.a)({bandPart_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n){Object(I.b)(t%1==0,()=>`bandPart(): numLower must be an integer, got ${t}.`),Object(I.b)(n%1==0,()=>`bandPart(): numUpper must be an integer, got ${n}.`);const r=Object(E.a)(e,"a","bandPart");Object(I.b)(r.rank>=2,()=>`bandPart(): Rank must be at least 2, got ${r.rank}.`);const o=r.shape,[a,i]=r.shape.slice(-2);if(!(t<=a))throw new Error(`bandPart(): numLower (${t}) must not be greater than the number of rows (${a}).`);if(!(n<=i))throw new Error(`bandPart(): numUpper (${n}) must not be greater than the number of columns (${i}).`);t<0&&(t=a),n<0&&(n=i);const s=Object(y.a)(Object(Ce.a)(0,a,1,"int32"),[-1,1]),u=Object(Ce.a)(0,i,1,"int32"),c=Object(S.a)(s,u),l=Object(Ne.a)(Object(we.a)(c,Object(v.a)(+t,"int32")),Object(je.a)(c,Object(v.a)(-n,"int32"))),d=Object(R.a)([a,i],r.dtype);return Object(y.a)(Object(k.a)(Object(A.a)(Object(y.a)(r,[-1,a,i])).map(e=>Object(Te.a)(l,e,d))),o)}});var Ae=n(89),Re=n(189),_e=n(153),$e=n(341),Fe=n(379),De=n(342),Me=n(271);const Pe=Object(d.a)({norm_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t="euclidean",n=null,r=!1){const o=function e(t,n,r=null){if(0===t.rank)return Object(Ae.a)(t);if(1!==t.rank&&null===r)return e(Object(y.a)(t,[-1]),n,r);if(1===t.rank||"number"==typeof r||Array.isArray(r)&&1===r.length){if(1===n)return Object(ke.a)(Object(Ae.a)(t),r);if(n===1/0)return Object(_e.a)(Object(Ae.a)(t),r);if(n===-1/0)return Object($e.a)(Object(Ae.a)(t),r);if("euclidean"===n||2===n)return Object(De.a)(Object(ke.a)(Object(Fe.a)(Object(Ae.a)(t),Object(v.a)(2,"int32")),r));throw new Error("Error in norm: invalid ord value: "+n)}if(Array.isArray(r)&&2===r.length){if(1===n)return Object(_e.a)(Object(ke.a)(Object(Ae.a)(t),r[0]),r[1]-1);if(n===1/0)return Object(_e.a)(Object(ke.a)(Object(Ae.a)(t),r[1]),r[0]);if(n===-1/0)return Object($e.a)(Object(ke.a)(Object(Ae.a)(t),r[1]),r[0]);if("fro"===n||"euclidean"===n)return Object(De.a)(Object(ke.a)(Object(Me.a)(t),r));throw new Error("Error in norm: invalid ord value: "+n)}throw new Error("Error in norm: invalid axis: "+r)}(e=Object(E.a)(e,"x","norm"),t,n);let a=o.shape;if(r){const t=Object(I.I)(n,e.shape);a=Re.e(o.shape,t)}return Object(y.a)(o,a)}});
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */Object(d.a)({gramSchmidt_:function(e){let t;if(Array.isArray(e)){t=!1,Object(I.b)(null!=e&&e.length>0,()=>"Gram-Schmidt process: input must not be null, undefined, or empty");const n=e[0].shape[0];for(let t=1;t<e.length;++t)Object(I.b)(e[t].shape[0]===n,()=>`Gram-Schmidt: Non-unique lengths found in the input vectors: (${e[t].shape[0]} vs. ${n})`)}else t=!0,e=Object(ve.a)(e,e.shape[0],0).map(e=>Object(O.a)(e,[0]));Object(I.b)(e.length<=e[0].shape[0],()=>`Gram-Schmidt: Number of vectors (${e.length}) exceeds number of dimensions (${e[0].shape[0]}).`);const n=[],r=e;for(let t=0;t<e.length;++t)n.push(M.a.tidy(()=>{let e=r[t];if(t>0)for(let r=0;r<t;++r){const t=Object(g.a)(Object(ke.a)(Object(g.a)(n[r],e)),n[r]);e=Object(S.a)(e,t)}return Object(h.a)(e,Pe(e,"euclidean"))}));return t?Object(k.a)(n,0):n}});var Le=n(380);
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Be=Object(d.a)({eye_:function(e,t,n,r="float32"){null==t&&(t=e);const o=Object(i.a)([e,t],r),a=e<=t?e:t;for(let e=0;e<a;++e)o.set(1,e,e);const s=Object(y.a)(o.toTensor(),[e,t]);if(null==n)return s;if(1===n.length)return Object(ie.a)(Object(m.a)(s,0),[n[0],1,1]);if(2===n.length)return Object(ie.a)(Object(m.a)(Object(m.a)(s,0),0),[n[0],n[1],1,1]);if(3===n.length)return Object(ie.a)(Object(m.a)(Object(m.a)(Object(m.a)(s,0),0),0),[n[0],n[1],n[2],1,1]);throw new Error(`eye() currently supports only 1D and 2D batchShapes, but received ${n.length}D.`)}});var ze=n(150),Ue=n(343);function Ve(e,t=!1){return M.a.tidy(()=>{Object(I.b)(2===e.shape.length,()=>`qr2d() requires a 2D Tensor, but got a ${e.shape.length}D Tensor.`);const n=e.shape[0],r=e.shape[1];let o=Be(n),a=Object(c.a)(e);const i=N([[1]],[1,1]);let s=Object(c.a)(i);const u=n>=r?r:n;for(let e=0;e<u;++e){const t=a,u=s,d=o;[s,a,o]=M.a.tidy(()=>{const t=Object(w.a)(a,[e,e],[n-e,1]),u=Pe(t),d=Object(w.a)(a,[e,e],[1,1]),p=Object(Te.a)(Object(Oe.a)(d,0),N([[-1]]),N([[1]])),f=Object(S.a)(d,Object(g.a)(p,u)),m=Object(h.a)(t,f);s=1===m.shape[0]?Object(c.a)(i):Object(l.a)([i,Object(w.a)(m,[1,0],[m.shape[0]-1,m.shape[1]])],0);const b=Object(ze.a)(Object(h.a)(Object(Z.a)(p,f),u)),y=Object(w.a)(a,[e,0],[n-e,r]),v=Object(g.a)(b,s),x=Object(Ue.a)(s);if(0===e)a=Object(S.a)(y,Object(Z.a)(v,Object(Z.a)(x,y)));else{const t=Object(S.a)(y,Object(Z.a)(v,Object(Z.a)(x,y)));a=Object(l.a)([Object(w.a)(a,[0,0],[e,r]),t],0)}const O=Object(Ue.a)(v),k=Object(w.a)(o,[0,e],[n,o.shape[1]-e]);if(0===e)o=Object(S.a)(k,Object(Z.a)(Object(Z.a)(k,s),O));else{const t=Object(S.a)(k,Object(Z.a)(Object(Z.a)(k,s),O));o=Object(l.a)([Object(w.a)(o,[0,0],[n,e]),t],1)}return[s,a,o]}),Object(Le.a)([t,u,d])}return!t&&n>r&&(o=Object(w.a)(o,[0,0],[n,r]),a=Object(w.a)(a,[0,0],[r,r])),[o,a]})}Object(d.a)({qr_:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t=!1){if(Object(I.b)(e.rank>=2,()=>"qr() requires input tensor to have a rank >= 2, but got rank "+e.rank),2===e.rank)return Ve(e,t);{const n=e.shape.slice(0,e.shape.length-2).reduce((e,t)=>e*t),r=Object(A.a)(Object(y.a)(e,[n,e.shape[e.shape.length-2],e.shape[e.shape.length-1]]),0),o=[],a=[];r.forEach(e=>{const[n,r]=Ve(e,t);o.push(n),a.push(r)});return[Object(y.a)(Object(k.a)(o,0),e.shape),Object(y.a)(Object(k.a)(a,0),e.shape)]}}});var We=n(61),Ge=n(381),He=n(383),qe=n(382);const Ke=Object(d.a)({computeWeightedLoss_:function(e,t,n=We.a.SUM_BY_NONZERO_WEIGHTS){const r=Object(E.a)(e,"losses","computeWeightedLoss");let o=null;null!=t&&(o=Object(E.a)(t,"weights","computeWeightedLoss"));const a=null==o?r:Object(g.a)(r,o);if(n===We.a.NONE)return a;if(n===We.a.SUM)return Object(ke.a)(a);if(n===We.a.MEAN){if(null==o)return Object(Ge.a)(a);{const e=r.size/o.size,t=Object(h.a)(Object(ke.a)(a),Object(ke.a)(o));return e>1?Object(h.a)(t,Object(v.a)(e)):t}}if(n===We.a.SUM_BY_NONZERO_WEIGHTS){if(null==o)return Object(h.a)(Object(ke.a)(a),Object(v.a)(r.size));{const e=Object(g.a)(o,Object(qe.a)(r.shape)),t=Object(s.a)(Object(ke.a)(Object(He.a)(e,Object(v.a)(0))),"float32");return Object(h.a)(Object(ke.a)(a),t)}}throw Error("Unknown reduction: "+n)}});
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */Object(d.a)({absoluteDifference_:function(e,t,n,r=We.a.SUM_BY_NONZERO_WEIGHTS){const o=Object(E.a)(e,"labels","absoluteDifference"),a=Object(E.a)(t,"predictions","absoluteDifference");let i=null;null!=n&&(i=Object(E.a)(n,"weights","absoluteDifference")),Object(I.e)(o.shape,a.shape,"Error in absoluteDifference: ");const s=Object(Ae.a)(Object(S.a)(o,a));return Ke(s,i,r)}});Object(d.a)({cosineDistance_:function(e,t,n,r,o=We.a.SUM_BY_NONZERO_WEIGHTS){const a=Object(E.a)(e,"labels","cosineDistance"),i=Object(E.a)(t,"predictions","cosineDistance");let s=null;null!=r&&(s=Object(E.a)(r,"weights","cosineDistance")),Object(I.e)(a.shape,i.shape,"Error in cosineDistance: ");const u=Object(v.a)(1),c=Object(S.a)(u,Object(ke.a)(Object(g.a)(a,i),n,!0));return Ke(c,s,o)}});var Xe=n(190);Object(d.a)({hingeLoss_:function(e,t,n,r=We.a.SUM_BY_NONZERO_WEIGHTS){let o=Object(E.a)(e,"labels","hingeLoss");const a=Object(E.a)(t,"predictions","hingeLoss");let i=null;null!=n&&(i=Object(E.a)(n,"weights","hingeLoss")),Object(I.e)(o.shape,a.shape,"Error in hingeLoss: ");const s=Object(v.a)(1);o=Object(S.a)(Object(g.a)(Object(v.a)(2),o),s);const u=Object(Xe.a)(Object(S.a)(s,Object(g.a)(o,a)));return Ke(u,i,r)}});var Ye=n(384);
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */Object(d.a)({huberLoss_:function(e,t,n,r=1,a=We.a.SUM_BY_NONZERO_WEIGHTS){const i=Object(E.a)(e,"labels","huberLoss"),s=Object(E.a)(t,"predictions","huberLoss");let u=null;null!=n&&(u=Object(E.a)(n,"weights","huberLoss")),Object(I.e)(i.shape,s.shape,"Error in huberLoss: ");const c=Object(v.a)(r),l=Object(Ae.a)(Object(S.a)(s,i)),d=Object(Ye.a)(l,c),p=Object(S.a)(l,d),h=Object(o.a)(Object(g.a)(Object(v.a)(.5),Object(Me.a)(d)),Object(g.a)(c,p));return Ke(h,u,a)}});var Qe=n(179);
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */Object(d.a)({logLoss_:function(e,t,n,r=1e-7,a=We.a.SUM_BY_NONZERO_WEIGHTS){const i=Object(E.a)(e,"labels","logLoss"),s=Object(E.a)(t,"predictions","logLoss");let u=null;null!=n&&(u=Object(E.a)(n,"weights","logLoss")),Object(I.e)(i.shape,s.shape,"Error in logLoss: ");const c=Object(v.a)(1),l=Object(v.a)(r),d=Object(ze.a)(Object(g.a)(i,Object(Qe.a)(Object(o.a)(s,l)))),p=Object(g.a)(Object(S.a)(c,i),Object(Qe.a)(Object(o.a)(Object(S.a)(c,s),l))),h=Object(S.a)(d,p);return Ke(h,u,a)}});var Ze=n(385);
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */Object(d.a)({meanSquaredError_:function(e,t,n,r=We.a.SUM_BY_NONZERO_WEIGHTS){const o=Object(E.a)(e,"labels","meanSquaredError"),a=Object(E.a)(t,"predictions","meanSquaredError");let i=null;null!=n&&(i=Object(E.a)(n,"weights","meanSquaredError")),Object(I.e)(o.shape,a.shape,"Error in meanSquaredError: ");const s=Object(Ze.a)(o,a);return Ke(s,i,r)}});var Je=n(386);
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */Object(d.a)({sigmoidCrossEntropy_:function(e,t,n,r=0,a=We.a.SUM_BY_NONZERO_WEIGHTS){let i=Object(E.a)(e,"multiClassLabels","sigmoidCrossEntropy");const s=Object(E.a)(t,"logits","sigmoidCrossEntropy");let u=null;if(null!=n&&(u=Object(E.a)(n,"weights","sigmoidCrossEntropy")),Object(I.e)(i.shape,s.shape,"Error in sigmoidCrossEntropy: "),r>0){const e=Object(v.a)(r),t=Object(v.a)(1),n=Object(v.a)(.5);i=Object(o.a)(Object(g.a)(i,Object(S.a)(t,e)),Object(g.a)(n,e))}const c=function(e,t){const n=Object(E.a)(e,"labels","sigmoidCrossEntropyWithLogits"),r=Object(E.a)(t,"logits","sigmoidCrossEntropyWithLogits");Object(I.e)(n.shape,r.shape,"Error in sigmoidCrossEntropyWithLogits: ");const a=Object(Xe.a)(r),i=Object(g.a)(r,n),s=Object(Je.a)(Object(f.a)(Object(ze.a)(Object(Ae.a)(r))));return Object(o.a)(Object(S.a)(a,i),s)}(i,s);return Ke(c,u,a)}});
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const et=Object(d.a)({logSumExp_:function(e,t=null,n=!1){const r=Object(E.a)(e,"x","logSumExp"),a=Object(I.I)(t,r.shape),i=Object(_e.a)(r,a,!0),s=Object(S.a)(r,i),u=Object(f.a)(s),c=Object(ke.a)(u,a),l=Object(Qe.a)(c),d=Object(o.a)(Object(y.a)(i,l.shape),l);if(n){const e=Object(Re.e)(d.shape,a);return Object(y.a)(d,e)}return d}});
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */Object(d.a)({softmaxCrossEntropy_:function(e,t,n,r=0,a=We.a.SUM_BY_NONZERO_WEIGHTS){let i=Object(E.a)(e,"onehotLabels","softmaxCrossEntropy");const u=Object(E.a)(t,"logits","softmaxCrossEntropy");let c=null;if(null!=n&&(c=Object(E.a)(n,"weights","softmaxCrossEntropy")),Object(I.e)(i.shape,u.shape,"Error in softmaxCrossEntropy: "),r>0){const e=Object(v.a)(r),t=Object(v.a)(1),n=Object(v.a)(i.shape[1]);i=Object(o.a)(Object(g.a)(i,Object(S.a)(t,e)),Object(h.a)(e,n))}const l=function(e,t,n=-1){if(-1===n&&(n=t.rank-1),n!==t.rank-1)throw Error(`Softmax cross entropy along a non-last dimension is not yet supported. Labels / logits was rank ${t.rank} and dim was `+n);return Object(P.a)((e,t,r)=>{const o=et(t,[n],!0),a=Object(S.a)(Object(s.a)(t,"float32"),o);r([e,a]);const i=Object(ze.a)(Object(g.a)(a,e));return{value:Object(ke.a)(i,[n]),gradFunc:(e,t)=>{const[r,o]=t,a=Object(Re.e)(e.shape,[n]);return[Object(g.a)(Object(y.a)(e,a),Object(S.a)(Object(s.a)(r,"float32"),Object(f.a)(o))),Object(g.a)(Object(y.a)(e,a),Object(S.a)(Object(f.a)(o),Object(s.a)(r,"float32")))]}}})(e,t)}(i,u);return Ke(l,c,a)}});
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const tt=Object(d.a)({sparseFillEmptyRows_:function(e,t,n,r){const o=Object(E.a)(e,"indices","sparseFillEmptyRows","int32"),a=Object(E.a)(t,"values","sparseFillEmptyRows"),i=Object(E.a)(n,"denseShape","sparseFillEmptyRows","int32"),s=Object(E.a)(r,"defaultValue","sparseFillEmptyRows",a.dtype);if(2!==o.rank)throw new Error("Indices should be Tensor2D but received shape\n        "+o.shape);if(1!==a.rank)throw new Error("Values should be Tensor1D but received shape "+a.shape);if(1!==i.rank)throw new Error("Dense shape should be Tensor1D but received shape "+i.shape);if(0!==s.rank)throw new Error("Default value should be a scalar but received shape "+s.shape);const u={indices:o,values:a,denseShape:i,defaultValue:s},c=M.a.runKernel(L.Fc,u);return{outputIndices:c[0],outputValues:c[1],emptyRowIndicator:c[2],reverseIndexMap:c[3]}}});
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const nt=Object(d.a)({sparseReshape_:function(e,t,n){const r=Object(E.a)(e,"inputIndices","sparseReshape","int32"),o=Object(E.a)(t,"inputShape","sparseReshape","int32"),a=Object(E.a)(n,"newShape","sparseReshape","int32");if(2!==r.rank)throw new Error("Input indices should be Tensor2D but received shape\n        "+r.shape);if(1!==o.rank)throw new Error("Input shape should be Tensor1D but received shape "+o.shape);if(1!==a.rank)throw new Error("New shape should be Tensor1D but received shape "+a.shape);const i={inputIndices:r,inputShape:o,newShape:a},s=M.a.runKernel(L.Gc,i);return{outputIndices:s[0],outputShape:s[1]}}});
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const rt=Object(d.a)({sparseSegmentMean_:function(e,t,n){const r=Object(E.a)(e,"data","sparseSegmentMean"),o=Object(E.a)(t,"indices","sparseSegmentMean","int32"),a=Object(E.a)(n,"segmentIds","sparseSegmentMean","int32");if(r.rank<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==o.rank)throw new Error("Indices should be Tensor1D but received shape\n          "+o.shape);if(1!==a.rank)throw new Error("Segment ids should be Tensor1D but received shape\n          "+a.shape);const i={data:r,indices:o,segmentIds:a};return M.a.runKernel(L.Hc,i)}});
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ot=Object(d.a)({sparseSegmentSum_:function(e,t,n){const r=Object(E.a)(e,"data","sparseSegmentSum"),o=Object(E.a)(t,"indices","sparseSegmentSum","int32"),a=Object(E.a)(n,"segmentIds","sparseSegmentSum","int32");if(r.rank<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==o.rank)throw new Error("Indices should be Tensor1D but received shape\n         "+o.shape);if(1!==a.rank)throw new Error("Segment ids should be Tensor1D but received shape\n         "+a.shape);const i={data:r,indices:o,segmentIds:a};return M.a.runKernel(L.Ic,i)}});
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const at=Object(d.a)({stringNGrams_:function(e,t,n,r,o,a,i,s){const u=Object(E.a)(e,"data","stringNGrams","string");if("string"!==u.dtype)throw new Error("Data must be of datatype string");if(1!==u.shape.length)throw new Error("Data must be a vector, saw: "+u.shape);const c=Object(E.a)(t,"dataSplits","stringNGrams");if("int32"!==c.dtype)throw new Error("Data splits must be of datatype int32");const l={separator:n,nGramWidths:r,leftPad:o,rightPad:a,padWidth:i,preserveShortSequences:s},d={data:u,dataSplits:c},p=M.a.runKernel(L.Qc,d,l);return{nGrams:p[0],nGramsSplits:p[1]}}});
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const it=Object(d.a)({stringSplit_:function(e,t,n=!0){const r=Object(E.a)(e,"input","stringSplit","string"),o=Object(E.a)(t,"delimiter","stringSplit","string");if(1!==r.rank)throw new Error("Input should be Tensor1D but received shape "+r.shape);if(0!==o.rank)throw new Error("Delimiter should be a scalar but received shape "+o.shape);const a={skipEmpty:n},i={input:r,delimiter:o},s=M.a.runKernel(L.Rc,i,a);return{indices:s[0],values:s[1],shape:s[2]}}});
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const st=Object(d.a)({stringToHashBucketFast_:function(e,t){const n=Object(E.a)(e,"input","stringToHashBucketFast","string"),r={numBuckets:t};if(t<=0)throw new Error("Number of buckets must be at least 1");const o={input:n};return M.a.runKernel(L.Sc,o,r)}}),ut=($.a,F.a,_.a,D.a,{flipLeftRight:ae,grayscaleToRGB:se,resizeNearestNeighbor:ye,resizeBilinear:be,rotateWithOffset:ue,cropAndResize:oe,nonMaxSuppression:le,nonMaxSuppressionAsync:pe,nonMaxSuppressionWithScore:he,nonMaxSuppressionWithScoreAsync:fe,nonMaxSuppressionPadded:me,nonMaxSuppressionPaddedAsync:ge,threshold:Ee,transform:Ie}),ct={sparseFillEmptyRows:tt,sparseReshape:nt,sparseSegmentMean:rt,sparseSegmentSum:ot},lt={stringNGrams:at,stringSplit:it,stringToHashBucketFast:st};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),o=n(6),a=n(3),i=n(9),s=n(12);var u=n(4);
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const c=Object(u.a)({batchNorm_:function(e,t,n,u,c,l){null==l&&(l=.001);const d=Object(a.a)(e,"x","batchNorm"),p=Object(a.a)(t,"mean","batchNorm"),h=Object(a.a)(n,"variance","batchNorm");let f,m;null!=c&&(f=Object(a.a)(c,"scale","batchNorm")),null!=u&&(m=Object(a.a)(u,"offset","batchNorm")),i.b(p.rank===h.rank,()=>"Batch normalization gradient requires mean and variance to have equal ranks."),i.b(null==m||p.rank===m.rank,()=>"Batch normalization gradient requires mean and offset to have equal ranks."),i.b(null==f||p.rank===f.rank,()=>"Batch normalization gradient requires mean and scale to have equal ranks.");const g={x:function(e){let t;return t=0===e.rank||1===e.rank?Object(s.a)(e,[1,1,1,e.size]):2===e.rank?Object(s.a)(e,[1,1,e.shape[0],e.shape[1]]):3===e.rank?Object(s.a)(e,[1,e.shape[0],e.shape[1],e.shape[2]]):e,t}(d),scale:f,offset:m,mean:p,variance:h},b={varianceEpsilon:l},y=r.a.runKernel(o.hb,g,b);return Object(s.a)(y,d.shape)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(6);var a=n(3),i=n(4);const s=Object(i.a)({sparseToDense_:
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n,i=0){const s=Object(a.a)(e,"sparseIndices","sparseToDense","int32"),u=Object(a.a)(t,"sparseValues","sparseToDense"),c=Object(a.a)(i,"defaultValue","sparseToDense",u.dtype);!function(e,t,n,r){if("int32"!==e.dtype)throw new Error(`tf.sparseToDense() expects the indices to be int32 type, but the dtype was ${e.dtype}.`);if(e.rank>2)throw new Error(`sparseIndices should be a scalar, vector, or matrix, but got shape ${e.shape}.`);const o=e.rank>0?e.shape[0]:1,a=e.rank>1?e.shape[1]:1;if(n.length!==a)throw new Error(`outputShape has incorrect number of elements:, ${n.length}, should be: ${a}.`);const i=t.size;if(0!==t.rank&&(1!==t.rank||i!==o))throw new Error(`sparseValues has incorrect shape ${t.shape}, should be [] or [${o}]`);if(t.dtype!==r.dtype)throw new Error("sparseValues.dtype must match defaultValues.dtype")}(s,u,n,c);const l={sparseIndices:s,sparseValues:u,defaultValue:c},d={outputShape:n};return r.a.runKernel(o.Jc,l,d)}})},,,,,,,,,,,,,,function(e,t,n){e.exports=n(876)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return ze}));var r=n(32),o=n.n(r),a=n(62),i=n.n(a),s=n(68),u=n.n(s),c=n(119),l=n.n(c),d=n(120),p=n.n(d),h=n(110),f=n.n(h),m=(n(104),n(125),n(126),n(176)),g=n.n(m),b=n(108),y=n.n(b),v=n(40),x=n.n(v),w=n(41),O=n.n(w),k=n(7),S=n.n(k),T=n(86),C=n.n(T),E=n(87),I=n.n(E),j=n(48),N=n.n(j),A=n(733),R=n.n(A),_=n(2),$=n.n(_),F=n(10),D=n.n(F),M=n(52),P=n.n(M),L=n(139),B=n.n(L),z=n(67),U=n.n(z),V=n(396),W=n.n(V),G=n(11),H=n.n(G),q=n(18),K=n.n(q),X=n(273),Y=n.n(X),Q=n(8),Z=n(106),J=(n(142),n(0),n(902),n(753)),ee=n(628),te=n(196),ne=n(629),re=n.n(ne),oe=n(241);function ae(e,t){var n=void 0!==l.a&&p()(e)||e["@@iterator"];if(!n){if(f()(e)||(n=function(e,t){var n;if(!e)return;if("string"==typeof e)return ie(e,t);var r=i()(n=Object.prototype.toString.call(e)).call(n,8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return u()(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ie(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw a}}}}function ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function se(e){var t=function(){if("undefined"==typeof Reflect||!o.a)return!1;if(o.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(o()(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=N()(e);if(t){var a=N()(this).constructor;n=o()(r,arguments,a)}else n=r.apply(this,arguments);return I()(this,n)}}function ue(e,t){le(e,t),t.add(e)}function ce(e,t,n){le(e,t),t.set(e,n)}function le(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function de(e,t,n){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return n}var pe="[auto-zoom-manager]",he=(e.env.TEST,Object(oe.c)("debug")),fe=new H.a,me=new H.a,ge=new H.a,be=new H.a,ye=new H.a,ve=new H.a,xe=new H.a,we=new H.a,Oe=new H.a,ke=new H.a,Se=new H.a,Te=new H.a,Ce=new H.a,Ee=new H.a,Ie=new H.a,je=new H.a,Ne=new H.a,Ae=new H.a,Re=new H.a,_e=new H.a,$e=new H.a,Fe=new K.a,De=new K.a,Me=new K.a,Pe=new H.a,Le=new H.a,Be=new H.a,ze=function(e){C()(n,e);var t=se(n);function n(){var e,r,o;return x()(this,n),e=t.call(this),ue(S()(e),Me),ue(S()(e),De),ue(S()(e),Fe),ce(S()(e),fe,{writable:!0,value:!1}),ce(S()(e),me,{writable:!0,value:null}),ce(S()(e),ge,{writable:!0,value:!1}),ce(S()(e),be,{writable:!0,value:null}),ce(S()(e),ye,{writable:!0,value:null}),ce(S()(e),ve,{writable:!0,value:null}),ce(S()(e),xe,{writable:!0,value:null}),ce(S()(e),we,{writable:!0,value:0}),ce(S()(e),Oe,{writable:!0,value:0}),ce(S()(e),ke,{writable:!0,value:0}),ce(S()(e),Se,{writable:!0,value:0}),ce(S()(e),Te,{writable:!0,value:!1}),ce(S()(e),Ce,{writable:!0,value:0}),ce(S()(e),Ee,{writable:!0,value:void 0}),ce(S()(e),Ie,{writable:!0,value:void 0}),ce(S()(e),je,{writable:!0,value:void 0}),ce(S()(e),Ne,{writable:!0,value:void 0}),ce(S()(e),Ae,{writable:!0,value:void 0}),ce(S()(e),Re,{writable:!0,value:void 0}),ce(S()(e),_e,{writable:!0,value:void 0}),ce(S()(e),$e,{writable:!0,value:void 0}),R()(S()(e),"startAutoZoom",function(){var t=y()(P.a.mark((function t(n){var r;return P.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Q.debug(pe,"start auto zoom"),D()(S()(e),fe,!0),$()(S()(e),ge)){t.next=6;break}return Q.debug(pe,"Play the media stream to the offScreen"),t.next=6,$()(S()(e),Be).call(S()(e),n);case 6:if("face"!==$()(S()(e),je)){t.next=17;break}return Q.debug(pe,"load the blazeface model"),t.t0=D.a,t.t1=S()(e),t.t2=me,t.next=13,J.a();case 13:t.t3=t.sent,(0,t.t0)(t.t1,t.t2,t.t3),t.next=27;break;case 17:if("body"!==$()(S()(e),je)){t.next=27;break}return r={architecture:"MobileNetV1",outputStride:16,inputResolution:{width:$()(S()(e),be).videoWidth,height:$()(S()(e),be).videoHeight},multiplier:.75,quantBytes:2},Q.debug(pe,"load the posenet model",r),t.t4=D.a,t.t5=S()(e),t.t6=me,t.next=25,ee.b(ee.a.PoseNet,r);case 25:t.t7=t.sent,(0,t.t4)(t.t5,t.t6,t.t7);case 27:$()(S()(e),xe)&&clearInterval($()(S()(e),xe)),D()(S()(e),xe,B()($()(S()(e),Le),1e3));case 29:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),ce(S()(e),Pe,{writable:!0,value:(r=y()(P.a.mark((function t(n){var r,o,a,i,s;return P.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if($()(S()(e),ve)&&$()(S()(e),be)&&$()(S()(e),ge)){t.next=3;break}return Q.error(pe,"fail to draw offscreen video"),t.abrupt("return");case 3:he&&$()(S()(e),_e).begin(),$()(S()(e),Te)?(r=0,"face"===$()(S()(e),je)?r=50:"body"===$()(S()(e),je)&&(r=20),o=$()(S()(e),Ee).width+2*r,a=$()(S()(e),Ee).height+2*r,i=Math.min(Math.max($()(S()(e),Ee).x-r,0),$()(S()(e),be).videoWidth-o),s=Math.min(Math.max($()(S()(e),Ee).y-r,0),$()(S()(e),be).videoHeight-a),$()(S()(e),ve).drawImage($()(S()(e),be),i,s,o,a,0,0,$()(S()(e),be).videoWidth,$()(S()(e),be).videoHeight),he&&($()(S()(e),ve).clearRect(0,0,$()(S()(e),be).videoWidth,$()(S()(e),be).videoHeight),$()(S()(e),ve).drawImage($()(S()(e),be),0,0),$()(S()(e),ve).strokeRect(i,s,o,a))):$()(S()(e),ve).drawImage($()(S()(e),be),0,0),he&&$()(S()(e),_e).end(),te.c(n),requestAnimationFrame($()(S()(e),Pe));case 8:case"end":return t.stop()}}),t)}))),function(e){return r.apply(this,arguments)})}),ce(S()(e),Le,{writable:!0,value:(o=y()(P.a.mark((function t(){var n,r,o,a,i,s,u,c,l,d,p,h,f,m,g,b,y,v,x;return P.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if($()(S()(e),me)&&$()(S()(e),ge)&&$()(S()(e),fe)){t.next=3;break}return Q.error(pe,"runModel is not ready yet"),t.abrupt("return");case 3:if(n=null,he&&$()(S()(e),$e).begin(),"face"!==$()(S()(e),je)){t.next=11;break}return t.next=8,$()(S()(e),me).estimateFaces($()(S()(e),be));case 8:n=t.sent,t.next=15;break;case 11:if("body"!==$()(S()(e),je)){t.next=15;break}return t.next=14,$()(S()(e),me).estimatePoses($()(S()(e),be),{maxPoses:5,flipHorizontal:!1,scoreThreshold:.5,nmsRadius:20});case 14:n=t.sent;case 15:if(he&&$()(S()(e),$e).end(),n.length>0){if(r=null,o=null,a=null,"face"===$()(S()(e),je)){if(i=n[0],"single"===$()(S()(e),Ne))"nearest"===$()(S()(e),Ae)?i=n[0]:"farthest"===$()(S()(e),Ae)?i=n[n.length-1]:"median"===$()(S()(e),Ae)&&(i=n[(n.length-1)/2]);else if("group"===$()(S()(e),Ne)){s=ae(n);try{for(s.s();!(u=s.n()).done;)c=u.value,i.topLeft[0]=Math.min(i.topLeft[0],c.topLeft[0]),i.topLeft[1]=Math.min(i.topLeft[1],c.topLeft[1]),i.bottomRight[0]=Math.max(i.bottomRight[0],c.bottomRight[0]),i.bottomRight[1]=Math.max(i.bottomRight[1],c.bottomRight[1])}catch(e){s.e(e)}finally{s.f()}}r=i.topLeft,o=i.bottomRight,a=[o[0]-r[0],o[1]-r[1]]}else if("body"===$()(S()(e),je)){if(l={top:$()(S()(e),be).videoHeight,left:$()(S()(e),be).videoWidth,bottom:0,right:0},"single"===$()(S()(e),Ne)){d=[],"nearest"===$()(S()(e),Ae)?d=n[0].keypoints:"farthest"===$()(S()(e),Ae)?d=n[n.length-1].keypoints:"median"===$()(S()(e),Ae)&&(d=n[(n.length-1)/2].keypoints),p=ae(d);try{for(p.s();!(h=p.n()).done;)f=h.value,l.top=Math.min(l.top,f.y),l.left=Math.min(l.left,f.x),l.bottom=Math.max(l.bottom,f.y),l.right=Math.max(l.right,f.x)}catch(e){p.e(e)}finally{p.f()}}else if("group"===$()(S()(e),Ne)){m=ae(n);try{for(m.s();!(g=m.n()).done;){b=g.value,y=ae(b.keypoints);try{for(y.s();!(v=y.n()).done;)x=v.value,l.top=Math.min(l.top,x.y),l.left=Math.min(l.left,x.x),l.bottom=Math.max(l.bottom,x.y),l.right=Math.max(l.right,x.x)}catch(e){y.e(e)}finally{y.f()}}}catch(e){m.e(e)}finally{m.f()}}r=[l.left,l.top],o=[l.right,l.bottom],a=[o[0]-r[0],o[1]-r[1]]}D()(S()(e),Ie,new te.b($()(S()(e),Ee)).to({x:r[0],y:r[1],width:a[0],height:a[1]},1e3).easing($()(S()(e),Re)).onUpdate((function(){D()(S()(e),we,$()(S()(e),Ee).x),D()(S()(e),Oe,$()(S()(e),Ee).y),D()(S()(e),ke,$()(S()(e),Ee).width),D()(S()(e),Se,$()(S()(e),Ee).height)}))),D()(S()(e),Ce,+$()(S()(e),Ce)+1),$()(S()(e),Ce)>3&&(D()(S()(e),Ce,0),D()(S()(e),Te,!0),$()(S()(e),Ie).start())}else Q.debug(pe,"target detected reset"),D()(S()(e),Ce,+$()(S()(e),Ce)-1),$()(S()(e),Ce)<0&&(D()(S()(e),Ce,0),D()(S()(e),Te,!1),$()(S()(e),Ie).stop());case 17:case"end":return t.stop()}}),t)}))),function(){return o.apply(this,arguments)})}),ce(S()(e),Be,{writable:!0,value:function(t){return Q.debug(pe,"playOffscreenStream"),new U.a((function(n,r){D()(S()(e),be,document.createElement("video")),$()(S()(e),be).setAttribute("autoplay",""),$()(S()(e),be).addEventListener("loadeddata",(function(){Q.debug(pe,"offScreen media stream is loaded"),D()(S()(e),ge,!0),D()(S()(e),ye,document.createElement("canvas")),$()(S()(e),be).width=$()(S()(e),be).videoWidth,$()(S()(e),be).height=$()(S()(e),be).videoHeight,$()(S()(e),ye).setAttribute("width",$()(S()(e),be).videoWidth),$()(S()(e),ye).setAttribute("height",$()(S()(e),be).videoHeight),D()(S()(e),ve,$()(S()(e),ye).getContext("2d"));var t=$()(S()(e),ye).captureStream().getVideoTracks();t.length>0&&Q.debug(pe,"replace video track with video track of the canvas stream"),e.emit("autoZoomStarted",t[0]),requestAnimationFrame($()(S()(e),Pe)),n()})),$()(S()(e),be).addEventListener("error",(function(){Q.error(pe,"fail to load the offscreen video"),r(new Error("fail to load the offscreen video"))})),$()(S()(e),be).srcObject=t}))}}),D()(S()(e),Ee,{x:0,y:0,width:0,height:0}),D()(S()(e),Ie,new te.b($()(S()(e),Ee))),D()(S()(e),Re,te.a.Linear),he&&de(S()(e),Fe,Ue).call(S()(e)),e}return O()(n,[{key:"applyConstraints",value:function(e,t){if(de(this,De,Ve).call(this,t)){Q.debug(pe,"hasAutoZoomConstraints"),D()(this,je,de(this,Me,We).call(this,t,"tizenAiAutoZoomTarget")),D()(this,Ne,de(this,Me,We).call(this,t,"tizenAiAutoZoomTargetNumber")||"single"),D()(this,Ae,de(this,Me,We).call(this,t,"tizenAiAutoZoomFocusPriority")||"nearest");var n,r=de(this,Me,We).call(this,t,"tizenAiAutoZoomAnimation");if("linear"===r?D()(this,Re,te.a.Linear.None):"exponential"===r?D()(this,Re,te.a.Exponential.In):"log"===r&&D()(this,Re,te.a.Circular.Out),$()(this,je))Q.debug(pe,"has tizenAiAutoZoomTarget",$()(this,je)),W()(n=["face","body"]).call(n,$()(this,je))?this.startAutoZoom(e):"none"===$()(this,je)&&this.stopAutoZoom()}}},{key:"stopAutoZoom",value:function(){Q.debug(pe,"stop auto zoom"),D()(this,fe,!1),D()(this,ge,!1),clearInterval($()(this,xe)),D()(this,xe,null),this.emit("autoZoomStopped")}}]),n}(Z.EventEmitter);function Ue(){D()(this,_e,new re.a),D()(this,$e,new re.a),$()(this,_e).dom.style.left="unset",$()(this,_e).dom.style.right="100px",$()(this,$e).dom.style.left="unset",$()(this,$e).dom.style.right="0px",$()(this,_e).showPanel(0),$()(this,$e).showPanel(1),document.body.appendChild($()(this,_e).dom),document.body.appendChild($()(this,$e).dom)}function Ve(e){for(var t in e)if(Y()(t).call(t,"tizenAiAutoZoom"))return!0;return!1}function We(e,t){var n=e[t];if(n)return"object"===g()(n)&&(n=n.exact),n}}).call(this,n(90))},function(e,t,n){var r=n(348);e.exports=function(e,t,n){return t in e?r(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
+/**
+ * @license
+ * Copyright 2022 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r=[{tfOpName:"Add",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"AddV2",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"AddN",category:"arithmetic",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}]},{tfOpName:"BiasAdd",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"Sub",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"RealDiv",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Div",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"DivNoNan",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"FloorDiv",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Mul",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Maximum",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Minimum",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Pow",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"SquaredDifference",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Mod",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"FloorMod",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
+/**
+ * @license
+ * Copyright 2022 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r=[{tfOpName:"Abs",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Acos",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Asin",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Atan",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Atan2",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"y",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Ceil",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ClipByValue",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"clipValueMin",type:"number"},{start:2,name:"clipValueMax",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Complex",category:"basic_math",inputs:[{start:0,name:"real",type:"tensor"},{start:1,name:"imag",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ComplexAbs",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Cos",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Cosh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Elu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Exp",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Floor",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Log",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Imag",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"Tout",name:"outputType",type:"dtype",notSupported:!0}]},{tfOpName:"Neg",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Real",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"Tout",name:"outputType",type:"dtype",notSupported:!0}]},{tfOpName:"Prelu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"alpha",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Relu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Relu6",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Selu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sigmoid",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sin",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sinh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sqrt",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Rsqrt",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Square",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Tan",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Tanh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sign",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Round",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Expm1",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Log1p",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Reciprocal",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Softplus",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Asinh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Acosh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Atanh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Erf",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Prod",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axes",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool",notSupported:!0},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LeakyRelu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"alpha",name:"alpha",type:"number",defaultValue:.2},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"IsNan",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
+/**
+ * @license
+ * Copyright 2022 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r=[{tfOpName:"EmptyTensorList",category:"control",inputs:[{start:0,name:"elementShape",type:"shape"},{start:1,name:"maxNumElements",type:"number"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"LoopCond",category:"control",inputs:[{start:0,name:"pred",type:"tensor"}]},{tfOpName:"Switch",category:"control",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"pred",type:"tensor"}]},{tfOpName:"Merge",category:"control",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}]},{tfOpName:"Enter",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"frame_name",name:"frameName",type:"string"},{tfName:"is_constant",name:"isConstant",type:"bool"}]},{tfOpName:"Exit",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"NextIteration",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"TensorArrayV3",category:"control",inputs:[{start:0,name:"size",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"element_shape",name:"elementShape",type:"shape"},{tfName:"dynamic_size",name:"dynamicSize",type:"bool"},{tfName:"clear_after_read",name:"clearAfterRead",type:"bool"},{tfName:"identical_element_shapes",name:"identicalElementShapes",type:"bool"},{tfName:"tensor_array_name",name:"name",type:"string"}]},{tfOpName:"TensorArrayWriteV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"tensor",type:"tensor"},{start:3,name:"flowIn",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"TensorArrayReadV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"flowIn",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"TensorArrayGatherV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"flowIn",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"element_shape",name:"elementShape",type:"shape"}]},{tfOpName:"TensorArrayScatterV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"tensor",type:"tensor"},{start:3,name:"flowIn",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"TensorArrayConcatV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"flowIn",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"element_shape_except0",name:"elementShapeExcept0",type:"shape",notSupported:!0}]},{tfOpName:"TensorArraySplitV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"tensor",type:"tensor"},{start:2,name:"lengths",type:"number[]"},{start:3,name:"flowIn",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"TensorArraySizeV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"flowIn",type:"number"}]},{tfOpName:"TensorArrayCloseV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"}]},{tfOpName:"StatelessIf",category:"control",inputs:[{start:0,name:"cond",type:"tensor"},{start:1,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"then_branch",name:"thenBranch",type:"func"},{tfName:"else_branch",name:"elseBranch",type:"func"}]},{tfOpName:"If",category:"control",inputs:[{start:0,name:"cond",type:"tensor"},{start:1,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"then_branch",name:"thenBranch",type:"func"},{tfName:"else_branch",name:"elseBranch",type:"func"}]},{tfOpName:"StatelessWhile",category:"control",inputs:[{start:0,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"cond",name:"cond",type:"func"},{tfName:"body",name:"body",type:"func"}]},{tfOpName:"While",category:"control",inputs:[{start:0,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"cond",name:"cond",type:"func"},{tfName:"body",name:"body",type:"func"}]},{tfOpName:"TensorListScatter",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListScatterV2",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"elementShape",type:"shape"},{start:3,name:"numElements",type:"number"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListGather",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListGetItem",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListSetItem",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"tensor",type:"tensor"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListReserve",category:"control",inputs:[{start:0,name:"elementShape",type:"shape"},{start:1,name:"numElements",type:"number"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListFromTensor",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListStack",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"},{tfName:"num_elements",name:"numElements",type:"dtype"}]},{tfOpName:"TensorListSplit",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"elementShape",type:"shape"},{start:2,name:"lengths",type:"number[]"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListConcat",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"}],attrs:[{tfName:"element_shape",name:"elementShape",type:"shape"},{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListPopBack",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListPushBack",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"tensor",type:"tensor"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
+/**
+ * @license
+ * Copyright 2022 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r=[{tfOpName:"AvgPool",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MaxPool",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[],notSupported:!0},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MaxPoolWithArgmax",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"include_batch_in_index",name:"includeBatchInIndex",type:"bool"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"AvgPool3D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MaxPool3D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Conv1D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"stride",name:"stride",type:"number"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NWC"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"dilation",name:"dilation",type:"number",defaultValue:1}]},{tfOpName:"Conv2D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"useCudnnOnGpu",name:"useCudnnOnGpu",type:"bool"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"_FusedConv2D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"},{start:2,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"num_args",name:"numArgs",type:"number"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"use_cudnn_on_gpu",name:"useCudnnOnGpu",type:"bool",defaultValue:!0},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"dilations",name:"dilations",type:"number[]",defaultValue:[1,1,1,1]},{tfName:"fused_ops",name:"fusedOps",type:"string[]",defaultValue:[]},{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:1e-4},{tfName:"leakyrelu_alpha",name:"leakyreluAlpha",type:"number"}]},{tfOpName:"Conv2DBackpropInput",category:"convolution",inputs:[{start:2,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"},{start:0,name:"outputShape",type:"number[]"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]",notSupported:!0}]},{tfOpName:"DepthwiseConv2d",category:"convolution",inputs:[{start:0,name:"input",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"DepthwiseConv2dNative",category:"convolution",inputs:[{start:0,name:"input",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"FusedDepthwiseConv2dNative",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"},{start:2,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"num_args",name:"numArgs",type:"number"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"dilations",name:"dilations",type:"number[]",defaultValue:[1,1,1,1]},{tfName:"fused_ops",name:"fusedOps",type:"string[]",defaultValue:[]},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]}]},{tfOpName:"Conv3D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"Dilation2D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"rates",name:"dilations",type:"number[]"},{tfName:"padding",name:"pad",type:"string"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
+/**
+ * @license
+ * Copyright 2022 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r=[{tfOpName:"Fill",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"},{start:1,name:"value",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"LinSpace",category:"creation",inputs:[{start:0,name:"start",type:"number"},{start:1,name:"stop",type:"number"},{start:2,name:"num",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"OneHot",category:"creation",inputs:[{start:0,name:"indices",type:"tensor"},{start:1,name:"depth",type:"number"},{start:2,name:"onValue",type:"number",defaultValue:1},{start:3,name:"offValue",type:"number",defaultValue:0}],attrs:[{tfName:"axis",name:"axis",type:"number",notSupported:!0},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Ones",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"OnesLike",category:"creation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"}]},{tfOpName:"RandomUniform",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"minval",name:"minval",type:"number",defaultValue:0},{tfName:"maxval",name:"maxval",type:"number",defaultValue:1},{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"seed",name:"seed",type:"number",defaultValue:0},{tfName:"seed2",name:"seed2",type:"number",defaultValue:0,notSupported:!0},{tfName:"T",name:"T",type:"number",notSupported:!0}]},{tfOpName:"Range",category:"creation",inputs:[{start:0,name:"start",type:"number"},{start:1,name:"stop",type:"number"},{start:2,name:"step",type:"number",defaultValue:0}],attrs:[{tfName:"Tidx",name:"dtype",type:"dtype"}]},{tfOpName:"TruncatedNormal",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"means",name:"mean",type:"number",defaultValue:0},{tfName:"stddev",name:"stdDev",type:"number",defaultValue:1},{tfName:"seed",name:"seed",type:"number"},{tfName:"seed2",name:"seed2",type:"number",defaultValue:0,notSupported:!0},{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"T",name:"T",type:"number",notSupported:!0}]},{tfOpName:"Zeros",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"ZerosLike",category:"creation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"Multinomial",category:"creation",inputs:[{start:0,name:"logits",type:"tensor"},{start:1,name:"numSamples",type:"number"}],attrs:[{tfName:"seed",name:"seed",type:"number"},{tfName:"seed2",name:"seed2",type:"number"},{tfName:"T",name:"dtype",type:"dtype"},{tfName:"output_dtype",name:"output_dtype",type:"dtype"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
+/**
+ * @license
+ * Copyright 2022 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r=[{tfOpName:"NonMaxSuppressionV2",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"}]},{tfOpName:"NonMaxSuppressionV3",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"},{start:4,name:"scoreThreshold",type:"number"}]},{tfOpName:"NonMaxSuppressionV4",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"},{start:4,name:"scoreThreshold",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"T_threshold",name:"threshold",type:"dtype",notSupported:!0},{tfName:"pad_to_max_output_size",name:"padToMaxOutputSize",type:"bool"}]},{tfOpName:"NonMaxSuppressionV5",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"},{start:4,name:"scoreThreshold",type:"number"},{start:5,name:"softNmsSigma",type:"number"}]},{tfOpName:"Where",category:"dynamic",inputs:[{start:0,name:"condition",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ListDiff",category:"dynamic",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"y",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
+/**
+ * @license
+ * Copyright 2022 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r=[{tfOpName:"TopKV2",category:"evaluation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"k",type:"number"}],attrs:[{tfName:"sorted",name:"sorted",type:"bool"}]},{tfOpName:"Unique",category:"evaluation",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"UniqueV2",category:"evaluation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
+/**
+ * @license
+ * Copyright 2022 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r=[{tfOpName:"PlaceholderWithDefault",category:"graph",inputs:[{start:0,name:"default",type:"tensor"}],attrs:[{tfName:"shape",name:"shape",type:"shape"},{tfName:"dtype",name:"dtype",type:"dtype"}]},{tfOpName:"Placeholder",category:"graph",attrs:[{tfName:"shape",name:"shape",type:"shape"},{tfName:"dtype",name:"dtype",type:"dtype"}]},{tfOpName:"Const",category:"graph"},{tfOpName:"Identity",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"IdentityN",category:"graph",inputs:[{start:0,end:0,name:"x",type:"tensors"}]},{tfOpName:"Snapshot",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"Rank",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"Size",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"Shape",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"ShapeN",category:"graph",inputs:[{start:0,end:0,name:"x",type:"tensors"}]},{tfOpName:"Print",category:"graph",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"data",type:"tensors"}],attrs:[{tfName:"message",name:"message",type:"string"},{tfName:"first_n",name:"firstN",type:"number",notSupported:!0},{tfName:"summarize",name:"summarize",type:"number",defaultValue:3}]},{tfOpName:"NoOp",category:"graph",inputs:[]},{tfOpName:"StopGradient",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"FakeQuantWithMinMaxVars",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"min",name:"min",type:"number"},{tfName:"max",name:"max",type:"number"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
+/**
+ * @license
+ * Copyright 2022 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r=[{tfOpName:"HashTable",category:"hash_table",inputs:[],attrs:[{tfName:"shared_name",name:"sharedName",type:"string"},{tfName:"use_node_name_sharing",name:"useNodeNameSharing",type:"bool"},{tfName:"key_dtype",name:"keyDType",type:"dtype"},{tfName:"value_dtype",name:"valueDType",type:"dtype"}]},{tfOpName:"HashTableV2",category:"hash_table",inputs:[],attrs:[{tfName:"shared_name",name:"sharedName",type:"string"},{tfName:"use_node_name_sharing",name:"useNodeNameSharing",type:"bool"},{tfName:"key_dtype",name:"keyDType",type:"dtype"},{tfName:"value_dtype",name:"valueDType",type:"dtype"}]},{tfOpName:"LookupTableImport",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"values",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableImportV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"values",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableFind",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableFindV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableSize",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"}]},{tfOpName:"LookupTableSizeV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
+/**
+ * @license
+ * Copyright 2022 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r=[{tfOpName:"ResizeBilinear",category:"image",inputs:[{start:0,name:"images",type:"tensor"},{start:1,name:"size",type:"number[]"}],attrs:[{tfName:"align_corners",name:"alignCorners",type:"bool"},{tfName:"half_pixel_centers",name:"halfPixelCenters",type:"bool"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ResizeNearestNeighbor",category:"image",inputs:[{start:0,name:"images",type:"tensor"},{start:1,name:"size",type:"number[]"}],attrs:[{tfName:"align_corners",name:"alignCorners",type:"bool"},{tfName:"half_pixel_centers",name:"halfPixelCenters",type:"bool"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"CropAndResize",category:"image",inputs:[{start:0,name:"image",type:"tensor"},{start:1,name:"boxes",type:"tensor"},{start:2,name:"boxInd",type:"tensor"},{start:3,name:"cropSize",type:"number[]"}],attrs:[{tfName:"method",name:"method",type:"string"},{tfName:"extrapolation_value",name:"extrapolationValue",type:"number"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
+/**
+ * @license
+ * Copyright 2022 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r=[{tfOpName:"Equal",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"NotEqual",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Greater",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"GreaterEqual",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Less",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LessEqual",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LogicalAnd",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LogicalNot",category:"logical",inputs:[{start:0,name:"a",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LogicalOr",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Select",category:"logical",inputs:[{start:0,name:"condition",type:"tensor"},{start:1,name:"a",type:"tensor"},{start:2,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"SelectV2",category:"logical",inputs:[{start:0,name:"condition",type:"tensor"},{start:1,name:"a",type:"tensor"},{start:2,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
+/**
+ * @license
+ * Copyright 2022 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r=[{tfOpName:"_FusedMatMul",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"},{start:2,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"num_args",name:"numArgs",type:"number"},{tfName:"fused_ops",name:"fusedOps",type:"string[]",defaultValue:[]},{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:1e-4},{tfName:"transpose_a",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"transpose_b",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MatMul",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"transpose_a",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"transpose_b",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"BatchMatMul",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"adj_x",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"adj_y",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"BatchMatMulV2",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"adj_x",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"adj_y",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Transpose",category:"matrices",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"perm",type:"number[]"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Einsum",category:"matrices",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}],attrs:[{tfName:"equation",name:"equation",type:"string"},{tfName:"N",name:"n",type:"number",defaultValue:2},{tfName:"T",name:"dtype",type:"dtype"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
+/**
+ * @license
+ * Copyright 2022 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r=[{tfOpName:"FusedBatchNorm",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"scale",type:"tensor"},{start:2,name:"offset",type:"tensor"},{start:3,name:"mean",type:"tensor"},{start:4,name:"variance",type:"tensor"}],attrs:[{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:.001},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"FusedBatchNormV2",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"scale",type:"tensor"},{start:2,name:"offset",type:"tensor"},{start:3,name:"mean",type:"tensor"},{start:4,name:"variance",type:"tensor"}],attrs:[{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:.001},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"FusedBatchNormV3",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"scale",type:"tensor"},{start:2,name:"offset",type:"tensor"},{start:3,name:"mean",type:"tensor"},{start:4,name:"variance",type:"tensor"}],attrs:[{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:.001},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"LRN",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"depth_radius",name:"radius",type:"number",defaultValue:5},{tfName:"bias",name:"bias",type:"number",defaultValue:1},{tfName:"alpha",name:"alpha",type:"number",defaultValue:1},{tfName:"beta",name:"beta",type:"number",defaultValue:.5}]},{tfOpName:"Softmax",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"LogSoftmax",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"SparseToDense",category:"normalization",inputs:[{start:0,name:"sparseIndices",type:"tensor"},{start:1,name:"outputShape",type:"number[]"},{start:2,name:"sparseValues",type:"tensor"},{start:3,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"validate_indices",name:"validateIndices",type:"bool",defaultValue:!0,notSupported:!0}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
+/**
+ * @license
+ * Copyright 2022 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r=[{tfOpName:"Bincount",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"size",type:"number"},{start:2,name:"weights",type:"tensor"}]},{tfOpName:"DenseBincount",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"size",type:"number"},{start:2,name:"weights",type:"tensor"}],attrs:[{tfName:"binary_output",name:"binaryOutput",type:"bool"}]},{tfOpName:"Max",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Mean",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Min",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Sum",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"All",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Any",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"ArgMax",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]},{tfOpName:"ArgMin",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]},{tfOpName:"Prod",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Cumsum",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}],attrs:[{tfName:"exclusive",name:"exclusive",type:"bool"},{tfName:"reverse",name:"reverse",type:"bool"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
+/**
+ * @license
+ * Copyright 2022 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r=[{tfOpName:"ConcatV2",category:"slice_join",inputs:[{start:0,end:-1,name:"tensors",type:"tensors"},{start:-1,name:"axis",type:"number"}],attrs:[{tfName:"N",name:"n",type:"number",defaultValue:2}]},{tfOpName:"Concat",category:"slice_join",inputs:[{start:1,end:0,name:"tensors",type:"tensors"},{start:0,name:"axis",type:"number"}],attrs:[{tfName:"N",name:"n",type:"number",defaultValue:2}]},{tfOpName:"GatherV2",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"indices",type:"tensor"},{start:2,name:"axis",type:"number",defaultValue:0}],attrs:[{tfName:"batch_dims",name:"batchDims",type:"number",defaultValue:0}]},{tfOpName:"Gather",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"indices",type:"tensor"}],attrs:[{tfName:"validate_indices",name:"validateIndices",type:"bool",notSupported:!0}]},{tfOpName:"Reverse",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"dims",type:"bool[]"}]},{tfOpName:"ReverseV2",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}]},{tfOpName:"Slice",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"begin",type:"number[]"},{start:2,name:"size",type:"number[]"}]},{tfOpName:"StridedSlice",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"begin",type:"number[]"},{start:2,name:"end",type:"number[]"},{start:3,name:"strides",type:"number[]"}],attrs:[{tfName:"begin_mask",name:"beginMask",type:"number",defaultValue:0},{tfName:"end_mask",name:"endMask",type:"number",defaultValue:0},{tfName:"new_axis_mask",name:"newAxisMask",type:"number",defaultValue:0},{tfName:"ellipsis_mask",name:"ellipsisMask",type:"number",defaultValue:0},{tfName:"shrink_axis_mask",name:"shrinkAxisMask",type:"number",defaultValue:0}]},{tfOpName:"Pack",category:"slice_join",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}],attrs:[{tfName:"axis",name:"axis",type:"number",defaultValue:0}]},{tfOpName:"Unpack",category:"slice_join",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"axis",name:"axis",type:"number",defaultValue:0},{tfName:"num",name:"num",type:"number",defaultValue:0,notSupported:!0}]},{tfOpName:"Tile",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"reps",type:"number[]"}]},{tfOpName:"Split",category:"slice_join",inputs:[{start:0,name:"axis",type:"number",defaultValue:0},{start:1,name:"x",type:"tensor"}],attrs:[{tfName:"num_split",name:"numOrSizeSplits",type:"number",defaultValue:1}]},{tfOpName:"SplitV",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"numOrSizeSplits",type:"number[]"},{start:2,name:"axis",type:"number",defaultValue:0}]},{tfOpName:"ScatterNd",category:"slice_join",inputs:[{start:0,name:"indices",type:"tensor"},{start:1,name:"values",type:"tensor"},{start:2,name:"shape",type:"number[]"}]},{tfOpName:"GatherNd",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"indices",type:"tensor"}]},{tfOpName:"SparseToDense",category:"slice_join",inputs:[{start:0,name:"sparseIndices",type:"tensor"},{start:1,name:"outputShape",type:"number[]"},{start:2,name:"sparseValues",type:"tensor"},{start:3,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"validate_indices",name:"validateIndices",type:"bool",defaultValue:!1,notSupported:!0}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
+/**
+ * @license
+ * Copyright 2022 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r=[{tfOpName:"SparseFillEmptyRows",category:"sparse",inputs:[{start:0,name:"indices",type:"tensor"},{start:1,name:"values",type:"tensor"},{start:2,name:"denseShape",type:"tensor"},{start:3,name:"defaultValue",type:"tensor"}]},{tfOpName:"SparseReshape",category:"sparse",inputs:[{start:0,name:"inputIndices",type:"tensor"},{start:1,name:"inputShape",type:"tensor"},{start:2,name:"newShape",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"SparseSegmentMean",category:"sparse",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"indices",type:"tensor"},{start:2,name:"segmentIds",type:"tensor"}]},{tfOpName:"SparseSegmentSum",category:"sparse",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"indices",type:"tensor"},{start:2,name:"segmentIds",type:"tensor"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
+/**
+ * @license
+ * Copyright 2022 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r=[{tfOpName:"FFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"IFFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"RFFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"fft_length",type:"number",notSupported:!0}]},{tfOpName:"IRFFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"fft_length",type:"number",notSupported:!0}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
+/**
+ * @license
+ * Copyright 2022 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r=[{tfOpName:"StringNGrams",category:"string",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"dataSplits",type:"tensor"}],attrs:[{tfName:"separator",name:"separator",type:"string"},{tfName:"ngram_widths",name:"nGramWidths",type:"number[]"},{tfName:"left_pad",name:"leftPad",type:"string"},{tfName:"right_pad",name:"rightPad",type:"string"},{tfName:"pad_width",name:"padWidth",type:"number"},{tfName:"preserve_short_sequences",name:"preserveShortSequences",type:"bool"}],outputs:["ngrams","ngrams_splits"]},{tfOpName:"StringSplit",category:"string",inputs:[{start:0,name:"input",type:"tensor"},{start:1,name:"delimiter",type:"tensor"}],attrs:[{tfName:"skip_empty",name:"skipEmpty",type:"bool"}],outputs:["indices","values","shape"]},{tfOpName:"StringToHashBucketFast",category:"string",inputs:[{start:0,name:"input",type:"tensor"}],attrs:[{tfName:"num_buckets",name:"numBuckets",type:"number"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
+/**
+ * @license
+ * Copyright 2022 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const r=[{tfOpName:"Cast",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"SrcT",name:"sdtype",type:"dtype",notSupported:!0},{tfName:"DstT",name:"dtype",type:"dtype"}]},{tfOpName:"ExpandDims",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]},{tfOpName:"MirrorPad",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"padding",type:"number[]"}],attrs:[{tfName:"mode",name:"mode",type:"string"}]},{tfOpName:"Pad",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"padding",type:"number[]"}],attrs:[{tfName:"constant_value",name:"constantValue",type:"number",defaultValue:0}]},{tfOpName:"PadV2",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"padding",type:"number[]"},{start:2,name:"constantValue",type:"number",defaultValue:0}]},{tfOpName:"Reshape",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"shape",type:"number[]"}]},{tfOpName:"Squeeze",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"axis",tfDeprecatedName:"squeeze_dims",name:"axis",type:"number[]"}]},{tfOpName:"SpaceToBatchND",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"blockShape",type:"number[]"},{start:2,name:"paddings",type:"number[]"}]},{tfOpName:"BatchToSpaceND",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"blockShape",type:"number[]"},{start:2,name:"crops",type:"number[]"}]},{tfOpName:"DepthToSpace",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"block_size",name:"blockSize",type:"number"},{tfName:"data_format",name:"dataFormat",type:"string"}]},{tfOpName:"BroadcastTo",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"shape",type:"number[]"}],attrs:[]},{tfOpName:"BroadcastArgs",category:"transformation",inputs:[{start:0,name:"s0",type:"tensor"},{start:1,name:"s1",type:"tensor"}],attrs:[]}]},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(0),o=n(142);
+/**
+    * @license
+    * Copyright 2021 Google LLC. All Rights Reserved.
+    * Licensed under the Apache License, Version 2.0 (the "License");
+    * you may not use this file except in compliance with the License.
+    * You may obtain a copy of the License at
+    *
+    * http://www.apache.org/licenses/LICENSE-2.0
+    *
+    * Unless required by applicable law or agreed to in writing, software
+    * distributed under the License is distributed on an "AS IS" BASIS,
+    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    * See the License for the specific language governing permissions and
+    * limitations under the License.
+    * =============================================================================
+    */
+function a(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))}function i(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}var s=function(e){return{startEndTensor:e,startPoint:Object(r.Od)(e,[0,0],[-1,2]),endPoint:Object(r.Od)(e,[0,2],[-1,2])}},u={strides:[8,16],anchors:[2,6]};function c(e,t){var n,o,a;if(e.topLeft instanceof r.Zc&&e.bottomRight instanceof r.Zc){var i=Object(r.Xd)((function(){return[Object(r.td)([Object(r.Od)(Object(r.Sd)(t-1,e.topLeft),0,1),Object(r.Od)(e.topLeft,1,1)]),Object(r.td)([Object(r.Sd)(t-1,Object(r.Od)(e.bottomRight,0,1)),Object(r.Od)(e.bottomRight,1,1)])]}));n=i[0],o=i[1],null!=e.landmarks&&(a=Object(r.Xd)((function(){var n=Object(r.Sd)(Object(r.Vd)([t-1,0]),e.landmarks),o=Object(r.Vd)([1,-1]);return Object(r.Hd)(n,o)})))}else{var s=e.topLeft,u=s[0],c=s[1],l=e.bottomRight,d=l[0],p=l[1];n=[t-1-u,c],o=[t-1-d,p],null!=e.landmarks&&(a=e.landmarks.map((function(e){return[t-1-e[0],e[1]]})))}var h={topLeft:n,bottomRight:o};return null!=a&&(h.landmarks=a),null!=e.probability&&(h.probability=e.probability instanceof r.Zc?e.probability.clone():e.probability),h}function l(e,t){return Object(r.Xd)((function(){var n;return n=e.hasOwnProperty("box")?e.box:e,Object(r.Qd)(function(e,t){var n=Object(r.Hd)(e.startPoint,t),o=Object(r.Hd)(e.endPoint,t),a=Object(r.ud)([n,o],1);return s(a)}(n,t).startEndTensor)}))}var d=function(){function e(e,t,n,o,a,i){this.blazeFaceModel=e,this.width=t,this.height=n,this.maxFaces=o,this.anchorsData=function(e,t,n){for(var r=[],o=0;o<n.strides.length;o++)for(var a=n.strides[o],i=Math.floor((t+a-1)/a),s=Math.floor((e+a-1)/a),u=n.anchors[o],c=0;c<i;c++)for(var l=a*(c+.5),d=0;d<s;d++)for(var p=a*(d+.5),h=0;h<u;h++)r.push([p,l]);return r}(t,n,u),this.anchors=Object(r.Wd)(this.anchorsData),this.inputSizeData=[t,n],this.inputSize=Object(r.Vd)([t,n]),this.iouThreshold=a,this.scoreThreshold=i}return e.prototype.getBoundingBoxes=function(e,t,n){return void 0===n&&(n=!0),a(this,void 0,void 0,(function(){var o,u,c,l,d,p,h,f,m,g,b,y,v,x,w=this;return i(this,(function(O){switch(O.label){case 0:return o=Object(r.Xd)((function(){var t=r.Dd.resizeBilinear(e,[w.width,w.height]),n=Object(r.Hd)(Object(r.Sd)(Object(r.xd)(t,255),.5),2),o=w.blazeFaceModel.predict(n),a=Object(r.Qd)(o),i=function(e,t,n){var o=Object(r.Od)(e,[0,1],[-1,2]),a=Object(r.kd)(o,t),i=Object(r.Od)(e,[0,3],[-1,2]),s=Object(r.xd)(i,n),u=Object(r.xd)(a,n),c=Object(r.xd)(s,2),l=Object(r.Sd)(u,c),d=Object(r.kd)(u,c),p=Object(r.Hd)(l,n),h=Object(r.Hd)(d,n);return Object(r.ud)([p,h],1)}(a,w.anchors,w.inputSize),s=Object(r.Od)(a,[0,0],[-1,1]);return[a,i,Object(r.Qd)(Object(r.Nd)(s))]})),u=o[0],c=o[1],l=o[2],d=console.warn,console.warn=function(){},p=r.Dd.nonMaxSuppression(c,l,this.maxFaces,this.iouThreshold,this.scoreThreshold),console.warn=d,[4,p.array()];case 1:return h=O.sent(),p.dispose(),f=h.map((function(e){return Object(r.Od)(c,[e,0],[1,-1])})),t?[3,3]:[4,Promise.all(f.map((function(e){return a(w,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,e.array()];case 1:return t=n.sent(),e.dispose(),[2,t]}}))}))})))];case 2:f=O.sent(),O.label=3;case 3:for(m=e.shape[1],g=e.shape[2],b=t?Object(r.xd)([g,m],this.inputSize):[g/this.inputSizeData[0],m/this.inputSizeData[1]],y=[],v=function(e){var o=f[e],a=Object(r.Xd)((function(){var a=s(o instanceof r.Zc?o:Object(r.Wd)(o));if(!n)return a;var i,c=h[e];return i=t?Object(r.Od)(w.anchors,[c,0],[1,2]):w.anchorsData[c],{box:a,landmarks:Object(r.Ld)(Object(r.Qd)(Object(r.Od)(u,[c,5],[1,-1])),[6,-1]),probability:Object(r.Od)(l,[c],[1]),anchor:i}}));y.push(a)},x=0;x<f.length;x++)v(x);return c.dispose(),l.dispose(),u.dispose(),[2,{boxes:y,scaleFactor:b}]}}))}))},e.prototype.estimateFaces=function(e,t,n,o){return void 0===t&&(t=!1),void 0===n&&(n=!1),void 0===o&&(o=!0),a(this,void 0,void 0,(function(){var s,u,d,p,h,f,m=this;return i(this,(function(g){switch(g.label){case 0:return s=function(e){return e instanceof r.Zc?[e.shape[0],e.shape[1]]:[e.height,e.width]}(e),u=s[1],d=Object(r.Xd)((function(){return e instanceof r.Zc||(e=r.od.fromPixels(e)),Object(r.Bd)(Object(r.qd)(e,"float32"),0)})),[4,this.getBoundingBoxes(d,t,o)];case 1:return p=g.sent(),h=p.boxes,f=p.scaleFactor,d.dispose(),t?[2,h.map((function(e){var t=l(e,f),a={topLeft:Object(r.Od)(t,[0],[2]),bottomRight:Object(r.Od)(t,[2],[2])};if(o){var i=e,s=i.landmarks,d=i.probability,p=i.anchor,h=Object(r.Hd)(Object(r.kd)(s,p),f);a.landmarks=h,a.probability=d}return n&&(a=c(a,u)),a}))]:[2,Promise.all(h.map((function(e){return a(m,void 0,void 0,(function(){var t,r,s,d,p,h,m,g,b,y,v,x=this;return i(this,(function(w){switch(w.label){case 0:return t=l(e,f),o?[3,2]:[4,t.array()];case 1:return p=w.sent(),r={topLeft:p.slice(0,2),bottomRight:p.slice(2)},[3,4];case 2:return[4,Promise.all([e.landmarks,t,e.probability].map((function(e){return a(x,void 0,void 0,(function(){return i(this,(function(t){return[2,e.array()]}))}))})))];case 3:s=w.sent(),d=s[0],p=s[1],h=s[2],m=e.anchor,b=(g=f)[0],y=g[1],v=d.map((function(e){return[(e[0]+m[0])*b,(e[1]+m[1])*y]})),r={topLeft:p.slice(0,2),bottomRight:p.slice(2),landmarks:v,probability:h},function(e){e.startEndTensor.dispose(),e.startPoint.dispose(),e.endPoint.dispose()}(e.box),e.landmarks.dispose(),e.probability.dispose(),w.label=4;case 4:return t.dispose(),n&&(r=c(r,u)),[2,r]}}))}))})))]}}))}))},e}();function p(e){var t=void 0===e?{}:e,n=t.maxFaces,r=void 0===n?10:n,s=t.inputWidth,u=void 0===s?128:s,c=t.inputHeight,l=void 0===c?128:c,p=t.iouThreshold,h=void 0===p?.3:p,f=t.scoreThreshold,m=void 0===f?.75:f,g=t.modelUrl;return a(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return null==g?[3,2]:[4,Object(o.a)(g)];case 1:return e=t.sent(),[3,4];case 2:return[4,Object(o.a)("https://tfhub.dev/tensorflow/tfjs-model/blazeface/1/default/1",{fromTFHub:!0})];case 3:e=t.sent(),t.label=4;case 4:return[2,new d(e,u,l,r,h,m)]}}))}))}},function(e,t,n){(function(e){(function(){"use strict";var t;function n(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var r="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};var o=function(t){t=["object"==typeof globalThis&&globalThis,t,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof e&&e];for(var n=0;n<t.length;++n){var r=t[n];if(r&&r.Math==Math)return r}throw Error("Cannot find global object")}(this);function a(e,t){if(t)e:{var n=o;e=e.split(".");for(var a=0;a<e.length-1;a++){var i=e[a];if(!(i in n))break e;n=n[i]}(t=t(a=n[e=e[e.length-1]]))!=a&&null!=t&&r(n,e,{configurable:!0,writable:!0,value:t})}}function i(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function s(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return t?t.call(e):{next:n(e)}}function u(e){if(!(e instanceof Array)){e=s(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}a("Symbol",(function(e){function t(e,t){this.g=e,r(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;t.prototype.toString=function(){return this.g};var n="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",o=0;return function e(r){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new t(n+(r||"")+"_"+o++,r)}})),a("Symbol.iterator",(function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),a=0;a<t.length;a++){var s=o[t[a]];"function"==typeof s&&"function"!=typeof s.prototype[e]&&r(s.prototype,e,{configurable:!0,writable:!0,value:function(){return i(n(this))}})}return e}));var c,l="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)c=Object.setPrototypeOf;else{var d;e:{var p={};try{p.__proto__={a:!0},d=p.a;break e}catch(e){}d=!1}c=d?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var h=c;function f(e,t){if(e.prototype=l(t.prototype),e.prototype.constructor=e,h)h(e,t);else for(var n in t)if("prototype"!=n)if(Object.defineProperties){var r=Object.getOwnPropertyDescriptor(t,n);r&&Object.defineProperty(e,n,r)}else e[n]=t[n];e.ea=t.prototype}function m(){this.l=!1,this.i=null,this.h=void 0,this.g=1,this.s=this.m=0,this.j=null}function g(e){if(e.l)throw new TypeError("Generator is already running");e.l=!0}function b(e,t){e.j={U:t,V:!0},e.g=e.m||e.s}function y(e,t,n){return e.g=n,{value:t}}function v(e){this.g=new m,this.h=e}function x(e,t,n,r){try{var o=t.call(e.g.i,n);if(!(o instanceof Object))throw new TypeError("Iterator result "+o+" is not an object");if(!o.done)return e.g.l=!1,o;var a=o.value}catch(t){return e.g.i=null,b(e.g,t),w(e)}return e.g.i=null,r.call(e.g,a),w(e)}function w(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.l=!1,{value:t.value,done:!1}}catch(t){e.g.h=void 0,b(e.g,t)}if(e.g.l=!1,e.g.j){if(t=e.g.j,e.g.j=null,t.V)throw t.U;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function O(e){this.next=function(t){return g(e.g),e.g.i?t=x(e,e.g.i.next,t,e.g.o):(e.g.o(t),t=w(e)),t},this.throw=function(t){return g(e.g),e.g.i?t=x(e,e.g.i.throw,t,e.g.o):(b(e.g,t),t=w(e)),t},this.return=function(t){return function(e,t){g(e.g);var n=e.g.i;return n?x(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),w(e))}(e,t)},this[Symbol.iterator]=function(){return this}}function k(e,t){return t=new O(new v(t)),h&&e.prototype&&h(t,e.prototype),t}m.prototype.o=function(e){this.h=e},m.prototype.return=function(e){this.j={return:e},this.g=this.s};var S="function"==typeof Object.assign?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(r)for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e};a("Object.assign",(function(e){return e||S})),a("Promise",(function(e){function t(e){this.h=0,this.i=void 0,this.g=[],this.o=!1;var t=this.j();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function n(){this.g=null}function r(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;n.prototype.h=function(e){if(null==this.g){this.g=[];var t=this;this.i((function(){t.l()}))}this.g.push(e)};var a=o.setTimeout;n.prototype.i=function(e){a(e,0)},n.prototype.l=function(){for(;this.g&&this.g.length;){var e=this.g;this.g=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(e){this.j(e)}}}this.g=null},n.prototype.j=function(e){this.i((function(){throw e}))},t.prototype.j=function(){function e(e){return function(r){n||(n=!0,e.call(t,r))}}var t=this,n=!1;return{resolve:e(this.C),reject:e(this.l)}},t.prototype.C=function(e){if(e===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.F(e);else{e:switch(typeof e){case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.u(e):this.m(e)}},t.prototype.u=function(e){var t=void 0;try{t=e.then}catch(e){return void this.l(e)}"function"==typeof t?this.G(t,e):this.m(e)},t.prototype.l=function(e){this.s(2,e)},t.prototype.m=function(e){this.s(1,e)},t.prototype.s=function(e,t){if(0!=this.h)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.h);this.h=e,this.i=t,2===this.h&&this.D(),this.A()},t.prototype.D=function(){var e=this;a((function(){if(e.B()){var t=o.console;void 0!==t&&t.error(e.i)}}),1)},t.prototype.B=function(){if(this.o)return!1;var e=o.CustomEvent,t=o.Event,n=o.dispatchEvent;return void 0===n||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=o.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.i,n(e))},t.prototype.A=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)i.h(this.g[e]);this.g=null}};var i=new n;return t.prototype.F=function(e){var t=this.j();e.J(t.resolve,t.reject)},t.prototype.G=function(e,t){var n=this.j();try{e.call(t,n.resolve,n.reject)}catch(e){n.reject(e)}},t.prototype.then=function(e,n){function r(e,t){return"function"==typeof e?function(t){try{o(e(t))}catch(e){a(e)}}:t}var o,a,i=new t((function(e,t){o=e,a=t}));return this.J(r(e,o),r(n,a)),i},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.J=function(e,t){function n(){switch(r.h){case 1:e(r.i);break;case 2:t(r.i);break;default:throw Error("Unexpected state: "+r.h)}}var r=this;null==this.g?i.h(n):this.g.push(n),this.o=!0},t.resolve=r,t.reject=function(e){return new t((function(t,n){n(e)}))},t.race=function(e){return new t((function(t,n){for(var o=s(e),a=o.next();!a.done;a=o.next())r(a.value).J(t,n)}))},t.all=function(e){var n=s(e),o=n.next();return o.done?r([]):new t((function(e,t){function a(t){return function(n){i[t]=n,0==--s&&e(i)}}var i=[],s=0;do{i.push(void 0),s++,r(o.value).J(a(i.length-1),t),o=n.next()}while(!o.done)}))},t})),a("Object.is",(function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}})),a("Array.prototype.includes",(function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var r=n.length;for(0>(t=t||0)&&(t=Math.max(t+r,0));t<r;t++){var o=n[t];if(o===e||Object.is(o,e))return!0}return!1}})),a("String.prototype.includes",(function(e){return e||function(e,t){if(null==this)throw new TypeError("The 'this' value for String.prototype.includes must not be null or undefined");if(e instanceof RegExp)throw new TypeError("First argument to String.prototype.includes must not be a regular expression");return-1!==this.indexOf(e,t||0)}})),a("Array.prototype.keys",(function(e){return e||function(){return function(e,t){e instanceof String&&(e+="");var n=0,r=!1,o={next:function(){if(!r&&n<e.length){var o=n++;return{value:t(o,e[o]),done:!1}}return r=!0,{done:!0,value:void 0}}};return o[Symbol.iterator]=function(){return o},o}(this,(function(e){return e}))}}));var T=this||self;function C(e,t){e=e.split(".");var n,r=T;e[0]in r||void 0===r.execScript||r.execScript("var "+e[0]);for(;e.length&&(n=e.shift());)e.length||void 0===t?r=r[n]&&r[n]!==Object.prototype[n]?r[n]:r[n]={}:r[n]=t}function E(e,t){return t=String.fromCharCode.apply(null,t),null==e?t:e+t}var I,j,N="undefined"!=typeof TextDecoder,A="undefined"!=typeof TextEncoder;function R(e){if(A)e=(j||(j=new TextEncoder)).encode(e);else{var t=void 0;t=void 0!==t&&t;for(var n=0,r=new Uint8Array(3*e.length),o=0;o<e.length;o++){var a=e.charCodeAt(o);if(128>a)r[n++]=a;else{if(2048>a)r[n++]=a>>6|192;else{if(55296<=a&&57343>=a){if(56319>=a&&o<e.length){var i=e.charCodeAt(++o);if(56320<=i&&57343>=i){a=1024*(a-55296)+i-56320+65536,r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128;continue}o--}if(t)throw Error("Found an unpaired surrogate");a=65533}r[n++]=a>>12|224,r[n++]=a>>6&63|128}r[n++]=63&a|128}}e=r.subarray(0,n)}return e}var _={},$=null;function F(e,t){void 0===t&&(t=0),M(),t=_[t];for(var n=Array(Math.floor(e.length/3)),r=t[64]||"",o=0,a=0;o<e.length-2;o+=3){var i=e[o],s=e[o+1],u=e[o+2],c=t[i>>2];i=t[(3&i)<<4|s>>4],s=t[(15&s)<<2|u>>6],u=t[63&u],n[a++]=c+i+s+u}switch(c=0,u=r,e.length-o){case 2:u=t[(15&(c=e[o+1]))<<2]||r;case 1:e=e[o],n[a]=t[e>>2]+t[(3&e)<<4|c>>4]+u+r}return n.join("")}function D(e){var t=e.length,n=3*t/4;n%3?n=Math.floor(n):-1!="=.".indexOf(e[t-1])&&(n=-1!="=.".indexOf(e[t-2])?n-2:n-1);var r=new Uint8Array(n),o=0;return function(e,t){function n(t){for(;r<e.length;){var n=e.charAt(r++),o=$[n];if(null!=o)return o;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return t}M();for(var r=0;;){var o=n(-1),a=n(0),i=n(64),s=n(64);if(64===s&&-1===o)break;t(o<<2|a>>4),64!=i&&(t(a<<4&240|i>>2),64!=s&&t(i<<6&192|s))}}(e,(function(e){r[o++]=e})),r.subarray(0,o)}function M(){if(!$){$={};for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),t=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++){var r=e.concat(t[n].split(""));_[n]=r;for(var o=0;o<r.length;o++){var a=r[o];void 0===$[a]&&($[a]=o)}}}}var P,L="function"==typeof Uint8Array.prototype.slice;function B(e,t,n){return t===n?P||(P=new Uint8Array(0)):L?e.slice(t,n):new Uint8Array(e.subarray(t,n))}var z=0;function U(e,t){t=void 0!==(t=void 0===t?{}:t).v&&t.v,this.h=null,this.g=this.i=this.j=0,this.l=!1,this.v=t,e&&V(this,e)}function V(e,t){t=t.constructor===Uint8Array?t:t.constructor===ArrayBuffer||t.constructor===Array?new Uint8Array(t):t.constructor===String?D(t):t instanceof Uint8Array?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(0),e.h=t,e.j=0,e.i=e.h.length,e.g=e.j}function W(e){var t=e.h,n=t[e.g],r=127&n;return 128>n?(e.g+=1,r):(r|=(127&(n=t[e.g+1]))<<7,128>n?(e.g+=2,r):(r|=(127&(n=t[e.g+2]))<<14,128>n?(e.g+=3,r):(r|=(127&(n=t[e.g+3]))<<21,128>n?(e.g+=4,r):(r|=(15&(n=t[e.g+4]))<<28,128>n?(e.g+=5,r>>>0):(e.g+=5,128<=t[e.g++]&&128<=t[e.g++]&&128<=t[e.g++]&&128<=t[e.g++]&&e.g++,r)))))}function G(e){var t=e.h[e.g],n=e.h[e.g+1],r=e.h[e.g+2],o=e.h[e.g+3];return e.g+=4,e=2*((n=(t<<0|n<<8|r<<16|o<<24)>>>0)>>31)+1,t=n>>>23&255,n&=8388607,255==t?n?NaN:1/0*e:0==t?e*Math.pow(2,-149)*n:e*Math.pow(2,t-150)*(n+Math.pow(2,23))}U.prototype.reset=function(){this.g=this.j};var H=[];function q(){this.g=new Uint8Array(64),this.h=0}function K(e,t){for(;127<t;)e.push(127&t|128),t>>>=7;e.push(t)}function X(e){var t={},n=void 0!==t.N&&t.N;this.o={v:void 0!==t.v&&t.v},this.N=n,t=this.o,H.length?(n=H.pop(),t&&(n.v=t.v),e&&V(n,e),e=n):e=new U(e,t),this.g=e,this.m=this.g.g,this.h=this.i=this.l=-1,this.j=!1}function Y(e){var t=e.g;if((t=t.g==t.i)||(t=e.j)||(t=(t=e.g).l||0>t.g||t.g>t.i),t)return!1;e.m=e.g.g;var n=7&(t=W(e.g));return 0!=n&&5!=n&&1!=n&&2!=n&&3!=n&&4!=n?(e.j=!0,!1):(e.i=t,e.l=t>>>3,e.h=n,!0)}function Q(e,t,n){var r=e.g.i,o=W(e.g),a=e.g.g+o;if(e.g.i=a,n(t,e),0!==(n=a-e.g.g))throw Error("Message parsing ended unexpectedly. Expected to read "+o+" bytes, instead read "+(o-n)+" bytes, either the data ended unexpectedly or the message misreported its own length");return e.g.g=a,e.g.i=r,t}function Z(e){var t,n=W(e.g),r=(e=e.g).g;if(e.g+=n,e=e.h,N)(t=I)||(t=I=new TextDecoder("utf-8",{fatal:!1})),t=t.decode(e.subarray(r,r+n));else{n=r+n;for(var o,a,i,s=[],u=null;r<n;)128>(o=e[r++])?s.push(o):224>o?r>=n?s.push(65533):(a=e[r++],194>o||128!=(192&a)?(r--,s.push(65533)):s.push((31&o)<<6|63&a)):240>o?r>=n-1?s.push(65533):128!=(192&(a=e[r++]))||224===o&&160>a||237===o&&160<=a||128!=(192&(t=e[r++]))?(r--,s.push(65533)):s.push((15&o)<<12|(63&a)<<6|63&t):244>=o?r>=n-2?s.push(65533):128!=(192&(a=e[r++]))||0!=a-144+(o<<28)>>30||128!=(192&(t=e[r++]))||128!=(192&(i=e[r++]))?(r--,s.push(65533)):(o=(7&o)<<18|(63&a)<<12|(63&t)<<6|63&i,o-=65536,s.push(55296+(o>>10&1023),56320+(1023&o))):s.push(65533),8192<=s.length&&(u=E(u,s),s.length=0);t=E(u,s)}return t}function J(){this.h=[],this.i=0,this.g=new q}function ee(e,t){0!==t.length&&(e.h.push(t),e.i+=t.length)}function te(e){var t=e.i+e.g.length();if(0===t)return new Uint8Array(0);t=new Uint8Array(t);for(var n=e.h,r=n.length,o=0,a=0;a<r;a++){var i=n[a];0!==i.length&&(t.set(i,o),o+=i.length)}return 0!==(r=(n=e.g).h)&&(t.set(n.g.subarray(0,r),o),n.h=0),e.h=[t],t}function ne(e,t,n){if(null!=n){K(e.g,8*t+5),e=e.g;var r=n;0===(r=(n=0>r?1:0)?-r:r)?0<1/r?z=0:(0,z=2147483648):isNaN(r)?(0,z=2147483647):34028234663852886e22<r?(0,z=(n<<31|2139095040)>>>0):11754943508222875e-54>r?(r=Math.round(r/Math.pow(2,-149)),0,z=(n<<31|r)>>>0):(t=Math.floor(Math.log(r)/Math.LN2),r*=Math.pow(2,-t),16777216<=(r=Math.round(8388608*r))&&++t,0,z=(n<<31|t+127<<23|8388607&r)>>>0),n=z,e.push(n>>>0&255),e.push(n>>>8&255),e.push(n>>>16&255),e.push(n>>>24&255)}}q.prototype.push=function(e){if(!(this.h+1<this.g.length)){var t=this.g;this.g=new Uint8Array(Math.ceil(1+2*this.g.length)),this.g.set(t)}this.g[this.h++]=e},q.prototype.length=function(){return this.h},q.prototype.end=function(){var e=this.g,t=this.h;return this.h=0,B(e,0,t)},X.prototype.reset=function(){this.g.reset(),this.h=this.l=-1};var re="function"==typeof Uint8Array;function oe(e,t,n){if(null!=e)return"object"==typeof e?re&&e instanceof Uint8Array?n(e):ae(e,t,n):t(e)}function ae(e,t,n){if(Array.isArray(e)){for(var r=Array(e.length),o=0;o<e.length;o++)r[o]=oe(e[o],t,n);return Array.isArray(e)&&e.W&&ce(r),r}for(o in r={},e)r[o]=oe(e[o],t,n);return r}function ie(e){return"number"==typeof e?isFinite(e)?e:String(e):e}var se,ue={W:{value:!0,configurable:!0}};function ce(e){return Array.isArray(e)&&!Object.isFrozen(e)&&Object.defineProperties(e,ue),e}function le(e,t,n){var r=se;if(se=null,e||(e=r),r=this.constructor.ca,e||(e=r?[r]:[]),this.j=r?0:-1,this.i=null,this.g=e,e=(r=this.g.length)-1,!r||(null===(r=this.g[e])||"object"!=typeof r||Array.isArray(r)||re&&r instanceof Uint8Array)?void 0!==t&&-1<t?(this.l=Math.max(t,e+1-this.j),this.h=null):this.l=Number.MAX_VALUE:(this.l=e-this.j,this.h=r),n)for(t=0;t<n.length;t++)(e=n[t])<this.l?(e+=this.j,(r=this.g[e])?ce(r):this.g[e]=de):(pe(this),(r=this.h[e])?ce(r):this.h[e]=de)}var de=Object.freeze(ce([]));function pe(e){var t=e.l+e.j;e.g[t]||(e.h=e.g[t]={})}function he(e,t,n){return-1===t?null:void 0!==n&&n||t>=e.l?e.h?e.h[t]:void 0:e.g[t+e.j]}function fe(e){var t=void 0!==t&&t,n=he(e,1,t);return null==n&&(n=de),n===de&&ge(e,1,n=ce([]),t),n}function me(e,t,n){return null==(e=null==(e=he(e,t))?e:+e)?void 0===n?0:n:e}function ge(e,t,n,r){void 0!==r&&r||t>=e.l?(pe(e),e.h[t]=n):e.g[t+e.j]=n}function be(e,t){e.i||(e.i={});var n=e.i[1];if(!n){var r=fe(e);n=[];for(var o=0;o<r.length;o++)n[o]=new t(r[o]);e.i[1]=n}return n}function ye(e,t,n,r){var o=be(e,n);t=t||new n,e=fe(e),null!=r?(o.splice(r,0,t),e.splice(r,0,ve(t,!1))):(o.push(t),e.push(ve(t,!1)))}function ve(e,t){if(e.i)for(var n in e.i){var r=e.i[n];if(Array.isArray(r))for(var o=0;o<r.length;o++)r[o]&&ve(r[o],t);else r&&ve(r,t)}return e.g}function xe(e,t){return null==(e=he(e,t))?0:e}function we(e,t){return null==(e=he(e,t))?"":e}function Oe(e,t){if(e=e.m){ee(t,t.g.end());for(var n=0;n<e.length;n++)ee(t,e[n])}}function ke(e,t){if(4==t.h)return!1;var n=t.m;return function e(t){switch(t.h){case 0:if(0!=t.h)e(t);else{for(t=t.g;128&t.h[t.g];)t.g++;t.g++}break;case 1:1!=t.h?e(t):(t=t.g).g+=8;break;case 2:if(2!=t.h)e(t);else{var n=W(t.g);(t=t.g).g+=n}break;case 5:5!=t.h?e(t):(t=t.g).g+=4;break;case 3:for(n=t.l;;){if(!Y(t)){t.j=!0;break}if(4==t.h){t.l!=n&&(t.j=!0);break}e(t)}break;default:t.j=!0}}(t),t.N||(t=B(t.g.h,n,t.g.g),(n=e.m)?n.push(t):e.m=[t]),!0}function Se(e,t){var n=void 0;return new(n||(n=Promise))((function(r,o){function a(e){try{s(t.next(e))}catch(e){o(e)}}function i(e){try{s(t.throw(e))}catch(e){o(e)}}function s(e){e.done?r(e.value):new n((function(t){t(e.value)})).then(a,i)}s((t=t.apply(e,void 0)).next())}))}function Te(e){le.call(this,e)}function Ce(e,t){for(;Y(t);)switch(t.i){case 8:var n=W(t.g);ge(e,1,n);break;case 21:ge(e,2,n=G(t.g));break;case 26:ge(e,3,n=Z(t));break;case 34:ge(e,4,n=Z(t));break;default:if(!ke(e,t))return e}return e}function Ee(e){le.call(this,e,-1,Ie)}le.prototype.toJSON=function(){return ae(ve(this,!1),ie,F)},le.prototype.toString=function(){return ve(this,!1).toString()},f(Te,le),f(Ee,le),Ee.prototype.addClassification=function(e,t){return ye(this,e,Te,t),this};var Ie=[1];function je(e){le.call(this,e)}function Ne(e,t){for(;Y(t);)switch(t.i){case 13:var n=G(t.g);ge(e,1,n);break;case 21:ge(e,2,n=G(t.g));break;case 29:ge(e,3,n=G(t.g));break;case 37:ge(e,4,n=G(t.g));break;case 45:ge(e,5,n=G(t.g));break;default:if(!ke(e,t))return e}return e}function Ae(e){le.call(this,e,-1,Re)}f(je,le),f(Ae,le);var Re=[1];function _e(e){le.call(this,e)}function $e(e,t,n){if(n=e.createShader(0===n?e.VERTEX_SHADER:e.FRAGMENT_SHADER),e.shaderSource(n,t),e.compileShader(n),!e.getShaderParameter(n,e.COMPILE_STATUS))throw Error("Could not compile WebGL shader.\n\n"+e.getShaderInfoLog(n));return n}function Fe(e){return be(e,Te).map((function(e){return{index:xe(e,1),Y:me(e,2),label:null!=he(e,3)?we(e,3):void 0,displayName:null!=he(e,4)?we(e,4):void 0}}))}function De(e){return{x:me(e,1),y:me(e,2),z:me(e,3),visibility:null!=he(e,4)?me(e,4):void 0}}function Me(e){e:{var t=new Ae;for(e=new X(e);Y(e);)switch(e.i){case 10:ye(t,Q(e,new je,Ne),je,void 0);break;default:if(!ke(t,e))break e}}return be(t,je).map(De)}function Pe(e,t){this.h=e,this.g=t,this.l=0}function Le(e,t,n){return function(e,t){var n=e.g;if(void 0===e.m){var r=$e(n,"\n  attribute vec2 aVertex;\n  attribute vec2 aTex;\n  varying vec2 vTex;\n  void main(void) {\n    gl_Position = vec4(aVertex, 0.0, 1.0);\n    vTex = aTex;\n  }",0),o=$e(n,"\n  precision mediump float;\n  varying vec2 vTex;\n  uniform sampler2D sampler0;\n  void main(){\n    gl_FragColor = texture2D(sampler0, vTex);\n  }",1),a=n.createProgram();if(n.attachShader(a,r),n.attachShader(a,o),n.linkProgram(a),!n.getProgramParameter(a,n.LINK_STATUS))throw Error("Could not compile WebGL program.\n\n"+n.getProgramInfoLog(a));r=e.m=a,n.useProgram(r),o=n.getUniformLocation(r,"sampler0"),e.j={I:n.getAttribLocation(r,"aVertex"),H:n.getAttribLocation(r,"aTex"),da:o},e.s=n.createBuffer(),n.bindBuffer(n.ARRAY_BUFFER,e.s),n.enableVertexAttribArray(e.j.I),n.vertexAttribPointer(e.j.I,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW),n.bindBuffer(n.ARRAY_BUFFER,null),e.o=n.createBuffer(),n.bindBuffer(n.ARRAY_BUFFER,e.o),n.enableVertexAttribArray(e.j.H),n.vertexAttribPointer(e.j.H,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([0,1,0,0,1,0,1,1]),n.STATIC_DRAW),n.bindBuffer(n.ARRAY_BUFFER,null),n.uniform1i(o,0)}r=e.j,n.useProgram(e.m),n.canvas.width=t.width,n.canvas.height=t.height,n.viewport(0,0,t.width,t.height),n.activeTexture(n.TEXTURE0),e.h.bindTexture2d(t.glName),n.enableVertexAttribArray(r.I),n.bindBuffer(n.ARRAY_BUFFER,e.s),n.vertexAttribPointer(r.I,2,n.FLOAT,!1,0,0),n.enableVertexAttribArray(r.H),n.bindBuffer(n.ARRAY_BUFFER,e.o),n.vertexAttribPointer(r.H,2,n.FLOAT,!1,0,0),n.bindFramebuffer(n.DRAW_FRAMEBUFFER?n.DRAW_FRAMEBUFFER:n.FRAMEBUFFER,null),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.colorMask(!0,!0,!0,!0),n.drawArrays(n.TRIANGLE_FAN,0,4),n.disableVertexAttribArray(r.I),n.disableVertexAttribArray(r.H),n.bindBuffer(n.ARRAY_BUFFER,null),e.h.bindTexture2d(0)}(e,t),"function"==typeof e.g.canvas.transferToImageBitmap?Promise.resolve(e.g.canvas.transferToImageBitmap()):n?Promise.resolve(e.g.canvas):"function"==typeof createImageBitmap?createImageBitmap(e.g.canvas):(void 0===e.i&&(e.i=document.createElement("canvas")),new Promise((function(t){e.i.height=e.g.canvas.height,e.i.width=e.g.canvas.width,e.i.getContext("2d",{}).drawImage(e.g.canvas,0,0,e.g.canvas.width,e.g.canvas.height),t(e.i)})))}function Be(e){this.g=e}f(_e,le);var ze=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]);function Ue(e,t){return t+e}function Ve(e,t){window[e]=t}function We(e){if(this.g=e,this.listeners={},this.j={},this.F={},this.m={},this.s={},this.G=this.o=this.R=!0,this.C=Promise.resolve(),this.P="",this.B={},this.locateFile=e&&e.locateFile||Ue,"object"==typeof window)var t=window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/";else{if("undefined"==typeof location)throw Error("solutions can only be loaded on a web page or in a web worker");t=location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/"}if(this.S=t,e.options)for(var n=(t=s(Object.keys(e.options))).next();!n.done;n=t.next()){n=n.value;var r=e.options[n].default;void 0!==r&&(this.j[n]="function"==typeof r?r():r)}}function Ge(e){return Se(e,(function e(){var t,n,r,o,a,i,s,c,l,d,p,h=this;return k(e,(function(e){switch(e.g){case 1:return t=h,h.R?(n=function(e,t){return void 0===e.g.files?[]:"function"==typeof e.g.files?e.g.files(t):e.g.files}(h,h.j),y(e,function(){return Se(this,(function e(){return k(e,(function(e){switch(e.g){case 1:return e.m=2,y(e,WebAssembly.instantiate(ze),4);case 4:e.g=3,e.m=0;break;case 2:return e.m=0,e.j=null,e.return(!1);case 3:return e.return(!0)}}))}))}(),2)):e.return();case 2:if(r=e.h,"object"==typeof window)return Ve("createMediapipeSolutionsWasm",{locateFile:h.locateFile}),Ve("createMediapipeSolutionsPackedAssets",{locateFile:h.locateFile}),i=n.filter((function(e){return void 0!==e.data})),s=n.filter((function(e){return void 0===e.data})),c=Promise.all(i.map((function(e){var n=He(t,e.url);if(void 0!==e.path){var r=e.path;n=n.then((function(e){return t.overrideFile(r,e),Promise.resolve(e)}))}return n}))),l=Promise.all(s.map((function(e){return void 0===e.simd||e.simd&&r||!e.simd&&!r?function(e){var t=document.createElement("script");return t.setAttribute("src",e),t.setAttribute("crossorigin","anonymous"),new Promise((function(e){t.addEventListener("load",(function(){e()}),!1),t.addEventListener("error",(function(){e()}),!1),document.body.appendChild(t)}))}(t.locateFile(e.url,t.S)):Promise.resolve()}))).then((function(){return Se(t,(function e(){var t,n,r=this;return k(e,(function(e){if(1==e.g)return t=window.createMediapipeSolutionsWasm,n=window.createMediapipeSolutionsPackedAssets,y(e,t(n),2);r.h=e.h,e.g=0}))}))})),d=Se(t,(function e(){var t=this;return k(e,(function(e){return t.g.graph&&t.g.graph.url?e=y(e,He(t,t.g.graph.url),0):(e.g=0,e=void 0),e}))})),y(e,Promise.all([l,c,d]),7);if("function"!=typeof importScripts)throw Error("solutions can only be loaded on a web page or in a web worker");return o=n.filter((function(e){return void 0===e.simd||e.simd&&r||!e.simd&&!r})).map((function(e){return t.locateFile(e.url,t.S)})),importScripts.apply(null,u(o)),y(e,createMediapipeSolutionsWasm(Module),6);case 6:h.h=e.h,h.l=new OffscreenCanvas(1,1),h.h.canvas=h.l,a=h.h.GL.createContext(h.l,{antialias:!1,alpha:!1,ba:"undefined"!=typeof WebGL2RenderingContext?2:1}),h.h.GL.makeContextCurrent(a),e.g=4;break;case 7:if(h.l=document.createElement("canvas"),!(p=h.l.getContext("webgl2",{}))&&!(p=h.l.getContext("webgl",{})))return alert("Failed to create WebGL canvas context when passing video frame."),e.return();h.D=p,h.h.canvas=h.l,h.h.createContext(h.l,!0,!0,{});case 4:h.i=new h.h.SolutionWasm,h.R=!1,e.g=0}}))}))}function He(e,t){return Se(e,(function e(){var n,r,o=this;return k(e,(function(e){return t in o.F?e.return(o.F[t]):(n=o.locateFile(t,""),r=fetch(n).then((function(e){return e.arrayBuffer()})),o.F[t]=r,e.return(r))}))}))}function qe(e,t,n){return Se(e,(function e(){var r,o,a,i,u,c,l,d,p,h,f,m,g,b,v=this;return k(e,(function(e){switch(e.g){case 1:if(!n)return e.return(t);for(r={},o=0,a=s(Object.keys(n)),i=a.next();!i.done;i=a.next())u=i.value,"string"!=typeof(c=n[u])&&"texture"===c.type&&void 0!==t[c.stream]&&++o;1<o&&(v.G=!1),l=s(Object.keys(n)),i=l.next();case 2:if(i.done){e.g=4;break}if(d=i.value,"string"==typeof(p=n[d]))return g=r,b=d,y(e,function(e,t,n){return Se(e,(function e(){var r,o=this;return k(e,(function(e){return"number"==typeof n||n instanceof Uint8Array||n instanceof o.h.Uint8BlobList?e.return(n):n instanceof o.h.Texture2dDataOut?((r=o.s[t])||(r=new Pe(o.h,o.D),o.s[t]=r),e.return(Le(r,n,o.G))):e.return(void 0)}))}))}(v,d,t[p]),14);if(h=t[p.stream],"detection_list"===p.type){if(h){for(var x=h.getRectList(),w=h.getLandmarksList(),O=h.getClassificationsList(),S=[],T=0;T<x.size();++T){var C=x.get(T);e:{var E=new _e;for(C=new X(C);Y(C);)switch(C.i){case 13:var I=G(C.g);ge(E,1,I);break;case 21:ge(E,2,I=G(C.g));break;case 29:ge(E,3,I=G(C.g));break;case 37:ge(E,4,I=G(C.g));break;case 45:ge(E,5,I=G(C.g));break;case 48:for(var j=C.g,N=128,A=0,R=I=0;4>R&&128<=N;R++)A|=(127&(N=j.h[j.g++]))<<7*R;if(128<=N&&(A|=(127&(N=j.h[j.g++]))<<28,I|=(127&N)>>4),128<=N)for(R=0;5>R&&128<=N;R++)I|=(127&(N=j.h[j.g++]))<<7*R+3;128>N?(j=A>>>0,(I=2147483648&(N=I>>>0))&&(N=~N>>>0,0==(j=1+~j>>>0)&&(N=N+1>>>0)),j=4294967296*N+(j>>>0),I=I?-j:j):(j.l=!0,I=void 0),ge(E,6,I);break;default:if(!ke(E,C))break e}}E={Z:me(E,1),$:me(E,2),height:me(E,3),width:me(E,4),rotation:me(E,5,0),X:xe(E,6)},C=Me(w.get(T)),j=O.get(T);e:for(I=new Ee,j=new X(j);Y(j);)switch(j.i){case 10:I.addClassification(Q(j,new Te,Ce));break;default:if(!ke(I,j))break e}E={T:E,O:C,M:Fe(I)},S.push(E)}x=S}else x=[];r[d]=x,e.g=7;break}if("proto_list"===p.type){if(h){for(x=Array(h.size()),w=0;w<h.size();w++)x[w]=h.get(w);h.delete()}else x=[];r[d]=x,e.g=7;break}if(void 0===h){e.g=3;break}if("float_list"===p.type){r[d]=h,e.g=7;break}if("proto"===p.type){r[d]=h,e.g=7;break}if("texture"!==p.type)throw Error("Unknown output config type: '"+p.type+"'");return(f=v.s[d])||(f=new Pe(v.h,v.D),v.s[d]=f),y(e,Le(f,h,v.G),13);case 13:m=e.h,r[d]=m;case 7:p.transform&&r[d]&&(r[d]=p.transform(r[d])),e.g=3;break;case 14:g[b]=e.h;case 3:i=l.next(),e.g=2;break;case 4:return e.return(r)}}))}))}function Ke(e,t){for(var n=t.name||"$",r=[].concat(u(t.wants)),o=new e.h.StringList,a=s(t.wants),i=a.next();!i.done;i=a.next())o.push_back(i.value);a=e.h.PacketListener.implement({onResults:function(o){for(var a={},i=0;i<t.wants.length;++i)a[r[i]]=o.get(i);var s=e.listeners[n];s&&(e.C=qe(e,a,t.outs).then((function(n){n=s(n);for(var o=0;o<t.wants.length;++o){var i=a[r[o]];"object"==typeof i&&i.hasOwnProperty&&i.hasOwnProperty("delete")&&i.delete()}n&&(e.C=n)})))}}),e.i.attachMultiListener(o,a),o.delete()}function Xe(e){switch(void 0===e&&(e=0),e){case 1:return"pose_landmark_full.tflite";case 2:return"pose_landmark_heavy.tflite";default:return"pose_landmark_lite.tflite"}}function Ye(e){var t=this;e=e||{},this.g=new We({locateFile:e.locateFile,files:function(e){return[{url:"pose_solution_packed_assets_loader.js"},{simd:!1,url:"pose_solution_wasm_bin.js"},{simd:!0,url:"pose_solution_simd_wasm_bin.js"},{data:!0,url:Xe(e.modelComplexity)}]},graph:{url:"pose_web.binarypb"},listeners:[{wants:["pose_landmarks","world_landmarks","segmentation_mask","image_transformed"],outs:{image:{type:"texture",stream:"image_transformed"},poseLandmarks:{type:"proto",stream:"pose_landmarks",transform:Me},poseWorldLandmarks:{type:"proto",stream:"world_landmarks",transform:Me},segmentationMask:{type:"texture",stream:"segmentation_mask"}}}],inputs:{image:{type:"video",stream:"input_frames_gpu"}},options:{useCpuInference:{type:0,graphOptionXref:{calculatorType:"InferenceCalculator",fieldName:"use_cpu_inference"},default:"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document},selfieMode:{type:0,graphOptionXref:{calculatorType:"GlScalerCalculator",calculatorIndex:1,fieldName:"flip_horizontal"}},modelComplexity:{type:1,graphOptionXref:{calculatorType:"ConstantSidePacketCalculator",calculatorName:"ConstantSidePacketCalculatorModelComplexity",fieldName:"int_value"},onChange:function(e){return Se(t,(function t(){var n,r,o,a=this;return k(t,(function(t){return 1==t.g?(n=Xe(e),r="third_party/mediapipe/modules/pose_landmark/"+n,y(t,He(a.g,n),2)):(o=t.h,a.g.overrideFile(r,o),t.return(!0))}))}))}},smoothLandmarks:{type:0,graphOptionXref:{calculatorType:"ConstantSidePacketCalculator",calculatorName:"ConstantSidePacketCalculatorSmoothLandmarks",fieldName:"bool_value"}},enableSegmentation:{type:0,graphOptionXref:{calculatorType:"ConstantSidePacketCalculator",calculatorName:"ConstantSidePacketCalculatorEnableSegmentation",fieldName:"bool_value"}},smoothSegmentation:{type:0,graphOptionXref:{calculatorType:"ConstantSidePacketCalculator",calculatorName:"ConstantSidePacketCalculatorSmoothSegmentation",fieldName:"bool_value"}},minDetectionConfidence:{type:1,graphOptionXref:{calculatorType:"TensorsToDetectionsCalculator",calculatorName:"poselandmarkgpu__posedetectiongpu__TensorsToDetectionsCalculator",fieldName:"min_score_thresh"}},minTrackingConfidence:{type:1,graphOptionXref:{calculatorType:"ThresholdingCalculator",calculatorName:"poselandmarkgpu__poselandmarkbyroigpu__tensorstoposelandmarksandsegmentation__ThresholdingCalculator",fieldName:"threshold"}}}})}(t=We.prototype).close=function(){return this.i&&this.i.delete(),Promise.resolve()},t.reset=function(){return Se(this,(function e(){var t=this;return k(e,(function(e){t.i&&(t.i.reset(),t.m={},t.s={}),e.g=0}))}))},t.setOptions=function(e,t){var n=this;if(t=t||this.g.options){for(var r=[],o=[],a={},i=s(Object.keys(e)),u=i.next();!u.done;a={K:a.K,L:a.L},u=i.next()){var c=u.value;c in this.j&&this.j[c]===e[c]||(this.j[c]=e[c],void 0!==(u=t[c])&&(u.onChange&&(a.K=u.onChange,a.L=e[c],r.push(function(e){return function(){return Se(n,(function t(){var n=this;return k(t,(function(t){if(1==t.g)return y(t,e.K(e.L),2);!0===t.h&&(n.o=!0),t.g=0}))}))}}(a))),u.graphOptionXref&&(c={valueNumber:1===u.type?e[c]:0,valueBoolean:0===u.type&&e[c],valueString:2===u.type?e[c]:""},u=Object.assign(Object.assign(Object.assign({},{calculatorName:"",calculatorIndex:0}),u.graphOptionXref),c),o.push(u))))}0===r.length&&0===o.length||(this.o=!0,this.A=(void 0===this.A?[]:this.A).concat(o),this.u=(void 0===this.u?[]:this.u).concat(r))}},t.initialize=function(){return Se(this,(function e(){var t=this;return k(e,(function(e){return 1==e.g?y(e,Ge(t),2):3!=e.g?y(e,Se(t,(function e(){var t,n,r,o,a,i,u,c,l=this;return k(e,(function(e){if(1==e.g)return l.g.graph&&l.g.graph.url&&l.P===l.g.graph.url?e.return():(l.o=!0,l.g.graph&&l.g.graph.url?(l.P=l.g.graph.url,y(e,He(l,l.g.graph.url),3)):void(e.g=2));for(2!=e.g&&(t=e.h,l.i.loadGraph(t)),n=s(Object.keys(l.B)),r=n.next();!r.done;r=n.next())o=r.value,l.i.overrideFile(o,l.B[o]);if(l.B={},l.g.listeners)for(a=s(l.g.listeners),i=a.next();!i.done;i=a.next())u=i.value,Ke(l,u);c=l.j,l.j={},l.setOptions(c),e.g=0}))})),3):y(e,function(e){return Se(e,(function e(){var t,n,r,o,a,i,u=this;return k(e,(function(e){switch(e.g){case 1:if(!u.o)return e.return();if(!u.u){e.g=2;break}t=s(u.u),n=t.next();case 3:if(n.done){e.g=5;break}return y(e,(0,n.value)(),4);case 4:n=t.next(),e.g=3;break;case 5:u.u=void 0;case 2:if(u.A){for(r=new u.h.GraphOptionChangeRequestList,o=s(u.A),a=o.next();!a.done;a=o.next())i=a.value,r.push_back(i);u.i.changeOptions(r),r.delete(),u.A=void 0}u.o=!1,e.g=0}}))}))}(t),0)}))}))},t.overrideFile=function(e,t){this.i?this.i.overrideFile(e,t):this.B[e]=t},t.clearOverriddenFiles=function(){this.B={},this.i&&this.i.clearOverriddenFiles()},t.send=function(e,t){return Se(this,(function n(){var r,o,a,i,u,c,l,d,p,h=this;return k(n,(function(n){switch(n.g){case 1:return h.g.inputs?(r=1e3*(null==t?performance.now():t),y(n,h.C,2)):n.return();case 2:return y(n,h.initialize(),3);case 3:for(o=new h.h.PacketDataList,a=s(Object.keys(e)),i=a.next();!i.done;i=a.next())if(u=i.value,c=h.g.inputs[u]){e:{var f=h,m=e[u];switch(c.type){case"video":var g=f.m[c.stream];if(g||(g=new Pe(f.h,f.D),f.m[c.stream]=g),0===(f=g).l&&(f.l=f.h.createTexture()),"undefined"!=typeof HTMLVideoElement&&m instanceof HTMLVideoElement){var b=m.videoWidth;g=m.videoHeight}else"undefined"!=typeof HTMLImageElement&&m instanceof HTMLImageElement?(b=m.naturalWidth,g=m.naturalHeight):(b=m.width,g=m.height);g={glName:f.l,width:b,height:g},(b=f.g).canvas.width=g.width,b.canvas.height=g.height,b.activeTexture(b.TEXTURE0),f.h.bindTexture2d(f.l),b.texImage2D(b.TEXTURE_2D,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,m),f.h.bindTexture2d(0),f=g;break e;case"detections":for((g=f.m[c.stream])||(g=new Be(f.h),f.m[c.stream]=g),(f=g).data||(f.data=new f.g.DetectionListData),f.data.reset(m.length),g=0;g<m.length;++g){b=m[g];var v=f.data,x=v.setBoundingBox,w=g,O=b.T,k=new _e;ge(k,1,O.Z),ge(k,2,O.$),ge(k,3,O.height),ge(k,4,O.width),ge(k,5,O.rotation),ge(k,6,O.X);var S=O=new J;ne(S,1,he(k,1)),ne(S,2,he(k,2)),ne(S,3,he(k,3)),ne(S,4,he(k,4)),ne(S,5,he(k,5));var T=he(k,6);if(null!=T&&null!=T){K(S.g,48);var C=S.g,E=T;T=0>E;var I=(E=Math.abs(E))>>>0;for(E=Math.floor((E-I)/4294967296),E>>>=0,T&&(E=~E>>>0,4294967295<(I=1+(~I>>>0))&&(I=0,4294967295<++E&&(E=0))),T=z=I,I=E;0<I||127<T;)C.push(127&T|128),T=(T>>>7|I<<25)>>>0,I>>>=7;C.push(T)}if(Oe(k,S),O=te(O),x.call(v,w,O),b.O)for(v=0;v<b.O.length;++v)S=!!(k=b.O[v]).visibility,w=(x=f.data).addNormalizedLandmark,O=g,k=Object.assign(Object.assign({},k),{visibility:S?k.visibility:0}),ge(S=new je,1,k.x),ge(S,2,k.y),ge(S,3,k.z),k.visibility&&ge(S,4,k.visibility),ne(C=k=new J,1,he(S,1)),ne(C,2,he(S,2)),ne(C,3,he(S,3)),ne(C,4,he(S,4)),ne(C,5,he(S,5)),Oe(S,C),k=te(k),w.call(x,O,k);if(b.M)for(v=0;v<b.M.length;++v){if(w=(x=f.data).addClassification,O=g,k=b.M[v],ge(S=new Te,2,k.Y),k.index&&ge(S,1,k.index),k.label&&ge(S,3,k.label),k.displayName&&ge(S,4,k.displayName),C=k=new J,null!=(I=he(S,1))&&null!=I)if(K(C.g,8),T=C.g,0<=I)K(T,I);else{for(E=0;9>E;E++)T.push(127&I|128),I>>=7;T.push(1)}ne(C,2,he(S,2)),null!=(T=he(S,3))&&(T=R(T),K(C.g,26),K(C.g,T.length),ee(C,C.g.end()),ee(C,T)),null!=(T=he(S,4))&&(T=R(T),K(C.g,34),K(C.g,T.length),ee(C,C.g.end()),ee(C,T)),Oe(S,C),k=te(k),w.call(x,O,k)}}f=f.data;break e;default:f={}}}switch(l=f,d=c.stream,c.type){case"video":o.pushTexture2d(Object.assign(Object.assign({},l),{stream:d,timestamp:r}));break;case"detections":(p=l).stream=d,p.timestamp=r,o.pushDetectionList(p);break;default:throw Error("Unknown input config type: '"+c.type+"'")}}return h.i.send(o),y(n,h.C,4);case 4:o.delete(),n.g=0}}))}))},t.onResults=function(e,t){this.listeners[t||"$"]=e},C("Solution",We),C("OptionType",{BOOL:0,NUMBER:1,aa:2,0:"BOOL",1:"NUMBER",2:"STRING"}),(t=Ye.prototype).reset=function(){this.g.reset()},t.close=function(){return this.g.close(),Promise.resolve()},t.onResults=function(e){this.g.onResults(e)},t.initialize=function(){return Se(this,(function e(){var t=this;return k(e,(function(e){return y(e,t.g.initialize(),0)}))}))},t.send=function(e,t){return Se(this,(function n(){var r=this;return k(n,(function(n){return y(n,r.g.send(e,t),0)}))}))},t.setOptions=function(e){this.g.setOptions(e)},C("Pose",Ye),C("POSE_CONNECTIONS",[[0,1],[1,2],[2,3],[3,7],[0,4],[4,5],[5,6],[6,8],[9,10],[11,12],[11,13],[13,15],[15,17],[15,19],[15,21],[17,19],[12,14],[14,16],[16,18],[16,20],[16,22],[18,20],[11,23],[12,24],[23,24],[23,25],[24,26],[25,27],[26,28],[27,29],[28,30],[29,31],[30,32],[27,31],[28,32]]),C("POSE_LANDMARKS",{NOSE:0,LEFT_EYE_INNER:1,LEFT_EYE:2,LEFT_EYE_OUTER:3,RIGHT_EYE_INNER:4,RIGHT_EYE:5,RIGHT_EYE_OUTER:6,LEFT_EAR:7,RIGHT_EAR:8,LEFT_RIGHT:9,RIGHT_LEFT:10,LEFT_SHOULDER:11,RIGHT_SHOULDER:12,LEFT_ELBOW:13,RIGHT_ELBOW:14,LEFT_WRIST:15,RIGHT_WRIST:16,LEFT_PINKY:17,RIGHT_PINKY:18,LEFT_INDEX:19,RIGHT_INDEX:20,LEFT_THUMB:21,RIGHT_THUMB:22,LEFT_HIP:23,RIGHT_HIP:24,LEFT_KNEE:25,RIGHT_KNEE:26,LEFT_ANKLE:27,RIGHT_ANKLE:28,LEFT_HEEL:29,RIGHT_HEEL:30,LEFT_FOOT_INDEX:31,RIGHT_FOOT_INDEX:32}),C("POSE_LANDMARKS_LEFT",{LEFT_EYE_INNER:1,LEFT_EYE:2,LEFT_EYE_OUTER:3,LEFT_EAR:7,LEFT_RIGHT:9,LEFT_SHOULDER:11,LEFT_ELBOW:13,LEFT_WRIST:15,LEFT_PINKY:17,LEFT_INDEX:19,LEFT_THUMB:21,LEFT_HIP:23,LEFT_KNEE:25,LEFT_ANKLE:27,LEFT_HEEL:29,LEFT_FOOT_INDEX:31}),C("POSE_LANDMARKS_RIGHT",{RIGHT_EYE_INNER:4,RIGHT_EYE:5,RIGHT_EYE_OUTER:6,RIGHT_EAR:8,RIGHT_LEFT:10,RIGHT_SHOULDER:12,RIGHT_ELBOW:14,RIGHT_WRIST:16,RIGHT_PINKY:18,RIGHT_INDEX:20,RIGHT_THUMB:22,RIGHT_HIP:24,RIGHT_KNEE:26,RIGHT_ANKLE:28,RIGHT_HEEL:30,RIGHT_FOOT_INDEX:32}),C("POSE_LANDMARKS_NEUTRAL",{NOSE:0}),C("VERSION","0.4.1633558788")}).call(this)}).call(this,n(53))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports=n(903)},function(e,t,n){e.exports=n(845)},function(e,t,n){var r=n(846);n(847),n(848),n(849),n(850),e.exports=r},function(e,t,n){var r=n(351);e.exports=r},function(e,t,n){n(352)},function(e,t,n){n(353)},function(e,t,n){"use strict";var r=n(15),o=n(147),a=n(182);r({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=o.f(this),n=a(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}})},function(e,t,n){n(354)},function(e,t,n){var r=n(57),o=n(256),a=n(115),i=r("unscopables"),s=Array.prototype;null==s[i]&&a.f(s,i,{configurable:!0,value:o(null)}),e.exports=function(e){s[i][e]=!0}},function(e,t,n){"use strict";var r=n(637).IteratorPrototype,o=n(256),a=n(251),i=n(621),s=n(332),u=function(){return this};e.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=o(r,{next:a(1,n)}),i(e,c,!1,!0),s[c]=u,e}},function(e,t,n){var r=n(45);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){var r=n(16),o=n(43),a=r.String,i=r.TypeError;e.exports=function(e){if("object"==typeof e||o(e))return e;throw i("Can't set "+a(e)+" as a prototype")}},function(e,t,n){"use strict";var r,o,a,i,s=n(221),u=n(248),c=n(16),l=n(114),d=n(59),p=n(856),h=n(95),f=n(857),m=n(622),g=n(621),b=n(639),y=n(218),v=n(43),x=n(96),w=n(858),O=n(184),k=n(859),S=n(863),T=n(365),C=n(641).set,E=n(864),I=n(867),j=n(868),N=n(643),A=n(869),R=n(166),_=n(314),$=n(57),F=n(870),D=n(624),M=n(355),P=$("species"),L=R.get,B=R.set,z=R.getterFor("Promise"),U=p&&p.prototype,V=p,W=U,G=c.TypeError,H=c.document,q=c.process,K=N.f,X=K,Y=!!(H&&H.createEvent&&c.dispatchEvent),Q=v(c.PromiseRejectionEvent),Z=!1,J=_("Promise",(function(){var e=O(V),t=e!==String(V);if(!t&&66===M)return!0;if(u&&!W.finally)return!0;if(M>=51&&/native code/.test(e))return!1;var n=new V((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[P]=r,!(Z=n.then((function(){}))instanceof r)||!t&&F&&!Q})),ee=J||!S((function(e){V.all(e).catch((function(){}))})),te=function(e){var t;return!(!x(e)||!v(t=e.then))&&t},ne=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;E((function(){for(var r=e.value,o=1==e.state,a=0;n.length>a;){var i,s,u,c=n[a++],l=o?c.ok:c.fail,p=c.resolve,h=c.reject,f=c.domain;try{l?(o||(2===e.rejection&&ie(e),e.rejection=1),!0===l?i=r:(f&&f.enter(),i=l(r),f&&(f.exit(),u=!0)),i===c.promise?h(G("Promise-chain cycle")):(s=te(i))?d(s,i,p,h):p(i)):h(r)}catch(e){f&&!u&&f.exit(),h(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&oe(e)}))}},re=function(e,t,n){var r,o;Y?((r=H.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),c.dispatchEvent(r)):r={promise:t,reason:n},!Q&&(o=c["on"+e])?o(r):"unhandledrejection"===e&&j("Unhandled promise rejection",n)},oe=function(e){d(C,c,(function(){var t,n=e.facade,r=e.value;if(ae(e)&&(t=A((function(){D?q.emit("unhandledRejection",r,n):re("unhandledrejection",n,r)})),e.rejection=D||ae(e)?2:1,t.error))throw t.value}))},ae=function(e){return 1!==e.rejection&&!e.parent},ie=function(e){d(C,c,(function(){var t=e.facade;D?q.emit("rejectionHandled",t):re("rejectionhandled",t,e.value)}))},se=function(e,t,n){return function(r){e(t,r,n)}},ue=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,ne(e,!0))},ce=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw G("Promise can't be resolved itself");var r=te(t);r?E((function(){var n={done:!1};try{d(r,t,se(ce,n,e),se(ue,n,e))}catch(t){ue(n,t,e)}})):(e.value=t,e.state=1,ne(e,!1))}catch(t){ue({done:!1},t,e)}}};if(J&&(W=(V=function(e){w(this,W),y(e),d(r,this);var t=L(this);try{e(se(ce,t),se(ue,t))}catch(e){ue(t,e)}}).prototype,(r=function(e){B(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=f(W,{then:function(e,t){var n=z(this),r=n.reactions,o=K(T(this,V));return o.ok=!v(e)||e,o.fail=v(t)&&t,o.domain=D?q.domain:void 0,n.parent=!0,r[r.length]=o,0!=n.state&&ne(n,!1),o.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r,t=L(e);this.promise=e,this.resolve=se(ce,t),this.reject=se(ue,t)},N.f=K=function(e){return e===V||e===a?new o(e):X(e)},!u&&v(p)&&U!==Object.prototype)){i=U.then,Z||(h(U,"then",(function(e,t){var n=this;return new V((function(e,t){d(i,n,e,t)})).then(e,t)}),{unsafe:!0}),h(U,"catch",W.catch,{unsafe:!0}));try{delete U.constructor}catch(e){}m&&m(U,W)}s({global:!0,wrap:!0,forced:J},{Promise:V}),g(V,"Promise",!1,!0),b("Promise"),a=l("Promise"),s({target:"Promise",stat:!0,forced:J},{reject:function(e){var t=K(this);return d(t.reject,void 0,e),t.promise}}),s({target:"Promise",stat:!0,forced:u||J},{resolve:function(e){return I(u&&this===a?V:this,e)}}),s({target:"Promise",stat:!0,forced:ee},{all:function(e){var t=this,n=K(t),r=n.resolve,o=n.reject,a=A((function(){var n=y(t.resolve),a=[],i=0,s=1;k(e,(function(e){var u=i++,c=!1;s++,d(n,t,e).then((function(e){c||(c=!0,a[u]=e,--s||r(a))}),o)})),--s||r(a)}));return a.error&&o(a.value),n.promise},race:function(e){var t=this,n=K(t),r=n.reject,o=A((function(){var o=y(t.resolve);k(e,(function(e){d(o,t,e).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},function(e,t,n){var r=n(16);e.exports=r.Promise},function(e,t,n){var r=n(95);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},function(e,t,n){var r=n(16),o=n(183),a=r.TypeError;e.exports=function(e,t){if(o(t,e))return e;throw a("Incorrect invocation")}},function(e,t,n){var r=n(16),o=n(623),a=n(59),i=n(49),s=n(219),u=n(860),c=n(357),l=n(183),d=n(861),p=n(640),h=n(862),f=r.TypeError,m=function(e,t){this.stopped=e,this.result=t},g=m.prototype;e.exports=function(e,t,n){var r,b,y,v,x,w,O,k=n&&n.that,S=!(!n||!n.AS_ENTRIES),T=!(!n||!n.IS_ITERATOR),C=!(!n||!n.INTERRUPTED),E=o(t,k),I=function(e){return r&&h(r,"normal",e),new m(!0,e)},j=function(e){return S?(i(e),C?E(e[0],e[1],I):E(e[0],e[1])):C?E(e,I):E(e)};if(T)r=e;else{if(!(b=p(e)))throw f(s(e)+" is not iterable");if(u(b)){for(y=0,v=c(e);v>y;y++)if((x=j(e[y]))&&l(g,x))return x;return new m(!1)}r=d(e,b)}for(w=r.next;!(O=a(w,r)).done;){try{x=j(O.value)}catch(e){h(r,"throw",e)}if("object"==typeof x&&x&&l(g,x))return x}return new m(!1)}},function(e,t,n){var r=n(57),o=n(332),a=r("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||i[a]===e)}},function(e,t,n){var r=n(16),o=n(59),a=n(218),i=n(49),s=n(219),u=n(640),c=r.TypeError;e.exports=function(e,t){var n=arguments.length<2?u(e):t;if(a(n))return i(o(n,e));throw c(s(e)+" is not iterable")}},function(e,t,n){var r=n(59),o=n(49),a=n(116);e.exports=function(e,t,n){var i,s;o(e);try{if(!(i=a(e,"return"))){if("throw"===t)throw n;return n}i=r(i,e)}catch(e){s=!0,i=e}if("throw"===t)throw n;if(s)throw i;return o(i),n}},function(e,t,n){var r=n(57)("iterator"),o=!1;try{var a=0,i={next:function(){return{done:!!a++}},return:function(){o=!0}};i[r]=function(){return this},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var a={};a[r]=function(){return{next:function(){return{done:n=!0}}}},e(a)}catch(e){}return n}},function(e,t,n){var r,o,a,i,s,u,c,l,d=n(16),p=n(623),h=n(253).f,f=n(641).set,m=n(642),g=n(865),b=n(866),y=n(624),v=d.MutationObserver||d.WebKitMutationObserver,x=d.document,w=d.process,O=d.Promise,k=h(d,"queueMicrotask"),S=k&&k.value;S||(r=function(){var e,t;for(y&&(e=w.domain)&&e.exit();o;){t=o.fn,o=o.next;try{t()}catch(e){throw o?i():a=void 0,e}}a=void 0,e&&e.enter()},m||y||b||!v||!x?!g&&O&&O.resolve?((c=O.resolve(void 0)).constructor=O,l=p(c.then,c),i=function(){l(r)}):y?i=function(){w.nextTick(r)}:(f=p(f,d),i=function(){f(r)}):(s=!0,u=x.createTextNode(""),new v(r).observe(u,{characterData:!0}),i=function(){u.data=s=!s})),e.exports=S||function(e){var t={fn:e,next:void 0};a&&(a.next=t),o||(o=t,i()),a=t}},function(e,t,n){var r=n(250),o=n(16);e.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==o.Pebble},function(e,t,n){var r=n(250);e.exports=/web0s(?!.*chrome)/i.test(r)},function(e,t,n){var r=n(49),o=n(96),a=n(643);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=a.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){var r=n(16);e.exports=function(e,t){var n=r.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))}},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},function(e,t){e.exports="object"==typeof window},function(e,t,n){"use strict";var r=n(361).charAt,o=n(85),a=n(166),i=n(636),s=a.set,u=a.getterFor("String Iterator");i(String,"String",(function(e){s(this,{type:"String Iterator",string:o(e),index:0})}),(function(){var e,t=u(this),n=t.string,o=t.index;return o>=n.length?{value:void 0,done:!0}:(e=r(n,o),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){var r=n(16),o=n(873),a=n(874),i=n(635),s=n(124),u=n(57),c=u("iterator"),l=u("toStringTag"),d=i.values,p=function(e,t){if(e){if(e[c]!==d)try{s(e,c,d)}catch(t){e[c]=d}if(e[l]||s(e,l,t),o[t])for(var n in i)if(e[n]!==i[n])try{s(e,n,i[n])}catch(t){e[n]=i[n]}}};for(var h in o)p(r[h]&&r[h].prototype,h);p(a,"DOMTokenList")},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){var r=n(217)("span").classList,o=r&&r.constructor&&r.constructor.prototype;e.exports=o===Object.prototype?void 0:o},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),i=new k(r||[]);return a._invoke=function(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return T()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=x(i,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,i),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var l={};function d(){}function p(){}function h(){}var f={};s(f,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==t&&n.call(g,o)&&(f=g);var b=h.prototype=d.prototype=Object.create(f);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function v(e,t){var r;this._invoke=function(o,a){function i(){return new t((function(r,i){!function r(o,a,i,s){var u=c(e[o],e,a);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(d).then((function(e){l.value=e,i(l)}),(function(e){return r("throw",e,i,s)}))}s(u.arg)}(o,a,r,i)}))}return r=r?r.then(i,i):i()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:T}}function T(){return{value:void 0,done:!0}}return p.prototype=h,s(b,"constructor",h),s(h,"constructor",p),p.displayName=s(h,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,s(e,i,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},y(v.prototype),s(v.prototype,a,(function(){return this})),e.AsyncIterator=v,e.async=function(t,n,r,o,a){void 0===a&&(a=Promise);var i=new v(u(t,n,r,o),a);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(b),s(b,i,"Generator"),s(b,o,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,l):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){var r=n(877);e.exports=r},function(e,t,n){n(878);var r=n(21);e.exports=r.Object.freeze},function(e,t,n){var r=n(15),o=n(350),a=n(20),i=n(26),s=n(145).onFreeze,u=Object.freeze;r({target:"Object",stat:!0,forced:a((function(){u(1)})),sham:!o},{freeze:function(e){return u&&i(e)?u(s(e)):e}})},function(e,t,n){var r=n(880);e.exports=r},function(e,t,n){var r=n(34),o=n(881),a=n(883),i=Array.prototype,s=String.prototype;e.exports=function(e){var t=e.includes;return e===i||r(i,e)&&t===i.includes?o:"string"==typeof e||e===s||r(s,e)&&t===s.includes?a:t}},function(e,t,n){n(882);var r=n(51);e.exports=r("Array").includes},function(e,t,n){"use strict";var r=n(15),o=n(244).includes,a=n(246);r({target:"Array",proto:!0},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},function(e,t,n){n(884);var r=n(51);e.exports=r("String").includes},function(e,t,n){"use strict";var r=n(15),o=n(17),a=n(257),i=n(123),s=n(93),u=n(258),c=o("".indexOf);r({target:"String",proto:!0,forced:!u("includes")},{includes:function(e){return!!~c(s(i(this)),s(a(e)),arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(886);e.exports=r},function(e,t,n){var r=n(34),o=n(887),a=Array.prototype;e.exports=function(e){var t=e.find;return e===a||r(a,e)&&t===a.find?o:t}},function(e,t,n){n(888);var r=n(51);e.exports=r("Array").find},function(e,t,n){"use strict";var r=n(15),o=n(83).find,a=n(246),i=!0;"find"in[]&&Array(1).find((function(){i=!1})),r({target:"Array",proto:!0,forced:i},{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),a("find")},function(e,t,n){var r=n(84),o=n(16),a=n(25),i=n(314),s=n(890),u=n(124),c=n(115).f,l=n(356).f,d=n(183),p=n(364),h=n(85),f=n(254),m=n(255),g=n(95),b=n(45),y=n(75),v=n(166).enforce,x=n(639),w=n(57),O=n(359),k=n(360),S=w("match"),T=o.RegExp,C=T.prototype,E=o.SyntaxError,I=a(f),j=a(C.exec),N=a("".charAt),A=a("".replace),R=a("".indexOf),_=a("".slice),$=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,F=/a/g,D=/a/g,M=new T(F)!==F,P=m.UNSUPPORTED_Y,L=r&&(!M||P||O||k||b((function(){return D[S]=!1,T(F)!=F||T(D)==D||"/a/i"!=T(F,"i")})));if(i("RegExp",L)){for(var B=function(e,t){var n,r,o,a,i,c,l=d(C,this),f=p(e),m=void 0===t,g=[],b=e;if(!l&&f&&m&&e.constructor===B)return e;if((f||d(C,e))&&(e=e.source,m&&(t="flags"in b?b.flags:I(b))),e=void 0===e?"":h(e),t=void 0===t?"":h(t),b=e,O&&"dotAll"in F&&(r=!!t&&R(t,"s")>-1)&&(t=A(t,/s/g,"")),n=t,P&&"sticky"in F&&(o=!!t&&R(t,"y")>-1)&&(t=A(t,/y/g,"")),k&&(e=(a=function(e){for(var t,n=e.length,r=0,o="",a=[],i={},s=!1,u=!1,c=0,l="";r<=n;r++){if("\\"===(t=N(e,r)))t+=N(e,++r);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:j($,_(e,r+1))&&(r+=2,u=!0),o+=t,c++;continue;case">"===t&&u:if(""===l||y(i,l))throw new E("Invalid capture group name");i[l]=!0,a[a.length]=[l,c],u=!1,l="";continue}u?l+=t:o+=t}return[o,a]}(e))[0],g=a[1]),i=s(T(e,t),l?this:C,B),(r||o||g.length)&&(c=v(i),r&&(c.dotAll=!0,c.raw=B(function(e){for(var t,n=e.length,r=0,o="",a=!1;r<=n;r++)"\\"!==(t=N(e,r))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),o+=t):o+="[\\s\\S]":o+=t+N(e,++r);return o}(e),n)),o&&(c.sticky=!0),g.length&&(c.groups=g)),e!==b)try{u(i,"source",""===b?"(?:)":b)}catch(e){}return i},z=function(e){e in B||c(B,e,{configurable:!0,get:function(){return T[e]},set:function(t){T[e]=t}})},U=l(T),V=0;U.length>V;)z(U[V++]);C.constructor=B,B.prototype=C,g(o,"RegExp",B)}x("RegExp")},function(e,t,n){var r=n(43),o=n(96),a=n(622);e.exports=function(e,t,n){var i,s;return a&&r(i=t.constructor)&&i!==n&&o(s=i.prototype)&&s!==n.prototype&&a(e,s),e}},function(e,t,n){"use strict";(function(e){var t=n(19);
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const r=()=>n(892);let o;class a{constructor(){this.util=n(893),this.textEncoder=new this.util.TextEncoder}fetch(e,n){return null!=Object(t.b)().global.fetch?Object(t.b)().global.fetch(e,n):(null==o&&(o=r()),o(e,n))}now(){const t=e.hrtime();return 1e3*t[0]+t[1]/1e6}encode(e,t){if("utf-8"!==t&&"utf8"!==t)throw new Error("Node built-in encoder only supports utf-8, but got "+t);return this.textEncoder.encode(e)}decode(e,t){return 0===e.length?"":new this.util.TextDecoder(t).decode(e)}}Object(t.b)().get("IS_NODE")&&Object(t.b)().setPlatform("node",new a)}).call(this,n(90))},function(e,t){},function(e,t){},function(e,t,n){(function(e){var r;!function(e,o,a){function i(e){var t,n=this,r=(t=4022871197,function(e){e=e.toString();for(var n=0;n<e.length;n++){var r=.02519603282416938*(t+=e.charCodeAt(n));r-=t=r>>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)});n.next=function(){var e=2091639*n.s0+2.3283064365386963e-10*n.c;return n.s0=n.s1,n.s1=n.s2,n.s2=e-(n.c=0|e)},n.c=1,n.s0=r(" "),n.s1=r(" "),n.s2=r(" "),n.s0-=r(e),n.s0<0&&(n.s0+=1),n.s1-=r(e),n.s1<0&&(n.s1+=1),n.s2-=r(e),n.s2<0&&(n.s2+=1),r=null}function s(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function u(e,t){var n=new i(e),r=t&&t.state,o=n.next;return o.int32=function(){return 4294967296*n.next()|0},o.double=function(){return o()+11102230246251565e-32*(2097152*o()|0)},o.quick=o,r&&("object"==typeof r&&s(r,n),o.state=function(){return s(n,{})}),o}o&&o.exports?o.exports=u:n(128)&&n(261)?void 0===(r=function(){return u}.call(t,n,t,o))||(o.exports=r):this.alea=u}(0,e,n(128))}).call(this,n(260)(e))},function(e,t,n){(function(e){var r;!function(e,o,a){function i(e){var t=this,n="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:n+=e;for(var r=0;r<n.length+64;r++)t.x^=0|n.charCodeAt(r),t.next()}function s(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t}function u(e,t){var n=new i(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&("object"==typeof r&&s(r,n),o.state=function(){return s(n,{})}),o}o&&o.exports?o.exports=u:n(128)&&n(261)?void 0===(r=function(){return u}.call(t,n,t,o))||(o.exports=r):this.xor128=u}(0,e,n(128))}).call(this,n(260)(e))},function(e,t,n){(function(e){var r;!function(e,o,a){function i(e){var t=this,n="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,t.v=0,e===(0|e)?t.x=e:n+=e;for(var r=0;r<n.length+64;r++)t.x^=0|n.charCodeAt(r),r==n.length&&(t.d=t.x<<10^t.x>>>4),t.next()}function s(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function u(e,t){var n=new i(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&("object"==typeof r&&s(r,n),o.state=function(){return s(n,{})}),o}o&&o.exports?o.exports=u:n(128)&&n(261)?void 0===(r=function(){return u}.call(t,n,t,o))||(o.exports=r):this.xorwow=u}(0,e,n(128))}).call(this,n(260)(e))},function(e,t,n){(function(e){var r;!function(e,o,a){function i(e){var t=this;t.next=function(){var e,n,r=t.x,o=t.i;return e=r[o],n=(e^=e>>>7)^e<<24,n^=(e=r[o+1&7])^e>>>10,n^=(e=r[o+3&7])^e>>>3,n^=(e=r[o+4&7])^e<<7,e=r[o+7&7],n^=(e^=e<<13)^e<<9,r[o]=n,t.i=o+1&7,n},function(e,t){var n,r=[];if(t===(0|t))r[0]=t;else for(t=""+t,n=0;n<t.length;++n)r[7&n]=r[7&n]<<15^t.charCodeAt(n)+r[n+1&7]<<13;for(;r.length<8;)r.push(0);for(n=0;n<8&&0===r[n];++n);for(8==n?r[7]=-1:r[n],e.x=r,e.i=0,n=256;n>0;--n)e.next()}(t,e)}function s(e,t){return t.x=e.x.slice(),t.i=e.i,t}function u(e,t){null==e&&(e=+new Date);var n=new i(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&(r.x&&s(r,n),o.state=function(){return s(n,{})}),o}o&&o.exports?o.exports=u:n(128)&&n(261)?void 0===(r=function(){return u}.call(t,n,t,o))||(o.exports=r):this.xorshift7=u}(0,e,n(128))}).call(this,n(260)(e))},function(e,t,n){(function(e){var r;!function(e,o,a){function i(e){var t=this;t.next=function(){var e,n,r=t.w,o=t.X,a=t.i;return t.w=r=r+1640531527|0,n=o[a+34&127],e=o[a=a+1&127],n^=n<<13,e^=e<<17,n^=n>>>15,e^=e>>>12,n=o[a]=n^e,t.i=a,n+(r^r>>>16)|0},function(e,t){var n,r,o,a,i,s=[],u=128;for(t===(0|t)?(r=t,t=null):(t+="\0",r=0,u=Math.max(u,t.length)),o=0,a=-32;a<u;++a)t&&(r^=t.charCodeAt((a+32)%t.length)),0===a&&(i=r),r^=r<<10,r^=r>>>15,r^=r<<4,r^=r>>>13,a>=0&&(i=i+1640531527|0,o=0==(n=s[127&a]^=r+i)?o+1:0);for(o>=128&&(s[127&(t&&t.length||0)]=-1),o=127,a=512;a>0;--a)r=s[o+34&127],n=s[o=o+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,s[o]=r^n;e.w=i,e.X=s,e.i=o}(t,e)}function s(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function u(e,t){null==e&&(e=+new Date);var n=new i(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&(r.X&&s(r,n),o.state=function(){return s(n,{})}),o}o&&o.exports?o.exports=u:n(128)&&n(261)?void 0===(r=function(){return u}.call(t,n,t,o))||(o.exports=r):this.xor4096=u}(0,e,n(128))}).call(this,n(260)(e))},function(e,t,n){(function(e){var r;!function(e,o,a){function i(e){var t=this,n="";t.next=function(){var e=t.b,n=t.c,r=t.d,o=t.a;return e=e<<25^e>>>7^n,n=n-r|0,r=r<<24^r>>>8^o,o=o-e|0,t.b=e=e<<20^e>>>12^n,t.c=n=n-r|0,t.d=r<<16^n>>>16^o,t.a=o-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=0|e):n+=e;for(var r=0;r<n.length+20;r++)t.b^=0|n.charCodeAt(r),t.next()}function s(e,t){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t}function u(e,t){var n=new i(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&("object"==typeof r&&s(r,n),o.state=function(){return s(n,{})}),o}o&&o.exports?o.exports=u:n(128)&&n(261)?void 0===(r=function(){return u}.call(t,n,t,o))||(o.exports=r):this.tychei=u}(0,e,n(128))}).call(this,n(260)(e))},function(e,t,n){var r;!function(o,a){var i,s=this,u=a.pow(256,6),c=a.pow(2,52),l=2*c;function d(e,t,n){var r=[],d=f(function e(t,n){var r,o=[],a=typeof t;if(n&&"object"==a)for(r in t)try{o.push(e(t[r],n-1))}catch(e){}return o.length?o:"string"==a?t:t+"\0"}((t=1==t?{entropy:!0}:t||{}).entropy?[e,m(o)]:null==e?function(){try{var e;return i&&(e=i.randomBytes)?e=e(256):(e=new Uint8Array(256),(s.crypto||s.msCrypto).getRandomValues(e)),m(e)}catch(e){var t=s.navigator,n=t&&t.plugins;return[+new Date,s,n,s.screen,m(o)]}}():e,3),r),g=new p(r),b=function(){for(var e=g.g(6),t=u,n=0;e<c;)e=256*(e+n),t*=256,n=g.g(1);for(;e>=l;)e/=2,t/=2,n>>>=1;return(e+n)/t};return b.int32=function(){return 0|g.g(4)},b.quick=function(){return g.g(4)/4294967296},b.double=b,f(m(g.S),o),(t.pass||n||function(e,t,n,r){return r&&(r.S&&h(r,g),e.state=function(){return h(g,{})}),n?(a.random=e,t):e})(b,d,"global"in t?t.global:this==a,t.state)}function p(e){var t,n=e.length,r=this,o=0,a=r.i=r.j=0,i=r.S=[];for(n||(e=[n++]);o<256;)i[o]=o++;for(o=0;o<256;o++)i[o]=i[a=255&a+e[o%n]+(t=i[o])],i[a]=t;(r.g=function(e){for(var t,n=0,o=r.i,a=r.j,i=r.S;e--;)t=i[o=255&o+1],n=256*n+i[255&(i[o]=i[a=255&a+t])+(i[a]=t)];return r.i=o,r.j=a,n})(256)}function h(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function f(e,t){for(var n,r=e+"",o=0;o<r.length;)t[255&o]=255&(n^=19*t[255&o])+r.charCodeAt(o++);return m(t)}function m(e){return String.fromCharCode.apply(0,e)}if(a.seedrandom=d,f(a.random(),o),e.exports){e.exports=d;try{i=n(901)}catch(e){}}else void 0===(r=function(){return d}.call(t,n,t,e))||(e.exports=r)}([],Math)},function(e,t){},function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"simpleAbsImpl",(function(){return Ie})),n.d(r,"addImpl",(function(){return De})),n.d(r,"bincountImpl",(function(){return Pe})),n.d(r,"bincountReduceImpl",(function(){return Le})),n.d(r,"ceilImpl",(function(){return Ve})),n.d(r,"concatImpl",(function(){return We})),n.d(r,"equalImpl",(function(){return Ge})),n.d(r,"expImpl",(function(){return He})),n.d(r,"expm1Impl",(function(){return qe})),n.d(r,"floorImpl",(function(){return Ke})),n.d(r,"gatherNdImpl",(function(){return Xe})),n.d(r,"gatherV2Impl",(function(){return Ye})),n.d(r,"greaterImpl",(function(){return Qe})),n.d(r,"greaterEqualImpl",(function(){return Ze})),n.d(r,"lessImpl",(function(){return Je})),n.d(r,"lessEqualImpl",(function(){return et})),n.d(r,"linSpaceImpl",(function(){return tt})),n.d(r,"logImpl",(function(){return nt})),n.d(r,"maxImpl",(function(){return rt})),n.d(r,"maximumImpl",(function(){return ot})),n.d(r,"minimumImpl",(function(){return at})),n.d(r,"multiplyImpl",(function(){return it})),n.d(r,"negImpl",(function(){return ut})),n.d(r,"notEqualImpl",(function(){return ct})),n.d(r,"prodImpl",(function(){return dt})),n.d(r,"rangeImpl",(function(){return pt})),n.d(r,"rsqrtImpl",(function(){return ht})),n.d(r,"sigmoidImpl",(function(){return ft})),n.d(r,"sliceImpl",(function(){return mt})),n.d(r,"sparseFillEmptyRowsImpl",(function(){return gt})),n.d(r,"sparseReshapeImpl",(function(){return bt})),n.d(r,"sparseSegmentReductionImpl",(function(){return yt})),n.d(r,"sqrtImpl",(function(){return vt})),n.d(r,"squaredDifferenceImpl",(function(){return xt})),n.d(r,"stridedSliceImpl",(function(){return wt})),n.d(r,"stringNGramsImpl",(function(){return kt})),n.d(r,"stringSplitImpl",(function(){return Tt})),n.d(r,"stringToHashBucketFastImpl",(function(){return Ct})),n.d(r,"subImpl",(function(){return Et})),n.d(r,"tileImpl",(function(){return jt})),n.d(r,"topKImpl",(function(){return Rt})),n.d(r,"transposeImpl",(function(){return lt})),n.d(r,"uniqueImpl",(function(){return _t}));var o=n(0);
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const a={},i={alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!0};function s(e,t){if(!(e in a)){const n=function(e,t){if(1!==e&&2!==e)throw new Error("Cannot get WebGL rendering context, WebGL is disabled.");const n=null==t?function(e){if("undefined"!=typeof OffscreenCanvas&&2===e)return new OffscreenCanvas(300,150);if("undefined"!=typeof document)return document.createElement("canvas");throw new Error("Cannot create a canvas in this context")}(e):t;if(n.addEventListener("webglcontextlost",t=>{t.preventDefault(),delete a[e]},!1),1===e)return n.getContext("webgl",i)||n.getContext("experimental-webgl",i);return n.getContext("webgl2",i)}
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */(e,t);if(null===n)return console.log("Could not get context for WebGL version",e),null;a[e]=n}const n=a[e];return null==n||n.isContextLost()?(delete a[e],s(e)):(n.disable(n.DEPTH_TEST),n.disable(n.STENCIL_TEST),n.disable(n.BLEND),n.disable(n.DITHER),n.disable(n.POLYGON_OFFSET_FILL),n.disable(n.SAMPLE_COVERAGE),n.enable(n.SCISSOR_TEST),n.enable(n.CULL_FACE),n.cullFace(n.BACK),a[e])}var u,c,l;function d(e,t){return[t,e]}function p(e){const t=o.ae.sizeFromShape(e),n=Math.ceil(t/4);return o.ae.sizeToSquarishShape(n)}function h(e,t){return[Math.max(1,Math.ceil(t/2)),Math.max(1,Math.ceil(e/2))]}function f(e,t){const n=e;let r,a,i,s,u,c,l,d,p,h;return 2===Object(o.zd)().getNumber("WEBGL_VERSION")?(r=n.R32F,a=n.R16F,i=n.RGBA16F,s=n.RGBA32F,u=n.RED,l=4,d=1,p=n.HALF_FLOAT,h=n.FLOAT,c=n.RGBA8):(r=e.RGBA,a=e.RGBA,i=e.RGBA,s=n.RGBA,u=e.RGBA,l=4,d=4,p=null!=t?t.HALF_FLOAT_OES:null,h=e.FLOAT,c=e.RGBA),{internalFormatFloat:r,internalFormatHalfFloat:a,internalFormatPackedHalfFloat:i,internalFormatPackedFloat:s,textureFormatFloat:u,downloadTextureFormat:c,downloadUnpackNumChannels:l,defaultNumChannels:d,textureTypeHalfFloat:p,textureTypeFloat:h}}
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function m(e,t){const n=t();return Object(o.zd)().getBool("DEBUG")&&function(e){const t=e.getError();if(t!==e.NO_ERROR)throw new Error("WebGL Error: "+function(e,t){switch(t){case e.NO_ERROR:return"NO_ERROR";case e.INVALID_ENUM:return"INVALID_ENUM";case e.INVALID_VALUE:return"INVALID_VALUE";case e.INVALID_OPERATION:return"INVALID_OPERATION";case e.INVALID_FRAMEBUFFER_OPERATION:return"INVALID_FRAMEBUFFER_OPERATION";case e.OUT_OF_MEMORY:return"OUT_OF_MEMORY";case e.CONTEXT_LOST_WEBGL:return"CONTEXT_LOST_WEBGL";default:return"Unknown error code "+t}}(e,t))}(e),n}!function(e){e[e.DENSE=0]="DENSE",e[e.SHARED_BATCH=1]="SHARED_BATCH"}(u||(u={})),function(e){e[e.RENDER=0]="RENDER",e[e.UPLOAD=1]="UPLOAD",e[e.PIXELS=2]="PIXELS",e[e.DOWNLOAD=3]="DOWNLOAD"}(c||(c={})),function(e){e[e.UNPACKED_FLOAT16=0]="UNPACKED_FLOAT16",e[e.UNPACKED_FLOAT32=1]="UNPACKED_FLOAT32",e[e.PACKED_4X1_UNSIGNED_BYTE=2]="PACKED_4X1_UNSIGNED_BYTE",e[e.PACKED_2X2_FLOAT32=3]="PACKED_2X2_FLOAT32",e[e.PACKED_2X2_FLOAT16=4]="PACKED_2X2_FLOAT16"}(l||(l={}));function g(e){return!!(Object(o.zd)().getBool("WEBGL_RENDER_FLOAT32_ENABLED")||0===e||5.96e-8<Math.abs(e)&&Math.abs(e)<65504)}function b(e,t){return C(e,()=>e.getExtension(t),'Extension "'+t+'" not supported on this browser.')}function y(e,t){const n=C(e,()=>e.createShader(e.FRAGMENT_SHADER),"Unable to create fragment WebGLShader.");if(m(e,()=>e.shaderSource(n,t)),m(e,()=>e.compileShader(n)),!1===e.getShaderParameter(n,e.COMPILE_STATUS))throw function(e,t){const n=v.exec(t);if(null==n)return console.log("Couldn't parse line number in error: "+t),void console.log(e);const r=+n[1],a=e.split("\n"),i=a.length.toString().length+2,s=a.map((e,t)=>o.ae.rightPad((t+1).toString(),i)+e);let u=0;for(let e=0;e<s.length;e++)u=Math.max(s[e].length,u);const c=s.slice(0,r-1),l=s.slice(r-1,r),d=s.slice(r);console.log(c.join("\n")),console.log(t.split("\n")[0]),console.log("%c "+o.ae.rightPad(l[0],u),"border:1px solid red; background-color:#e3d2d2; color:#a61717"),console.log(d.join("\n"))}(t,e.getShaderInfoLog(n)),new Error("Failed to compile fragment shader.");return n}const v=/ERROR: [0-9]+:([0-9]+):/g;function x(e,t){if(m(e,()=>e.validateProgram(t)),!1===e.getProgramParameter(t,e.VALIDATE_STATUS))throw console.log(e.getProgramInfoLog(t)),new Error("Shader program validation failed.")}function w(e,t,n,r,o,a,i){const s=e.getAttribLocation(t,n);return-1!==s&&(m(e,()=>e.bindBuffer(e.ARRAY_BUFFER,r)),m(e,()=>e.vertexAttribPointer(s,o,e.FLOAT,!1,a,i)),m(e,()=>e.enableVertexAttribArray(s)),!0)}function O(e,t,n,r){m(e,()=>function(e,t,n){E(e,n),m(e,()=>e.activeTexture(e.TEXTURE0+n)),m(e,()=>e.bindTexture(e.TEXTURE_2D,t))}(e,t,r)),m(e,()=>e.uniform1i(n,r))}function k(e,t,n){m(e,()=>e.bindFramebuffer(e.FRAMEBUFFER,n)),m(e,()=>e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0))}function S(e,t){m(e,()=>e.bindFramebuffer(e.FRAMEBUFFER,t)),m(e,()=>e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,null,0))}function T(e){const t=e.checkFramebufferStatus(e.FRAMEBUFFER);if(t!==e.FRAMEBUFFER_COMPLETE)throw new Error("Error binding framebuffer: "+function(e,t){switch(t){case e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:return"FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case e.FRAMEBUFFER_UNSUPPORTED:return"FRAMEBUFFER_UNSUPPORTED";default:return"unknown error "+t}}(e,t))}function C(e,t,n){const r=m(e,()=>t());if(null==r)throw new Error(n);return r}function E(e,t){const n=e.MAX_COMBINED_TEXTURE_IMAGE_UNITS-1,r=t+e.TEXTURE0;if(r<e.TEXTURE0||r>n){throw new Error(`textureUnit must be in ${`[gl.TEXTURE0, gl.TEXTURE${n}]`}.`)}}function I(e,t=2){return o.ae.sizeFromShape(e.slice(0,e.length-t))}function j(e){if(0===e.length)throw Error("Cannot get rows and columns of an empty shape array.");return[e.length>1?e[e.length-2]:1,e[e.length-1]]}function N(e){let t=[1,1,1];return 0===e.length||1===e.length&&1===e[0]||(t=[I(e),...j(e)]),t}function A(e){return e%2==0}function R(e,t){if(e=e.slice(-2),t=t.slice(-2),o.ae.arraysEqual(e,t))return!0;if(!e.length||!t.length)return!0;if(0===e[0]||0===e[1]||0===t[0]||0===t[1])return!0;if(e.length!==t.length){const n=e.slice(-1)[0],r=t.slice(-1)[0];if(n===r)return!0;if(A(n)&&A(r)&&(1===e[0]||1===t[0]))return!0}return e[1]===t[1]&&A(e[0])&&A(t[0])}let _,$;function F(e,t){return null!=e.getExtension(t)}function D(e){try{if(null!=s(e))return!0}catch(e){return console.log("Error when getting WebGL context: ",e),!1}return!1}function M(e){if(0===e)return!1;const t=s(e);if(1!==e){if(F(t,"EXT_color_buffer_float"))return P(t);const e="EXT_color_buffer_half_float";if(F(t,e)){const n=t.getExtension(e);return function(e,t){const n=f(e,t),r=e.createTexture();e.bindTexture(e.TEXTURE_2D,r);e.texImage2D(e.TEXTURE_2D,0,n.internalFormatHalfFloat,1,1,0,n.textureFormatFloat,n.textureTypeHalfFloat,null);const o=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,o),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,r,0);const a=e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE;return e.bindTexture(e.TEXTURE_2D,null),e.bindFramebuffer(e.FRAMEBUFFER,null),e.deleteTexture(r),e.deleteFramebuffer(o),a}(t,n)}return!1}if(!F(t,"OES_texture_float"))return!1;if(!F(t,"WEBGL_color_buffer_float"))return!1;return P(t)}function P(e){const t=f(e),n=e.createTexture();e.bindTexture(e.TEXTURE_2D,n);e.texImage2D(e.TEXTURE_2D,0,t.internalFormatFloat,1,1,0,t.textureFormatFloat,t.textureTypeFloat,null);const r=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,r),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0);const o=e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE;return e.bindTexture(e.TEXTURE_2D,null),e.bindFramebuffer(e.FRAMEBUFFER,null),e.deleteTexture(n),e.deleteFramebuffer(r),o}function L(e,t){Array.isArray(e)||(e=[e]),e.forEach(e=>{null!=e&&o.ae.assert("complex64"!==e.dtype,()=>t+" does not support complex64 tensors in the WebGL backend.")})}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const B=Object(o.zd)();
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function z(){let e,t,n,r,a,i,s,u,c,l;return 2===Object(o.zd)().getNumber("WEBGL_VERSION")?(e="#version 300 es",t="in",n="out",r="in",a="texture",i="outputColor",s="out vec4 outputColor;",u="\n      bool isnan_custom(float val) {\n        return (val > 0.0 || val < 0.0) ? false : val != 0.0;\n      }\n\n      bvec4 isnan_custom(vec4 val) {\n        return bvec4(isnan_custom(val.x),\n          isnan_custom(val.y), isnan_custom(val.z), isnan_custom(val.w));\n      }\n\n      #define isnan(value) isnan_custom(value)\n    ",c="",l="\n      #define round(value) newRound(value)\n      int newRound(float value) {\n        return int(floor(value + 0.5));\n      }\n\n      ivec4 newRound(vec4 value) {\n        return ivec4(floor(value + vec4(0.5)));\n      }\n    "):(e="",t="attribute",n="varying",r="varying",a="texture2D",i="gl_FragColor",s="",u="\n      #define isnan(value) isnan_custom(value)\n      bool isnan_custom(float val) {\n        return (val > 0. || val < 1. || val == 0.) ? false : true;\n      }\n      bvec4 isnan_custom(vec4 val) {\n        return bvec4(isnan(val.x), isnan(val.y), isnan(val.z), isnan(val.w));\n      }\n    ",c="\n      uniform float INFINITY;\n\n      bool isinf(float val) {\n        return abs(val) == INFINITY;\n      }\n      bvec4 isinf(vec4 val) {\n        return equal(abs(val), vec4(INFINITY));\n      }\n    ",l="\n      int round(float value) {\n        return int(floor(value + 0.5));\n      }\n\n      ivec4 round(vec4 value) {\n        return ivec4(floor(value + vec4(0.5)));\n      }\n    "),{version:e,attribute:t,varyingVs:n,varyingFs:r,texture2D:a,output:i,defineOutput:s,defineSpecialNaN:u,defineSpecialInf:c,defineRound:l}}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function U(e,t,n="index"){const r=o.ae.computeStrides(t);return r.map((t,o)=>`${`int ${e[o]} = ${n} / ${t}`}; ${o===r.length-1?`int ${e[o+1]} = ${n} - ${e[o]} * ${t}`:`index -= ${e[o]} * ${t}`};`).join("")}function V(e,t,n="index"){const r=o.ae.computeStrides(t);return r.map((t,o)=>`${`int ${e[o]} = ${n} / outShapeStrides[${o}]`}; ${o===r.length-1?`int ${e[o+1]} = ${n} - ${e[o]} * outShapeStrides[${o}]`:`index -= ${e[o]} * outShapeStrides[${o}]`};`).join("")}function W(e,t,n="index"){const r=function(e,t){const n=e.length,r=e.map(e=>`${t}[${e}]`),o=new Array(n-1);o[n-2]=r[n-1];for(let e=n-3;e>=0;--e)o[e]=`(${o[e+1]} * ${r[e+1]})`;return o}(e.map((e,t)=>t),t);return r.map((t,o)=>`${`int ${e[o]} = ${n} / ${r[o]}`}; ${o===r.length-1?`int ${e[o+1]} = ${n} - ${e[o]} * ${r[o]}`:`index -= ${e[o]} * ${r[o]}`};`).join("")}function G(e){const t=o.ae.computeStrides(e).map(e=>e.toString());return`\n  int getFlatIndex(ivec3 coords) {\n    return coords.x * ${t[0]} + coords.y * ${t[1]} + coords.z;\n  }\n`}B.registerFlag("HAS_WEBGL",()=>B.getNumber("WEBGL_VERSION")>0),B.registerFlag("WEBGL_VERSION",()=>D(2)?2:D(1)?1:0),B.registerFlag("WEBGL_CHECK_NUMERICAL_PROBLEMS",()=>!1),B.registerFlag("WEBGL_BUFFER_SUPPORTED",()=>2===B.get("WEBGL_VERSION")),B.registerFlag("WEBGL_CPU_FORWARD",()=>!0),B.registerFlag("WEBGL_FORCE_F16_TEXTURES",()=>!1),B.registerFlag("WEBGL_PACK",()=>B.getBool("HAS_WEBGL")),B.registerFlag("WEBGL_PACK_NORMALIZATION",()=>B.getBool("WEBGL_PACK")),B.registerFlag("WEBGL_PACK_CLIP",()=>B.getBool("WEBGL_PACK")),B.registerFlag("WEBGL_PACK_DEPTHWISECONV",()=>B.getBool("WEBGL_PACK")),B.registerFlag("WEBGL_PACK_BINARY_OPERATIONS",()=>B.getBool("WEBGL_PACK")),B.registerFlag("WEBGL_PACK_UNARY_OPERATIONS",()=>B.getBool("WEBGL_PACK")),B.registerFlag("WEBGL_PACK_ARRAY_OPERATIONS",()=>B.getBool("WEBGL_PACK")),B.registerFlag("WEBGL_PACK_IMAGE_OPERATIONS",()=>B.getBool("WEBGL_PACK")),B.registerFlag("WEBGL_PACK_REDUCE",()=>B.getBool("WEBGL_PACK")),B.registerFlag("WEBGL_LAZILY_UNPACK",()=>B.getBool("WEBGL_PACK")),B.registerFlag("WEBGL_CONV_IM2COL",()=>B.getBool("WEBGL_PACK")),B.registerFlag("WEBGL_MAX_TEXTURE_SIZE",()=>function(e){if(null==_){const t=s(e);_=t.getParameter(t.MAX_TEXTURE_SIZE)}return _}(B.getNumber("WEBGL_VERSION"))),B.registerFlag("WEBGL_MAX_TEXTURES_IN_SHADER",()=>function(e){if(null==$){const t=s(e);$=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS)}return Math.min(16,$)}(B.getNumber("WEBGL_VERSION"))),B.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION",()=>{const e=B.getNumber("WEBGL_VERSION");return 0===e?0:function(e){if(0===e)return 0;let t;const n=s(e);return t=F(n,"EXT_disjoint_timer_query_webgl2")&&2===e?2:F(n,"EXT_disjoint_timer_query")?1:0,t}(e)}),B.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE",()=>B.getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0&&!o.vd.isMobile()),B.registerFlag("WEBGL_RENDER_FLOAT32_CAPABLE",()=>function(e){if(0===e)return!1;const t=s(e);if(1===e){if(!F(t,"OES_texture_float"))return!1}else if(!F(t,"EXT_color_buffer_float"))return!1;return P(t)}(B.getNumber("WEBGL_VERSION"))),B.registerFlag("WEBGL_RENDER_FLOAT32_ENABLED",()=>!B.getBool("WEBGL_FORCE_F16_TEXTURES")&&B.getBool("WEBGL_RENDER_FLOAT32_CAPABLE")),B.registerFlag("WEBGL_DOWNLOAD_FLOAT_ENABLED",()=>M(B.getNumber("WEBGL_VERSION"))),B.registerFlag("WEBGL_FENCE_API_ENABLED",()=>{return 2===(e=B.getNumber("WEBGL_VERSION"))&&null!=s(e).fenceSync;var e}),B.registerFlag("WEBGL_SIZE_UPLOAD_UNIFORM",()=>B.getBool("WEBGL_RENDER_FLOAT32_ENABLED")?4:0),B.registerFlag("WEBGL_DELETE_TEXTURE_THRESHOLD",()=>-1,e=>{if(e<0&&-1!==e)throw new Error(`WEBGL_DELETE_TEXTURE_THRESHOLD must be -1 (indicating never delete) or at least 0, but got ${e}.`)}),B.registerFlag("WEBGL_FLUSH_THRESHOLD",()=>o.vd.isMobile()?1:-1,e=>{if(e<0&&-1!==e)throw new Error(`WEBGL_FLUSH_THRESHOLD must be -1 (indicating never manual flush) or at least 0, but got ${e}.`)}),B.registerFlag("CPU_HANDOFF_SIZE_THRESHOLD",()=>128),B.registerFlag("WEBGL_USE_SHAPES_UNIFORMS",()=>!1),B.registerFlag("TOPK_LAST_DIM_CPU_HANDOFF_SIZE_THRESHOLD",()=>1e5),B.registerFlag("TOPK_K_CPU_HANDOFF_THRESHOLD",()=>128);const H="\n  const float FLOAT_MAX = 1.70141184e38;\n  const float FLOAT_MIN = 1.17549435e-38;\n\n  lowp vec4 encode_float(highp float v) {\n    if (isnan(v)) {\n      return vec4(255, 255, 255, 255);\n    }\n\n    highp float av = abs(v);\n\n    if(av < FLOAT_MIN) {\n      return vec4(0.0, 0.0, 0.0, 0.0);\n    } else if(v > FLOAT_MAX) {\n      return vec4(0.0, 0.0, 128.0, 127.0) / 255.0;\n    } else if(v < -FLOAT_MAX) {\n      return vec4(0.0, 0.0,  128.0, 255.0) / 255.0;\n    }\n\n    highp vec4 c = vec4(0,0,0,0);\n\n    highp float e = floor(log2(av));\n    highp float m = exp2(fract(log2(av))) - 1.0;\n\n    c[2] = floor(128.0 * m);\n    m -= c[2] / 128.0;\n    c[1] = floor(32768.0 * m);\n    m -= c[1] / 32768.0;\n    c[0] = floor(8388608.0 * m);\n\n    highp float ebias = e + 127.0;\n    c[3] = floor(ebias / 2.0);\n    ebias -= c[3] * 2.0;\n    c[2] += floor(ebias) * 128.0;\n\n    c[3] += 128.0 * step(0.0, -v);\n\n    return c / 255.0;\n  }\n",{getBroadcastDims:q}=o.md;
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function K(e,t,n){const r=[];if(e.forEach(e=>{const t=o.ae.sizeFromShape(e.shapeInfo.logicalShape);if(e.shapeInfo.isUniform?r.push(`uniform float ${e.name}${t>1?`[${t}]`:""};`):(r.push(`uniform sampler2D ${e.name};`),r.push(`uniform int offset${e.name};`)),n.enableShapeUniforms){const{uniformShape:t}=ae(n.packedInputs,e.shapeInfo.logicalShape,e.shapeInfo.texShape);switch(t.length){case 1:r.push(`uniform int ${e.name}Shape;`);break;case 2:r.push(`uniform ivec2 ${e.name}Shape;`);break;case 3:r.push(`uniform ivec3 ${e.name}Shape;`);break;case 4:r.push(`uniform ivec4 ${e.name}Shape;`)}r.push(`uniform ivec2 ${e.name}TexShape;`)}}),n.enableShapeUniforms){switch(t.logicalShape.length){case 1:r.push("uniform int outShape;");break;case 2:r.push("uniform ivec2 outShape;"),r.push("uniform int outShapeStrides;");break;case 3:r.push("uniform ivec3 outShape;"),r.push("uniform ivec2 outShapeStrides;");break;case 4:r.push("uniform ivec4 outShape;"),r.push("uniform ivec3 outShapeStrides;")}r.push("uniform ivec2 outTexShape;")}n.customUniforms&&n.customUniforms.forEach(e=>{r.push(`uniform ${e.type} ${e.name}${e.arrayIndex?`[${e.arrayIndex}]`:""};`)});const a=r.join("\n"),i=e.map(e=>function(e,t,n=!1,r){let a="";a+=n?Y(e,r):X(e,r);const i=e.shapeInfo.logicalShape,s=t.logicalShape;i.length<=s.length&&(a+=n?function(e,t){const n=e.name,r=n.charAt(0).toUpperCase()+n.slice(1),a="get"+r+"AtOutCoords",i=e.shapeInfo.logicalShape.length,s=t.logicalShape.length,u=q(e.shapeInfo.logicalShape,t.logicalShape),c=oe(s),l=s-i;let d;const p=["x","y","z","w","u","v"];d=0===i?"":s<2&&u.length>=1?"coords = 0;":u.map(e=>`coords.${p[e+l]} = 0;`).join("\n");let h="";h=s<2&&i>0?"coords":e.shapeInfo.logicalShape.map((e,t)=>"coords."+p[t+l]).join(", ");let f="return outputValue;";const m=1===o.ae.sizeFromShape(e.shapeInfo.logicalShape),g=1===o.ae.sizeFromShape(t.logicalShape);if(1!==i||m||g){if(m&&!g)f=1===s?"\n        return vec4(outputValue.x, outputValue.x, 0., 0.);\n      ":"\n        return vec4(outputValue.x);\n      ";else if(u.length){const e=i-2,t=i-1;u.indexOf(e)>-1&&u.indexOf(t)>-1?f="return vec4(outputValue.x);":u.indexOf(e)>-1?f="return vec4(outputValue.x, outputValue.y, outputValue.x, outputValue.y);":u.indexOf(t)>-1&&(f="return vec4(outputValue.xx, outputValue.zz);")}}else f="\n      return vec4(outputValue.xy, outputValue.xy);\n    ";return`\n    vec4 ${a}() {\n      ${c} coords = getOutputCoords();\n      ${d}\n      vec4 outputValue = get${r}(${h});\n      ${f}\n    }\n  `}(e,t):function(e,t){const n=e.name,r=n.charAt(0).toUpperCase()+n.slice(1),a="get"+r+"AtOutCoords",i=t.texShape,s=e.shapeInfo.texShape,u=e.shapeInfo.logicalShape.length,c=t.logicalShape.length;if(!e.shapeInfo.isUniform&&u===c&&null==e.shapeInfo.flatOffset&&o.ae.arraysEqual(s,i))return`\n      float ${a}() {\n        return sampleTexture(${n}, resultUV);\n      }\n    `;const l=oe(c),d=q(e.shapeInfo.logicalShape,t.logicalShape),p=c-u;let h;const f=["x","y","z","w","u","v"];h=0===u?"":c<2&&d.length>=1?"coords = 0;":d.map(e=>`coords.${f[e+p]} = 0;`).join("\n");let m="";m=c<2&&u>0?"coords":e.shapeInfo.logicalShape.map((e,t)=>"coords."+f[t+p]).join(", ");return`\n    float ${a}() {\n      ${l} coords = getOutputCoords();\n      ${h}\n      return get${r}(${m});\n    }\n  `}(e,t));return a}(e,t,n.packedInputs,n.enableShapeUniforms)).join("\n"),s=t.texShape,u=z(),c=function(e){return`\n    float sampleTexture(sampler2D textureSampler, vec2 uv) {\n      return ${e.texture2D}(textureSampler, uv).r;\n    }\n  `}(u);let l,d,p=function(e){return`${e.version}\n    precision highp float;\n    precision highp int;\n    precision highp sampler2D;\n    ${e.varyingFs} vec2 resultUV;\n    ${e.defineOutput}\n    const vec2 halfCR = vec2(0.5, 0.5);\n\n    struct ivec5\n    {\n      int x;\n      int y;\n      int z;\n      int w;\n      int u;\n    };\n\n    struct ivec6\n    {\n      int x;\n      int y;\n      int z;\n      int w;\n      int u;\n      int v;\n    };\n\n    uniform float NAN;\n    ${e.defineSpecialNaN}\n    ${e.defineSpecialInf}\n    ${e.defineRound}\n\n    int imod(int x, int y) {\n      return x - y * (x / y);\n    }\n\n    int idiv(int a, int b, float sign) {\n      int res = a / b;\n      int mod = imod(a, b);\n      if (sign < 0. && mod != 0) {\n        res -= 1;\n      }\n      return res;\n    }\n\n    //Based on the work of Dave Hoskins\n    //https://www.shadertoy.com/view/4djSRW\n    #define HASHSCALE1 443.8975\n    float random(float seed){\n      vec2 p = resultUV * seed;\n      vec3 p3  = fract(vec3(p.xyx) * HASHSCALE1);\n      p3 += dot(p3, p3.yzx + 19.19);\n      return fract((p3.x + p3.y) * p3.z);\n    }\n\n    ${Q}\n    ${Z}\n    ${J}\n  `}(u);t.isPacked?(l=function(e,t,n){switch(e.length){case 0:return te();case 1:return function(e,t,n){const r=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)];if(1===r[0])return n?"\n      int getOutputCoords() {\n        return 2 * int(resultUV.x * ceil(float(outTexShape[1]) / 2.0));\n      }\n    ":`\n      int getOutputCoords() {\n        return 2 * int(resultUV.x * ${r[1]}.0);\n      }\n    `;if(1===r[1])return n?"\n      int getOutputCoords() {\n        return 2 * int(resultUV.y * ceil(float(outTexShape[0]) / 2.0));\n      }\n    ":`\n      int getOutputCoords() {\n        return 2 * int(resultUV.y * ${r[0]}.0);\n      }\n    `;if(n)return"\n    int getOutputCoords() {\n      ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(packedTexShape[0], packedTexShape[1]));\n      return 2 * (resTexRC.x * packedTexShape[1] + resTexRC.y);\n    }\n  ";return`\n    int getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(${r[0]}, ${r[1]}));\n      return 2 * (resTexRC.x * ${r[1]} + resTexRC.y);\n    }\n  `}(0,t,n);case 2:return function(e,t,n){const r=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)];if(o.ae.arraysEqual(e,t))return n?"\n      ivec2 getOutputCoords() {\n        ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n        return 2 * ivec2(resultUV.yx * vec2(packedTexShape[0], packedTexShape[1]));\n      }\n    ":`\n      ivec2 getOutputCoords() {\n        return 2 * ivec2(resultUV.yx * vec2(${r[0]}, ${r[1]}));\n      }\n    `;const a=Math.ceil(e[1]/2);if(n)return"\n    ivec2 getOutputCoords() {\n      ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n      int texelsInLogicalRow = int(ceil(float(outShape[1]) / 2.0));\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(packedTexShape[0], packedTexShape[1]));\n\n      int index = resTexRC.x * packedTexShape[1] + resTexRC.y;\n      int r = 2 * (index / texelsInLogicalRow);\n      int c = imod(index, texelsInLogicalRow) * 2;\n\n      return ivec2(r, c);\n    }\n  ";return`\n    ivec2 getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(${r[0]}, ${r[1]}));\n\n      int index = resTexRC.x * ${r[1]} + resTexRC.y;\n      int r = 2 * (index / ${a});\n      int c = imod(index, ${a}) * 2;\n\n      return ivec2(r, c);\n    }\n  `}(e,t,n);case 3:return function(e,t,n){if(n)return"\n    ivec3 getOutputCoords() {\n      ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n      int texelsInLogicalRow = int(ceil(float(outShape[2]) / 2.0));\n      int texelsInBatch = texelsInLogicalRow * int(ceil(float(outShape[1]) / 2.0));\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(packedTexShape[0], packedTexShape[1]));\n      int index = resTexRC.x * packedTexShape[1] + resTexRC.y;\n\n      int b = index / texelsInBatch;\n      index -= b * texelsInBatch;\n\n      int r = 2 * (index / texelsInLogicalRow);\n      int c = imod(index, texelsInLogicalRow) * 2;\n\n      return ivec3(b, r, c);\n    }\n  ";const r=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)],o=Math.ceil(e[2]/2),a=o*Math.ceil(e[1]/2);return`\n    ivec3 getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(${r[0]}, ${r[1]}));\n      int index = resTexRC.x * ${r[1]} + resTexRC.y;\n\n      int b = index / ${a};\n      index -= b * ${a};\n\n      int r = 2 * (index / ${o});\n      int c = imod(index, ${o}) * 2;\n\n      return ivec3(b, r, c);\n    }\n  `}(e,t,n);default:return function(e,t,n){if(n)return"\n    ivec4 getOutputCoords() {\n      ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(packedTexShape[0], packedTexShape[1]));\n      int index = resTexRC.x * packedTexShape[1] + resTexRC.y;\n\n      int texelsInLogicalRow = int(ceil(float(outShape[3]) / 2.0));\n      int texelsInBatch = texelsInLogicalRow * int(ceil(float(outShape[2]) / 2.0));\n      int texelsInBatchN = texelsInBatch * outShape[1];\n\n      int b2 = index / texelsInBatchN;\n      index -= b2 * texelsInBatchN;\n\n      int b = index / texelsInBatch;\n      index -= b * texelsInBatch;\n\n      int r = 2 * (index / texelsInLogicalRow);\n      int c = imod(index, texelsInLogicalRow) * 2;\n\n      return ivec4(b2, b, r, c);\n    }\n  ";const r=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)],o=Math.ceil(e[e.length-1]/2),a=o*Math.ceil(e[e.length-2]/2);let i=a,s="",u="b, r, c";for(let t=2;t<e.length-1;t++)i*=e[e.length-t-1],s=`\n      int b${t} = index / ${i};\n      index -= b${t} * ${i};\n    `+s,u=`b${t}, `+u;return`\n    ivec${e.length} getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(${r[0]}, ${r[1]}));\n      int index = resTexRC.x * ${r[1]} + resTexRC.y;\n\n      ${s}\n\n      int b = index / ${a};\n      index -= b * ${a};\n\n      int r = 2 * (index / ${o});\n      int c = imod(index, ${o}) * 2;\n\n      return ivec${e.length}(${u});\n    }\n  `}(e,t,n)}}(t.logicalShape,s,n.enableShapeUniforms),d=function(e){return`\n    void setOutput(vec4 val) {\n      ${e.output} = val;\n    }\n  `}(u)):(l=function(e,t,n){switch(e.length){case 0:return te();case 1:return function(e,t,n){if(1===t[0])return n?"\n      int getOutputCoords() {\n        return int(resultUV.x * float(outTexShape[1]));\n      }\n    ":`\n      int getOutputCoords() {\n        return int(resultUV.x * ${t[1]}.0);\n      }\n    `;if(1===t[1])return n?"\n      int getOutputCoords() {\n        return int(resultUV.y * float(outTexShape[0]));\n      }\n    ":`\n      int getOutputCoords() {\n        return int(resultUV.y * ${t[0]}.0);\n      }\n    `;if(n)return"\n    int getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(outTexShape[0], outTexShape[1]));\n      return resTexRC.x * outTexShape[1] + resTexRC.y;\n    }\n  ";return`\n    int getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(${t[0]}, ${t[1]}));\n      return resTexRC.x * ${t[1]} + resTexRC.y;\n    }\n  `}(0,t,n);case 2:return function(e,t,n){if(o.ae.arraysEqual(e,t))return n?"\n      ivec2 getOutputCoords() {\n        return ivec2(resultUV.yx * vec2(outTexShape[0], outTexShape[1]));\n      }\n    ":`\n      ivec2 getOutputCoords() {\n        return ivec2(resultUV.yx * vec2(${t[0]}, ${t[1]}));\n      }\n    `;if(1===e[1])return n?"\n      ivec2 getOutputCoords() {\n        ivec2 resTexRC = ivec2(resultUV.yx *\n                               vec2(outTexShape[0], outTexShape[1]));\n        int index = resTexRC.x * outTexShape[1] + resTexRC.y;\n        return ivec2(index, 0);\n      }\n    ":`\n      ivec2 getOutputCoords() {\n        ivec2 resTexRC = ivec2(resultUV.yx *\n                               vec2(${t[0]}, ${t[1]}));\n        int index = resTexRC.x * ${t[1]} + resTexRC.y;\n        return ivec2(index, 0);\n      }\n    `;if(1===e[0])return n?"\n      ivec2 getOutputCoords() {\n        ivec2 resTexRC = ivec2(resultUV.yx *\n                               vec2(outTexShape[0], outTexShape[1]));\n        int index = resTexRC.x * outTexShape[1] + resTexRC.y;\n        return ivec2(0, index);\n      }\n    ":`\n      ivec2 getOutputCoords() {\n        ivec2 resTexRC = ivec2(resultUV.yx *\n                               vec2(${t[0]}, ${t[1]}));\n        int index = resTexRC.x * ${t[1]} + resTexRC.y;\n        return ivec2(0, index);\n      }\n    `;if(n)return"\n    ivec2 getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(outTexShape[0], outTexShape[1]));\n      int index = resTexRC.x * outTexShape[1] + resTexRC.y;\n      int r = index / outShape[1];\n      int c = index - r * outShape[1];\n      return ivec2(r, c);\n    }\n  ";return`\n    ivec2 getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(${t[0]}, ${t[1]}));\n      int index = resTexRC.x * ${t[1]} + resTexRC.y;\n      int r = index / ${e[1]};\n      int c = index - r * ${e[1]};\n      return ivec2(r, c);\n    }\n  `}(e,t,n);case 3:return function(e,t,n){if(n){return`\n  ivec3 getOutputCoords() {\n    ivec2 resTexRC = ivec2(resultUV.yx *\n                           vec2(outTexShape[0], outTexShape[1]));\n    int index = resTexRC.x * outTexShape[1] + resTexRC.y;\n    ${V(["r","c","d"],e)}\n    return ivec3(r, c, d);\n  }\n`}const r=U(["r","c","d"],e);return`\n    ivec3 getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(${t[0]}, ${t[1]}));\n      int index = resTexRC.x * ${t[1]} + resTexRC.y;\n      ${r}\n      return ivec3(r, c, d);\n    }\n  `}(e,t,n);case 4:return function(e,t,n){if(n){return`\n    ivec4 getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n        vec2(outTexShape[0], outTexShape[1]));\n      int index = resTexRC.x * outTexShape[1] + resTexRC.y;\n      ${V(["r","c","d","d2"],e)}\n      return ivec4(r, c, d, d2);\n    }\n  `}const r=U(["r","c","d","d2"],e);return`\n    ivec4 getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n        vec2(${t[0]}, ${t[1]}));\n      int index = resTexRC.x * ${t[1]} + resTexRC.y;\n      ${r}\n      return ivec4(r, c, d, d2);\n    }\n  `}(e,t,n);case 5:return function(e,t){const n=U(["r","c","d","d2","d3"],e);return`\n    ivec5 getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx * vec2(${t[0]},\n                             ${t[1]}));\n\n      int index = resTexRC.x * ${t[1]} + resTexRC.y;\n\n      ${n}\n\n      ivec5 outShape = ivec5(r, c, d, d2, d3);\n      return outShape;\n    }\n  `}(e,t);case 6:return function(e,t){const n=U(["r","c","d","d2","d3","d4"],e);return`\n    ivec6 getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n        vec2(${t[0]}, ${t[1]}));\n      int index = resTexRC.x * ${t[1]} + resTexRC.y;\n\n      ${n}\n\n      ivec6 result = ivec6(r, c, d, d2, d3, d4);\n      return result;\n    }\n  `}(e,t);default:throw new Error(e.length+"-D output sampling is not yet supported")}}(t.logicalShape,s,n.enableShapeUniforms),d=function(e){return`\n    void setOutput(float val) {\n      ${e.output} = vec4(val, 0, 0, 0);\n    }\n  `}(u)),n.packedInputs&&(p+=ee);return[p,c,d,a,l,i,n.userCode].join("\n")}function X(e,t=!1){const n=e.shapeInfo.logicalShape;switch(n.length){case 0:return function(e,t){const n=e.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1);if(e.shapeInfo.isUniform)return`float ${r}() {return ${n};}`;const[o,a]=e.shapeInfo.texShape;if(1===o&&1===a)return`\n      float ${r}() {\n        return sampleTexture(${n}, halfCR);\n      }\n    `;const i=ne(n);if(t)return`\n    float ${r}() {\n      vec2 uv = uvFromFlat(${n}TexShape[0], ${n}TexShape[1], ${i});\n      return sampleTexture(${n}, uv);\n    }\n  `;const[s,u]=e.shapeInfo.texShape;return`\n    float ${r}() {\n      vec2 uv = uvFromFlat(${s}, ${u}, ${i});\n      return sampleTexture(${n}, uv);\n    }\n  `}(e,t);case 1:return function(e,t){const n=e.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1);if(e.shapeInfo.isUniform)return`\n      float ${r}(int index) {\n        ${re(e)}\n      }\n    `;const o=e.shapeInfo.texShape,a=o[0],i=o[1];if(1===i&&1===a)return`\n      float ${r}(int index) {\n        return sampleTexture(${n}, halfCR);\n      }\n    `;const s=ne(n);if(1===i)return t?`\n      float ${r}(int index) {\n        vec2 uv = vec2(0.5, (float(index + ${s}) + 0.5) / float(${n}TexShape[0]));\n        return sampleTexture(${n}, uv);\n      }\n    `:`\n      float ${r}(int index) {\n        vec2 uv = vec2(0.5, (float(index + ${s}) + 0.5) / ${a}.0);\n        return sampleTexture(${n}, uv);\n      }\n    `;if(1===a)return t?`\n      float ${r}(int index) {\n        vec2 uv = vec2((float(index + ${s}) + 0.5) / float(${n}TexShape[1]), 0.5);\n        return sampleTexture(${n}, uv);\n      }\n    `:`\n      float ${r}(int index) {\n        vec2 uv = vec2((float(index + ${s}) + 0.5) / ${i}.0, 0.5);\n        return sampleTexture(${n}, uv);\n      }\n    `;if(t)return`\n    float ${r}(int index) {\n      vec2 uv = uvFromFlat(${n}TexShape[0], ${n}TexShape[1], index + ${s});\n      return sampleTexture(${n}, uv);\n    }\n  `;return`\n    float ${r}(int index) {\n      vec2 uv = uvFromFlat(${a}, ${i}, index + ${s});\n      return sampleTexture(${n}, uv);\n    }\n  `}(e,t);case 2:return function(e,t){const n=e.shapeInfo.logicalShape,r=e.name,a="get"+r.charAt(0).toUpperCase()+r.slice(1),i=e.shapeInfo.texShape;if(null!=i&&o.ae.arraysEqual(n,i)){if(t)return`\n      float ${a}(int row, int col) {\n        vec2 uv = (vec2(col, row) + halfCR) / vec2(${r}TexShape[1], ${r}TexShape[0]);\n        return sampleTexture(${r}, uv);\n      }\n    `;const e=i[0],n=i[1];return`\n    float ${a}(int row, int col) {\n      vec2 uv = (vec2(col, row) + halfCR) / vec2(${n}.0, ${e}.0);\n      return sampleTexture(${r}, uv);\n    }\n  `}const{newShape:s,keptDims:u}=o.ae.squeezeShape(n),c=s;if(c.length<n.length){const n=ie(e,c),r=["row","col"];return`\n      ${X(n,t)}\n      float ${a}(int row, int col) {\n        return ${a}(${se(r,u)});\n      }\n    `}if(e.shapeInfo.isUniform)return`\n      float ${a}(int row, int col) {\n        int index = round(dot(vec2(row, col), vec2(${n[1]}, 1)));\n        ${re(e)}\n      }\n    `;const l=i[0],d=i[1],p=ne(r);if(1===d)return t?`\n      float ${a}(int row, int col) {\n        float index = dot(vec3(row, col, ${p}), vec3(${r}Shape[1], 1, 1));\n        vec2 uv = vec2(0.5, (index + 0.5) / float(${r}TexShape[0]));\n        return sampleTexture(${r}, uv);\n      }\n    `:`\n    float ${a}(int row, int col) {\n      float index = dot(vec3(row, col, ${p}), vec3(${n[1]}, 1, 1));\n      vec2 uv = vec2(0.5, (index + 0.5) / ${l}.0);\n      return sampleTexture(${r}, uv);\n    }\n  `;if(1===l)return t?`\n      float ${a}(int row, int col) {\n        float index = dot(vec3(row, col, ${p}), vec3(${r}Shape[1], 1, 1));\n        vec2 uv = vec2((index + 0.5) / float(${r}TexShape[1]), 0.5);\n        return sampleTexture(${r}, uv);\n      }\n    `:`\n    float ${a}(int row, int col) {\n      float index = dot(vec3(row, col, ${p}), vec3(${n[1]}, 1, 1));\n      vec2 uv = vec2((index + 0.5) / ${d}.0, 0.5);\n      return sampleTexture(${r}, uv);\n    }\n  `;if(t)return`\n      float ${a}(int row, int col) {\n        // Explicitly use integer operations as dot() only works on floats.\n        int index = row * ${r}Shape[1] + col + ${p};\n        vec2 uv = uvFromFlat(${r}TexShape[0], ${r}TexShape[1], index);\n        return sampleTexture(${r}, uv);\n      }\n    `;return`\n  float ${a}(int row, int col) {\n    // Explicitly use integer operations as dot() only works on floats.\n    int index = row * ${n[1]} + col + ${p};\n    vec2 uv = uvFromFlat(${l}, ${d}, index);\n    return sampleTexture(${r}, uv);\n  }\n`}(e,t);case 3:return function(e,t){const n=e.shapeInfo.logicalShape,r=e.name,a="get"+r.charAt(0).toUpperCase()+r.slice(1),i=n[1]*n[2],s=n[2],{newShape:u,keptDims:c}=o.ae.squeezeShape(n),l=u;if(l.length<n.length){const n=ie(e,l),r=["row","col","depth"];return`\n        ${X(n,t)}\n        float ${a}(int row, int col, int depth) {\n          return ${a}(${se(r,c)});\n        }\n      `}if(e.shapeInfo.isUniform)return`\n      float ${a}(int row, int col, int depth) {\n        int index = round(dot(vec3(row, col, depth),\n                          vec3(${i}, ${s}, 1)));\n        ${re(e)}\n      }\n    `;const d=e.shapeInfo.texShape,p=d[0],h=d[1],f=e.shapeInfo.flatOffset;if(h===i&&null==f)return t?`\n      float ${a}(int row, int col, int depth) {\n        int stride1 = ${r}Shape[2];\n        float texR = float(row);\n        float texC = dot(vec2(col, depth), vec2(stride1, 1));\n        vec2 uv = (vec2(texC, texR) + halfCR) /\n                   vec2(${r}TexShape[1], ${r}TexShape[0]);\n        return sampleTexture(${r}, uv);\n      }\n    `:`\n        float ${a}(int row, int col, int depth) {\n          float texR = float(row);\n          float texC = dot(vec2(col, depth), vec2(${s}, 1));\n          vec2 uv = (vec2(texC, texR) + halfCR) /\n                     vec2(${h}.0, ${p}.0);\n          return sampleTexture(${r}, uv);\n        }\n      `;if(h===s&&null==f)return t?`\n      float ${a}(int row, int col, int depth) {\n        float texR = dot(vec2(row, col), vec2(${r}Shape[1], 1));\n        float texC = float(depth);\n        vec2 uv = (vec2(texC, texR) + halfCR) / vec2(${r}TexShape[1], ${r}TexShape[0]);\n        return sampleTexture(${r}, uv);\n      }\n    `:`\n    float ${a}(int row, int col, int depth) {\n      float texR = dot(vec2(row, col), vec2(${n[1]}, 1));\n      float texC = float(depth);\n      vec2 uv = (vec2(texC, texR) + halfCR) / vec2(${h}.0, ${p}.0);\n      return sampleTexture(${r}, uv);\n    }\n  `;const m=ne(r);if(t)return`\n    float ${a}(int row, int col, int depth) {\n      // Explicitly use integer operations as dot() only works on floats.\n      int stride0 = ${r}Shape[1] * ${r}Shape[2];\n      int stride1 = ${r}Shape[2];\n      int index = row * ${i} + col * ${s} + depth + ${m};\n      vec2 uv = uvFromFlat(${r}TexShape[0], ${r}TexShape[1], index);\n      return sampleTexture(${r}, uv);\n    }\n    `;return`\n      float ${a}(int row, int col, int depth) {\n        // Explicitly use integer operations as dot() only works on floats.\n        int index = row * ${i} + col * ${s} + depth + ${m};\n        vec2 uv = uvFromFlat(${p}, ${h}, index);\n        return sampleTexture(${r}, uv);\n      }\n  `}(e,t);case 4:return function(e,t){const n=e.shapeInfo.logicalShape,r=e.name,a="get"+r.charAt(0).toUpperCase()+r.slice(1),i=n[3],s=n[2]*i,u=n[1]*s,{newShape:c,keptDims:l}=o.ae.squeezeShape(n);if(c.length<n.length){const n=ie(e,c),r=["row","col","depth","depth2"];return`\n      ${X(n,t)}\n      float ${a}(int row, int col, int depth, int depth2) {\n        return ${a}(${se(r,l)});\n      }\n    `}if(e.shapeInfo.isUniform)return`\n      float ${a}(int row, int col, int depth, int depth2) {\n        int index = round(dot(vec4(row, col, depth, depth2),\n                          vec4(${u}, ${s}, ${i}, 1)));\n        ${re(e)}\n      }\n    `;const d=e.shapeInfo.flatOffset,p=e.shapeInfo.texShape,h=p[0],f=p[1],m=`int stride2 = ${r}Shape[3];`,g=`int stride1 = ${r}Shape[2] * stride2;`,b=`int stride0 = ${r}Shape[1] * stride1;`;if(f===u&&null==d)return t?`\n      float ${a}(int row, int col, int depth, int depth2) {\n        ${m}\n        ${g}\n        float texR = float(row);\n        float texC =\n            dot(vec3(col, depth, depth2),\n                vec3(stride1, stride2, 1));\n        vec2 uv = (vec2(texC, texR) + halfCR) /\n                   vec2(${r}TexShape[1], ${r}TexShape[0]);\n        return sampleTexture(${r}, uv);\n      }\n    `:`\n      float ${a}(int row, int col, int depth, int depth2) {\n        float texR = float(row);\n        float texC =\n            dot(vec3(col, depth, depth2),\n                vec3(${s}, ${i}, 1));\n        vec2 uv = (vec2(texC, texR) + halfCR) /\n                   vec2(${f}.0, ${h}.0);\n        return sampleTexture(${r}, uv);\n      }\n    `;if(f===i&&null==d)return t?`\n      float ${a}(int row, int col, int depth, int depth2) {\n        float texR = dot(vec3(row, col, depth),\n                         vec3(${r}Shape[1] * ${r}Shape[2], ${r}Shape[2], 1));\n        float texC = float(depth2);\n        vec2 uv = (vec2(texC, texR) + halfCR) /\n                  vec2(${r}TexShape[1], ${r}TexShape[0]);\n        return sampleTexture(${r}, uv);\n      }\n    `:`\n      float ${a}(int row, int col, int depth, int depth2) {\n        float texR = dot(vec3(row, col, depth),\n                         vec3(${n[1]*n[2]}, ${n[2]}, 1));\n        float texC = float(depth2);\n        vec2 uv = (vec2(texC, texR) + halfCR) /\n                  vec2(${f}.0, ${h}.0);\n        return sampleTexture(${r}, uv);\n      }\n    `;const y=ne(r);if(t)return`\n    float ${a}(int row, int col, int depth, int depth2) {\n      // Explicitly use integer operations as dot() only works on floats.\n      ${m}\n      ${g}\n      ${b}\n      int index = row * stride0 + col * stride1 +\n          depth * stride2 + depth2;\n      vec2 uv = uvFromFlat(${r}TexShape[0], ${r}TexShape[1], index + ${y});\n      return sampleTexture(${r}, uv);\n    }\n  `;return`\n    float ${a}(int row, int col, int depth, int depth2) {\n      // Explicitly use integer operations as dot() only works on floats.\n      int index = row * ${u} + col * ${s} +\n          depth * ${i} + depth2;\n      vec2 uv = uvFromFlat(${h}, ${f}, index + ${y});\n      return sampleTexture(${r}, uv);\n    }\n  `}(e,t);case 5:return function(e){const t=e.shapeInfo.logicalShape,n=e.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),a=t[4],i=t[3]*a,s=t[2]*i,u=t[1]*s,{newShape:c,keptDims:l}=o.ae.squeezeShape(t);if(c.length<t.length){const t=ie(e,c),n=["row","col","depth","depth2","depth3"];return`\n      ${X(t)}\n      float ${r}(int row, int col, int depth, int depth2, int depth3) {\n        return ${r}(${se(n,l)});\n      }\n    `}if(e.shapeInfo.isUniform)return`\n      float ${r}(int row, int col, int depth, int depth2, int depth3) {\n        float index = dot(\n          vec4(row, col, depth, depth2),\n          vec4(${u}, ${s}, ${i}, ${a})) +\n          depth3;\n        ${re(e)}\n      }\n    `;const d=e.shapeInfo.flatOffset,p=e.shapeInfo.texShape,h=p[0],f=p[1];if(f===u&&null==d)return`\n      float ${r}(int row, int col, int depth, int depth2, int depth3) {\n        int texR = row;\n        float texC = dot(vec4(col, depth, depth2, depth3),\n                         vec4(${s}, ${i}, ${a}, 1));\n        vec2 uv = (vec2(texC, texR) + halfCR) /\n                   vec2(${f}.0, ${h}.0);\n        return sampleTexture(${n}, uv);\n      }\n    `;if(f===a&&null==d)return`\n      float ${r}(int row, int col, int depth, int depth2, int depth3) {\n        float texR = dot(\n          vec4(row, col, depth, depth2),\n          vec4(${t[1]*t[2]*t[3]},\n               ${t[2]*t[3]}, ${t[3]}, 1));\n        int texC = depth3;\n        vec2 uv = (vec2(texC, texR) + halfCR) /\n                  vec2(${f}.0, ${h}.0);\n        return sampleTexture(${n}, uv);\n      }\n    `;const m=ne(n);return`\n    float ${r}(int row, int col, int depth, int depth2, int depth3) {\n      // Explicitly use integer operations as dot() only works on floats.\n      int index = row * ${u} + col * ${s} + depth * ${i} +\n          depth2 * ${a} + depth3 + ${m};\n      vec2 uv = uvFromFlat(${h}, ${f}, index);\n      return sampleTexture(${n}, uv);\n    }\n  `}(e);case 6:return function(e){const t=e.shapeInfo.logicalShape,n=e.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),{newShape:a,keptDims:i}=o.ae.squeezeShape(t);if(a.length<t.length){const t=ie(e,a),n=["row","col","depth","depth2","depth3","depth4"];return`\n      ${X(t)}\n      float ${r}(int row, int col, int depth,\n                    int depth2, int depth3, int depth4) {\n        return ${r}(${se(n,i)});\n      }\n    `}const s=t[5],u=t[4]*s,c=t[3]*u,l=t[2]*c,d=t[1]*l;if(e.shapeInfo.isUniform)return`\n      float ${r}(int row, int col, int depth,\n                  int depth2, int depth3, int depth4) {\n        int index = round(dot(\n          vec4(row, col, depth, depth2),\n          vec4(${d}, ${l}, ${c}, ${u})) +\n          dot(\n            vec2(depth3, depth4),\n            vec2(${s}, 1)));\n        ${re(e)}\n      }\n    `;const p=e.shapeInfo.flatOffset,h=e.shapeInfo.texShape,f=h[0],m=h[1];if(m===d&&null==p)return`\n      float ${r}(int row, int col, int depth,\n                    int depth2, int depth3, int depth4) {\n        int texR = row;\n        float texC = dot(vec4(col, depth, depth2, depth3),\n          vec4(${l}, ${c}, ${u}, ${s})) +\n               float(depth4);\n        vec2 uv = (vec2(texC, texR) + halfCR) /\n                   vec2(${m}.0, ${f}.0);\n        return sampleTexture(${n}, uv);\n      }\n    `;if(m===s&&null==p)return`\n      float ${r}(int row, int col, int depth,\n                    int depth2, int depth3, int depth4) {\n        float texR = dot(vec4(row, col, depth, depth2),\n          vec4(${t[1]*t[2]*t[3]*t[4]},\n               ${t[2]*t[3]*t[4]},\n               ${t[3]*t[4]},\n               ${t[4]})) + float(depth3);\n        int texC = depth4;\n        vec2 uv = (vec2(texC, texR) + halfCR) /\n                  vec2(${m}.0, ${f}.0);\n        return sampleTexture(${n}, uv);\n      }\n    `;const g=ne(n);return`\n    float ${r}(int row, int col, int depth,\n                  int depth2, int depth3, int depth4) {\n      // Explicitly use integer operations as dot() only works on floats.\n      int index = row * ${d} + col * ${l} + depth * ${c} +\n          depth2 * ${u} + depth3 * ${s} + depth4 + ${g};\n      vec2 uv = uvFromFlat(${f}, ${m}, index);\n      return sampleTexture(${n}, uv);\n    }\n  `}(e);default:throw new Error(n.length+"-D input sampling is not yet supported")}}function Y(e,t){switch(e.shapeInfo.logicalShape.length){case 0:return function(e){const t=e.name,n="get"+t.charAt(0).toUpperCase()+t.slice(1),r=z();return`\n    vec4 ${n}() {\n      return ${r.texture2D}(${t}, halfCR);\n    }\n  `}(e);case 1:return function(e,t){const n=e.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),o=e.shapeInfo.texShape,a=z();if(t)return`\n    vec4 ${r}(int index) {\n      ivec2 packedTexShape = ivec2(ceil(float(${n}TexShape[0]) / 2.0), ceil(float(${n}TexShape[1]) / 2.0));\n      vec2 uv = packedUVfrom1D(\n        packedTexShape[0], packedTexShape[1], index);\n      return ${a.texture2D}(${n}, uv);\n    }\n  `;const i=[Math.ceil(o[0]/2),Math.ceil(o[1]/2)];return`\n    vec4 ${r}(int index) {\n      vec2 uv = packedUVfrom1D(\n        ${i[0]}, ${i[1]}, index);\n      return ${a.texture2D}(${n}, uv);\n    }\n  `}(e,t);case 2:return function(e,t){const n=e.shapeInfo.logicalShape,r=e.name,a="get"+r.charAt(0).toUpperCase()+r.slice(1),i=e.shapeInfo.texShape,s=i[0],u=i[1],c=z();if(null!=i&&o.ae.arraysEqual(n,i))return t?`\n      vec4 ${a}(int row, int col) {\n        vec2 uv = (vec2(col, row) + halfCR) / vec2(${r}TexShape[1], ${r}TexShape[0]);\n\n        return ${c.texture2D}(${r}, uv);\n      }\n    `:`\n      vec4 ${a}(int row, int col) {\n        vec2 uv = (vec2(col, row) + halfCR) / vec2(${u}.0, ${s}.0);\n\n        return ${c.texture2D}(${r}, uv);\n      }\n    `;if(t)return`\n    vec4 ${a}(int row, int col) {\n      ivec2 packedTexShape = ivec2(ceil(float(${r}TexShape[0]) / 2.0), ceil(float(${r}TexShape[1]) / 2.0));\n      int valuesPerRow = int(ceil(float(${r}Shape[1]) / 2.0));\n      vec2 uv = packedUVfrom2D(valuesPerRow, packedTexShape[0], packedTexShape[1], row, col);\n      return ${c.texture2D}(${r}, uv);\n    }\n  `;const l=[Math.ceil(i[0]/2),Math.ceil(i[1]/2)],d=Math.ceil(n[1]/2);return`\n    vec4 ${a}(int row, int col) {\n      vec2 uv = packedUVfrom2D(${d}, ${l[0]}, ${l[1]}, row, col);\n      return ${c.texture2D}(${r}, uv);\n    }\n  `}(e,t);case 3:return function(e,t){const n=e.shapeInfo.logicalShape,r=e.name,o="get"+r.charAt(0).toUpperCase()+r.slice(1),a=e.shapeInfo.texShape,i=[Math.ceil(a[0]/2),Math.ceil(a[1]/2)];if(1===n[0]){const r=n.slice(1),a=[1,2],i=ie(e,r),s=["b","row","col"];return`\n        ${Y(i,t)}\n        vec4 ${o}(int b, int row, int col) {\n          return ${o}(${se(s,a)});\n        }\n      `}const s=z();if(t)return`\n    vec4 ${o}(int b, int row, int col) {\n      ivec2 packedTexShape = ivec2(ceil(float(${r}TexShape[0]) / 2.0), ceil(float(${r}TexShape[1]) / 2.0));\n      int valuesPerRow = int(ceil(float(${r}Shape[2]) / 2.0));\n      int texelsInBatch = valuesPerRow * int(ceil(float(${r}Shape[1]) / 2.0));\n      vec2 uv = packedUVfrom3D(\n        packedTexShape[0], packedTexShape[1], texelsInBatch, valuesPerRow, b, row, col);\n      return ${s.texture2D}(${r}, uv);\n    }\n  `;const u=i[0],c=i[1],l=Math.ceil(n[2]/2),d=l*Math.ceil(n[1]/2);return`\n    vec4 ${o}(int b, int row, int col) {\n      vec2 uv = packedUVfrom3D(\n        ${u}, ${c}, ${d}, ${l}, b, row, col);\n      return ${s.texture2D}(${r}, uv);\n    }\n  `}(e,t);default:return function(e,t){const n=e.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),o=z();if(t)return`\n    vec4 ${r}(int b2, int b, int row, int col) {\n      int valuesPerRow = int(ceil(float(${n}Shape[3]) / 2.0));\n      int texelsInBatch = valuesPerRow * int(ceil(float(${n}Shape[2]) / 2.0));\n      int index = b * texelsInBatch + (row / 2) * valuesPerRow + (col / 2);\n      texelsInBatch *= ${n}Shape[1];\n      index = b2 * texelsInBatch + index;\n      ivec2 packedTexShape = ivec2(ceil(float(${n}TexShape[0]) / 2.0), ceil(float(${n}TexShape[1]) / 2.0));\n      int texR = index / packedTexShape[1];\n      int texC = index - texR * packedTexShape[1];\n      vec2 uv = (vec2(texC, texR) + halfCR) / vec2(packedTexShape[1], packedTexShape[0]); return ${o.texture2D}(${n}, uv);\n    }\n  `;const a=e.shapeInfo.logicalShape,i=a.length,s=e.shapeInfo.texShape,u=[Math.ceil(s[0]/2),Math.ceil(s[1]/2)],c=u[0],l=u[1],d=Math.ceil(a[i-1]/2);let p=d*Math.ceil(a[i-2]/2),h="int b, int row, int col",f=`b * ${p} + (row / 2) * ${d} + (col / 2)`;for(let e=2;e<i-1;e++)h=`int b${e}, `+h,p*=a[i-e-1],f=`b${e} * ${p} + `+f;return`\n    vec4 ${r}(${h}) {\n      int index = ${f};\n      int texR = index / ${l};\n      int texC = index - texR * ${l};\n      vec2 uv = (vec2(texC, texR) + halfCR) / vec2(${l}, ${c});\n      return ${o.texture2D}(${n}, uv);\n    }\n  `}(e,t)}}const Q="\nvec2 uvFromFlat(int texNumR, int texNumC, int index) {\n  int texR = index / texNumC;\n  int texC = index - texR * texNumC;\n  return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\nvec2 packedUVfrom1D(int texNumR, int texNumC, int index) {\n  int texelIndex = index / 2;\n  int texR = texelIndex / texNumC;\n  int texC = texelIndex - texR * texNumC;\n  return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n",Z="\nvec2 packedUVfrom2D(int texelsInLogicalRow, int texNumR,\n  int texNumC, int row, int col) {\n  int texelIndex = (row / 2) * texelsInLogicalRow + (col / 2);\n  int texR = texelIndex / texNumC;\n  int texC = texelIndex - texR * texNumC;\n  return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n",J="\nvec2 packedUVfrom3D(int texNumR, int texNumC,\n    int texelsInBatch, int texelsInLogicalRow, int b,\n    int row, int col) {\n  int index = b * texelsInBatch + (row / 2) * texelsInLogicalRow + (col / 2);\n  int texR = index / texNumC;\n  int texC = index - texR * texNumC;\n  return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n",ee="\n  float getChannel(vec4 frag, vec2 innerDims) {\n    vec2 modCoord = mod(innerDims, 2.);\n    return modCoord.x == 0. ?\n      (modCoord.y == 0. ? frag.r : frag.g) :\n      (modCoord.y == 0. ? frag.b : frag.a);\n  }\n  float getChannel(vec4 frag, int dim) {\n    float modCoord = mod(float(dim), 2.);\n    return modCoord == 0. ? frag.r : frag.g;\n  }\n";function te(){return"\n    int getOutputCoords() {\n      return 0;\n    }\n  "}function ne(e){return"offset"+e}function re(e){const t=e.name,n=o.ae.sizeFromShape(e.shapeInfo.logicalShape);return n<2?`return ${t};`:`\n    for (int i = 0; i < ${n}; i++) {\n      if (i == index) {\n        return ${t}[i];\n      }\n    }\n  `}function oe(e){if(e<=1)return"int";if(2===e)return"ivec2";if(3===e)return"ivec3";if(4===e)return"ivec4";if(5===e)return"ivec5";if(6===e)return"ivec6";throw Error(`GPU for rank ${e} is not yet supported`)}function ae(e,t,n){const{newShape:r,keptDims:a}=o.ae.squeezeShape(t),i=t.length,s=e&&3===i&&1===t[0],u=s?t.slice(1):r,c=!e&&i>1&&!o.ae.arraysEqual(t,n)&&r.length<i||s;return{useSqueezeShape:c,uniformShape:c?u:t,keptDims:a}}function ie(e,t){const n=JSON.parse(JSON.stringify(e));return n.shapeInfo.logicalShape=t,n}function se(e,t){return t.map(t=>e[t]).join(", ")}
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function ue(e,t){if(e.length!==t.length)throw Error(`Binary was compiled with ${e.length} inputs, but was executed with ${t.length} inputs`);e.forEach((e,n)=>{const r=e.logicalShape,a=t[n],i=a.shape;if(!o.ae.arraysEqual(r,i))throw Error(`Binary was compiled with different shapes than the current args. Shapes ${r} and ${i} must match`);if(e.isUniform&&a.isUniform)return;const s=e.texShape,u=a.isUniform?null:a.texData.texShape;if(!o.ae.arraysEqual(s,u))throw Error(`Binary was compiled with different texture shapes than the current args. Shape ${s} and ${u} must match`)})}function ce(e){return Object(o.zd)().getBool("WEBGL_USE_SHAPES_UNIFORMS")&&e<=4}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class le{constructor(e){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outPackingScheme=u.DENSE,this.customUniforms=[{name:"texShape",type:"ivec2"}];const t=z();this.outputShape=e,this.enableShapeUniforms=ce(this.outputShape.length),this.userCode=`\n      ivec3 outCoordsFromFlatIndex(int index) {\n        ${this.enableShapeUniforms?V(["r","c","d"],e):U(["r","c","d"],e)}\n        return ivec3(r, c, d);\n      }\n\n      void main() {\n        ivec2 resTexRC = ivec2(resultUV.yx * vec2(texShape[0], texShape[1]));\n        int index = 4 * (resTexRC.x * texShape[1] + resTexRC.y);\n\n        vec4 result = vec4(0.);\n\n        for (int i=0; i<4; i++) {\n          int flatIndex = index + i;\n          ivec3 rc = outCoordsFromFlatIndex(flatIndex);\n          result[i] = getA(rc.x, rc.y, rc.z);\n        }\n\n        ${t.output} = result;\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class de{constructor(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outPackingScheme=u.DENSE,this.customUniforms=[{name:"texShape",type:"ivec2"}];const t=z();this.outputShape=e,this.enableShapeUniforms=ce(this.outputShape.length),this.userCode=`\n      ivec3 outCoordsFromFlatIndex(int index) {\n        ${this.enableShapeUniforms?V(["r","c","d"],e):U(["r","c","d"],e)}\n        return ivec3(r, c, d);\n      }\n\n      void main() {\n        ivec2 resTexRC = ivec2(resultUV.yx * vec2(texShape[0], texShape[1]));\n        int index = 4 * (resTexRC.x * texShape[1] + resTexRC.y);\n\n        vec4 result = vec4(0.);\n\n        for (int i=0; i<4; i++) {\n          int flatIndex = index + i;\n          ivec3 rc = outCoordsFromFlatIndex(flatIndex);\n          result[i] = getChannel(getA(rc.x, rc.y, rc.z), vec2(rc.y, rc.z));\n        }\n\n        ${t.output} = result;\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class pe{constructor(e){this.variableNames=["A"],this.outTexUsage=c.DOWNLOAD;const t=z();this.outputShape=e,this.userCode=`\n      ${H}\n\n      void main() {\n        float x = getAAtOutCoords();\n        ${t.output} = encode_float(x);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class he{constructor(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outTexUsage=c.DOWNLOAD;const t=z();this.outputShape=e,this.userCode=`\n      ${H}\n\n      void main() {\n        ivec3 coords = getOutputCoords();\n        float x = getChannel(getAAtOutCoords(), vec2(coords.y, coords.z));\n        ${t.output} = encode_float(x);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class fe{constructor(e,t=!1){this.variableNames=["A"],this.customUniforms=[{name:"texShape",type:"ivec2"}];const n=z();this.outputShape=e,this.enableShapeUniforms=ce(this.outputShape.length);let r="result";t&&(r="floor(result * 255. + 0.5)"),this.userCode=`\n      ${this.enableShapeUniforms?"\n  int getFlatIndex(ivec3 coords) {\n    return coords.x * outShapeStrides[0] + coords.y * outShapeStrides[1] + coords.z;\n  }\n":G(e)}\n\n      void main() {\n        ivec3 coords = getOutputCoords();\n\n        int flatIndex = getFlatIndex(coords);\n        int offset = imod(flatIndex, 4);\n\n        flatIndex = idiv(flatIndex, 4, 1.);\n\n        int r = flatIndex / texShape[1];\n        int c = imod(flatIndex, texShape[1]);\n        vec2 uv = (vec2(c, r) + halfCR) / vec2(texShape[1], texShape[0]);\n        vec4 values = ${n.texture2D}(A, uv);\n\n        float result;\n\n        if(offset == 0) {\n          result = values[0];\n        } else if(offset == 1) {\n          result = values[1];\n        } else if(offset == 2) {\n          result = values[2];\n        } else {\n          result = values[3];\n        }\n\n        ${n.output} = vec4(${r}, 0., 0., 0.);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class me{constructor(e,t=!1){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.customUniforms=[{name:"texShape",type:"ivec2"}];const n=z();this.outputShape=e,this.enableShapeUniforms=ce(this.outputShape.length);let r="",o="result";t&&(o="floor(result * 255. + 0.5)");for(let t=0;t<=1;t++)for(let o=0;o<=1;o++){const a=2*t+o;r+=`\n          localCoords = coords;\n          if(localCoords[2] + ${o} < ${this.enableShapeUniforms?"outShape[2]":""+e[2]}) {\n          localCoords[2] += ${o};\n          if (localCoords[1] + ${t} < ${this.enableShapeUniforms?"outShape[1]":""+e[1]}) {\n            localCoords[1] += ${t};\n\n            flatIndex = getFlatIndex(localCoords);\n            offset = imod(flatIndex, 4);\n\n            flatIndex = idiv(flatIndex, 4, 1.);\n\n            int r = flatIndex / texShape[1];\n            int c = imod(flatIndex, texShape[1]);\n            vec2 uv = (vec2(c, r) + halfCR) / vec2(texShape[1], texShape[0]);\n            values = ${n.texture2D}(A, uv);\n\n            if (offset == 0) {\n              result[${a}] = values[0];\n            } else if (offset == 1) {\n              result[${a}] = values[1];\n            } else if (offset == 2) {\n              result[${a}] = values[2];\n            } else {\n              result[${a}] = values[3];\n            }\n          }\n        }\n        `}this.userCode=`\n        ${this.enableShapeUniforms?"\n  int getFlatIndex(ivec3 coords) {\n    return coords.x * outShapeStrides[0] + coords.y * outShapeStrides[1] + coords.z;\n  }\n":G(e)}\n\n        void main() {\n          ivec3 coords = getOutputCoords();\n\n          vec4 result = vec4(0.);\n          int flatIndex, r, c, offset;\n          ivec3 localCoords;\n          vec2 uv;\n          vec4 values;\n\n          ${r}\n\n          ${n.output} = ${o};\n        }\n    `}}
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function ge(e){const t=z();return function(e,t){const n=C(e,()=>e.createShader(e.VERTEX_SHADER),"Unable to create vertex WebGLShader.");if(m(e,()=>e.shaderSource(n,t)),m(e,()=>e.compileShader(n)),!1===e.getShaderParameter(n,e.COMPILE_STATUS))throw console.log(e.getShaderInfoLog(n)),new Error("Failed to compile vertex shader.");return n}(e,`${t.version}\n    precision highp float;\n    ${t.attribute} vec3 clipSpacePos;\n    ${t.attribute} vec2 uv;\n    ${t.varyingVs} vec2 resultUV;\n\n    void main() {\n      gl_Position = vec4(clipSpacePos, 1);\n      resultUV = uv;\n    }`)}function be(e){return function(e,t){const n=C(e,()=>e.createBuffer(),"Unable to create WebGLBuffer");return m(e,()=>e.bindBuffer(e.ARRAY_BUFFER,n)),m(e,()=>e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW)),n}(e,new Float32Array([-1,1,0,0,1,-1,-1,0,0,0,1,1,0,1,1,1,-1,0,1,0]))}function ye(e){return function(e,t){const n=C(e,()=>e.createBuffer(),"Unable to create WebGLBuffer");return m(e,()=>e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n)),m(e,()=>e.bufferData(e.ELEMENT_ARRAY_BUFFER,t,e.STATIC_DRAW)),n}(e,new Uint16Array([0,1,2,2,1,3]))}function ve(e,t,n,r,a,i){!function(e,t){const n=Object(o.zd)().getNumber("WEBGL_MAX_TEXTURE_SIZE");if(e<=0||t<=0){throw new Error("Requested texture size "+`[${e}x${t}]`+" is invalid.")}if(e>n||t>n){throw new Error("Requested texture size "+`[${e}x${t}]`+" greater than WebGL maximum on this browser / GPU "+`[${n}x${n}]`+".")}}(t,n);const s=function(e){return C(e,()=>e.createTexture(),"Unable to create WebGLTexture.")}(e),u=e.TEXTURE_2D;return m(e,()=>e.bindTexture(u,s)),m(e,()=>e.texParameteri(u,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE)),m(e,()=>e.texParameteri(u,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)),m(e,()=>e.texParameteri(u,e.TEXTURE_MIN_FILTER,e.NEAREST)),m(e,()=>e.texParameteri(u,e.TEXTURE_MAG_FILTER,e.NEAREST)),1===Object(o.zd)().getNumber("WEBGL_VERSION")?m(e,()=>e.texImage2D(u,0,r,t,n,0,a,i,null)):m(e,()=>e.texStorage2D(u,1,r,t,n)),m(e,()=>e.bindTexture(e.TEXTURE_2D,null)),{texture:s,texShape:[n,t]}}function xe(e){return e.internalFormatFloat}function we(e){return e.internalFormatHalfFloat}function Oe(e){return e.downloadTextureFormat}function ke(e){return e.internalFormatPackedFloat}function Se(e){return e.internalFormatPackedHalfFloat}function Te(e,t,n,r,o,a,i,s){const u=e,c=new Float32Array(function(e,t){const[n,r]=h(e,t);return n*r*4}(a,i));return u.bindBuffer(u.PIXEL_PACK_BUFFER,t),u.getBufferSubData(u.PIXEL_PACK_BUFFER,0,c),u.bindBuffer(u.PIXEL_PACK_BUFFER,null),c}
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class Ce{constructor(e){this.outputTexture=null,this.program=null,this.disposed=!1,this.vertexAttrsAreBound=!1,this.itemsToPoll=[];const t=Object(o.zd)().getNumber("WEBGL_VERSION");null!=e?(this.gl=e,function(e,t){a[e]=t}(t,e)):this.gl=s(t);let n="WEBGL_color_buffer_float";if(1===Object(o.zd)().getNumber("WEBGL_VERSION")){const e="OES_texture_float",t="OES_texture_half_float";if(this.textureFloatExtension=b(this.gl,e),F(this.gl,t))this.textureHalfFloatExtension=b(this.gl,t);else if(Object(o.zd)().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support half float textures, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.");if(this.colorBufferFloatExtension=this.gl.getExtension(n),F(this.gl,"EXT_color_buffer_half_float"))this.colorBufferHalfFloatExtension=b(this.gl,"EXT_color_buffer_half_float");else if(Object(o.zd)().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support color renderable half floats, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.")}else if(n="EXT_color_buffer_float",F(this.gl,n))this.colorBufferFloatExtension=this.gl.getExtension(n);else{if(!F(this.gl,"EXT_color_buffer_half_float"))throw new Error("GL context does not support color renderable floats");this.colorBufferHalfFloatExtension=this.gl.getExtension("EXT_color_buffer_half_float")}this.vertexBuffer=be(this.gl),this.indexBuffer=ye(this.gl),this.framebuffer=function(e){return C(e,()=>e.createFramebuffer(),"Unable to create WebGLFramebuffer.")}(this.gl),this.textureConfig=f(this.gl,this.textureHalfFloatExtension)}get debug(){return Object(o.zd)().getBool("DEBUG")}dispose(){if(this.disposed)return;null!=this.program&&console.warn("Disposing a GPGPUContext that still has a bound WebGLProgram. This is probably a resource leak, delete the program with GPGPUContext.deleteProgram before disposing."),null!=this.outputTexture&&console.warn("Disposing a GPGPUContext that still has a bound output matrix texture.  This is probably a resource leak, delete the output matrix texture with GPGPUContext.deleteMatrixTexture before disposing.");const e=this.gl;m(e,()=>e.finish()),m(e,()=>e.bindFramebuffer(e.FRAMEBUFFER,null)),m(e,()=>e.deleteFramebuffer(this.framebuffer)),m(e,()=>e.bindBuffer(e.ARRAY_BUFFER,null)),m(e,()=>e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)),m(e,()=>e.deleteBuffer(this.indexBuffer)),this.disposed=!0}createFloat32MatrixTexture(e,t){return this.throwIfDisposed(),function(e,t,n,r){const[o,a]=d(t,n);return ve(e,o,a,xe(r),r.textureFormatFloat,e.FLOAT)}(this.gl,e,t,this.textureConfig)}createFloat16MatrixTexture(e,t){return this.throwIfDisposed(),function(e,t,n,r){const[o,a]=d(t,n);return ve(e,o,a,we(r),r.textureFormatFloat,r.textureTypeHalfFloat)}(this.gl,e,t,this.textureConfig)}createUnsignedBytesMatrixTexture(e,t){return this.throwIfDisposed(),function(e,t,n,r){const[o,a]=d(t,n);return ve(e,o,a,Oe(r),e.RGBA,e.UNSIGNED_BYTE)}(this.gl,e,t,this.textureConfig)}uploadPixelDataToTexture(e,t){this.throwIfDisposed(),function(e,t,n){m(e,()=>e.bindTexture(e.TEXTURE_2D,t)),n.data instanceof Uint8Array?2===Object(o.zd)().getNumber("WEBGL_VERSION")?m(e,()=>e.texSubImage2D(e.TEXTURE_2D,0,0,0,n.width,n.height,e.RGBA,e.UNSIGNED_BYTE,n.data)):m(e,()=>e.texImage2D(e.TEXTURE_2D,0,e.RGBA,n.width,n.height,0,e.RGBA,e.UNSIGNED_BYTE,n.data)):2===Object(o.zd)().getNumber("WEBGL_VERSION")?m(e,()=>e.texSubImage2D(e.TEXTURE_2D,0,0,0,e.RGBA,e.UNSIGNED_BYTE,n)):m(e,()=>e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,n)),m(e,()=>e.bindTexture(e.TEXTURE_2D,null))}(this.gl,e,t)}uploadDenseMatrixToTexture(e,t,n,r){this.throwIfDisposed(),function(e,t,n,r,a,i){let s,u,c;m(e,()=>e.bindTexture(e.TEXTURE_2D,t)),a instanceof Uint8Array?(s=new Uint8Array(n*r*4),u=e.UNSIGNED_BYTE,c=e.RGBA):(s=new Float32Array(n*r*4),u=e.FLOAT,c=i.internalFormatPackedFloat),s.set(a),2===Object(o.zd)().getNumber("WEBGL_VERSION")?m(e,()=>e.texSubImage2D(e.TEXTURE_2D,0,0,0,n,r,e.RGBA,u,s)):m(e,()=>e.texImage2D(e.TEXTURE_2D,0,c,n,r,0,e.RGBA,u,s)),m(e,()=>e.bindTexture(e.TEXTURE_2D,null))}(this.gl,e,t,n,r,this.textureConfig)}createFloat16PackedMatrixTexture(e,t){return this.throwIfDisposed(),function(e,t,n,r){const[o,a]=h(t,n);return ve(e,o,a,Se(r),e.RGBA,r.textureTypeHalfFloat)}(this.gl,e,t,this.textureConfig)}createPackedMatrixTexture(e,t){return this.throwIfDisposed(),function(e,t,n,r){const[o,a]=h(t,n);return ve(e,o,a,ke(r),e.RGBA,e.FLOAT)}(this.gl,e,t,this.textureConfig)}deleteMatrixTexture(e){this.throwIfDisposed(),this.outputTexture===e&&(S(this.gl,this.framebuffer),this.outputTexture=null),m(this.gl,()=>this.gl.deleteTexture(e))}downloadByteEncodedFloatMatrixFromOutputTexture(e,t,n){return this.downloadMatrixDriver(e,()=>function(e,t,n,r){const[o,a]=d(t,n),i=new Uint8Array(t*n*4);return m(e,()=>e.readPixels(0,0,o,a,r.downloadTextureFormat,e.UNSIGNED_BYTE,i)),new Float32Array(i.buffer)}(this.gl,t,n,this.textureConfig))}downloadPackedMatrixFromBuffer(e,t,n,r,o,a){return Te(this.gl,e,0,0,0,o,a,this.textureConfig)}downloadFloat32MatrixFromBuffer(e,t){return function(e,t,n){const r=e,o=new Float32Array(n);return r.bindBuffer(r.PIXEL_PACK_BUFFER,t),r.getBufferSubData(r.PIXEL_PACK_BUFFER,0,o),r.bindBuffer(r.PIXEL_PACK_BUFFER,null),o}(this.gl,e,t)}createBufferFromTexture(e,t,n){this.bindTextureToFrameBuffer(e);const r=function(e,t,n,r){const o=e.createBuffer();m(e,()=>e.bindBuffer(e.PIXEL_PACK_BUFFER,o));const a=16*t*n;return m(e,()=>e.bufferData(e.PIXEL_PACK_BUFFER,a,e.STREAM_READ)),m(e,()=>e.readPixels(0,0,n,t,e.RGBA,e.FLOAT,0)),m(e,()=>e.bindBuffer(e.PIXEL_PACK_BUFFER,null)),o}(this.gl,t,n,this.textureConfig);return this.unbindTextureToFrameBuffer(),r}createAndWaitForFence(){const e=this.createFence(this.gl);return this.pollFence(e)}createFence(e){let t,n;if(Object(o.zd)().getBool("WEBGL_FENCE_API_ENABLED")){const r=e,o=r.fenceSync(r.SYNC_GPU_COMMANDS_COMPLETE,0);e.flush(),n=()=>{const e=r.clientWaitSync(o,0,0);return e===r.ALREADY_SIGNALED||e===r.CONDITION_SATISFIED},t=o}else Object(o.zd)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0?(t=this.beginQuery(),this.endQuery(),n=()=>this.isQueryAvailable(t,Object(o.zd)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))):n=()=>!0;return{query:t,isFencePassed:n}}downloadMatrixFromPackedTexture(e,t,n){return this.downloadMatrixDriver(e,()=>function(e,t,n){const r=new Float32Array(t*n*4);return m(e,()=>e.readPixels(0,0,n,t,e.RGBA,e.FLOAT,r)),r}(this.gl,t,n))}createProgram(e){this.throwIfDisposed();const t=this.gl;null==this.vertexShader&&(this.vertexShader=ge(t));const n=function(e){return C(e,()=>e.createProgram(),"Unable to create WebGLProgram.")}(t);return m(t,()=>t.attachShader(n,this.vertexShader)),m(t,()=>t.attachShader(n,e)),function(e,t){if(m(e,()=>e.linkProgram(t)),!1===e.getProgramParameter(t,e.LINK_STATUS))throw console.log(e.getProgramInfoLog(t)),new Error("Failed to link vertex and fragment shaders.")}(t,n),this.debug&&x(t,n),this.vertexAttrsAreBound||(this.setProgram(n),this.vertexAttrsAreBound=function(e,t,n){return m(e,()=>e.bindBuffer(e.ARRAY_BUFFER,n)),w(e,t,"clipSpacePos",n,3,20,0)&&w(e,t,"uv",n,2,20,12)}(t,this.program,this.vertexBuffer)),n}deleteProgram(e){this.throwIfDisposed(),e===this.program&&(this.program=null),null!=e&&m(this.gl,()=>this.gl.deleteProgram(e))}setProgram(e){this.throwIfDisposed(),this.program=e,null!=this.program&&this.debug&&x(this.gl,this.program),m(this.gl,()=>this.gl.useProgram(e))}getUniformLocation(e,t,n=!0){return this.throwIfDisposed(),n?function(e,t,n){return C(e,()=>e.getUniformLocation(t,n),'uniform "'+n+'" not present in program.')}(this.gl,e,t):function(e,t,n){return e.getUniformLocation(t,n)}(this.gl,e,t)}getAttributeLocation(e,t){return this.throwIfDisposed(),m(this.gl,()=>this.gl.getAttribLocation(e,t))}getUniformLocationNoThrow(e,t){return this.throwIfDisposed(),this.gl.getUniformLocation(e,t)}setInputMatrixTexture(e,t,n){this.throwIfDisposed(),this.throwIfNoProgram(),O(this.gl,e,t,n)}setOutputMatrixTexture(e,t,n){this.setOutputMatrixTextureDriver(e,n,t)}setOutputPackedMatrixTexture(e,t,n){this.throwIfDisposed();const[r,o]=h(t,n);this.setOutputMatrixTextureDriver(e,r,o)}setOutputMatrixWriteRegion(e,t,n,r){this.setOutputMatrixWriteRegionDriver(n,e,r,t)}setOutputPackedMatrixWriteRegion(e,t,n,r){throw new Error("setOutputPackedMatrixWriteRegion not implemented.")}debugValidate(){null!=this.program&&x(this.gl,this.program),T(this.gl)}executeProgram(){this.throwIfDisposed(),this.throwIfNoProgram();const e=this.gl;this.debug&&this.debugValidate(),m(e,()=>e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0))}blockUntilAllProgramsCompleted(){this.throwIfDisposed(),m(this.gl,()=>this.gl.finish())}getQueryTimerExtension(){return null==this.disjointQueryTimerExtension&&(this.disjointQueryTimerExtension=b(this.gl,2===Object(o.zd)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")?"EXT_disjoint_timer_query_webgl2":"EXT_disjoint_timer_query")),this.disjointQueryTimerExtension}getQueryTimerExtensionWebGL2(){return this.getQueryTimerExtension()}getQueryTimerExtensionWebGL1(){return this.getQueryTimerExtension()}beginQuery(){if(2===Object(o.zd)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")){const e=this.gl,t=this.getQueryTimerExtensionWebGL2(),n=e.createQuery();return e.beginQuery(t.TIME_ELAPSED_EXT,n),n}const e=this.getQueryTimerExtensionWebGL1(),t=e.createQueryEXT();return e.beginQueryEXT(e.TIME_ELAPSED_EXT,t),t}endQuery(){if(2===Object(o.zd)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")){const e=this.gl,t=this.getQueryTimerExtensionWebGL2();return void e.endQuery(t.TIME_ELAPSED_EXT)}const e=this.getQueryTimerExtensionWebGL1();e.endQueryEXT(e.TIME_ELAPSED_EXT)}async waitForQueryAndGetTime(e){return await o.ae.repeatedTry(()=>this.disposed||this.isQueryAvailable(e,Object(o.zd)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))),this.getQueryTime(e,Object(o.zd)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))}getQueryTime(e,t){if(0===t)return null;if(2===t){const t=this.gl;return t.getQueryParameter(e,t.QUERY_RESULT)/1e6}{const t=this.getQueryTimerExtensionWebGL1();return t.getQueryObjectEXT(e,t.QUERY_RESULT_EXT)/1e6}}isQueryAvailable(e,t){if(0===t)return!0;if(2===t){const t=this.gl,n=this.getQueryTimerExtensionWebGL2(),r=t.getQueryParameter(e,t.QUERY_RESULT_AVAILABLE);return null==this.disjoint&&(this.disjoint=this.gl.getParameter(n.GPU_DISJOINT_EXT)),r&&!this.disjoint}{const t=this.getQueryTimerExtensionWebGL1(),n=t.getQueryObjectEXT(e,t.QUERY_RESULT_AVAILABLE_EXT);return null==this.disjoint&&(this.disjoint=this.gl.getParameter(t.GPU_DISJOINT_EXT)),n&&!this.disjoint}}pollFence(e){return new Promise(t=>{this.addItemToPoll(()=>e.isFencePassed(),()=>t())})}pollItems(){const e=function(e){let t=0;for(;t<e.length;++t){if(!e[t]())break}return t-1}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */(this.itemsToPoll.map(e=>e.isDoneFn));for(let t=0;t<=e;++t){const{resolveFn:e}=this.itemsToPoll[t];e()}this.itemsToPoll=this.itemsToPoll.slice(e+1)}addItemToPoll(e,t){this.itemsToPoll.push({isDoneFn:e,resolveFn:t}),this.itemsToPoll.length>1||o.ae.repeatedTry(()=>(this.pollItems(),0===this.itemsToPoll.length))}bindTextureToFrameBuffer(e){this.throwIfDisposed(),k(this.gl,e,this.framebuffer),this.debug&&T(this.gl)}unbindTextureToFrameBuffer(){null!=this.outputTexture?(k(this.gl,this.outputTexture,this.framebuffer),this.debug&&T(this.gl)):S(this.gl,this.framebuffer)}downloadMatrixDriver(e,t){this.bindTextureToFrameBuffer(e);const n=t();return this.unbindTextureToFrameBuffer(),n}setOutputMatrixTextureDriver(e,t,n){this.throwIfDisposed();const r=this.gl;k(r,e,this.framebuffer),this.debug&&T(r),this.outputTexture=e,m(r,()=>r.viewport(0,0,t,n)),m(r,()=>r.scissor(0,0,t,n))}setOutputMatrixWriteRegionDriver(e,t,n,r){this.throwIfDisposed(),m(this.gl,()=>this.gl.scissor(e,t,n,r))}throwIfDisposed(){if(this.disposed)throw new Error("Attempted to use disposed GPGPUContext.")}throwIfNoProgram(){if(null==this.program)throw new Error("No GPU program is currently set.")}}function Ee(e,t){Array.isArray(e)||(e=[e]),e.forEach(e=>{null!=e&&o.ae.assert("complex64"!==e.dtype,()=>t+" does not support complex64 tensors in the CPU backend.")})}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Ie(e){const t=new Float32Array(e.length);for(let n=0;n<e.length;++n)t[n]=Math.abs(e[n]);return t}o.a;
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function je(e){return(t,n,r,a,i)=>{const s=o.md.assertAndGetBroadcastShape(t,n),u=s.length,c=o.ae.computeStrides(s),l=o.ae.sizeFromShape(s),d=o.ae.getTypedArrayFromDType(i,l),p=t.length,h=n.length,f=o.ae.computeStrides(t),m=o.ae.computeStrides(n),g=o.md.getBroadcastDims(t,s),b=o.md.getBroadcastDims(n,s);if(g.length+b.length===0)for(let t=0;t<d.length;++t)d[t]=e(r[t%r.length],a[t%a.length]);else for(let t=0;t<d.length;++t){const n=o.ae.indexToLoc(t,u,c),i=n.slice(-p);g.forEach(e=>i[e]=0);const s=o.ae.locToIndex(i,p,f),l=n.slice(-h);b.forEach(e=>l[e]=0);const y=o.ae.locToIndex(l,h,m);d[t]=e(r[s],a[y])}return[d,s]}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Ne(e){const{inputs:t,backend:n}=e,{real:r,imag:o}=t,a=n.data.get(r.dataId).values,i=n.data.get(o.dataId).values,s=n.makeTensorInfo(r.shape,"complex64");return n.data.get(s.dataId).complexTensorInfos={real:n.makeTensorInfo(r.shape,"float32",a),imag:n.makeTensorInfo(o.shape,"float32",i)},s}o.z;
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function Ae(e){const{inputs:t,backend:n}=e,{x:r}=t;return n.incRef(r.dataId),{dataId:r.dataId,shape:r.shape,dtype:r.dtype}}o.qb;
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Re(e){const{inputs:t,backend:n}=e,{input:r}=t,o=n.data.get(r.dataId).complexTensorInfos.real,a=n.data.get(o.dataId).values;return n.makeTensorInfo(o.shape,o.dtype,a)}o.ic;
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function _e(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{dtype:i}=r;if("complex64"===i){if("complex64"===a.dtype)return Ae({inputs:{x:a},backend:n});const e=function e(t,n,r="float32"){if("complex64"===r){return Ne({inputs:{real:e(t,n,"float32"),imag:e(t,n,"float32")},backend:t})}const a=o.ae.makeZerosTypedArray(o.ae.sizeFromShape(n),r);return t.makeTensorInfo(n,r,a)}(n,a.shape,a.dtype),t=_e({inputs:{x:a},backend:n,attrs:{dtype:"float32"}}),r=Ne({inputs:{real:t,imag:e},backend:n});return n.disposeIntermediateTensorInfo(e),n.disposeIntermediateTensorInfo(t),r}if("complex64"===a.dtype){const e=Re({inputs:{input:a},backend:n}),t=_e({inputs:{x:e},backend:n,attrs:{dtype:i}});return n.disposeIntermediateTensorInfo(e),t}if(!o.ae.hasEncodingLoss(a.dtype,i)){const e=Ae({inputs:{x:a},backend:n});return{dataId:e.dataId,shape:e.shape,dtype:i}}if("int32"===i){const e=n.data.get(a.dataId).values,t=Int32Array.from(e);return n.makeTensorInfo(a.shape,"int32",t)}if("bool"===i){const e=n.data.get(a.dataId).values,t=o.ae.toTypedArray([0],a.dtype),[r,i]=je((e,t)=>e!==t?1:0)(a.shape,[],e,t,"bool");return n.makeTensorInfo(i,"bool",r)}throw new Error(`Error in Cast: failed to cast ${a.dtype} to ${i}`)}o.w;
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function $e(e,t,n,r){return null==n?({inputs:n,backend:a})=>{const{a:i,b:s}=n,u=a;Ee([i,s],e);const c=u.data.get(i.dataId).values,l=u.data.get(s.dataId).values,d="string"===i.dtype?o.md.fromUint8ToStringArray(c):c,p="string"===i.dtype?o.md.fromUint8ToStringArray(l):l,h=r||i.dtype,[f,m]=t(i.shape,s.shape,d,p,h);return u.makeTensorInfo(m,h,f)}:({inputs:e,backend:o})=>{const{a:a,b:i}=e,s=o;if("complex64"===a.dtype||"complex64"===i.dtype){const e=_e({inputs:{x:a},backend:s,attrs:{dtype:"complex64"}}),t=s.data.get(e.dataId),r=t.complexTensorInfos.real,o=t.complexTensorInfos.imag,u=s.data.get(r.dataId).values,c=s.data.get(o.dataId).values,l=_e({inputs:{x:i},backend:s,attrs:{dtype:"complex64"}}),d=s.data.get(l.dataId),p=d.complexTensorInfos.real,h=d.complexTensorInfos.imag,f=s.data.get(p.dataId).values,m=s.data.get(h.dataId).values,[g,b,y]=n(a.shape,i.shape,u,c,f,m),v=s.makeTensorInfo(y,"float32",g),x=s.makeTensorInfo(y,"float32",b),w=Ne({inputs:{real:v,imag:x},backend:s});return s.disposeIntermediateTensorInfo(e),s.disposeIntermediateTensorInfo(l),s.disposeIntermediateTensorInfo(v),s.disposeIntermediateTensorInfo(x),w}{const e=s.data.get(a.dataId).values,n=s.data.get(i.dataId).values,o=r||a.dtype,[u,c]=t(a.shape,i.shape,e,n,o);return s.makeTensorInfo(c,o,u)}}}function Fe(e){return(t,n,r,a,i,s)=>{const u=o.md.assertAndGetBroadcastShape(t,n),c=o.ae.sizeFromShape(u),l=u.length,d=o.ae.computeStrides(u),p=o.ae.getTypedArrayFromDType("float32",c),h=o.ae.getTypedArrayFromDType("float32",c),f=o.md.getBroadcastDims(t,u),m=o.md.getBroadcastDims(n,u),g=o.md.mergeRealAndImagArrays(r,a),b=o.md.mergeRealAndImagArrays(i,s),y=t.length,v=o.ae.computeStrides(t),x=n.length,w=o.ae.computeStrides(n);if(f.length+m.length===0)for(let t=0;t<p.length;t++){const n=t%g.length,r=t%b.length,o=e(g[2*n],g[2*n+1],b[2*r],b[2*r+1]);p[t]=o.real,h[t]=o.imag}else for(let t=0;t<p.length;t++){const n=o.ae.indexToLoc(t,l,d),r=n.slice(-y);f.forEach(e=>r[e]=0);const a=o.ae.locToIndex(r,y,v),i=n.slice(-x);m.forEach(e=>i[e]=0);const s=o.ae.locToIndex(i,x,w),u=e(g[2*a],g[2*a+1],b[2*s],b[2*s+1]);p[t]=u.real,h[t]=u.imag}return[p,h,u]}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const De=je((e,t)=>e+t),Me=Fe((e,t,n,r)=>({real:e+n,imag:t+r}));$e(o.d,De,Me),o.d;
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function Pe(e,t,n,r,a){const i=o.ae.sizeFromShape(r),s=o.ae.makeZerosTypedArray(a,n);for(let n=0;n<e.length;n++){const r=e[n];if(r<0)throw new Error("Input x must be non-negative!");r>=a||(s[r]+=i>0?t[n]:1)}return s}function Le(e,t,n,r=!1){const a=e.shape[0],i=e.shape[1],s=Object(o.pd)([a,n],t.dtype);for(let o=0;o<a;o++)for(let a=0;a<i;a++){const i=e.get(o,a);if(i<0)throw new Error("Input x must be non-negative!");i>=n||(r?s.set(1,o,i):t.size>0?s.set(s.get(o,i)+t.get(o,a),o,i):s.set(s.get(o,i)+1,o,i))}return s}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Be(e){return(t,n,r)=>{const a=o.ae.getTypedArrayFromDType(n,t.length);for(let n=0;n<t.length;++n)a[n]=e(t[n],r);return a}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function ze(e,t,n){return({inputs:r,attrs:a,backend:i})=>{const{x:s}=r;if(Ee(s,e),"string"===s.dtype||"string"===n)throw new Error("unaryKernelFunc does not support string input/output");const u=i,c=u.data.get(s.dataId).values,l=o.ae.sizeFromShape(s.shape),d=n||s.dtype,p=o.ae.getArrayFromDType(d,l);for(let e=0;e<l;++e)p[e]=t(c[e],a);return u.makeTensorInfo(s.shape,d,p)}}function Ue(e,t,n){return({inputs:r,attrs:o,backend:a})=>{const{x:i}=r;if(Ee(i,e),"string"===i.dtype||"string"===n)throw new Error("unaryKernelFunc does not support string input/output");const s=a,u=s.data.get(i.dataId).values,c=n||i.dtype,l=t(u,c,o);return s.makeTensorInfo(i.shape,c,l)}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Ve=Be(e=>Math.ceil(e));Ue(o.x,Ve),o.x;
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function We(e,t,n,r){const a=o.ae.getArrayFromDType(n,o.ae.sizeFromShape(t));if(r&&"string"!==n){let t=0;e.forEach(e=>{const n=o.ae.sizeFromShape(e.shape);a.set(e.vals,t),t+=n})}else{let r=0;e.forEach(e=>{const i="string"===n?o.md.fromUint8ToStringArray(e.vals):e.vals;let s=0;for(let n=0;n<e.shape[0];++n){const o=n*t[1]+r;for(let t=0;t<e.shape[1];++t)a[o+t]=i[s++]}r+=e.shape[1]})}return a}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Ge=je((e,t)=>e===t?1:0),He=($e(o.X,Ge,null,"bool"),o.X,Be(e=>Math.exp(e))),qe=(Ue(o.Z,He,"float32"),o.Z,Be(e=>Math.expm1(e))),Ke=(Ue(o.bb,qe),o.bb,Be(e=>Math.floor(e)));Ue(o.fb,Ke),o.fb;
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function Xe(e,t,n,r,a,i,s,u,c){const l=Object(o.pd)([r,i],n);for(let n=0;n<r;n++){const r=[];let o=0;for(let t=0;t<a;t++){const i=e[n*a+t];o+=i*s[t],r.push(i)}if(o<0||o>=c/i)throw new Error(`Invalid indices: ${r} does not index into ${u}`);for(let e=0;e<i;e++)l.values[n*i+e]=t.get(...t.indexToLoc(o*i+e))}return l}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Ye(e,t,n){const r=Object(o.pd)(n,e.dtype);for(let n=0;n<r.size;++n){const o=r.indexToLoc(n).slice(),a=o[0],i=o[2],s=t.locToIndex([a,i]);o[2]=t.values[s];const u=e.locToIndex(o);0<=u&&u<e.values.length&&(r.values[n]=e.values[u])}return r}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Qe=je((e,t)=>e>t?1:0),Ze=($e(o.nb,Qe,null,"bool"),o.nb,je((e,t)=>e>=t?1:0)),Je=($e(o.ob,Ze,null,"bool"),o.ob,je((e,t)=>e<t?1:0)),et=($e(o.zb,Je,null,"bool"),o.zb,je((e,t)=>e<=t?1:0));$e(o.Ab,et,null,"bool"),o.Ab;
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function tt(e,t,n){const r=(t-e)/(n-1),a=o.ae.makeZerosTypedArray(n,"float32");a[0]=e;for(let e=1;e<a.length;e++)a[e]=a[e-1]+r;return a}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const nt=Be(e=>Math.log(e));Ue(o.Cb,nt),o.Cb;
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function rt(e,t,n,r){const a=o.ae.getTypedArrayFromDType(r,o.ae.sizeFromShape(n));for(let n=0;n<a.length;++n){const r=n*t;let o=e[r];for(let n=0;n<t;++n){const t=e[r+n];(Number.isNaN(t)||t>o)&&(o=t)}a[n]=o}return a}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ot=je((e,t)=>Math.max(e,t)),at=($e(o.Nb,ot),o.Nb,je((e,t)=>Math.min(e,t))),it=($e(o.Qb,at),o.Qb,je((e,t)=>e*t)),st=Fe((e,t,n,r)=>({real:e*n-t*r,imag:e*r+t*n}));$e(o.Ub,it,st),o.Ub;
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function ut(e,t,n){const r=o.ae.createScalarValue(-1,n);return it([],t,r,e,n)}o.Vb;
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ct=je((e,t)=>e!==t?1:0);$e(o.Zb,ct,null,"bool"),o.Zb;
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function lt(e,t,n,r,a){const i=t.length,s=o.ae.sizeFromShape(t),u=o.ae.computeStrides(t),c=o.ae.computeStrides(a),l=o.ae.getTypedArrayFromDType(n,o.ae.sizeFromShape(a));for(let t=0;t<s;++t){const n=o.ae.indexToLoc(t,i,u),a=new Array(n.length);for(let e=0;e<a.length;e++)a[e]=n[r[e]];l[o.ae.locToIndex(a,i,c)]=e[t]}return l}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */o.ed;
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function dt(e,t,n,r){const[a,i]=o.md.computeOutAndReduceShapes(e,r),s=Object(o.Zd)(t,"int32"),u=o.ae.makeZerosTypedArray(o.ae.sizeFromShape(a),s),c=o.ae.sizeFromShape(i);for(let e=0;e<u.length;++e){const t=e*c;let r=1;for(let e=0;e<c;++e)r*=n[t+e];u[e]=r}return{outVals:u,outShape:a,outDtype:s}}o.gc;
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function pt(e,t,n,r){if(e===t||e<t&&n<0||t<e&&n>1)return o.ae.makeZerosTypedArray(0,r);const a=Math.abs(Math.ceil((t-e)/n)),i=o.ae.makeZerosTypedArray(a,r);t<e&&1===n&&(n=-1),i[0]=e;for(let e=1;e<i.length;e++)i[e]=i[e-1]+n;return i}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ht=Be(e=>1/Math.sqrt(e)),ft=(Ue(o.vc,ht),o.vc,Be(e=>1/(1+Math.exp(-e))));ze(o.zc,e=>1/(1+Math.exp(-e))),o.zc;
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function mt(e,t,n,r,a){const i=o.Pd.isSliceContinous(r,t,n),s=o.ae.sizeFromShape(n),u=o.ae.computeStrides(r);if(i){const n=o.Pd.computeFlatOffset(t,u);return"string"===a?e.slice(n,n+s):e.subarray(n,n+s)}const c="string"===a?o.md.fromUint8ToStringArray(e):e,l=Object(o.pd)(r,a,c),d=Object(o.pd)(n,a);for(let e=0;e<d.size;++e){const n=d.indexToLoc(e),r=n.map((e,n)=>e+t[n]);d.set(l.get(...r),...n)}return"string"===a?o.md.fromStringArrayToUint8(d.values):d.values}o.Dc;
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function gt(e,t,n,r,a,i,s){const u=t[0],c=i[0],l=new Array(c),d=new Array(u),p=t[1];if(0===c){if(0!==u)throw new Error(o.md.getSparseFillEmptyRowsIndicesDenseShapeMismatch(u));return[o.ae.getArrayFromDType(n,0),[0,p],o.ae.getArrayFromDType(a,0),l,d]}let h=!0,f=0;const m=new Array(c).fill(0);for(let t=0;t<u;++t){const n=e[t*p];if(n<0)throw new Error(o.md.getSparseFillEmptyRowsNegativeIndexErrorMessage(t,n));if(n>=c)throw new Error(o.md.getSparseFillEmptyRowsOutOfRangeIndexErrorMessage(t,n,c));++m[n],h=h&&n>=f,f=n}let g=!0;for(let e=0;e<c;++e){const t=0===m[e];l[e]=t,g=g&&!t,m[e]=Math.max(m[e],1),e>0&&(m[e]+=m[e-1])}if(g&&h){const t=e,n=r;for(let e=0;e<u;++e)d[e]=e;return[t,[u,p],n,l,d]}{const t=m[c-1],i=o.ae.getArrayFromDType(n,t*p),h=o.ae.getArrayFromDType(a,t),f=new Array(c).fill(0);for(let t=0;t<u;++t){const n=e[t*p],o=f[n],a=(0===n?0:m[n-1])+o;f[n]++;for(let n=0;n<p;++n)i[a*p+n]=e[t*p+n];h[a]=r[t],d[t]=a}for(let e=0;e<c;++e){if(0===f[e]){const t=0===e?0:m[e-1];i[t*p+0]=e;for(let e=1;e<p;++e)i[t*p+e]=0;h[t]=s}}return[i,[t,p],h,l,d]}}
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function bt(e,t,n,r,a){const i=o.ae.sizeFromShape(r),s=t[0],u=a.length,c=[];let l=1,d=-1;for(let e=0;e<u;++e){const t=a[e];if(-1===t){if(-1!==d)throw new Error(o.md.getSparseReshapeMultipleNegativeOneOutputDimErrorMessage(d,e));d=e,c.push(1)}else{if(t<0)throw new Error(o.md.getSparseReshapeNegativeOutputDimErrorMessage(e,t));l*=t,c.push(t)}}if(-1!==d){if(l<=0)throw new Error(o.md.getSparseReshapeEmptyTensorZeroOutputDimErrorMessage());const e=Math.trunc(i/l);if(l*e!==i)throw new Error(o.md.getSparseReshapeInputOutputMultipleErrorMessage(r,c));c[d]=e}if(o.ae.sizeFromShape(c)!==i)throw new Error(o.md.getSparseReshapeInputOutputMismatchErrorMessage(r,c));const p=r.length,h=[];if(p>0){h[p-1]=1;for(let e=p-2;e>=0;--e)h[e]=h[e+1]*r[e+1]}const f=[];if(u>0){f[u-1]=1;for(let e=u-2;e>=0;--e)f[e]=f[e+1]*c[e+1]}const m=o.ae.getArrayFromDType(n,s*u);for(let t=0;t<s;++t){let n=0;for(let r=0;r<p;++r)n+=e[t*p+r]*h[r];for(let e=0;e<u;++e)m[t*u+e]=Math.trunc(n/f[e]),n%=f[e]}return[m,[s,u],c]}
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function yt(e,t,n,r,a,i=!1,s=0){const u=r.length,c=[t[0],e.length/t[0]],l=c[1],d=u>0?a[u-1]+1:0;if(d<0)throw new Error(o.md.getSparseSegmentReductionNegativeSegmentIdsErrorMessage());const p=t.slice();p[0]=d;const h=p.reduce((e,t)=>e*t,1),f=o.ae.getArrayFromDType(n,h);if(0===u)return d>0&&f.fill(s),[f,p];if(d<=0)throw new Error(o.md.getSparseSegmentReductionNegativeSegmentIdsErrorMessage());let m=0,g=1,b=0,y=a[m];for(;;){let t=0;if(g<u){if(t=a[g],y===t){++g;continue}if(y>=t)throw new Error(o.md.getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage())}if(y<0||y>=d)throw new Error(o.md.getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage(y,d));y>b&&f.fill(s,b*l,y*l);for(let t=m;t<g;++t){const n=r[t];if(n<0||n>=c[0])throw new Error(o.md.getSparseSegmentReductionIndicesOutOfRangeErrorMessage(t,r[t],c[0]));for(let t=0;t<l;t++)f[y*l+t]+=e[n*l+t]}if(i)for(let e=0;e<l;e++)f[y*l+e]/=g-m;if(m=g,++g,b=y+1,y=t,g>u)break}return b<d&&f.fill(s,b*l,d*l),[f,p]}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const vt=Be(e=>Math.sqrt(e)),xt=(ze(o.Nc,e=>Math.sqrt(e)),o.Nc,je((e,t)=>{const n=e-t;return n*n}));$e(o.Pc,xt),o.Pc;
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function wt(e,t,n,r){const a=Object(o.pd)(e,t.dtype);for(let e=0;e<a.size;e++){const o=a.indexToLoc(e),i=new Array(o.length);for(let e=0;e<i.length;e++)i[e]=o[e]*n[e]+r[e];a.set(t.get(...i),...o)}return a}
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Ot{constructor(e,t,n,r,a,i){this.separator=o.ae.encodeString(e),this.nGramWidths=t,this.leftPad=o.ae.encodeString(n),this.rightPad=o.ae.encodeString(r),this.padWidth=a,this.preserveShort=i}getPadWidth(e){return Math.min(this.padWidth<0?e-1:this.padWidth,e-1)}getNumNGrams(e,t){const n=this.getPadWidth(t);return Math.max(0,e+2*n-t+1)}createNGrams(e,t,n,r,o,a){for(let i=0;i<o;++i){const s=this.getPadWidth(a),u=Math.max(0,s-i),c=Math.max(0,s-(o-(i+1))),l=a-(u+c),d=t+(u>0?0:i-s);let p=0;p+=u*this.leftPad.length;for(let t=0;t<l;++t)p+=e[d+t].length;p+=c*this.rightPad.length;p+=(u+c+l-1)*this.separator.length,n[r+i]=new Uint8Array(p);const h=n[r+i];let f=0;const m=e=>e.forEach(e=>h[f++]=e);for(let e=0;e<u;++e)m(this.leftPad),m(this.separator);for(let t=0;t<l-1;++t)m(e[d+t]),m(this.separator);if(l>0){m(e[d+l-1]);for(let e=0;e<c;++e)m(this.separator),m(this.rightPad)}else{for(let e=0;e<c-1;++e)m(this.rightPad),m(this.separator);m(this.rightPad)}}}compute(e,t){const n=e.length,r=t.length;if(r>0){let e=t[0];if(0!==e)throw new Error("First split value must be 0, got "+e);for(let o=1;o<r;++o){let r=t[o]>=e;if(r=r&&t[o]<=n,!r)throw new Error(`Invalid split value ${t[o]}, must be in [${e}, ${n}]`);e=t[o]}if(e!==n)throw new Error(`Last split value must be data size. Expected ${n}, got ${e}`)}const a=r-1,i=o.ae.getArrayFromDType("int32",r);if(0===n||0===r){const e=new Array(n);for(let e=0;e<=a;++e)i[e]=0;return[e,i]}i[0]=0;for(let e=1;e<=a;++e){const n=t[e]-t[e-1];let r=0;this.nGramWidths.forEach(e=>{r+=this.getNumNGrams(n,e)}),this.preserveShort&&n>0&&0===r&&(r=1),i[e]=i[e-1]+r}const s=new Array(i[a]);for(let n=0;n<a;++n){const r=t[n];let o=i[n];if(this.nGramWidths.forEach(a=>{const i=t[n+1]-t[n],u=this.getNumNGrams(i,a);this.createNGrams(e,r,s,o,u,a),o+=u}),this.preserveShort&&o===i[n]){const a=t[n+1]-t[n];if(0===a)continue;const i=a+2*this.padWidth,u=1;this.createNGrams(e,r,s,o,u,i)}}return[s,i]}}function kt(e,t,n,r,o,a,i,s){return new Ot(n,r,o,a,i,s).compute(e,t)}
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function St(e,t,n,r){if(!e.length)return;if(0===t.length){for(let t=0;t<e.length;++t)r.push(e.subarray(t,t+1));return}if(1===t.length){const o=t[0];let a=e.indexOf(o);for(;-1!==a;){const t=e.subarray(0,a);n&&0===t.length||r.push(t),a=(e=e.subarray(a+1)).indexOf(o)}return void(n&&0===e.length||r.push(e))}let o=0;for(let a=0;a<e.length+1;a++)if(a===e.length||-1!==t.indexOf(e[a])){const t=e.subarray(o,a);n&&0===t.length||r.push(t),o=a+1}}function Tt(e,t,n){const r=e.length,a=[];let i=0,s=0;const u=new Array(r);for(let o=0;o<r;++o){const r=a.length;St(e[o],t,n,a);const c=a.length-r;u[o]=c,i+=c,s=Math.max(s,c)}const c=o.ae.getArrayFromDType("int32",2*i),l=new Array(i),d=[r,s];let p=0;for(let e=0;e<r;++e)for(let t=0;t<u[e];++t)c[2*p]=e,c[2*p+1]=t,l[p]=a[p],++p;return[c,l,d]}
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Ct(e,t){const n=o.ae.getArrayFromDType("int32",e.length);for(let r=0;r<e.length;++r)n[r]=o.ae.fingerPrint64(e[r]).modulo(t).getLowBitsUnsigned();return n}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Et=je((e,t)=>e-t),It=Fe((e,t,n,r)=>({real:e-n,imag:t-r}));$e(o.Vc,Et,It),o.Vc;
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function jt(e,t){const n=new Array(e.rank);for(let r=0;r<n.length;r++)n[r]=e.shape[r]*t[r];const r=Object(o.pd)(n,e.dtype);for(let t=0;t<r.values.length;++t){const n=r.indexToLoc(t),o=new Array(e.rank);for(let t=0;t<o.length;t++)o[t]=n[t]%e.shape[t];const a=e.locToIndex(o);r.values[t]=e.values[a]}return r}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Nt=(e,t)=>{const n=t.value-e.value;return 0===n?e.index-t.index:n};function At(e,t,n=0,r=e.length-1){for(;r>n;){if(r-n>600){const o=r-n+1,a=t-n+1,i=Math.log(o),s=.5*Math.exp(2*i/3),u=.5*Math.sqrt(i*s*(o-s)/o)*Math.sign(a-o/2);At(e,t,Math.max(n,Math.floor(t-a*s/o+u)),Math.min(r,Math.floor(t+(o-a)*s/o+u)))}const a=e[t];let i=n,s=r;for(o.ae.swap(e,n,t),Nt(e[r],a)>0&&o.ae.swap(e,n,r);i<s;){for(o.ae.swap(e,i,s),i++,s--;Nt(e[i],a)<0;)i+=1;for(;Nt(e[s],a)>0;)s-=1}0===Nt(e[n],a)?o.ae.swap(e,n,s):(s+=1,o.ae.swap(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}}function Rt(e,t,n,r,a){const i=t[t.length-1],[s,u]=[e.length/i,i],c=o.ae.getTypedArrayFromDType(n,s*r),l=o.ae.getTypedArrayFromDType("int32",s*r);for(let t=0;t<s;t++){const n=t*u,o=e.subarray(n,n+u);let i=new Array(o.length);o.forEach((e,t)=>i[t]={value:e,index:t}),r<i.length&&(At(i,r),i=i.slice(0,r)),a&&i.sort(Nt);const s=t*r,d=c.subarray(s,s+r),p=l.subarray(s,s+r);for(let e=0;e<r;e++)d[e]=i[e].value,p[e]=i[e].index}const d=t.slice();return d[d.length-1]=r,[Object(o.pd)(d,n,c),Object(o.pd)(d,"int32",l)]}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function _t(e,t,n,r){const a=o.ae.parseAxisParam(t,n)[0],i=[1,n[0],1];for(let e=0;e<a;e++)i[0]*=n[e];i[1]=n[a];for(let e=a+1;e<n.length;e++)i[2]*=n[e];const s={},u=new Int32Array(n[a]),c=new o.ad(i,r,e),l=[],d=1===i[0]&&1===i[2];for(let t=0;t<n[a];t++){let n;if(d)n=e[t].toString();else{const e=[];for(let n=0;n<i[0];n++)for(let r=0;r<i[2];r++)e.push(c.get(n,t,r));n=e.join(",")}if(void 0!==s[n])u[t]=s[n];else{const e=Object.keys(s).length;s[n]=e,u[t]=e,l.push(t)}}const p=i.slice();p[1]=Object.keys(s).length;const h=new o.ad(p,r);l.forEach((e,t)=>{for(let n=0;n<i[0];n++)for(let r=0;r<i[2];r++)h.set(c.get(n,e,r),n,t,r)});const f=n.slice();return f[a]=p[1],{outputValues:h.values,outputShape:f,indices:u}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const{addImpl:$t,bincountImpl:Ft,bincountReduceImpl:Dt,ceilImpl:Mt,concatImpl:Pt,equalImpl:Lt,expImpl:Bt,expm1Impl:zt,floorImpl:Ut,gatherNdImpl:Vt,gatherV2Impl:Wt,greaterImpl:Gt,greaterEqualImpl:Ht,lessImpl:qt,lessEqualImpl:Kt,linSpaceImpl:Xt,logImpl:Yt,maxImpl:Qt,maximumImpl:Zt,minimumImpl:Jt,multiplyImpl:en,negImpl:tn,notEqualImpl:nn,prodImpl:rn,rangeImpl:on,rsqrtImpl:an,sigmoidImpl:sn,simpleAbsImpl:un,sliceImpl:cn,sparseFillEmptyRowsImpl:ln,sparseReshapeImpl:dn,sparseSegmentReductionImpl:pn,sqrtImpl:hn,stridedSliceImpl:fn,stringNGramsImpl:mn,stringSplitImpl:gn,stringToHashBucketFastImpl:bn,subImpl:yn,tileImpl:vn,topKImpl:xn,transposeImpl:wn,uniqueImpl:On}=r;
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function kn(e,t){return["x","y","z","w","u","v"].slice(0,t).map(t=>`${e}.${t}`)}function Sn(e,t){return 1===t?[e]:kn(e,t)}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class Tn{constructor(e){if(this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outputShape=e,this.rank=e.length,this.enableShapeUniforms=ce(this.outputShape.length),0===this.rank)this.userCode="\n        void main() {\n          setOutput(vec4(getA(), 0., 0., 0.));\n        }\n      ";else{const e=Sn("rc",this.rank),t=oe(this.rank),n=this.getOutOfBoundsCondition(e),r=this.getSetup(e),o=this.getOutput(e);this.userCode=`\n        void main() {\n          ${t} rc = getOutputCoords();\n\n          if(${n}) {\n            setOutput(vec4(0));\n          } else {\n            ${r}\n\n            setOutput(vec4(${o}));\n          }\n        }\n      `}}getSourceCoordsArr(e){const t=[];for(let n=0;n<=1;n++)for(let r=0;r<=1;r++){let o=`${0===n?"r":"rp1"}, ${0===r?"c":"cp1"}`;for(let t=2;t<this.rank;t++)o=e[e.length-1-t]+","+o;t.push(o)}return t}getOutOfBoundsCondition(e){if(1===this.rank)return"rc > "+(this.enableShapeUniforms?"outShape":this.outputShape[0]);let t="";for(let n=this.rank-2;n<this.rank;n++)t+=`${e[n]} >= ${this.enableShapeUniforms?`outShape[${n}]`:this.outputShape[n]}`,n<this.rank-1&&(t+="||");return t}getSetup(e){if(1===this.rank)return"";const t=e.slice(-2),n=this.enableShapeUniforms?`outShape[${this.rank} - 1]`:this.outputShape[this.rank-1],r=this.enableShapeUniforms?`outShape[${this.rank} - 2]`:this.outputShape[this.rank-2];return`\n      int r = ${t[0]};\n      int c = ${t[1]};\n      int rp1 = r + 1;\n      int cp1 = c + 1;\n\n      bool cEdge = cp1 >= ${n};\n      bool rEdge = rp1 >= ${r};\n    `}getOutput(e){const t=this.getSourceCoordsArr(e);if(1===this.rank){return`getA(rc), (rc + 1 >= ${this.enableShapeUniforms?"outShape":this.outputShape[0]} ? 0. : getA(rc + 1)), 0, 0`}return`getA(${t[0]}),\n            cEdge ? 0. : getA(${t[1]}),\n            rEdge ? 0. : getA(${t[2]}),\n            rEdge || cEdge ? 0. : getA(${t[3]})`}}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Cn{constructor(e,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"inputShape",type:"ivec3"}],this.outputShape=e,this.enableShapeUniforms=ce(this.outputShape.length);let n="";for(let e=0;e<4;e++){let t="thisRC = rc;";e%2==1&&(t+="thisRC.z += 1;"),e>1&&(t+="thisRC.y += 1;"),n+=`\n        ${t}\n        ${e>0?"if(thisRC.y < rows && thisRC.z < cols){":""}\n          int flatIndex = getFlatIndex(thisRC);\n\n          ivec3 inputRC = inputCoordsFromReshapedOutCoords(flatIndex);\n          vec2 inputRCInnerDims = vec2(float(inputRC.y),float(inputRC.z));\n\n          result[${e}] =\n            getChannel(getA(inputRC.x, inputRC.y, inputRC.z), inputRCInnerDims);\n        ${e>0?"}":""}\n      `}var r,o;
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */this.userCode=`\n      ${r=t,o=this.enableShapeUniforms,`\n    ivec3 inputCoordsFromReshapedOutCoords(int index) {\n      ${o?W(["r","c","d"],"inputShape"):U(["r","c","d"],r)}\n      return ivec3(r, c, d);\n    }\n  `}\n      ${this.enableShapeUniforms?"\n  int getFlatIndex(ivec3 coords) {\n    return coords.x * outShapeStrides[0] + coords.y * outShapeStrides[1] + coords.z;\n  }\n":G(e)}\n\n      void main() {\n        ivec3 rc = getOutputCoords();\n\n        vec4 result = vec4(0.);\n\n        ivec3 thisRC;\n        int rows = ${this.enableShapeUniforms?"outShape[1]":e[1]};\n        int cols = ${this.enableShapeUniforms?"outShape[2]":e[2]};\n\n        ${n}\n\n        setOutput(result);\n      }\n    `}}class En{constructor(e){this.gpgpu=e,this.numUsedTextures=0,this.numFreeTextures=0,this._numBytesAllocated=0,this._numBytesFree=0,this.freeTextures={},this.logEnabled=!1,this.usedTextures={}}acquireTexture(e,t,n){const r=jn(t,n),o=Nn(e,r,n);o in this.freeTextures||(this.freeTextures[o]=[]),o in this.usedTextures||(this.usedTextures[o]=[]);const a=In(e,r,this.gpgpu.gl,this.gpgpu.textureConfig,n);if(this.freeTextures[o].length>0){this.numFreeTextures--,this.numUsedTextures++,this._numBytesFree-=a,this.log();const e=this.freeTextures[o].shift();return this.usedTextures[o].push(e),e}let i;return r===l.PACKED_2X2_FLOAT32?i=this.gpgpu.createPackedMatrixTexture(e[0],e[1]):r===l.PACKED_2X2_FLOAT16?i=this.gpgpu.createFloat16PackedMatrixTexture(e[0],e[1]):r===l.UNPACKED_FLOAT32?i=this.gpgpu.createFloat32MatrixTexture(e[0],e[1]):r===l.UNPACKED_FLOAT16?i=this.gpgpu.createFloat16MatrixTexture(e[0],e[1]):r===l.PACKED_4X1_UNSIGNED_BYTE&&(i=this.gpgpu.createUnsignedBytesMatrixTexture(e[0],e[1])),this.usedTextures[o].push(i),this.numUsedTextures++,this._numBytesAllocated+=a,this.log(),i}releaseTexture(e,t,n,r){if(null==this.freeTextures)return;const a=jn(n,r),i=Nn(t,a,r);i in this.freeTextures||(this.freeTextures[i]=[]);const s=In(t,a,this.gpgpu.gl,this.gpgpu.textureConfig,r),u=Object(o.zd)().get("WEBGL_DELETE_TEXTURE_THRESHOLD");-1!==u&&this._numBytesAllocated>u?(this.gpgpu.deleteMatrixTexture(e.texture),this._numBytesAllocated-=s):(this.freeTextures[i].push(e),this.numFreeTextures++,this._numBytesFree+=s),this.numUsedTextures--;const c=this.usedTextures[i],l=c.indexOf(e);if(l<0)throw new Error("Cannot release a texture that was never provided by this texture manager");c.splice(l,1),this.log()}log(){if(!this.logEnabled)return;const e=this.numFreeTextures+this.numUsedTextures;console.log("Free/Used",`${this.numFreeTextures} / ${this.numUsedTextures}`,`(${e})`);const t=this._numBytesFree/this._numBytesAllocated;console.log("Bytes allocated: "+this._numBytesAllocated),console.log(`Bytes unused: ${this._numBytesFree} (${Math.round(100*t)}%)`)}get numBytesAllocated(){return this._numBytesAllocated}get numBytesFree(){return this._numBytesFree}getNumUsedTextures(){return this.numUsedTextures}getNumFreeTextures(){return this.numFreeTextures}dispose(){if(null!=this.freeTextures){for(const e in this.freeTextures)this.freeTextures[e].forEach(e=>{this.gpgpu.deleteMatrixTexture(e.texture)});for(const e in this.usedTextures)this.usedTextures[e].forEach(e=>{this.gpgpu.deleteMatrixTexture(e.texture)});this.freeTextures=null,this.usedTextures=null,this.numUsedTextures=0,this.numFreeTextures=0,this._numBytesAllocated=0,this._numBytesFree=0}}}function In(e,t,n,r,o){const a=function(e,t){switch(e){case l.PACKED_2X2_FLOAT32:return ke(t);case l.PACKED_2X2_FLOAT16:return Se(t);case l.UNPACKED_FLOAT32:return xe(t);case l.UNPACKED_FLOAT16:return we(t);case l.PACKED_4X1_UNSIGNED_BYTE:return Oe(t);default:throw new Error("Unknown physical texture type "+e)}}(t,r);let i;if(o){const[t,n]=h(e[0],e[1]);i=t*n}else{const[t,n]=d(e[0],e[1]);i=t*n}return i*function(e,t){const n=e;if(t===n.R32F)return 4;if(t===n.R16F)return 2;if(t===n.RGBA32F)return 16;if(t===e.RGBA)return 16;if(t===n.RGBA16F)return 8;if(t===n.RGBA8)return 4;throw new Error("Unknown internal format "+t)}(n,a)}function jn(e,t){if(e===c.UPLOAD)return l.PACKED_2X2_FLOAT32;if(e===c.RENDER||null==e)return function(e){return Object(o.zd)().getBool("WEBGL_RENDER_FLOAT32_ENABLED")?e?l.PACKED_2X2_FLOAT32:l.UNPACKED_FLOAT32:e?l.PACKED_2X2_FLOAT16:l.UNPACKED_FLOAT16}(t);if(e===c.DOWNLOAD||e===c.PIXELS)return l.PACKED_4X1_UNSIGNED_BYTE;throw new Error("Unknown logical texture type "+e)}function Nn(e,t,n){return`${e[0]}_${e[1]}_${t}_${n}`}
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class An{constructor(e,t){this.variableNames=["A"],this.outputShape=e,this.enableShapeUniforms=ce(this.outputShape.length),this.userCode=`\n      float unaryOperation(float x) {\n        ${t}\n      }\n\n      void main() {\n        float x = getAAtOutCoords();\n        float y = unaryOperation(x);\n\n        setOutput(y);\n      }\n    `}}const Rn="return abs(x);";const _n="return x;";class $n{constructor(e,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.enableShapeUniforms=ce(this.outputShape.length),this.userCode=`\n      vec4 unaryOperation(vec4 x) {\n        ${t}\n      }\n\n      void main() {\n        vec4 x = getAAtOutCoords();\n        vec4 y = unaryOperation(x);\n\n        setOutput(y);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Fn{constructor(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outputShape=e,this.enableShapeUniforms=ce(this.outputShape.length);const t=e.length,n=Sn("rc",t),r=oe(t),o=function(e,t){if(1===e)return"rc";let n="";for(let r=0;r<e;r++)n+=t[r],r<e-1&&(n+=",");return n}(t,n),a=n.slice(-2),i=t<=1?"rc":`vec2(${a.join(",")})`;this.userCode=`\n      void main() {\n        ${r} rc = getOutputCoords();\n        vec4 packedInput = getA(${o});\n\n        setOutput(getChannel(packedInput, ${i}));\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Dn=o.Gd.whereImpl,Mn={};const Pn=Object(o.zd)().getNumber("CPU_HANDOFF_SIZE_THRESHOLD");class Ln extends o.vb{constructor(e){if(super(),this.pendingRead=new WeakMap,this.pendingDisposal=new WeakSet,this.dataRefCount=new WeakMap,this.numBytesInGPU=0,this.uploadWaitMs=0,this.downloadWaitMs=0,this.lastGlFlushTime=0,this.warnedAboutMemory=!1,this.pendingDeletes=0,this.disposed=!1,!Object(o.zd)().getBool("HAS_WEBGL"))throw new Error("WebGL is not supported on this device");let t;if(null!=e){if(e instanceof Ce)t=e;else{const n=s(Object(o.zd)().getNumber("WEBGL_VERSION"),e);t=new Ce(n)}this.binaryCache={},this.gpgpuCreatedLocally=!1}else{const e=s(Object(o.zd)().getNumber("WEBGL_VERSION"));t=new Ce(e),this.binaryCache=((n=Object(o.zd)().getNumber("WEBGL_VERSION"))in Mn||(Mn[n]={}),Mn[n]),this.gpgpuCreatedLocally=!0}var n;this.gpgpu=t,this.canvas=this.gpgpu.gl.canvas,this.textureManager=new En(this.gpgpu),this.numMBBeforeWarning=null==Object(o.zd)().global.screen?1024:Object(o.zd)().global.screen.height*Object(o.zd)().global.screen.width*window.devicePixelRatio*600/1024/1024,this.texData=new o.M(this,Object(o.yd)())}nextDataId(){return Ln.nextDataId++}numDataIds(){return this.texData.numDataIds()-this.pendingDeletes}write(e,t,n){if((Object(o.zd)().getBool("WEBGL_CHECK_NUMERICAL_PROBLEMS")||Object(o.zd)().getBool("DEBUG"))&&this.checkNumericalProblems(e),"complex64"===n&&null!=e)throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");const r={id:this.nextDataId()};return this.texData.set(r,{shape:t,dtype:n,values:e,usage:c.UPLOAD,refCount:1}),r}refCount(e){if(this.texData.has(e)){return this.texData.get(e).refCount}return 0}incRef(e){this.texData.get(e).refCount++}decRef(e){if(this.texData.has(e)){this.texData.get(e).refCount--}}move(e,t,n,r,a){if(Object(o.zd)().getBool("DEBUG")&&this.checkNumericalProblems(t),"complex64"===r)throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");this.texData.set(e,{shape:n,dtype:r,values:t,usage:c.UPLOAD,refCount:a})}disposeIntermediateTensorInfo(e){this.disposeData(e.dataId)}readSync(e){const t=this.texData.get(e),{values:n,dtype:r,complexTensorInfos:a,slice:i,shape:s,isPacked:u}=t;if(null!=i){let t;t=u?new $n(s,_n):new An(s,_n);const n=this.runWebGLProgram(t,[{dataId:e,shape:s,dtype:r}],r),o=this.readSync(n.dataId);return this.disposeIntermediateTensorInfo(n),o}if(null!=n)return this.convertAndCacheOnCPU(e);if("string"===r)return n;const c=null!=this.activeTimers;let l,d;if(c&&(l=o.ae.now()),"complex64"===r){const e=this.readSync(a.real.dataId),t=this.readSync(a.imag.dataId);d=o.md.mergeRealAndImagArrays(e,t)}else d=this.getValuesFromTexture(e);return c&&(this.downloadWaitMs+=o.ae.now()-l),this.convertAndCacheOnCPU(e,d)}async read(e){if(this.pendingRead.has(e)){const t=this.pendingRead.get(e);return new Promise(e=>t.push(e))}const t=this.texData.get(e),{values:n,shape:r,slice:a,dtype:i,complexTensorInfos:s,isPacked:u}=t;if(null!=a){let t;t=u?new $n(r,_n):new An(r,_n);const n=this.runWebGLProgram(t,[{dataId:e,shape:r,dtype:i}],i),o=this.read(n.dataId);return this.disposeIntermediateTensorInfo(n),o}if(null!=n)return this.convertAndCacheOnCPU(e);if(Object(o.zd)().getBool("DEBUG")&&!Object(o.zd)().getBool("WEBGL_DOWNLOAD_FLOAT_ENABLED")&&2===Object(o.zd)().getNumber("WEBGL_VERSION"))throw new Error("tensor.data() with WEBGL_DOWNLOAD_FLOAT_ENABLED=false and WEBGL_VERSION=2 not yet supported.");let c,l,d=null;if("complex64"!==i&&Object(o.zd)().get("WEBGL_BUFFER_SUPPORTED")){c=this.decode(e);const t=this.texData.get(c.dataId);d=this.gpgpu.createBufferFromTexture(t.texture.texture,...p(r))}if(this.pendingRead.set(e,[]),"complex64"!==i&&await this.gpgpu.createAndWaitForFence(),"complex64"===i){const e=await Promise.all([this.read(s.real.dataId),this.read(s.imag.dataId)]),t=e[0],n=e[1];l=o.md.mergeRealAndImagArrays(t,n)}else if(null==d)l=this.getValuesFromTexture(e);else{const e=o.ae.sizeFromShape(r);l=this.gpgpu.downloadFloat32MatrixFromBuffer(d,e)}if(null!=c&&this.disposeIntermediateTensorInfo(c),null!=d){const e=this.gpgpu.gl;m(e,()=>e.deleteBuffer(d))}const h=this.convertAndCacheOnCPU(e,l),f=this.pendingRead.get(e);return this.pendingRead.delete(e),f.forEach(e=>e(h)),this.pendingDisposal.has(e)&&(this.pendingDisposal.delete(e),this.disposeData(e)&&Object(o.yd)().removeDataId(e,this),this.pendingDeletes--),h}readToGPU(e,t={}){const n=this.texData.get(e),{values:r,shape:a,slice:i,dtype:s,isPacked:u,texture:c}=n;if("complex64"===s)throw new Error("Does not support reading texture for complex64 dtype.");if(null!=i){let n;n=u?new $n(a,_n):new An(a,_n);const r=this.runWebGLProgram(n,[{dataId:e,shape:a,dtype:s}],s),o=this.readToGPU(r,t);return this.disposeIntermediateTensorInfo(r),o}if(null==c)throw null!=r?new Error("Data is not on GPU but on CPU."):new Error("There is no data on GPU or CPU.");const l=this.decode(e,t.customTexShape),d=Object(o.yd)().makeTensorFromDataId(l.dataId,l.shape,l.dtype),p=this.texData.get(l.dataId);return Object.assign({tensorRef:d},p.texture)}bufferSync(e){const t=this.readSync(e.dataId);let n=t;if("string"===e.dtype)try{n=t.map(e=>o.ae.decodeString(e))}catch(e){throw new Error("Failed to decode encoded string bytes into utf-8")}return Object(o.pd)(e.shape,e.dtype,n)}checkNumericalProblems(e){if(null!=e)for(let t=0;t<e.length;t++){const n=e[t];if(!g(n)){if(Object(o.zd)().getBool("WEBGL_RENDER_FLOAT32_CAPABLE"))throw Error(`The value ${n} cannot be represented with your current settings. Consider enabling float32 rendering: 'tf.env().set('WEBGL_RENDER_FLOAT32_ENABLED', true);'`);throw Error(`The value ${n} cannot be represented on this device.`)}}}getValuesFromTexture(e){const{shape:t,dtype:n,isPacked:r}=this.texData.get(e),a=o.ae.sizeFromShape(t);if(Object(o.zd)().getBool("WEBGL_DOWNLOAD_FLOAT_ENABLED")){const n=this.decode(e),r=this.texData.get(n.dataId),o=this.gpgpu.downloadMatrixFromPackedTexture(r.texture.texture,...p(t)).subarray(0,a);return this.disposeIntermediateTensorInfo(n),o}const i=Object(o.zd)().getBool("WEBGL_PACK")&&!0===r,s=i?N(t):t,u=i?new he(s):new pe(s),c=this.runWebGLProgram(u,[{shape:s,dtype:n,dataId:e}],"float32"),l=this.texData.get(c.dataId),d=this.gpgpu.downloadByteEncodedFloatMatrixFromOutputTexture(l.texture.texture,l.texShape[0],l.texShape[1]).subarray(0,a);return this.disposeIntermediateTensorInfo(c),d}timerAvailable(){return Object(o.zd)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0}time(e){const t=this.activeTimers,n=[];let r=!1;null==this.programTimersStack?(this.programTimersStack=n,r=!0):this.activeTimers.push(n),this.activeTimers=n,e();const a=o.ae.flatten(this.activeTimers.map(e=>e.query)).filter(e=>null!=e),i=o.ae.flatten(this.activeTimers.map(e=>e.name)).filter(e=>null!=e);this.activeTimers=t,r&&(this.programTimersStack=null);const s={uploadWaitMs:this.uploadWaitMs,downloadWaitMs:this.downloadWaitMs,kernelMs:null,wallMs:null};return(async()=>{if(Object(o.zd)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0){const e=await Promise.all(a);s.kernelMs=o.ae.sum(e),s.getExtraProfileInfo=()=>e.map((e,t)=>({name:i[t],ms:e})).map(e=>`${e.name}: ${e.ms}`).join(", ")}else s.kernelMs={error:"WebGL query timers are not supported in this environment."};return this.uploadWaitMs=0,this.downloadWaitMs=0,s})()}memory(){return{unreliable:!1,numBytesInGPU:this.numBytesInGPU,numBytesInGPUAllocated:this.textureManager.numBytesAllocated,numBytesInGPUFree:this.textureManager.numBytesFree}}startTimer(){return Object(o.zd)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?this.gpgpu.beginQuery():{startMs:o.ae.now(),endMs:null}}endTimer(e){return Object(o.zd)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?(this.gpgpu.endQuery(),e):(e.endMs=o.ae.now(),e)}async getQueryTime(e){if(Object(o.zd)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0)return this.gpgpu.waitForQueryAndGetTime(e);const t=e;return t.endMs-t.startMs}disposeData(e,t=!1){if(this.pendingDisposal.has(e))return!1;if(!this.texData.has(e))return!0;if(t?this.texData.get(e).refCount=0:this.texData.get(e).refCount--,!t&&this.texData.get(e).refCount>0)return!1;if(this.pendingRead.has(e))return this.pendingDisposal.add(e),this.pendingDeletes++,!1;this.releaseGPUData(e);const{complexTensorInfos:n}=this.texData.get(e);return null!=n&&(this.disposeData(n.real.dataId,t),this.disposeData(n.imag.dataId,t)),this.texData.delete(e),!0}releaseGPUData(e){const{texture:t,dtype:n,texShape:r,usage:o,isPacked:a,slice:i}=this.texData.get(e),s=i&&i.origDataId||e,u=this.dataRefCount.get(s);u>1?this.dataRefCount.set(s,u-1):(this.dataRefCount.delete(s),null!=t&&(this.numBytesInGPU-=this.computeBytes(r,n),this.textureManager.releaseTexture(t,r,o,a)));const c=this.texData.get(e);c.texture=null,c.texShape=null,c.isPacked=!1,c.slice=null}getTexture(e){return this.uploadToGPU(e),this.texData.get(e).texture.texture}getDataInfo(e){return this.texData.get(e)}shouldExecuteOnCPU(e,t=Pn){return Object(o.zd)().getBool("WEBGL_CPU_FORWARD")&&e.every(e=>null==this.texData.get(e.dataId).texture&&o.ae.sizeFromShape(e.shape)<t)}getGPGPUContext(){return this.gpgpu}where(e){o.md.warn("tf.where() in webgl locks the UI thread. Call tf.whereAsync() instead");const t=e.dataSync();return Dn(e.shape,t)}packedUnaryOp(e,t,n){const r=new $n(e.shape,t),a=this.compileAndRun(r,[e],n);return Object(o.yd)().makeTensorFromDataId(a.dataId,a.shape,a.dtype)}abs(e){if(this.shouldExecuteOnCPU([e])&&"complex64"!==e.dtype){const t=un(this.texData.get(e.dataId).values);return this.makeOutput(e.shape,e.dtype,t)}if(Object(o.zd)().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,Rn,e.dtype);const t=new An(e.shape,Rn),n=this.compileAndRun(t,[e]);return Object(o.yd)().makeTensorFromDataId(n.dataId,n.shape,n.dtype)}makeTensorInfo(e,t,n){let r;if("string"===t&&null!=n&&n.length>0&&o.ae.isString(n[0])){const a=n.map(e=>o.ae.encodeString(e));r=this.write(a,e,t)}else r=this.write(n,e,t);return this.texData.get(r).usage=null,{dataId:r,shape:e,dtype:t}}makeOutput(e,t,n){const{dataId:r}=this.makeTensorInfo(e,t,n);return Object(o.yd)().makeTensorFromDataId(r,e,t,this)}unpackTensor(e){const t=new Fn(e.shape);return this.runWebGLProgram(t,[e],e.dtype)}packTensor(e){const t=new Tn(e.shape);return this.runWebGLProgram(t,[e],e.dtype,null,!0)}packedReshape(e,t){const n=[I(e.shape),...j(e.shape)],r={dtype:e.dtype,shape:n,dataId:e.dataId},o=[I(t),...j(t)],a=new Cn(o,n),i=[n],s=this.runWebGLProgram(a,[r],e.dtype,i,!0);return{dataId:s.dataId,shape:t,dtype:s.dtype}}decode(e,t){const n=this.texData.get(e),{isPacked:r,shape:a,dtype:i}=n;if(null!=t){const e=o.ae.sizeFromShape(a),n=t[0]*t[1]*4;o.ae.assert(e<=n,()=>"customTexShape is too small. Row * Column * 4 should be equal or larger than the size of the tensor data.")}const s=N(a);let u;u=r?new de(s):new le(s);const c=[null!=t?t:p(s)];return{dtype:i,shape:a,dataId:this.runWebGLProgram(u,[{shape:s,dtype:i,dataId:e}],i,c,!0,t).dataId}}runWebGLProgram(e,t,n,r,a=!1,i){const s=this.makeTensorInfo(e.outputShape,n),c=this.texData.get(s.dataId);if(e.packedOutput&&(c.isPacked=!0),e.outPackingScheme===u.DENSE){const t=null!=i?i:p(e.outputShape);c.texShape=t.map(e=>2*e)}if(null!=e.outTexUsage&&(c.usage=e.outTexUsage),0===o.ae.sizeFromShape(s.shape))return c.values=o.ae.getTypedArrayFromDType(s.dtype,0),s;const l=[],d=t.map(t=>{if("complex64"===t.dtype)throw new Error("GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.");let n=this.texData.get(t.dataId);if(null==n.texture){if(!e.packedInputs&&o.ae.sizeFromShape(t.shape)<=Object(o.zd)().getNumber("WEBGL_SIZE_UPLOAD_UNIFORM"))return{shape:t.shape,texData:null,isUniform:!0,uniformValues:n.values};e.packedInputs&&(n.isPacked=!0,n.shape=t.shape)}if(this.uploadToGPU(t.dataId),!!n.isPacked!=!!e.packedInputs)t=n.isPacked?this.unpackTensor(t):this.packTensor(t),l.push(t),n=this.texData.get(t.dataId);else if(n.isPacked&&!R(n.shape,t.shape)){const e=t,r=t.shape;t.shape=n.shape,t=this.packedReshape(t,r),l.push(t),n=this.texData.get(t.dataId),e.shape=r}return{shape:t.shape,texData:n,isUniform:!1}});this.uploadToGPU(s.dataId);const h={shape:s.shape,texData:c,isUniform:!1},f=function(e,t,n){let r="";t.concat(n).forEach(t=>{const a=null!=t.texData&&null!=t.texData.slice&&t.texData.slice.flatOffset>0;if(e.enableShapeUniforms&&!t.isUniform){const i=t.texData.texShape,{useSqueezeShape:s,uniformShape:u,keptDims:c}=ae(e.packedInputs,t.shape,i);let l="",d="",p="";if(1===u.length&&e.packedInputs){const e=[Math.ceil(i[0]/2),Math.ceil(i[1]/2)];l=`${e[0]>1}_${e[1]>1}`}else if(2!==u.length||e.packedInputs){if(u.length>2&&!e.packedInputs){const e=o.ae.computeStrides(u);p=`${e[0]===i[1]}_${e[e.length-1]===i[1]}`}}else d=`${u[0]>1}_${u[1]>1}`;const h=t.shape.length,f=2===u.length&&o.ae.arraysEqual(t.shape,i),m=1===o.ae.sizeFromShape(t.shape),g=o.md.getBroadcastDims(t.shape,n.shape),b=!e.packedInputs&&h===n.shape.length&&o.ae.arraysEqual(i,n.texData.texShape),y=e.packedInputs||u.length>2?"":`${i[0]>1}_${i[1]>1}`;r+=`${h}_${b}_${s?c:""}_${u.length}_${m}_${g}_${f}_${l}_${d}_${p}_${y}_${a}`}else{const e=t.isUniform?"uniform":t.texData.texShape;r+=`${t.shape}_${e}_${a}`}});const a=e.userCode;let i=e.constructor.name;return i+="_"+r+"_"+a+Object(o.zd)().getNumber("WEBGL_VERSION"),i}(e,d,h),m=this.getAndSaveBinary(f,()=>function(e,t,n,r){const a=n.map((e,n)=>{const r={logicalShape:e.shape,texShape:e.isUniform?null:e.texData.texShape,isUniform:e.isUniform,isPacked:!e.isUniform&&e.texData.isPacked,flatOffset:null};return null!=e.texData&&null!=e.texData.slice&&e.texData.slice.flatOffset>0&&(r.flatOffset=e.texData.slice.flatOffset),{name:t.variableNames[n],shapeInfo:r}}),i=a.map(e=>e.shapeInfo),s={logicalShape:r.shape,texShape:r.texData.texShape,isUniform:!1,isPacked:r.texData.isPacked,flatOffset:null},u=K(a,s,t),c=y(e.gl,u),l=e.createProgram(c);let d=null;const p=e.getUniformLocation(l,"NAN",!1);1===Object(o.zd)().getNumber("WEBGL_VERSION")&&(d=e.getUniformLocation(l,"INFINITY",!1));const h={},f={},m={};for(let n=0;n<t.variableNames.length;n++){const r=t.variableNames[n];h[r]=e.getUniformLocation(l,r,!1),h["offset"+r]=e.getUniformLocation(l,"offset"+r,!1),t.enableShapeUniforms&&(f[r+"Shape"]=e.getUniformLocation(l,r+"Shape",!1),m[r+"TexShape"]=e.getUniformLocation(l,r+"TexShape",!1))}let g,b,v;t.enableShapeUniforms&&(g=e.getUniformLocation(l,"outShape",!1),v=e.getUniformLocation(l,"outShapeStrides",!1),b=e.getUniformLocation(l,"outTexShape",!1));const x=[];return t.customUniforms&&t.customUniforms.forEach((t,n)=>{x[n]=e.getUniformLocation(l,t.name,!1)}),{program:t,fragmentShader:c,source:u,webGLProgram:l,uniformLocations:h,customUniformLocations:x,inShapeInfos:i,outShapeInfo:s,infLoc:d,nanLoc:p,inShapesLocations:f,inTexShapesLocations:m,outShapeLocation:g,outShapeStridesLocation:v,outTexShapeLocation:b}}(this.gpgpu,e,d,h)),g=null!=this.activeTimers;let b;g&&(b=this.startTimer()),function(e,t,n,r,a){t.program.enableShapeUniforms||(ue(t.inShapeInfos,n),ue([t.outShapeInfo],[r]));const i=r.texData.texture,s=r.texData.texShape;r.texData.isPacked?e.setOutputPackedMatrixTexture(i.texture,s[0],s[1]):e.setOutputMatrixTexture(i.texture,s[0],s[1]),e.setProgram(t.webGLProgram),1===Object(o.zd)().getNumber("WEBGL_VERSION")&&null!==t.infLoc&&e.gl.uniform1f(t.infLoc,1/0),null!==t.nanLoc&&e.gl.uniform1f(t.nanLoc,NaN),n.forEach((n,r)=>{const a=t.program.variableNames[r],i=t.uniformLocations[a],s=t.uniformLocations["offset"+a],u=t.inShapesLocations[a+"Shape"],c=t.inTexShapesLocations[a+"TexShape"];if(u){const{uniformShape:r}=ae(t.program.packedInputs,n.shape,n.texData.texShape);switch(r.length){case 1:e.gl.uniform1iv(u,new Int32Array(r));break;case 2:e.gl.uniform2iv(u,new Int32Array(r));break;case 3:e.gl.uniform3iv(u,new Int32Array(r));break;case 4:e.gl.uniform4iv(u,new Int32Array(r))}}if(c&&e.gl.uniform2i(c,n.texData.texShape[0],n.texData.texShape[1]),null!=i)if(n.isUniform)if(o.ae.sizeFromShape(n.shape)<2)e.gl.uniform1f(i,n.uniformValues[0]);else{let t=n.uniformValues;t instanceof Float32Array||(t=new Float32Array(t)),e.gl.uniform1fv(i,t)}else null!=n.texData.slice&&null!=s&&e.gl.uniform1i(s,n.texData.slice.flatOffset),e.setInputMatrixTexture(n.texData.texture.texture,i,r)});const u=t.outShapeLocation;if(u)switch(r.shape.length){case 1:e.gl.uniform1iv(u,new Int32Array(r.shape));break;case 2:e.gl.uniform2iv(u,new Int32Array(r.shape));break;case 3:e.gl.uniform3iv(u,new Int32Array(r.shape));break;case 4:e.gl.uniform4iv(u,new Int32Array(r.shape))}if(t.outShapeStridesLocation){const n=o.ae.computeStrides(r.shape);switch(r.shape.length){case 2:e.gl.uniform1iv(t.outShapeStridesLocation,new Int32Array(n));break;case 3:e.gl.uniform2iv(t.outShapeStridesLocation,new Int32Array(n));break;case 4:e.gl.uniform3iv(t.outShapeStridesLocation,new Int32Array(n))}}t.outTexShapeLocation&&e.gl.uniform2i(t.outTexShapeLocation,r.texData.texShape[0],r.texData.texShape[1]),t.program.customUniforms&&a&&t.program.customUniforms.forEach((n,r)=>{const o=t.customUniformLocations[r],i=a[r];if("float"===n.type)e.gl.uniform1fv(o,i);else if("vec2"===n.type)e.gl.uniform2fv(o,i);else if("vec3"===n.type)e.gl.uniform3fv(o,i);else if("vec4"===n.type)e.gl.uniform4fv(o,i);else if("int"===n.type)e.gl.uniform1iv(o,i);else if("ivec2"===n.type)e.gl.uniform2iv(o,i);else if("ivec3"===n.type)e.gl.uniform3iv(o,i);else{if("ivec4"!==n.type)throw Error(`uniform type ${n.type} is not supported yet.`);e.gl.uniform4iv(o,i)}}),e.executeProgram()}(this.gpgpu,m,d,h,r),l.forEach(e=>this.disposeIntermediateTensorInfo(e)),g&&(b=this.endTimer(b),this.activeTimers.push({name:e.constructor.name,query:this.getQueryTime(b)}));const v=Object(o.zd)().get("WEBGL_FLUSH_THRESHOLD");if(v>0){const e=o.ae.now();e-this.lastGlFlushTime>v&&(this.gpgpu.gl.flush(),this.lastGlFlushTime=e)}if(!Object(o.zd)().getBool("WEBGL_LAZILY_UNPACK")&&c.isPacked&&!1===a){const e=this.unpackTensor(s);return this.disposeIntermediateTensorInfo(s),e}return s}compileAndRun(e,t,n,r,o=!1){n=n||t[0].dtype;return this.runWebGLProgram(e,t,n,r,o)}getAndSaveBinary(e,t){return e in this.binaryCache||(this.binaryCache[e]=t()),this.binaryCache[e]}getTextureManager(){return this.textureManager}dispose(){if(!this.disposed){if(!Object(o.zd)().getBool("IS_TEST")){Object.keys(this.binaryCache).forEach(e=>{this.gpgpu.deleteProgram(this.binaryCache[e].webGLProgram),delete this.binaryCache[e]})}this.textureManager.dispose(),null!=this.canvas&&"undefined"!=typeof HTMLCanvasElement&&this.canvas instanceof HTMLCanvasElement?this.canvas.remove():this.canvas=null,this.gpgpuCreatedLocally&&(this.gpgpu.program=null,this.gpgpu.dispose()),this.disposed=!0}}floatPrecision(){return null==this.floatPrecisionValue&&(this.floatPrecisionValue=Object(o.Xd)(()=>{if(!Object(o.zd)().get("WEBGL_RENDER_FLOAT32_ENABLED")){const e=Object(o.zd)().getBool("DEBUG");Object(o.zd)().set("DEBUG",!1);const t=this.abs(Object(o.Md)(1e-8)).dataSync()[0];if(Object(o.zd)().set("DEBUG",e),t>0)return 32}return 16})),this.floatPrecisionValue}epsilon(){return 32===this.floatPrecision()?1e-7:1e-4}uploadToGPU(e){const t=this.texData.get(e),{shape:n,dtype:r,values:a,texture:i,usage:s,isPacked:u}=t;if(null!=i)return;const l=null!=this.activeTimers;let d;l&&(d=o.ae.now());let p=t.texShape;if(null==p&&(p=function(e,t=!1){let n=Object(o.zd)().getNumber("WEBGL_MAX_TEXTURE_SIZE");if(t&&(n*=2,1===(e=e.map((t,n)=>n>=e.length-2?o.ae.nearestLargerEven(e[n]):e[n])).length&&(e=[2,e[0]])),2!==e.length){const t=o.ae.squeezeShape(e);e=t.newShape}let r=o.ae.sizeFromShape(e);if(e.length<=1&&r<=n)return[1,r];if(2===e.length&&e[0]<=n&&e[1]<=n)return e;if(3===e.length&&e[0]*e[1]<=n&&e[2]<=n)return[e[0]*e[1],e[2]];if(3===e.length&&e[0]<=n&&e[1]*e[2]<=n)return[e[0],e[1]*e[2]];if(4===e.length&&e[0]*e[1]*e[2]<=n&&e[3]<=n)return[e[0]*e[1]*e[2],e[3]];if(4===e.length&&e[0]<=n&&e[1]*e[2]*e[3]<=n)return[e[0],e[1]*e[2]*e[3]];if(t){const t=I(e);let n=2,a=2;return e.length&&([n,a]=j(e)),r=t*(n/2)*(a/2),o.ae.sizeToSquarishShape(r).map(e=>2*e)}return o.ae.sizeToSquarishShape(r)}(n,u),t.texShape=p),null!=a){const e=N(n);let i,s=p[1],f=p[0];const m=a instanceof Uint8Array||a instanceof Uint8ClampedArray;!u&&m||([s,f]=h(p[0],p[1])),i=u?new me(e,m):new fe(e,m);const g=m?[f,s]:p,b=this.makeTensorInfo(g,r),y=this.texData.get(b.dataId);y.usage=m?c.PIXELS:c.UPLOAD,y.texShape=g,this.gpgpu.uploadDenseMatrixToTexture(this.getTexture(b.dataId),s,f,a);const v=[[f,s]],x=!0,w=this.runWebGLProgram(i,[b],r,v,x),O=this.texData.get(w.dataId);t.texture=O.texture,t.texShape=O.texShape,t.isPacked=O.isPacked,t.usage=O.usage,this.disposeIntermediateTensorInfo(b),this.texData.delete(w.dataId),t.values=null,l&&(this.uploadWaitMs+=o.ae.now()-d)}else{const e=this.acquireTexture(p,s,r,u);t.texture=e}}convertAndCacheOnCPU(e,t){const n=this.texData.get(e),{dtype:r}=n;return this.releaseGPUData(e),null!=t&&(n.values=function(e,t){if("float32"===t||"complex64"===t)return e;if("int32"===t||"bool"===t){const n="int32"===t?new Int32Array(e.length):new Uint8Array(e.length);for(let t=0;t<n.length;++t)n[t]=Math.round(e[t]);return n}throw new Error("Unknown dtype "+t)}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */(t,r)),n.values}acquireTexture(e,t,n,r){if(this.numBytesInGPU+=this.computeBytes(e,n),!this.warnedAboutMemory&&this.numBytesInGPU>1024*this.numMBBeforeWarning*1024){const e=(this.numBytesInGPU/1024/1024).toFixed(2);this.warnedAboutMemory=!0,console.warn(`High memory usage in GPU: ${e} MB, most likely due to a memory leak`)}return this.textureManager.acquireTexture(e,t,r)}computeBytes(e,t){return e[0]*e[1]*o.ae.bytesPerElement(t)}}Ln.nextDataId=0,
+/**
+ * @license
+ * Copyright 2020 Google Inc. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+o.vd.isBrowser()&&Object(o.Jd)("webgl",()=>new Ln,2);class Bn{constructor(e,t,n){this.variableNames=["A","B"],this.outputShape=o.md.assertAndGetBroadcastShape(t,n),this.enableShapeUniforms=ce(this.outputShape.length),this.userCode=`\n      float binaryOperation(float a, float b) {\n        ${e}\n      }\n\n      void main() {\n        float a = getAAtOutCoords();\n        float b = getBAtOutCoords();\n        setOutput(binaryOperation(a, b));\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class zn{constructor(e,t,n,r=!1){this.variableNames=["A","B"],this.supportsBroadcasting=!0,this.packedInputs=!0,this.packedOutput=!0,this.outputShape=o.md.assertAndGetBroadcastShape(t,n);const a=this.outputShape.length;this.enableShapeUniforms=ce(a);let i="";if(r)if(0===a||1===o.ae.sizeFromShape(this.outputShape))i="\n          result.y = 0.;\n          result.z = 0.;\n          result.w = 0.;\n        ";else{if(i=`\n          ${oe(a)} coords = getOutputCoords();\n        `,1===a)this.enableShapeUniforms?i+="\n            result.y = (coords + 1) >= outShape ? 0. : result.y;\n            result.z = 0.;\n            result.w = 0.;\n          ":i+=`\n            result.y = (coords + 1) >= ${this.outputShape[0]} ? 0. : result.y;\n            result.z = 0.;\n            result.w = 0.;\n          `;else{const e=Sn("coords",a);this.enableShapeUniforms?i+=`\n            bool nextRowOutOfBounds =\n              (${e[a-2]} + 1) >= outShape[${a} - 2];\n            bool nextColOutOfBounds =\n              (${e[a-1]} + 1) >= outShape[${a} - 1];\n            result.y = nextColOutOfBounds ? 0. : result.y;\n            result.z = nextRowOutOfBounds ? 0. : result.z;\n            result.w = nextColOutOfBounds || nextRowOutOfBounds ? 0. : result.w;\n          `:i+=`\n            bool nextRowOutOfBounds =\n              (${e[a-2]} + 1) >= ${this.outputShape[a-2]};\n            bool nextColOutOfBounds =\n              (${e[a-1]} + 1) >= ${this.outputShape[a-1]};\n            result.y = nextColOutOfBounds ? 0. : result.y;\n            result.z = nextRowOutOfBounds ? 0. : result.z;\n            result.w = nextColOutOfBounds || nextRowOutOfBounds ? 0. : result.w;\n          `}}this.userCode=`\n      vec4 binaryOperation(vec4 a, vec4 b) {\n        ${e}\n      }\n\n      void main() {\n        vec4 a = getAAtOutCoords();\n        vec4 b = getBAtOutCoords();\n\n        vec4 result = binaryOperation(a, b);\n        ${i}\n\n        setOutput(result);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Un(e){const{inputs:t,backend:n}=e,{x:r}=t;return n.incRef(r.dataId),{dataId:r.dataId,shape:r.shape,dtype:r.dtype}}const Vn={kernelName:o.qb,backendName:"webgl",kernelFunc:Un};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Wn(e){const{inputs:t,backend:n}=e,{real:r,imag:o}=t,a=n.makeTensorInfo(r.shape,"complex64"),i=n.texData.get(a.dataId),s=Un({inputs:{x:r},backend:n}),u=Un({inputs:{x:o},backend:n});return i.complexTensorInfos={real:s,imag:u},a}const Gn={kernelName:o.z,backendName:"webgl",kernelFunc:Wn},Hn="return (a < 0.) ? b * a : a;",qn="\n  vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));\n  return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);\n";
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Kn={kernelName:o.yb,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{alpha:i}=r,s=n.makeTensorInfo([],"float32",o.ae.createScalarValue(i,"float32")),u=Object(o.zd)().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new zn(qn,a.shape,s.shape):new Bn(Hn,a.shape,s.shape),c=n.runWebGLProgram(u,[a,s],"float32");return n.disposeIntermediateTensorInfo(s),c}},Xn="return (a < 0.) ? b * a : a;",Yn="\n  vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));\n  return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);\n";
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Qn={kernelName:o.fc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{x:r,alpha:a}=t,i=Object(o.zd)().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new zn(Yn,r.shape,a.shape):new Bn(Xn,r.shape,a.shape);return n.runWebGLProgram(i,[r,a],"float32")}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Zn({opSnippet:e,packedOpSnippet:t,cpuKernelImpl:n,dtype:r}){return({inputs:a,backend:i})=>{const{x:s}=a,u=i,c=r||s.dtype;if(u.shouldExecuteOnCPU([s])&&null!=n){const e=u.texData.get(s.dataId),t=n(e.values,c);return u.makeTensorInfo(s.shape,c,t)}let l;return l=Object(o.zd)().getBool("WEBGL_PACK_UNARY_OPERATIONS")&&null!=t?new $n(s.shape,t):new An(s.shape,e),u.runWebGLProgram(l,[s],c)}}function Jn({opSnippet:e,packedOpSnippet:t,checkOutOfBounds:n=!1,supportsComplex:r=!1,cpuKernelImpl:a,dtype:i}){return({inputs:s,backend:u})=>{const{a:c,b:l}=s,d=u;if(r&&"complex64"===c.dtype){const t=d.texData.get(c.dataId),n=d.texData.get(l.dataId),[r,a]=[[t.complexTensorInfos.real,n.complexTensorInfos.real],[t.complexTensorInfos.imag,n.complexTensorInfos.imag]].map(t=>{const[n,r]=t,a={dataId:n.dataId,dtype:n.dtype,shape:c.shape},i={dataId:r.dataId,dtype:r.dtype,shape:l.shape},s=new Bn(e,c.shape,l.shape);return d.runWebGLProgram(s,[a,i],Object(o.Zd)(n.dtype,r.dtype))}),i=Wn({inputs:{real:r,imag:a},backend:d});return d.disposeIntermediateTensorInfo(r),d.disposeIntermediateTensorInfo(a),i}const p=i||Object(o.Zd)(c.dtype,l.dtype);if(("string"===c.dtype||"string"===l.dtype||d.shouldExecuteOnCPU([c,l]))&&null!=a){const e=d.texData.get(c.dataId).values,t=d.texData.get(l.dataId).values,n="string"===c.dtype?o.md.fromUint8ToStringArray(e):e,r="string"===c.dtype?o.md.fromUint8ToStringArray(t):t,[i,s]=a(c.shape,l.shape,n,r,p),u=d.makeTensorInfo(s,p);return d.texData.get(u.dataId).values=i,u}let h;return h=Object(o.zd)().getBool("WEBGL_PACK_BINARY_OPERATIONS")&&null!=t?new zn(t,c.shape,l.shape,n):new Bn(e,c.shape,l.shape),d.runWebGLProgram(h,[c,l],p)}}function er(e,t=!1){if("linear"===e)return"return x;";if("relu"===e)return t?"\n  vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0)));\n  bvec4 isNaN = isnan(x);\n\n  result.r = isNaN.r ? x.r : result.r;\n  result.g = isNaN.g ? x.g : result.g;\n  result.b = isNaN.b ? x.b : result.b;\n  result.a = isNaN.a ? x.a : result.a;\n\n  return result;\n":"if (isnan(x)) return x;\n  return (x < 0.0) ? 0.0 : x;\n";if("elu"===e)return t?"\n  vec4 result;\n\n  result.r = (x.r >= 0.0) ? x.r : (exp(x.r) - 1.0);\n  result.g = (x.g >= 0.0) ? x.g : (exp(x.g) - 1.0);\n  result.b = (x.b >= 0.0) ? x.b : (exp(x.b) - 1.0);\n  result.a = (x.a >= 0.0) ? x.a : (exp(x.a) - 1.0);\n\n  return result;\n":"return (x >= 0.0) ? x : (exp(x) - 1.0);";if("relu6"===e)return t?"\n  vec4 result = min(x, vec4(6.)) * vec4(greaterThanEqual(x, vec4(0.0)));\n  bvec4 isNaN = isnan(x);\n\n  result.r = isNaN.r ? x.r : result.r;\n  result.g = isNaN.g ? x.g : result.g;\n  result.b = isNaN.b ? x.b : result.b;\n  result.a = isNaN.a ? x.a : result.a;\n\n  return result;\n":"if (isnan(x)) return x;\n  return (x < 0.0) ? 0.0 : min(6.0, x);\n";if("prelu"===e)return t?Yn:Xn;if("leakyrelu"===e)return t?qn:Hn;if("sigmoid"===e)return"return 1.0 / (1.0 + exp(-1.0 * x));";throw new Error(`Activation ${e} has not been implemented for the WebGL backend.`)}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class tr{constructor(e,t,n,r=!1,o=!1,a=!1,i=null,s=!1,u=!1){this.variableNames=["matrixA","matrixB"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n,this.enableShapeUniforms=ce(this.outputShape.length);const c=r?e[1]:e[2],l=Math.ceil(c/2),d=r?"i * 2, rc.y":"rc.y, i * 2",p=o?"rc.z, i * 2":"i * 2, rc.z",h=r?["a.xxyy","a.zzww"]:["a.xxzz","a.yyww"],f=o?["b.xzxz","b.ywyw"]:["b.xyxy","b.zwzw"];let m="",g="";i&&(m=s?`vec4 activation(vec4 a) {\n          vec4 b = getPreluActivationWeightsAtOutCoords();\n          ${i}\n        }`:u?`vec4 activation(vec4 a) {\n          vec4 b = getLeakyreluAlphaAtOutCoords();\n          ${i}\n        }`:`vec4 activation(vec4 x) {\n          ${i}\n        }`,g="result = activation(result);");const b=a?"result += getBiasAtOutCoords();":"";a&&this.variableNames.push("bias"),s&&this.variableNames.push("preluActivationWeights"),u&&this.variableNames.push("leakyreluAlpha");let y="rc.x",v="rc.x";e[0]<t[0]?y=`int(min(float(rc.x), ${e[0]-1}.))`:t[0]<e[0]&&(v=`int(min(float(rc.x), ${t[0]-1}.))`),this.userCode=`\n      ${m}\n      // Don't use uniform for sharedDimensionPacked for performance.\n      const float sharedDimension = ${l}.0;\n\n      vec4 dot2x2ARowBCol(ivec3 rc) {\n        vec4 result = vec4(0);\n        for (int i = 0; i < ${l}; i++) {\n          int batchA = ${y};\n          int batchB = ${v};\n          vec4 a = getMatrixA(batchA, ${d});\n          vec4 b = getMatrixB(batchB, ${p});\n\n          // These swizzled products need to be separately added.\n          // See: https://github.com/tensorflow/tfjs/issues/1735\n          result += (${h[0]} * ${f[0]});\n          result += (${h[1]} * ${f[1]});\n        }\n        return result;\n      }\n\n      void main() {\n        ivec3 rc = getOutputCoords();\n        vec4 result = dot2x2ARowBCol(rc);\n\n        ${b}\n\n        ${g}\n\n        setOutput(result);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const nr="return areal * breal - aimag * bimag;",rr="return areal * bimag + aimag * breal;";class or{constructor(e,t,n){this.variableNames=["AReal","AImag","BReal","BImag"],this.outputShape=o.md.assertAndGetBroadcastShape(t,n),this.userCode=`\n      float binaryOpComplex(\n          float areal, float aimag, float breal, float bimag) {\n        ${e}\n      }\n\n      void main() {\n        float areal = getARealAtOutCoords();\n        float aimag = getAImagAtOutCoords();\n        float breal = getBRealAtOutCoords();\n        float bimag = getBImagAtOutCoords();\n        setOutput(binaryOpComplex(areal, aimag, breal, bimag));\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ar="return a * b;";function ir(e){const{inputs:t,backend:n}=e,{a:r,b:a}=t,i=o.md.upcastType(r.dtype,a.dtype);if("complex64"===r.dtype){const e=n.texData.get(r.dataId),t=n.texData.get(a.dataId),o=new or(nr,r.shape,a.shape),i=new or(rr,r.shape,a.shape),s=[{dataId:e.complexTensorInfos.real.dataId,dtype:e.complexTensorInfos.real.dtype,shape:r.shape},{dataId:e.complexTensorInfos.imag.dataId,dtype:e.complexTensorInfos.imag.dtype,shape:r.shape},{dataId:t.complexTensorInfos.real.dataId,dtype:t.complexTensorInfos.real.dtype,shape:a.shape},{dataId:t.complexTensorInfos.imag.dataId,dtype:t.complexTensorInfos.imag.dtype,shape:a.shape}],u=n.runWebGLProgram(o,s,"float32"),c=n.runWebGLProgram(i,s,"float32"),l=Wn({inputs:{real:u,imag:c},backend:n});return n.disposeIntermediateTensorInfo(u),n.disposeIntermediateTensorInfo(c),l}if(n.shouldExecuteOnCPU([r,a])){const e=n.texData.get(r.dataId),t=n.texData.get(a.dataId),[o,s]=en(r.shape,a.shape,e.values,t.values,i),u=n.makeTensorInfo(s,i);return n.texData.get(u.dataId).values=o,u}let s;return s=Object(o.zd)().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new zn(ar,r.shape,a.shape):new Bn(ar,r.shape,a.shape),n.runWebGLProgram(s,[r,a],i)}const sr={kernelName:o.Ub,backendName:"webgl",kernelFunc:ir};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function ur(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{shape:i}=r,s=n,u=o.ae.sizeFromShape(a.shape),c=o.ae.inferFromImplicitShape(i,u),l=o.ae.sizeFromShape(c);o.ae.assert(u===l,()=>`The new shape (${c}) has ${l} elements and the old shape (${a.shape}) has ${u} elements. The new shape and old shape must have the same number of elements.`);const d=s.texData.get(a.dataId);return!d.isPacked||R(a.shape,c)||null!==d.texture&&R(d.shape,c)?(s.incRef(a.dataId),{dataId:a.dataId,shape:c,dtype:a.dtype}):function(e,t,n){const r=[I(e.shape),...j(e.shape)],o={dtype:e.dtype,shape:r,dataId:e.dataId},a=[I(t),...j(t)],i=new Cn(a,r),s=[r],u=n.runWebGLProgram(i,[o],e.dtype,s,!0);return{dataId:u.dataId,shape:t,dtype:u.dtype}}(a,c,s)}const cr={kernelName:o.nc,backendName:"webgl",kernelFunc:ur};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class lr{constructor(e,t){this.variableNames=["x"];const{windowSize:n,batchSize:r,inSize:a,outSize:i}=e;this.outputShape=[r,i];const s=4*Math.floor(n/4),u=n%4;let c="sumValue += dot(values, ones);";if(null!=t){const e=1/t;c=`sumValue += dot(values * ${o.ae.isInt(e)?e.toPrecision(2):e}, ones);`}let l="";a%n>0&&(l=`\n        if (inIdx < 0 || inIdx >= ${a}) {\n          return 0.0;\n        }\n      `),this.userCode=`\n      const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n      float getValue(int batch, int inIdx) {\n        ${l}\n        return getX(batch, inIdx);\n      }\n\n      void main() {\n        ivec2 coords = getOutputCoords();\n        int batch = coords[0];\n        int outIdx = coords[1];\n        int inOffset = outIdx * ${n};\n\n        float sumValue = 0.0;\n\n        for (int i = 0; i < ${s}; i += 4) {\n          int inIdx = inOffset + i;\n          vec4 values = vec4(\n            getValue(batch, inIdx),\n            getValue(batch, inIdx + 1),\n            getValue(batch, inIdx + 2),\n            getValue(batch, inIdx + 3)\n          );\n\n          ${c}\n        }\n\n        int inIdx = inOffset + ${s};\n        if (${1===u}) {\n          vec4 values = vec4(getValue(batch, inIdx), 0.0, 0.0, 0.0);\n\n          ${c}\n        } else if (${2===u}) {\n          vec4 values = vec4(\n            getValue(batch, inIdx),\n            getValue(batch, inIdx + 1), 0.0, 0.0);\n\n          ${c}\n        } else if (${3===u}) {\n          vec4 values = vec4(\n            getValue(batch, inIdx),\n            getValue(batch, inIdx + 1),\n            getValue(batch, inIdx + 2), 0.0);\n\n          ${c}\n        }\n        setOutput(sumValue);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class dr{constructor(e,t){this.variableNames=["x"];const{windowSize:n,batchSize:r,inSize:o,outSize:a}=e;this.outputShape=[r,a];let i="0.0",s="";"prod"===t?i="1.0":"min"===t?(i="1.0 / 1e-20",s="min"):"max"===t&&(i="-1.0 / 1e-20",s="max");let u=`${t}(${t}(${t}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;"sum"===t?u="sumValue":"prod"===t?u="prodValue":"all"===t?u="allValue":"any"===t&&(u="anyValue");const c=4*Math.floor(n/4),l=n%4;let d=`\n      if (${"sum"===t}) {\n        sumValue += dot(values, ones);\n      } else if (${"prod"===t}) {\n        vec2 tmp = vec2(values[0], values[1]) * vec2(values[2], values[3]);\n        prodValue *= tmp[0] * tmp[1];\n      } else {\n        minMaxValue = ${s}(values, minMaxValue);\n        if (${"min"===t} || ${"max"===t}) {\n          minMaxValue = ${s}(values, minMaxValue);\n          bvec4 isNaN = isnan(values);\n          if (isNaN.r || isNaN.g || isNaN.b || isNaN.a) {\n            minMaxValue = vec4(NAN);\n          }\n        }\n      }\n    `,p="vec4";"all"===t?(i="1.0",d="\n        bool reducedAllValue = all(values);\n        float floatedReducedAllValue = float(reducedAllValue);\n        allValue = float(allValue >= 1.0 && floatedReducedAllValue >= 1.0);\n      ",p="bvec4"):"any"===t&&(i="0.0",d="\n        bool reducedAnyValue = any(values);\n        float floatedReducedAnyValue = float(reducedAnyValue);\n        anyValue = float(anyValue >= 1.0 || floatedReducedAnyValue >= 1.0);\n      ",p="bvec4");let h="";o%n>0&&(h=`\n        if (inIdx < 0 || inIdx >= ${o}) {\n          return initializationValue;\n        }\n      `),this.userCode=`\n      const float initializationValue = ${i};\n      const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n      float getValue(int batch, int inIdx) {\n        ${h}\n        return getX(batch, inIdx);\n      }\n\n      void main() {\n        ivec2 coords = getOutputCoords();\n        int batch = coords[0];\n        int outIdx = coords[1];\n        int inOffset = outIdx * ${n};\n\n        vec4 minMaxValue = vec4(${i});\n        float prodValue = 1.0;\n        float sumValue = 0.0;\n        float allValue = 1.0;\n        float anyValue = 0.0;\n\n        for (int i = 0; i < ${c}; i += 4) {\n          int inIdx = inOffset + i;\n          ${p} values = ${p}(\n            getValue(batch, inIdx),\n            getValue(batch, inIdx + 1),\n            getValue(batch, inIdx + 2),\n            getValue(batch, inIdx + 3)\n          );\n\n          ${d}\n        }\n\n        int inIdx = inOffset + ${c};\n        if (${1===l}) {\n          ${p} values = ${p}(\n            getValue(batch, inIdx),\n            initializationValue,\n            initializationValue,\n            initializationValue\n          );\n\n          ${d}\n        } else if (${2===l}) {\n          ${p} values = ${p}(\n            getValue(batch, inIdx),\n            getValue(batch, inIdx + 1),\n            initializationValue,\n            initializationValue\n          );\n\n          ${d}\n        } else if (${3===l}) {\n          ${p} values = ${p}(\n            getValue(batch, inIdx),\n            getValue(batch, inIdx + 1),\n            getValue(batch, inIdx + 2),\n            initializationValue\n          );\n\n          ${d}\n        }\n        setOutput(${u});\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function pr(e,t,n,r){const a=function(e){const t=[];for(;0===t.length||1!==t[t.length-1].outSize;){const n=t.length?t[t.length-1].outSize:e[1],r=o.md.computeOptimalWindowSize(n);t.push({inSize:n,windowSize:r,outSize:Math.ceil(n/r)})}return t}(e.shape);let i=e;for(let o=0;o<a.length;o++){const{inSize:s,windowSize:u,outSize:c}=a[o];let l,d;l="mean"===n?0===o?new lr({windowSize:u,inSize:s,batchSize:e.shape[0],outSize:c},s):new lr({windowSize:u,inSize:s,batchSize:e.shape[0],outSize:c}):new dr({windowSize:u,inSize:s,batchSize:e.shape[0],outSize:c},n),d=i,i=r.runWebGLProgram(l,[i],t),d.dataId!==e.dataId&&r.disposeIntermediateTensorInfo(d)}return i}
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class hr{constructor(e,t){this.variableNames=["A"];const n=new Array(e.length);for(let r=0;r<n.length;r++)n[r]=e[t[r]];this.outputShape=n,this.rank=n.length;const r=oe(this.rank),o=function(e){const t=e.length;if(t>6)throw Error(`Transpose for rank ${t} is not yet supported`);const n=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u","resRC.v"],r=new Array(t);for(let t=0;t<e.length;t++)r[e[t]]=n[t];return r.join()}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */(t);this.userCode=`\n    void main() {\n      ${r} resRC = getOutputCoords();\n      setOutput(getA(${o}));\n    }\n    `}}class fr{constructor(e,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0;const n=new Array(e.length);for(let r=0;r<n.length;r++)n[r]=e[t[r]];if(this.outputShape=n,this.rank=n.length,this.rank>6)throw Error(`Packed transpose for rank ${this.rank} is not yet supported.`);const r=oe(this.rank),o=kn("rc",this.rank),a=new Array(this.rank);for(let e=0;e<t.length;e++)a[t[e]]=o[e];const i=`vec2(${a.slice(-2).join()})`,s=`++${o[this.rank-1]} < ${n[this.rank-1]}`,u=`getChannel(getA(${a.join()}), ${i})`;this.userCode=`\n    void main() {\n      ${r} rc = getOutputCoords();\n      vec4 result = vec4(0.);\n      result[0] = ${u};\n      if(${s}) {\n        result[1] = ${u};\n      }\n      --${o[this.rank-1]};\n      if(++${o[this.rank-2]} < ${n[this.rank-2]}) {\n        result[2] = ${u};\n        if(${s}) {\n          result[3] = ${u};\n        }\n      }\n      setOutput(result);\n    }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function mr(e,t,n){const r=Object(o.zd)().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new fr(e.shape,t):new hr(e.shape,t);return n.runWebGLProgram(r,[e],e.dtype)}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function gr(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{axis:i,keepDims:s}=r;return function(e,t,n,r){const a=t,i=e.shape.length,s=o.ae.parseAxisParam(a,e.shape);let u=s;const c=o.md.getAxesPermutation(u,i),l=null!=c;let d=e;l&&(d=mr(e,c,r),u=o.md.getInnerMostAxes(u.length,i)),o.md.assertAxesAreInnerMostDims("sum",u,i);const[p,h]=o.md.computeOutAndReduceShapes(d.shape,u);let f=p;n&&(f=o.md.expandShapeToKeepDim(p,s));const m=o.ae.sizeFromShape(h),g=ur({inputs:{x:d},attrs:{shape:[o.ae.sizeFromShape(e.shape)/m,m]},backend:r}),b=pr(g,Object(o.Td)(e.dtype),"sum",r),y=ur({inputs:{x:b},attrs:{shape:f},backend:r});return r.disposeIntermediateTensorInfo(g),r.disposeIntermediateTensorInfo(b),l&&r.disposeIntermediateTensorInfo(d),y}(a,i,s,n)}const br={kernelName:o.Wc,backendName:"webgl",kernelFunc:gr};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function yr(e){const{inputs:t,backend:n,attrs:r}=e,{x:o}=t,{perm:a}=r,i=n,s=o.shape.length,u=new Array(s);for(let e=0;e<u.length;e++)u[e]=o.shape[a[e]];let c;if(i.shouldExecuteOnCPU([o])){const e=i.texData.get(o.dataId).values,t=wn(e,o.shape,o.dtype,a,u);c=i.makeTensorInfo(u,o.dtype);i.texData.get(c.dataId).values=t}else c=mr(o,a,i);return c}const vr={kernelName:o.ed,backendName:"webgl",kernelFunc:yr};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function xr({a:e,b:t,transposeA:n,transposeB:r,backend:a,bias:i=null,preluActivationWeights:s=null,leakyreluAlpha:u=0,activation:c=null}){const l=e.shape.length,d=t.shape.length,p=n?e.shape[l-2]:e.shape[l-1],h=r?t.shape[d-1]:t.shape[d-2],f=n?e.shape[l-1]:e.shape[l-2],m=r?t.shape[d-2]:t.shape[d-1],g=e.shape.slice(0,-2),b=t.shape.slice(0,-2),y=o.ae.sizeFromShape(g),v=o.ae.sizeFromShape(b),x=o.nd.assertAndGetBroadcastShape(e.shape.slice(0,-2),t.shape.slice(0,-2)).concat([f,m]);o.ae.assert(p===h,()=>`Error in matMul: inner shapes (${p}) and (${h}) of Tensors with shapes ${e.shape} and ${t.shape} and transposeA=${n} and transposeB=${r} must match.`);const w=n?[y,p,f]:[y,f,p],O=r?[v,m,h]:[v,h,m],k=ur({inputs:{x:e},backend:a,attrs:{shape:w}}),S=ur({inputs:{x:t},backend:a,attrs:{shape:O}}),T=[k,S],C=Math.max(y,v),E=n?k.shape[1]:k.shape[2],I=null!=i,j=null!=s,N="leakyrelu"===c,A=null!=c?er(c,!0):null;let R;if((1===f||1===m)&&E>1e3&&!1===(I||j||N||null!=A)){let e=k,t=S;n&&(e=yr({inputs:{x:k},backend:a,attrs:{perm:[0,2,1]}}),T.push(e)),r&&(t=yr({inputs:{x:S},backend:a,attrs:{perm:[0,2,1]}}),T.push(t));const o=1===m;let i=e;1!==m&&(i=ur({inputs:{x:e},backend:a,attrs:{shape:[C,E,1]}}),T.push(i));const s=1===m?2:1;let u=t;o&&(u=ur({inputs:{x:t},backend:a,attrs:{shape:[C,1,E]}}),T.push(u));const c=ir({inputs:{a:i,b:u},backend:a});R=gr({inputs:{x:c},backend:a,attrs:{axis:s,keepDims:!0}}),T.push(c)}else{const c=Object(o.Zd)(e.dtype,t.dtype),l=new tr(w,O,[C,f,m],n,r,I,A,j,N),d=[k,S];if(null!=i&&d.push(i),j&&d.push(s),N){const e=a.makeTensorInfo([],"float32",o.ae.createScalarValue(u,"float32"));d.push(e),T.push(e)}R=a.runWebGLProgram(l,d,c)}const _=ur({inputs:{x:R},backend:a,attrs:{shape:x}});T.push(R);for(const e of T)a.disposeIntermediateTensorInfo(e);return _}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const wr={kernelName:o.jd,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{a:o,b:a,bias:i,preluActivationWeights:s}=t,{transposeA:u,transposeB:c,activation:l,leakyreluAlpha:d}=r;return xr({a:o,b:a,transposeA:u,transposeB:c,backend:n,bias:i,preluActivationWeights:s,leakyreluAlpha:d,activation:l})}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Or={kernelName:o.a,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{x:r}=t;if(n.shouldExecuteOnCPU([r])&&"complex64"!==r.dtype){const e=n.texData.get(r.dataId),t=un(e.values);return n.makeTensorInfo(r.shape,r.dtype,t)}let a;return a=Object(o.zd)().getBool("WEBGL_PACK_UNARY_OPERATIONS")?new $n(r.shape,"return abs(x);"):new An(r.shape,"return abs(x);"),n.runWebGLProgram(a,[r],r.dtype)}},kr=Zn({opSnippet:"if (isnan(x)) return x;\n  if (abs(x) > 1.) {\n    return NAN;\n  }\n  return acos(x);\n"}),Sr={kernelName:o.b,backendName:"webgl",kernelFunc:kr},Tr=Zn({opSnippet:"if (isnan(x)) return x;\n  if (x < 1.0) return NAN;\nreturn log(x + sqrt(x * x - 1.0));"}),Cr={kernelName:o.c,backendName:"webgl",kernelFunc:Tr},Er="return a + b;",Ir=Jn({opSnippet:Er,packedOpSnippet:Er,supportsComplex:!0,cpuKernelImpl:$t}),jr={kernelName:o.d,backendName:"webgl",kernelFunc:Ir};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class Nr{constructor(e,t){this.outputShape=[],this.outputShape=e,this.variableNames=t.map((e,t)=>"T"+t);const n=[];this.variableNames.forEach(e=>{n.push(`float v${e} = get${e}AtOutCoords();`)});const r=this.variableNames.map(e=>"v"+e).join(" + ");this.userCode=`\n      void main() {\n        ${n.join("\n        ")}\n\n        float result = ${r};\n        setOutput(result);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Ar{constructor(e,t){this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.variableNames=t.map((e,t)=>"T"+t);const n=[];this.variableNames.forEach(e=>{n.push(`vec4 v${e} = get${e}AtOutCoords();`)});const r=this.variableNames.map(e=>"v"+e).join(" + ");this.userCode=`\n      void main() {\n        ${n.join("\n        ")}\n\n        vec4 result = ${r};\n        setOutput(result);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Rr={kernelName:o.e,backendName:"webgl",kernelFunc:function e(t){const{inputs:n,backend:r}=t,a=n;if(1===a.length)return Un({inputs:{x:a[0]},backend:r});if(a.length>Object(o.zd)().get("WEBGL_MAX_TEXTURES_IN_SHADER")){const t=Math.floor(a.length/2),n=e({inputs:a.slice(0,t),backend:r}),o=e({inputs:a.slice(t),backend:r});return e({inputs:[n,o],backend:r})}const i=a.map(e=>e.dtype).reduce((e,t)=>Object(o.Zd)(e,t)),s=a.map(e=>e.shape),u=Object(o.zd)().getBool("WEBGL_PACK")?new Ar(a[0].shape,s):new Nr(a[0].shape,s);return r.runWebGLProgram(u,a,i)}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const _r={kernelName:o.f,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{axis:i,keepDims:s}=r,u=a.shape.length,c=o.ae.parseAxisParam(i,a.shape);let l=c;const d=o.md.getAxesPermutation(l,u);let p=a;null!=d&&(p=yr({inputs:{x:a},backend:n,attrs:{perm:d}}),l=o.md.getInnerMostAxes(l.length,u)),o.md.assertAxesAreInnerMostDims("all",l,u);const[h,f]=o.md.computeOutAndReduceShapes(p.shape,l),m=ur({inputs:{x:p},backend:n,attrs:{shape:[-1,o.ae.sizeFromShape(f)]}}),g=pr(m,m.dtype,"all",n);let b;if(s){b=ur({inputs:{x:g},backend:n,attrs:{shape:o.md.expandShapeToKeepDim(h,c)}})}else b=ur({inputs:{x:g},backend:n,attrs:{shape:h}});return n.disposeIntermediateTensorInfo(m),n.disposeIntermediateTensorInfo(g),null!=d&&n.disposeIntermediateTensorInfo(p),b}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const $r={kernelName:o.g,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{axis:i,keepDims:s}=r,u=a.shape.length,c=o.ae.parseAxisParam(i,a.shape);let l=c;const d=o.md.getAxesPermutation(l,u);let p=a;null!=d&&(p=yr({inputs:{x:a},backend:n,attrs:{perm:d}}),l=o.md.getInnerMostAxes(l.length,u)),o.md.assertAxesAreInnerMostDims("any",l,u);const[h,f]=o.md.computeOutAndReduceShapes(p.shape,l),m=ur({inputs:{x:p},backend:n,attrs:{shape:[-1,o.ae.sizeFromShape(f)]}}),g=pr(m,m.dtype,"any",n);let b;if(s){b=ur({inputs:{x:g},backend:n,attrs:{shape:o.md.expandShapeToKeepDim(h,c)}})}else b=ur({inputs:{x:g},backend:n,attrs:{shape:h}});return n.disposeIntermediateTensorInfo(m),n.disposeIntermediateTensorInfo(g),null!=d&&n.disposeIntermediateTensorInfo(p),b}};
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Fr{constructor(e,t,n){this.variableNames=["A"];const{windowSize:r,batchSize:o,outSize:a}=e;n||this.variableNames.push("bestIndicesA"),this.outputShape=[o,a];const i="max"===t?">":"<",s=n?"inOffset + i;":"round(getBestIndicesA(batch, inOffset + i));";this.userCode=`\n      void main() {\n        ivec2 coords = getOutputCoords();\n        int batch = coords[0];\n        int outIdx = coords[1];\n        int inOffset = outIdx * ${r};\n\n        int bestIndex = inOffset;\n        float bestValue = getA(batch, bestIndex);\n\n        for (int i = 0; i < ${r}; i++) {\n          int inIdx = ${s};\n          float candidate = getA(batch, inIdx);\n          if (candidate ${i} bestValue) {\n            bestValue = candidate;\n            bestIndex = inIdx;\n          }\n        }\n        setOutput(float(bestIndex));\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Dr{constructor(e,t,n,r){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,o.ae.assert(e.length>2,()=>`Packed arg${n.charAt(0).toUpperCase()+n.slice(1)} supports only inputs with rank above 2.`);const a=e[e.length-1],i=Math.ceil(a/t);this.outputShape=e.slice(0,-1),i>1&&this.outputShape.push(i),r||this.variableNames.push("bestIndicesA");const s=this.outputShape,u=s.length,c=oe(u),l=Sn("coords",u);let d,p;if(1===i){p=u+1;const e=oe(p);d=`\n        ${e} sourceLocR = ${e}(${l.join()}, 0);\n        ++${l[u-1]};\n        ${e} sourceLocG = ${e}(${l.join()}, 0);\n        ++${l[u-2]};\n        ${e} sourceLocA = ${e}(${l.join()}, 0);\n        --${l[u-1]};\n        ${e} sourceLocB = ${e}(${l.join()}, 0);\n        --${l[u-2]};`}else p=u,d=`\n        ${c} sourceLocR = coords;\n        ++${l[u-1]};\n        ${c} sourceLocG = coords;\n        ++${l[u-2]};\n        ${c} sourceLocA = coords;\n        --${l[u-1]};\n        ${c} sourceLocB = coords;\n        --${l[u-2]};`;const h=["x","y","z","w","u","v"].slice(0,p),f="."+h[p-1],m=h.map(e=>"int "+e),g=Sn("sourceLocR",p-1).concat("inIdx.r"),b=Sn("sourceLocG",p-1).concat("inIdx.g"),y=Sn("sourceLocB",p-1).concat("inIdx.b"),v=Sn("sourceLocA",p-1).concat("inIdx.a"),x="max"===n?"greaterThan":"lessThan",w=r?"":`\n          inIdx = round(vec4(getBestIndicesAChannel(${g.join()}),\n                             getBestIndicesAChannel(${b.join()}),\n                             getBestIndicesAChannel(${y.join()}),\n                             getBestIndicesAChannel(${v.join()})));`,O=`vec4(\n            getAChannel(${g.join()}),\n            hasNextCol ? getAChannel(${b.join()}) : 0.,\n            hasNextRow ? getAChannel(${y.join()}) : 0.,\n            hasNextRow && hasNextCol ? getAChannel(${v.join()}) : 0.)`,k=r?"":`\n      float getBestIndicesAChannel(${m.join()}) {\n        return getChannel(getBestIndicesA(${h.join()}),\n                                          vec2(${h.slice(-2).join()}));\n      }`;this.userCode=`\n      float getAChannel(${m.join()}) {\n        return getChannel(getA(${h.join()}),\n                               vec2(${h.slice(-2).join()}));\n      }\n      ${k}\n      void main() {\n        ${c} coords = getOutputCoords();\n        bool hasNextCol = ${l[u-1]} < ${s[u-1]-1};\n        bool hasNextRow = ${l[u-2]} < ${s[u-2]-1};\n        ${d}\n        ivec4 srcIdx = ivec4(sourceLocR${f}, sourceLocG${f},\n          sourceLocB${f}, sourceLocA${f}) * ${t};\n        ivec4 inIdx = srcIdx;\n        vec4 bestIndex = vec4(inIdx);\n        vec4 bestValue = ${O};\n\n        for (int i = 0; i < ${t}; i++) {\n          inIdx = srcIdx;\n          ${w}\n          vec4 candidate = ${O};\n          bvec4 nan = isnan(candidate);\n          bvec4 replace = bvec4(\n            vec4(${x}(candidate, bestValue)) * (vec4(1.0) - vec4(nan)));\n\n          bestValue = vec4(replace.x  ? candidate.x : bestValue.x,\n                           replace.y  ? candidate.y : bestValue.y,\n                           replace.z  ? candidate.z : bestValue.z,\n                           replace.w  ? candidate.w : bestValue.w);\n          bestIndex = mix(bestIndex, vec4(inIdx), vec4(replace));\n          srcIdx++;\n        }\n        setOutput(bestIndex);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Mr(e,t,n,r){const a=[n];if(o.md.assertAxesAreInnerMostDims("arg"+r.charAt(0).toUpperCase()+r.slice(1),a,t.shape.length),!Object(o.zd)().getBool("WEBGL_PACK_REDUCE")||t.shape.length<=2){const n=[],i=e.texData.get(t.dataId);let s=t;null!==i&&i.isPacked&&(s=e.unpackTensor(t),n.push(s));const[u,c]=o.md.computeOutAndReduceShapes(s.shape,a),l=o.ae.sizeFromShape(c),d=ur({inputs:{x:s},backend:e,attrs:{shape:[-1,l]}});n.push(d);const p=function e(t,n,r,a=null){let i=n.shape[0],s=n.shape[1];null!=a&&(i=a.shape[0],s=a.shape[1]);const u=o.md.computeOptimalWindowSize(s),c={windowSize:u,inSize:s,batchSize:i,outSize:Math.ceil(s/u)},l=new Fr(c,r,null==a),d=[n];null!=a&&d.push(a);const p=t.runWebGLProgram(l,d,"int32");if(1===p.shape[1])return p;const h=e(t,n,r,p);return t.disposeIntermediateTensorInfo(p),h}(e,d,r);n.push(p);const h=ur({inputs:{x:p},backend:e,attrs:{shape:u}});return n.forEach(t=>e.disposeIntermediateTensorInfo(t)),h}return function e(t,n,r,a=null){const i=null!=a?a.shape:n.shape,s=i[i.length-1],u=o.md.computeOptimalWindowSize(s),c=new Dr(i,u,r,null==a),l=null==a?[n]:[n,a],d=t.runWebGLProgram(c,l,"int32");if(d.shape.length===n.shape.length){const o=e(t,n,r,d);return t.disposeIntermediateTensorInfo(d),o}return d}(e,t,r)}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Pr={kernelName:o.h,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{axis:i}=r;let s=o.ae.parseAxisParam(i,a.shape);const u=o.md.getAxesPermutation(s,a.shape.length);let c=a;const l=[];null!=u&&(c=yr({inputs:{x:a},backend:n,attrs:{perm:u}}),l.push(c),s=o.md.getInnerMostAxes(s.length,c.shape.length)),o.md.assertAxesAreInnerMostDims("argMax",[s[0]],c.shape.length);const d=Mr(n,c,s[0],"max");return l.forEach(e=>n.disposeIntermediateTensorInfo(e)),d}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Lr={kernelName:o.i,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{axis:i}=r;let s=o.ae.parseAxisParam(i,a.shape);const u=o.md.getAxesPermutation(s,a.shape.length);let c=a;const l=[];null!=u&&(c=yr({inputs:{x:a},backend:n,attrs:{perm:u}}),l.push(c),s=o.md.getInnerMostAxes(s.length,c.shape.length)),o.md.assertAxesAreInnerMostDims("argMin",[s[0]],c.shape.length);const d=Mr(n,c,s[0],"min");return l.forEach(e=>n.disposeIntermediateTensorInfo(e)),d}},Br=Zn({opSnippet:"if (isnan(x)) return x;\n  if (abs(x) > 1.) {\n    return NAN;\n  }\n  return asin(x);\n"}),zr={kernelName:o.j,backendName:"webgl",kernelFunc:Br},Ur=Zn({opSnippet:"if (isnan(x)) return x;return log(x + sqrt(x * x + 1.0));"}),Vr={kernelName:o.k,backendName:"webgl",kernelFunc:Ur},Wr=Zn({opSnippet:"if (isnan(x)) return x;\n  return atan(x);\n"}),Gr={kernelName:o.l,backendName:"webgl",kernelFunc:Wr},Hr=Jn({opSnippet:"\n  if (isnan(a)) return a;\n  if (isnan(b)) return b;\n\n  return atan(a, b);\n",packedOpSnippet:"\n  vec4 result = atan(a, b);\n  vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n  \n  result.r = isNaN.r > 0. ? NAN : result.r;\n  result.g = isNaN.g > 0. ? NAN : result.g;\n  result.b = isNaN.b > 0. ? NAN : result.b;\n  result.a = isNaN.a > 0. ? NAN : result.a;\n\n  return result;\n"}),qr={kernelName:o.m,backendName:"webgl",kernelFunc:Hr},Kr=Zn({opSnippet:"if (isnan(x)) return x;\n  if ((x < -1.0) || (x > 1.0)) return NAN;\nreturn (log(1.0 + x) - log(1.0 - x)) / 2.0;"}),Xr={kernelName:o.n,backendName:"webgl",kernelFunc:Kr};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class Yr{constructor(e,t,n,r=!1,o=!1){if(this.variableNames=["x"],"avg"===t&&n)throw new Error("Cannot compute positions for average pool.");const a=e.filterWidth,i=e.strideHeight,s=e.strideWidth,u=e.dilationHeight,c=e.dilationWidth,l=e.effectiveFilterHeight,d=e.effectiveFilterWidth,p=e.padInfo.top,h=e.padInfo.left;this.outputShape=e.outShape;const f="avg"===t,m=`((batch  * ${e.inHeight} + xR) * ${e.inWidth} + xC) * ${e.inChannels} + d`,g=`(xR * ${e.inWidth} + xC) * ${e.inChannels} + d`;let b="0.0";if(f||(b="-1.0 / 1e-20"),n){const t=">=";return void(this.userCode=`\n        const ivec2 strides = ivec2(${i}, ${s});\n        const ivec2 pads = ivec2(${p}, ${h});\n\n        void main() {\n          ivec4 coords = getOutputCoords();\n          int batch = coords[0];\n          int d = coords[3];\n\n          ivec2 xRCCorner = coords.yz * strides - pads;\n          int xRCorner = xRCCorner.x;\n          int xCCorner = xRCCorner.y;\n\n          // max/min x(?, ?, d) to get y(yR, yC, d).\n          // ? = to be determined\n          float minMaxValue = 0.0;\n          float minMaxValueFound = 0.0;\n          int minMaxPosition = 0;\n          float avgValue = 0.0;\n\n          for (int wR = 0; wR < ${l};\n              wR += ${u}) {\n            int xR = xRCorner + wR;\n\n            if (xR < 0 || xR >= ${e.inHeight}) {\n              continue;\n            }\n\n            for (int wC = 0; wC < ${d};\n                wC += ${c}) {\n              int xC = xCCorner + wC;\n\n              if (xC < 0 || xC >= ${e.inWidth}) {\n                continue;\n              }\n\n              float value = getX(batch, xR, xC, d);\n\n              // If a min / max value has already been found, use it. If not,\n              // use the current value.\n              float currMinMaxValue = mix(\n                  value, minMaxValue, minMaxValueFound);\n              if (value ${t} currMinMaxValue) {\n                minMaxValue = value;\n                minMaxValueFound = 1.0;\n                minMaxPosition = ${r?o?m:g:`wR * ${d} + wC`};\n              }\n            }\n          }\n          setOutput(float(minMaxPosition));\n        }\n      `)}let y=`${t}(${t}(${t}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;"avg"===t&&(y="avgValue / count");const v=4*Math.floor(a/4),x=a%4,w=`\n      if (${f}) {\n        avgValue += dot(values, ones);\n      } else {\n        minMaxValue = max(values, minMaxValue);\n      }\n    `;this.userCode=`\n      const ivec2 strides = ivec2(${i}, ${s});\n      const ivec2 pads = ivec2(${p}, ${h});\n      const float initializationValue = ${b};\n      const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n      float count = 0.0;\n\n      float getValue(int batch, int xR, int xC, int d) {\n        if (xC < 0 || xC >= ${e.inWidth}) {\n          return initializationValue;\n        }\n        count += 1.0;\n        return getX(batch, xR, xC, d);\n      }\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int batch = coords[0];\n        int d = coords[3];\n\n        ivec2 xRCCorner = coords.yz * strides - pads;\n        int xRCorner = xRCCorner.x;\n        int xCCorner = xRCCorner.y;\n\n        // max/min x(?, ?, d) to get y(yR, yC, d).\n        // ? = to be determined\n        vec4 minMaxValue = vec4(${b});\n        float avgValue = 0.0;\n        count = 0.0;\n\n        for (int wR = 0; wR < ${l};\n            wR += ${u}) {\n          int xR = xRCorner + wR;\n\n          if (xR < 0 || xR >= ${e.inHeight}) {\n            continue;\n          }\n\n          for (int wC = 0; wC < ${v}; wC += 4) {\n            int xC = xCCorner + wC * ${c};\n\n            vec4 values = vec4(\n              getValue(batch, xR, xC, d),\n              getValue(batch, xR, xC + ${c}, d),\n              getValue(batch, xR, xC + 2 * ${c}, d),\n              getValue(batch, xR, xC + 3 * ${c}, d)\n            );\n\n            ${w}\n          }\n\n          int xC = xCCorner + ${v};\n          if (${1===x}) {\n            vec4 values = vec4(\n              getValue(batch, xR, xC, d),\n              initializationValue,\n              initializationValue,\n              initializationValue\n            );\n\n            ${w}\n          } else if (${2===x}) {\n            vec4 values = vec4(\n              getValue(batch, xR, xC, d),\n              getValue(batch, xR, xC + ${c}, d),\n              initializationValue,\n              initializationValue\n            );\n\n            ${w}\n          } else if (${3===x}) {\n            vec4 values = vec4(\n              getValue(batch, xR, xC, d),\n              getValue(batch, xR, xC + ${c}, d),\n              getValue(batch, xR, xC + 2 * ${c}, d),\n              initializationValue\n            );\n\n            ${w}\n          }\n        }\n        setOutput(${y});\n      }\n    `}}class Qr{constructor(e,t,n,r=!1,o=!1){if(this.variableNames=["x"],"avg"===t&&n)throw new Error("Cannot compute positions for average pool.");const a=e.filterWidth,i=e.strideDepth,s=e.strideHeight,u=e.strideWidth,c=e.dilationDepth,l=e.dilationHeight,d=e.dilationWidth,p=e.effectiveFilterDepth,h=e.effectiveFilterHeight,f=e.effectiveFilterWidth,m=e.padInfo.front,g=e.padInfo.top,b=e.padInfo.left;this.outputShape=e.outShape;const y="avg"===t;let v="0.0";if(y||(v="-1.0 / 1e-20"),n){const t=">=";return void(this.userCode=`\n        const ivec3 strides =\n            ivec3(${i}, ${s}, ${u});\n        const ivec3 pads = ivec3(${m}, ${g}, ${b});\n\n        void main() {\n          ivec5 coords = getOutputCoords();\n          int batch = coords.x;\n          int ch = coords.u;\n\n          ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n          int xDCorner = xCorner.x;\n          int xRCorner = xCorner.y;\n          int xCCorner = xCorner.z;\n\n          // max/min x(?, ?, ?, ch) to get y(yD, yR, yC, ch).\n          // ? = to be determined\n          float minMaxValue = 0.0;\n          float minMaxValueFound = 0.0;\n          int minMaxPosition = 0;\n\n          for (int wD = 0; wD < ${p};\n              wD += ${c}) {\n            int xD = xDCorner + wD;\n\n            if (xD < 0 || xD >= ${e.inDepth}) {\n              continue;\n            }\n\n            for (int wR = 0; wR < ${h};\n                wR += ${l}) {\n              int xR = xRCorner + wR;\n\n              if (xR < 0 || xR >= ${e.inHeight}) {\n                continue;\n              }\n\n              for (int wC = 0; wC < ${f};\n                  wC += ${d}) {\n                int xC = xCCorner + wC;\n\n                if (xC < 0 || xC >= ${e.inWidth}) {\n                  continue;\n                }\n\n                float value = getX(batch, xD, xR, xC, ch);\n\n                // If a min / max value has already been found, use it. If not,\n                // use the current value.\n                float currMinMaxValue = mix(\n                    value, minMaxValue, minMaxValueFound);\n                if (value ${t} currMinMaxValue) {\n                  minMaxValue = value;\n                  minMaxValueFound = 1.0;\n                  minMaxPosition = ${r?o?`(((batch * ${e.inDepth} + xD) * ${e.inHeight} + xR) * ${e.inWidth} + xC) * ${e.inChannels} + ch`:`((xD * ${e.inHeight} + xR) * ${e.inWidth} + xC) * ${e.inChannels} + ch`:`wD * ${h} * ${f} +\n                      wR * ${f} + wC`};\n                }\n              }\n            }\n          }\n          setOutput(float(minMaxPosition));\n        }\n      `)}let x=`${t}(${t}(${t}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;"avg"===t&&(x="avgValue / count");const w=4*Math.floor(a/4),O=a%4,k=`\n      if (${y}) {\n        avgValue += dot(values, ones);\n      } else {\n        minMaxValue = max(values, minMaxValue);\n      }\n    `;this.userCode=`\n      const ivec3 strides =\n        ivec3(${i}, ${s}, ${u});\n      const ivec3 pads = ivec3(${m}, ${g}, ${b});\n      const float initializationValue = ${v};\n      const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n      float count = 0.0;\n\n      float getValue(int batch, int xD, int xR, int xC, int ch) {\n        if (xC < 0 || xC >= ${e.inWidth}) {\n          return initializationValue;\n        }\n        count += 1.0;\n        return getX(batch, xD, xR, xC, ch);\n      }\n\n      void main() {\n        ivec5 coords = getOutputCoords();\n        int batch = coords.x;\n        int ch = coords.u;\n\n        ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n        int xDCorner = xCorner.x;\n        int xRCorner = xCorner.y;\n        int xCCorner = xCorner.z;\n\n        // max/min x(?, ?, ?, d) to get y(yD, yR, yC, ch).\n        // ? = to be determined\n        vec4 minMaxValue = vec4(${v});\n        float avgValue = 0.0;\n        count = 0.0;\n\n        for (int wD = 0; wD < ${p};\n            wD += ${c}) {\n          int xD = xDCorner + wD;\n\n          if (xD < 0 || xD >= ${e.inDepth}) {\n            continue;\n          }\n\n          for (int wR = 0; wR < ${h};\n            wR += ${l}) {\n            int xR = xRCorner + wR;\n\n            if (xR < 0 || xR >= ${e.inHeight}) {\n              continue;\n            }\n\n            for (int wC = 0; wC < ${w}; wC += 4) {\n              int xC = xCCorner + wC * ${d};\n\n              vec4 values = vec4(\n                getValue(batch, xD, xR, xC, ch),\n                getValue(batch, xD, xR, xC + ${d}, ch),\n                getValue(batch, xD, xR, xC + 2 * ${d}, ch),\n                getValue(batch, xD, xR, xC + 3 * ${d}, ch)\n              );\n\n              ${k}\n            }\n\n            int xC = xCCorner + ${w};\n            if (${1===O}) {\n              vec4 values = vec4(\n                getValue(batch, xD, xR, xC, ch),\n                initializationValue,\n                initializationValue,\n                initializationValue\n              );\n\n              ${k}\n            } else if (${2===O}) {\n              vec4 values = vec4(\n                getValue(batch, xD, xR, xC, ch),\n                getValue(batch, xD, xR, xC + ${d}, ch),\n                initializationValue,\n                initializationValue\n              );\n\n              ${k}\n            } else if (${3===O}) {\n              vec4 values = vec4(\n                getValue(batch, xD, xR, xC, ch),\n                getValue(batch, xD, xR, xC + ${d}, ch),\n                getValue(batch, xD, xR, xC + 2 * ${d}, ch),\n                initializationValue\n              );\n\n              ${k}\n            }\n          }\n          setOutput(${x});\n        }\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Zr={kernelName:o.o,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t;L(a,"avgPool");const{filterSize:i,strides:s,pad:u,dimRoundingMode:c}=r;o.ae.assert(o.md.eitherStridesOrDilationsAreOne(s,1),()=>`Error in avgPool: Either strides or dilations must be 1. Got strides ${s} and dilations '1'`);const l=o.md.computePool2DInfo(a.shape,i,s,1,u,c);if(1===l.filterWidth&&1===l.filterHeight&&o.ae.arraysEqual(l.inShape,l.outShape))return Un({inputs:{x:a},backend:n});const d=new Yr(l,"avg",!1);return n.runWebGLProgram(d,[a],"float32")}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Jr={kernelName:o.p,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{filterSize:i,strides:s,pad:u,dimRoundingMode:c,dataFormat:l}=r,d=o.md.computePool3DInfo(a.shape,i,s,[1,1,1],u,c,l),p=new Qr(d,"avg",!1);return n.runWebGLProgram(p,[a],"float32")}};
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class eo{constructor(e){this.variableNames=["dy"],this.outputShape=e.inShape;const t=e.filterHeight,n=e.filterWidth,r=e.strideHeight,o=e.strideWidth,a=e.dilationHeight,i=e.dilationWidth,s=e.effectiveFilterHeight,u=e.effectiveFilterWidth,c=s-1-e.padInfo.top,l=u-1-e.padInfo.left,d=1/(t*n);this.userCode=`\n      const ivec2 pads = ivec2(${c}, ${l});\n      const float avgMultiplier = float(${d});\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int d = coords[3];\n\n        ivec2 dyRCCorner = coords.yz - pads;\n        int dyRCorner = dyRCCorner.x;\n        int dyCCorner = dyRCCorner.y;\n\n        // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n        // ? = to be determined. : = across all values in that axis.\n        float dotProd = 0.0;\n        for (int wR = 0; wR < ${s};\n            wR += ${a}) {\n          float dyR = float(dyRCorner + wR) / ${r}.0;\n\n          if (dyR < 0.0 || dyR >= ${e.outHeight}.0 || fract(dyR) > 0.0) {\n            continue;\n          }\n          int idyR = int(dyR);\n\n          for (int wC = 0; wC < ${u};\n            wC+= ${i}) {\n            float dyC = float(dyCCorner + wC) / ${o}.0;\n\n            if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n                fract(dyC) > 0.0) {\n              continue;\n            }\n            int idyC = int(dyC);\n\n            float dyValue = getDy(b, idyR, idyC, d);\n\n            dotProd += dyValue * avgMultiplier;\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}class to{constructor(e){this.variableNames=["dy"],this.outputShape=e.inShape;const t=e.filterDepth,n=e.filterHeight,r=e.filterWidth,o=e.strideDepth,a=e.strideHeight,i=e.strideWidth,s=e.dilationDepth,u=e.dilationHeight,c=e.dilationWidth,l=e.effectiveFilterDepth,d=e.effectiveFilterHeight,p=e.effectiveFilterWidth,h=l-1-e.padInfo.front,f=d-1-e.padInfo.top,m=p-1-e.padInfo.left,g=1/(t*n*r);this.userCode=`\n      const ivec3 pads = ivec3(${h}, ${f}, ${m});\n      const float avgMultiplier = float(${g});\n\n      void main() {\n        ivec5 coords = getOutputCoords();\n        int batch = coords.x;\n        int ch = coords.u;\n\n        ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n        int dyDCorner = dyCorner.x;\n        int dyRCorner = dyCorner.y;\n        int dyCCorner = dyCorner.z;\n\n        // Convolve dy(?, ?, ?, d) with pos mask(:, :, :, ch) to get\n        // dx(xD, xR, xC, ch).\n        // ? = to be determined. : = across all values in that axis.\n        float dotProd = 0.0;\n\n        for (int wD = 0; wD < ${l};\n            wD += ${s}) {\n          float dyD = float(dyDCorner + wD) / ${o}.0;\n\n          if (dyD < 0.0 || dyD >= ${e.outDepth}.0 || fract(dyD) > 0.0) {\n            continue;\n          }\n          int idyD = int(dyD);\n\n          for (int wR = 0; wR < ${d};\n              wR += ${u}) {\n            float dyR = float(dyRCorner + wR) / ${a}.0;\n\n            if (dyR < 0.0 || dyR >= ${e.outHeight}.0 ||\n                fract(dyR) > 0.0) {\n              continue;\n            }\n            int idyR = int(dyR);\n\n            for (int wC = 0; wC < ${p};\n                wC += ${c}) {\n              float dyC = float(dyCCorner + wC) / ${i}.0;\n\n              if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n                  fract(dyC) > 0.0) {\n                continue;\n              }\n              int idyC = int(dyC);\n\n              float dyValue = getDy(batch, idyD, idyR, idyC, ch);\n\n              dotProd += dyValue * avgMultiplier;\n            }\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const no={kernelName:o.q,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{dy:a,input:i}=t,s=i,{filterSize:u,strides:c,pad:l,dimRoundingMode:d}=r,p=o.md.computePool3DInfo(s.shape,u,c,[1,1,1],l,d),h=new to(p);return n.runWebGLProgram(h,[a],s.dtype)}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ro={kernelName:o.r,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{dy:a,input:i}=t,s=i;L([a,i],"avgPoolGrad");const{filterSize:u,strides:c,pad:l}=r,d=o.md.computePool2DInfo(s.shape,u,c,1,l),p=new eo(d);return n.runWebGLProgram(p,[a],s.dtype)}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const oo={kernelName:o.s,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{a:o,b:a}=t,{transposeA:i,transposeB:s}=r;return xr({a:o,b:a,transposeA:i,transposeB:s,backend:n})}};
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class ao{constructor(e,t,n,r,a,i){this.outputShape=[],this.variableNames=["x","mean","variance"],o.md.assertAndGetBroadcastShape(e,t),o.md.assertAndGetBroadcastShape(e,n);let s="0.0";null!=r&&(o.md.assertAndGetBroadcastShape(e,r),this.variableNames.push("offset"),s="getOffsetAtOutCoords()");let u="1.0";null!=a&&(o.md.assertAndGetBroadcastShape(e,a),this.variableNames.push("scale"),u="getScaleAtOutCoords()"),this.outputShape=e,this.userCode=`\n      void main() {\n        float x = getXAtOutCoords();\n        float mean = getMeanAtOutCoords();\n        float variance = getVarianceAtOutCoords();\n        float offset = ${s};\n        float scale = ${u};\n        float inv = scale * inversesqrt(variance + float(${i}));\n        setOutput(dot(vec3(x, -mean, offset), vec3(inv, inv, 1)));\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class io{constructor(e,t,n,r,a,i){this.packedInputs=!0,this.packedOutput=!0,this.variableNames=["x","mean","variance"],o.md.assertAndGetBroadcastShape(e,t),o.md.assertAndGetBroadcastShape(e,n);let s="vec4(0.0)";null!=r&&(o.md.assertAndGetBroadcastShape(e,r),this.variableNames.push("offset"),s="getOffsetAtOutCoords()");let u="vec4(1.0)";null!=a&&(o.md.assertAndGetBroadcastShape(e,a),this.variableNames.push("scale"),u="getScaleAtOutCoords()"),this.outputShape=e,this.userCode=`\n      void main() {\n        vec4 offset = ${s};\n        vec4 scale = ${u};\n\n        vec4 x = getXAtOutCoords();\n        vec4 mean = getMeanAtOutCoords();\n        vec4 variance = getVarianceAtOutCoords();\n\n        vec4 inv = scale * inversesqrt(variance + vec4(${i}));\n\n        setOutput((x - mean) * inv + offset);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const so={kernelName:o.ib,backendName:"webgl",kernelFunc:({inputs:e,backend:t,attrs:n})=>{const{x:r,mean:a,variance:i,offset:s,scale:u}=e;o.ae.assert(a.shape.length===i.shape.length,()=>"Batch normalization gradient requires mean and variance to have equal ranks."),o.ae.assert(null==s||a.shape.length===s.shape.length,()=>"Batch normalization gradient requires mean and offset to have equal ranks."),o.ae.assert(null==u||a.shape.length===u.shape.length,()=>"Batch normalization gradient requires mean and scale to have equal ranks.");let{varianceEpsilon:c}=n;null==c&&(c=.001);const l=[r,a,i];let d=null;null!=s&&(d=s.shape,l.push(s));let p=null;null!=u&&(p=u.shape,l.push(u));const h=Object(o.zd)().getBool("WEBGL_PACK_NORMALIZATION")?new io(r.shape,a.shape,i.shape,d,p,c):new ao(r.shape,a.shape,i.shape,d,p,c);return t.runWebGLProgram(h,l,l[0].dtype)}};
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class uo{constructor(e){this.variableNames=["source"],this.outputShape=e,this.rank=e.length;const t=oe(this.rank);this.customUniforms=[{name:"start",arrayIndex:this.rank,type:"int"}];const n=function(e){if(1===e)return"sourceLoc";if(e<=6)return co.slice(0,e).map(e=>"sourceLoc."+e).join(",");throw Error(`Slicing for rank ${e} is not yet supported`)}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */(this.rank);let r;r=`\n        ${t} sourceLoc;\n        ${t} coords = getOutputCoords();\n        ${e.map((e,t)=>`sourceLoc.${co[t]} = start[${t}] + coords.${co[t]};`).join("\n")}\n      `,this.userCode=`\n      void main() {\n        ${r}\n        setOutput(getSource(${n}));\n      }\n    `}}const co=["x","y","z","w","u","v"];class lo{constructor(e){this.variableNames=["source"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.rank=e.length,this.customUniforms=[{name:"start",arrayIndex:this.rank,type:"int"}];const t=oe(this.rank),n=Sn("coords",this.rank),r=Sn("sourceLoc",this.rank),o=1===this.rank?"sourceLoc":`vec2(${r.slice(-2).join()})`,a=`getChannel(getSource(${r.join()}), ${o})`,i=`\n      result.x = ${a};\n      if (++${n[this.rank-1]} < ${e[this.rank-1]}) {\n        ++${r[this.rank-1]};\n        result.y = ${a};\n        --${r[this.rank-1]};\n      }\n    `,s=1===this.rank?"":`\n      --${n[this.rank-1]};\n      if (++${n[this.rank-2]} < ${e[this.rank-2]}) {\n        ++${r[this.rank-2]};\n        result.z = ${a};\n        if (++${n[this.rank-1]} < ${e[this.rank-1]}) {\n          ++${r[this.rank-1]};\n          result.w = ${a};\n        }\n      }\n    `,u=this.rank<=4?`sourceLoc = coords +\n            ${t}(${e.map((e,t)=>`start[${t}]`).join()});`:e.map((e,t)=>`${r[t]} = ${n[t]} + start[${t}];`).join("\n");this.userCode=`\n      void main() {\n        ${t} coords = getOutputCoords();\n        ${t} sourceLoc;\n        ${u}\n        vec4 result = vec4(0.);\n        ${i}\n        ${s}\n        setOutput(result);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function po(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{begin:i,size:s}=r,[u,c]=o.Pd.parseSliceParams(a,i,s);if(o.Pd.assertParamsValid(a,u,c),0===o.ae.sizeFromShape(c))return n.makeTensorInfo(c,a.dtype,[]);if(n.shouldExecuteOnCPU([a])||"string"===a.dtype){const e=n.texData.get(a.dataId),t=cn(e.values,u,c,a.shape,a.dtype);return n.makeTensorInfo(c,a.dtype,t)}const{isPacked:l}=n.texData.get(a.dataId),d=o.Pd.isSliceContinous(a.shape,u,c);if(l||!d){const e=Object(o.zd)().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new lo(c):new uo(c),t=[u];return n.runWebGLProgram(e,[a],a.dtype,t)}return n.uploadToGPU(a.dataId),function(e,t,n,r){const a=r.texData.get(e.dataId),i=r.makeTensorInfo(n,e.dtype),s=r.texData.get(i.dataId);Object.assign(s,a),s.refCount=1,s.shape=n,s.dtype=e.dtype;let u=o.Pd.computeFlatOffset(t,o.ae.computeStrides(e.shape));a.slice&&(u+=a.slice.flatOffset),s.slice={flatOffset:u,origDataId:a.slice&&a.slice.origDataId||e.dataId};const c=r.dataRefCount.get(s.slice.origDataId)||1;return r.dataRefCount.set(s.slice.origDataId,c+1),i}(a,u,c,n)}const ho={kernelName:o.Dc,backendName:"webgl",kernelFunc:po},fo={kernelName:o.t,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{blockShape:i,crops:s}=r;o.ae.assert(a.shape.length<=4,()=>"batchToSpaceND for rank > 4 with a WebGL backend not implemented yet");const u=i.reduce((e,t)=>e*t),c=o.md.getReshaped(a.shape,i,u),l=o.md.getPermuted(c.length,i.length),d=o.md.getReshapedPermuted(a.shape,i,u),p=o.md.getSliceBeginCoords(s,i.length),h=o.md.getSliceSize(d,s,i.length),f=[],m=ur({inputs:{x:a},backend:n,attrs:{shape:c}}),g=yr({inputs:{x:m},backend:n,attrs:{perm:l}}),b=ur({inputs:{x:g},backend:n,attrs:{shape:d}}),y=po({inputs:{x:b},backend:n,attrs:{begin:p,size:h}});return f.push(m),f.push(g),f.push(b),f.forEach(e=>n.disposeIntermediateTensorInfo(e)),y}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const mo={kernelName:o.u,backendName:"webgl",kernelFunc:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const{inputs:t,backend:n,attrs:r}=e,{x:o,weights:a}=t,{size:i}=r,s=n.readSync(o.dataId),u=n.readSync(a.dataId),c=Ft(s,u,a.dtype,a.shape,i);return n.makeTensorInfo([i],a.dtype,c)}};
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const go={kernelName:o.v,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{s0:r,s1:a}=t,i=n.readSync(r.dataId),s=n.readSync(a.dataId),u=o.md.assertAndGetBroadcastShape(Array.from(i),Array.from(s));return n.makeTensorInfo([u.length],"int32",Int32Array.from(u))}},bo=Jn({opSnippet:"return float(a != b);",cpuKernelImpl:nn,dtype:"bool"}),yo={kernelName:o.Zb,backendName:"webgl",kernelFunc:bo};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function vo(e){const{inputs:t,backend:n}=e,{input:r}=t;return Un({inputs:{x:n.texData.get(r.dataId).complexTensorInfos.real},backend:n})}const xo={kernelName:o.ic,backendName:"webgl",kernelFunc:vo};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const wo={kernelName:o.w,backendName:"webgl",kernelFunc:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function e(t){const{inputs:n,backend:r,attrs:a}=t,{x:i}=n,{dtype:s}=a;if("complex64"===s){if("complex64"===i.dtype)return Un({inputs:{x:i},backend:r});const t=o.be(i.shape),n=e({inputs:{x:i},backend:r,attrs:{dtype:"float32"}}),a=Wn({inputs:{real:n,imag:t},backend:r});return t.dispose(),r.disposeIntermediateTensorInfo(n),a}if("complex64"===i.dtype){const t=vo({inputs:{input:i},backend:r}),n=e({inputs:{x:t},backend:r,attrs:{dtype:s}});return r.disposeIntermediateTensorInfo(t),n}if(!o.ae.hasEncodingLoss(i.dtype,s)){const e=Un({inputs:{x:i},backend:r});return{dataId:e.dataId,shape:e.shape,dtype:s}}if("int32"===s)return function(e,t){const n=new An(e.shape,"return float(int(x));"),r=t.runWebGLProgram(n,[e],"int32");return{dataId:r.dataId,shape:r.shape,dtype:r.dtype}}(i,r);if("bool"===s){const e=r.makeTensorInfo([],"bool",o.ae.getTypedArrayFromDType("bool",1)),t=bo({inputs:{a:i,b:e},backend:r});return r.disposeIntermediateTensorInfo(e),t}throw new Error(`Error in Cast: failed to cast ${i.dtype} to ${s}`)}},Oo="return ceil(x);",ko=Zn({opSnippet:Oo,packedOpSnippet:Oo,cpuKernelImpl:Mt}),So={kernelName:o.x,backendName:"webgl",kernelFunc:ko};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class To{constructor(e){this.variableNames=["A"],this.customUniforms=[{name:"minVal",type:"float"},{name:"maxVal",type:"float"}],this.outputShape=e,this.userCode="\n\n      void main() {\n        float value = getAAtOutCoords();\n        if (isnan(value)) {\n          setOutput(value);\n          return;\n        }\n\n        setOutput(clamp(value, minVal, maxVal));\n      }\n    "}}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Co{constructor(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"minVal",type:"float"},{name:"maxVal",type:"float"}],this.outputShape=e,this.userCode="\n      void main() {\n        vec4 value = getAAtOutCoords();\n\n        if (any(isnan(value))) {\n          setOutput(value);\n          return;\n        }\n\n        setOutput(clamp(value, vec4(minVal), vec4(maxVal)));\n      }\n    "}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Eo={kernelName:o.y,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{clipValueMin:i,clipValueMax:s}=r;let u;u=Object(o.zd)().getBool("WEBGL_PACK_CLIP")?new Co(a.shape):new To(a.shape);const c=[[i],[s]];return n.runWebGLProgram(u,[a],a.dtype,c)}};
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Io{constructor(e){this.variableNames=["real","imag"],this.outputShape=e,this.userCode="\n      void main() {\n        float re = abs(getRealAtOutCoords());\n        float im = abs(getImagAtOutCoords());\n        float mx = max(re, im);\n\n        // sadly the length function in glsl is not underflow-safe\n        // (at least not on Intel GPUs). So the safe solution is\n        // to ensure underflow-safety in all cases.\n        setOutput(\n          mx == 0.0 ? 0.0 : mx * length(vec2(1, min(re, im)/mx))\n        );\n      }\n    "}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function jo(e,t){return{dataId:t.dataId,dtype:t.dtype,shape:e.shape}}const No={kernelName:o.A,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{x:r}=t,o=n.texData.get(r.dataId),a=new Io(r.shape),i=[jo(r,o.complexTensorInfos.real),jo(r,o.complexTensorInfos.imag)];return n.runWebGLProgram(a,i,i[0].dtype)}};
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Ao{constructor(e){this.outputShape=[],this.outputShape=o.md.computeOutShape(e,1),this.variableNames=e.map((e,t)=>"T"+t);const t=new Array(e.length-1);t[0]=e[0][1];for(let n=1;n<t.length;n++)t[n]=t[n-1]+e[n][1];const n=[`if (yC < ${t[0]}) setOutput(getT0(yR, yC));`];for(let e=1;e<t.length;e++){const r=t[e-1];n.push(`else if (yC < ${t[e]}) setOutput(getT${e}(yR, yC-${r}));`)}const r=t.length,a=t[t.length-1];n.push(`else setOutput(getT${r}(yR, yC-${a}));`),this.userCode=`\n      void main() {\n        ivec2 coords = getOutputCoords();\n        int yR = coords.x;\n        int yC = coords.y;\n\n        ${n.join("\n        ")}\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Ro{constructor(e,t){this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[],this.outputShape=o.md.computeOutShape(e,t);const n=this.outputShape,r=n.length,a=oe(r),i=Sn("coords",r),s=["x","y","z","w","u","v"].slice(0,r);this.variableNames=e.map((e,t)=>"T"+t);const u=new Array(e.length-1);u[0]=e[0][t];for(let n=1;n<u.length;n++)u[n]=u[n-1]+e[n][t];const c=s[t],l=s.slice(-2),d=s.join();let p=`if (${c} < ${u[0]}) {\n        return getChannel(\n            getT0(${d}), vec2(${l.join()}));\n        }`;for(let e=1;e<u.length;e++){const t=u[e-1];p+=`\n        if (${c} < ${u[e]}  && ${c} >= ${u[e-1]}) {\n          return getChannel(\n            getT${e}(${_o(s,c,t)}),\n            vec2(${_o(l,c,t)}));\n        }`}const h=u.length,f=u[u.length-1];p+=`\n        return getChannel(\n          getT${h}(${_o(s,c,f)}),\n          vec2(${_o(l,c,f)}));`,this.userCode=`\n      float getValue(${s.map(e=>"int "+e)}) {\n        ${p}\n      }\n\n      void main() {\n        ${a} coords = getOutputCoords();\n        vec4 result = vec4(getValue(${i}), 0., 0., 0.);\n\n        ${i[r-1]} = ${i[r-1]} + 1;\n        if (${i[r-1]} < ${n[r-1]}) {\n          result.g = getValue(${i});\n        }\n\n        ${i[r-2]} = ${i[r-2]} + 1;\n        if (${i[r-2]} < ${n[r-2]}) {\n          result.a = getValue(${i});\n        }\n\n        ${i[r-1]} = ${i[r-1]} - 1;\n        if (${i[r-2]} < ${n[r-2]} &&\n            ${i[r-1]} < ${n[r-1]}) {\n          result.b = getValue(${i});\n        }\n        setOutput(result);\n      }\n    `}}function _o(e,t,n){const r=e.indexOf(t);return e.map((e,t)=>t===r?`${e} - ${n}`:e).join()}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function $o(e){const{inputs:t,backend:n}=e,{input:r}=t;return Un({inputs:{x:n.texData.get(r.dataId).complexTensorInfos.imag},backend:n})}const Fo={kernelName:o.rb,backendName:"webgl",kernelFunc:$o};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Do(e,t,n){const r=e[0].dtype;if("complex64"===r){const r=e.map(e=>vo({inputs:{input:e},backend:n})),o=e.map(e=>$o({inputs:{input:e},backend:n})),a=Do(r,t,n),i=Do(o,t,n),s=Wn({inputs:{real:a,imag:i},backend:n});return r.forEach(e=>n.disposeIntermediateTensorInfo(e)),o.forEach(e=>n.disposeIntermediateTensorInfo(e)),n.disposeIntermediateTensorInfo(a),n.disposeIntermediateTensorInfo(i),s}let a=n.shouldExecuteOnCPU(e);if("string"===r&&(a=!0),a){const a=e.map(e=>{const r=o.ae.sizeFromShape(e.shape.slice(t));return ur({inputs:{x:e},backend:n,attrs:{shape:[-1,r]}})}),i=a.map(e=>({vals:n.readSync(e.dataId),shape:e.shape})),s=o.md.computeOutShape(a.map(e=>e.shape),1),u=1===a[0].shape[0],c=Pt(i,s,r,u),l=o.md.computeOutShape(e.map(e=>e.shape),t),d=n.makeTensorInfo(l,r,c);return a.forEach(e=>n.disposeIntermediateTensorInfo(e)),d}if(e.length>Object(o.zd)().getNumber("WEBGL_MAX_TEXTURES_IN_SHADER")){const r=Math.floor(e.length/2),o=Do(e.slice(0,r),t,n),a=Do(e.slice(r),t,n),i=Do([o,a],t,n);return n.disposeIntermediateTensorInfo(o),n.disposeIntermediateTensorInfo(a),i}if(Object(o.zd)().getBool("WEBGL_PACK_ARRAY_OPERATIONS")&&e[0].shape.length>1){const o=new Ro(e.map(e=>e.shape),t);return n.runWebGLProgram(o,e,r)}const{tensors2D:i,outShape:s}=function(e,t,n){const r=o.md.computeOutShape(e.map(e=>e.shape),t);return{tensors2D:e.map(e=>ur({inputs:{x:e},attrs:{shape:[-1,o.ae.sizeFromShape(e.shape.slice(t))]},backend:n})),outShape:r}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */(e,t,n),u=new Ao(i.map(e=>e.shape)),c=n.runWebGLProgram(u,i,r);i.forEach(e=>n.disposeIntermediateTensorInfo(e));const l=ur({inputs:{x:c},attrs:{shape:s},backend:n});return n.disposeIntermediateTensorInfo(c),l}function Mo(e){const{inputs:t,backend:n,attrs:r}=e,{axis:a}=r,i=o.ae.parseAxisParam(a,t[0].shape)[0],s=o.md.computeOutShape(t.map(e=>e.shape),i);if(0===o.ae.sizeFromShape(s))return n.makeTensorInfo(s,t[0].dtype,[]);const u=t.filter(e=>o.ae.sizeFromShape(e.shape)>0);if(1===u.length)return Un({inputs:{x:u[0]},backend:n});const c=u.map(e=>e.shape);return o.md.assertParamsConsistent(c,i),Do(u,i,n)}const Po={kernelName:o.B,backendName:"webgl",kernelFunc:Mo};
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Lo{constructor(e,t=!1,n=null,r=!1,o=!1){this.variableNames=["x","W"],this.outputShape=e.outShape;const a=e.padInfo.top,i=e.padInfo.left,s=e.strideHeight,u=e.strideWidth,c=e.dilationHeight,l=e.dilationWidth,d=e.filterHeight,p=e.filterWidth,h=4*Math.floor(e.inChannels/4),f=e.inChannels%4,m="channelsLast"===e.dataFormat,g=m?1:2,b=m?2:3,y=m?3:1;let v="",x="";n&&(v=r?`float activation(float a) {\n          float b = getPreluActivationWeightsAtOutCoords();\n          ${n}\n        }`:o?`float activation(float a) {\n          float b = getLeakyreluAlphaAtOutCoords();\n          ${n}\n        }`:`\n          float activation(float x) {\n            ${n}\n          }\n        `,x="result = activation(result);");const w=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),o&&this.variableNames.push("leakyreluAlpha"),this.userCode=`\n      ${v}\n\n      const ivec2 strides = ivec2(${s}, ${u});\n      const ivec2 pads = ivec2(${a}, ${i});\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int batch = coords[0];\n        int d2 = coords[${y}];\n\n        ivec2 xRCCorner =\n            ivec2(coords[${g}], coords[${b}]) * strides - pads;\n        int xRCorner = xRCCorner.x;\n        int xCCorner = xRCCorner.y;\n\n        // Convolve x(?, ?, d1) with w(:, :, d1, d2) to get y(yR, yC, d2).\n        // ? = to be determined. : = across all values in that axis.\n        float dotProd = 0.0;\n        for (int wR = 0; wR < ${d}; wR++) {\n          int xR = xRCorner + wR * ${c};\n\n          if (xR < 0 || xR >= ${e.inHeight}) {\n            continue;\n          }\n\n          for (int wC = 0; wC < ${p}; wC++) {\n            int xC = xCCorner + wC * ${l};\n\n            if (xC < 0 || xC >= ${e.inWidth}) {\n              continue;\n            }\n\n            for (int d1 = 0; d1 < ${h}; d1 += 4) {\n              vec4 wValues = vec4(\n                getW(wR, wC, d1, d2),\n                getW(wR, wC, d1 + 1, d2),\n                getW(wR, wC, d1 + 2, d2),\n                getW(wR, wC, d1 + 3, d2)\n              );\n\n              if (${m}) {\n                vec4 xValues = vec4(\n                  getX(batch, xR, xC, d1),\n                  getX(batch, xR, xC, d1 + 1),\n                  getX(batch, xR, xC, d1 + 2),\n                  getX(batch, xR, xC, d1 + 3)\n                );\n                dotProd += dot(xValues, wValues);\n              } else {\n                vec4 xValues = vec4(\n                  getX(batch, d1, xR, xC),\n                  getX(batch, d1 + 1, xR, xC),\n                  getX(batch, d1 + 2, xR, xC),\n                  getX(batch, d1 + 3, xR, xC)\n                );\n                dotProd += dot(xValues, wValues);\n              }\n            }\n\n            if (${1===f}) {\n\n              if (${m}) {\n                dotProd +=\n                    getX(batch, xR, xC, ${h}) *\n                    getW(wR, wC, ${h}, d2);\n              } else {\n                dotProd +=\n                    getX(batch, ${h}, xR, xC) *\n                    getW(wR, wC, ${h}, d2);\n              }\n\n            } else if (${2===f}) {\n              vec2 wValues = vec2(\n                getW(wR, wC, ${h}, d2),\n                getW(wR, wC, ${h} + 1, d2)\n              );\n\n              if (${m}) {\n                vec2 xValues = vec2(\n                  getX(batch, xR, xC, ${h}),\n                  getX(batch, xR, xC, ${h} + 1)\n                );\n                dotProd += dot(xValues, wValues);\n              } else {\n                vec2 xValues = vec2(\n                  getX(batch, ${h}, xR, xC),\n                  getX(batch, ${h} + 1, xR, xC)\n                );\n                dotProd += dot(xValues, wValues);\n              }\n\n            } else if (${3===f}) {\n              vec3 wValues = vec3(\n                getW(wR, wC, ${h}, d2),\n                getW(wR, wC, ${h} + 1, d2),\n                getW(wR, wC, ${h} + 2, d2)\n              );\n\n              if (${m}) {\n                vec3 xValues = vec3(\n                  getX(batch, xR, xC, ${h}),\n                  getX(batch, xR, xC, ${h} + 1),\n                  getX(batch, xR, xC, ${h} + 2)\n                );\n                dotProd += dot(xValues, wValues);\n              } else {\n                vec3 xValues = vec3(\n                  getX(batch, ${h}, xR, xC),\n                  getX(batch, ${h} + 1, xR, xC),\n                  getX(batch, ${h} + 2, xR, xC)\n                );\n                dotProd += dot(xValues, wValues);\n              }\n\n            }\n          }\n        }\n\n        float result = dotProd;\n        ${w}\n        ${x}\n        setOutput(result);\n      }\n    `}}class Bo{constructor(e){this.variableNames=["x","W"],this.outputShape=e.outShape;const t=e.padInfo.front,n=e.padInfo.top,r=e.padInfo.left,o=e.strideDepth,a=e.strideHeight,i=e.strideWidth,s=e.dilationDepth,u=e.dilationHeight,c=e.dilationWidth,l=e.filterDepth,d=e.filterHeight,p=e.filterWidth,h=4*Math.floor(e.inChannels/4),f=e.inChannels%4;this.userCode=`\n      const ivec3 strides = ivec3(${o}, ${a}, ${i});\n      const ivec3 pads = ivec3(${t}, ${n}, ${r});\n\n      void main() {\n        ivec5 coords = getOutputCoords();\n        int batch = coords.x;\n        int d2 = coords.u;\n\n        ivec3 xFRCCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n        int xFCorner = xFRCCorner.x;\n        int xRCorner = xFRCCorner.y;\n        int xCCorner = xFRCCorner.z;\n\n        // Convolve x(?, ?, ?, d1) with w(:, :, :, d1, d2) to get\n        // y(yF, yR, yC, d2). ? = to be determined. : = across all\n        // values in that axis.\n        float dotProd = 0.0;\n        for (int wF = 0; wF < ${l}; wF++) {\n          int xF = xFCorner + wF * ${s};\n\n          if (xF < 0 || xF >= ${e.inDepth}) {\n            continue;\n          }\n\n          for (int wR = 0; wR < ${d}; wR++) {\n            int xR = xRCorner + wR * ${u};\n\n            if (xR < 0 || xR >= ${e.inHeight}) {\n              continue;\n            }\n\n            for (int wC = 0; wC < ${p}; wC++) {\n              int xC = xCCorner + wC * ${c};\n\n              if (xC < 0 || xC >= ${e.inWidth}) {\n                continue;\n              }\n\n              for (int d1 = 0; d1 < ${h}; d1 += 4) {\n                vec4 xValues = vec4(\n                  getX(batch, xF, xR, xC, d1),\n                  getX(batch, xF, xR, xC, d1 + 1),\n                  getX(batch, xF, xR, xC, d1 + 2),\n                  getX(batch, xF, xR, xC, d1 + 3)\n                );\n                vec4 wValues = vec4(\n                  getW(wF, wR, wC, d1, d2),\n                  getW(wF, wR, wC, d1 + 1, d2),\n                  getW(wF, wR, wC, d1 + 2, d2),\n                  getW(wF, wR, wC, d1 + 3, d2)\n                );\n\n                dotProd += dot(xValues, wValues);\n              }\n\n              if (${1===f}) {\n                dotProd +=\n                  getX(batch, xF, xR, xC, ${h}) *\n                  getW(wF, wR, wC, ${h}, d2);\n              } else if (${2===f}) {\n                vec2 xValues = vec2(\n                  getX(batch, xF, xR, xC, ${h}),\n                  getX(batch, xF, xR, xC, ${h} + 1)\n                );\n                vec2 wValues = vec2(\n                  getW(wF, wR, wC, ${h}, d2),\n                  getW(wF, wR, wC, ${h} + 1, d2)\n                );\n                dotProd += dot(xValues, wValues);\n              } else if (${3===f}) {\n                vec3 xValues = vec3(\n                  getX(batch, xF, xR, xC, ${h}),\n                  getX(batch, xF, xR, xC, ${h} + 1),\n                  getX(batch, xF, xR, xC, ${h} + 2)\n                );\n                vec3 wValues = vec3(\n                  getW(wF, wR, wC, ${h}, d2),\n                  getW(wF, wR, wC, ${h} + 1, d2),\n                  getW(wF, wR, wC, ${h} + 2, d2)\n                );\n                dotProd += dot(xValues, wValues);\n              }\n            }\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class zo{constructor(e,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"inputShape",type:"ivec3"},{name:"pad",type:"ivec2"},{name:"stride",type:"ivec2"},{name:"dilation",type:"ivec2"},{name:"inChannels",type:"int"},{name:"itemsPerBlockRow",type:"int"},{name:"outWidth",type:"int"}],this.outputShape=e,this.enableShapeUniforms=ce(this.outputShape.length);const{dataFormat:n}=t,r=z(),o="channelsLast"===n,a=o?0:1,i=o?1:2,s=this.enableShapeUniforms?"if(blockIndex < outShape[1] && pos < outShape[0]) {":`if(blockIndex < ${e[1]} && pos < ${e[0]}) {`;let u="";for(let e=0;e<=1;e++)for(let t=0;t<=1;t++)u+=`\n          blockIndex = rc.y + ${t};\n          pos = rc.x + ${e};\n\n          ${s}\n            offsetY = int(blockIndex / outWidth) * stride[0] - pad[0];\n            d0 = offsetY + dilation[0] * (pos / itemsPerBlockRow);\n\n            if(d0 < inputShape[${a}] && d0 >= 0) {\n              // Use custom imod instead mod. On Intel GPU, mod may generate\n              // unexpected value.\n              // https://github.com/tensorflow/tfjs/issues/5447\n              offsetX = imod(blockIndex, outWidth) * stride[1] - pad[1];\n              d1 = offsetX + dilation[1] * (imod(pos, itemsPerBlockRow) /\n                  inChannels);\n\n              if(d1 < inputShape[${i}] && d1 >= 0) {\n\n                ch = imod(pos, inChannels);\n\n                if (${o}) {\n                  innerDims = vec2(d1, ch);\n                  result[${2*e+t}] = getChannel(\n                    getA(d0, int(innerDims.x),\n                    int(innerDims.y)), innerDims);\n                } else {\n                  innerDims = vec2(d0, d1);\n                  result[${2*e+t}] = getChannel(\n                    getA(ch, int(innerDims.x),\n                    int(innerDims.y)), innerDims);\n                }\n              }\n            }\n          }\n        `;this.userCode=`\n      void main() {\n        ivec2 rc = getOutputCoords();\n\n        vec4 result = vec4(0);\n\n        int blockIndex, pos, offsetY, d0, offsetX, d1, ch;\n        vec2 innerDims;\n\n        ${u}\n\n        ${r.output} = result;\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Uo({x:e,filter:t,convInfo:n,backend:r,bias:a=null,preluActivationWeights:i=null,leakyreluAlpha:s=0,activation:u=null}){const c=e.shape,l=r.texData.get(e.dataId),d=n.inChannels,p=c[0]*c[1]*c[2],h=n.outChannels,f="channelsLast"===n.dataFormat;let m;const g=[];if(!((1===p||1===h)&&d>1e3)&&l.isPacked&&f&&null!=l.texture&&c[2]%2!=0&&o.ae.arraysEqual(l.shape.slice(-3),c.slice(-3))){const d=c[0]*c[1]*(c[2]+1),p={dataId:e.dataId,shape:[1,d,n.inChannels],dtype:e.dtype},h=l.shape;l.shape=l.shape.slice(),l.shape[l.shape.length-2]++,o.ae.assert(R(l.shape,p.shape),()=>`packed reshape ${l.shape} to ${p.shape} isn't free`);const f=ur({inputs:{x:t},backend:r,attrs:{shape:[1,n.inChannels,n.outChannels]}});g.push(f);const b=xr({a:p,b:f,backend:r,transposeA:!1,transposeB:!1,bias:a,activation:u,preluActivationWeights:i,leakyreluAlpha:s}),y=r.texData.get(b.dataId);o.ae.assert(y.isPacked,()=>"batchMatMul result is expected to be packed"),l.shape=h,y.shape=n.outShape,m=Un({inputs:{x:b},backend:r}),m.shape=n.outShape,g.push(b)}else{const o=ur({inputs:{x:e},backend:r,attrs:{shape:[1,f?c[0]*c[1]*c[2]:c[0]*c[2]*c[3],n.inChannels]}}),l=ur({inputs:{x:t},backend:r,attrs:{shape:[1,n.inChannels,n.outChannels]}}),d=xr({a:o,b:l,transposeA:!1,transposeB:!1,backend:r,bias:a,activation:u,preluActivationWeights:i,leakyreluAlpha:s});m=ur({inputs:{x:d},backend:r,attrs:{shape:n.outShape}}),g.push(o),g.push(l),g.push(d)}for(const e of g)r.disposeIntermediateTensorInfo(e);return m}function Vo({x:e,filter:t,convInfo:n,backend:r,bias:a=null,preluActivationWeights:i=null,leakyreluAlpha:s=0,activation:u=null}){const{filterWidth:c,filterHeight:l,inChannels:d,outWidth:p,outHeight:h,dataFormat:f}=n,m="channelsLast"===f,g=c*l*d,b=h*p,y=[g,b],v=[],x=ur({inputs:{x:e},backend:r,attrs:{shape:e.shape.slice(1)}}),w=ur({inputs:{x:t},backend:r,attrs:{shape:[1,g,o.ae.sizeFromShape(t.shape)/g]}});v.push(x),v.push(w);const O=new zo(y,n),k=[x.shape,[n.padInfo.top,n.padInfo.left],[n.strideHeight,n.strideWidth],[n.dilationHeight,n.dilationWidth],[n.inChannels],[n.filterWidth*n.inChannels],[n.outWidth]],S=r.runWebGLProgram(O,[x],"float32",k),T=ur({inputs:{x:S},backend:r,attrs:{shape:[1,y[0],y[1]]}});v.push(S),v.push(T);const C=null!=a,E=null!=i,I="leakyrelu"===u,j=u?er(u,!0):null,N=new tr(T.shape,w.shape,[1,b,n.outChannels],!0,!1,C,j,E,I),A=[T,w];if(a&&A.push(a),E&&A.push(i),I){const e=r.makeTensorInfo([],"float32",o.ae.createScalarValue(s,"float32"));A.push(e),v.push(e)}const R=r.runWebGLProgram(N,A,"float32"),_=ur({inputs:{x:R},backend:r,attrs:{shape:m?[1,h,p,n.outChannels]:[1,n.outChannels,h,p]}});v.push(R);for(const e of v)r.disposeIntermediateTensorInfo(e);return _}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Wo={kernelName:o.C,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,filter:i}=t,{strides:s,pad:u,dataFormat:c,dilations:l,dimRoundingMode:d}=r,p=o.md.convertConv2DDataFormat(c),h=o.md.computeConv2DInfo(a.shape,i.shape,s,l,u,d,!1,p);let f;if(1!==h.filterHeight||1!==h.filterWidth||1!==h.dilationHeight||1!==h.dilationWidth||1!==h.strideHeight||1!==h.strideWidth||"SAME"!==h.padInfo.type&&"VALID"!==h.padInfo.type)if(Object(o.zd)().getBool("WEBGL_CONV_IM2COL")&&1===a.shape[0])f=Vo({x:a,filter:i,convInfo:h,backend:n});else{const e=new Lo(h);f=n.runWebGLProgram(e,[a,i],"float32")}else f=Uo({x:a,filter:i,convInfo:h,backend:n});const m=ur({inputs:{x:f},backend:n,attrs:{shape:h.outShape}});return n.disposeIntermediateTensorInfo(f),m}};
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Go{constructor(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;const t=e.strideHeight,n=e.strideWidth,r=e.padInfo.top,o=e.padInfo.left,a="channelsLast"===e.dataFormat;this.userCode=`\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int wR = coords.x;\n        int wC = coords.y;\n        int d1 = coords.z;\n        int d2 = coords.w;\n\n        // Convolve x(?, ?, d1) with dy(:, :, d2) to get dw(wR, wC, d1, d2).\n        // ? = to be determined. : = across all values in that axis.\n        float dotProd = 0.0;\n\n        for (int b = 0; b < ${e.batchSize}; b++) {\n          for (int yR = 0; yR < ${e.outHeight}; yR++) {\n            int xR = wR + yR * ${t} - ${r};\n\n            if (xR < 0 || xR >= ${e.inHeight}) {\n              continue;\n            }\n\n            for (int yC = 0; yC < ${e.outWidth}; yC++) {\n              int xC = wC + yC * ${n} - ${o};\n\n              if (xC < 0 || xC >= ${e.inWidth}) {\n                continue;\n              }\n\n              if (${a}) {\n                float dyValue = getDy(b, yR, yC, d2);\n                float xValue = getX(b, xR, xC, d1);\n                dotProd += (xValue * dyValue);\n              } else {\n                float dyValue = getDy(b, d2, yR, yC);\n                float xValue = getX(b, d1, xR, xC);\n                dotProd += (xValue * dyValue);\n              }\n\n            }\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}class Ho{constructor(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;const t=e.filterHeight,n=e.filterWidth,r=e.strideHeight,o=e.strideWidth,a="channelsLast"===e.dataFormat,i=t-1-e.padInfo.top,s=n-1-e.padInfo.left,u=a?1:2,c=a?2:3,l=a?3:1;this.userCode=`\n      const ivec2 pads = ivec2(${i}, ${s});\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int batch = coords[0];\n        int d1 = coords[${l}];\n\n        ivec2 dyCorner = ivec2(coords[${u}], coords[${c}]) - pads;\n        int dyRCorner = dyCorner.x;\n        int dyCCorner = dyCorner.y;\n\n        // Convolve dy(?, ?, d2) with w(:, :, d1, d2) to compute dx(xR, xC, d1).\n        // ? = to be determined. : = across all values in that axis.\n        float dotProd = 0.0;\n        for (int wR = 0; wR < ${t}; wR++) {\n          float dyR = float(dyRCorner + wR) / ${r}.0;\n\n          if (dyR < 0.0 || dyR >= ${e.outHeight}.0 || fract(dyR) > 0.0) {\n            continue;\n          }\n          int idyR = int(dyR);\n\n          int wRPerm = ${t} - 1 - wR;\n\n          for (int wC = 0; wC < ${n}; wC++) {\n            float dyC = float(dyCCorner + wC) / ${o}.0;\n\n            if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n                fract(dyC) > 0.0) {\n              continue;\n            }\n            int idyC = int(dyC);\n\n            int wCPerm = ${n} - 1 - wC;\n\n            for (int d2 = 0; d2 < ${e.outChannels}; d2++) {\n\n              if (${a}) {\n                float xValue = getDy(batch, idyR, idyC, d2);\n                float wValue = getW(wRPerm, wCPerm, d1, d2);\n                dotProd += xValue * wValue;\n              } else {\n                float xValue = getDy(batch, d2, idyR, idyC);\n                float wValue = getW(wRPerm, wCPerm, d1, d2);\n                dotProd += xValue * wValue;\n              }\n\n            }\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}class qo{constructor(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;const t=e.strideDepth,n=e.strideHeight,r=e.strideWidth,o=e.padInfo.front,a=e.padInfo.top,i=e.padInfo.left;this.userCode=`\n      void main() {\n        ivec5 coords = getOutputCoords();\n        int wF = coords.x;\n        int wR = coords.y;\n        int wC = coords.z;\n        int d1 = coords.w;\n        int d2 = coords.u;\n\n        float dotProd = 0.0;\n\n        for (int b = 0; b < ${e.batchSize}; b++) {\n          for (int yF = 0; yF < ${e.outDepth}; yF++) {\n            int xF = wF + yF * ${t} - ${o};\n\n            if (xF < 0 || xF >= ${e.inDepth}) {\n              continue;\n            }\n\n            for (int yR = 0; yR < ${e.outHeight}; yR++) {\n              int xR = wR + yR * ${n} - ${a};\n\n              if (xR < 0 || xR >= ${e.inHeight}) {\n                continue;\n              }\n\n              for (int yC = 0; yC < ${e.outWidth}; yC++) {\n                int xC = wC + yC * ${r} - ${i};\n\n                if (xC < 0 || xC >= ${e.inWidth}) {\n                  continue;\n                }\n\n                float dyValue = getDy(b, yF, yR, yC, d2);\n                float xValue = getX(b, xF, xR, xC, d1);\n                dotProd += (xValue * dyValue);\n              }\n            }\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}class Ko{constructor(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;const t=e.filterDepth,n=e.filterHeight,r=e.filterWidth,o=e.strideDepth,a=e.strideHeight,i=e.strideWidth,s=t-1-e.padInfo.front,u=n-1-e.padInfo.top,c=r-1-e.padInfo.left;this.userCode=`\n      const ivec3 pads = ivec3(${s}, ${u}, ${c});\n\n      void main() {\n        ivec5 coords = getOutputCoords();\n        int batch = coords.x;\n        int d1 = coords.u;\n\n\n        ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n        int dyFCorner = dyCorner.x;\n        int dyRCorner = dyCorner.y;\n        int dyCCorner = dyCorner.z;\n\n        float dotProd = 0.0;\n        for (int wF = 0; wF < ${t}; wF++) {\n          float dyF = float(dyFCorner + wF) / ${o}.0;\n\n          if (dyF < 0.0 || dyF >= ${e.outDepth}.0 || fract(dyF) > 0.0) {\n            continue;\n          }\n          int idyF = int(dyF);\n\n          int wFPerm = ${t} - 1 - wF;\n\n          for (int wR = 0; wR < ${n}; wR++) {\n            float dyR = float(dyRCorner + wR) / ${a}.0;\n\n            if (dyR < 0.0 || dyR >= ${e.outHeight}.0 ||\n              fract(dyR) > 0.0) {\n              continue;\n            }\n            int idyR = int(dyR);\n\n            int wRPerm = ${n} - 1 - wR;\n\n            for (int wC = 0; wC < ${r}; wC++) {\n              float dyC = float(dyCCorner + wC) / ${i}.0;\n\n              if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n                  fract(dyC) > 0.0) {\n                continue;\n              }\n              int idyC = int(dyC);\n\n              int wCPerm = ${r} - 1 - wC;\n\n              for (int d2 = 0; d2 < ${e.outChannels}; d2++) {\n                float xValue = getDy(batch, idyF, idyR, idyC, d2);\n                float wValue = getW(wFPerm, wRPerm, wCPerm, d1, d2);\n                dotProd += xValue * wValue;\n              }\n            }\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Xo={kernelName:o.D,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,dy:i}=t,{strides:s,pad:u,dataFormat:c,dimRoundingMode:l,filterShape:d}=r,p=o.md.convertConv2DDataFormat(c),h=o.md.computeConv2DInfo(a.shape,d,s,1,u,l,!1,p),f=new Go(h);return n.runWebGLProgram(f,[a,i],"float32")}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Yo={kernelName:o.E,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{dy:a,filter:i}=t,{inputShape:s,strides:u,pad:c,dataFormat:l,dimRoundingMode:d}=r,p=o.md.convertConv2DDataFormat(l),h=o.md.computeConv2DInfo(s,i.shape,u,1,c,d,!1,p),f=new Ho(h);return n.runWebGLProgram(f,[a,i],"float32")}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Qo={kernelName:o.F,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,filter:i}=t,{strides:s,pad:u,dilations:c}=r,l=o.md.computeConv3DInfo(a.shape,i.shape,s,c,u),d=new Bo(l);return n.runWebGLProgram(d,[a,i],"float32")}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Zo={kernelName:o.G,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,dy:i}=t,{strides:s,pad:u,filterShape:c}=r,l=o.md.computeConv3DInfo(a.shape,c,s,1,u),d=new qo(l);return n.runWebGLProgram(d,[a,i],"float32")}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Jo={kernelName:o.H,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{dy:a,filter:i}=t,{pad:s,strides:u,inputShape:c}=r,l=o.md.computeConv3DInfo(c,i.shape,u,1,s),d=new Ko(l);return n.runWebGLProgram(d,[a,i],"float32")}},ea=Zn({opSnippet:"if (isnan(x)) return x;\n  return cos(x);\n"}),ta={kernelName:o.I,backendName:"webgl",kernelFunc:ea},na=Zn({opSnippet:"\n  float e2x = exp(-x);\n  return (e2x + 1.0 / e2x) / 2.0;\n"}),ra={kernelName:o.J,backendName:"webgl",kernelFunc:na};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class oa{constructor(e,t,n,r,o){this.variableNames=["Image","Boxes","BoxInd"],this.outputShape=[];const[a,i,s,u]=e,[c]=t,[l,d]=n;this.outputShape=[c,l,d,u];const p="bilinear"===r?1:0,[h,f]=[i-1+".0",s-1+".0"],[m,g,b]=l>1?[""+(i-1)/(l-1),"(y2-y1) * height_ratio",`y1*${h} + float(y)*(height_scale)`]:["0.0","0.0","0.5 * (y1+y2) * "+h],[y,v,x]=d>1?[""+(s-1)/(d-1),"(x2-x1) * width_ratio",`x1*${f} + float(x)*(width_scale)`]:["0.0","0.0","0.5 * (x1+x2) * "+f];this.userCode=`\n      const float height_ratio = float(${m});\n      const float width_ratio = float(${y});\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int y = coords[1];\n        int x = coords[2];\n        int d = coords[3];\n\n        // get box vals\n        float y1 = getBoxes(b,0);\n        float x1 = getBoxes(b,1);\n        float y2 = getBoxes(b,2);\n        float x2 = getBoxes(b,3);\n\n        // get image in batch index\n        int bInd = round(getBoxInd(b));\n        if(bInd < 0 || bInd >= ${a}) {\n          return;\n        }\n\n        float height_scale = ${g};\n        float width_scale = ${v};\n\n        float in_y = ${b};\n        if( in_y < 0.0 || in_y > ${h} ) {\n          setOutput(float(${o}));\n          return;\n        }\n        float in_x = ${x};\n        if( in_x < 0.0 || in_x > ${f} ) {\n          setOutput(float(${o}));\n          return;\n        }\n\n        vec2 sourceFracIndexCR = vec2(in_x,in_y);\n        if(${p} == 1) {\n          // Compute the four integer indices.\n          ivec2 sourceFloorCR = ivec2(sourceFracIndexCR);\n          ivec2 sourceCeilCR = ivec2(ceil(sourceFracIndexCR));\n\n          float topLeft = getImage(b, sourceFloorCR.y, sourceFloorCR.x, d);\n          float bottomLeft = getImage(b, sourceCeilCR.y, sourceFloorCR.x, d);\n          float topRight = getImage(b, sourceFloorCR.y, sourceCeilCR.x, d);\n          float bottomRight = getImage(b, sourceCeilCR.y, sourceCeilCR.x, d);\n\n          vec2 fracCR = sourceFracIndexCR - vec2(sourceFloorCR);\n\n          float top = topLeft + (topRight - topLeft) * fracCR.x;\n          float bottom = bottomLeft + (bottomRight - bottomLeft) * fracCR.x;\n          float newValue = top + (bottom - top) * fracCR.y;\n          setOutput(newValue);\n        } else {\n          // Compute the coordinators of nearest neighbor point.\n          ivec2 sourceNearestCR = ivec2(floor(\n            sourceFracIndexCR + vec2(0.5,0.5)));\n          float newValue = getImage(b, sourceNearestCR.y, sourceNearestCR.x, d);\n          setOutput(newValue);\n        }\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const aa={kernelName:o.K,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n,attrs:r}=e,{image:o,boxes:a,boxInd:i}=t,{cropSize:s,method:u,extrapolationValue:c}=r,l=new oa(o.shape,a.shape,s,u,c);return n.runWebGLProgram(l,[o,a,i],"float32")}};class ia{constructor(e,t,n){this.variableNames=["x"],this.customUniforms=[{name:"index",type:"float"}],this.outputShape=e;const r=e.length,o=t?"0.0":`getX(${sa(r,"coords")})`,a=e[e.length-1];let i="",s="";t?(i=n?"end != "+(a-1):"end != 0",s=n?"end + 1":"end - 1"):(i=n?"end + pow2 < "+a:"end >= pow2",s=n?"end + pow2":"end - pow2"),this.userCode=`\n      void main() {\n        ${oe(r)} coords = getOutputCoords();\n        int end = ${ua(r,"coords")};\n        float val = ${o};\n        int pow2 = int(pow(2.0, index));\n        if (${i}) {\n          int idx = ${s};\n          ${ua(r,"coords")} = idx;\n          val += getX(${sa(r,"coords")});\n        }\n        setOutput(val);\n      }\n    `}}function sa(e,t){if(1===e)return""+t;if(2===e)return`${t}.x, ${t}.y`;if(3===e)return`${t}.x, ${t}.y, ${t}.z`;if(4===e)return`${t}.x, ${t}.y, ${t}.z, ${t}.w`;throw Error(`Cumulative sum for rank ${e} is not yet supported`)}function ua(e,t){if(1===e)return""+t;if(2===e)return t+".y";if(3===e)return t+".z";if(4===e)return t+".w";throw Error(`Cumulative sum for rank ${e} is not yet supported`)}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ca={kernelName:o.L,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{axis:i,exclusive:s,reverse:u}=r,c=a.shape.length,l=o.md.getAxesPermutation([i],c);let d=a;null!=l&&(d=yr({inputs:{x:a},backend:n,attrs:{perm:l}}));const p=o.md.getInnerMostAxes(1,c)[0];if(p!==c-1)throw new Error(`WebGL cumsum shader expects an inner-most axis=${a.shape.length-1} but got axis=`+i);const h=d.shape[p];let f=Un({inputs:{x:d},backend:n});for(let e=0;e<=Math.ceil(Math.log2(h))-1;e++){const t=new ia(d.shape,!1,u),r=[[e]],o=f;f=n.runWebGLProgram(t,[f],f.dtype,r),n.disposeIntermediateTensorInfo(o)}if(s){const e=new ia(d.shape,s,u),t=f;f=n.runWebGLProgram(e,[f],f.dtype),n.disposeIntermediateTensorInfo(t)}if(null!=l){const e=yr({inputs:{x:f},backend:n,attrs:{perm:o.md.getUndoAxesPermutation(l)}});return n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(d),e}return f}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const la={kernelName:o.N,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:o,weights:a}=t,{size:i,binaryOutput:s}=r;if(1===o.shape.length){const e=n.readSync(o.dataId),t=n.readSync(a.dataId),r=Ft(e,t,a.dtype,a.shape,i);return n.makeTensorInfo([i],a.dtype,r)}if(2===o.shape.length){const e=n.bufferSync(o),t=n.bufferSync(a),r=Dt(e,t,i,s);return n.makeTensorInfo(r.shape,a.dtype,r.values)}throw new Error("Error in denseBincount: input must be at most rank 2, but got rank"+o.shape.length+".")}};
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class da{constructor(e,t,n){this.variableNames=["x"],this.outputShape=[],this.outputShape=e,this.blockSize=t,this.dataFormat=n,this.userCode=`\n    void main() {\n      ivec4 coords = getOutputCoords();\n      int b = coords[0];\n      int h = ${this.getHeightCoordString()};\n      int w = ${this.getWidthCoordString()};\n      int d = ${this.getDepthCoordString()};\n\n      int in_h = h / ${t};\n      int offset_h = imod(h, ${t});\n      int in_w = w / ${t};\n      int offset_w = imod(w, ${t});\n      int offset_d = (offset_h * ${t} + offset_w) *\n        ${this.getOutputDepthSize()};\n      int in_d = d + offset_d;\n\n      float result = ${this.getInputSamplingString()};\n      setOutput(result);\n    }\n  `}getHeightCoordString(){return"NHWC"===this.dataFormat?"coords[1]":"coords[2]"}getWidthCoordString(){return"NHWC"===this.dataFormat?"coords[2]":"coords[3]"}getDepthCoordString(){return"NHWC"===this.dataFormat?"coords[3]":"coords[1]"}getOutputDepthSize(){return"NHWC"===this.dataFormat?this.outputShape[3]:this.outputShape[1]}getInputSamplingString(){return"NHWC"===this.dataFormat?"getX(b, in_h, in_w, in_d)":"getX(b, in_d, in_h, in_w)"}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const pa={kernelName:o.O,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:o}=t,{blockSize:a,dataFormat:i}=r,s=o.shape[0],u=("NHWC"===i?o.shape[1]:o.shape[2])*a,c=("NHWC"===i?o.shape[2]:o.shape[3])*a,l=("NHWC"===i?o.shape[3]:o.shape[1])/(a*a),d=new da("NHWC"===i?[s,u,c,l]:[s,l,u,c],a,i);return n.runWebGLProgram(d,[o],o.dtype)}};
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class ha{constructor(e,t=!1,n=null,r=!1,o=!1){this.variableNames=["x","W"],this.customUniforms=[{name:"pads",type:"ivec2"},{name:"strides",type:"ivec2"},{name:"dilations",type:"ivec2"},{name:"inDims",type:"ivec2"}],this.outputShape=e.outShape,this.enableShapeUniforms=ce(this.outputShape.length);const a=e.filterHeight,i=e.filterWidth,s=e.outChannels/e.inChannels;let u="",c="";n&&(u=r?`float activation(float a) {\n          float b = getPreluActivationWeightsAtOutCoords();\n          ${n}\n        }`:o?`float activation(float a) {\n          float b = getLeakyreluAlphaAtOutCoords();\n          ${n}\n        }`:`\n          float activation(float x) {\n            ${n}\n          }\n        `,c="result = activation(result);");const l=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),o&&this.variableNames.push("leakyreluAlpha"),this.userCode=`\n      ${u}\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int batch = coords.x;\n        ivec2 xRCCorner = coords.yz * strides - pads;\n        int d2 = coords.w;\n        int d1 = d2 / ${s};\n        int q = d2 - d1 * ${s};\n\n        int xRCorner = xRCCorner.x;\n        int xCCorner = xRCCorner.y;\n\n        // Convolve x(?, ?, d1) with w(:, :, d1, q) to get y(yR, yC, d2).\n        // ? = to be determined. : = across all values in that axis.\n        float dotProd = 0.0;\n        // TO DO(dsmilkov): Flatten the two for loops and vec4 the operations.\n        for (int wR = 0; wR < ${a}; wR++) {\n          int xR = xRCorner + wR * dilations[0];\n\n          if (xR < 0 || xR >= inDims[0]) {\n            continue;\n          }\n\n          for (int wC = 0; wC < ${i}; wC++) {\n            int xC = xCCorner + wC * dilations[1];\n\n            if (xC < 0 || xC >= inDims[1]) {\n              continue;\n            }\n\n            float xVal = getX(batch, xR, xC, d1);\n            float wVal = getW(wR, wC, d1, q);\n            dotProd += xVal * wVal;\n          }\n        }\n\n        float result = dotProd;\n        ${l}\n        ${c}\n        setOutput(result);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class fa{constructor(e,t=!1,n=null,r=!1,a=!1){this.variableNames=["x","W"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"pads",type:"ivec2"},{name:"strides",type:"ivec2"},{name:"dilations",type:"ivec2"},{name:"inDims",type:"ivec2"}],this.outputShape=e.outShape,this.enableShapeUniforms=ce(this.outputShape.length);const i=e.outChannels/e.inChannels,s=e.padInfo.left,u=e.strideWidth,c=e.dilationWidth,l=e.filterHeight,d=e.filterWidth,p=d;let h="\n      int xR; int xC; int xCOffset;\n      vec4 wTexel; vec4 previous; vec4 final;";for(let e=0;e<d;e++)h+=`\n          vec4 xTexelC${2*e};\n          int xTexelC${2*e}Ready;\n          vec4 xTexelC${2*e+1};\n          int xTexelC${2*e+1}Ready;\n          vec4 xC${e};`;h+=`\n    for (int r = 0; r < ${l}; r++) {\n      `;for(let e=0;e<d;e++)h+=`\n          xTexelC${2*e} = vec4(0.0);\n          xTexelC${2*e}Ready = 0;\n          xTexelC${2*e+1} = vec4(0.0);\n          xTexelC${2*e+1}Ready = 0;\n          xC${e} = vec4(0.0);`;h+="\n        xR = xRCorner + r * dilations[0];\n        if (xR >=0 && xR < inDims[0]) {\n      ";for(let e=0;e<(p+1)/2;e++){const t=2*e;if(h+=`\n          xC = xCCorner + ${t*c};\n          `,1===u){if(t<d&&(s%2==1?(h+=`\n                xCOffset = xC + 1;\n                if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${t}Ready == 0) {\n                  xTexelC${t} = getX(batch, xR, xCOffset, d1);\n\n                  // Need to manually clear unused channels in case\n                  // we're reading from recycled texture.\n                  if (xCOffset + 1 >= inDims[1]) {\n                    xTexelC${t}.zw = vec2(0.0);\n                  }\n                  xTexelC${t}Ready = 1;\n                }\n              `,h+=1===c&&t>0?`\n                xC${t} = vec4(xTexelC${t-2}.zw, xTexelC${t}.xy);\n                `:`\n                  xCOffset = xC + 1 - 2;\n\n                  if (xCOffset >= 0 && xCOffset < inDims[1]) {\n                    previous = getX(batch, xR, xCOffset, d1);\n\n                    // Need to manually clear unused channels in case\n                    // we're reading from recycled texture.\n                    if (xCOffset + 1 >= inDims[1]) {\n                      previous.zw = vec2(0.0);\n                    }\n\n                    xC${t} = vec4(previous.zw, xTexelC${t}.xy);\n                  } else {\n                    xC${t} = vec4(0.0, 0.0, xTexelC${t}.xy);\n                  }\n                  `):h+=`\n                if (xC >= 0 && xC < inDims[1] && xTexelC${t}Ready == 0) {\n                  xTexelC${t} = getX(batch, xR, xC, d1);\n                  if (xC + 1 >= inDims[1]) {\n                    xTexelC${t}.zw = vec2(0.0);\n                  }\n                  xTexelC${t}Ready = 1;\n                }\n\n                xC${t} = xTexelC${t};\n                `,t+1<d)){const e=s%2==0?o.ae.nearestLargerEven(c):c;c%2==0&&s%2==1||c%2!=0&&s%2!=1?(h+=`\n                  xCOffset = xC + imod(pads[1], 2) + ${e};\n\n                  if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${t+1}Ready == 0) {\n                    xTexelC${t+1} = getX(batch, xR, xCOffset, d1);\n\n                    // Need to manually clear unused channels in case\n                    // we're reading from recycled texture.\n                    if (xCOffset + 1 >= inDims[1]) {\n                      xTexelC${t+1}.zw = vec2(0.0);\n                    }\n                    xTexelC${t+1}Ready = 1;\n                  }\n                  `,c>1&&(h+=`\n                    xCOffset -= 2;\n                    if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${t}Ready == 0) {\n                      xTexelC${t} = getX(batch, xR, xCOffset, d1);\n                      xTexelC${t}Ready = 1;\n                    }\n                    `),h+=`\n                  xC${t+1} = vec4(xTexelC${t}.zw, xTexelC${t+1}.xy);\n                  `):h+=1===e?`\n                    xC${t+1} = xTexelC${t};\n                    `:`\n                    xCOffset = xC + ${e};\n\n                    if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${t+1}Ready == 0) {\n                      xTexelC${t+1} = getX(batch, xR, xCOffset, d1);\n                      if (xCOffset + 1 >= inDims[1]) {\n                        xTexelC${t+1}.zw = vec2(0.0);\n                      }\n                      xTexelC${t+1}Ready = 1;\n                    }\n\n                    xC${t+1} = xTexelC${t+1};\n                    `}}else t<d&&(s%2==1?(h+=`\n                xCOffset = xC + 1 - strides[1];\n                if(xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${t}Ready == 0) {\n                  xTexelC${t} = getX(batch, xR, xCOffset, d1);\n                  // Need to manually clear unused channels in case\n                  // we're reading from recycled texture.\n                  if (xCOffset + 1 >= inDims[1]) {\n                    xTexelC${t}.zw = vec2(0.0);\n                  }\n                  xTexelC${t}Ready = 1;\n                }\n\n                if(xC + 1 >= 0 && xC + 1 < inDims[1] && xTexelC${t+1}Ready == 0) {\n                  xTexelC${t+1} = getX(batch, xR, xC + 1, d1);\n                  // Need to manually clear unused channels in case\n                  // we're reading from recycled texture.\n                  if (xC + 2 >= inDims[1]) {\n                    xTexelC${t+1}.zw = vec2(0.0);\n                  }\n                  xTexelC${t+1}Ready = 1;\n                }\n\n                xC${t} = vec4(xTexelC${t}.zw, xTexelC${t+1}.zw);\n              `,t+1<d&&(h+=`\n                  final = vec4(0.0);\n                  xCOffset = xC + 1 + strides[1];\n                  if(xCOffset >= 0 && xCOffset < inDims[1]) {\n                    final = getX(batch, xR, xCOffset, d1);\n                  }\n                  xC${t+1} = vec4(xTexelC${t+1}.xy, final.xy);\n                `)):(h+=`\n                if(xC >= 0 && xC < inDims[1] && xTexelC${t}Ready == 0) {\n                  xTexelC${t} = getX(batch, xR, xC, d1);\n                  if (xC + 1 >= inDims[1]) {\n                    xTexelC${t}.zw = vec2(0.0);\n                  }\n                  xTexelC${t}Ready = 1;\n                }\n\n                xCOffset = xC + strides[1];\n                if(xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${t+1}Ready == 0) {\n                  xTexelC${t+1} = getX(batch, xR, xCOffset, d1);\n                  if (xCOffset + 1 >= inDims[1]) {\n                    xTexelC${t+1}.zw = vec2(0.);\n                  }\n                  xTexelC${t+1}Ready = 1;\n                }\n\n                xC${t} = vec4(\n                  xTexelC${t}.xy, xTexelC${t+1}.xy);\n              `,t+1<d&&(h+=`\n                  xC${t+1} = vec4(xTexelC${t}.zw, xTexelC${t+1}.zw);\n                `)));t<d&&(h+=`\n            wTexel = getW(r, ${t}, d1, q);\n            dotProd += xC${t} * vec4(wTexel.xz, wTexel.xz);\n          `,t+1<d&&(h+=`\n              wTexel = getW(r, ${t+1}, d1, q);\n              dotProd += xC${t+1} * vec4(wTexel.xz, wTexel.xz);\n            `))}h+="\n    }\n  ",h+="\n      }\n    ";let f="",m="";n&&(f=r?`vec4 activation(vec4 a) {\n          vec4 b = getPreluActivationWeightsAtOutCoords();\n          ${n}\n        }`:a?`vec4 activation(vec4 a) {\n          vec4 b = getLeakyreluAlphaAtOutCoords();\n          ${n}\n        }`:`vec4 activation(vec4 x) {\n          ${n}\n        }`,m="result = activation(result);");const g=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),a&&this.variableNames.push("leakyreluAlpha"),this.userCode=`\n      ${f}\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int batch = coords.x;\n        ivec2 xRCCorner = coords.yz * strides - pads;\n        int d2 = coords.w;\n        int d1 = d2 / ${i};\n        int q = d2 - d1 * ${i};\n        int xRCorner = xRCCorner.x;\n        int xCCorner = xRCCorner.y;\n\n        //intialize dotProd with a small epsilon seems to reduce GPU accuracy loss.\n        vec4 dotProd = vec4(0.000000000000001);\n\n        ${h}\n\n        vec4 result = dotProd - vec4(0.000000000000001);\n        ${g}\n        ${m}\n        setOutput(result);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ma={kernelName:o.P,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,filter:i}=t,{strides:s,pad:u,dilations:c,dimRoundingMode:l}=r;let d=c;null==d&&(d=[1,1]),o.ae.assert(o.md.eitherStridesOrDilationsAreOne(s,d),()=>`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${s} and dilations '${d}'`);const p=o.md.computeConv2DInfo(a.shape,i.shape,s,d,u,l,!0);let h;h=Object(o.zd)().getBool("WEBGL_PACK_DEPTHWISECONV")&&p.strideWidth<=2&&p.outChannels/p.inChannels==1?new fa(p):new ha(p);const f=[[p.padInfo.top,p.padInfo.left],[p.strideHeight,p.strideWidth],[p.dilationHeight,p.dilationWidth],[p.inHeight,p.inWidth]];return n.runWebGLProgram(h,[a,i],"float32",f)}};
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class ga{constructor(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;const t=e.strideHeight,n=e.strideWidth,r=e.padInfo.top,o=e.padInfo.left,a=e.outChannels/e.inChannels;this.userCode=`\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int wR = coords.x;\n        int wC = coords.y;\n        int d1 = coords.z;\n        int dm = coords.w;\n        int d2 = d1 * ${a} + dm;\n\n        float dotProd = 0.0;\n\n        // TO DO: Vec4 over the batch size\n        for (int b = 0; b < ${e.batchSize}; b++) {\n          for (int yR = 0; yR < ${e.outHeight}; yR++) {\n            int xR = wR + yR * ${t} - ${r};\n\n            if (xR < 0 || xR >= ${e.inHeight}) {\n              continue;\n            }\n\n            for (int yC = 0; yC < ${e.outWidth}; yC++) {\n              int xC = wC + yC * ${n} - ${o};\n\n              if (xC < 0 || xC >= ${e.inWidth}) {\n                continue;\n              }\n\n              float dyValue = getDy(b, yR, yC, d2);\n              float xValue = getX(b, xR, xC, d1);\n              dotProd += (xValue * dyValue);\n            }\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}class ba{constructor(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;const t=e.filterHeight,n=e.filterWidth,r=e.strideHeight,o=e.strideWidth,a=t-1-e.padInfo.top,i=n-1-e.padInfo.left,s=e.outChannels/e.inChannels;this.userCode=`\n      const ivec2 pads = ivec2(${a}, ${i});\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int batch = coords[0];\n        int d1 = coords[3];\n        ivec2 dyCorner = coords.yz - pads;\n        int dyRCorner = dyCorner.x;\n        int dyCCorner = dyCorner.y;\n\n        float dotProd = 0.0;\n\n        for (int wR = 0; wR < ${t}; wR++) {\n          float dyR = float(dyRCorner + wR) / ${r}.0;\n\n          if (dyR < 0.0 || dyR >= ${e.outHeight}.0 || fract(dyR) > 0.0) {\n            continue;\n          }\n          int idyR = int(dyR);\n\n          int wRPerm = ${t} - 1 - wR;\n\n          for (int wC = 0; wC < ${n}; wC++) {\n            float dyC = float(dyCCorner + wC) / ${o}.0;\n\n            if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n                fract(dyC) > 0.0) {\n              continue;\n            }\n            int idyC = int(dyC);\n\n            int wCPerm = ${n} - 1 - wC;\n\n            // TO DO: Vec4 over the channelMul\n            for (int dm = 0; dm < ${s}; dm++) {\n              int d2 = d1 * ${s} + dm;\n              float xValue = getDy(batch, idyR, idyC, d2);\n              float wValue = getW(wRPerm, wCPerm, d1, dm);\n              dotProd += xValue * wValue;\n            }\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ya={kernelName:o.Q,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,dy:i}=t,{strides:s,dilations:u,pad:c,dimRoundingMode:l,filterShape:d}=r,p=o.md.computeConv2DInfo(a.shape,d,s,u,c,l,!0),h=new ga(p);return n.runWebGLProgram(h,[a,i],"float32")}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const va={kernelName:o.R,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{dy:a,filter:i}=t,{strides:s,dilations:u,pad:c,dimRoundingMode:l,inputShape:d}=r,p=o.md.computeConv2DInfo(d,i.shape,s,u,c,l,!0),h=new ba(p);return n.runWebGLProgram(h,[a,i],"float32")}};
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class xa{constructor(e){this.variableNames=["X"],this.outputShape=[e,e],this.userCode="\n      void main() {\n          ivec2 coords = getOutputCoords();\n          float val = coords[0] == coords[1] ? getX(coords[0]) : 0.0;\n          setOutput(val);\n      }\n    "}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const wa={kernelName:o.S,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{x:r}=t,a=[...r.shape,...r.shape],i=o.ae.sizeFromShape(r.shape),s=ur({inputs:{x:r},backend:n,attrs:{shape:[i]}}),u=new xa(i),c=n.runWebGLProgram(u,[s],s.dtype),l=ur({inputs:{x:c},backend:n,attrs:{shape:a}});return n.disposeIntermediateTensorInfo(s),n.disposeIntermediateTensorInfo(c),l}};
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Oa{constructor(e){this.variableNames=["x","W"],this.outputShape=e.outShape;const{inHeight:t,inWidth:n,padInfo:r,strideHeight:o,strideWidth:a,filterHeight:i,filterWidth:s,dilationHeight:u,dilationWidth:c}=e,{top:l,left:d}=r;this.userCode=`\n      const ivec2 strides = ivec2(${o}, ${a});\n      const ivec2 pads = ivec2(${l}, ${d});\n      const float neg_infinity = -3.4e38;\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int batch = coords.x;\n        int d1 = coords.w;\n        ivec2 outTopLeftCorner =\n            coords.yz * strides - pads;\n        int hBeg = outTopLeftCorner.x;\n        int wBeg = outTopLeftCorner.y;\n\n        float curVal = neg_infinity;\n        for (int h = 0; h < ${i}; h++) {\n          int hIn = hBeg + h * ${u};\n\n          if (hIn >= 0 && hIn < ${t}) {\n            for (int w = 0; w < ${s}; w++) {\n              int wIn = wBeg + w * ${c};\n\n              if (wIn >= 0 && wIn < ${n}) {\n                float xVal = getX(batch, hIn, wIn, d1);\n                float wVal = getW(h, w, d1);\n\n                float val = xVal + wVal;\n                if (val > curVal) {\n                  curVal = val;\n                }\n              }\n            }\n          }\n        }\n\n        float result = curVal;\n        setOutput(result);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ka={kernelName:o.T,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,filter:i}=t,{strides:s,pad:u,dilations:c}=r,l=o.md.computeDilation2DInfo(a.shape,i.shape,s,u,"NHWC",c);let d;const p=new Oa(l);d=n.runWebGLProgram(p,[a,i],"float32");const h=ur({inputs:{x:d},backend:n,attrs:{shape:l.outShape}});return n.disposeIntermediateTensorInfo(d),h}};
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Sa={kernelName:o.U,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{equation:a}=r,i=t,{allDims:s,summedDims:u,idDims:c}=o.md.decodeEinsumEquation(a,i.length);o.md.checkEinsumDimSizes(s.length,c,i);const{path:l,steps:d}=o.md.getEinsumComputePath(u,c),p=d.length;let h=null,f=s.length;const m=[];for(let e=0;e<p;++e){for(const t of d[e]){const{permutationIndices:e,expandDims:r}=o.md.getEinsumPermutation(f,c[t]);let a;o.md.isIdentityPermutation(e)?a=i[t]:(a=yr({inputs:{x:i[t]},backend:n,attrs:{perm:e}}),m.push(a));const s=a.shape.slice();for(let e=0;e<r.length;++e)s.splice(r[e],0,1);o.ae.arraysEqual(a.shape,s)||(a=ur({inputs:{x:a},backend:n,attrs:{shape:s}}),m.push(a)),null===h?h=a:(h=ir({inputs:{a:a,b:h},backend:n}),m.push(h))}e<p-1&&(l[e]>=0&&(h=gr({inputs:{x:h},backend:n,attrs:{axis:l[e]-(s.length-f),keepDims:!1}}),m.push(h)),f--)}for(const e of m)e!==h&&n.disposeIntermediateTensorInfo(e);return h}},Ta=Zn({opSnippet:"return (x >= 0.0) ? x : (exp(x) - 1.0);",packedOpSnippet:"\n  vec4 result;\n\n  result.r = (x.r >= 0.0) ? x.r : (exp(x.r) - 1.0);\n  result.g = (x.g >= 0.0) ? x.g : (exp(x.g) - 1.0);\n  result.b = (x.b >= 0.0) ? x.b : (exp(x.b) - 1.0);\n  result.a = (x.a >= 0.0) ? x.a : (exp(x.a) - 1.0);\n\n  return result;\n"}),Ca={kernelName:o.V,backendName:"webgl",kernelFunc:Ta},Ea={kernelName:o.W,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n}=e,{dy:r,y:a}=t,i=Object(o.zd)().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new zn("\n  vec4 bGTEZero = vec4(greaterThanEqual(b, vec4(0.)));\n  return (bGTEZero * a) + ((vec4(1.0) - bGTEZero) * (a * (b + vec4(1.0))));\n",r.shape,a.shape):new Bn("return (b >= 1.0) ? a : a * (b + 1.0);",r.shape,a.shape);return n.runWebGLProgram(i,[r,a],r.dtype)}},Ia=Jn({opSnippet:"return float(a == b);",packedOpSnippet:"\n  return vec4(equal(a, b));\n",dtype:"bool",cpuKernelImpl:Lt}),ja={kernelName:o.X,backendName:"webgl",kernelFunc:Ia},Na=Zn({opSnippet:`\n  // Error function is calculated approximately with elementary function.\n  // See "Handbook of Mathematical Functions with Formulas,\n  // Graphs, and Mathematical Tables", Abramowitz and Stegun.\n  float p = ${o.md.ERF_P};\n  float a1 = ${o.md.ERF_A1};\n  float a2 = ${o.md.ERF_A2};\n  float a3 = ${o.md.ERF_A3};\n  float a4 = ${o.md.ERF_A4};\n  float a5 = ${o.md.ERF_A5};\n\n  float sign = sign(x);\n  x = abs(x);\n  float t = 1.0 / (1.0 + p * x);\n  return sign * (1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x*x));\n`}),Aa={kernelName:o.Y,backendName:"webgl",kernelFunc:Na},Ra=Zn({opSnippet:"if (isnan(x)) return x;\n  return exp(x);\n",packedOpSnippet:"\n  vec4 result = exp(x);\n  bvec4 isNaN = isnan(x);\n  result.r = isNaN.r ? x.r : result.r;\n  result.g = isNaN.g ? x.g : result.g;\n  result.b = isNaN.b ? x.b : result.b;\n  result.a = isNaN.a ? x.a : result.a;\n\n  return result;\n",cpuKernelImpl:Bt,dtype:"float32"}),_a={kernelName:o.Z,backendName:"webgl",kernelFunc:Ra};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function $a(e){const{inputs:t,attrs:n,backend:r}=e,{dim:a}=n,{input:i}=t,s=i.shape.length,u=i.shape.slice();let c=a;return a<0&&(o.ae.assert(-(s+1)<=a,()=>`Axis must be in the interval [${-(s+1)}, ${s}]`),c=s+a+1),u.splice(c,0,1),ur({inputs:{x:i},backend:r,attrs:{shape:u}})}const Fa={kernelName:o.ab,backendName:"webgl",kernelFunc:$a},Da="return exp(x) - 1.0;",Ma=Zn({opSnippet:Da,packedOpSnippet:Da,cpuKernelImpl:zt}),Pa={kernelName:o.bb,backendName:"webgl",kernelFunc:Ma};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class La{constructor(e,t,n){this.variableNames=["real","imag"];const r=t[1];this.outputShape=t;const o=n?"2.0 * "+Math.PI:"-2.0 * "+Math.PI,a=n?r+".0":"1.0";let i;if("real"===e)i="return real * expR - imag * expI;";else{if("imag"!==e)throw new Error(`FFT component must be either "real" or "imag", got ${e}.`);i="return real * expI + imag * expR;"}this.userCode=`\n      const float exponentMultiplier = ${o};\n\n      float unaryOpComplex(float real, float expR, float imag, float expI) {\n        ${i}\n      }\n\n      float mulMatDFT(int batch, int index) {\n        float indexRatio = float(index) / float(${r});\n        float exponentMultiplierTimesIndexRatio =\n            exponentMultiplier * indexRatio;\n\n        float result = 0.0;\n\n        for (int i = 0; i < ${r}; i++) {\n          // x = (-2|2 * PI / N) * index * i;\n          float x = exponentMultiplierTimesIndexRatio * float(i);\n          float expR = cos(x);\n          float expI = sin(x);\n          float real = getReal(batch, i);\n          float imag = getImag(batch, i);\n\n          result +=\n              unaryOpComplex(real, expR, imag, expI) / ${a};\n        }\n\n        return result;\n      }\n\n      void main() {\n        ivec2 coords = getOutputCoords();\n        setOutput(mulMatDFT(coords[0], coords[1]));\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Ba(e,t,n){const r=n.texData.get(e.dataId),a=o.ae.sizeFromShape(e.shape),i=e.shape[e.shape.length-1],s=ur({inputs:{x:e},backend:n,attrs:{shape:[a/i,i]}}),u=s.shape,c=new La("real",u,t),l=new La("imag",u,t),d=[{dataId:r.complexTensorInfos.real.dataId,dtype:r.complexTensorInfos.real.dtype,shape:u},{dataId:r.complexTensorInfos.imag.dataId,dtype:r.complexTensorInfos.imag.dtype,shape:u}],p=n.runWebGLProgram(c,d,"float32"),h=n.runWebGLProgram(l,d,"float32"),f=Wn({inputs:{real:p,imag:h},backend:n});n.disposeIntermediateTensorInfo(p),n.disposeIntermediateTensorInfo(h);const m=ur({inputs:{x:f},backend:n,attrs:{shape:e.shape}});return n.disposeIntermediateTensorInfo(s),n.disposeIntermediateTensorInfo(f),m}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const za={kernelName:o.cb,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{input:r}=t;return Ba(r,!1,n)}};
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Ua{constructor(e,t){this.outputShape=[],this.customUniforms=[{name:"value",type:"float"}],this.variableNames=["x"],this.outputShape=e,this.userCode="\n      void main() {\n        // Input can be obtained from uniform value.\n        setOutput(value);\n      }\n    "}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Va(e){const{backend:t,attrs:n}=e,{shape:r,value:a}=n;let{dtype:i}=n;if(i=i||o.ae.inferDtype(a),"string"===i){const e=o.ae.getArrayFromDType(i,o.ae.sizeFromShape(r));return e.fill(a),t.makeTensorInfo(r,i,e)}{const e=new Ua(r,a),n=[[a]];return t.runWebGLProgram(e,[],i,n)}}const Wa={kernelName:o.db,backendName:"webgl",kernelFunc:Va};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Ga{constructor(e){this.variableNames=["Image"],this.outputShape=[];const t=e[2];this.outputShape=e,this.userCode=`\n        void main() {\n          ivec4 coords = getOutputCoords();\n          int x = coords[2];\n\n          int coordX = ${t} - x - 1;\n          float outputValue;\n          if(coordX >= 0 && coordX < ${t}) {\n            outputValue = getImage(coords[0], coords[1], coordX, coords[3]);\n          } else {\n            outputValue = getImage(coords[0], coords[1], coords[2], coords[3]);\n          }\n          setOutput(outputValue);\n        }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Ha={kernelName:o.eb,backendName:"webgl",kernelFunc:({inputs:e,backend:t})=>{const{image:n}=e,r=t,o=new Ga(n.shape);return r.runWebGLProgram(o,[n],n.dtype)}},qa="return floor(x);",Ka=Zn({opSnippet:qa,packedOpSnippet:qa,cpuKernelImpl:Ut}),Xa={kernelName:o.fb,backendName:"webgl",kernelFunc:Ka},Ya=Jn({opSnippet:"\n  float s = sign(a) * sign(b);\n  int ia = round(a);\n  int ib = round(b);\n  if (ib != 0) {\n    // Windows (D3D) wants guaranteed non-zero int division at compile-time.\n    return float(idiv(ia, ib, s));\n  } else {\n    return NAN;\n  }\n",packedOpSnippet:"\n  ivec4 ia = round(a);\n  ivec4 ib = round(b);\n  bvec4 cond = notEqual(ib, ivec4(0));\n  ivec4 result = ivec4(0);\n  vec4 s = sign(a) * sign(b);\n\n  // Windows (D3D) wants guaranteed non-zero int division at compile-time.\n  if (cond[0]) {\n    result[0] = idiv(ia[0], ib[0], s[0]);\n  }\n  if (cond[1]) {\n    result[1] = idiv(ia[1], ib[1], s[1]);\n  }\n  if (cond[2]) {\n    result[2] = idiv(ia[2], ib[2], s[2]);\n  }\n  if (cond[3]) {\n    result[3] = idiv(ia[3], ib[3], s[3]);\n  }\n  return vec4(result);\n",dtype:"int32"}),Qa={kernelName:o.gb,backendName:"webgl",kernelFunc:Ya};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class Za{constructor(e){this.variableNames=["A"];const t=z(),[n,r]=e;this.outputShape=e,this.userCode=`\n      void main() {\n        ivec3 coords = getOutputCoords();\n        int texR = coords[0];\n        int texC = coords[1];\n        int depth = coords[2];\n        vec2 uv = (vec2(texC, texR) + halfCR) / vec2(${r}.0, ${n}.0);\n\n        vec4 values = ${t.texture2D}(A, uv);\n        float value;\n        if (depth == 0) {\n          value = values.r;\n        } else if (depth == 1) {\n          value = values.g;\n        } else if (depth == 2) {\n          value = values.b;\n        } else if (depth == 3) {\n          value = values.a;\n        }\n\n        setOutput(floor(value * 255.0 + 0.5));\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Ja{constructor(e){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0;const t=z(),[n,r]=e;this.outputShape=e,this.userCode=`\n      void main() {\n        ivec3 coords = getOutputCoords();\n        int texR = coords[0];\n        int texC = coords[1];\n        int depth = coords[2];\n\n        vec4 result = vec4(0.);\n\n        for(int row=0; row<=1; row++) {\n          for(int col=0; col<=1; col++) {\n            texC = coords[1] + row;\n            depth = coords[2] + col;\n\n            vec2 uv = (vec2(texC, texR) + halfCR) /\n                       vec2(${r}.0, ${n}.0);\n            vec4 values = ${t.texture2D}(A, uv);\n            float value;\n            if (depth == 0) {\n              value = values.r;\n            } else if (depth == 1) {\n              value = values.g;\n            } else if (depth == 2) {\n              value = values.b;\n            } else if (depth == 3) {\n              value = values.a;\n            }\n\n            result[row * 2 + col] = floor(value * 255.0 + 0.5);\n          }\n        }\n\n        ${t.output} = result;\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ei={kernelName:o.hb,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;let{pixels:a}=t;const{numChannels:i}=r,s="undefined"!=typeof HTMLVideoElement&&a instanceof HTMLVideoElement,u="undefined"!=typeof HTMLImageElement&&a instanceof HTMLImageElement,[l,d]=s?[a.videoWidth,a.videoHeight]:[a.width,a.height],p=[d,l],h=[d,l,i];(u||s)&&(null==ti&&(ti=document.createElement("canvas").getContext("2d")),ti.canvas.width=l,ti.canvas.height=d,ti.drawImage(a,0,0,l,d),a=ti.canvas);const f=n.makeTensorInfo(p,"int32");n.texData.get(f.dataId).usage=c.PIXELS,n.gpgpu.uploadPixelDataToTexture(n.getTexture(f.dataId),a);const m=Object(o.zd)().getBool("WEBGL_PACK")?new Ja(h):new Za(h),g=n.runWebGLProgram(m,[f],"int32");return n.disposeData(f.dataId),g}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */};let ti;const ni={kernelName:o.jb,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,filter:i,bias:s,preluActivationWeights:u}=t,{strides:c,pad:l,dataFormat:d,dilations:p,dimRoundingMode:h,activation:f,leakyreluAlpha:m}=r,g=o.md.convertConv2DDataFormat(d),b=o.md.computeConv2DInfo(a.shape,i.shape,c,p,l,h,!1,g);let y;const v=[];if(1!==b.filterHeight||1!==b.filterWidth||1!==b.dilationHeight||1!==b.dilationWidth||1!==b.strideHeight||1!==b.strideWidth||"SAME"!==b.padInfo.type&&"VALID"!==b.padInfo.type)if(Object(o.zd)().getBool("WEBGL_CONV_IM2COL")&&1===a.shape[0])y=Vo({x:a,filter:i,convInfo:b,backend:n,bias:s,activation:f,preluActivationWeights:u,leakyreluAlpha:m});else{const e=null!=s,t=null!=u,r="leakyrelu"===f,c=f?er(f,!1):null,l=new Lo(b,e,c,t,r),d=[a,i];if(s&&d.push(s),u&&d.push(u),r){const e=n.makeTensorInfo([],"float32",o.ae.createScalarValue(m,"float32"));d.push(e),v.push(e)}y=n.runWebGLProgram(l,d,"float32")}else y=Uo({x:a,filter:i,convInfo:b,backend:n,bias:s,activation:f,preluActivationWeights:u,leakyreluAlpha:m});const x=ur({inputs:{x:y},backend:n,attrs:{shape:b.outShape}});return v.push(y),v.forEach(e=>n.disposeIntermediateTensorInfo(e)),x}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ri={kernelName:o.kb,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,filter:i,bias:s,preluActivationWeights:u}=t,{strides:c,pad:l,dilations:d,dimRoundingMode:p,activation:h,leakyreluAlpha:f}=r,m=[];let g=d;null==g&&(g=[1,1]),o.ae.assert(o.md.eitherStridesOrDilationsAreOne(c,g),()=>`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${c} and dilations '${g}'`);const b=o.md.computeConv2DInfo(a.shape,i.shape,c,g,l,p,!0),y=Object(o.zd)().getBool("WEBGL_PACK_DEPTHWISECONV")&&b.strideWidth<=2&&b.outChannels/b.inChannels==1,v=h?er(h,y):null,x=[a,i],w=null!=s,O=null!=u,k="leakyrelu"===h;if(w&&x.push(s),O&&x.push(u),k){const e=n.makeTensorInfo([],"float32",o.ae.createScalarValue(f,"float32"));x.push(e),m.push(e)}let S;S=y?new fa(b,w,v,O,k):new ha(b,w,v,O,k);const T=[[b.padInfo.top,b.padInfo.left],[b.strideHeight,b.strideWidth],[b.dilationHeight,b.dilationWidth],[b.inHeight,b.inWidth]],C=n.runWebGLProgram(S,x,"float32",T);return m.forEach(e=>n.disposeIntermediateTensorInfo(e)),C}};class oi{constructor(e,t,n){this.sliceDim=e,this.strides=t,this.variableNames=["x","indices"],this.outputShape=n;const r=oe(t.length),o=oe(n.length),a=this.sliceDim>1?"strides[j]":"strides";this.userCode=`\n        ${r} strides = ${r}(${this.strides});\n         void main() {\n          ${o} coords = getOutputCoords();\n          int flattenIndex = 0;\n          for (int j = 0; j < ${this.sliceDim}; j++) {\n            int index = round(getIndices(coords[0], j));\n            flattenIndex += index * ${a};\n          }\n          setOutput(getX(flattenIndex, coords[1]));\n        }\n      `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ai={kernelName:o.lb,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{params:r,indices:a}=t,i=a.shape,s=i[i.length-1],u=o.ae.sizeFromShape(r.shape),[c,l,d,p]=o.md.prepareAndValidate(r,a),h=ur({inputs:{x:a},backend:n,attrs:{shape:[l,s]}}),f=ur({inputs:{x:r},backend:n,attrs:{shape:[o.ae.sizeFromShape(r.shape)/d,d]}});if(n.shouldExecuteOnCPU([r,a])||"string"===r.dtype){const e=n.readSync(a.dataId),t=n.bufferSync(r),o=Vt(e,t,r.dtype,l,s,d,p,r.shape,u);return n.makeTensorInfo(c,r.dtype,o.values)}const m=new oi(s,p,[l,d]),g=n.runWebGLProgram(m,[f,h],f.dtype),b=ur({inputs:{x:g},backend:n,attrs:{shape:c}});return n.disposeIntermediateTensorInfo(h),n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(g),b}};
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class ii{constructor(e,t){this.variableNames=["A","indices"],this.outputShape=t,this.rank=t.length;const n=oe(this.rank),r=function(e,t){const n=["resRC.x","resRC.y","resRC.z","resRC.w"],r=[];for(let t=0;t<e.length;t++)2===t?r.push("index"):r.push(""+n[t]);return r.join()}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */(e);this.userCode=`\n      void main() {\n        ${n} resRC = getOutputCoords();\n        int index = int(getIndices(resRC.x, resRC.z));\n        float inBounds = (index >= 0) && (index < ${e[2]}) ? 1.0 : 0.0;\n        setOutput(inBounds * getA(${r}));\n      }\n    `}}function si(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,indices:i}=t,{axis:s,batchDims:u}=r,c=o.ae.parseAxisParam(s,a.shape)[0];if(Object(o.zd)().get("DEBUG")){const e=n.readSync(i.dataId),t=a.shape[c];for(let n=0;n<e.length;++n){const r=e[n];o.ae.assert(r<=t-1&&r>=0,()=>`GatherV2: the index value ${r} is not in [0, ${t-1}]`)}}const l=o.md.segment_util.collectGatherOpShapeInfo(a,i,c,u),d=o.ae.sizeFromShape(i.shape),p=[],h=ur({inputs:{x:a},backend:n,attrs:{shape:[l.batchSize,l.outerSize,l.dimSize,l.sliceSize]}}),f=ur({inputs:{x:i},backend:n,attrs:{shape:[l.batchSize,d/l.batchSize]}});p.push(h),p.push(f);const m=[l.batchSize,l.outerSize,d/l.batchSize,l.sliceSize];if(n.shouldExecuteOnCPU([a,i])||"string"===a.dtype){const e=n.bufferSync(f),t=n.bufferSync(h),r=Wt(t,e,m);return p.forEach(e=>n.disposeIntermediateTensorInfo(e)),n.makeTensorInfo(l.outputShape,r.dtype,r.values)}const g=new ii(h.shape,m),b=n.runWebGLProgram(g,[h,f],h.dtype);p.push(b);const y=ur({inputs:{x:b},backend:n,attrs:{shape:l.outputShape}});return p.forEach(e=>n.disposeIntermediateTensorInfo(e)),y}const ui={kernelName:o.mb,backendName:"webgl",kernelFunc:si},ci=Jn({opSnippet:"return float(a > b);",packedOpSnippet:"\n  return vec4(greaterThan(a, b));\n",cpuKernelImpl:Gt,dtype:"bool"}),li={kernelName:o.nb,backendName:"webgl",kernelFunc:ci},di=Jn({opSnippet:"return float(a >= b);",packedOpSnippet:"\n  return vec4(greaterThanEqual(a, b));\n",dtype:"bool",cpuKernelImpl:Ht}),pi={kernelName:o.ob,backendName:"webgl",kernelFunc:di};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const hi={kernelName:o.pb,backendName:"webgl",kernelFunc:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const{inputs:t,backend:n}=e,{input:r}=t;return Ba(r,!0,n)}},fi=Zn({opSnippet:"return float(!isnan(x) && !isinf(x));",dtype:"bool"}),mi={kernelName:o.sb,backendName:"webgl",kernelFunc:fi},gi=Zn({opSnippet:"return float(isinf(x));",dtype:"bool"}),bi={kernelName:o.tb,backendName:"webgl",kernelFunc:gi},yi=Zn({opSnippet:"return float(isnan(x));",dtype:"bool"}),vi={kernelName:o.ub,backendName:"webgl",kernelFunc:yi},xi=Jn({opSnippet:"return float(a < b);",packedOpSnippet:"\n  return vec4(lessThan(a, b));\n",cpuKernelImpl:qt,dtype:"bool"}),wi={kernelName:o.zb,backendName:"webgl",kernelFunc:xi},Oi=Jn({opSnippet:"return float(a <= b);",packedOpSnippet:"\n  return vec4(lessThanEqual(a, b));\n",cpuKernelImpl:Kt,dtype:"bool"}),ki={kernelName:o.Ab,backendName:"webgl",kernelFunc:Oi};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Si={kernelName:o.Bb,backendName:"webgl",kernelFunc:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const{backend:t,attrs:n}=e,{start:r,stop:o,num:a}=n,i=Xt(r,o,a);return t.makeTensorInfo([i.length],"float32",i)}},Ti=Zn({opSnippet:"if (isnan(x)) return x;\n  return x < 0.0 ? 0./0. : log(x);\n",packedOpSnippet:"\n  vec4 result = log(x);\n  bvec4 isNaN = isnan(x);\n  result.r = isNaN.r ? x.r : (x.r < 0.0 ? 0./0. : result.r);\n  result.g = isNaN.g ? x.g : (x.g < 0.0 ? 0./0. : result.g);\n  result.b = isNaN.b ? x.b : (x.b < 0.0 ? 0./0. : result.b);\n  result.a = isNaN.a ? x.a : (x.a < 0.0 ? 0./0. : result.a);\n  return result;\n",cpuKernelImpl:Yt}),Ci={kernelName:o.Cb,backendName:"webgl",kernelFunc:Ti},Ei=Zn({opSnippet:"if (isnan(x)) return x;\n  return log(1.0 + x);\n"}),Ii={kernelName:o.Db,backendName:"webgl",kernelFunc:Ei},ji=Jn({opSnippet:"return float(a >= 1.0 && b >= 1.0);",packedOpSnippet:"\n  return vec4(\n    vec4(greaterThanEqual(a, vec4(1.0))) *\n    vec4(greaterThanEqual(b, vec4(1.0))));\n",dtype:"bool"}),Ni={kernelName:o.Eb,backendName:"webgl",kernelFunc:ji},Ai=Zn({opSnippet:"return float(!(x >= 1.0));"}),Ri={kernelName:o.Fb,backendName:"webgl",kernelFunc:Ai},_i=Jn({opSnippet:"return float(a >= 1.0 || b >= 1.0);",packedOpSnippet:"\n  return min(\n    vec4(greaterThanEqual(a, vec4(1.0))) +\n    vec4(greaterThanEqual(b, vec4(1.0))),\n    vec4(1.0));\n",dtype:"bool"}),$i={kernelName:o.Gb,backendName:"webgl",kernelFunc:_i};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class Fi{constructor(e,t,n,r,o){this.variableNames=["x"],this.outputShape=[];const a=t,i=e[3]-1;let s;this.outputShape=e;const u=`float(${n}) + float(${r}) * sum`;s=.5===o?`inversesqrt(${u})`:1===o?`1.0/(${u})`:`exp(log(${u}) * float(-${o}));`,this.userCode=`\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int r = coords[1];\n        int c = coords[2];\n        int d = coords[3];\n        float x = getX(b, r, c, d);\n        float sum = 0.0;\n        for (int j = -${a}; j <= ${a}; j++) {\n          int idx = d + j;\n          if (idx >= 0 && idx <=  ${i}) {\n            float z = getX(b, r, c, idx);\n            sum += z * z;\n          }\n        }\n        float val = x * ${s};\n        setOutput(val);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Di{constructor(e,t,n,r,o){this.variableNames=["x"],this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0;const a=t,i=e[3]-1;let s;this.outputShape=e;const u=`float(${n}) + float(${r}) * sum`;s=.5===o?`inversesqrt(${u})`:1===o?`1.0/(${u})`:`exp(log(${u}) * float(-${o}));`,this.userCode=`\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords.x;\n        int r = coords.y;\n        int c = coords.z;\n        int d = coords.w;\n\n        bool hasNextCol = d < ${this.outputShape[3]};\n        bool hasNextRow = c < ${this.outputShape[2]};\n\n        vec4 sum = vec4(0.);\n        vec4 xFragAtOutputCoords = getX(b, r, c, d);\n\n        vec4 xAtOutputCoords = vec4(\n          getChannel(xFragAtOutputCoords, vec2(c, d)),\n          hasNextCol ?\n            getChannel(xFragAtOutputCoords, vec2(c, d + 1)) : 0.0,\n          hasNextRow ?\n            getChannel(xFragAtOutputCoords , vec2(c + 1, d)) : 0.0,\n          (hasNextRow && hasNextCol) ?\n            getChannel(xFragAtOutputCoords, vec2(c + 1, d + 1)) : 0.0\n        );\n\n        int firstChannel = d - ${a};\n        vec2 cache = vec2(0.);\n        if(firstChannel >= 0){\n          vec4 firstChannelFrag = getX(b, r, c, firstChannel);\n          cache.x = getChannel(firstChannelFrag, vec2(c, firstChannel));\n            if(hasNextRow){\n              cache.y = getChannel(firstChannelFrag, vec2(c + 1, firstChannel));\n            }\n        }\n\n        ivec2 depth = ivec2(d, d + 1);\n        for (int j = - ${a}; j <= ${a}; j++) {\n          ivec2 idx = depth + j;\n          bvec2 aboveLowerBound = greaterThanEqual(idx, ivec2(0));\n          bvec2 belowUpperBound = lessThanEqual(idx, ivec2(${i}));\n\n          bool depthInRange = aboveLowerBound.x && belowUpperBound.x;\n          bool depthPlusOneInRange = aboveLowerBound.y && belowUpperBound.y;\n\n          if(depthInRange || depthPlusOneInRange){\n            vec4 z = vec4(0.);\n            vec4 xFragAtCurrentDepth;\n            z.xz = cache.xy;\n            if(depthPlusOneInRange && hasNextCol){\n              xFragAtCurrentDepth = idx.y != d ?\n                getX(b, r, c, idx.y) : xFragAtOutputCoords;\n              z.y = getChannel(xFragAtCurrentDepth, vec2(c, idx.y));\n              if(hasNextRow){\n                z.w = getChannel(xFragAtCurrentDepth, vec2(c + 1, idx.y));\n              }\n            }\n            cache.xy = z.yw;\n            sum += z * z;\n          }\n        }\n        vec4 result = xAtOutputCoords * ${s};\n        setOutput(result);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Mi={kernelName:o.wb,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{depthRadius:i,bias:s,alpha:u,beta:c}=r,l=Object(o.zd)().getBool("WEBGL_PACK_NORMALIZATION")?new Di(a.shape,i,s,u,c):new Fi(a.shape,i,s,u,c);return n.runWebGLProgram(l,[a],a.dtype)}};
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class Pi{constructor(e,t,n,r,o){this.variableNames=["inputImage","outputImage","dy"],this.outputShape=[],this.outputShape=e,this.depth=e[3],this.depthRadius=t,this.bias=n,this.alpha=r,this.beta=o,this.userCode=`\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int r = coords[1];\n        int c = coords[2];\n\n        float result = 0.0;\n        for (int d = 0; d < ${this.depth}; ++d) {\n          int depthBegin = int(max(0.0, float(d - ${t})));\n          int depthEnd = int(min(float(${this.depth}),\n              float(d + ${t} + 1)));\n\n          const int MIN_DEPTH_BEGIN = 0;\n          const int MAX_DEPTH_END = ${this.depth};\n\n          float norm = 0.0;\n          for (int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k) {\n            if (k < depthBegin){\n              continue;\n            }\n            else if (k >= depthBegin && k < depthEnd) {\n              norm += getInputImage(b, r, c, k) * getInputImage(b, r, c, k);\n            }\n            else {\n              break;\n            }\n          }\n\n          norm = float(${r}) * norm + float(${n});\n\n          for(int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k){\n            if (k < depthBegin){\n              continue;\n            }\n            else if (k >= depthBegin && k < depthEnd){\n              float dyi = -2.0 * float(${r})\n                * float(${o})\n                * getInputImage(b ,r ,c, k) * getOutputImage(b, r, c, d)\n                / norm;\n              if (k == d) {\n                dyi += pow(norm, -1.0 * ${o});\n              }\n              if (k == coords[3]) {\n                dyi *= getDy(b, r, c, d);\n                result += dyi;\n              }\n            }\n            else {\n              break;\n            }\n          }\n      }\n      setOutput(result);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Li={kernelName:o.xb,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n,attrs:r}=e,{x:o,y:a,dy:i}=t,{depthRadius:s,bias:u,alpha:c,beta:l}=r,d=new Pi(o.shape,s,u,c,l);return n.runWebGLProgram(d,[o,a,i],o.dtype)}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function Bi(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{reductionIndices:i,keepDims:s}=r,u=a.shape.length,c=o.ae.parseAxisParam(i,a.shape);let l=c;const d=o.md.getAxesPermutation(l,u),p=null!=d,h=n.shouldExecuteOnCPU([a]);let f=a;if(p){if(h){const e=n.texData.get(f.dataId).values,t=new Array(u);for(let e=0;e<t.length;e++)t[e]=a.shape[d[e]];const r=wn(e,a.shape,a.dtype,d,t);f=n.makeTensorInfo(t,a.dtype);n.texData.get(f.dataId).values=r}else f=mr(a,d,n);l=o.md.getInnerMostAxes(l.length,u)}o.md.assertAxesAreInnerMostDims("max",l,u);const[m,g]=o.md.computeOutAndReduceShapes(f.shape,l);let b,y=m;if(s&&(y=o.md.expandShapeToKeepDim(m,c)),h){const e=n.texData.get(f.dataId).values,t=Qt(e,o.ae.sizeFromShape(g),y,a.dtype);b=n.makeTensorInfo(y,a.dtype);n.texData.get(b.dataId).values=t}else b=
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e,t,n,r){const a=o.ae.sizeFromShape(t),i=ur({inputs:{x:e},attrs:{shape:[o.ae.sizeFromShape(e.shape)/a,a]},backend:r}),s=pr(i,e.dtype,"max",r),u=ur({inputs:{x:s},attrs:{shape:n},backend:r});return r.disposeIntermediateTensorInfo(i),r.disposeIntermediateTensorInfo(s),u}(f,g,y,n);return p&&n.disposeIntermediateTensorInfo(f),b}const zi={kernelName:o.Hb,backendName:"webgl",kernelFunc:Bi},Ui=Jn({opSnippet:"\n  if (isnan(a)) return a;\n  if (isnan(b)) return b;\n\n  return max(a, b);\n",packedOpSnippet:"\n  vec4 result = vec4(max(a, b));\n  vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n  \n  result.r = isNaN.r > 0. ? NAN : result.r;\n  result.g = isNaN.g > 0. ? NAN : result.g;\n  result.b = isNaN.b > 0. ? NAN : result.b;\n  result.a = isNaN.a > 0. ? NAN : result.a;\n\n  return result;\n",cpuKernelImpl:Zt}),Vi={kernelName:o.Nb,backendName:"webgl",kernelFunc:Ui};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Wi={kernelName:o.Ib,backendName:"webgl",kernelFunc:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t;L(a,"maxPool");const{filterSize:i,strides:s,pad:u,dimRoundingMode:c}=r;o.ae.assert(o.md.eitherStridesOrDilationsAreOne(s,1),()=>`Error in maxPool: Either strides or dilations must be 1. Got strides ${s} and dilations '1'`);const l=o.md.computePool2DInfo(a.shape,i,s,1,u,c);if(1===l.filterWidth&&1===l.filterHeight&&o.ae.arraysEqual(l.inShape,l.outShape))return Un({inputs:{x:a},backend:n});const d=new Yr(l,"max",!1);return n.runWebGLProgram(d,[a],a.dtype)}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Gi={kernelName:o.Jb,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{filterSize:i,strides:s,pad:u,dataFormat:c,dimRoundingMode:l}=r,d=o.md.computePool3DInfo(a.shape,i,s,[1,1,1],u,l,c),p=new Qr(d,"max",!1);return n.runWebGLProgram(p,[a],a.dtype)}};
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Hi{constructor(e){this.variableNames=["dy","maxPos"],this.outputShape=e.inShape;const t=e.strideHeight,n=e.strideWidth,r=e.dilationHeight,o=e.effectiveFilterHeight,a=e.effectiveFilterWidth,i=o-1-e.padInfo.top,s=a-1-e.padInfo.left,u=o*a-1;this.userCode=`\n      const ivec2 pads = ivec2(${i}, ${s});\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int d = coords[3];\n\n        ivec2 dyRCCorner = coords.yz - pads;\n        int dyRCorner = dyRCCorner.x;\n        int dyCCorner = dyRCCorner.y;\n\n        // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n        // ? = to be determined. : = across all values in that axis.\n        float dotProd = 0.0;\n        for (int wR = 0; wR < ${o};\n          wR += ${r}) {\n          float dyR = float(dyRCorner + wR) / ${t}.0;\n\n          if (dyR < 0.0 || dyR >= ${e.outHeight}.0 || fract(dyR) > 0.0) {\n            continue;\n          }\n          int idyR = int(dyR);\n\n          for (int wC = 0; wC < ${a}; wC++) {\n            float dyC = float(dyCCorner + wC) / ${n}.0;\n\n            if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n                fract(dyC) > 0.0) {\n              continue;\n            }\n            int idyC = int(dyC);\n\n            float dyValue = getDy(b, idyR, idyC, d);\n            int maxPosValue = ${u} - int(getMaxPos(b, idyR, idyC, d));\n\n            // Get the current value, check it against the value from the\n            // position matrix.\n            int curPosValue = wR * ${a} + wC;\n            float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);\n\n            dotProd += dyValue * mask;\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}class qi{constructor(e){this.variableNames=["dy","maxPos"],this.outputShape=e.inShape;const t=e.strideDepth,n=e.strideHeight,r=e.strideWidth,o=e.dilationDepth,a=e.dilationHeight,i=e.dilationWidth,s=e.effectiveFilterDepth,u=e.effectiveFilterHeight,c=e.effectiveFilterWidth,l=s-1-e.padInfo.front,d=u-1-e.padInfo.top,p=c-1-e.padInfo.left,h=s*u*c-1;this.userCode=`\n      const ivec3 pads = ivec3(${l}, ${d}, ${p});\n\n      void main() {\n        ivec5 coords = getOutputCoords();\n        int batch = coords.x;\n        int ch = coords.u;\n\n        ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n        int dyDCorner = dyCorner.x;\n        int dyRCorner = dyCorner.y;\n        int dyCCorner = dyCorner.z;\n\n        // Convolve dy(?, ?, ?, ch) with pos mask(:, :, :, d) to get\n        // dx(xD, xR, xC, ch).\n        // ? = to be determined. : = across all values in that axis.\n        float dotProd = 0.0;\n\n        for (int wD = 0; wD < ${s};\n           wD += ${o}) {\n          float dyD = float(dyDCorner + wD) / ${t}.0;\n\n          if (dyD < 0.0 || dyD >= ${e.outDepth}.0 || fract(dyD) > 0.0) {\n            continue;\n          }\n          int idyD = int(dyD);\n\n          for (int wR = 0; wR < ${u};\n              wR += ${a}) {\n            float dyR = float(dyRCorner + wR) / ${n}.0;\n\n            if (dyR < 0.0 || dyR >= ${e.outHeight}.0 ||\n                fract(dyR) > 0.0) {\n              continue;\n            }\n            int idyR = int(dyR);\n\n            for (int wC = 0; wC < ${c};\n                wC += ${i}) {\n              float dyC = float(dyCCorner + wC) / ${r}.0;\n\n              if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n                  fract(dyC) > 0.0) {\n                continue;\n              }\n              int idyC = int(dyC);\n\n              float dyValue = getDy(batch, idyD, idyR, idyC, ch);\n              int maxPosValue = ${h} -\n                  int(getMaxPos(batch, idyD, idyR, idyC, ch));\n\n              // Get the current value, check it against the value from the\n              // position matrix.\n              int curPosValue =\n                  wD * ${u} * ${c} +\n                  wR * ${c} + wC;\n              float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);\n\n              dotProd += dyValue * mask;\n            }\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Ki={kernelName:o.Kb,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{dy:a,input:i}=t,s=i,{filterSize:u,strides:c,pad:l,dimRoundingMode:d}=r,p=o.md.computePool3DInfo(s.shape,u,c,[1,1,1],l,d),h=new Qr(p,"max",!0),f=n.runWebGLProgram(h,[s],s.dtype),m=new qi(p),g=n.runWebGLProgram(m,[a,f],s.dtype);return n.disposeIntermediateTensorInfo(f),g}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Xi={kernelName:o.Lb,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{dy:a,input:i,output:s}=t,u=i;L([i,s],"maxPoolGrad");const{filterSize:c,strides:l,pad:d,dimRoundingMode:p}=r,h=o.md.computePool2DInfo(u.shape,c,l,1,d,p),f=new Yr(h,"max",!0),m=n.runWebGLProgram(f,[u],u.dtype),g=new Hi(h),b=n.runWebGLProgram(g,[a,m],u.dtype);return n.disposeIntermediateTensorInfo(m),b}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const Yi={kernelName:o.Mb,backendName:"webgl",kernelFunc:({inputs:e,attrs:t,backend:n})=>{const{x:r}=e,{filterSize:a,strides:i,pad:s,includeBatchInIndex:u}=t,c=n;o.ae.assert(4===r.shape.length,()=>`Error in maxPool: input must be rank 4 but got rank ${r.shape.length}.`);const l=[1,1];o.ae.assert(o.md.eitherStridesOrDilationsAreOne(i,l),()=>`Error in maxPool: Either strides or dilations must be 1. Got strides ${i} and dilations '${l}'`);const d=o.md.computePool2DInfo(r.shape,a,i,l,s),[p,h]=function(e,t,n,r){let o=new Yr(n,"max",!1);const a=r.runWebGLProgram(o,[e],"float32");return o=new Yr(n,"max",!0,!0,t),[a,r.runWebGLProgram(o,[e],"float32")]}(r,u,d,c);return[p,h]}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+const Qi={kernelName:o.Ob,backendName:"webgl",kernelFunc:({inputs:e,attrs:t,backend:n})=>{const{x:r}=e,{keepDims:a,axis:i}=t,s=n,u=r.shape.length,c=o.ae.parseAxisParam(i,r.shape);let l=c;const d=o.md.getAxesPermutation(l,u),p=null!=d,h=s.shouldExecuteOnCPU([r]),f=[];let m=r;if(p){if(h){const e=s.texData.get(m.dataId).values,t=new Array(u);for(let e=0;e<t.length;e++)t[e]=r.shape[d[e]];const n=wn(e,r.shape,r.dtype,d,t);m=s.makeTensorInfo(t,r.dtype);s.texData.get(m.dataId).values=n}else m=mr(r,d,s);f.push(m),l=o.md.getInnerMostAxes(l.length,u)}o.md.assertAxesAreInnerMostDims("sum",l,u);const[g,b]=o.md.computeOutAndReduceShapes(m.shape,l);let y=g;a&&(y=o.md.expandShapeToKeepDim(g,c));const v=function(e,t,n,r){const a=o.ae.sizeFromShape(t),i=ur({inputs:{x:e},attrs:{shape:[o.ae.sizeFromShape(e.shape)/a,a]},backend:r}),s=pr(i,"float32","mean",r),u=ur({inputs:{x:s},attrs:{shape:n},backend:r});return r.disposeIntermediateTensorInfo(i),r.disposeIntermediateTensorInfo(s),u}(m,b,y,s);for(const e of f)s.disposeIntermediateTensorInfo(e);return v}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Zi={kernelName:o.Pb,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{axis:i,keepDims:s}=r,u=a.shape.length,c=o.ae.parseAxisParam(i,a.shape);let l=c;const d=o.md.getAxesPermutation(l,u);let p=a;null!=d&&(p=yr({inputs:{x:a},backend:n,attrs:{perm:d}}),l=o.md.getInnerMostAxes(l.length,a.shape.length)),o.md.assertAxesAreInnerMostDims("min",l,u);const[h,f]=o.md.computeOutAndReduceShapes(p.shape,l),m=ur({inputs:{x:p},backend:n,attrs:{shape:[-1,o.ae.sizeFromShape(f)]}}),g=pr(m,m.dtype,"min",n);let b;if(s){b=ur({inputs:{x:g},backend:n,attrs:{shape:o.md.expandShapeToKeepDim(h,c)}})}else b=ur({inputs:{x:g},backend:n,attrs:{shape:h}});return n.disposeIntermediateTensorInfo(m),n.disposeIntermediateTensorInfo(g),null!=d&&n.disposeIntermediateTensorInfo(p),b}},Ji=Jn({opSnippet:"\n  if (isnan(a)) return a;\n  if (isnan(b)) return b;\n\n  return min(a, b);\n",packedOpSnippet:"\n  vec4 result = vec4(min(a, b));\n  vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n  \n  result.r = isNaN.r > 0. ? NAN : result.r;\n  result.g = isNaN.g > 0. ? NAN : result.g;\n  result.b = isNaN.b > 0. ? NAN : result.b;\n  result.a = isNaN.a > 0. ? NAN : result.a;\n\n  return result;\n",cpuKernelImpl:Jt}),es={kernelName:o.Qb,backendName:"webgl",kernelFunc:Ji};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class ts{constructor(e,t,n){this.variableNames=["x"],this.outputShape=t.map((t,n)=>t[0]+e[n]+t[1]);const r=e.length,o=oe(r),a=t.map(e=>e[0]).join(","),i=t.map((t,n)=>t[0]+e[n]).join(","),s=["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,r),u="reflect"===n?0:1;this.userCode=1!==r?`\n      ${o} start = ${o}(${a});\n      ${o} end = ${o}(${i});\n\n      void main() {\n        ${o} outC = getOutputCoords();\n        for (int i = 0; i < ${r}; i++) {\n          if (outC[i] < start[i]) {\n            outC[i] = start[i] * 2 - outC[i] - ${u};\n          } else if(outC[i] >= end[i]) {\n            outC[i] = (end[i] - 1) * 2 - outC[i] + ${u};\n          }\n        }\n        ${o} coords = outC - start;\n        setOutput(getX(${s}));\n      }\n    `:`\n        int start = ${a};\n        int end = ${i};\n\n        void main() {\n          int outC = getOutputCoords();\n          if (outC < start) {\n            outC = start * 2 - outC - ${u};\n          } else if(outC >= end) {\n            outC = (end - 1) * 2 - outC + ${u};\n          }\n          setOutput(getX(outC - start));\n        }\n      `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class ns{constructor(e,t,n){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t.map((t,n)=>t[0]+e[n]+t[1]);const r=e.length,o=oe(r),a=t.map(e=>e[0]).join(","),i=t.map((t,n)=>t[0]+e[n]).join(","),s=Sn("rc",r),u=Sn("source",r),c=`${s[r-1]} < ${this.outputShape[r-1]}`,l=1===r?"source":`vec2(${u.slice(-2).join()})`,d="reflect"===n?0:1;let p="";if(1===r){const e=`\n        ${o} source = rc;\n        if (source < start) {\n          source = start * 2 - source - ${d};\n        } else if (source >= end) {\n          source = (end - 1) * 2 - source + ${d};\n        }\n        source -= start;\n      `;p=`\n        ${o} rc = outputLoc;\n        ${e}\n        result[0] = getChannel(getX(${u.join()}), ${l});\n        ${s[r-1]} += 1;\n        if(${c}) {\n          ${e}\n          result[1] = getChannel(getX(${u.join()}), ${l});\n        }\n      `}else{const e=`\n        ${o} source = rc;\n        ${o} lt = ${o}(lessThan(source, start));\n        ${o} gte = ${o}(greaterThanEqual(source, end));\n        ${o} orig = 1 - (lt + gte);\n        source = orig * source +\n                lt * (start * 2 - source - ${d}) +\n                gte * ((end - 1) * 2 - source + ${d});\n        source -= start;\n      `;p=`\n        ${o} rc = outputLoc;\n        ${e}\n        result[0] = getChannel(getX(${u.join()}), ${l});\n        ${s[r-1]} += 1;\n        if(${c}) {\n          ${e}\n          result[1] = getChannel(getX(${u.join()}), ${l});\n        }\n        rc = outputLoc;\n        ${s[r-2]} += 1;\n        if(${s[r-2]} < ${this.outputShape[r-2]}) {\n          ${e}\n          result[2] = getChannel(getX(${u.join()}), ${l});\n          ${s[r-1]} += 1;\n          if(${c}) {\n            ${e}\n            result[3] = getChannel(getX(${u.join()}), ${l});\n          }\n        }\n      `}this.userCode=`\n      const ${o} start = ${o}(${a});\n      const ${o} end = ${o}(${i});\n\n      void main() {\n        ${o} outputLoc = getOutputCoords();\n        vec4 result = vec4(0.);\n        ${p}\n        setOutput(result);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const rs={kernelName:o.Rb,backendName:"webgl",kernelFunc:({inputs:e,backend:t,attrs:n})=>{const{x:r}=e,{paddings:a,mode:i}=n,s=Object(o.zd)().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new ns(r.shape,a,i):new ts(r.shape,a,i);return t.runWebGLProgram(s,[r],r.dtype)}},os=Jn({opSnippet:"if (b == 0.0) return NAN;\n  return mod(a, b);",packedOpSnippet:"\n  vec4 result = mod(a, b);\n  vec4 isNaN = vec4(equal(b, vec4(0.0)));\n  \n  result.r = isNaN.r > 0. ? NAN : result.r;\n  result.g = isNaN.g > 0. ? NAN : result.g;\n  result.b = isNaN.b > 0. ? NAN : result.b;\n  result.a = isNaN.a > 0. ? NAN : result.a;\n\n  return result;\n"}),as={kernelName:o.Sb,backendName:"webgl",kernelFunc:os};
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class is{constructor(e,t,n){this.variableNames=["probs"],this.customUniforms=[{name:"seed",type:"float"}],this.outputShape=[e,n],this.userCode=`\n      void main() {\n        ivec2 coords = getOutputCoords();\n        int batch = coords[0];\n\n        float r = random(seed);\n        float cdf = 0.0;\n\n        for (int i = 0; i < ${t-1}; i++) {\n          cdf += getProbs(batch, i);\n\n          if (r < cdf) {\n            setOutput(float(i));\n            return;\n          }\n        }\n\n        // If no other event happened, last event happened.\n        setOutput(float(${t-1}));\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ss=Jn({opSnippet:"\nif (a == b) {\n  return 1.0;\n};\nreturn a / b;",packedOpSnippet:"\n  // vec4 one = vec4(equal(a, b));\n  // return one + (vec4(1.0) - one) * a / b;\n  vec4 result = a / b;\n  if(a.x == b.x) {\n    result.x = 1.;\n  }\n  if(a.y == b.y) {\n    result.y = 1.;\n  }\n  if(a.z == b.z) {\n    result.z = 1.;\n  }\n  if(a.w == b.w) {\n    result.w = 1.;\n  }\n\n  return result;\n",checkOutOfBounds:!0}),us={kernelName:o.jc,backendName:"webgl",kernelFunc:ss},cs="return a - b;",ls=Jn({opSnippet:cs,packedOpSnippet:cs,supportsComplex:!0,cpuKernelImpl:yn}),ds={kernelName:o.Vc,backendName:"webgl",kernelFunc:ls};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function ps(e){const{inputs:t,backend:n,attrs:r}=e,{logits:a}=t,{dim:i}=r,s=o.ae.parseAxisParam([i],a.shape),u=Bi({inputs:{x:a},backend:n,attrs:{reductionIndices:s,keepDims:!1}}),c=o.md.expandShapeToKeepDim(u.shape,s),l=ur({inputs:{x:u},backend:n,attrs:{shape:c}}),d=ls({inputs:{a:a,b:l},backend:n}),p=Ra({inputs:{x:d},backend:n}),h=gr({inputs:{x:p},backend:n,attrs:{axis:s,keepDims:!1}}),f=ur({inputs:{x:h},backend:n,attrs:{shape:c}}),m=ss({inputs:{a:p,b:f},backend:n});return n.disposeIntermediateTensorInfo(u),n.disposeIntermediateTensorInfo(l),n.disposeIntermediateTensorInfo(d),n.disposeIntermediateTensorInfo(p),n.disposeIntermediateTensorInfo(h),n.disposeIntermediateTensorInfo(f),m}const hs={kernelName:o.Ec,backendName:"webgl",kernelFunc:ps};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const fs={kernelName:o.Tb,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{logits:o}=t,{numSamples:a,seed:i,normalized:s}=r,u=s?o:ps({inputs:{logits:o},backend:n,attrs:{dim:o.shape.length-1}}),c=u.shape[0],l=u.shape[1],d=new is(c,l,a),p=[[i]],h=n.runWebGLProgram(d,[u],"int32",p);return s||n.disposeIntermediateTensorInfo(u),h}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ms={kernelName:o.Vb,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{x:r}=t;if(n.shouldExecuteOnCPU([r])){const e=n.texData.get(r.dataId),[t,o]=tn(e.values,r.shape,r.dtype);return n.makeTensorInfo(o,r.dtype,t)}let a;return a=Object(o.zd)().getBool("WEBGL_PACK_UNARY_OPERATIONS")?new $n(r.shape,"\n  vec4 result = -x;\n  bvec4 isNaN = isnan(x);\n\n  result.r = isNaN.r ? x.r : result.r;\n  result.g = isNaN.g ? x.g : result.g;\n  result.b = isNaN.b ? x.b : result.b;\n  result.a = isNaN.a ? x.a : result.a;\n\n  return result;\n"):new An(r.shape,"if (isnan(x)) return x;\n  return -x;\n"),n.runWebGLProgram(a,[r],r.dtype)}},gs=o.Gd.nonMaxSuppressionV3Impl;
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const bs={kernelName:o.Wb,backendName:"webgl",kernelFunc:function(e){o.md.warn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");const{inputs:t,backend:n,attrs:r}=e,{boxes:a,scores:i}=t,{maxOutputSize:s,iouThreshold:u,scoreThreshold:c}=r,l=n.readSync(a.dataId),d=n.readSync(i.dataId),{selectedIndices:p}=gs(l,d,s,u,c);return n.makeTensorInfo([p.length],"int32",new Int32Array(p))}},ys=o.Gd.nonMaxSuppressionV4Impl;
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const vs={kernelName:o.Xb,backendName:"webgl",kernelFunc:function(e){o.md.warn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");const{inputs:t,backend:n,attrs:r}=e,{boxes:a,scores:i}=t,{maxOutputSize:s,iouThreshold:u,scoreThreshold:c,padToMaxOutputSize:l}=r,d=n.readSync(a.dataId),p=n.readSync(i.dataId),{selectedIndices:h,validOutputs:f}=ys(d,p,s,u,c,l);return[n.makeTensorInfo([h.length],"int32",new Int32Array(h)),n.makeTensorInfo([],"int32",new Int32Array([f]))]}},xs=o.Gd.nonMaxSuppressionV5Impl;
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ws={kernelName:o.Yb,backendName:"webgl",kernelFunc:function(e){o.md.warn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");const{inputs:t,backend:n,attrs:r}=e,{boxes:a,scores:i}=t,{maxOutputSize:s,iouThreshold:u,scoreThreshold:c,softNmsSigma:l}=r,d=n.readSync(a.dataId),p=n.readSync(i.dataId),h=s,f=u,m=c,g=l,{selectedIndices:b,selectedScores:y}=xs(d,p,h,f,m,g);return[n.makeTensorInfo([b.length],"int32",new Int32Array(b)),n.makeTensorInfo([y.length],"float32",new Float32Array(y))]}};
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Os{constructor(e,t,n,r){this.variableNames=["indices"],this.outputShape=[e,t],this.userCode=`\n      void main() {\n        ivec2 coords = getOutputCoords();\n        int index = round(getIndices(coords.x));\n        setOutput(mix(float(${r}), float(${n}),\n                      float(index == coords.y)));\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ks={kernelName:o.ac,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n,attrs:r}=e,{indices:a}=t,{depth:i,onValue:s,offValue:u}=r,c=o.ae.sizeFromShape(a.shape),l=new Os(c,i,s,u),d=ur({inputs:{x:a},backend:n,attrs:{shape:[c]}}),p=n.runWebGLProgram(l,[d],a.dtype);n.disposeIntermediateTensorInfo(d);const h=ur({inputs:{x:p},backend:n,attrs:{shape:[...a.shape,i]}});return n.disposeIntermediateTensorInfo(p),h}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function Ss(e){const{inputs:t,backend:n}=e,{x:r}=t;if("complex64"===r.dtype){const e=vo({inputs:{input:r},backend:n}),t=Ss({inputs:{x:e},backend:n}),o=$o({inputs:{input:r},backend:n}),a=Ss({inputs:{x:o},backend:n}),i=Wn({inputs:{real:t,imag:a},backend:n});return n.disposeIntermediateTensorInfo(e),n.disposeIntermediateTensorInfo(t),n.disposeIntermediateTensorInfo(o),n.disposeIntermediateTensorInfo(a),i}return Va({attrs:{shape:r.shape,dtype:r.dtype,value:"string"===r.dtype?"":0},backend:n})}const Ts={kernelName:o.id,backendName:"webgl",kernelFunc:Ss};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Cs={kernelName:o.bc,backendName:"webgl",kernelFunc:function e(t){const{inputs:n,backend:r}=t,{x:o}=n;if("string"===o.dtype)throw new Error("onesLike is not supported under string dtype");if("complex64"===o.dtype){const t=vo({inputs:{input:o},backend:r}),n=e({inputs:{x:t},backend:r}),a=$o({inputs:{input:o},backend:r}),i=Ss({inputs:{x:a},backend:r}),s=Wn({inputs:{real:n,imag:i},backend:r});return r.disposeIntermediateTensorInfo(t),r.disposeIntermediateTensorInfo(n),r.disposeIntermediateTensorInfo(a),r.disposeIntermediateTensorInfo(i),s}return Va({attrs:{shape:o.shape,dtype:o.dtype,value:1},backend:r})}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Es={kernelName:o.cc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{axis:a}=r;if(1===t.length)return $a({inputs:{input:t[0]},backend:n,attrs:{dim:a}});const i=t[0].shape,s=t[0].dtype;t.forEach(e=>{o.ae.assertShapesMatch(i,e.shape,"All tensors passed to stack must have matching shapes"),o.ae.assert(s===e.dtype,()=>"All tensors passed to stack must have matching dtypes")});const u=[],c=Mo({inputs:t.map(e=>{const t=$a({inputs:{input:e},backend:n,attrs:{dim:a}});return u.push(t),t}),backend:n,attrs:{axis:a}});return u.forEach(e=>n.disposeIntermediateTensorInfo(e)),c}};
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Is{constructor(e,t,n){this.variableNames=["x"],this.customUniforms=[{name:"value",type:"float"}],this.outputShape=t.map((t,n)=>t[0]+e[n]+t[1]);const r=e.length,o=oe(r),a=t.map(e=>e[0]).join(","),i=t.map((t,n)=>t[0]+e[n]).join(","),s=["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,r);this.userCode=1!==r?`\n      ${o} start = ${o}(${a});\n      ${o} end = ${o}(${i});\n\n      void main() {\n        ${o} outC = getOutputCoords();\n        if (any(lessThan(outC, start)) || any(greaterThanEqual(outC, end))) {\n          setOutput(value);\n        } else {\n          ${o} coords = outC - start;\n          setOutput(getX(${s}));\n        }\n      }\n    `:`\n        int start = ${a};\n        int end = ${i};\n\n        void main() {\n          int outC = getOutputCoords();\n          if (outC < start || outC >= end) {\n            setOutput(value);\n          } else {\n            setOutput(getX(outC - start));\n          }\n        }\n      `}}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class js{constructor(e,t,n){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"value",type:"float"}],this.outputShape=t.map((t,n)=>t[0]+e[n]+t[1]);const r=e.length,o=oe(r),a=t.map(e=>e[0]).join(","),i=t.map((t,n)=>t[0]+e[n]).join(","),s=Sn("rc",r),u=Sn("source",r),c=`${s[r-1]} < ${this.outputShape[r-1]}`,l=1===r?"source":`vec2(${u.slice(-2).join()})`,d=[o+" rc = outputLoc;",`${s[r-1]} += 1;\n       if(${c}) {\n      `,1===r?"":`}\n       rc = outputLoc;\n       ${s[r-2]} += 1;\n       if(${s[r-2]} < ${this.outputShape[r-2]}) {`,1===r?"":`  ${s[r-1]} += 1;\n         if(${c}) {`],p=1===r?"rc < start || rc >= end":"any(lessThan(rc, start)) || any(greaterThanEqual(rc, end))";let h="";for(let e=0,t=1===r?2:4;e<t;e++)h+=`\n        ${d[e]}\n        if (${p}) {\n          result[${e}] = float(value);\n        } else {\n          ${o} source = rc - start;\n          result[${e}] = getChannel(getX(${u.join()}), ${l});\n        }\n      `;h+=1===r?"} ":"}}",this.userCode=`\n      const ${o} start = ${o}(${a});\n      const ${o} end = ${o}(${i});\n\n      void main() {\n        ${o} outputLoc = getOutputCoords();\n        vec4 result = vec4(0.);\n        ${h}\n        setOutput(result);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Ns=e=>{const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{paddings:i,constantValue:s}=r;if(0===o.ae.sizeFromShape(a.shape)){return Va({backend:n,attrs:{shape:i.map((e,t)=>e[0]+a.shape[t]+e[1]),value:s,dtype:a.dtype}})}const u=Object(o.zd)().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new js(a.shape,i,s):new Is(a.shape,i,s),c=[[s]];return n.runWebGLProgram(u,[a],a.dtype,c)},As={kernelName:o.dc,backendName:"webgl",kernelFunc:Ns},Rs=Jn({opSnippet:"\n  if(a < 0.0 && floor(b) < b){\n    return NAN;\n  }\n  if (b == 0.0) {\n    return 1.0;\n  }\n  return (round(mod(b, 2.0)) != 1) ?\n      pow(abs(a), b) : sign(a) * pow(abs(a), b);\n",packedOpSnippet:"\n  // isModRound1 has 1 for components with round(mod(b, 2.0)) == 1, 0 otherwise.\n  vec4 isModRound1 = vec4(equal(round(mod(b, 2.0)), ivec4(1)));\n  vec4 multiplier = sign(a) * isModRound1 + (vec4(1.0) - isModRound1);\n  vec4 result = multiplier * pow(abs(a), b);\n\n  // Ensure that a^0 = 1, including 0^0 = 1 as this correspond to TF and JS\n  bvec4 isExpZero = equal(b, vec4(0.0));\n  result.r = isExpZero.r ? 1.0 : result.r;\n  result.g = isExpZero.g ? 1.0 : result.g;\n  result.b = isExpZero.b ? 1.0 : result.b;\n  result.a = isExpZero.a ? 1.0 : result.a;\n\n  vec4 isNaN = vec4(lessThan(a, vec4(0.0))) * vec4(lessThan(floor(b), b));\n  \n  result.r = isNaN.r > 0. ? NAN : result.r;\n  result.g = isNaN.g > 0. ? NAN : result.g;\n  result.b = isNaN.b > 0. ? NAN : result.b;\n  result.a = isNaN.a > 0. ? NAN : result.a;\n\n  return result;\n"}),_s={kernelName:o.ec,backendName:"webgl",kernelFunc:Rs};const $s={kernelName:o.gc,backendName:"webgl",kernelFunc:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{axis:i,keepDims:s}=r,u=a.shape.length,c=[],l=o.ae.parseAxisParam(i,a.shape);let d=l;const p=o.md.getAxesPermutation(d,u);let h,f=a;if(null!=p&&(f=yr({inputs:{x:a},backend:n,attrs:{perm:p}}),d=o.md.getInnerMostAxes(d.length,u),c.push(f)),o.md.assertAxesAreInnerMostDims("prod",d,u),n.shouldExecuteOnCPU([f])){const e=n.texData.get(f.dataId).values,{outVals:t,outShape:r,outDtype:o}=rn(f.shape,f.dtype,e,d);h=n.makeTensorInfo(r,o,t)}else{const[e,t]=o.md.computeOutAndReduceShapes(f.shape,d),r=o.ae.sizeFromShape(t),i=ur({inputs:{x:f},backend:n,attrs:{shape:[-1,r]}}),s=pr(i,Object(o.Td)(a.dtype),"prod",n);h=ur({inputs:{x:s},backend:n,attrs:{shape:e}}),c.push(i),c.push(s)}if(s){c.push(h);const e=o.md.expandShapeToKeepDim(h.shape,l);h=ur({inputs:{x:h},backend:n,attrs:{shape:e}})}return c.forEach(e=>n.disposeIntermediateTensorInfo(e)),h}},Fs=e=>{const{backend:t,attrs:n}=e,{start:r,stop:o,step:a,dtype:i}=n,s=on(r,o,a,i);return t.makeTensorInfo([s.length],i,s)},Ds={kernelName:o.hc,backendName:"webgl",kernelFunc:Fs},Ms=Zn({opSnippet:"return 1.0 / x;"}),Ps={kernelName:o.kc,backendName:"webgl",kernelFunc:Ms},Ls=Zn({opSnippet:"if (isnan(x)) return x;\n  return (x < 0.0) ? 0.0 : x;\n",packedOpSnippet:"\n  vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0)));\n  bvec4 isNaN = isnan(x);\n\n  result.r = isNaN.r ? x.r : result.r;\n  result.g = isNaN.g ? x.g : result.g;\n  result.b = isNaN.b ? x.b : result.b;\n  result.a = isNaN.a ? x.a : result.a;\n\n  return result;\n"}),Bs={kernelName:o.lc,backendName:"webgl",kernelFunc:Ls},zs=Zn({opSnippet:"if (isnan(x)) return x;\n  return (x < 0.0) ? 0.0 : min(6.0, x);\n",packedOpSnippet:"\n  vec4 result = min(x, vec4(6.)) * vec4(greaterThanEqual(x, vec4(0.0)));\n  bvec4 isNaN = isnan(x);\n\n  result.r = isNaN.r ? x.r : result.r;\n  result.g = isNaN.g ? x.g : result.g;\n  result.b = isNaN.b ? x.b : result.b;\n  result.a = isNaN.a ? x.a : result.a;\n\n  return result;\n"}),Us={kernelName:o.mc,backendName:"webgl",kernelFunc:zs};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class Vs{constructor(e,t,n,r,o){this.variableNames=["A"],this.outputShape=[];const[a,i,s,u]=e;this.outputShape=[a,t,n,u];const c=[r&&t>1?i-1:i,r&&n>1?s-1:s],l=[r&&t>1?t-1:t,r&&n>1?n-1:n];let d;d=o?"(vec2(yRC) + vec2(0.5)) * effectiveInputOverOutputRatioRC - vec2(0.5)":"vec2(yRC) * effectiveInputOverOutputRatioRC",this.userCode=`\n      const vec2 effectiveInputOverOutputRatioRC = vec2(\n          ${c[0]/l[0]},\n          ${c[1]/l[1]});\n      const vec2 inputShapeRC = vec2(${i}.0, ${s}.0);\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int d = coords[3];\n        ivec2 yRC = coords.yz;\n\n        // Fractional source index.\n        vec2 sourceFracIndexRC = ${d};\n\n        // Compute the four integer indices.\n        ivec2 sourceFloorRC = ivec2(max(sourceFracIndexRC, vec2(0.0)));\n        ivec2 sourceCeilRC = ivec2(\n          min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n\n        float topLeft = getA(b, sourceFloorRC.x, sourceFloorRC.y, d);\n        float bottomLeft = getA(b, sourceCeilRC.x, sourceFloorRC.y, d);\n        float topRight = getA(b, sourceFloorRC.x, sourceCeilRC.y, d);\n        float bottomRight = getA(b, sourceCeilRC.x, sourceCeilRC.y, d);\n\n        vec2 fracRC = sourceFracIndexRC - vec2(sourceFloorRC);\n\n        float top = topLeft + (topRight - topLeft) * fracRC.y;\n        float bottom = bottomLeft + (bottomRight - bottomLeft) * fracRC.y;\n        float newValue = top + (bottom - top) * fracRC.x;\n\n        setOutput(newValue);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Ws{constructor(e,t,n,r,o){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[];const[a,i,s,u]=e;this.outputShape=[a,t,n,u];const c=[r&&t>1?i-1:i,r&&n>1?s-1:s],l=[r&&t>1?t-1:t,r&&n>1?n-1:n];let d;d=o?"(vec3(yRC) + vec3(0.5)) * effectiveInputOverOutputRatioRC - vec3(0.5)":"vec3(yRC) * effectiveInputOverOutputRatioRC",this.userCode=`\n      const vec3 effectiveInputOverOutputRatioRC = vec3(\n          ${c[0]/l[0]},\n          ${c[1]/l[1]},\n          ${c[1]/l[1]});\n      const vec3 inputShapeRC = vec3(${i}.0, ${s}.0,\n                                     ${s}.0);\n\n      float getAValue(int b, int r, int c, int d) {\n        return getChannel(getA(b, r, c, d), vec2(c, d));\n      }\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int d = coords[3];\n        // Calculate values for next column in yRC.z.\n        ivec3 yRC = coords.yzz + ivec3(0, 0, 1);\n\n        // Fractional source index.\n        vec3 sourceFracIndexRC = ${d};\n\n        // Compute the four integer indices.\n        ivec3 sourceFloorRC = ivec3(max(sourceFracIndexRC, vec3(0.0)));\n        ivec3 sourceCeilRC = ivec3(\n          min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n\n        // Should we calculate next column and row elements in 2x2 packed cell.\n        bool hasNextCol = d < ${u-1};\n        bool hasNextRow = coords.z < ${n-1};\n\n        // In parallel, construct four corners for all four components in\n        // packed 2x2 cell.\n        vec4 topLeft = vec4(\n          getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d),\n          hasNextCol ? getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d + 1)\n                     : 0.0,\n          hasNextRow ? getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d)\n                     : 0.0,\n          (hasNextRow && hasNextCol) ?\n            getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n        vec4 bottomLeft = vec4(\n          getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d),\n          hasNextCol ? getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d + 1)\n                     : 0.0,\n          hasNextRow ? getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d)\n                     : 0.0,\n          (hasNextRow && hasNextCol) ?\n            getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n        vec4 topRight = vec4(\n          getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d),\n          hasNextCol ? getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d + 1)\n                     : 0.0,\n          hasNextRow ? getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d)\n                     : 0.0,\n          (hasNextRow && hasNextCol) ?\n            getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n        vec4 bottomRight = vec4(\n          getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d),\n          hasNextCol ? getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d + 1)\n                     : 0.0,\n          hasNextRow ? getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d)\n                     : 0.0,\n          (hasNextRow && hasNextCol) ?\n            getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n        vec3 fracRC = sourceFracIndexRC - vec3(sourceFloorRC);\n\n        vec4 top = mix(topLeft, topRight, fracRC.yyzz);\n        vec4 bottom = mix(bottomLeft, bottomRight, fracRC.yyzz);\n        vec4 newValue = mix(top, bottom, fracRC.x);\n\n        setOutput(newValue);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Gs={kernelName:o.oc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{images:a}=t,{alignCorners:i,halfPixelCenters:s,size:u}=r,[c,l]=u,d=Object(o.zd)().getBool("WEBGL_PACK_IMAGE_OPERATIONS")?new Ws(a.shape,c,l,i,s):new Vs(a.shape,c,l,i,s);return n.runWebGLProgram(d,[a],"float32")}};
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Hs{constructor(e,t,n){this.variableNames=["dy"],this.outputShape=[],this.outputShape=t;const[,r,o]=t,[,a,i]=e,s=[n&&a>1?r-1:r,n&&i>1?o-1:o],u=[n&&a>1?a-1:a,n&&i>1?i-1:i],c=s[0]/u[0],l=s[1]/u[1],d=1/c,p=1/l,h=2*Math.ceil(d)+2,f=2*Math.ceil(p)+2;this.userCode=`\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int d = coords[3];\n        int r = coords[1];\n        int c = coords[2];\n\n        float accumulator = 0.0;\n\n        const float heightScale = float(${c});\n        const float widthScale = float(${l});\n\n        const float invHeightScale = float(${d});\n        const float invWidthScale = float(${p});\n\n        const int winHeight = int(${h});\n        const int winWidth = int(${f});\n\n        // Compute bounds for where in dy we will look\n        float startRLerp = floor(float(r) * invHeightScale);\n        int startDyR = int(startRLerp - float(winHeight / 2));\n\n        float startCLerp = floor(float(c) * invWidthScale);\n        int startDyC = int(startCLerp - float(winWidth / 2));\n\n        // Loop over dy\n        for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n          int dyR = dyROffset + startDyR;\n\n          // Guard against the window exceeding the bounds of dy\n          if (dyR < 0 || dyR >= ${a}) {\n            continue;\n          }\n\n          for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n            int dyC = dyCOffset + startDyC;\n\n            // Guard against the window exceeding the bounds of dy\n            if (dyC < 0 || dyC >= ${i}) {\n              continue;\n            }\n\n            float dxR = float(dyR) * heightScale;\n            int topDxRIndex = int(floor(dxR));\n            int bottomDxRIndex = int(min(ceil(dxR), ${r-1}.0));\n            float dxRLerp = dxR - float(topDxRIndex);\n            float inverseDxRLerp = 1.0 - dxRLerp;\n\n            float dxC = float(dyC) * widthScale;\n            int leftDxCIndex = int(floor(dxC));\n            int rightDxCIndex = int(min(ceil(dxC), ${o-1}.0));\n            float dxCLerp = dxC - float(leftDxCIndex);\n            float inverseDxCLerp = 1.0 - dxCLerp;\n\n            if (r == topDxRIndex && c == leftDxCIndex) {\n              // topLeft\n              accumulator +=\n                getDy(b, dyR, dyC, d) * inverseDxRLerp * inverseDxCLerp;\n            }\n\n            if (r == topDxRIndex && c == rightDxCIndex) {\n              // topRight\n              accumulator += getDy(b, dyR, dyC, d) * inverseDxRLerp * dxCLerp;\n            }\n\n            if (r == bottomDxRIndex && c == leftDxCIndex) {\n              // bottomLeft\n              accumulator += getDy(b, dyR, dyC, d) * dxRLerp * inverseDxCLerp;\n            }\n\n            if (r == bottomDxRIndex && c == rightDxCIndex) {\n              // bottomRight\n              accumulator += getDy(b, dyR, dyC, d) * dxRLerp * dxCLerp;\n            }\n          }\n        }\n        // End loop over dy\n\n        setOutput(accumulator);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const qs={kernelName:o.pc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{images:o,dy:a}=t,{alignCorners:i}=r,s=new Hs(a.shape,o.shape,i);return n.runWebGLProgram(s,[a],a.dtype)}};
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Ks{constructor(e,t,n,r,o){this.variableNames=["A"],this.outputShape=[];const[a,i,s,u]=e;this.outputShape=[a,t,n,u];const c=[r&&t>1?i-1:i,r&&n>1?s-1:s],l=[r&&t>1?t-1:t,r&&n>1?n-1:n],d=r?"0.5":"0.0";let p;p=o?"max((vec2(yRC) + vec2(0.5)) * effectiveInputOverOutputRatioRC, vec2(0.0))":"vec2(yRC) * effectiveInputOverOutputRatioRC",this.userCode=`\n      const vec2 effectiveInputOverOutputRatioRC = vec2(\n          ${c[0]/l[0]},\n          ${c[1]/l[1]});\n      const vec2 inputShapeRC = vec2(${i}.0, ${s}.0);\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int d = coords[3];\n        ivec2 yRC = coords.yz;\n\n        // Fractional source index.\n        vec2 sourceFracIndexRC = ${p};\n\n        // Compute the coordinators of nearest neighbor point.\n        ivec2 sourceNearestRC = ivec2(\n          min(inputShapeRC - 1.0, floor(sourceFracIndexRC + ${d})));\n        float newValue = getA(b, sourceNearestRC.x, sourceNearestRC.y, d);\n\n        setOutput(newValue);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Xs{constructor(e,t,n,r,o){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[];const[a,i,s,u]=e;this.outputShape=[a,t,n,u];const c=[r&&t>1?i-1:i,r&&n>1?s-1:s],l=[r&&t>1?t-1:t,r&&n>1?n-1:n],d=r?"0.5":"0.0";let p;p=o?"max((vec3(yRC) + vec3(0.5)) * effectiveInputOverOutputRatioRC, vec3(0.0))":"vec3(yRC) * effectiveInputOverOutputRatioRC",this.userCode=`\n      const vec3 effectiveInputOverOutputRatioRC = vec3(\n          ${c[0]/l[0]},\n          ${c[1]/l[1]},\n          ${c[1]/l[1]});\n      const vec3 inputShapeRC = vec3(${i}.0, ${s}.0,\n                                     ${s}.0);\n\n      float getAValue(int b, int r, int c, int d) {\n        return getChannel(getA(b, r, c, d), vec2(c, d));\n      }\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int d = coords[3];\n        // Calculate values for next column in yRC.z.\n        ivec3 yRC = coords.yzz + ivec3(0, 0, 1);\n\n        // Fractional source index.\n        vec3 sourceFracIndexRC = ${p};\n\n        // Compute the coordinators of nearest neighbor point.\n        ivec3 sourceNearestRC = ivec3(\n          min(inputShapeRC - 1.0, floor(sourceFracIndexRC + ${d})));\n\n        // Should we calculate next column and row elements in 2x2 packed cell.\n        bool hasNextCol = d < ${u-1};\n        bool hasNextRow = coords.z < ${n-1};\n\n        vec4 newValue = vec4(\n          getAValue(b, sourceNearestRC.x, sourceNearestRC.y, d),\n          hasNextCol ? getAValue(b, sourceNearestRC.x, sourceNearestRC.y, d + 1)\n                     : 0.0,\n          hasNextRow ? getAValue(b, sourceNearestRC.x, sourceNearestRC.z, d)\n                     : 0.0,\n          (hasNextRow && hasNextCol) ?\n            getAValue(b, sourceNearestRC.x, sourceNearestRC.z, d + 1) : 0.0);\n\n        setOutput(newValue);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Ys={kernelName:o.qc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{images:a}=t,{alignCorners:i,halfPixelCenters:s,size:u}=r,[c,l]=u,d=Object(o.zd)().getBool("WEBGL_PACK_IMAGE_OPERATIONS")?new Xs(a.shape,c,l,i,s):new Ks(a.shape,c,l,i,s);return n.runWebGLProgram(d,[a],a.dtype)}};
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Qs{constructor(e,t,n){this.variableNames=["dy"],this.outputShape=[],this.outputShape=t;const[,r,o]=t,[,a,i]=e,s=[n&&a>1?r-1:r,n&&i>1?o-1:o],u=[n&&a>1?a-1:a,n&&i>1?i-1:i],c=s[0]/u[0],l=s[1]/u[1],d=1/c,p=1/l,h=2*Math.ceil(d)+2,f=2*Math.ceil(p)+2;this.userCode=`\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int d = coords[3];\n        int r = coords[1];\n        int c = coords[2];\n\n        float accumulator = 0.0;\n\n        const float heightScale = float(${c});\n        const float widthScale = float(${l});\n\n        const float invHeightScale = float(${d});\n        const float invWidthScale = float(${p});\n\n        const int winHeight = int(${h});\n        const int winWidth = int(${f});\n\n        // Compute bounds for where in dy we will look\n        float startRLerp = floor(float(r) * invHeightScale);\n        int startDyR = int(floor(startRLerp - float(winHeight / 2)));\n\n        float startCLerp = floor(float(c) * invWidthScale);\n        int startDyC = int(floor(startCLerp - float(winWidth / 2)));\n\n        // Loop over dy\n        for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n          int dyR = dyROffset + startDyR;\n\n          // Guard against the window exceeding the bounds of dy\n          if (dyR < 0 || dyR >= ${a}) {\n            continue;\n          }\n\n          for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n            int dyC = dyCOffset + startDyC;\n\n            // Guard against the window exceeding the bounds of dy\n            if (dyC < 0 || dyC >= ${i}) {\n              continue;\n            }\n\n            float sourceFracRow =\n              float(${s[0]}) *\n                (float(dyR) / float(${u[0]}));\n\n            float sourceFracCol =\n                float(${s[1]}) *\n                  (float(dyC) / float(${u[1]}));\n\n            int sourceNearestRow = int(min(\n                float(int(${r}) - 1),\n                ${n} ? float(round(sourceFracRow)) :\n                                  float(floor(sourceFracRow))));\n\n            int sourceNearestCol = int(min(\n                float(int(${o}) - 1),\n                ${n} ? float(round(sourceFracCol)) :\n                                  float(floor(sourceFracCol))));\n\n            if (r == sourceNearestRow && c == sourceNearestCol) {\n              accumulator += getDy(b, dyR, dyC, d);\n            }\n          }\n        }\n        // End loop over dy\n\n        setOutput(accumulator);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Zs={kernelName:o.rc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{images:o,dy:a}=t,{alignCorners:i}=r,s=new Qs(a.shape,o.shape,i);return n.runWebGLProgram(s,[a],a.dtype)}};
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Js{constructor(e,t){this.variableNames=["x"];const n=e.length;if(n>4)throw new Error(`WebGL backend: Reverse of rank-${n} tensor is not yet supported`);if(this.outputShape=e,1===n)return void(this.userCode=`\n        void main() {\n          int coord = getOutputCoords();\n          setOutput(getX(${e[0]} - coord - 1));\n        }\n      `);const r=e.map((n,r)=>(n=>-1!==t.indexOf(n)&&1!==e[n]?`${e[n]} - coords[${n}] - 1`:`coords[${n}]`)(r)).join(","),o=oe(n);this.userCode=`\n      void main() {\n        ${o} coords = getOutputCoords();\n        setOutput(getX(${r}));\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2019 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class eu{constructor(e,t){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0;const n=e.length;if(n>4)throw new Error(`WebGL backend: Reverse of rank-${n} tensor is not yet supported`);this.outputShape=e;const r=Sn("rc",n),o=`${r[n-1]} + 1 < ${this.outputShape[n-1]}`,a=`${r[n-2]} + 1 < ${this.outputShape[n-2]}`,i=oe(n);function s(n){const r=e.map((r,o)=>function(n,r){return-1!==t.indexOf(n)&&1!==e[n]?`${e[n]} - ${r[n]} - 1`:""+r[n]}(o,n));return`getChannel(getX(${r.join(",")}), vec2(${r.slice(-2).join(",")}))`}this.userCode=1===n?`\n        void main(){\n          int rc = getOutputCoords();\n          vec4 result = vec4(0.);\n          result.r = getChannel(getX(${e[0]} - rc - 1),\n            ${e[0]} - rc - 1);\n          if(${o}){\n              result.g = getChannel(getX(${e[0]} - (rc  + 1) - 1),\n                ${e[0]} - (rc  + 1) - 1);\n          }\n          setOutput(result);\n        }\n      `:`\n        void main() {\n          ${i} rc = getOutputCoords();\n          vec4 result = vec4(0.);\n          result.r = ${function(e){return s(e)}(r.slice())};\n          if(${o}){\n            result.g = ${function(e){return e[n-1]="("+e[n-1]+" + 1)",s(e)}(r.slice())};\n          }\n          if(${a}) {\n            result.b = ${function(e){return e[n-2]="("+e[n-2]+" + 1)",s(e)}(r.slice())};\n            if(${o}) {\n              result.a = ${function(e){return e[n-1]="("+e[n-1]+" + 1)",e[n-2]="("+e[n-2]+" + 1)",s(e)}(r.slice())};\n            }\n          }\n          setOutput(result);\n        }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const tu={kernelName:o.sc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{dims:i}=r,s=a.shape.length,u=o.ae.parseAxisParam(i,a.shape);if(0===s)return Un({inputs:{x:a},backend:n});const c=Object(o.zd)().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new eu(a.shape,u):new Js(a.shape,u);return n.runWebGLProgram(c,[a],a.dtype)}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class nu{constructor(e,t){this.variableNames=["Image"],this.outputShape=[],this.customUniforms=[{name:"params",type:"vec4"}];const n=e[1],r=e[2];this.outputShape=e;let o="";o="number"==typeof t?`float outputValue = ${t.toFixed(2)};`:`\n        vec3 fill = vec3(${t.join(",")});\n        float outputValue = fill[coords[3]];`,this.userCode=`\n        void main() {\n          ivec4 coords = getOutputCoords();\n          int x = coords[2];\n          int y = coords[1];\n          float coordXFloat = (float(x) - params[0]) * params[3] -\n            (float(y) - params[1]) * params[2];\n          float coordYFloat = (float(x) - params[0]) * params[2] +\n            (float(y) - params[1]) * params[3];\n          int coordX = int(round(coordXFloat + params[0]));\n          int coordY = int(round(coordYFloat + params[1]));\n          ${o}\n          if(coordX >= 0 && coordX < ${r} && coordY >= 0 && coordY < ${n}) {\n            outputValue = getImage(coords[0], coordY, coordX, coords[3]);\n          }\n          setOutput(outputValue);\n        }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ru={kernelName:o.tc,backendName:"webgl",kernelFunc:({inputs:e,attrs:t,backend:n})=>{const{image:r}=e,{radians:a,fillValue:i,center:s}=t,u=n,c=new nu(r.shape,i),[l,d]=o.md.getImageCenter(s,r.shape[1],r.shape[2]),p=[[l,d,Math.sin(a),Math.cos(a)]];return u.runWebGLProgram(c,[r],r.dtype,p)}},ou=Zn({opSnippet:"\n  // OpenGL ES does not support round function.\n  // The algorithm is based on banker's rounding.\n  float base = floor(x);\n  if ((x - base) < 0.5) {\n    return floor(x);\n  } else if ((x - base) > 0.5) {\n    return ceil(x);\n  } else {\n    if (mod(base, 2.0) == 0.0) {\n      return base;\n    } else {\n      return base + 1.0;\n    }\n  }\n"}),au={kernelName:o.uc,backendName:"webgl",kernelFunc:ou},iu=Zn({opSnippet:"return inversesqrt(x);",cpuKernelImpl:an}),su={kernelName:o.vc,backendName:"webgl",kernelFunc:iu};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class uu{constructor(e,t,n,r,o,a,i=!0){this.variableNames=["updates","indices","defaultValue"],this.outputShape=a;const s=oe(o.length),u=oe(a.length);let c="";1===n?c="i":2===n&&(c="i, j");const l=`getIndices(${c})`;let d="";1===r?d="i":2===r&&(d="i, coords[1]");const p=`getUpdates(${d})`,h=t>1?"strides[j]":"strides";this.userCode=`\n        ${s} strides = ${s}(${o});\n\n        void main() {\n          ${u} coords = getOutputCoords();\n          float sum = 0.0;\n          bool found = false;\n          for (int i = 0; i < ${e}; i++) {\n            int flattenedIndex = 0;\n            for (int j = 0; j < ${t}; j++) {\n              int index = round(${l});\n              flattenedIndex += index * ${h};\n            }\n            if (flattenedIndex == coords[0]) {\n              sum += ${p};\n              found = true;\n            }\n          }\n          setOutput(mix(getDefaultValue(), sum, float(found)));\n        }\n      `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const cu={kernelName:o.wc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{indices:a,updates:i}=t,{shape:s}=r,{sliceRank:u,numUpdates:c,sliceSize:l,strides:d,outputSize:p}=o.md.calculateShapes(i,a,s),h=[p/l,l];if(0===p)return n.makeTensorInfo(s,a.dtype);const f=ur({inputs:{x:a},backend:n,attrs:{shape:[c,u]}}),m=ur({inputs:{x:i},backend:n,attrs:{shape:[c,l]}}),g=n.makeTensorInfo([],"float32",new Float32Array([0])),b=new uu(c,u,f.shape.length,m.shape.length,d,h),y=n.runWebGLProgram(b,[m,f,g],m.dtype),v=ur({inputs:{x:y},backend:n,attrs:{shape:s}});return n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(m),n.disposeIntermediateTensorInfo(y),n.disposeIntermediateTensorInfo(g),v}};
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class lu{constructor(e,t,n){let r,o;if(this.variableNames=["c","a","b"],this.outputShape=t,n>4)throw Error(`Where for rank ${n} is not yet supported`);if(1===n)o="resRC",r="resRC";else{const n=["resRC.x","resRC.y","resRC.z","resRC.w"],a=[],i=[];for(let r=0;r<t.length;r++)i.push(""+n[r]),r<e&&a.push(""+n[r]);r=a.join(),o=i.join()}const a=oe(n);this.userCode=`\n      void main() {\n        ${a} resRC = getOutputCoords();\n        float cVal = getC(${r});\n        if (cVal >= 1.0) {\n          setOutput(getA(${o}));\n        } else {\n          setOutput(getB(${o}));\n        }\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const du={kernelName:o.xc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{condition:r,t:a,e:i}=t,s=new lu(r.shape.length,a.shape,a.shape.length);return n.runWebGLProgram(s,[r,a,i],Object(o.Zd)(a.dtype,i.dtype))}},pu=Zn({opSnippet:`\n  // Stable and Attracting Fixed Point (0, 1) for Normalized Weights.\n  // see: https://arxiv.org/abs/1706.02515\n  float scaleAlpha = ${o.md.SELU_SCALEALPHA};\n  float scale = ${o.md.SELU_SCALE};\n  return (x >= 0.0) ? scale * x : scaleAlpha * (exp(x) - 1.0);\n`}),hu={kernelName:o.yc,backendName:"webgl",kernelFunc:pu},fu=Zn({opSnippet:"if (isnan(x)) return x;\n  return 1.0 / (1.0 + exp(-1.0 * x));\n",packedOpSnippet:"\n  vec4 result = 1.0 / (1.0 + exp(-1.0 * x));\n  bvec4 isNaN = isnan(x);\n\n  result.r = isNaN.r ? x.r : result.r;\n  result.g = isNaN.g ? x.g : result.g;\n  result.b = isNaN.b ? x.b : result.b;\n  result.a = isNaN.a ? x.a : result.a;\n\n  return result;\n",cpuKernelImpl:sn}),mu={kernelName:o.zc,backendName:"webgl",kernelFunc:fu},gu=Zn({opSnippet:"\n  if (isnan(x)) { return 0.0; }\n  return sign(x);\n"}),bu={kernelName:o.Ac,backendName:"webgl",kernelFunc:gu},yu=Zn({opSnippet:"if (isnan(x)) return x;\n  return sin(x);\n"}),vu={kernelName:o.Bc,backendName:"webgl",kernelFunc:yu},xu=Zn({opSnippet:"\n  float e2x = exp(x);\n  return (e2x - 1.0 / e2x) / 2.0;\n"}),wu={kernelName:o.Cc,backendName:"webgl",kernelFunc:xu},Ou=Zn({opSnippet:"\n  float epsilon = 1.1920928955078125e-7;\n  float threshold = log(epsilon) + 2.0;\n\n  bool too_large = x > -threshold;\n  bool too_small = x < threshold;\n\n  float result;\n  float exp_x = exp(x);\n\n  if (too_large){\n    result = x;\n  }\n  else if (too_small){\n    result = exp_x;\n  }\n  else{\n    result = log(exp_x + 1.0);\n  }\n  return result;\n"}),ku={kernelName:o.Fc,backendName:"webgl",kernelFunc:Ou},Su={kernelName:o.Gc,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{blockShape:i,paddings:s}=r;o.ae.assert(a.shape.length<=4,()=>"spaceToBatchND for rank > 4 with a WebGL backend not implemented yet");const u=i.reduce((e,t)=>e*t),c=[[0,0]];c.push(...s);for(let e=1+i.length;e<a.shape.length;++e)c.push([0,0]);const l=[],d=Ns({inputs:{x:a},backend:n,attrs:{paddings:c,constantValue:0}}),p=o.md.getReshaped(d.shape,i,u,!1),h=o.md.getPermuted(p.length,i.length,!1),f=o.md.getReshapedPermuted(d.shape,i,u,!1),m=ur({inputs:{x:d},backend:n,attrs:{shape:p}}),g=yr({inputs:{x:m},backend:n,attrs:{perm:h}}),b=ur({inputs:{x:g},backend:n,attrs:{shape:f}});return l.push(d),l.push(m),l.push(g),l.forEach(e=>n.disposeIntermediateTensorInfo(e)),b}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Tu={kernelName:o.Hc,backendName:"webgl",kernelFunc:
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function(e){const{inputs:t,backend:n}=e,{indices:r,values:o,denseShape:a,defaultValue:i}=t;if(1!==a.shape.length)throw new Error("Dense shape must be a vector, saw:\n         "+a.shape);if(2!==r.shape.length)throw new Error("Indices must be a matrix, saw:\n         "+r.shape);if(1!==o.shape.length)throw new Error("Values must be a vector, saw:\n         "+o.shape);if(0!==i.shape.length)throw new Error("Default value must be a scalar, saw:\n        "+i.shape);const s=n.readSync(r.dataId),u=n.readSync(o.dataId),c=n.readSync(a.dataId),l=n.readSync(i.dataId)[0],[d,p,h,f,m]=ln(s,r.shape,r.dtype,u,o.dtype,c,l);return[n.makeTensorInfo(p,r.dtype,d),n.makeTensorInfo([p[0]],o.dtype,h),n.makeTensorInfo([f.length],"bool",new Uint8Array(f.map(e=>Number(e)))),n.makeTensorInfo([m.length],r.dtype,new Int32Array(m))]}};
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Cu={kernelName:o.Ic,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{inputIndices:r,inputShape:o,newShape:a}=t;if(2!==r.shape.length)throw new Error("Input indices should be a matrix but received shape "+r.shape);if(1!==o.shape.length)throw new Error("Input shape should be a vector but received shape "+o.shape);if(1!==a.shape.length)throw new Error("Target shape should be a vector but received shape "+a.shape);const i=Array.from(n.readSync(o.dataId)),s=n.readSync(r.dataId),u=Array.from(n.readSync(a.dataId)),[c,l,d]=dn(s,r.shape,r.dtype,i,u);return[n.makeTensorInfo(l,r.dtype,c),n.makeTensorInfo([d.length],a.dtype,new Int32Array(d))]}};
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Eu={kernelName:o.Jc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{data:r,indices:o,segmentIds:a}=t;if(r.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==o.shape.length)throw new Error("Indices should be a vector but received shape\n              "+o.shape);if(1!==a.shape.length)throw new Error("Segment ids should be a vector but received shape\n              "+a.shape);const i=n.readSync(r.dataId),s=n.readSync(o.dataId),u=n.readSync(a.dataId),[c,l]=pn(i,r.shape,r.dtype,s,u,!0);return n.makeTensorInfo(l,r.dtype,c)}};
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Iu={kernelName:o.Kc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{data:r,indices:o,segmentIds:a}=t;if(r.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==o.shape.length)throw new Error("Indices should be a vector but received shape\n             "+o.shape);if(1!==a.shape.length)throw new Error("Segment ids should be a vector but received shape\n             "+a.shape);const i=n.readSync(r.dataId),s=n.readSync(o.dataId),u=n.readSync(a.dataId),[c,l]=pn(i,r.shape,r.dtype,s,u);return n.makeTensorInfo(l,r.dtype,c)}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ju={kernelName:o.Lc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{sparseIndices:a,sparseValues:i,defaultValue:s}=t,{outputShape:u}=r,{sliceRank:c,numUpdates:l,strides:d,outputSize:p}=o.md.calculateShapes(i,a,u),h=new uu(l,c,a.shape.length,i.shape.length,d,[p,1],!1),f=n.runWebGLProgram(h,[i,a,s],i.dtype),m=ur({inputs:{x:f},backend:n,attrs:{shape:u}});return n.disposeIntermediateTensorInfo(f),m}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Nu={kernelName:o.Mc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{numOrSizeSplits:i,axis:s}=r,u=o.ae.parseAxisParam(s,a.shape)[0],c=o.md.prepareSplitSize(a,i,u),l=a.shape.length,d=new Array(l).fill(0),p=a.shape.slice();return c.map(e=>{const t=[...p];t[u]=e;const r=po({inputs:{x:a},backend:n,attrs:{begin:d,size:t}});return d[u]+=e,r})}},Au="return sqrt(x);",Ru=Zn({opSnippet:Au,packedOpSnippet:Au,cpuKernelImpl:hn}),_u={kernelName:o.Nc,backendName:"webgl",kernelFunc:Ru},$u=Zn({opSnippet:"return x * x;"}),Fu={kernelName:o.Oc,backendName:"webgl",kernelFunc:$u},Du=Jn({opSnippet:"return (a - b) * (a - b);",packedOpSnippet:"return (a - b) * (a - b);"}),Mu={kernelName:o.Pc,backendName:"webgl",kernelFunc:Du};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Pu={kernelName:o.Qc,backendName:"webgl",kernelFunc:
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+function({inputs:e,attrs:t,backend:n}){const{x:r}=e,o=`if (isnan(x)) return x;\n    return x > 0.0 ? 1.0 : float(${t.alpha});\n  `,a=new An(r.shape,o);return n.runWebGLProgram(a,[r],r.dtype)}};
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class Lu{constructor(e,t,n){this.variableNames=["x"],this.outputShape=n;const r=n.length,o=oe(n.length),a=oe(n.length);let i="";if(1===r)i="coords * strides + begin";else{let e=0;i=n.map((t,r)=>(e++,1===n.length?`coords * strides[${r}] + begin[${r}]`:`coords[${e-1}] * strides[${r}] + begin[${r}]`)).join(",")}this.userCode=`\n      ${o} begin = ${o}(${e});\n      ${o} strides = ${o}(${t});\n\n      void main() {\n        ${a} coords = getOutputCoords();\n        setOutput(getX(${i}));\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Bu={kernelName:o.Rc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{begin:i,end:s,strides:u,beginMask:c,endMask:l,ellipsisMask:d,newAxisMask:p,shrinkAxisMask:h}=r,{finalShapeSparse:f,finalShape:m,isIdentity:g,sliceDim0:b,isSimpleSlice:y,begin:v,end:x,strides:w}=o.Pd.sliceInfo(a.shape,i,s,u,c,l,d,p,h);let O;if(g)O=ur({inputs:{x:a},backend:n,attrs:{shape:m}});else if(b||y){o.ae.assert(a.shape.length>=1,()=>"Input must have rank at least 1, got: "+a.shape.length);const e=o.Pd.computeOutShape(v,x,w),t=po({inputs:{x:a},backend:n,attrs:{begin:v,size:e}});O=ur({inputs:{x:t},backend:n,attrs:{shape:m}}),n.disposeIntermediateTensorInfo(t)}else{if(n.shouldExecuteOnCPU([a])){const e=n.readSync(a.dataId),t=Object(o.pd)(a.shape,a.dtype,e),r=fn(f,t,w,v);O=n.makeTensorInfo(m,a.dtype,r.values)}else{const e=new Lu(v,w,f);O=n.runWebGLProgram(e,[a],a.dtype)}}const k=ur({inputs:{x:O},backend:n,attrs:{shape:m}});return n.disposeIntermediateTensorInfo(O),k}};
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const zu={kernelName:o.Sc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{separator:o,nGramWidths:a,leftPad:i,rightPad:s,padWidth:u,preserveShortSequences:c}=r,{data:l,dataSplits:d}=t,p=n.readSync(l.dataId),h=n.readSync(d.dataId),[f,m]=mn(p,h,o,a,i,s,u,c);return[n.makeTensorInfo([f.length],"string",f),n.makeTensorInfo(d.shape,"int32",m)]}};
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Uu={kernelName:o.Tc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{skipEmpty:o}=r,{input:a,delimiter:i}=t;if("string"!==a.dtype)throw new Error("Input must be of datatype string");if(1!==a.shape.length)throw new Error("Input must be a vector, got shape: "+a.shape);if(0!==i.shape.length)throw new Error("Delimiter must be a scalar, got shape: "+i.shape);const s=n.readSync(a.dataId),u=n.readSync(i.dataId)[0],[c,l,d]=gn(s,u,o),p=l.length;return[n.makeTensorInfo([p,2],"int32",c),n.makeTensorInfo([p],"string",l),n.makeTensorInfo([2],"int32",new Int32Array(d))]}};
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const Vu={kernelName:o.Uc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{numBuckets:o}=r,{input:a}=t;if("string"!==a.dtype)throw new Error("Input must be of datatype string");if(o<=0)throw new Error("Number of buckets must be at least 1");const i=n.readSync(a.dataId),s=bn(i,o);return n.makeTensorInfo(a.shape,"int32",s)}},Wu=Zn({opSnippet:"return tan(x);"}),Gu={kernelName:o.Xc,backendName:"webgl",kernelFunc:Wu},Hu=Zn({opSnippet:"\n  float e2x = exp(-2.0 * abs(x));\n  return sign(x) * (1.0 - e2x) / (1.0 + e2x);\n"}),qu={kernelName:o.Yc,backendName:"webgl",kernelFunc:Hu};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+/**
+ * @license
+ * Copyright 2017 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+class Ku{constructor(e,t){this.variableNames=["A"];const n=new Array(e.length);for(let r=0;r<n.length;r++)n[r]=e[r]*t[r];this.outputShape=n,this.rank=n.length;const r=oe(this.rank),o=function(e){const t=e.length;if(t>5)throw Error(`Tile for rank ${t} is not yet supported`);if(1===t)return`imod(resRC, ${e[0]})`;const n=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u"],r=[];for(let t=0;t<e.length;t++)r.push(`imod(${n[t]}, ${e[t]})`);return r.join()}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */(e);this.userCode=`\n      void main() {\n        ${r} resRC = getOutputCoords();\n        setOutput(getA(${o}));\n      }\n    `}}function Xu(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{reps:i}=r;if("string"===a.dtype||a.shape.length>5){const e=n.readSync(a.dataId),t="string"===a.dtype?e.map(e=>o.ae.decodeString(e)):e,r=Object(o.pd)(a.shape,a.dtype,t),s=vn(r,i);return n.makeTensorInfo(s.shape,s.dtype,s.values)}const s=new Ku(a.shape,i);return n.runWebGLProgram(s,[a],a.dtype)}const Yu={kernelName:o.bd,backendName:"webgl",kernelFunc:Xu};class Qu{constructor(e){this.variableNames=["x","indices"],this.customUniforms=[{name:"n",type:"int"},{name:"firstPass",type:"int"},{name:"negativeInf",type:"float"},{name:"dir",type:"int"},{name:"inc",type:"int"}],this.outputShape=e,this.userCode="\n       void main() {\n         ivec2 coords = getOutputCoords();\n         int batch = coords[0];\n         int elemIdx = coords[1];\n\n         // We compare elements pair-wise within a group of size 2 * inc.\n         // The comparing rule for each group alternates between ascending\n         // and descending. Within each group, we compare each pair at\n         // positions i and i+inc. To decide whether an element at position i\n         // is x0 or x1, we mod it by 2 * inc, if the result is smaller than\n         // inc, it is in the first half of the group, we denote it as x0,\n         // otherwise we denote it as x1.\n         // For example, as shown in the Bitonic top K paper referenced above,\n         // Figure5(a) shows that element[1] is in the\n         // second half of the group when group size is 2, but it is in the\n         // first half of the group when group size is 4.\n\n         bool isFirstInPair = imod(elemIdx, 2 * inc) < inc;\n         int i = isFirstInPair ? elemIdx : elemIdx - inc;\n\n         int i0 = firstPass == 1 ? i : int(getIndices(batch, i));\n         int i1 = firstPass == 1 ? i + inc : int(getIndices(batch, i + inc));\n         float x0 = i0 < n ? getX(batch, i0) : negativeInf;\n         float x1 = i1 < n ? getX(batch, i1) : negativeInf;\n\n         // Denotes which direction indices are in (ascending or descending).\n         bool reverse = imod(elemIdx, 2 * dir) >= dir;\n         bool isGreater = x0 > x1 || (x0 == x1 && i1 > i0);\n         if (reverse == isGreater) { // Elements in opposite order of direction\n           int iTemp = i0;\n           i0 = i1;\n           i1 = iTemp;\n         }\n         if (isFirstInPair) {\n            setOutput(float(i0));\n         } else {\n            setOutput(float(i1));\n         }\n       }\n     "}}class Zu{constructor(e){this.variableNames=["x","indices"],this.customUniforms=[{name:"n",type:"int"},{name:"firstPass",type:"int"},{name:"k",type:"int"}],this.outputShape=e,this.userCode="\n    void main() {\n         // Takes max of indices (0, k), (1, k + 1), (2, k + 2) ...\n         ivec2 coords = getOutputCoords();\n         int batch = coords[0];\n         int elemIdx = coords[1];\n\n         // The output size is half of the previous size.\n         // If the previous sequence is | | | | _ _ _ _  | | | |  _ _ _ _ (k=4),\n         // we only need to output the indices at positions |, the indices at\n         // positions _ can be thrown away, see Figure5(b) After Phase 2\n         // (Merge phase) in the Bitonic Top K paper referenced above.\n         // For example, the paper shows we only need to output the orange bars.\n         // The output sequence should look like this | | | | | | | |.\n         // Because the sequence is halved, to map the output index back\n         // to the previous sequence to find the corresponding value,\n         // we need to double the index. When we double the index,\n         // we basically interpolate a position, so 2i looks like\n         // | _ | _ | _ | _ | _ | _ | _. We move the | to the first k position\n         // of each 2k positions by - elemIdx % k. E.g. for output at\n         // index 4,5,6,7, we want to get the corresponding element at\n         // original index 8,9,10,11, for output at index 8,9,10,11,\n         // we want to get the corresponding element at original index\n         // 16,17,18,19, so on and so forth.\n\n         int i = elemIdx < k ? elemIdx : (elemIdx * 2 - imod(elemIdx, k));\n         int i0 = firstPass == 1 ? i : int(getIndices(batch, i));\n         int i1 = firstPass == 1 ? i + k : int(getIndices(batch, i + k));\n\n         float x0 = getX(batch, i0);\n         float x1 = i1 < n ? getX(batch, i1) : x0;\n\n         setOutput(x0 >= x1 ? float(i0) : float(i1));\n       }\n     "}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */function Ju(e,t){null!==t&&e.disposeIntermediateTensorInfo(t)}function ec(e){let t=1;for(;t<e;)t*=2;return t}const tc={kernelName:o.cd,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{k:i,sorted:s}=r,u=Object(o.zd)().getNumber("TOPK_LAST_DIM_CPU_HANDOFF_SIZE_THRESHOLD"),c=Object(o.zd)().getNumber("TOPK_K_CPU_HANDOFF_THRESHOLD"),l=a.shape,d=l[l.length-1];if(n.shouldExecuteOnCPU([a])||d<u||i>c){const e=n.readSync(a.dataId),[t,r]=xn(e,l,a.dtype,i,s);return[n.makeTensorInfo(t.shape,t.dtype,t.values),n.makeTensorInfo(r.shape,r.dtype,r.values)]}if(0===i)return l[l.length-1]=0,[n.makeTensorInfo(l,a.dtype,[]),n.makeTensorInfo(l,"int32",[])];if(1===d)return[a,Va({attrs:{shape:l,dtype:"int32",value:0},backend:n})];const p=n.texData.get(a.dataId),h=null!==p&&p.isPacked,f=h?n.unpackTensor(a):a,m=o.ae.sizeFromShape(l)/d,g=ur({inputs:{x:f},attrs:{shape:[m,d]},backend:n});h&&Ju(n,f);const b=ec(i),y=ec(d);let v=null;const x=()=>null===v?[g,g]:[g,v],w=(e,t,r)=>{const o=x(),a=new Qu(r),i=[[d],[null===v?1:0],[Number.NEGATIVE_INFINITY],[e],[t]],s=v;v=n.runWebGLProgram(a,o,"int32",i),Ju(n,s)};for(let e=1;e<b;e*=2){const t=2*e;for(let n=e;n>=1;n/=2)w(t,n,[m,y])}for(let e=y;e>b;e/=2){const t=x(),r=new Zu([m,e/2]),o=[[d],[null===v?1:0],[b]],a=v;v=n.runWebGLProgram(r,t,"int32",o),Ju(n,a);const i=b/2,s=2*i;for(let e=i;e>=1;e/=2)w(s,e,v.shape)}let O=v;v=po({inputs:{x:v},backend:n,attrs:{begin:0,size:[m,i]}}),Ju(n,O);let k=si({inputs:{x:g,indices:v},backend:n,attrs:{axis:1,batchDims:1}});Ju(n,g);const S=l.slice(0,-1);S.push(i),O=v,v=ur({inputs:{x:v},attrs:{shape:S},backend:n}),Ju(n,O);const T=k;return k=ur({inputs:{x:k},attrs:{shape:S},backend:n}),Ju(n,T),[k,v]}};
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class nc{constructor(e,t,n,r,o,a){this.variableNames=["Image","Transforms"],this.outputShape=a;const i="nearest"===n?1:2;let s;switch(r){case"constant":s=1;break;case"reflect":s=2;break;case"wrap":s=3;break;case"nearest":s=4;break;default:s=1}this.userCode=`\n            float mapCoord(float outCoord, float len) {\n              float inCoord = outCoord;\n              if(${s} == 2) {\n                if (inCoord < 0.0) {\n                  if (len <= 1.0) {\n                    inCoord = 0.0;\n                  } else {\n                    float sz2 = 2.0 * len;\n                    if (inCoord < sz2) {\n                      inCoord = sz2 * float(int(float(-inCoord / sz2))) +\n                      inCoord;\n                    }\n                    inCoord = inCoord < -len ? inCoord + sz2 : -inCoord - 1.0;\n                  }\n                } else if (inCoord > len - 1.0) {\n                  if (len <= 1.0) {\n                    inCoord = 0.0;\n                  } else {\n                    float sz2 = 2.0 * len;\n                    inCoord -= sz2 * float(int(float(inCoord / sz2)));\n                    if (inCoord >= len) {\n                      inCoord = sz2 - inCoord - 1.0;\n                    }\n                  }\n                }\n                return clamp(inCoord, 0.0, len - 1.0);\n              } else if (${s} == 3) {\n                if (inCoord < 0.0) {\n                  if (len <= 1.0) {\n                    inCoord = 0.0;\n                  } else {\n                    float sz = len - 1.0;\n                    inCoord += len * (float(int(float(-inCoord / sz))) + 1.0);\n                  }\n                } else if (inCoord > len - 1.0) {\n                  if (len <= 1.0) {\n                    inCoord = 0.0;\n                  } else {\n                    float sz = len - 1.0;\n                    inCoord -= len * float(int(float(inCoord / sz)));\n                  }\n                }\n                return clamp(inCoord, 0.0, len - 1.0);\n              } else if (${s} == 4) {\n                return clamp(outCoord, 0.0, len - 1.0);\n              } else {\n                return outCoord;\n              }\n            }\n\n            float readWithFillValue(int batch, int coordY, int coordX,\n              int channel) {\n              float outputValue;\n              if (0 <= coordY && coordY < ${e} && 0 <= coordX && coordX < ${t}) {\n                  outputValue = getImage(batch, coordY, coordX, channel);\n              } else {\n                outputValue = float(${o});\n              }\n              return outputValue;\n            }\n\n            void main() {\n              ivec4 coords = getOutputCoords();\n              float outputValue;\n              int batch = coords[0];\n              int x = coords[2];\n              int y = coords[1];\n              int channel = coords[3];\n              float xf = float(x);\n              float yf = float(y);\n              float a1 = getTransforms(batch, 0);\n              float a2 = getTransforms(batch, 1);\n              float a3 = getTransforms(batch, 2);\n              float b1 = getTransforms(batch, 3);\n              float b2 = getTransforms(batch, 4);\n              float b3 = getTransforms(batch, 5);\n              float c1 = getTransforms(batch, 6);\n              float c2 = getTransforms(batch, 7);\n              float projection = c1 * xf + c2 * yf + 1.0;\n              if (projection == 0.0) {\n                outputValue = float(${o});\n              } else {\n                float inX = (a1 * xf + a2 * yf + a3) / projection;\n                float inY = (b1 * xf + b2 * yf + b3) / projection;\n                float mapX = mapCoord(inX, float(${t}));\n                float mapY = mapCoord(inY, float(${e}));\n\n                if (${i} == 1) {\n                  int coordY = int(round(mapY));\n                  int coordX = int(round(mapX));\n                  outputValue = readWithFillValue(batch, coordY, coordX,\n                    channel);\n                } else {\n                  float yFloor = floor(mapY);\n                  float xFloor = floor(mapX);\n                  float yCeil = yFloor + 1.0;\n                  float xCeil = xFloor + 1.0;\n                  float valueYFloor = (xCeil - mapX) *\n                  readWithFillValue(batch, int(yFloor), int(xFloor), channel) +\n                  (mapX - xFloor) *\n                  readWithFillValue(batch, int(yFloor), int(xCeil), channel);\n                  float valueYCeil = (xCeil - mapX) *\n                  readWithFillValue(batch, int(yCeil), int(xFloor), channel) +\n                  (mapX - xFloor) *\n                  readWithFillValue(batch, int(yCeil), int(xCeil), channel);\n                  outputValue = (yCeil - mapY) * valueYFloor +\n                  (mapY - yFloor) * valueYCeil;\n                }\n              }\n              setOutput(outputValue);\n            }\n        `}}
+/**
+ * @license
+ * Copyright 2021 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const rc={kernelName:o.dd,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{image:o,transforms:a}=t,{interpolation:i,fillMode:s,fillValue:u,outputShape:c}=r,[l,d,p,h]=o.shape,[f,m]=null!=c?c:[d,p],g=new nc(d,p,i,s,u,[l,f,m,h]);return n.runWebGLProgram(g,[o,a],"float32")}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const oc={kernelName:o.fd,backendName:"webgl",kernelFunc:function(e){const{inputs:t,attrs:n,backend:r}=e,{axis:o}=n,{x:a}=t;L(a,"unique"),console.warn("WARNING: ","UI might be locked temporarily as data is being downloaded");const i=r.readSync(a.dataId),{outputValues:s,outputShape:u,indices:c}=On(i,o,a.shape,a.dtype);return[r.makeTensorInfo(u,a.dtype,s),r.makeTensorInfo([c.length],"int32",c)]}};
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const ac={kernelName:o.gd,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{value:o}=t;let{axis:a}=r;a<0&&(a+=o.shape.length);const i=o,s=i.shape.length,u=o.shape[a],c=new Array(s-1);let l=0;for(let e=0;e<s;e++)e!==a&&(c[l++]=i.shape[e]);const d=[],p=new Array(s).fill(0),h=i.shape.slice();h[a]=1;const f=new Array(u);for(let e=0;e<f.length;e++){p[a]=e;const t=po({inputs:{x:i},backend:n,attrs:{begin:p,size:h}}),r=ur({inputs:{x:t},backend:n,attrs:{shape:c}});f[e]=r,d.push(t)}return d.forEach(e=>n.disposeIntermediateTensorInfo(e)),f}};
+/**
+ * @license
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */class ic{constructor(e,t){this.variableNames=["x","segmentIds"];const n=e.windowSize,r=e.batchSize,o=e.inSize,a=e.numSegments,i=a*Math.ceil(o/n);this.outputShape=[r,i];const s=4*Math.floor(n/4),u=n%4,c="\n        sumValue += dot(values, segFilter);\n    ";let l="";o%n>0&&(l=`\n        if (inIdx < 0 || inIdx >= ${o}) {\n          return initializationValue;\n        }\n      `);let d="";o%n>0&&(d=`\n        if (inIdx < 0 || inIdx >= ${o}) {\n          return -1.0;\n        }\n      `),this.userCode=`\n      const float initializationValue = 0.0;\n\n      float getValue(int batch, int inIdx) {\n        ${l}\n        return getX(batch, inIdx);\n      }\n\n      float getSegmentIdAtIndex(int inIdx) {\n        ${d}\n        return getSegmentIds(inIdx);\n      }\n\n      void main() {\n        ivec2 coords = getOutputCoords();\n        int batch = coords[0];\n        int outIdx = coords[1];\n        int inOffset = int(floor(float(outIdx) / float(\n          ${a})) * float(${n}));\n        int currentSeg = int(mod(float(outIdx), float(${a})));\n\n        float sumValue = 0.0;\n\n        for (int i = 0; i < ${s}; i += 4) {\n          int inIdx = inOffset + i;\n          vec4 values = vec4(\n            getValue(batch, inIdx),\n            getValue(batch, inIdx + 1),\n            getValue(batch, inIdx + 2),\n            getValue(batch, inIdx + 3)\n          );\n\n          vec4 segFilter = vec4(\n            int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n            int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n            int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n            int(getSegmentIdAtIndex(inIdx + 3)) == currentSeg ? 1 : 0\n          );\n\n          ${c}\n        }\n\n        int inIdx = inOffset + ${s};\n        if (${1===u}) {\n          vec4 values = vec4(\n            getValue(batch, inIdx),\n            initializationValue,\n            initializationValue,\n            initializationValue\n          );\n\n          int inIdxSeg = int(getSegmentIdAtIndex(inIdx));\n\n          vec4 segFilter = vec4(\n            int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n            0,\n            0,\n            0\n          );\n\n          ${c}\n        } else if (${2===u}) {\n          vec4 values = vec4(\n            getValue(batch, inIdx),\n            getValue(batch, inIdx + 1),\n            initializationValue,\n            initializationValue\n          );\n\n          vec4 segFilter = vec4(\n            int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n            int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n              0,\n              0\n          );\n\n          ${c}\n        } else if (${3===u}) {\n          vec4 values = vec4(\n            getValue(batch, inIdx),\n            getValue(batch, inIdx + 1),\n            getValue(batch, inIdx + 2),\n            initializationValue\n          );\n\n          vec4 segFilter = vec4(\n            int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n            int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n            int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n            0\n          );\n\n          ${c}\n        }\n        setOutput(sumValue);\n      }\n    `}}
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */const sc=[wr,Or,Sr,Cr,jr,Rr,_r,$r,Pr,Lr,zr,Vr,Gr,qr,Xr,Zr,Jr,no,ro,oo,so,fo,mo,go,wo,So,Eo,Gn,No,Po,Wo,Xo,Yo,Qo,Zo,Jo,ta,ra,aa,ca,la,pa,ma,ya,va,wa,ka,Sa,Ca,Ea,ja,Aa,_a,Fa,Pa,za,Wa,Ha,Xa,Qa,ei,ni,ri,ai,ui,li,pi,Vn,hi,Fo,mi,bi,vi,Kn,wi,ki,Si,Ci,Ii,Ni,Ri,$i,Mi,Li,zi,Vi,Wi,Gi,Ki,Xi,Yi,Qi,Zi,es,rs,as,fs,sr,ms,bs,vs,ws,yo,ks,Cs,Es,As,_s,Qn,$s,Ds,xo,us,Ps,Bs,Us,cr,Gs,qs,Ys,Zs,tu,ru,au,su,cu,du,hu,mu,bu,vu,wu,ho,hs,ku,Su,Tu,Cu,Eu,Iu,ju,Nu,_u,Fu,Mu,Pu,Bu,zu,Uu,Vu,ds,br,Gu,qu,Yu,tc,rc,vr,oc,ac,{kernelName:o.hd,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,segmentIds:i}=t,{numSegments:s}=r,u=a.shape.length,c=[];let l=0;const d=o.md.getAxesPermutation([l],u);let p=a;null!=d&&(p=yr({inputs:{x:a},backend:n,attrs:{perm:d}}),c.push(p),l=o.md.getInnerMostAxes(1,u)[0]);const h=o.md.segment_util.computeOutShape(p.shape,l,s),f=o.ae.sizeFromShape([p.shape[l]]),m=ur({inputs:{x:p},backend:n,attrs:{shape:[-1,f]}});c.push(m);const g=Object(o.Td)(a.dtype),b=(e,t,r,a,i)=>{const s=e.shape[0],u=e.shape[1],l=o.md.segment_util.segOpComputeOptimalWindowSize(u,i),d=new ic({windowSize:l,inSize:u,batchSize:s,numSegments:i},t),p=n.compileAndRun(d,[e,r],a);if(c.push(p),p.shape[1]===i)return p;const h=Fs({backend:n,attrs:{start:0,stop:i,step:1,dtype:"float32"}}),f=Xu({inputs:{x:h},backend:n,attrs:{reps:[u/l]}});c.push(h),c.push(f);return b(p,t,f,a,i)},y=ur({inputs:{x:b(m,"unsortedSegmentSum",i,g,s)},backend:n,attrs:{shape:h}});let v=y;if(null!=d){c.push(y);const e=o.md.getUndoAxesPermutation(d);v=yr({inputs:{x:v},backend:n,attrs:{perm:e}})}return c.forEach(e=>n.disposeIntermediateTensorInfo(e)),v}},Ts];
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */for(const e of sc)Object(o.Kd)(e);
+/**
+ * @license
+ * Copyright 2020 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"HAMWorker",(function(){return ve})),n.d(r,"GUMWorker",(function(){return Ve})),n.d(r,"SensorWorker",(function(){return nt}));var o=n(8),a=n(32),i=n.n(a),s=n(108),u=n.n(s),c=n(40),l=n.n(c),d=n(41),p=n.n(d),h=n(7),f=n.n(h),m=n(86),g=n.n(m),b=n(87),y=n.n(b),v=n(239),x=n.n(v),w=n(48),O=n.n(w),k=n(2),S=n.n(k),T=n(10),C=n.n(T),E=(n(225),n(104),n(226),n(635),n(855),n(871),n(872),n(125),n(52)),I=n.n(E),j=n(731),N=n.n(j),A=n(396),R=n.n(A),_=n(336),$=n.n(_),F=n(274),D=n.n(F),M=n(68),P=n.n(M),L=n(36),B=n.n(L),z=n(11),U=n.n(z),V=n(18),W=n.n(V),G=n(335),H=n.n(G),q=n(55),K=n.n(q),X=n(31),Y=n.n(X),Q=n(233),Z=n.n(Q),J=n(67),ee=n.n(J),te=n(339),ne=n.n(te),re=n(106),oe=n.n(re),ae=n(338),ie=n.n(ae),se=n(139),ue=n.n(se),ce=n(62),le=n.n(ce),de=n(131),pe=n.n(de),he=n(30),fe=n.n(he),me="[worker]",ge=1e3,be=function(){function e(t){l()(this,e),this.options=t||{},this.debugEnabled=this.options.debug||!1,this.dataChannel=null,this.peerConnection=null,this.peerConnectionVideo=null,this.features=new Z.a,this.confirmations=new pe.a}return p()(e,[{key:"setPeerConnection",value:function(e){this.peerConnection=e}},{key:"setPeerConnectionForVideo",value:function(e){this.peerConnectionVideo=e}},{key:"setDataChannel",value:function(e){this.dataChannel=e}},{key:"hasFeature",value:function(e){return this.features.has(e)}},{key:"requestConfirmation",value:function(e,t,n){var r,a,i=this;return o.debug(me,fe()(r=fe()(a="requestConfirmation feature:".concat(e," clientId:")).call(a,t," deviceName:")).call(r,n)),new ee.a((function(r){"undefined"!=typeof android?(android.emit("requestConfirmation",B()({id:ge,feature:e,clientId:t,deviceName:n})),i.confirmations.set(ge,r),ge++):r(!0)}))}},{key:"onConfirmationResult",value:function(e,t){var n;return o.debug(me,fe()(n="onConfirmationResult id:".concat(e," allowed:")).call(n,t)),!!this.confirmations.has(e)&&(this.confirmations.get(e)(t),this.confirmations.delete(e),!0)}},{key:"sendData",value:function(e){this.dataChannel?this.dataChannel.send(B()(e)):o.error(me,"dataChannel is not open yet")}}]),e}();function ye(e){var t=function(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i()(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=O()(e);if(t){var o=O()(this).constructor;n=i()(r,arguments,o)}else n=r.apply(this,arguments);return y()(this,n)}}var ve=function(e){g()(n,e);var t=ye(n);function n(){var e;return l()(this,n),(e=t.call(this)).listenerId=0,e.intervalId=0,e}return p()(n,[{key:"checkCapability",value:function(){return("undefined"!=typeof tizen&&tizen.humanactivitymonitor||this.debugEnabled)&&(this.features.add("HRM"),this.features.add("PEDOMETER"),this.features.add("GESTURE")),this.features}},{key:"handleMessage",value:function(e){switch(e.feature){case"PEDOMETER":case"HRM":"start"===e.type?this.startHam(e.feature):this.stopHam(e.feature);break;case"GESTURE":"start"===e.type?this.startGestureRecognition():this.stopGestureRecognition();break;default:o.debug("[ham]","unsupported feature",e.feature)}}},{key:"startHam",value:function(e){var t=this;o.debug("[ham]","start HAM");var n=e,r={},a=this;this.debugEnabled?this.intervalId=ue()((function(){"HRM"===n?(r.heartRate=Math.floor(150*Math.random()+50),r.rRInterval=0):"PEDOMETER"===n&&(r.stepStatus="WALKING",r.cumulativeTotalStepCount=Math.floor(150*Math.random()+50)),t.sendData({type:"data",feature:n,data:r})}),1e3):tizen.ppm.requestPermission("http://tizen.org/privilege/healthinfo",(function(){tizen.humanactivitymonitor.start(n,(function(e){if("HRM"===n)r.heartRate=e.heartRate,r.rRInterval=e.rRInterval;else if("PEDOMETER"===n){var t;r.stepStatus=e.stepStatus,r.speed=e.speed,r.walkingFrequency=e.walkingFrequency,r.cumulativeDistance=e.cumulativeDistance,r.cumulativeCalorie=e.cumulativeCalorie,r.cumulativeTotalStepCount=e.cumulativeTotalStepCount,r.cumulativeWalkStepCount=e.cumulativeWalkStepCount,r.cumulativeRunStepCount=e.cumulativeRunStepCount,r.stepCountDifferences=le()(t=e.stepCountDifferences).call(t)}a.sendData({type:"data",feature:n,data:r})}))}),(function(e){return o.error("[ham]","error: "+B()(e))}))}},{key:"stopHam",value:function(e){tizen.humanactivitymonitor.stop(e)}},{key:"startGestureRecognition",value:function(){var e=this;if(!(this.listenerId>0))if(this.debugEnabled)this.intervalId=ue()((function(){e.sendData({type:"data",feature:"GESTURE",data:{type:"GESTURE_WRIST_UP",event:"GESTURE_EVENT_DETECTED",timestamp:(new Date).getTime()}})}),3e3);else try{this.listenerId=tizen.humanactivitymonitor.addGestureRecognitionListener("GESTURE_WRIST_UP",(function(t){o.debug("[ham]","Received "+t.event+" event on "+new Date(1e3*t.timestamp)+" for "+t.type+" type"),e.sendData({type:"data",feature:"GESTURE",data:{type:t.type,event:t.event,timestamp:t.timestamp}})}),(function(e){return o.error("[ham]","error: "+B()(e))}),!0),o.debug("[ham]","Listener with id "+this.listenerId+" has been added")}catch(e){o.error("[ham]","error: "+B()(e))}}},{key:"stopGestureRecognition",value:function(){this.listenerId>0&&tizen.humanactivitymonitor.removeGestureRecognitionListener(this.listenerId)}}]),n}(be),xe=n(119),we=n.n(xe),Oe=n(120),ke=n.n(Oe),Se=n(110),Te=n.n(Se),Ce=(n(126),n(399)),Ee=n.n(Ce),Ie=(n(494),n(889),n(238)),je=n.n(Ie),Ne=n(151),Ae=n.n(Ne);function Re(e,t){var n=void 0!==we.a&&ke()(e)||e["@@iterator"];if(!n){if(Te()(e)||(n=function(e,t){var n;if(!e)return;if("string"==typeof e)return _e(e,t);var r=le()(n=Object.prototype.toString.call(e)).call(n,8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return P()(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _e(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var $e=function(){function e(){l()(this,e)}return p()(e,null,[{key:"getPreferredCodecs",value:function(e){Te()(e)||(e=[e]);var t=[];if(e.length>0){if("function"!=typeof RTCRtpSender.getCapabilities)return t;var n,r=RTCRtpSender.getCapabilities("video").codecs,a=Re(e);try{var i=function(){var e=n.value;r=je()(r).call(r,(function(n){return!n.mimeType.match(new RegExp(e,"i"))||(t.push(n),!1)}))};for(a.s();!(n=a.n()).done;)i()}catch(e){a.e(e)}finally{a.f()}var s,u="",c=Re(t=fe()(t).call(t,r));try{for(c.s();!(s=c.n()).done;){var l=s.value;-1===Ae()(u).call(u,l.mimeType)&&(u+=l.mimeType+", ")}}catch(e){c.e(e)}finally{c.f()}o.info("[codec-helper]","codec order : "+u)}return t}}]),e}(),Fe=n(732);function De(e,t){var n=void 0!==we.a&&ke()(e)||e["@@iterator"];if(!n){if(Te()(e)||(n=function(e,t){var n;if(!e)return;if("string"==typeof e)return Me(e,t);var r=le()(n=Object.prototype.toString.call(e)).call(n,8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return P()(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Me(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}function Me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pe(e){var t=function(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i()(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=O()(e);if(t){var o=O()(this).constructor;n=i()(r,arguments,o)}else n=r.apply(this,arguments);return y()(this,n)}}function Le(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Be(e,t,n){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return n}var ze=new U.a,Ue=new W.a,Ve=function(e){g()(n,e);var t=Pe(n);function n(e){var r,a,i;return l()(this,n),r=t.call(this,e),Le(a=f()(r),i=Ue),i.add(a),function(e,t,n){Le(e,t),t.set(e,n)}(f()(r),ze,{writable:!0,value:void 0}),r.mediaStream=null,C()(f()(r),ze,new Fe.a),S()(f()(r),ze).on("autoZoomStarted",(function(e){o.debug("[gum]","autoZoomStarted",e),Be(f()(r),Ue,We).call(f()(r),e)})),S()(f()(r),ze).on("autoZoomStopped",(function(){o.debug("[gum]","autoZoomStopped");var e=r.mediaStream.getVideoTracks();if(e.length>0){var t=e[0];Be(f()(r),Ue,We).call(f()(r),t)}})),r}return p()(n,[{key:"checkCapability",value:function(){var e=this;return o.debug("[gum]","checkCapability"),"undefined"!=typeof android&&alert(RTCRtpSender.getCapabilities("video")),this.debugEnabled?(this.features.add("CAMERA"),this.features.add("MIC"),this.features):new ee.a((function(t,n){navigator.mediaDevices.enumerateDevices().then((function(n){K()(n).call(n,(function(t){"videoinput"===t.kind&&e.features.add("CAMERA"),"audioinput"===t.kind&&e.features.add("MIC")})),t(e.features)})).catch((function(t){o.error("[gum]","err.code: "+t.code),o.error("[gum]",t.name+": "+t.message),n(e.features)}))})).catch((function(t){return o.error("[gum]",t),e.features}))}},{key:"handleMessage",value:function(e){var t=this;if("start"===e.type){if("applyConstraints"===e.arguments[0])return void this.applyConstraints(e.arguments[1]);this.requestConfirmation(e.feature,e.clientId,e.deviceName).then((function(n){n?t.startGum(e.arguments[0],e.feature):t.sendData({type:"error",feature:e.feature,error:{message:"Permission denied",name:"NotAllowedError"}})}))}else if("stopTrack"===e.type){var n,r=Ee()(n=this.peerConnectionVideo.getTransceivers()).call(n,(function(t){return t.sender&&t.sender.track.id===e.trackId}));r&&r.sender?(r.sender.track.stop(),r.stop(),this.peerConnectionVideo.removeTrack(r.sender)):o.debug("[gum]","Failed to stopTrack() "+e.trackId)}}},{key:"setPreferredCodecs",value:function(e,t){try{var n,r=Ee()(n=this.peerConnectionVideo.getTransceivers()).call(n,(function(t){return t.sender&&t.sender.track===e}));r?(t=$e.getPreferredCodecs(t),r.direction="sendonly",r.setCodecPreferences(t)):(o.warn("[gum]","Can't find transceiver for "+e.label),o.debug("[gum]",B()(e)))}catch(e){o.error("[gum]","Failed to set codec ",e)}}},{key:"getStream",value:function(e,t,n){var r,a,i=this;o.debug("[gum]",fe()(r="getStream feature:".concat(n," ")).call(r,e.id));var s,u=De(e.getTracks());try{for(u.s();!(s=u.n()).done;){var c,l,d=s.value;if("video"===d.kind)o.info("[gum]","[Track:video]"+" ".concat(d.label)+fe()(c=", size:".concat(d.getSettings().width,"x")).call(c,d.getSettings().height)+", frameRate:".concat(d.getSettings().frameRate));else o.info(fe()(l="[Track:".concat(d.kind,"] id:")).call(l,d.id));o.debug("[gum]","track:".concat(B()(d))),o.debug("[gum]","settings:".concat(B()(d.getSettings()))),o.debug("[gum]","constraints:".concat(B()(d.getConstraints()))),"function"==typeof d.getCapabilities&&o.debug("[gum]","capabilities:".concat(B()(d.getCapabilities())))}}catch(e){u.e(e)}finally{u.f()}if(this.mediaStream=e,e.onaddtrack=function(e){return o.debug("[gum]","onaddtrack"+B()(e))},e.onremovetrack=function(e){return o.debug("[gum]","onremovetrack"+B()(e))},e.onactive=function(e){return o.debug("[gum]","onactive"+B()(e))},e.oninactive=function(e){return o.debug("[gum]","oninactive"+B()(e))},K()(a=e.getTracks()).call(a,(function(t){"video"===t.kind&&(o.debug("[gum]","adding video track to video peerconnection"),i.peerConnectionVideo.addTrack(t,e)),"audio"===t.kind&&(o.debug("[gum]","adding audio track to default peerconnection"),i.peerConnection.addTrack(t,e))})),t.offload&&t.offload.videoCodecs&&this.setPreferredCodecs(e.getVideoTracks()[0],t.offload.videoCodecs),"CAMERA"===n){var p=e.getVideoTracks()[0];if(void 0===p.getCapabilities){if(void 0===p.getConstraints)throw new Error("getCapabilities is not supported");p.getCapabilities=p.getConstraints}this.sendData({type:"data",feature:n,data:{capabilities:p.getCapabilities(),settings:p.getSettings(),constraints:p.getConstraints()}})}offloadWorker.emit("stream",e)}},{key:"startGum",value:function(e,t){var n,r=this;if(o.debug("[gum]",fe()(n="startGum constraints:".concat(B()(e)," feature:")).call(n,t)),this.debugEnabled){var a=document.createElement("video");a.setAttribute("autoplay",""),a.setAttribute("loop",""),a.src="/face.webm",a.addEventListener("loadeddata",(function(){r.getStream(a.captureStream(),e,t)})),a.addEventListener("error",(function(e){r.sendData({type:"error",feature:t,error:{message:e.message,name:e.name}})}))}else navigator.mediaDevices.getUserMedia(e).then((function(n){return r.getStream(n,e,t)})).catch((function(e){o.error("[gum]","error: "+e),r.sendData({type:"error",feature:t,error:{message:e.message,name:e.name}})}))}},{key:"applyConstraints",value:function(e){var t=this;o.debug("[gum]","applyConstraints ".concat(B()(e))),S()(this,ze).applyConstraints(this.mediaStream,e);var n=this.mediaStream.getVideoTracks()[0];n.applyConstraints(e).then((function(){t.sendData({type:"data",feature:"CAMERA",arguments:["applyConstraints"],data:{capabilities:n.getCapabilities(),settings:n.getSettings(),constraints:n.getConstraints()}})})).catch((function(e){t.sendData({type:"error",feature:"CAMERA",error:{message:e.message,name:e.name}})}))}}]),n}(be);function We(e){var t=this.mediaStream.getVideoTracks();if(t.length>0){var n,r=t[0];Ee()(n=this.peerConnectionVideo.getSenders()).call(n,(function(e){return e.track.kind===r.kind})).replaceTrack(e)}}var Ge=n(232),He=n.n(Ge);function qe(e){var t=function(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i()(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=O()(e);if(t){var o=O()(this).constructor;n=i()(r,arguments,o)}else n=r.apply(this,arguments);return y()(this,n)}}function Ke(e,t){Ye(e,t),t.add(e)}function Xe(e,t,n){Ye(e,t),t.set(e,n)}function Ye(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Qe(e,t,n){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return n}var Ze=new U.a,Je=new W.a,et=new W.a,tt=new W.a,nt=function(e){g()(n,e);var t=qe(n);function n(){var e,r;l()(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,fe()(e=[this]).call(e,a)),Ke(f()(r),tt),Ke(f()(r),et),Ke(f()(r),Je),Xe(f()(r),Ze,{writable:!0,value:null}),r}return p()(n,[{key:"checkCapability",value:function(){return o.debug("[sensor]","checkCapability sensor"),"undefined"!=typeof tizen&&tizen.sensorservice&&this.features.add("SENSOR"),this.debugEnabled?(this.features.add("SENSOR"),this.features):this.features}},{key:"handleMessage",value:function(e){"start"===e.arguments[0]?Qe(this,et,ot).call(this,e.arguments[1]):"stop"===e.arguments[0]?Qe(this,tt,at).call(this):"getSensorData"===e.arguments[0]&&Qe(this,Je,rt).call(this,e.arguments[1])}}]),n}(be);function rt(e){o.debug("[sensor]","getSensorData:"+e);var t=this;S()(this,Ze)["get".concat(e,"SensorData")]((function(e){o.debug("[sensor]","successCallback:"+B()(e)),t.sendData({type:"data",feature:"SENSOR",data:e})}))}function ot(e){var t=this;o.debug("[sensor]","startSensor: "+e);var n=this;try{C()(this,Ze,tizen.sensorservice.getDefaultSensor(e)),S()(this,Ze).start((function(){o.debug("[sensor]","successCallback"),n.sendData({type:"data",feature:"SENSOR"})}),(function(e){o.error("[sensor]","errorCallback: "+B()(e.message)),n.sendData({type:"error",feature:"SENSOR",error:{name:e.name,message:e.message}})}))}catch(e){o.error("[sensor]","error: "+B()(e.message)),He()((function(){t.sendData({type:"error",feature:"SENSOR",error:{message:e.message,name:e.name}})}),1e3)}}function at(){o.debug("[sensor]","stopSensor"),S()(this,Ze)&&S()(this,Ze).stop(),C()(this,Ze,null)}var it=n(241),st=n(275);function ut(e){var t=function(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i()(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=O()(e);if(t){var o=O()(this).constructor;n=i()(r,arguments,o)}else n=r.apply(this,arguments);return y()(this,n)}}function ct(e,t){dt(e,t),t.add(e)}function lt(e,t,n){dt(e,t),t.set(e,n)}function dt(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pt(e,t,n){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return n}o.info("offloadWorker version: ".concat(st.a));var ht=Object(it.c)("debug"),ft=N()({IDLE:0,CONNECTING:1,CONNECTED:2}),mt=new U.a,gt=new U.a,bt=new U.a,yt=new U.a,vt=new U.a,xt=new U.a,wt=new U.a,Ot=new U.a,kt=new U.a,St=new U.a,Tt=new U.a,Ct=new U.a,Et=new W.a,It=new W.a,jt=new W.a,Nt=new W.a,At=new U.a,Rt=new W.a,_t=new U.a,$t=new W.a,Ft=new W.a,Dt=new W.a,Mt=new W.a,Pt=new W.a,Lt=new W.a,Bt=new W.a,zt=new W.a,Ut=function(e){g()(r,e);var t,n=ut(r);function r(){var e,t,a;return l()(this,r),e=n.call(this),ct(f()(e),zt),ct(f()(e),Bt),ct(f()(e),Lt),ct(f()(e),Pt),ct(f()(e),Mt),ct(f()(e),Dt),ct(f()(e),Ft),ct(f()(e),$t),ct(f()(e),Rt),ct(f()(e),Nt),ct(f()(e),jt),ct(f()(e),It),ct(f()(e),Et),lt(f()(e),mt,{writable:!0,value:null}),lt(f()(e),gt,{writable:!0,value:null}),lt(f()(e),bt,{writable:!0,value:null}),lt(f()(e),yt,{writable:!0,value:null}),lt(f()(e),vt,{writable:!0,value:null}),lt(f()(e),xt,{writable:!0,value:null}),lt(f()(e),wt,{writable:!0,value:null}),lt(f()(e),Ot,{writable:!0,value:null}),lt(f()(e),kt,{writable:!0,value:null}),lt(f()(e),St,{writable:!0,value:null}),lt(f()(e),Tt,{writable:!0,value:[]}),lt(f()(e),Ct,{writable:!0,value:ft.IDLE}),lt(f()(e),At,{writable:!0,value:(t=u()(I.a.mark((function t(n){return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:"bye"===n.event?(o.debug("[offload-worker]","client bye: '".concat(n.socketId,"'")),pt(f()(e),Rt,Kt).call(f()(e),n.socketId)):"forceQuit"===n.event&&(o.debug("[offload-worker]","offload-worker will be closed now!"),"undefined"!=typeof tizen?tizen.application.getCurrentApplication().exit():"undefined"!=typeof android?android.emit("destroyService",""):window.open("","_self").close());case 1:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})}),lt(f()(e),_t,{writable:!0,value:(a=u()(I.a.mark((function t(n,r){return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("offer"!==n.message.type){t.next=6;break}return pt(f()(e),$t,Xt).call(f()(e),n.from),t.next=4,pt(f()(e),Pt,en).call(f()(e),n.message.peerConnectionType,n.message.message);case 4:t.next=17;break;case 6:if("answer"!==n.message.type){t.next=11;break}return t.next=9,pt(f()(e),Lt,nn).call(f()(e),n.message.peerConnectionType,n.message.message);case 9:t.next=17;break;case 11:if("candidate"!==n.message.type){t.next=16;break}return t.next=14,pt(f()(e),Bt,on).call(f()(e),n.message.peerConnectionType,n.message.candidate);case 14:t.next=17;break;case 16:o.error("[offload-worker]","unhandled message type: ".concat(n.message.type));case 17:case"end":return t.stop()}}),t)}))),function(e,t){return a.apply(this,arguments)})}),pt(f()(e),Et,Vt).call(f()(e)),e}return p()(r,[{key:"connect",value:function(e,t){if(C()(this,St,t&&t.deviceName||Object(it.a)()),null===e||R()(e).call(e,"file://"))o.error("[offload-worker]","No valid server URL found.");else{if($()(e).call(e,"/offload-js")||(e+="/offload-js"),S()(this,Ct)!==ft.IDLE){if(!t||!t.forceConnect)return void o.debug("[offload-worker]","Already connected or connecting to ".concat(S()(this,wt)));S()(this,mt).disconnect(),C()(this,Ct,ft.IDLE)}o.debug("[offload-worker]","Try to connect to ".concat(e)),pt(this,It,Wt).call(this,e),C()(this,Ct,ft.CONNECTING),C()(this,wt,e)}}},{key:"onConfirmationResult",value:function(e,t){var n;D()(n=S()(this,Tt)).call(n,(function(n){return n.onConfirmationResult(e,t)}))}},{key:"checkCapability",value:(t=u()(I.a.mark((function e(){var t;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.debug("[offload-worker]","checkCapability"),t="",e.next=4,pt(this,jt,Gt).call(this);case 4:"undefined"!=typeof android&&(t=P()(S()(this,Ot)).toString(),android.emit("writeCapability",B()({id:S()(this,vt),name:Object(it.a)(),features:t})));case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"emit",value:function(e,t){if(!S()(this,yt))return o.error("[offload-worker]","Data channel is not opened"),!1;if("string"!=typeof e)return o.error("[offload-worker]","The eventName should be a string"),!1;var n=t||{};return S()(this,yt).send(B()({eventName:e,message:B()(n)})),!0}}]),r}(oe.a);function Vt(){C()(this,vt,localStorage.getItem("workerId")),null===S()(this,vt)&&(C()(this,vt,Object(it.b)()),o.debug("[offload-worker]","New workerId : ".concat(S()(this,vt))),localStorage.setItem("workerId",S()(this,vt)));for(var e=0,t=H()(r);e<t.length;e++){var n=t[e];S()(this,Tt).push(new n({debug:ht}))}}function Wt(e){var t=this;C()(this,mt,ie()(e,{transports:["websocket"],reconnectionAttempts:5})),S()(this,mt).on("connect",u()(I.a.mark((function e(){return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.debug("[offload-worker]","".concat(S()(t,mt).id," connected")),C()(t,Ct,ft.CONNECTED),e.next=4,pt(t,jt,Gt).call(t);case 4:pt(t,Nt,qt).call(t),x()(O()(Ut.prototype),"emit",t).call(t,"connect",S()(t,wt));case 6:case"end":return e.stop()}}),e)})))),S()(this,mt).on("reconnect_attempt",(function(){o.debug("[offload-worker]","reconnect attempt"),S()(t,mt).io.opts.transports=["polling","websocket"]})),S()(this,mt).on("connect_error",(function(e){o.error("[offload-worker]","connect error: %o",e)})),S()(this,mt).on("reconnect_failed",(function(){o.error("[offload-worker]","reconnect failed"),C()(t,Ct,ft.IDLE)})),S()(this,mt).on("disconnect",(function(e){o.debug("[offload-worker]","disconnect ".concat(e)),C()(t,Ct,ft.IDLE)})),S()(this,mt).on("client",S()(this,At)),S()(this,mt).on("message",S()(this,_t))}function Gt(){return Ht.apply(this,arguments)}function Ht(){return(Ht=u()(I.a.mark((function e(){var t,n=this;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o.debug("[offload-worker]","#getCapability"),null===S()(this,Ot)){e.next=3;break}return e.abrupt("return");case 3:return C()(this,Ot,new Z.a),e.next=6,ee.a.all(ne()(t=S()(this,Tt)).call(t,function(){var e=u()(I.a.mark((function e(t){var r;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.checkCapability();case 2:r=e.sent,K()(r).call(r,(function(e){S()(n,Ot).add(e)}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:if(!S()(this,Ot).has("CAMERA")&&!S()(this,Ot).has("MIC")){e.next=20;break}return e.prev=7,e.t0=C.a,e.t1=this,e.t2=kt,e.next=13,navigator.mediaDevices.enumerateDevices();case 13:e.t3=e.sent,(0,e.t0)(e.t1,e.t2,e.t3),e.next=20;break;case 17:e.prev=17,e.t4=e.catch(7),o.error("[offload-worker]",e.t4.name+": "+e.t4.message);case 20:case"end":return e.stop()}}),e,this,[[7,17]])})))).apply(this,arguments)}function qt(){S()(this,mt).emit("join",{id:S()(this,vt),name:S()(this,St),features:P()(S()(this,Ot)),mediaDeviceInfos:S()(this,kt)})}function Kt(e){if(!e||e===S()(this,xt)){if(o.debug("[offload-worker]","hangup"),null!==S()(this,gt)){var t,n;if(null!==S()(this,yt))S()(this,yt).onopen=null,S()(this,yt).onclose=null,S()(this,yt).onmessage=null,S()(this,yt).close(),C()(this,yt,null),K()(n=S()(this,Tt)).call(n,(function(e){e.setDataChannel(null)}));S()(this,gt).onnegotiationneeded=null,S()(this,gt).onicecandidate=null,S()(this,gt).ondatachannel=null,S()(this,gt).close(),C()(this,gt,null),K()(t=S()(this,Tt)).call(t,(function(e){e.setPeerConnection(null)}))}var r;if(null!==S()(this,bt))S()(this,bt).onnegotiationneeded=null,S()(this,bt).onicecandidate=null,S()(this,bt).ondatachannel=null,S()(this,bt).close(),C()(this,bt,null),K()(r=S()(this,Tt)).call(r,(function(e){e.setPeerConnectionForVideo(null)}));C()(this,xt,null)}}function Xt(e){var t,n,r,a,i,s,u,c=this;null===S()(this,gt)&&(o.debug("[offload-worker]","create peer connection. "+e),C()(this,gt,new RTCPeerConnection),S()(this,gt).onnegotiationneeded=Y()(t=pt(this,Ft,Yt)).call(t,this,"default"),S()(this,gt).onicecandidate=Y()(n=pt(this,Dt,Zt)).call(n,this,"default"),S()(this,gt).ondatachannel=Y()(r=pt(this,Mt,Jt)).call(r,this),K()(a=S()(this,Tt)).call(a,(function(e){e.setPeerConnection(S()(c,gt))})),C()(this,xt,e),C()(this,bt,new RTCPeerConnection),o.debug("[offload-worker]","create peer connection for video. "+e),S()(this,bt).onnegotiationneeded=Y()(i=pt(this,Ft,Yt)).call(i,this,"video"),S()(this,bt).onicecandidate=Y()(s=pt(this,Dt,Zt)).call(s,this,"video"),K()(u=S()(this,Tt)).call(u,(function(e){e.setPeerConnectionForVideo(S()(c,bt))})))}function Yt(e){return Qt.apply(this,arguments)}function Qt(){return(Qt=u()(I.a.mark((function e(t){var n,r;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.debug("[offload-worker]","connection callback. "+t),n="default"===t?S()(this,gt):S()(this,bt),e.prev=2,e.next=5,n.createOffer();case 5:if(r=e.sent,"stable"===n.signalingState){e.next=8;break}throw new DOMException("The RTCPeerConnection's signalingState is not 'stable'","InvalidStateError");case 8:return e.next=10,n.setLocalDescription(r);case 10:o.debug("[offload-worker]","send offer for connection "+n),pt(this,zt,sn).call(this,{type:"offer",peerConnectionType:t,message:n.localDescription}),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),o.error("[offload-worker]","reason: "+e.t0.message);case 17:case"end":return e.stop()}}),e,this,[[2,14]])})))).apply(this,arguments)}function Zt(e,t){t.candidate&&(o.debug("[offload-worker]","send candidate for "+e),pt(this,zt,sn).call(this,{type:"candidate",peerConnectionType:e,candidate:t.candidate}))}function Jt(e){var t=this;C()(this,yt,e.channel),S()(this,yt).onopen=function(){var e;o.debug("[offload-worker]","data channel opened"),K()(e=S()(t,Tt)).call(e,(function(e){e.setDataChannel(S()(t,yt))}))},S()(this,yt).onclose=function(){o.debug("[offload-worker]","data channel closed"),pt(t,Rt,Kt).call(t)},S()(this,yt).onmessage=function(e){var n,r=JSON.parse(e.data);K()(n=S()(t,Tt)).call(n,(function(e){e.hasFeature(r.feature)&&e.handleMessage(r)}));var a=r.eventName,i=r.message;a&&i?x()(O()(Ut.prototype),"emit",t).call(t,a,JSON.parse(i)):o.error("[offload-worker]","unsupported message format")}}function en(e,t){return tn.apply(this,arguments)}function tn(){return(tn=u()(I.a.mark((function e(t,n){var r,a;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.debug("[offload-worker]","got offer for "+t),r="default"===t?S()(this,gt):S()(this,bt),e.prev=2,e.next=5,r.setRemoteDescription(n);case 5:return e.next=7,r.createAnswer();case 7:return a=e.sent,e.next=10,r.setLocalDescription(a);case 10:o.debug("[offload-worker]","send answer for "+t),pt(this,zt,sn).call(this,{type:"answer",peerConnectionType:t,message:r.localDescription}),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),o.error("[offload-worker]","reason: "+e.t0.toString());case 17:case 18:case"end":return e.stop()}}),e,this,[[2,14]])})))).apply(this,arguments)}function nn(e,t){return rn.apply(this,arguments)}function rn(){return(rn=u()(I.a.mark((function e(t,n){var r;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.debug("[offload-worker]","got answer for "+t),r="default"===t?S()(this,gt):S()(this,bt),e.prev=2,e.next=5,r.setRemoteDescription(n);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(2),o.error("[offload-worker]","reason: "+e.t0.toString());case 10:case"end":return e.stop()}}),e,this,[[2,7]])})))).apply(this,arguments)}function on(e,t){return an.apply(this,arguments)}function an(){return(an=u()(I.a.mark((function e(t,n){var r;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.debug("[offload-worker]","got candidate for "+t),r="default"===t?S()(this,gt):S()(this,bt),e.prev=2,e.next=5,r.addIceCandidate(n);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(2),o.error("[offload-worker]","reason: "+e.t0.toString());case 10:case"end":return e.stop()}}),e,this,[[2,7]])})))).apply(this,arguments)}function sn(e){null!==S()(this,mt)&&S()(this,mt).emit("message",{to:S()(this,xt),from:S()(this,vt),message:e})}o.setLevel("info");var un=new Ut;window.offloadWorker=un}]).default;
\ No newline at end of file
index 86d51bb..ed93bb5 100644 (file)
@@ -1,31 +1,32 @@
+const config = require('./config');
 const path = require('path');
 const fs = require('fs');
 const express = require('express');
 const QRCode = require('qrcode');
 const Edge = require('./edge');
-const SocketTizen = require('./socket-tizen');
-const { getMyAddress } = require('./util');
+const ServerSocketTizen = require('./socket-tizen');
+const { getMyURLs } = require('./util');
+const http = require('http');
+const https = require('https');
 
-const TAG = 'service.js';
+const TAG = 'offload-server:service';
 
 const app = express();
 
-const options = {
-  key: fs.readFileSync(path.resolve(__dirname, 'key.pem')),
-  cert: fs.readFileSync(path.resolve(__dirname, 'cert.pem'))
-};
+let certificateId = 0;
+let certificateUpdateInterval = null;
 
 console.log(TAG, `platform : ${process.platform}`);
 
 const httpPort = process.env.HTTP_PORT || 9559;
 const httpsPort = process.env.PORT || process.env.HTTPS_PORT || 5443;
-const httpsServer = require('https').createServer(options, app);
-const httpServer = require('http').createServer(app);
+const httpsServer = https.createServer(null, app);
+const httpServer = http.createServer(app);
 const io = require('socket.io')();
 const isTizen = process.platform === 'tizen';
-const supportMessagePort = isTizen;
+const supportMessagePort = isTizen && config.useMessagePort;
 // Implementation for edge orchestration
-const supportEdgeOrchestration =
+const supportEdgeOrchestration = config.useMeerkat &&
   typeof webapis !== 'undefined' && Object.hasOwnProperty.call(webapis, 'edge');
 console.log(TAG, `supportEdgeOrchestration : ${supportEdgeOrchestration}`);
 
@@ -38,8 +39,7 @@ const sockets = new Map();
 let edgeForCastanets = null;
 let forceQuitTimer = null;
 let isMeerkatStarted = false;
-let statusIntervalId = null;
-let localPort = null;
+let messagePortServer = null;
 
 app.set('host', '0.0.0.0');
 
@@ -79,7 +79,7 @@ if (isTizen) {
 }
 
 function onConnection(socket) {
-  if (isTizen && !isMeerkatStarted) {
+  if (supportEdgeOrchestration && !isMeerkatStarted) {
     try {
       console.log(TAG, 'Try to start Meerkat client.');
       tizen.application.launch(
@@ -110,12 +110,18 @@ function onConnection(socket) {
     clients.add(socket.id);
 
     let qr = null;
-    const myAddress = getMyAddress();
-    if (myAddress) {
+    const offloadServerUrl = getMyURLs({
+      protocol: 'https:',
+      host: config.useDomainName ? config.domainName : null,
+      port: httpsPort
+    })[0];
+    console.log(TAG, 'Offload Server URL: ' + offloadServerUrl);
+
+    if (offloadServerUrl) {
       try {
-        qr = await QRCode.toDataURL(
-          'https://' + myAddress + ':5443/offload-worker.html'
-        );
+        const offloadWorkerUrl = offloadServerUrl + 'offload-worker';
+        qr = await QRCode.toDataURL(offloadWorkerUrl);
+        console.log(TAG, 'Offload Worker URL for QR Code: ' + offloadWorkerUrl);
       } catch (err) {
         console.error(TAG, 'unabled to generate QR: ' + err);
       }
@@ -289,18 +295,36 @@ if (supportEdgeOrchestration) {
   );
 }
 
-function startServer() {
+async function startServer() {
+  if (httpsServer.listening && httpServer.listening) {
+    return;
+  }
   console.log(TAG, 'starting server...');
+  if (!updateCertificateFromLocal() || config.useCertificateUpdate) {
+    await updateCertificateFromServer();
+    // try to renew certificate every 24 hours
+    if (!certificateUpdateInterval) {
+      certificateUpdateInterval = setInterval(updateCertificateFromServer, 1000 * 60 * 60 * 24);
+    }
+  }
 
   if (!httpsServer.listening) {
     httpsServer.listen(httpsPort, function () {
-      console.log(TAG, `server is listening on https ${httpsPort} port.`);
+      getMyURLs({
+        protocol: 'https:',
+        host: config.useDomainName ? config.domainName : null,
+        port: httpsPort
+      }).forEach(url => console.log(TAG, `server is listening on ${url}`));
     });
   }
 
   if (!httpServer.listening) {
     httpServer.listen(httpPort, function () {
-      console.log(TAG, `server is listening on http ${httpPort} port.`);
+      getMyURLs({
+        protocol: 'http:',
+        host: config.useDomainName ? config.domainName : null,
+        port: httpPort
+      }).forEach(url => console.log(TAG, `server is listening on ${url}`));
     });
   }
 }
@@ -308,6 +332,11 @@ function startServer() {
 function closeServer() {
   console.log(TAG, 'closing server...');
 
+  if (certificateUpdateInterval) {
+    clearInterval(certificateUpdateInterval);
+    certificateUpdateInterval = null;
+  }
+
   if (httpsServer.listening) {
     httpsServer.close(err => {
       if (err) {
@@ -325,51 +354,77 @@ function closeServer() {
   }
 }
 
-// Check the client status
-function checkConnectionStatus() {
-  for (const client of clients) {
-    const socket = sockets.get(client);
-    if (socket.constructor === SocketTizen) {
-      try {
-        socket.emit('status');
-      } catch (e) {
-        console.error(TAG, `Failed to check ${client} status`);
-        socket.handleEvents('disconnect');
+function httpRequest(method, host, path, port) {
+  return new Promise((resolve, reject) => {
+    const options = {
+      method,
+      host,
+      path,
+      port,
+    };
+
+    const req = http.request(options, res => {
+      if (res.statusCode < 200 || res.statusCode >= 300) {
+        reject(new Error(`statusCode=${res.statusCode}`));
+        return;
       }
-    }
-  }
+
+      let body = [];
+      res.on('data', function (chunk) {
+        body.push(chunk);
+      });
+      res.on('end', function () {
+        try {
+          body = JSON.parse(Buffer.concat(body).toString());
+        } catch (e) {
+          reject(e);
+          return;
+        }
+        resolve(body);
+      });
+    });
+    req.on('error', reject);
+    req.end();
+  });
 }
 
-function handleMessagePort(messages) {
-  if (messages.length === 0) {
-    console.error(TAG, 'Not found message');
-    return;
+function updateCertificateFromLocal() {
+  if (certificateId) {
+    console.log(TAG, 'Ignore the local certificate becasue it has already been updated from server.');
+    return false;
+  }
+  try {
+    httpsServer.setSecureContext(
+      {
+        key: fs.readFileSync(path.resolve(__dirname, 'key.pem')),
+        cert: fs.readFileSync(path.resolve(__dirname, 'cert.pem'))
+      }
+    );
+  } catch (error) {
+    console.log(TAG, 'Failed to set local certificate.', error.message);
+    return false;
   }
 
-  const message = messages[0];
-  const event = message.key;
-  const value = JSON.parse(message.value);
-  const id = value.id;
-
-  if (event === 'connect') {
-    // FIXME: The message port does not guarantee that the connection has
-    //  been disconnected when the page is reloaded. Therefore, if a new
-    //  connection occurs with the same id, the existing connection is
-    //  disconnected.
-    if (sockets.has(id)) {
-      console.log(TAG, `Disconnect already connected socket: ${id}`);
-      const socket = sockets.get(id);
-      socket.handleEvents('disconnect');
-    }
+  console.log(TAG, 'Test Certificate is used');
+  return true;
+}
 
-    const socket = new SocketTizen(id, localPort);
-    socket.on('connection', onConnection);
-    socket.connect();
-    sockets.set(id, socket);
-    startServer();
-  } else {
-    const socket = sockets.get(id);
-    socket.handleEvents(event, value.data);
+async function updateCertificateFromServer() {
+  try {
+    const cert = await httpRequest('GET', config.certificateServerHost, `/cert?id=${certificateId}`, 80);
+
+    if (cert.id && cert.id !== certificateId) {
+      certificateId = cert.id;
+      httpsServer.setSecureContext(
+        {
+          key: cert.key,
+          cert: cert.cert,
+        }
+      );
+      console.log(TAG, `Certificate#${certificateId} is renewed`);
+    }
+  } catch (error) {
+    console.error(TAG, error);
   }
 }
 
@@ -377,11 +432,12 @@ module.exports.onStart = () => {
   console.log(`${TAG} onStart is called`);
   if (supportMessagePort) {
     console.log(TAG, 'listening tizen messageport...');
-    localPort = tizen.messageport.requestLocalMessagePort('offload');
-    localPort.addMessagePortListener(handleMessagePort);
-
-    // Prevent to terminate the process
-    statusIntervalId = setInterval(checkConnectionStatus, 1000);
+    messagePortServer = new ServerSocketTizen('offload', config.messagePortPingInterval);
+    messagePortServer.on('connection', socket => {
+      startServer();
+      onConnection(socket);
+    });
+    messagePortServer.listen();
   } else {
     startServer();
   }
@@ -389,18 +445,10 @@ module.exports.onStart = () => {
 
 module.exports.onStop = () => {
   console.log(`${TAG} onStop is called`);
-  if (supportMessagePort) {
-    for (const socket of sockets.values()) {
-      socket.close();
-    }
-    if (localPort !== null) {
-      localPort.removeMessagePortListener(handleMessagePort);
-    }
-    if (statusIntervalId !== null) {
-      clearInterval(statusIntervalId);
-    }
+  if (messagePortServer !== null) {
+    messagePortServer.close();
+    messagePortServer = null;
   }
-
   closeServer();
 };
 
index a94ede6..dba8480 100644 (file)
-const TAG = 'socket-tizen.js';
+const TAG = 'offload-server:socket-tizen';
+const EventEmitter = require('events');
 
 class SocketTizen {
-  constructor(id, localPort) {
+  constructor(id, remotePort, localPort) {
     console.log(TAG, `SocketTizen created for ${id}`);
-    this._appId = id;
-    this._portName = 'offload';
+    this._id = id;
     this._localPort = localPort;
-    this._remotePort = null;
-    this._eventHandlers = {};
+    this._remotePort = remotePort;
+    this._eventEmitter = new EventEmitter();
   }
 
   get id() {
-    return this._appId;
+    return this._id;
   }
 
   on(event, callback) {
-    this._eventHandlers[event] = callback.bind(null);
+    this._eventEmitter.on(event, callback);
   }
 
   handleEvents(event, value) {
-    const handler = this._eventHandlers[event];
-    if (!handler) {
-      console.error(TAG, `Messageport ${event} handler is not found`);
-      return;
-    }
-
-    handler(value);
+    this._eventEmitter.emit(event, value);
   }
 
   emit(event, message) {
-    console.log(TAG, `Messageport emit: ${event}`);
+    console.debug(TAG, `Messageport emit: ${event}`);
     const value = message || {};
     try {
-      this._remotePort.sendMessage(
-        [
-          {
-            key: event,
-            value: JSON.stringify(value)
-          }
-        ],
-        this._localPort
-      );
+      this.send({ key: event, value: JSON.stringify(value) });
     } catch (error) {
-      console.error(TAG, 'Messageport emit failed:' + error);
-      throw new Error('Messageport emit failed');
+      console.error(TAG, 'Messageport emit failed' + error);
+      this.close({ reason: 'transport error', details: error.message });
     }
   }
 
-  connect() {
-    console.log(TAG, `Messageport try to connect ${this._appId}`);
-    try {
-      this._remotePort = tizen.messageport.requestRemoteMessagePort(
-        this._appId,
-        this._portName
-      );
+  send(obj) {
+    this._remotePort.sendMessage([obj], this._localPort);
+  }
 
-      this.handleEvents('connection', this);
-      this.emit('connect');
-    } catch (error) {
-      console.error(TAG, 'Messageport connection failed: ' + error);
+  close(reason) {
+    this.handleEvents('disconnect', reason || { reason: 'io client disconnect' });
+  }
+}
+
+class ServerSocketTizen {
+  /**
+   * ServerSocketTizen
+   * @param {string} local message port name for listening
+   * @param {number} pingInterval to check whether the remote message port is connected
+   */
+  constructor(portName, pingInterval = 1000) {
+    console.log(TAG, `ServerSocketTizen created for ${portName}`);
+    this._portName = portName;
+    this._localPort = null;
+    this._sockets = new Map();
+    this._eventEmitter = new EventEmitter();
+    this._connectionIntervalId = setInterval(() => {
+      // Handle ping message only internally
+      this._sockets.forEach(socket => {
+        try {
+          socket.send({ key: 'ping' });
+        } catch (error) {
+          console.error(TAG, 'ping failed. ' + error);
+          socket.close({ reason: 'transport error', details: error.message });
+        }
+      });
+    }, pingInterval);
+  }
+
+  get id() {
+    return this._portName;
+  }
+
+  on(event, callback) {
+    this._eventEmitter.on(event, callback);
+  }
+
+  handleEvents(event, value) {
+    this._eventEmitter.emit(event, value);
+  }
+
+  handleMessagePort(messages, remoteMsgPort) {
+    if (messages.length === 0) {
+      console.error(TAG, 'Not found message');
+      return;
+    }
+
+    const remoteId = remoteMsgPort.appId + ':' + remoteMsgPort.messagePortName;
+    const message = messages[0];
+    const event = message.key;
+
+    if (event === 'connect') {
+      if (this._sockets.has(remoteId)) {
+        console.error(TAG, 'The same message port is already connected from ' + remoteId);
+        return;
+      }
+      const socket = new SocketTizen(remoteId, remoteMsgPort, this._localPort);
+      socket.on('disconnect', () => {
+        console.log(TAG, 'message port socket is disconnected from ' + remoteId);
+        this._sockets.delete(remoteId);
+      });
+      this.handleEvents('connection', socket);
+      socket.emit('connect');
+      this._sockets.set(remoteId, socket);
+      console.log(TAG, 'message port socket is connected from ' + remoteId);
+    } else {
+      if (!this._sockets.has(remoteId)) {
+        console.error(TAG, 'message is received without connection from ' + remoteId);
+        return;
+      }
+      this._sockets.get(remoteId).handleEvents(event, JSON.parse(message.value));
     }
   }
 
+  /**
+   * listen local messageport as server to connect new message port connection
+   */
+  listen() {
+    console.log(TAG, 'listening messageport server...');
+    this._localPort = tizen.messageport.requestLocalMessagePort(this._portName);
+    this._localPort.addMessagePortListener(this.handleMessagePort.bind(this));
+  }
+
   close() {
-    // TODO: Need to implement
+    console.log(TAG, 'closing messageport server...');
+    clearInterval(this._connectionIntervalId);
+    this._localPort.removeMessagePortListener(this.handleMessagePort.bind(this));
+    this._sockets.forEach(socket => socket.close({ reason: 'io server disconnect' }));
   }
 }
 
-module.exports = SocketTizen;
+module.exports = ServerSocketTizen;
index 4c79773..336b666 100644 (file)
@@ -1,31 +1,47 @@
 const os = require('os');
 
-function getMyAddress() {
+// eslint-disable-next-line no-unused-vars
+const TAG = 'offload-server:util';
+
+function getMyAddresses() {
   const interfaces = os.networkInterfaces();
-  const addresses = {};
+  const addresses = [];
   for (const intf in interfaces) {
     if (Object.hasOwnProperty.call(interfaces, intf)) {
       for (const addr in interfaces[intf]) {
         if (Object.hasOwnProperty.call(interfaces[intf], addr)) {
           const address = interfaces[intf][addr];
-          if (address.family === 'IPv4' && !address.internal) {
-            addresses[intf] = address.address;
+          if (address.family !== 'IPv4' || address.internal) { continue; }
+          // console.debug(TAG, `getMyAddress() ${intf} : ${address.address}`);
+          // Try to connect with 'wl' prefix interface first.
+          if (/^wl/.test(intf)) {
+            addresses.unshift(address.address);
+            continue;
           }
+          addresses.push(address.address);
         }
       }
     }
   }
-  if (Object.keys(addresses).length === 0) {
-    return null;
-  }
 
-  // Try to connect with 'wl' prefix interface first.
-  const wlanKeys = Object.keys(addresses).filter(intf => /^wl/.test(intf));
-  return wlanKeys.length > 0
-    ? addresses[wlanKeys[0]]
-    : Object.entries(addresses)[0][1];
+  // console.debug(TAG, 'getMyAddress()', addresses);
+  return addresses;
+}
+
+function getMyURLs({ protocol = 'http:', host, port = 80 }) {
+  const addresses = getMyAddresses();
+  addresses.forEach((value, index) => {
+    if (host) {
+      addresses[index] = new URL(`${protocol}//${value.replace(/\./g, '-')}.${host}:${port}`);
+    } else {
+      addresses[index] = new URL(`${protocol}//${value}:${port}`);
+    }
+  });
+  // console.debug(TAG, 'getMyDomainAddresses()', addresses);
+  return addresses;
 }
 
 module.exports = {
-  getMyAddress
+  getMyAddresses,
+  getMyURLs,
 };