@micromag/viewer-build 0.2.349 → 0.2.352
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/asset-manifest.json +44 -46
- package/build/index.html +1 -1
- package/build/static/css/main.84dd7324.chunk.css +2 -0
- package/build/static/css/main.84dd7324.chunk.css.map +1 -0
- package/build/static/js/{0.f79b9ef3.chunk.js → 0.e9d808b4.chunk.js} +2 -2
- package/build/static/js/{0.f79b9ef3.chunk.js.map → 0.e9d808b4.chunk.js.map} +1 -1
- package/build/static/js/{1.dc8210ea.chunk.js → 1.10b11229.chunk.js} +2 -2
- package/build/static/js/{1.dc8210ea.chunk.js.map → 1.10b11229.chunk.js.map} +1 -1
- package/build/static/js/{12.6fa9cc23.chunk.js → 10.5043cd3c.chunk.js} +2 -2
- package/build/static/js/{12.6fa9cc23.chunk.js.map → 10.5043cd3c.chunk.js.map} +1 -1
- package/build/static/js/{13.f18a2ee1.chunk.js → 11.505258e4.chunk.js} +2 -2
- package/build/static/js/{13.f18a2ee1.chunk.js.map → 11.505258e4.chunk.js.map} +1 -1
- package/build/static/js/{14.06caff0d.chunk.js → 12.db5d747d.chunk.js} +2 -2
- package/build/static/js/{14.06caff0d.chunk.js.map → 12.db5d747d.chunk.js.map} +1 -1
- package/build/static/js/{15.c10bab99.chunk.js → 13.eee02164.chunk.js} +2 -2
- package/build/static/js/{15.c10bab99.chunk.js.map → 13.eee02164.chunk.js.map} +1 -1
- package/build/static/js/{16.362ba203.chunk.js → 14.545de4b8.chunk.js} +2 -2
- package/build/static/js/{16.362ba203.chunk.js.map → 14.545de4b8.chunk.js.map} +1 -1
- package/build/static/js/15.bac0802a.chunk.js +2 -0
- package/build/static/js/15.bac0802a.chunk.js.map +1 -0
- package/build/static/js/{17.a3771ccd.chunk.js → 16.04903139.chunk.js} +2 -2
- package/build/static/js/{17.a3771ccd.chunk.js.map → 16.04903139.chunk.js.map} +1 -1
- package/build/static/js/17.ce3338f7.chunk.js +2 -0
- package/build/static/js/{18.d3cd761e.chunk.js.map → 17.ce3338f7.chunk.js.map} +1 -1
- package/build/static/js/{2.0b2dbffa.chunk.js → 2.1c01c038.chunk.js} +2 -2
- package/build/static/js/{2.0b2dbffa.chunk.js.map → 2.1c01c038.chunk.js.map} +1 -1
- package/build/static/js/5.b1de04f7.chunk.js +3 -0
- package/build/static/js/{5.35e5a74b.chunk.js.LICENSE.txt → 5.b1de04f7.chunk.js.LICENSE.txt} +0 -7
- package/build/static/js/5.b1de04f7.chunk.js.map +1 -0
- package/build/static/js/{6.07a76264.chunk.js → 6.cd3776b3.chunk.js} +3 -3
- package/build/static/js/{6.07a76264.chunk.js.LICENSE.txt → 6.cd3776b3.chunk.js.LICENSE.txt} +0 -0
- package/build/static/js/{6.07a76264.chunk.js.map → 6.cd3776b3.chunk.js.map} +1 -1
- package/build/static/js/{9.a413d252.chunk.js → 7.fbca3b10.chunk.js} +2 -2
- package/build/static/js/{9.a413d252.chunk.js.map → 7.fbca3b10.chunk.js.map} +1 -1
- package/build/static/js/8.33d32e6f.chunk.js +2 -0
- package/build/static/js/8.33d32e6f.chunk.js.map +1 -0
- package/build/static/js/9.294af4b0.chunk.js +2 -0
- package/build/static/js/9.294af4b0.chunk.js.map +1 -0
- package/build/static/js/main.ac6010b6.chunk.js +2 -0
- package/build/static/js/main.ac6010b6.chunk.js.map +1 -0
- package/build/static/js/runtime-main.7e86a7b4.js +2 -0
- package/build/static/js/runtime-main.7e86a7b4.js.map +1 -0
- package/package.json +7 -7
- package/build/static/css/main.143562a2.chunk.css +0 -2
- package/build/static/css/main.143562a2.chunk.css.map +0 -1
- package/build/static/js/10.ab3fb08c.chunk.js +0 -2
- package/build/static/js/10.ab3fb08c.chunk.js.map +0 -1
- package/build/static/js/11.bb0e7bef.chunk.js +0 -2
- package/build/static/js/11.bb0e7bef.chunk.js.map +0 -1
- package/build/static/js/18.d3cd761e.chunk.js +0 -2
- package/build/static/js/5.35e5a74b.chunk.js +0 -3
- package/build/static/js/5.35e5a74b.chunk.js.map +0 -1
- package/build/static/js/7.57910475.chunk.js +0 -2
- package/build/static/js/7.57910475.chunk.js.map +0 -1
- package/build/static/js/8.f6bad856.chunk.js +0 -2
- package/build/static/js/8.f6bad856.chunk.js.map +0 -1
- package/build/static/js/main.1947d720.chunk.js +0 -2
- package/build/static/js/main.1947d720.chunk.js.map +0 -1
- package/build/static/js/runtime-main.e1c8234d.js +0 -2
- package/build/static/js/runtime-main.e1c8234d.js.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! For license information please see 6.
|
|
2
|
-
(this["webpackJsonp@micromag/viewer-build"]=this["webpackJsonp@micromag/viewer-build"]||[]).push([[6],{533:function(t,e,n){var r,s=n(612),o=n(572),i=n(614),a=n(615),c=n(616);"undefined"!==typeof ArrayBuffer&&(r=n(617));var u="undefined"!==typeof navigator&&/Android/i.test(navigator.userAgent),p="undefined"!==typeof navigator&&/PhantomJS/i.test(navigator.userAgent),l=u||p;e.protocol=3;var h=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},f=s(h),d={type:"error",data:"parser error"},y=n(618);function m(t,e,n){for(var r=new Array(t.length),s=a(t.length,n),o=function(t,n,s){e(n,(function(e,n){r[t]=n,s(e,r)}))},i=0;i<t.length;i++)o(i,t[i],s)}e.encodePacket=function(t,n,r,s){"function"===typeof n&&(s=n,n=!1),"function"===typeof r&&(s=r,r=null);var o=void 0===t.data?void 0:t.data.buffer||t.data;if("undefined"!==typeof ArrayBuffer&&o instanceof ArrayBuffer)return function(t,n,r){if(!n)return e.encodeBase64Packet(t,r);var s=t.data,o=new Uint8Array(s),i=new Uint8Array(1+s.byteLength);i[0]=h[t.type];for(var a=0;a<o.length;a++)i[a+1]=o[a];return r(i.buffer)}(t,n,s);if("undefined"!==typeof y&&o instanceof y)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 s=new FileReader;return s.onload=function(){e.encodePacket({type:t.type,data:s.result},n,!0,r)},s.readAsArrayBuffer(t.data)}(t,n,r);var s=new Uint8Array(1);s[0]=h[t.type];var o=new y([s.buffer,t.data]);return r(o)}(t,n,s);if(o&&o.base64)return function(t,n){var r="b"+e.packets[t.type]+t.data.data;return n(r)}(t,s);var i=h[t.type];return void 0!==t.data&&(i+=r?c.encode(String(t.data),{strict:!1}):String(t.data)),s(""+i)},e.encodeBase64Packet=function(t,n){var r,s="b"+e.packets[t.type];if("undefined"!==typeof y&&t.data instanceof y){var o=new FileReader;return o.onload=function(){var t=o.result.split(",")[1];n(s+t)},o.readAsDataURL(t.data)}try{r=String.fromCharCode.apply(null,new Uint8Array(t.data))}catch(u){for(var i=new Uint8Array(t.data),a=new Array(i.length),c=0;c<i.length;c++)a[c]=i[c];r=String.fromCharCode.apply(null,a)}return s+=btoa(r),n(s)},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(e){return!1}return t}(t)))return d;var s=t.charAt(0);return Number(s)==s&&f[s]?t.length>1?{type:f[s],data:t.substring(1)}:{type:f[s]}:d}s=new Uint8Array(t)[0];var o=i(t,1);return y&&"blob"===n&&(o=new y([o])),{type:f[s],data:o}},e.decodeBase64Packet=function(t,e){var n=f[t.charAt(0)];if(!r)return{type:n,data:{base64:!0,data:t.substr(1)}};var s=r.decode(t.substr(1));return"blob"===e&&y&&(s=new y([s])),{type:n,data:s}},e.encodePayload=function(t,n,r){"function"===typeof n&&(r=n,n=null);var s=o(t);if(n&&s)return y&&!l?e.encodePayloadAsBlob(t,r):e.encodePayloadAsArrayBuffer(t,r);if(!t.length)return r("0:");m(t,(function(t,r){e.encodePacket(t,!!s&&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 s;if("function"===typeof n&&(r=n,n=null),""===t)return r(d,0,1);for(var o,i,a="",c=0,u=t.length;c<u;c++){var p=t.charAt(c);if(":"===p){if(""===a||a!=(o=Number(a)))return r(d,0,1);if(a!=(i=t.substr(c+1,o)).length)return r(d,0,1);if(i.length){if(s=e.decodePacket(i,n,!1),d.type===s.type&&d.data===s.data)return r(d,0,1);if(!1===r(s,c+o,u))return}c+=o,a=""}else a+=p}return""!==a?r(d,0,1):void 0},e.encodePayloadAsArrayBuffer=function(t,n){if(!t.length)return n(new ArrayBuffer(0));m(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),s=new Uint8Array(r),o=0;return e.forEach((function(t){var e="string"===typeof t,n=t;if(e){for(var r=new Uint8Array(t.length),i=0;i<t.length;i++)r[i]=t.charCodeAt(i);n=r.buffer}s[o++]=e?0:1;var a=n.byteLength.toString();for(i=0;i<a.length;i++)s[o++]=parseInt(a[i]);s[o++]=255;for(r=new Uint8Array(n),i=0;i<r.length;i++)s[o++]=r[i]})),n(s.buffer)}))},e.encodePayloadAsBlob=function(t,n){m(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),s=0;s<t.length;s++)r[s]=t.charCodeAt(s);t=r.buffer,e[0]=0}var o=(t instanceof ArrayBuffer?t.byteLength:t.size).toString(),i=new Uint8Array(o.length+1);for(s=0;s<o.length;s++)i[s]=parseInt(o[s]);if(i[o.length]=255,y){var a=new y([e.buffer,i.buffer,t]);n(null,a)}}))}),(function(t,e){return n(new y(e))}))},e.decodePayloadAsBinary=function(t,n,r){"function"===typeof n&&(r=n,n=null);for(var s=t,o=[];s.byteLength>0;){for(var a=new Uint8Array(s),c=0===a[0],u="",p=1;255!==a[p];p++){if(u.length>310)return r(d,0,1);u+=a[p]}s=i(s,2+u.length),u=parseInt(u);var l=i(s,0,u);if(c)try{l=String.fromCharCode.apply(null,new Uint8Array(l))}catch(y){var h=new Uint8Array(l);l="";for(p=0;p<h.length;p++)l+=String.fromCharCode(h[p])}o.push(l),s=i(s,u)}var f=o.length;o.forEach((function(t,s){r(e.decodePacket(t,n,!0),s,f)}))}},537:function(t,e,n){(function(r){function s(){var t;try{t=e.storage.debug}catch(n){}return!t&&"undefined"!==typeof r&&"env"in r&&(t=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}).DEBUG),t}(e=t.exports=n(602)).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 s=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(s++,"%c"===t&&(o=s))})),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(n){}},e.load=s,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&&"undefined"!=typeof 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(e){return"[UnexpectedJSONParseError]: "+e.message}},e.enable(s())}).call(this,n(195))},538: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,s=n.length;r<s;r++){var o=n[r].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}},539:function(t,e){t.exports=function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},540:function(t,e,n){(function(r){function s(){var t;try{t=e.storage.debug}catch(n){}return!t&&"undefined"!==typeof r&&"env"in r&&(t=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}).DEBUG),t}(e=t.exports=n(619)).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 s=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(s++,"%c"===t&&(o=s))})),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(n){}},e.load=s,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&&"undefined"!=typeof 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(e){return"[UnexpectedJSONParseError]: "+e.message}},e.enable(s())}).call(this,n(195))},553: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 s=0;s<r.length;s++)if((n=r[s])===e||n.fn===e){r.splice(s,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var s=(n=n.slice(0)).length;r<s;++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}},554:function(t,e,n){var r=n(604)("socket.io-parser"),s=n(553),o=n(607),i=n(567),a=n(568);function c(){}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=c,e.Decoder=l;var u=e.ERROR+'"encode error"';function p(t){var n=""+t.type;if(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){var s=function(t){try{return JSON.stringify(t)}catch(e){return!1}}(t.data);if(!1===s)return u;n+=s}return r("encoded %j as %s",t,n),n}function l(){this.reconstructor=null}function h(t){this.reconPack=t,this.buffers=[]}function f(t){return{type:e.ERROR,data:"parser error: "+t}}c.prototype.encode=function(t,n){(r("encoding packet %j",t),e.BINARY_EVENT===t.type||e.BINARY_ACK===t.type)?function(t,e){function n(t){var n=o.deconstructPacket(t),r=p(n.packet),s=n.buffers;s.unshift(r),e(s)}o.removeBlobs(t,n)}(t,n):n([p(t)])},s(l.prototype),l.prototype.add=function(t){var n;if("string"===typeof t)n=function(t){var n=0,s={type:Number(t.charAt(0))};if(null==e.types[s.type])return f("unknown packet type "+s.type);if(e.BINARY_EVENT===s.type||e.BINARY_ACK===s.type){for(var o=n+1;"-"!==t.charAt(++n)&&n!=t.length;);var a=t.substring(o,n);if(a!=Number(a)||"-"!==t.charAt(n))throw new Error("Illegal attachments");s.attachments=Number(a)}if("/"===t.charAt(n+1)){for(o=n+1;++n;){if(","===(u=t.charAt(n)))break;if(n===t.length)break}s.nsp=t.substring(o,n)}else s.nsp="/";var c=t.charAt(n+1);if(""!==c&&Number(c)==c){for(o=n+1;++n;){var u;if(null==(u=t.charAt(n))||Number(u)!=u){--n;break}if(n===t.length)break}s.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){var p=function(t){try{return JSON.parse(t)}catch(e){return!1}}(t.substr(n));if(!(!1!==p&&(s.type===e.ERROR||i(p))))return f("invalid payload");s.data=p}return r("decoded %s as %j",t,s),s}(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(!a(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=o.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null},h.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},555:function(t,e,n){var r=n(610);t.exports=function(t){var e=t.xdomain,n=t.xscheme,s=t.enablesXDR;try{if("undefined"!==typeof XMLHttpRequest&&(!e||r))return new XMLHttpRequest}catch(o){}try{if("undefined"!==typeof XDomainRequest&&!n&&s)return new XDomainRequest}catch(o){}if(!e)try{return new(self[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(o){}}},556:function(t,e,n){var r=n(533),s=n(557);function o(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.isReactNative=t.isReactNative,this.extraHeaders=t.extraHeaders,this.localAddress=t.localAddress}t.exports=o,s(o.prototype),o.prototype.onError=function(t,e){var n=new Error(t);return n.type="TransportError",n.description=e,this.emit("error",n),this},o.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},o.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},o.prototype.send=function(t){if("open"!==this.readyState)throw new Error("Transport not open");this.write(t)},o.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},o.prototype.onData=function(t){var e=r.decodePacket(t,this.socket.binaryType);this.onPacket(e)},o.prototype.onPacket=function(t){this.emit("packet",t)},o.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},557: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 s=0;s<r.length;s++)if((n=r[s])===e||n.fn===e){r.splice(s,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,s=(n=n.slice(0)).length;r<s;++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}},566: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,s=t.indexOf("["),o=t.indexOf("]");-1!=s&&-1!=o&&(t=t.substring(0,s)+t.substring(s,o).replace(/:/g,";")+t.substring(o,t.length));for(var i=n.exec(t||""),a={},c=14;c--;)a[r[c]]=i[c]||"";return-1!=s&&-1!=o&&(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}},567:function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},568:function(t,e,n){(function(e){t.exports=function(t){return n&&e.isBuffer(t)||r&&(t instanceof ArrayBuffer||function(t){return"function"===typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer}(t))};var n="function"===typeof e&&"function"===typeof e.isBuffer,r="function"===typeof ArrayBuffer}).call(this,n(283).Buffer)},569:function(t,e,n){var r=n(608),s=n(575),o=n(576),i=n(554),a=n(577),c=n(578),u=n(537)("socket.io-client:manager"),p=n(574),l=n(625),h=Object.prototype.hasOwnProperty;function f(t,e){if(!(this instanceof f))return new f(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||i;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==e.autoConnect,this.autoConnect&&this.open()}t.exports=f,f.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)},f.prototype.updateSocketIds=function(){for(var t in this.nsps)h.call(this.nsps,t)&&(this.nsps[t].id=this.generateId(t))},f.prototype.generateId=function(t){return("/"===t?"":t+"#")+this.engine.id},o(f.prototype),f.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},f.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},f.prototype.reconnectionDelay=function(t){return arguments.length?(this._reconnectionDelay=t,this.backoff&&this.backoff.setMin(t),this):this._reconnectionDelay},f.prototype.randomizationFactor=function(t){return arguments.length?(this._randomizationFactor=t,this.backoff&&this.backoff.setJitter(t),this):this._randomizationFactor},f.prototype.reconnectionDelayMax=function(t){return arguments.length?(this._reconnectionDelayMax=t,this.backoff&&this.backoff.setMax(t),this):this._reconnectionDelayMax},f.prototype.timeout=function(t){return arguments.length?(this._timeout=t,this):this._timeout},f.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},f.prototype.open=f.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,s=this;this.readyState="opening",this.skipReconnect=!1;var o=a(n,"open",(function(){s.onopen(),t&&t()})),i=a(n,"error",(function(e){if(u("connect_error"),s.cleanup(),s.readyState="closed",s.emitAll("connect_error",e),t){var n=new Error("Connection error");n.data=e,t(n)}else s.maybeReconnectOnOpen()}));if(!1!==this._timeout){var c=this._timeout;u("connect attempt will timeout after %d",c);var p=setTimeout((function(){u("connect attempt timed out after %d",c),o.destroy(),n.close(),n.emit("error","timeout"),s.emitAll("connect_timeout",c)}),c);this.subs.push({destroy:function(){clearTimeout(p)}})}return this.subs.push(o),this.subs.push(i),this},f.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")))},f.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},f.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},f.prototype.ondata=function(t){this.decoder.add(t)},f.prototype.ondecoded=function(t){this.emit("packet",t)},f.prototype.onerror=function(t){u("error",t),this.emitAll("error",t)},f.prototype.socket=function(t,e){var n=this.nsps[t];if(!n){n=new s(this,t,e),this.nsps[t]=n;var r=this;n.on("connecting",o),n.on("connect",(function(){n.id=r.generateId(t)})),this.autoConnect&&o()}function o(){~p(r.connecting,n)||r.connecting.push(n)}return n},f.prototype.destroy=function(t){var e=p(this.connecting,t);~e&&this.connecting.splice(e,1),this.connecting.length||this.close()},f.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()})))},f.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},f.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()},f.prototype.close=f.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()},f.prototype.onclose=function(t){u("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()},f.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)}})}},f.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},570:function(t,e,n){var r=n(555),s=n(611),o=n(621),i=n(622);e.polling=function(t){var e=!1,n=!1,i=!1!==t.jsonp;if("undefined"!==typeof location){var a="https:"===location.protocol,c=location.port;c||(c=a?443:80),e=t.hostname!==location.hostname||c!==t.port,n=t.secure!==a}if(t.xdomain=e,t.xscheme=n,"open"in new r(t)&&!t.forceJSONP)return new s(t);if(!i)throw new Error("JSONP disabled");return new o(t)},e.websocket=i},571:function(t,e,n){var r=n(556),s=n(538),o=n(533),i=n(539),a=n(573),c=n(540)("engine.io-client:polling");t.exports=p;var u=null!=new(n(555))({xdomain:!1}).responseType;function p(t){var e=t&&t.forceBase64;u&&!e||(this.supportsBinary=!1),r.call(this,t)}i(p,r),p.prototype.name="polling",p.prototype.doOpen=function(){this.poll()},p.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()},p.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},p.prototype.onData=function(t){var e=this;c("polling got data %s",t);o.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))},p.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))},p.prototype.write=function(t){var e=this;this.writable=!1;var n=function(){e.writable=!0,e.emit("drain")};o.encodePayload(t,this.supportsBinary,(function(t){e.doWrite(t,n)}))},p.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=s.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}},572:function(t,e,n){(function(e){var r=n(613),s=Object.prototype.toString,o="function"===typeof Blob||"undefined"!==typeof Blob&&"[object BlobConstructor]"===s.call(Blob),i="function"===typeof File||"undefined"!==typeof File&&"[object FileConstructor]"===s.call(File);t.exports=function t(n){if(!n||"object"!==typeof n)return!1;if(r(n)){for(var s=0,a=n.length;s<a;s++)if(t(n[s]))return!0;return!1}if("function"===typeof e&&e.isBuffer&&e.isBuffer(n)||"function"===typeof ArrayBuffer&&n instanceof ArrayBuffer||o&&n instanceof Blob||i&&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(283).Buffer)},573:function(t,e,n){"use strict";var r,s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),o={},i=0,a=0;function c(t){var e="";do{e=s[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}function u(){var t=c(+new Date);return t!==r?(i=0,r=t):t+"."+c(i++)}for(;a<64;a++)o[s[a]]=a;u.encode=c,u.decode=function(t){var e=0;for(a=0;a<t.length;a++)e=64*e+o[t.charAt(a)];return e},t.exports=u},574: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}},575:function(t,e,n){var r=n(554),s=n(576),o=n(624),i=n(577),a=n(578),c=n(537)("socket.io-client:socket"),u=n(538),p=n(572);t.exports=f;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},h=s.prototype.emit;function f(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,this.flags={},n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}s(f.prototype),f.prototype.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[i(t,"open",a(this,"onopen")),i(t,"packet",a(this,"onpacket")),i(t,"close",a(this,"onclose"))]}},f.prototype.open=f.prototype.connect=function(){return this.connected||(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting")),this},f.prototype.send=function(){var t=o(arguments);return t.unshift("message"),this.emit.apply(this,t),this},f.prototype.emit=function(t){if(l.hasOwnProperty(t))return h.apply(this,arguments),this;var e=o(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:p(e))?r.BINARY_EVENT: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),this.flags={},this},f.prototype.packet=function(t){t.nsp=this.nsp,this.io.packet(t)},f.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})},f.prototype.onclose=function(t){c("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",t)},f.prototype.onpacket=function(t){var e=t.nsp===this.nsp,n=t.type===r.ERROR&&"/"===t.nsp;if(e||n)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)}},f.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?h.apply(this,e):this.receiveBuffer.push(e)},f.prototype.ack=function(t){var e=this,n=!1;return function(){if(!n){n=!0;var s=o(arguments);c("sending ack %j",s),e.packet({type:p(s)?r.BINARY_ACK:r.ACK,id:t,data:s})}}},f.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)},f.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},f.prototype.emitBuffered=function(){var t;for(t=0;t<this.receiveBuffer.length;t++)h.apply(this,this.receiveBuffer[t]);for(this.receiveBuffer=[],t=0;t<this.sendBuffer.length;t++)this.packet(this.sendBuffer[t]);this.sendBuffer=[]},f.prototype.ondisconnect=function(){c("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},f.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)},f.prototype.close=f.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},f.prototype.compress=function(t){return this.flags.compress=t,this},f.prototype.binary=function(t){return this.flags.binary=t,this}},576: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 s=0;s<r.length;s++)if((n=r[s])===e||n.fn===e){r.splice(s,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,s=(n=n.slice(0)).length;r<s;++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}},577:function(t,e){t.exports=function(t,e,n){return t.on(e,n),{destroy:function(){t.removeListener(e,n)}}}},578: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)))}}},598:function(t,e,n){function r(){return r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},r.apply(this,arguments)}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}var o,i=function(){o||(o=n(600));return o},a=n(553),c=n(281),u=n(599),p=n(536),l=n(546);var h="ASSEMBLY_EXECUTING",f="ASSEMBLY_COMPLETED",d=["ASSEMBLY_UPLOADING",h,f];function y(t,e){return d.indexOf(t)>=d.indexOf(e)}var m=function(t){var e,n;function o(e){var n;return(n=t.call(this)||this).status=e,n.socket=null,n.pollInterval=null,n.closed=!1,n}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,s(e,n);var a=o.prototype;return a.connect=function(){this._connectSocket(),this._beginPolling()},a._onFinished=function(){this.emit("finished"),this.close()},a._connectSocket=function(){var t=this,e=u(this.status.websocket_url),n=i().connect(e.origin,{transports:["websocket"],path:e.pathname});n.on("connect",(function(){n.emit("assembly_connect",{id:t.status.assembly_id}),t.emit("connect")})),n.on("connect_failed",(function(){t._onError(new p("Transloadit Socket.io connection error")),t.socket=null})),n.on("error",(function(){n.disconnect(),t.socket=null})),n.on("assembly_finished",(function(){t._onFinished()})),n.on("assembly_upload_finished",(function(e){t.emit("upload",e),t.status.uploads.push(e)})),n.on("assembly_uploading_finished",(function(){t.emit("executing")})),n.on("assembly_upload_meta_data_extracted",(function(){t.emit("metadata"),t._fetchStatus({diff:!1})})),n.on("assembly_result_finished",(function(e,n){t.emit("result",e,n),t.status.results[e]||(t.status.results[e]=[]),t.status.results[e].push(n)})),n.on("assembly_error",(function(e){t._onError(e),t._fetchStatus({diff:!1})})),this.socket=n},a._onError=function(t){this.emit("error",r(new Error(t.message),t))},a._beginPolling=function(){var t=this;this.pollInterval=setInterval((function(){t.socket&&t.socket.connected||t._fetchStatus()}),2e3)},a._fetchStatus=function(t){var e=this,n=(void 0===t?{}:t).diff,r=void 0===n||n;return l(this.status.assembly_ssl_url).then((function(t){return t.json()})).then((function(t){e.closed||(e.emit("status",t),r?e.updateStatus(t):e.status=t)})).catch((function(t){return e._onError(t)}))},a.update=function(){return this._fetchStatus({diff:!0})},a.updateStatus=function(t){this._diffStatus(this.status,t),this.status=t},a._diffStatus=function(t,e){var n=this,r=t.ok,s=e.ok;if(e.error&&!t.error)return this._onError(e);var o=y(s,h)&&!y(r,h);o&&this.emit("executing"),Object.keys(e.uploads).filter((function(e){return!c(t.uploads,e)})).map((function(t){return e.uploads[t]})).forEach((function(t){n.emit("upload",t)})),o&&this.emit("metadata"),Object.keys(e.results).forEach((function(r){var s=e.results[r],o=t.results[r];s.filter((function(t){return!o||!o.some((function(e){return e.id===t.id}))})).forEach((function(t){n.emit("result",r,t)}))})),y(s,f)&&!y(r,f)&&this.emit("finished")},a.close=function(){this.closed=!0,this.socket&&(this.socket.disconnect(),this.socket=null),clearInterval(this.pollInterval)},o}(a);t.exports=m},599:function(t,e){t.exports=function(t){var e=/^\w+:\/\//.exec(t),n=0;e&&(n=e[0].length+1);var r=t.indexOf("/",n);return-1===r?{origin:t,pathname:"/"}:{origin:t.slice(0,r),pathname:t.slice(r)}}},600:function(t,e,n){var r=n(601),s=n(554),o=n(569),i=n(537)("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,s=r(t),c=s.source,u=s.id,p=s.path,l=a[u]&&p in a[u].nsps;return e.forceNew||e["force new connection"]||!1===e.multiplex||l?(i("ignoring socket cache for %s",c),n=o(c,e)):(a[u]||(i("new io instance for %s",c),a[u]=o(c,e)),n=a[u]),s.query&&!e.query&&(e.query=s.query),n.socket(s.path,e)}e.protocol=s.protocol,e.connect=c,e.Manager=n(569),e.Socket=n(575)},601:function(t,e,n){var r=n(566),s=n(537)("socket.io-client:url");t.exports=function(t,e){var n=t;e=e||"undefined"!==typeof location&&location,null==t&&(t=e.protocol+"//"+e.host);"string"===typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?e.protocol+t:e.host+t),/^(https?|wss?):\/\//.test(t)||(s("protocol-less url %s",t),t="undefined"!==typeof e?e.protocol+"//"+t:"https://"+t),s("parse %s",t),n=r(t));n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443"));n.path=n.path||"/";var o=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+o+":"+n.port,n.href=n.protocol+"://"+o+(e&&e.port===n.port?"":":"+n.port),n}},602:function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,s=+new Date,o=s-(n||s);t.diff=o,t.prev=n,t.curr=s,n=s;for(var i=new Array(arguments.length),a=0;a<i.length;a++)i[a]=arguments[a];i[0]=e.coerce(i[0]),"string"!==typeof i[0]&&i.unshift("%O");var c=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;c++;var s=e.formatters[r];if("function"===typeof s){var o=i[c];n=s.call(t,o),i.splice(c,1),c--}return n})),e.formatArgs.call(t,i);var u=r.log||e.log||console.log.bind(console);u.apply(t,i)}}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=s,"function"===typeof e.init&&e.init(r),e.instances.push(r),r}function s(){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,]+/),s=r.length;for(n=0;n<s;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 o=e.instances[n];o.enabled=e.enabled(o.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(603),e.instances=[],e.names=[],e.skips=[],e.formatters={}},603:function(t,e){var n=1e3,r=60*n,s=60*r,o=24*s,i=365.25*o;function a(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 c,u=typeof t;if("string"===u&&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 a=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*i;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*s;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?a(c=t,o,"day")||a(c,s,"hour")||a(c,r,"minute")||a(c,n,"second")||c+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=s)return Math.round(t/s)+"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))}},604:function(t,e,n){(function(r){function s(){var t;try{t=e.storage.debug}catch(n){}return!t&&"undefined"!==typeof r&&"env"in r&&(t=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}).DEBUG),t}(e=t.exports=n(605)).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 s=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(s++,"%c"===t&&(o=s))})),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(n){}},e.load=s,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&&"undefined"!=typeof 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(e){return"[UnexpectedJSONParseError]: "+e.message}},e.enable(s())}).call(this,n(195))},605:function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,s=+new Date,o=s-(n||s);t.diff=o,t.prev=n,t.curr=s,n=s;for(var i=new Array(arguments.length),a=0;a<i.length;a++)i[a]=arguments[a];i[0]=e.coerce(i[0]),"string"!==typeof i[0]&&i.unshift("%O");var c=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;c++;var s=e.formatters[r];if("function"===typeof s){var o=i[c];n=s.call(t,o),i.splice(c,1),c--}return n})),e.formatArgs.call(t,i);var u=r.log||e.log||console.log.bind(console);u.apply(t,i)}}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=s,"function"===typeof e.init&&e.init(r),e.instances.push(r),r}function s(){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,]+/),s=r.length;for(n=0;n<s;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 o=e.instances[n];o.enabled=e.enabled(o.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(606),e.instances=[],e.names=[],e.skips=[],e.formatters={}},606:function(t,e){var n=1e3,r=60*n,s=60*r,o=24*s,i=365.25*o;function a(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 c,u=typeof t;if("string"===u&&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 a=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*i;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*s;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?a(c=t,o,"day")||a(c,s,"hour")||a(c,r,"minute")||a(c,n,"second")||c+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=s)return Math.round(t/s)+"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))}},607:function(t,e,n){var r=n(567),s=n(568),o=Object.prototype.toString,i="function"===typeof Blob||"undefined"!==typeof Blob&&"[object BlobConstructor]"===o.call(Blob),a="function"===typeof File||"undefined"!==typeof File&&"[object FileConstructor]"===o.call(File);function c(t,e){if(!t)return t;if(s(t)){var n={_placeholder:!0,num:e.length};return e.push(t),n}if(r(t)){for(var o=new Array(t.length),i=0;i<t.length;i++)o[i]=c(t[i],e);return o}if("object"===typeof t&&!(t instanceof Date)){o={};for(var a in t)o[a]=c(t[a],e);return o}return t}function u(t,e){if(!t)return t;if(t&&t._placeholder)return e[t.num];if(r(t))for(var n=0;n<t.length;n++)t[n]=u(t[n],e);else if("object"===typeof t)for(var s in t)t[s]=u(t[s],e);return t}e.deconstructPacket=function(t){var e=[],n=t.data,r=t;return r.data=c(n,e),r.attachments=e.length,{packet:r,buffers:e}},e.reconstructPacket=function(t,e){return t.data=u(t.data,e),t.attachments=void 0,t},e.removeBlobs=function(t,e){var n=0,o=t;!function t(c,u,p){if(!c)return c;if(i&&c instanceof Blob||a&&c instanceof File){n++;var l=new FileReader;l.onload=function(){p?p[u]=this.result:o=this.result,--n||e(o)},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&&!s(c))for(var f in c)t(c[f],f,c)}(o),n||e(o)}},608:function(t,e,n){t.exports=n(609),t.exports.parser=n(533)},609:function(t,e,n){var r=n(570),s=n(557),o=n(540)("engine.io-client:socket"),i=n(574),a=n(533),c=n(566),u=n(538);function p(t,e){if(!(this instanceof p))return new p(t,e);e=e||{},t&&"object"===typeof t&&(e=t,t=null),t?(t=c(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=c(e.host).host),this.secure=null!=e.secure?e.secure:"undefined"!==typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.agent=e.agent||!1,this.hostname=e.hostname||("undefined"!==typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!==typeof location&&location.port?location.port:this.secure?443:80),this.query=e.query||{},"string"===typeof this.query&&(this.query=u.decode(this.query)),this.upgrade=!1!==e.upgrade,this.path=(e.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!e.forceJSONP,this.jsonp=!1!==e.jsonp,this.forceBase64=!!e.forceBase64,this.enablesXDR=!!e.enablesXDR,this.timestampParam=e.timestampParam||"t",this.timestampRequests=e.timestampRequests,this.transports=e.transports||["polling","websocket"],this.transportOptions=e.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=e.policyPort||843,this.rememberUpgrade=e.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=e.onlyBinaryUpgrades,this.perMessageDeflate=!1!==e.perMessageDeflate&&(e.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=e.pfx||null,this.key=e.key||null,this.passphrase=e.passphrase||null,this.cert=e.cert||null,this.ca=e.ca||null,this.ciphers=e.ciphers||null,this.rejectUnauthorized=void 0===e.rejectUnauthorized||e.rejectUnauthorized,this.forceNode=!!e.forceNode,this.isReactNative="undefined"!==typeof navigator&&"string"===typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"===typeof self||this.isReactNative)&&(e.extraHeaders&&Object.keys(e.extraHeaders).length>0&&(this.extraHeaders=e.extraHeaders),e.localAddress&&(this.localAddress=e.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}t.exports=p,p.priorWebsocketSuccess=!1,s(p.prototype),p.protocol=a.protocol,p.Socket=p,p.Transport=n(556),p.transports=n(570),p.parser=n(533),p.prototype.createTransport=function(t){o('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,isReactNative:this.isReactNative})},p.prototype.open=function(){var t;if(this.rememberUpgrade&&p.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(n){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)},p.prototype.setTransport=function(t){o("setting transport %s",t.name);var e=this;this.transport&&(o("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")}))},p.prototype.probe=function(t){o('probing transport "%s"',t);var e=this.createTransport(t,{probe:1}),n=!1,r=this;function s(){if(r.onlyBinaryUpgrades){var s=!this.supportsBinary&&r.transport.supportsBinary;n=n||s}n||(o('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",(function(s){if(!n)if("pong"===s.type&&"probe"===s.data){if(o('probe transport "%s" pong',t),r.upgrading=!0,r.emit("upgrading",e),!e)return;p.priorWebsocketSuccess="websocket"===e.name,o('pausing current transport "%s"',r.transport.name),r.transport.pause((function(){n||"closed"!==r.readyState&&(o("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{o('probe transport "%s" failed',t);var i=new Error("probe error");i.transport=e.name,r.emit("upgradeError",i)}})))}function i(){n||(n=!0,h(),e.close(),e=null)}function a(n){var s=new Error("probe error: "+n);s.transport=e.name,i(),o('probe transport "%s" failed because of error: %s',t,n),r.emit("upgradeError",s)}function c(){a("transport closed")}function u(){a("socket closed")}function l(t){e&&t.name!==e.name&&(o('"%s" works - aborting "%s"',t.name,e.name),i())}function h(){e.removeListener("open",s),e.removeListener("error",a),e.removeListener("close",c),r.removeListener("close",u),r.removeListener("upgrading",l)}p.priorWebsocketSuccess=!1,e.once("open",s),e.once("error",a),e.once("close",c),this.once("close",u),this.once("upgrading",l),e.open()},p.prototype.onOpen=function(){if(o("socket open"),this.readyState="open",p.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){o("starting upgrade probes");for(var t=0,e=this.upgrades.length;t<e;t++)this.probe(this.upgrades[t])}},p.prototype.onPacket=function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(o('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 o('packet received with socket readyState "%s"',this.readyState)},p.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))},p.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)},p.prototype.setPing=function(){var t=this;clearTimeout(t.pingIntervalTimer),t.pingIntervalTimer=setTimeout((function(){o("writing ping packet - expecting pong within %sms",t.pingTimeout),t.ping(),t.onHeartbeat(t.pingTimeout)}),t.pingInterval)},p.prototype.ping=function(){var t=this;this.sendPacket("ping",(function(){t.emit("ping")}))},p.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},p.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(o("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},p.prototype.write=p.prototype.send=function(t,e,n){return this.sendPacket("message",t,e,n),this},p.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 s={type:t,data:e,options:n};this.emit("packetCreate",s),this.writeBuffer.push(s),r&&this.once("flush",r),this.flush()}},p.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"),o("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},p.prototype.onError=function(t){o("socket error %j",t),p.priorWebsocketSuccess=!1,this.emit("error",t),this.onClose("transport error",t)},p.prototype.onClose=function(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){o('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}},p.prototype.filterUpgrades=function(t){for(var e=[],n=0,r=t.length;n<r;n++)~i(this.transports,t[n])&&e.push(t[n]);return e}},610:function(t,e){try{t.exports="undefined"!==typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(n){t.exports=!1}},611:function(t,e,n){var r=n(555),s=n(571),o=n(557),i=n(539),a=n(540)("engine.io-client:polling-xhr");function c(){}function u(t){if(s.call(this,t),this.requestTimeout=t.requestTimeout,this.extraHeaders=t.extraHeaders,"undefined"!==typeof location){var e="https:"===location.protocol,n=location.port;n||(n=e?443:80),this.xd="undefined"!==typeof location&&t.hostname!==location.hostname||n!==t.port,this.xs=t.secure!==e}}function p(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()}if(t.exports=u,t.exports.Request=p,i(u,s),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 p(t)},u.prototype.doWrite=function(t,e){var n="string"!==typeof t&&void 0!==t,r=this.request({method:"POST",data:t,isBinary:n}),s=this;r.on("success",e),r.on("error",(function(t){s.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},o(p.prototype),p.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 e=this.xhr=new r(t),n=this;try{a("xhr open %s: %s",this.method,this.uri),e.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var s in e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(s)&&e.setRequestHeader(s,this.extraHeaders[s])}catch(o){}if("POST"===this.method)try{this.isBinary?e.setRequestHeader("Content-type","application/octet-stream"):e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{e.setRequestHeader("Accept","*/*")}catch(o){}"withCredentials"in e&&(e.withCredentials=!0),this.requestTimeout&&(e.timeout=this.requestTimeout),this.hasXDR()?(e.onload=function(){n.onLoad()},e.onerror=function(){n.onError(e.responseText)}):e.onreadystatechange=function(){if(2===e.readyState)try{var t=e.getResponseHeader("Content-Type");n.supportsBinary&&"application/octet-stream"===t&&(e.responseType="arraybuffer")}catch(o){}4===e.readyState&&(200===e.status||1223===e.status?n.onLoad():setTimeout((function(){n.onError(e.status)}),0))},a("xhr data %s",this.data),e.send(this.data)}catch(o){return void setTimeout((function(){n.onError(o)}),0)}"undefined"!==typeof document&&(this.index=p.requestsCount++,p.requests[this.index]=this)},p.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},p.prototype.onData=function(t){this.emit("data",t),this.onSuccess()},p.prototype.onError=function(t){this.emit("error",t),this.cleanup(!0)},p.prototype.cleanup=function(t){if("undefined"!==typeof 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(e){}"undefined"!==typeof document&&delete p.requests[this.index],this.xhr=null}},p.prototype.onLoad=function(){var t;try{var e;try{e=this.xhr.getResponseHeader("Content-Type")}catch(n){}t="application/octet-stream"===e&&this.xhr.response||this.xhr.responseText}catch(n){this.onError(n)}null!=t&&this.onData(t)},p.prototype.hasXDR=function(){return"undefined"!==typeof XDomainRequest&&!this.xs&&this.enablesXDR},p.prototype.abort=function(){this.cleanup()},p.requestsCount=0,p.requests={},"undefined"!==typeof document)if("function"===typeof attachEvent)attachEvent("onunload",h);else if("function"===typeof addEventListener){var l="onpagehide"in self?"pagehide":"unload";addEventListener(l,h,!1)}function h(){for(var t in p.requests)p.requests.hasOwnProperty(t)&&p.requests[t].abort()}},612: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}},613:function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},614: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 s=new Uint8Array(t),o=new Uint8Array(n-e),i=e,a=0;i<n;i++,a++)o[a]=s[i];return o.buffer}},615:function(t,e){function n(){}t.exports=function(t,e,r){var s=!1;return r=r||n,o.count=t,0===t?e():o;function o(t,n){if(o.count<=0)throw new Error("after called too many times");--o.count,t?(s=!0,e(t),e=r):0!==o.count||s||e(null,n)}}},616:function(t,e){var n,r,s,o=String.fromCharCode;function i(t){for(var e,n,r=[],s=0,o=t.length;s<o;)(e=t.charCodeAt(s++))>=55296&&e<=56319&&s<o?56320==(64512&(n=t.charCodeAt(s++)))?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),s--):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 o(t>>e&63|128)}function u(t,e){if(0==(4294967168&t))return o(t);var n="";return 0==(4294965248&t)?n=o(t>>6&31|192):0==(4294901760&t)?(a(t,e)||(t=65533),n=o(t>>12&15|224),n+=c(t,6)):0==(4292870144&t)&&(n=o(t>>18&7|240),n+=c(t,12),n+=c(t,6)),n+=o(63&t|128)}function p(){if(s>=r)throw Error("Invalid byte index");var t=255&n[s];if(s++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function l(t){var e,o;if(s>r)throw Error("Invalid byte index");if(s==r)return!1;if(e=255&n[s],s++,0==(128&e))return e;if(192==(224&e)){if((o=(31&e)<<6|p())>=128)return o;throw Error("Invalid continuation byte")}if(224==(240&e)){if((o=(15&e)<<12|p()<<6|p())>=2048)return a(o,t)?o:65533;throw Error("Invalid continuation byte")}if(240==(248&e)&&(o=(7&e)<<18|p()<<12|p()<<6|p())>=65536&&o<=1114111)return o;throw Error("Invalid UTF-8 detected")}t.exports={version:"2.1.2",encode:function(t,e){for(var n=!1!==(e=e||{}).strict,r=i(t),s=r.length,o=-1,a="";++o<s;)a+=u(r[o],n);return a},decode:function(t,e){var a=!1!==(e=e||{}).strict;n=i(t),r=n.length,s=0;for(var c,u=[];!1!==(c=l(a));)u.push(c);return function(t){for(var e,n=t.length,r=-1,s="";++r<n;)(e=t[r])>65535&&(s+=o((e-=65536)>>>10&1023|55296),e=56320|1023&e),s+=o(e);return s}(u)}}},617: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),s=r.length,o="";for(n=0;n<s;n+=3)o+=t[r[n]>>2],o+=t[(3&r[n])<<4|r[n+1]>>4],o+=t[(15&r[n+1])<<2|r[n+2]>>6],o+=t[63&r[n+2]];return s%3===2?o=o.substring(0,o.length-1)+"=":s%3===1&&(o=o.substring(0,o.length-2)+"=="),o},e.decode=function(t){var e,r,s,o,i,a=.75*t.length,c=t.length,u=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var p=new ArrayBuffer(a),l=new Uint8Array(p);for(e=0;e<c;e+=4)r=n[t.charCodeAt(e)],s=n[t.charCodeAt(e+1)],o=n[t.charCodeAt(e+2)],i=n[t.charCodeAt(e+3)],l[u++]=r<<2|s>>4,l[u++]=(15&s)<<4|o>>2,l[u++]=(3&o)<<6|63&i;return p}}()},618:function(t,e){var n="undefined"!==typeof 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}}(),s=r&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(t){return!1}}(),o=n&&n.prototype.append&&n.prototype.getBlob;function i(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 i(t).forEach((function(t){r.append(t)})),e.type?r.getBlob(e.type):r.getBlob()}function c(t,e){return new Blob(i(t),e||{})}"undefined"!==typeof Blob&&(a.prototype=Blob.prototype,c.prototype=Blob.prototype),t.exports=r?s?Blob:c:o?a:void 0},619:function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,s=+new Date,o=s-(n||s);t.diff=o,t.prev=n,t.curr=s,n=s;for(var i=new Array(arguments.length),a=0;a<i.length;a++)i[a]=arguments[a];i[0]=e.coerce(i[0]),"string"!==typeof i[0]&&i.unshift("%O");var c=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;c++;var s=e.formatters[r];if("function"===typeof s){var o=i[c];n=s.call(t,o),i.splice(c,1),c--}return n})),e.formatArgs.call(t,i);var u=r.log||e.log||console.log.bind(console);u.apply(t,i)}}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=s,"function"===typeof e.init&&e.init(r),e.instances.push(r),r}function s(){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,]+/),s=r.length;for(n=0;n<s;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 o=e.instances[n];o.enabled=e.enabled(o.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(620),e.instances=[],e.names=[],e.skips=[],e.formatters={}},620:function(t,e){var n=1e3,r=60*n,s=60*r,o=24*s,i=365.25*o;function a(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 c,u=typeof t;if("string"===u&&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 a=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*i;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*s;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?a(c=t,o,"day")||a(c,s,"hour")||a(c,r,"minute")||a(c,n,"second")||c+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=s)return Math.round(t/s)+"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))}},621:function(t,e,n){(function(e){var r=n(571),s=n(539);t.exports=p;var o,i=/\n/g,a=/\\n/g;function c(){}function u(){return"undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof e?e:{}}function p(t){if(r.call(this,t),this.query=this.query||{},!o){var e=u();o=e.___eio=e.___eio||[]}this.index=o.length;var n=this;o.push((function(t){n.onData(t)})),this.query.j=this.index,"function"===typeof addEventListener&&addEventListener("beforeunload",(function(){n.script&&(n.script.onerror=c)}),!1)}s(p,r),p.prototype.supportsBinary=!1,p.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)},p.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)},p.prototype.doWrite=function(t,e){var n=this;if(!this.form){var r,s=document.createElement("form"),o=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index;s.className="socketio",s.style.position="absolute",s.style.top="-1000px",s.style.left="-1000px",s.target=c,s.method="POST",s.setAttribute("accept-charset","utf-8"),o.name="d",s.appendChild(o),document.body.appendChild(s),this.form=s,this.area=o}function u(){p(),e()}function p(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(e){n.onError("jsonp polling iframe removal error",e)}try{var t='<iframe src="javascript:0" name="'+n.iframeId+'">';r=document.createElement(t)}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(),p(),t=t.replace(a,"\\\n"),this.area.value=t.replace(i,"\\n");try{this.form.submit()}catch(l){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&u()}:this.iframe.onload=u}}).call(this,n(59))},622:function(t,e,n){(function(e){var r,s,o=n(556),i=n(533),a=n(538),c=n(539),u=n(573),p=n(540)("engine.io-client:websocket");if("undefined"!==typeof WebSocket)r=WebSocket;else if("undefined"!==typeof self)r=self.WebSocket||self.MozWebSocket;else try{s=n(623)}catch(f){}var l=r||s;function h(t){t&&t.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=t.perMessageDeflate,this.usingBrowserWebSocket=r&&!t.forceNode,this.protocols=t.protocols,this.usingBrowserWebSocket||(l=s),o.call(this,t)}t.exports=h,c(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&&!this.isReactNative?e?new l(t,e):new l(t):new l(t,e,n)}catch(r){return this.emit("error",r)}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,s=0,o=r;s<o;s++)!function(t){i.encodePacket(t,n.supportsBinary,(function(s){if(!n.usingBrowserWebSocket){var o={};if(t.options&&(o.compress=t.options.compress),n.perMessageDeflate)("string"===typeof s?e.byteLength(s):s.length)<n.perMessageDeflate.threshold&&(o.compress=!1)}try{n.usingBrowserWebSocket?n.ws.send(s):n.ws.send(s,o)}catch(f){p("websocket closed before onclose event")}--r||a()}))}(t[s]);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(){"undefined"!==typeof 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]=u()),this.supportsBinary||(t.b64=1),(t=a.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(283).Buffer)},624: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}},625: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}},626:function(t,e,n){var r=n(546),s=n(544);t.exports=function(){function t(t){void 0===t&&(t={}),this.opts=t,this._reportError=this._reportError.bind(this),this._headers={"Transloadit-Client":this.opts.client}}var e=t.prototype;return e.createAssembly=function(t){var e=this,n=t.params,o=t.fields,i=t.signature,a=t.expectedFiles,c=new FormData;c.append("params","string"===typeof n?n:JSON.stringify(n)),i&&c.append("signature",i),Object.keys(o).forEach((function(t){c.append(t,o[t])})),c.append("num_expected_upload_files",a);var u=new s("/assemblies",""+this.opts.service).href;return r(u,{method:"post",headers:this._headers,body:c}).then((function(t){return t.json()})).then((function(t){if(t.error){var e=new Error(t.error);throw e.details=t.message,e.assembly=t,t.assembly_id&&(e.details+=" Assembly ID: "+t.assembly_id),e}return t})).catch((function(t){return e._reportError(t,{url:u,type:"API_ERROR"})}))},e.reserveFile=function(t,e){var n=this,s=encodeURIComponent(e.size),o=t.assembly_ssl_url+"/reserve_file?size="+s;return r(o,{method:"post",headers:this._headers}).then((function(t){return t.json()})).catch((function(r){return n._reportError(r,{assembly:t,file:e,url:o,type:"API_ERROR"})}))},e.addFile=function(t,e){var n=this;if(!e.uploadURL)return Promise.reject(new Error("File does not have an `uploadURL`."));var s=encodeURIComponent(e.size),o=encodeURIComponent(e.uploadURL),i="size="+s+"&filename="+encodeURIComponent(e.name)+"&fieldname=file&s3Url="+o,a=t.assembly_ssl_url+"/add_file?"+i;return r(a,{method:"post",headers:this._headers}).then((function(t){return t.json()})).catch((function(r){return n._reportError(r,{assembly:t,file:e,url:a,type:"API_ERROR"})}))},e.cancelAssembly=function(t){var e=this,n=t.assembly_ssl_url;return r(n,{method:"delete",headers:this._headers}).then((function(t){return t.json()})).catch((function(t){return e._reportError(t,{url:n,type:"API_ERROR"})}))},e.getAssemblyStatus=function(t){var e=this;return r(t,{headers:this._headers}).then((function(t){return t.json()})).catch((function(n){return e._reportError(n,{url:t,type:"STATUS_ERROR"})}))},e.submitError=function(t,e){var n=e.endpoint,s=e.instance,o=e.assembly,i=t.details?t.message+" ("+t.details+")":t.message;return r("https://transloaditstatus.com/client_error",{method:"post",body:JSON.stringify({endpoint:n,instance:s,assembly_id:o,agent:"undefined"!==typeof navigator?navigator.userAgent:"",client:this.opts.client,error:i})}).then((function(t){return t.json()}))},e._reportError=function(t,e){if(!1===this.opts.errorReporting)throw t;var n={type:e.type};throw e.assembly&&(n.assembly=e.assembly.assembly_id,n.instance=e.assembly.instance),e.url&&(n.endpoint=e.url),this.submitError(t,n).catch((function(t){})),t},t}()},627:function(t,e){function n(t){if(!t)throw new Error("Transloadit: The `params` option is required.");if("string"===typeof t)try{t=JSON.parse(t)}catch(e){throw e.message="Transloadit: The `params` option is a malformed JSON string: "+e.message,e}if(!t.auth||!t.auth.key)throw new Error("Transloadit: The `params.auth.key` option is required. You can find your Transloadit API key at https://transloadit.com/account/api-settings.")}var r=function(){function t(t,e){this.files=t,this.opts=e}var e=t.prototype;return e._normalizeAssemblyOptions=function(t,e){if(Array.isArray(e.fields)){var n=e.fields;e.fields={},n.forEach((function(n){e.fields[n]=t.meta[n]}))}return e.fields||(e.fields={}),e},e._getAssemblyOptions=function(t){var e=this,r=this.opts;return Promise.resolve().then((function(){return r.getAssemblyOptions(t,r)})).then((function(n){return e._normalizeAssemblyOptions(t,n)})).then((function(e){return n(e.params),{fileIDs:[t.id],options:e}}))},e._dedupe=function(t){var e=Object.create(null);return t.forEach((function(t){var n,r=t.fileIDs,s=t.options,o=JSON.stringify(s);e[o]?(n=e[o].fileIDs).push.apply(n,r):e[o]={options:s,fileIDs:[].concat(r)}})),Object.keys(e).map((function(t){return e[t]}))},e.build=function(){var t=this,e=this.opts;return this.files.length>0?Promise.all(this.files.map((function(e){return t._getAssemblyOptions(e)}))).then((function(e){return t._dedupe(e)})):e.alwaysRunAssembly?Promise.resolve(e.getAssemblyOptions(null,e)).then((function(e){return n(e.params),[{fileIDs:t.files.map((function(t){return t.id})),options:e}]})):Promise.resolve([])},t}();t.exports=r,t.exports.validateParams=n},628:function(t,e,n){function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}var o=function(t){var e,n;function o(e,n){var s;return(s=t.call(this)||this)._uppy=e,s._assemblyIDs=n,s._remaining=n.length,s.promise=new Promise((function(t,e){s._resolve=t,s._reject=e})),s._onAssemblyComplete=s._onAssemblyComplete.bind(r(s)),s._onAssemblyCancel=s._onAssemblyCancel.bind(r(s)),s._onAssemblyError=s._onAssemblyError.bind(r(s)),s._onImportError=s._onImportError.bind(r(s)),s._addListeners(),s}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,s(e,n);var i=o.prototype;return i._watching=function(t){return-1!==this._assemblyIDs.indexOf(t)},i._onAssemblyComplete=function(t){this._watching(t.assembly_id)&&(this._uppy.log("[Transloadit] AssemblyWatcher: Got Assembly finish "+t.assembly_id),this.emit("assembly-complete",t.assembly_id),this._checkAllComplete())},i._onAssemblyCancel=function(t){this._watching(t.assembly_id)&&this._checkAllComplete()},i._onAssemblyError=function(t,e){this._watching(t.assembly_id)&&(this._uppy.log("[Transloadit] AssemblyWatcher: Got Assembly error "+t.assembly_id),this._uppy.log(e),this.emit("assembly-error",t.assembly_id,e),this._checkAllComplete())},i._onImportError=function(t,e,n){this._watching(t.assembly_id)&&this._onAssemblyError(t,n)},i._checkAllComplete=function(){this._remaining-=1,0===this._remaining&&(this._removeListeners(),this._resolve())},i._removeListeners=function(){this._uppy.off("transloadit:complete",this._onAssemblyComplete),this._uppy.off("transloadit:assembly-cancel",this._onAssemblyCancel),this._uppy.off("transloadit:assembly-error",this._onAssemblyError),this._uppy.off("transloadit:import-error",this._onImportError)},i._addListeners=function(){this._uppy.on("transloadit:complete",this._onAssemblyComplete),this._uppy.on("transloadit:assembly-cancel",this._onAssemblyCancel),this._uppy.on("transloadit:assembly-error",this._onAssemblyError),this._uppy.on("transloadit:import-error",this._onImportError)},o}(n(553));t.exports=o},665:function(t,e,n){var r,s;function o(){return o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o.apply(this,arguments)}function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}var c=n(93),u=n(281),p=n(75).Plugin,l=n(587),h=n(598),f=n(626),d=n(627),y=n(628);function m(t,e){return{params:e.params,signature:e.signature,fields:e.fields}}var g="https://api2.transloadit.com/companion",b=/https?:\/\/api2(?:-\w+)?\.transloadit\.com\/companion/,v=/https?:\/\/api2(?:-\w+)?\.transloadit\.com\/uppy-server/;t.exports=(s=r=function(t){var e,n;function r(e,n){var r;(r=t.call(this,e,n)||this).type="uploader",r.id=r.opts.id||"Transloadit",r.title="Transloadit",r.defaultLocale={strings:{creatingAssembly:"Preparing upload...",creatingAssemblyFailed:"Transloadit: Could not create Assembly",encoding:"Encoding..."}};var s={service:"https://api2.transloadit.com",errorReporting:!0,waitForEncoding:!1,waitForMetadata:!1,alwaysRunAssembly:!1,importFromUploadURLs:!1,signature:null,params:null,fields:{},getAssemblyOptions:m,limit:0};r.opts=o({},s,n),r.i18nInit(),r._prepareUpload=r._prepareUpload.bind(i(r)),r._afterUpload=r._afterUpload.bind(i(r)),r._onError=r._onError.bind(i(r)),r._onTusError=r._onTusError.bind(i(r)),r._onCancelAll=r._onCancelAll.bind(i(r)),r._onFileUploadURLAvailable=r._onFileUploadURLAvailable.bind(i(r)),r._onRestored=r._onRestored.bind(i(r)),r._getPersistentData=r._getPersistentData.bind(i(r));var a=r.opts.getAssemblyOptions!==s.getAssemblyOptions;return r.opts.params?d.validateParams(r.opts.params):a||d.validateParams(null),r.client=new f({service:r.opts.service,client:r._getClientVersion(),errorReporting:r.opts.errorReporting}),r.activeAssemblies={},r.assemblyWatchers={},r.completedFiles=Object.create(null),r}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,a(e,n);var s=r.prototype;return s.setOptions=function(e){t.prototype.setOptions.call(this,e),this.i18nInit()},s.i18nInit=function(){this.translator=new c([this.defaultLocale,this.uppy.locale,this.opts.locale]),this.i18n=this.translator.translate.bind(this.translator),this.i18nArray=this.translator.translateArray.bind(this.translator),this.setPluginState()},s._getClientVersion=function(){var t=this,e=["uppy-core:"+this.uppy.constructor.VERSION,"uppy-transloadit:"+this.constructor.VERSION,"uppy-tus:"+l.VERSION],n=function(n,r){var s=t.uppy.getPlugin(n);s&&e.push(r+":"+s.constructor.VERSION)};return this.opts.importFromUploadURLs&&(n("XHRUpload","uppy-xhr-upload"),n("AwsS3","uppy-aws-s3"),n("AwsS3Multipart","uppy-aws-s3-multipart")),n("Dropbox","uppy-dropbox"),n("Box","uppy-box"),n("Facebook","uppy-facebook"),n("GoogleDrive","uppy-google-drive"),n("Instagram","uppy-instagram"),n("OneDrive","uppy-onedrive"),n("Zoom","uppy-zoom"),n("Url","uppy-url"),e.join(",")},s._attachAssemblyMetadata=function(t,e){var n=o({},t.meta,{assembly_url:e.assembly_url,filename:t.name,fieldname:"file"}),r=o({},t.tus,{endpoint:e.tus_url,addRequestId:!0}),s=t.remote;if(t.remote&&v.test(t.remote.companionUrl)){var i=new Error("The https://api2.transloadit.com/uppy-server endpoint was renamed to https://api2.transloadit.com/companion, please update your `companionUrl` options accordingly.");throw this.uppy.log(i),i}if(t.remote&&b.test(t.remote.companionUrl)){var a=e.companion_url.replace(/\/$/,""),c=t.remote.url.replace(t.remote.companionUrl,"").replace(/^\//,"");s=o({},t.remote,{companionUrl:a,url:a+"/"+c})}var u=o({},t,{transloadit:{assembly:e.assembly_id}});return this.opts.importFromUploadURLs||o(u,{meta:n,tus:r,remote:s}),u},s._createAssembly=function(t,e,n){var r=this;return this.uppy.log("[Transloadit] Create Assembly"),this.client.createAssembly({params:n.params,fields:n.fields,expectedFiles:t.length,signature:n.signature}).then((function(n){var s,i,a=new h(n),c=a.status,u=c.assembly_id,p=r.getPluginState(),l=p.assemblies,f=p.uploadsAssemblies;r.setPluginState({assemblies:o({},l,(s={},s[u]=c,s)),uploadsAssemblies:o({},f,(i={},i[e]=[].concat(f[e],[u]),i))});var d=r.uppy.getState().files,y={};return t.forEach((function(t){y[t]=r._attachAssemblyMetadata(r.uppy.getFile(t),c)})),r.uppy.setState({files:o({},d,y)}),r.uppy.emit("transloadit:assembly-created",c,t),r.uppy.log("[Transloadit] Created Assembly "+u),a})).catch((function(t){throw t.message=r.i18n("creatingAssemblyFailed")+": "+t.message,t}))},s._createAssemblyWatcher=function(t,e,n){var r=this,s=new y(this.uppy,t);s.on("assembly-complete",(function(t){r.getAssemblyFiles(t).forEach((function(t){r.completedFiles[t.id]=!0,r.uppy.emit("postprocess-complete",t)}))})),s.on("assembly-error",(function(t,e){r.getAssemblyFiles(t).forEach((function(t){r.uppy.emit("upload-error",t,e),r.uppy.emit("postprocess-complete",t)}))})),this.assemblyWatchers[n]=s},s._shouldWaitAfterUpload=function(){return this.opts.waitForEncoding||this.opts.waitForMetadata},s._reserveFiles=function(t,e){var n=this;return Promise.all(e.map((function(e){var r=n.uppy.getFile(e);return n.client.reserveFile(t.status,r)})))},s._onFileUploadURLAvailable=function(t){var e=this,n=this.uppy.getFile(t.id);if(n&&n.transloadit&&n.transloadit.assembly){var r=this.getPluginState().assemblies[n.transloadit.assembly];this.client.addFile(r,n).catch((function(t){e.uppy.log(t),e.uppy.emit("transloadit:import-error",r,n.id,t)}))}},s._findFile=function(t){for(var e=this.uppy.getFiles(),n=0;n<e.length;n++){var r=e[n];if(r.uploadURL===t.tus_upload_url)return r;if(r.tus&&r.tus.uploadUrl===t.tus_upload_url)return r;if(!t.is_tus_file&&r.name===t.name&&r.size===t.size)return r}},s._onFileUploadComplete=function(t,e){var n,r=this.getPluginState(),s=this._findFile(e);s?(this.setPluginState({files:o({},r.files,(n={},n[e.id]={assembly:t,id:s.id,uploadedFile:e},n))}),this.uppy.emit("transloadit:upload",e,this.getAssembly(t))):this.uppy.log("[Transloadit] Couldn\u2019t file the file, it was likely removed in the process")},s._onResult=function(t,e,n){var r=this.getPluginState(),s=r.files[n.original_id];n.localId=s?s.id:null;var o={result:n,stepName:e,id:n.id,assembly:t};this.setPluginState({results:[].concat(r.results,[o])}),this.uppy.emit("transloadit:result",e,n,this.getAssembly(t))},s._onAssemblyFinished=function(t){var e=this,n=t.assembly_ssl_url;this.client.getAssemblyStatus(n).then((function(t){var n,r=t.assembly_id,s=e.getPluginState();e.setPluginState({assemblies:o({},s.assemblies,(n={},n[r]=t,n))}),e.uppy.emit("transloadit:complete",t)}))},s._cancelAssembly=function(t){var e=this;return this.client.cancelAssembly(t).then((function(){e.uppy.emit("transloadit:assembly-cancelled",t)}))},s._onCancelAll=function(){var t=this,e=this.getPluginState().uploadsAssemblies,n=Object.keys(e).reduce((function(t,n){return t.push.apply(t,e[n]),t}),[]).map((function(e){var n=t.getAssembly(e);return t._cancelAssembly(n)}));Promise.all(n).catch((function(e){t.uppy.log(e)}))},s._getPersistentData=function(t){var e,n=this.getPluginState(),r=n.assemblies,s=n.uploadsAssemblies;t(((e={})[this.id]={assemblies:r,uploadsAssemblies:s},e))},s._onRestored=function(t){var e=this,n=t&&t[this.id]?t[this.id]:{},r=n.assemblies||{},s=n.uploadsAssemblies||{};if(0!==Object.keys(s).length){this.restored=Promise.resolve().then((function(){return function(t){var n={},r=[];Object.keys(t).forEach((function(s){var o=t[s];o.uploads.forEach((function(t){var r=e._findFile(t);n[t.id]={id:r.id,assembly:s,uploadedFile:t}}));var i=e.getPluginState();Object.keys(o.results).forEach((function(t){o.results[t].forEach((function(e){var n=i.files[e.original_id];e.localId=n?n.id:null,r.push({id:e.id,result:e,stepName:t,assembly:s})}))}))})),e.setPluginState({assemblies:t,files:n,results:r,uploadsAssemblies:s})}(r),function(){var t=e.getPluginState(),n=t.assemblies,r=t.uploadsAssemblies;Object.keys(r).forEach((function(t){var n=r[t],s=n.reduce((function(t,n){var r=e.getAssemblyFiles(n).map((function(t){return t.id}));return t.push.apply(t,r),t}),[]);e._createAssemblyWatcher(n,s,t)})),Object.keys(n).forEach((function(t){var r=new h(n[t]);e._connectAssembly(r)}))}(),function(){var t=e.getPluginState().assemblies;return Promise.all(Object.keys(t).map((function(t){return e.activeAssemblies[t].update()})))}()})),this.restored.then((function(){e.restored=null}))}},s._connectAssembly=function(t){var e=this,n=t.status.assembly_id;if(this.activeAssemblies[n]=t,t.on("status",(function(t){var r,s=e.getPluginState().assemblies;e.setPluginState({assemblies:o({},s,(r={},r[n]=t,r))})})),t.on("upload",(function(t){e._onFileUploadComplete(n,t)})),t.on("error",(function(n){n.assembly=t.status,e.uppy.emit("transloadit:assembly-error",t.status,n)})),t.on("executing",(function(){e.uppy.emit("transloadit:assembly-executing",t.status)})),this.opts.waitForEncoding&&t.on("result",(function(t,r){e._onResult(n,t,r)})),this.opts.waitForEncoding?t.on("finished",(function(){e._onAssemblyFinished(t.status)})):this.opts.waitForMetadata&&t.on("metadata",(function(){e._onAssemblyFinished(t.status)})),"ASSEMBLY_COMPLETE"===t.ok)return t;new Promise((function(e,n){t.once("connect",e),t.once("status",e),t.once("error",n)})).then((function(){e.uppy.log("[Transloadit] Socket is ready")}));return t.connect(),t},s._prepareUpload=function(t,e){var n,r=this;(t=t.filter((function(t){return!t.error}))).forEach((function(t){var e=r.uppy.getFile(t);r.uppy.emit("preprocess-progress",e,{mode:"indeterminate",message:r.i18n("creatingAssembly")})}));var s=function(t){var n,s=t.fileIDs,o=t.options;return r._createAssembly(s,e,o).then((function(t){if(n=t,r.opts.importFromUploadURLs)return r._reserveFiles(t,s)})).then((function(){return s.forEach((function(t){var e=r.uppy.getFile(t);r.uppy.emit("preprocess-complete",e)})),n})).catch((function(t){throw s.forEach((function(e){var n=r.uppy.getFile(e);r.uppy.emit("preprocess-complete",n),r.uppy.emit("upload-error",n,t)})),t}))},i=this.getPluginState().uploadsAssemblies;this.setPluginState({uploadsAssemblies:o({},i,(n={},n[e]=[],n))});var a=t.map((function(t){return r.uppy.getFile(t)}));return new d(a,this.opts).build().then((function(n){return Promise.all(n.map(s)).then((function(n){var s=n.map((function(t){return t.status.assembly_id}));r._createAssemblyWatcher(s,t,e),n.map((function(t){return r._connectAssembly(t)}))}))}),(function(e){throw t.forEach((function(t){var n=r.uppy.getFile(t);r.uppy.emit("preprocess-complete",n),r.uppy.emit("upload-error",n,e)})),e}))},s._afterUpload=function(t,e){var n=this,r=t.map((function(t){return n.uppy.getFile(t)}));t=r.filter((function(t){return!t.error})).map((function(t){return t.id}));var s=this.getPluginState();if(this.restored)return this.restored.then((function(){return n._afterUpload(t,e)}));var i=s.uploadsAssemblies[e],a=function(){i.forEach((function(t){n.activeAssemblies[t].close(),delete n.activeAssemblies[t]}))};if(!this._shouldWaitAfterUpload()){a();var c=i.map((function(t){return n.getAssembly(t)}));return this.uppy.addResultData(e,{transloadit:c}),Promise.resolve()}return 0===i.length?(this.uppy.addResultData(e,{transloadit:[]}),Promise.resolve()):(r.filter((function(t){return!u(n.completedFiles,t.id)})).forEach((function(t){n.uppy.emit("postprocess-progress",t,{mode:"indeterminate",message:n.i18n("encoding")})})),this.assemblyWatchers[e].promise.then((function(){a();var t=i.map((function(t){return n.getAssembly(t)})),r=o({},n.getPluginState().uploadsAssemblies);delete r[e],n.setPluginState({uploadsAssemblies:r}),n.uppy.addResultData(e,{transloadit:t})})))},s._onError=function(t,e){var n=this;void 0===t&&(t=null),this.getPluginState().uploadsAssemblies[e].forEach((function(t){n.activeAssemblies[t]&&n.activeAssemblies[t].close()}))},s._onTusError=function(t){if(t&&/^tus: /.test(t.message)){var e=t.originalRequest?t.originalRequest.getUnderlyingObject():null,n=e&&e.responseURL?e.responseURL:null;this.client.submitError(t,{url:n,type:"TUS_ERROR"}).then((function(t){}))}},s.install=function(){this.uppy.addPreProcessor(this._prepareUpload),this.uppy.addPostProcessor(this._afterUpload),this.uppy.on("error",this._onError),this.uppy.on("cancel-all",this._onCancelAll),this.uppy.on("upload-error",this._onTusError),this.opts.importFromUploadURLs?this.uppy.on("upload-success",this._onFileUploadURLAvailable):this.uppy.use(l,{storeFingerprintForResuming:!1,resume:!1,useFastRemoteRetry:!1,metaFields:["assembly_url","filename","fieldname"],limit:this.opts.limit}),this.uppy.on("restore:get-data",this._getPersistentData),this.uppy.on("restored",this._onRestored),this.setPluginState({assemblies:{},uploadsAssemblies:{},files:{},results:[]});var t=this.uppy.getState().capabilities;this.uppy.setState({capabilities:o({},t,{individualCancellation:!1})})},s.uninstall=function(){this.uppy.removePreProcessor(this._prepareUpload),this.uppy.removePostProcessor(this._afterUpload),this.uppy.off("error",this._onError),this.opts.importFromUploadURLs&&this.uppy.off("upload-success",this._onFileUploadURLAvailable);var t=this.uppy.getState().capabilities;this.uppy.setState({capabilities:o({},t,{individualCancellation:!0})})},s.getAssembly=function(t){return this.getPluginState().assemblies[t]},s.getAssemblyFiles=function(t){return this.uppy.getFiles().filter((function(e){return e&&e.transloadit&&e.transloadit.assembly===t}))},r}(p),r.VERSION="1.7.0",s),t.exports.COMPANION=g,t.exports.UPPY_SERVER=g,t.exports.COMPANION_PATTERN=/\.transloadit\.com$/}}]);
|
|
3
|
-
//# sourceMappingURL=6.
|
|
1
|
+
/*! For license information please see 6.cd3776b3.chunk.js.LICENSE.txt */
|
|
2
|
+
(this["webpackJsonp@micromag/viewer-build"]=this["webpackJsonp@micromag/viewer-build"]||[]).push([[6],{433:function(t,e,n){var r,s=n(499),o=n(460),i=n(501),a=n(502),c=n(503);"undefined"!==typeof ArrayBuffer&&(r=n(504));var u="undefined"!==typeof navigator&&/Android/i.test(navigator.userAgent),p="undefined"!==typeof navigator&&/PhantomJS/i.test(navigator.userAgent),l=u||p;e.protocol=3;var h=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},f=s(h),d={type:"error",data:"parser error"},y=n(505);function m(t,e,n){for(var r=new Array(t.length),s=a(t.length,n),o=function(t,n,s){e(n,(function(e,n){r[t]=n,s(e,r)}))},i=0;i<t.length;i++)o(i,t[i],s)}e.encodePacket=function(t,n,r,s){"function"===typeof n&&(s=n,n=!1),"function"===typeof r&&(s=r,r=null);var o=void 0===t.data?void 0:t.data.buffer||t.data;if("undefined"!==typeof ArrayBuffer&&o instanceof ArrayBuffer)return function(t,n,r){if(!n)return e.encodeBase64Packet(t,r);var s=t.data,o=new Uint8Array(s),i=new Uint8Array(1+s.byteLength);i[0]=h[t.type];for(var a=0;a<o.length;a++)i[a+1]=o[a];return r(i.buffer)}(t,n,s);if("undefined"!==typeof y&&o instanceof y)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 s=new FileReader;return s.onload=function(){e.encodePacket({type:t.type,data:s.result},n,!0,r)},s.readAsArrayBuffer(t.data)}(t,n,r);var s=new Uint8Array(1);s[0]=h[t.type];var o=new y([s.buffer,t.data]);return r(o)}(t,n,s);if(o&&o.base64)return function(t,n){var r="b"+e.packets[t.type]+t.data.data;return n(r)}(t,s);var i=h[t.type];return void 0!==t.data&&(i+=r?c.encode(String(t.data),{strict:!1}):String(t.data)),s(""+i)},e.encodeBase64Packet=function(t,n){var r,s="b"+e.packets[t.type];if("undefined"!==typeof y&&t.data instanceof y){var o=new FileReader;return o.onload=function(){var t=o.result.split(",")[1];n(s+t)},o.readAsDataURL(t.data)}try{r=String.fromCharCode.apply(null,new Uint8Array(t.data))}catch(u){for(var i=new Uint8Array(t.data),a=new Array(i.length),c=0;c<i.length;c++)a[c]=i[c];r=String.fromCharCode.apply(null,a)}return s+=btoa(r),n(s)},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(e){return!1}return t}(t)))return d;var s=t.charAt(0);return Number(s)==s&&f[s]?t.length>1?{type:f[s],data:t.substring(1)}:{type:f[s]}:d}s=new Uint8Array(t)[0];var o=i(t,1);return y&&"blob"===n&&(o=new y([o])),{type:f[s],data:o}},e.decodeBase64Packet=function(t,e){var n=f[t.charAt(0)];if(!r)return{type:n,data:{base64:!0,data:t.substr(1)}};var s=r.decode(t.substr(1));return"blob"===e&&y&&(s=new y([s])),{type:n,data:s}},e.encodePayload=function(t,n,r){"function"===typeof n&&(r=n,n=null);var s=o(t);if(n&&s)return y&&!l?e.encodePayloadAsBlob(t,r):e.encodePayloadAsArrayBuffer(t,r);if(!t.length)return r("0:");m(t,(function(t,r){e.encodePacket(t,!!s&&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 s;if("function"===typeof n&&(r=n,n=null),""===t)return r(d,0,1);for(var o,i,a="",c=0,u=t.length;c<u;c++){var p=t.charAt(c);if(":"===p){if(""===a||a!=(o=Number(a)))return r(d,0,1);if(a!=(i=t.substr(c+1,o)).length)return r(d,0,1);if(i.length){if(s=e.decodePacket(i,n,!1),d.type===s.type&&d.data===s.data)return r(d,0,1);if(!1===r(s,c+o,u))return}c+=o,a=""}else a+=p}return""!==a?r(d,0,1):void 0},e.encodePayloadAsArrayBuffer=function(t,n){if(!t.length)return n(new ArrayBuffer(0));m(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),s=new Uint8Array(r),o=0;return e.forEach((function(t){var e="string"===typeof t,n=t;if(e){for(var r=new Uint8Array(t.length),i=0;i<t.length;i++)r[i]=t.charCodeAt(i);n=r.buffer}s[o++]=e?0:1;var a=n.byteLength.toString();for(i=0;i<a.length;i++)s[o++]=parseInt(a[i]);s[o++]=255;for(r=new Uint8Array(n),i=0;i<r.length;i++)s[o++]=r[i]})),n(s.buffer)}))},e.encodePayloadAsBlob=function(t,n){m(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),s=0;s<t.length;s++)r[s]=t.charCodeAt(s);t=r.buffer,e[0]=0}var o=(t instanceof ArrayBuffer?t.byteLength:t.size).toString(),i=new Uint8Array(o.length+1);for(s=0;s<o.length;s++)i[s]=parseInt(o[s]);if(i[o.length]=255,y){var a=new y([e.buffer,i.buffer,t]);n(null,a)}}))}),(function(t,e){return n(new y(e))}))},e.decodePayloadAsBinary=function(t,n,r){"function"===typeof n&&(r=n,n=null);for(var s=t,o=[];s.byteLength>0;){for(var a=new Uint8Array(s),c=0===a[0],u="",p=1;255!==a[p];p++){if(u.length>310)return r(d,0,1);u+=a[p]}s=i(s,2+u.length),u=parseInt(u);var l=i(s,0,u);if(c)try{l=String.fromCharCode.apply(null,new Uint8Array(l))}catch(y){var h=new Uint8Array(l);l="";for(p=0;p<h.length;p++)l+=String.fromCharCode(h[p])}o.push(l),s=i(s,u)}var f=o.length;o.forEach((function(t,s){r(e.decodePacket(t,n,!0),s,f)}))}},435:function(t,e,n){(function(r){function s(){var t;try{t=e.storage.debug}catch(n){}return!t&&"undefined"!==typeof r&&"env"in r&&(t=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}).DEBUG),t}(e=t.exports=n(489)).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 s=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(s++,"%c"===t&&(o=s))})),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(n){}},e.load=s,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&&"undefined"!=typeof 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(e){return"[UnexpectedJSONParseError]: "+e.message}},e.enable(s())}).call(this,n(139))},436: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,s=n.length;r<s;r++){var o=n[r].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}},437:function(t,e){t.exports=function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},438:function(t,e,n){(function(r){function s(){var t;try{t=e.storage.debug}catch(n){}return!t&&"undefined"!==typeof r&&"env"in r&&(t=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}).DEBUG),t}(e=t.exports=n(506)).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 s=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(s++,"%c"===t&&(o=s))})),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(n){}},e.load=s,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&&"undefined"!=typeof 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(e){return"[UnexpectedJSONParseError]: "+e.message}},e.enable(s())}).call(this,n(139))},449: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 s=0;s<r.length;s++)if((n=r[s])===e||n.fn===e){r.splice(s,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var s=(n=n.slice(0)).length;r<s;++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}},450:function(t,e,n){var r=n(491)("socket.io-parser"),s=n(449),o=n(494),i=n(455),a=n(456);function c(){}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=c,e.Decoder=l;var u=e.ERROR+'"encode error"';function p(t){var n=""+t.type;if(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){var s=function(t){try{return JSON.stringify(t)}catch(e){return!1}}(t.data);if(!1===s)return u;n+=s}return r("encoded %j as %s",t,n),n}function l(){this.reconstructor=null}function h(t){this.reconPack=t,this.buffers=[]}function f(t){return{type:e.ERROR,data:"parser error: "+t}}c.prototype.encode=function(t,n){(r("encoding packet %j",t),e.BINARY_EVENT===t.type||e.BINARY_ACK===t.type)?function(t,e){function n(t){var n=o.deconstructPacket(t),r=p(n.packet),s=n.buffers;s.unshift(r),e(s)}o.removeBlobs(t,n)}(t,n):n([p(t)])},s(l.prototype),l.prototype.add=function(t){var n;if("string"===typeof t)n=function(t){var n=0,s={type:Number(t.charAt(0))};if(null==e.types[s.type])return f("unknown packet type "+s.type);if(e.BINARY_EVENT===s.type||e.BINARY_ACK===s.type){for(var o=n+1;"-"!==t.charAt(++n)&&n!=t.length;);var a=t.substring(o,n);if(a!=Number(a)||"-"!==t.charAt(n))throw new Error("Illegal attachments");s.attachments=Number(a)}if("/"===t.charAt(n+1)){for(o=n+1;++n;){if(","===(u=t.charAt(n)))break;if(n===t.length)break}s.nsp=t.substring(o,n)}else s.nsp="/";var c=t.charAt(n+1);if(""!==c&&Number(c)==c){for(o=n+1;++n;){var u;if(null==(u=t.charAt(n))||Number(u)!=u){--n;break}if(n===t.length)break}s.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){var p=function(t){try{return JSON.parse(t)}catch(e){return!1}}(t.substr(n));if(!(!1!==p&&(s.type===e.ERROR||i(p))))return f("invalid payload");s.data=p}return r("decoded %s as %j",t,s),s}(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(!a(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=o.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null},h.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},451:function(t,e,n){var r=n(497);t.exports=function(t){var e=t.xdomain,n=t.xscheme,s=t.enablesXDR;try{if("undefined"!==typeof XMLHttpRequest&&(!e||r))return new XMLHttpRequest}catch(o){}try{if("undefined"!==typeof XDomainRequest&&!n&&s)return new XDomainRequest}catch(o){}if(!e)try{return new(self[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(o){}}},452:function(t,e,n){var r=n(433),s=n(453);function o(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.isReactNative=t.isReactNative,this.extraHeaders=t.extraHeaders,this.localAddress=t.localAddress}t.exports=o,s(o.prototype),o.prototype.onError=function(t,e){var n=new Error(t);return n.type="TransportError",n.description=e,this.emit("error",n),this},o.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},o.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},o.prototype.send=function(t){if("open"!==this.readyState)throw new Error("Transport not open");this.write(t)},o.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},o.prototype.onData=function(t){var e=r.decodePacket(t,this.socket.binaryType);this.onPacket(e)},o.prototype.onPacket=function(t){this.emit("packet",t)},o.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},453: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 s=0;s<r.length;s++)if((n=r[s])===e||n.fn===e){r.splice(s,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,s=(n=n.slice(0)).length;r<s;++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}},454: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,s=t.indexOf("["),o=t.indexOf("]");-1!=s&&-1!=o&&(t=t.substring(0,s)+t.substring(s,o).replace(/:/g,";")+t.substring(o,t.length));for(var i=n.exec(t||""),a={},c=14;c--;)a[r[c]]=i[c]||"";return-1!=s&&-1!=o&&(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}},455:function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},456:function(t,e,n){(function(e){t.exports=function(t){return n&&e.isBuffer(t)||r&&(t instanceof ArrayBuffer||function(t){return"function"===typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer}(t))};var n="function"===typeof e&&"function"===typeof e.isBuffer,r="function"===typeof ArrayBuffer}).call(this,n(216).Buffer)},457:function(t,e,n){var r=n(495),s=n(463),o=n(464),i=n(450),a=n(465),c=n(466),u=n(435)("socket.io-client:manager"),p=n(462),l=n(512),h=Object.prototype.hasOwnProperty;function f(t,e){if(!(this instanceof f))return new f(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||i;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==e.autoConnect,this.autoConnect&&this.open()}t.exports=f,f.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)},f.prototype.updateSocketIds=function(){for(var t in this.nsps)h.call(this.nsps,t)&&(this.nsps[t].id=this.generateId(t))},f.prototype.generateId=function(t){return("/"===t?"":t+"#")+this.engine.id},o(f.prototype),f.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},f.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},f.prototype.reconnectionDelay=function(t){return arguments.length?(this._reconnectionDelay=t,this.backoff&&this.backoff.setMin(t),this):this._reconnectionDelay},f.prototype.randomizationFactor=function(t){return arguments.length?(this._randomizationFactor=t,this.backoff&&this.backoff.setJitter(t),this):this._randomizationFactor},f.prototype.reconnectionDelayMax=function(t){return arguments.length?(this._reconnectionDelayMax=t,this.backoff&&this.backoff.setMax(t),this):this._reconnectionDelayMax},f.prototype.timeout=function(t){return arguments.length?(this._timeout=t,this):this._timeout},f.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},f.prototype.open=f.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,s=this;this.readyState="opening",this.skipReconnect=!1;var o=a(n,"open",(function(){s.onopen(),t&&t()})),i=a(n,"error",(function(e){if(u("connect_error"),s.cleanup(),s.readyState="closed",s.emitAll("connect_error",e),t){var n=new Error("Connection error");n.data=e,t(n)}else s.maybeReconnectOnOpen()}));if(!1!==this._timeout){var c=this._timeout;u("connect attempt will timeout after %d",c);var p=setTimeout((function(){u("connect attempt timed out after %d",c),o.destroy(),n.close(),n.emit("error","timeout"),s.emitAll("connect_timeout",c)}),c);this.subs.push({destroy:function(){clearTimeout(p)}})}return this.subs.push(o),this.subs.push(i),this},f.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")))},f.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},f.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},f.prototype.ondata=function(t){this.decoder.add(t)},f.prototype.ondecoded=function(t){this.emit("packet",t)},f.prototype.onerror=function(t){u("error",t),this.emitAll("error",t)},f.prototype.socket=function(t,e){var n=this.nsps[t];if(!n){n=new s(this,t,e),this.nsps[t]=n;var r=this;n.on("connecting",o),n.on("connect",(function(){n.id=r.generateId(t)})),this.autoConnect&&o()}function o(){~p(r.connecting,n)||r.connecting.push(n)}return n},f.prototype.destroy=function(t){var e=p(this.connecting,t);~e&&this.connecting.splice(e,1),this.connecting.length||this.close()},f.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()})))},f.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},f.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()},f.prototype.close=f.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()},f.prototype.onclose=function(t){u("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()},f.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)}})}},f.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},458:function(t,e,n){var r=n(451),s=n(498),o=n(508),i=n(509);e.polling=function(t){var e=!1,n=!1,i=!1!==t.jsonp;if("undefined"!==typeof location){var a="https:"===location.protocol,c=location.port;c||(c=a?443:80),e=t.hostname!==location.hostname||c!==t.port,n=t.secure!==a}if(t.xdomain=e,t.xscheme=n,"open"in new r(t)&&!t.forceJSONP)return new s(t);if(!i)throw new Error("JSONP disabled");return new o(t)},e.websocket=i},459:function(t,e,n){var r=n(452),s=n(436),o=n(433),i=n(437),a=n(461),c=n(438)("engine.io-client:polling");t.exports=p;var u=null!=new(n(451))({xdomain:!1}).responseType;function p(t){var e=t&&t.forceBase64;u&&!e||(this.supportsBinary=!1),r.call(this,t)}i(p,r),p.prototype.name="polling",p.prototype.doOpen=function(){this.poll()},p.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()},p.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},p.prototype.onData=function(t){var e=this;c("polling got data %s",t);o.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))},p.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))},p.prototype.write=function(t){var e=this;this.writable=!1;var n=function(){e.writable=!0,e.emit("drain")};o.encodePayload(t,this.supportsBinary,(function(t){e.doWrite(t,n)}))},p.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=s.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}},460:function(t,e,n){(function(e){var r=n(500),s=Object.prototype.toString,o="function"===typeof Blob||"undefined"!==typeof Blob&&"[object BlobConstructor]"===s.call(Blob),i="function"===typeof File||"undefined"!==typeof File&&"[object FileConstructor]"===s.call(File);t.exports=function t(n){if(!n||"object"!==typeof n)return!1;if(r(n)){for(var s=0,a=n.length;s<a;s++)if(t(n[s]))return!0;return!1}if("function"===typeof e&&e.isBuffer&&e.isBuffer(n)||"function"===typeof ArrayBuffer&&n instanceof ArrayBuffer||o&&n instanceof Blob||i&&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(216).Buffer)},461:function(t,e,n){"use strict";var r,s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),o={},i=0,a=0;function c(t){var e="";do{e=s[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}function u(){var t=c(+new Date);return t!==r?(i=0,r=t):t+"."+c(i++)}for(;a<64;a++)o[s[a]]=a;u.encode=c,u.decode=function(t){var e=0;for(a=0;a<t.length;a++)e=64*e+o[t.charAt(a)];return e},t.exports=u},462: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}},463:function(t,e,n){var r=n(450),s=n(464),o=n(511),i=n(465),a=n(466),c=n(435)("socket.io-client:socket"),u=n(436),p=n(460);t.exports=f;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},h=s.prototype.emit;function f(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,this.flags={},n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}s(f.prototype),f.prototype.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[i(t,"open",a(this,"onopen")),i(t,"packet",a(this,"onpacket")),i(t,"close",a(this,"onclose"))]}},f.prototype.open=f.prototype.connect=function(){return this.connected||(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting")),this},f.prototype.send=function(){var t=o(arguments);return t.unshift("message"),this.emit.apply(this,t),this},f.prototype.emit=function(t){if(l.hasOwnProperty(t))return h.apply(this,arguments),this;var e=o(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:p(e))?r.BINARY_EVENT: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),this.flags={},this},f.prototype.packet=function(t){t.nsp=this.nsp,this.io.packet(t)},f.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})},f.prototype.onclose=function(t){c("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",t)},f.prototype.onpacket=function(t){var e=t.nsp===this.nsp,n=t.type===r.ERROR&&"/"===t.nsp;if(e||n)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)}},f.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?h.apply(this,e):this.receiveBuffer.push(e)},f.prototype.ack=function(t){var e=this,n=!1;return function(){if(!n){n=!0;var s=o(arguments);c("sending ack %j",s),e.packet({type:p(s)?r.BINARY_ACK:r.ACK,id:t,data:s})}}},f.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)},f.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},f.prototype.emitBuffered=function(){var t;for(t=0;t<this.receiveBuffer.length;t++)h.apply(this,this.receiveBuffer[t]);for(this.receiveBuffer=[],t=0;t<this.sendBuffer.length;t++)this.packet(this.sendBuffer[t]);this.sendBuffer=[]},f.prototype.ondisconnect=function(){c("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},f.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)},f.prototype.close=f.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},f.prototype.compress=function(t){return this.flags.compress=t,this},f.prototype.binary=function(t){return this.flags.binary=t,this}},464: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 s=0;s<r.length;s++)if((n=r[s])===e||n.fn===e){r.splice(s,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,s=(n=n.slice(0)).length;r<s;++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}},465:function(t,e){t.exports=function(t,e,n){return t.on(e,n),{destroy:function(){t.removeListener(e,n)}}}},466: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)))}}},485:function(t,e,n){function r(){return r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},r.apply(this,arguments)}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}var o,i=function(){o||(o=n(487));return o},a=n(449),c=n(214),u=n(486),p=n(434),l=n(442);var h="ASSEMBLY_EXECUTING",f="ASSEMBLY_COMPLETED",d=["ASSEMBLY_UPLOADING",h,f];function y(t,e){return d.indexOf(t)>=d.indexOf(e)}var m=function(t){var e,n;function o(e){var n;return(n=t.call(this)||this).status=e,n.socket=null,n.pollInterval=null,n.closed=!1,n}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,s(e,n);var a=o.prototype;return a.connect=function(){this._connectSocket(),this._beginPolling()},a._onFinished=function(){this.emit("finished"),this.close()},a._connectSocket=function(){var t=this,e=u(this.status.websocket_url),n=i().connect(e.origin,{transports:["websocket"],path:e.pathname});n.on("connect",(function(){n.emit("assembly_connect",{id:t.status.assembly_id}),t.emit("connect")})),n.on("connect_failed",(function(){t._onError(new p("Transloadit Socket.io connection error")),t.socket=null})),n.on("error",(function(){n.disconnect(),t.socket=null})),n.on("assembly_finished",(function(){t._onFinished()})),n.on("assembly_upload_finished",(function(e){t.emit("upload",e),t.status.uploads.push(e)})),n.on("assembly_uploading_finished",(function(){t.emit("executing")})),n.on("assembly_upload_meta_data_extracted",(function(){t.emit("metadata"),t._fetchStatus({diff:!1})})),n.on("assembly_result_finished",(function(e,n){t.emit("result",e,n),t.status.results[e]||(t.status.results[e]=[]),t.status.results[e].push(n)})),n.on("assembly_error",(function(e){t._onError(e),t._fetchStatus({diff:!1})})),this.socket=n},a._onError=function(t){this.emit("error",r(new Error(t.message),t))},a._beginPolling=function(){var t=this;this.pollInterval=setInterval((function(){t.socket&&t.socket.connected||t._fetchStatus()}),2e3)},a._fetchStatus=function(t){var e=this,n=(void 0===t?{}:t).diff,r=void 0===n||n;return l(this.status.assembly_ssl_url).then((function(t){return t.json()})).then((function(t){e.closed||(e.emit("status",t),r?e.updateStatus(t):e.status=t)})).catch((function(t){return e._onError(t)}))},a.update=function(){return this._fetchStatus({diff:!0})},a.updateStatus=function(t){this._diffStatus(this.status,t),this.status=t},a._diffStatus=function(t,e){var n=this,r=t.ok,s=e.ok;if(e.error&&!t.error)return this._onError(e);var o=y(s,h)&&!y(r,h);o&&this.emit("executing"),Object.keys(e.uploads).filter((function(e){return!c(t.uploads,e)})).map((function(t){return e.uploads[t]})).forEach((function(t){n.emit("upload",t)})),o&&this.emit("metadata"),Object.keys(e.results).forEach((function(r){var s=e.results[r],o=t.results[r];s.filter((function(t){return!o||!o.some((function(e){return e.id===t.id}))})).forEach((function(t){n.emit("result",r,t)}))})),y(s,f)&&!y(r,f)&&this.emit("finished")},a.close=function(){this.closed=!0,this.socket&&(this.socket.disconnect(),this.socket=null),clearInterval(this.pollInterval)},o}(a);t.exports=m},486:function(t,e){t.exports=function(t){var e=/^\w+:\/\//.exec(t),n=0;e&&(n=e[0].length+1);var r=t.indexOf("/",n);return-1===r?{origin:t,pathname:"/"}:{origin:t.slice(0,r),pathname:t.slice(r)}}},487:function(t,e,n){var r=n(488),s=n(450),o=n(457),i=n(435)("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,s=r(t),c=s.source,u=s.id,p=s.path,l=a[u]&&p in a[u].nsps;return e.forceNew||e["force new connection"]||!1===e.multiplex||l?(i("ignoring socket cache for %s",c),n=o(c,e)):(a[u]||(i("new io instance for %s",c),a[u]=o(c,e)),n=a[u]),s.query&&!e.query&&(e.query=s.query),n.socket(s.path,e)}e.protocol=s.protocol,e.connect=c,e.Manager=n(457),e.Socket=n(463)},488:function(t,e,n){var r=n(454),s=n(435)("socket.io-client:url");t.exports=function(t,e){var n=t;e=e||"undefined"!==typeof location&&location,null==t&&(t=e.protocol+"//"+e.host);"string"===typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?e.protocol+t:e.host+t),/^(https?|wss?):\/\//.test(t)||(s("protocol-less url %s",t),t="undefined"!==typeof e?e.protocol+"//"+t:"https://"+t),s("parse %s",t),n=r(t));n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443"));n.path=n.path||"/";var o=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+o+":"+n.port,n.href=n.protocol+"://"+o+(e&&e.port===n.port?"":":"+n.port),n}},489:function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,s=+new Date,o=s-(n||s);t.diff=o,t.prev=n,t.curr=s,n=s;for(var i=new Array(arguments.length),a=0;a<i.length;a++)i[a]=arguments[a];i[0]=e.coerce(i[0]),"string"!==typeof i[0]&&i.unshift("%O");var c=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;c++;var s=e.formatters[r];if("function"===typeof s){var o=i[c];n=s.call(t,o),i.splice(c,1),c--}return n})),e.formatArgs.call(t,i);var u=r.log||e.log||console.log.bind(console);u.apply(t,i)}}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=s,"function"===typeof e.init&&e.init(r),e.instances.push(r),r}function s(){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,]+/),s=r.length;for(n=0;n<s;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 o=e.instances[n];o.enabled=e.enabled(o.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(490),e.instances=[],e.names=[],e.skips=[],e.formatters={}},490:function(t,e){var n=1e3,r=60*n,s=60*r,o=24*s,i=365.25*o;function a(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 c,u=typeof t;if("string"===u&&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 a=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*i;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*s;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?a(c=t,o,"day")||a(c,s,"hour")||a(c,r,"minute")||a(c,n,"second")||c+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=s)return Math.round(t/s)+"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))}},491:function(t,e,n){(function(r){function s(){var t;try{t=e.storage.debug}catch(n){}return!t&&"undefined"!==typeof r&&"env"in r&&(t=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}).DEBUG),t}(e=t.exports=n(492)).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 s=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(s++,"%c"===t&&(o=s))})),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(n){}},e.load=s,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&&"undefined"!=typeof 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(e){return"[UnexpectedJSONParseError]: "+e.message}},e.enable(s())}).call(this,n(139))},492:function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,s=+new Date,o=s-(n||s);t.diff=o,t.prev=n,t.curr=s,n=s;for(var i=new Array(arguments.length),a=0;a<i.length;a++)i[a]=arguments[a];i[0]=e.coerce(i[0]),"string"!==typeof i[0]&&i.unshift("%O");var c=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;c++;var s=e.formatters[r];if("function"===typeof s){var o=i[c];n=s.call(t,o),i.splice(c,1),c--}return n})),e.formatArgs.call(t,i);var u=r.log||e.log||console.log.bind(console);u.apply(t,i)}}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=s,"function"===typeof e.init&&e.init(r),e.instances.push(r),r}function s(){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,]+/),s=r.length;for(n=0;n<s;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 o=e.instances[n];o.enabled=e.enabled(o.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(493),e.instances=[],e.names=[],e.skips=[],e.formatters={}},493:function(t,e){var n=1e3,r=60*n,s=60*r,o=24*s,i=365.25*o;function a(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 c,u=typeof t;if("string"===u&&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 a=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*i;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*s;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?a(c=t,o,"day")||a(c,s,"hour")||a(c,r,"minute")||a(c,n,"second")||c+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=s)return Math.round(t/s)+"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))}},494:function(t,e,n){var r=n(455),s=n(456),o=Object.prototype.toString,i="function"===typeof Blob||"undefined"!==typeof Blob&&"[object BlobConstructor]"===o.call(Blob),a="function"===typeof File||"undefined"!==typeof File&&"[object FileConstructor]"===o.call(File);function c(t,e){if(!t)return t;if(s(t)){var n={_placeholder:!0,num:e.length};return e.push(t),n}if(r(t)){for(var o=new Array(t.length),i=0;i<t.length;i++)o[i]=c(t[i],e);return o}if("object"===typeof t&&!(t instanceof Date)){o={};for(var a in t)o[a]=c(t[a],e);return o}return t}function u(t,e){if(!t)return t;if(t&&t._placeholder)return e[t.num];if(r(t))for(var n=0;n<t.length;n++)t[n]=u(t[n],e);else if("object"===typeof t)for(var s in t)t[s]=u(t[s],e);return t}e.deconstructPacket=function(t){var e=[],n=t.data,r=t;return r.data=c(n,e),r.attachments=e.length,{packet:r,buffers:e}},e.reconstructPacket=function(t,e){return t.data=u(t.data,e),t.attachments=void 0,t},e.removeBlobs=function(t,e){var n=0,o=t;!function t(c,u,p){if(!c)return c;if(i&&c instanceof Blob||a&&c instanceof File){n++;var l=new FileReader;l.onload=function(){p?p[u]=this.result:o=this.result,--n||e(o)},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&&!s(c))for(var f in c)t(c[f],f,c)}(o),n||e(o)}},495:function(t,e,n){t.exports=n(496),t.exports.parser=n(433)},496:function(t,e,n){var r=n(458),s=n(453),o=n(438)("engine.io-client:socket"),i=n(462),a=n(433),c=n(454),u=n(436);function p(t,e){if(!(this instanceof p))return new p(t,e);e=e||{},t&&"object"===typeof t&&(e=t,t=null),t?(t=c(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=c(e.host).host),this.secure=null!=e.secure?e.secure:"undefined"!==typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.agent=e.agent||!1,this.hostname=e.hostname||("undefined"!==typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!==typeof location&&location.port?location.port:this.secure?443:80),this.query=e.query||{},"string"===typeof this.query&&(this.query=u.decode(this.query)),this.upgrade=!1!==e.upgrade,this.path=(e.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!e.forceJSONP,this.jsonp=!1!==e.jsonp,this.forceBase64=!!e.forceBase64,this.enablesXDR=!!e.enablesXDR,this.timestampParam=e.timestampParam||"t",this.timestampRequests=e.timestampRequests,this.transports=e.transports||["polling","websocket"],this.transportOptions=e.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=e.policyPort||843,this.rememberUpgrade=e.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=e.onlyBinaryUpgrades,this.perMessageDeflate=!1!==e.perMessageDeflate&&(e.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=e.pfx||null,this.key=e.key||null,this.passphrase=e.passphrase||null,this.cert=e.cert||null,this.ca=e.ca||null,this.ciphers=e.ciphers||null,this.rejectUnauthorized=void 0===e.rejectUnauthorized||e.rejectUnauthorized,this.forceNode=!!e.forceNode,this.isReactNative="undefined"!==typeof navigator&&"string"===typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"===typeof self||this.isReactNative)&&(e.extraHeaders&&Object.keys(e.extraHeaders).length>0&&(this.extraHeaders=e.extraHeaders),e.localAddress&&(this.localAddress=e.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}t.exports=p,p.priorWebsocketSuccess=!1,s(p.prototype),p.protocol=a.protocol,p.Socket=p,p.Transport=n(452),p.transports=n(458),p.parser=n(433),p.prototype.createTransport=function(t){o('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,isReactNative:this.isReactNative})},p.prototype.open=function(){var t;if(this.rememberUpgrade&&p.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(n){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)},p.prototype.setTransport=function(t){o("setting transport %s",t.name);var e=this;this.transport&&(o("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")}))},p.prototype.probe=function(t){o('probing transport "%s"',t);var e=this.createTransport(t,{probe:1}),n=!1,r=this;function s(){if(r.onlyBinaryUpgrades){var s=!this.supportsBinary&&r.transport.supportsBinary;n=n||s}n||(o('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",(function(s){if(!n)if("pong"===s.type&&"probe"===s.data){if(o('probe transport "%s" pong',t),r.upgrading=!0,r.emit("upgrading",e),!e)return;p.priorWebsocketSuccess="websocket"===e.name,o('pausing current transport "%s"',r.transport.name),r.transport.pause((function(){n||"closed"!==r.readyState&&(o("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{o('probe transport "%s" failed',t);var i=new Error("probe error");i.transport=e.name,r.emit("upgradeError",i)}})))}function i(){n||(n=!0,h(),e.close(),e=null)}function a(n){var s=new Error("probe error: "+n);s.transport=e.name,i(),o('probe transport "%s" failed because of error: %s',t,n),r.emit("upgradeError",s)}function c(){a("transport closed")}function u(){a("socket closed")}function l(t){e&&t.name!==e.name&&(o('"%s" works - aborting "%s"',t.name,e.name),i())}function h(){e.removeListener("open",s),e.removeListener("error",a),e.removeListener("close",c),r.removeListener("close",u),r.removeListener("upgrading",l)}p.priorWebsocketSuccess=!1,e.once("open",s),e.once("error",a),e.once("close",c),this.once("close",u),this.once("upgrading",l),e.open()},p.prototype.onOpen=function(){if(o("socket open"),this.readyState="open",p.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){o("starting upgrade probes");for(var t=0,e=this.upgrades.length;t<e;t++)this.probe(this.upgrades[t])}},p.prototype.onPacket=function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(o('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 o('packet received with socket readyState "%s"',this.readyState)},p.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))},p.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)},p.prototype.setPing=function(){var t=this;clearTimeout(t.pingIntervalTimer),t.pingIntervalTimer=setTimeout((function(){o("writing ping packet - expecting pong within %sms",t.pingTimeout),t.ping(),t.onHeartbeat(t.pingTimeout)}),t.pingInterval)},p.prototype.ping=function(){var t=this;this.sendPacket("ping",(function(){t.emit("ping")}))},p.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},p.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(o("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},p.prototype.write=p.prototype.send=function(t,e,n){return this.sendPacket("message",t,e,n),this},p.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 s={type:t,data:e,options:n};this.emit("packetCreate",s),this.writeBuffer.push(s),r&&this.once("flush",r),this.flush()}},p.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"),o("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},p.prototype.onError=function(t){o("socket error %j",t),p.priorWebsocketSuccess=!1,this.emit("error",t),this.onClose("transport error",t)},p.prototype.onClose=function(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){o('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}},p.prototype.filterUpgrades=function(t){for(var e=[],n=0,r=t.length;n<r;n++)~i(this.transports,t[n])&&e.push(t[n]);return e}},497:function(t,e){try{t.exports="undefined"!==typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(n){t.exports=!1}},498:function(t,e,n){var r=n(451),s=n(459),o=n(453),i=n(437),a=n(438)("engine.io-client:polling-xhr");function c(){}function u(t){if(s.call(this,t),this.requestTimeout=t.requestTimeout,this.extraHeaders=t.extraHeaders,"undefined"!==typeof location){var e="https:"===location.protocol,n=location.port;n||(n=e?443:80),this.xd="undefined"!==typeof location&&t.hostname!==location.hostname||n!==t.port,this.xs=t.secure!==e}}function p(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()}if(t.exports=u,t.exports.Request=p,i(u,s),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 p(t)},u.prototype.doWrite=function(t,e){var n="string"!==typeof t&&void 0!==t,r=this.request({method:"POST",data:t,isBinary:n}),s=this;r.on("success",e),r.on("error",(function(t){s.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},o(p.prototype),p.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 e=this.xhr=new r(t),n=this;try{a("xhr open %s: %s",this.method,this.uri),e.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var s in e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(s)&&e.setRequestHeader(s,this.extraHeaders[s])}catch(o){}if("POST"===this.method)try{this.isBinary?e.setRequestHeader("Content-type","application/octet-stream"):e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{e.setRequestHeader("Accept","*/*")}catch(o){}"withCredentials"in e&&(e.withCredentials=!0),this.requestTimeout&&(e.timeout=this.requestTimeout),this.hasXDR()?(e.onload=function(){n.onLoad()},e.onerror=function(){n.onError(e.responseText)}):e.onreadystatechange=function(){if(2===e.readyState)try{var t=e.getResponseHeader("Content-Type");n.supportsBinary&&"application/octet-stream"===t&&(e.responseType="arraybuffer")}catch(o){}4===e.readyState&&(200===e.status||1223===e.status?n.onLoad():setTimeout((function(){n.onError(e.status)}),0))},a("xhr data %s",this.data),e.send(this.data)}catch(o){return void setTimeout((function(){n.onError(o)}),0)}"undefined"!==typeof document&&(this.index=p.requestsCount++,p.requests[this.index]=this)},p.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},p.prototype.onData=function(t){this.emit("data",t),this.onSuccess()},p.prototype.onError=function(t){this.emit("error",t),this.cleanup(!0)},p.prototype.cleanup=function(t){if("undefined"!==typeof 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(e){}"undefined"!==typeof document&&delete p.requests[this.index],this.xhr=null}},p.prototype.onLoad=function(){var t;try{var e;try{e=this.xhr.getResponseHeader("Content-Type")}catch(n){}t="application/octet-stream"===e&&this.xhr.response||this.xhr.responseText}catch(n){this.onError(n)}null!=t&&this.onData(t)},p.prototype.hasXDR=function(){return"undefined"!==typeof XDomainRequest&&!this.xs&&this.enablesXDR},p.prototype.abort=function(){this.cleanup()},p.requestsCount=0,p.requests={},"undefined"!==typeof document)if("function"===typeof attachEvent)attachEvent("onunload",h);else if("function"===typeof addEventListener){var l="onpagehide"in self?"pagehide":"unload";addEventListener(l,h,!1)}function h(){for(var t in p.requests)p.requests.hasOwnProperty(t)&&p.requests[t].abort()}},499: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}},500:function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},501: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 s=new Uint8Array(t),o=new Uint8Array(n-e),i=e,a=0;i<n;i++,a++)o[a]=s[i];return o.buffer}},502:function(t,e){function n(){}t.exports=function(t,e,r){var s=!1;return r=r||n,o.count=t,0===t?e():o;function o(t,n){if(o.count<=0)throw new Error("after called too many times");--o.count,t?(s=!0,e(t),e=r):0!==o.count||s||e(null,n)}}},503:function(t,e){var n,r,s,o=String.fromCharCode;function i(t){for(var e,n,r=[],s=0,o=t.length;s<o;)(e=t.charCodeAt(s++))>=55296&&e<=56319&&s<o?56320==(64512&(n=t.charCodeAt(s++)))?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),s--):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 o(t>>e&63|128)}function u(t,e){if(0==(4294967168&t))return o(t);var n="";return 0==(4294965248&t)?n=o(t>>6&31|192):0==(4294901760&t)?(a(t,e)||(t=65533),n=o(t>>12&15|224),n+=c(t,6)):0==(4292870144&t)&&(n=o(t>>18&7|240),n+=c(t,12),n+=c(t,6)),n+=o(63&t|128)}function p(){if(s>=r)throw Error("Invalid byte index");var t=255&n[s];if(s++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function l(t){var e,o;if(s>r)throw Error("Invalid byte index");if(s==r)return!1;if(e=255&n[s],s++,0==(128&e))return e;if(192==(224&e)){if((o=(31&e)<<6|p())>=128)return o;throw Error("Invalid continuation byte")}if(224==(240&e)){if((o=(15&e)<<12|p()<<6|p())>=2048)return a(o,t)?o:65533;throw Error("Invalid continuation byte")}if(240==(248&e)&&(o=(7&e)<<18|p()<<12|p()<<6|p())>=65536&&o<=1114111)return o;throw Error("Invalid UTF-8 detected")}t.exports={version:"2.1.2",encode:function(t,e){for(var n=!1!==(e=e||{}).strict,r=i(t),s=r.length,o=-1,a="";++o<s;)a+=u(r[o],n);return a},decode:function(t,e){var a=!1!==(e=e||{}).strict;n=i(t),r=n.length,s=0;for(var c,u=[];!1!==(c=l(a));)u.push(c);return function(t){for(var e,n=t.length,r=-1,s="";++r<n;)(e=t[r])>65535&&(s+=o((e-=65536)>>>10&1023|55296),e=56320|1023&e),s+=o(e);return s}(u)}}},504: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),s=r.length,o="";for(n=0;n<s;n+=3)o+=t[r[n]>>2],o+=t[(3&r[n])<<4|r[n+1]>>4],o+=t[(15&r[n+1])<<2|r[n+2]>>6],o+=t[63&r[n+2]];return s%3===2?o=o.substring(0,o.length-1)+"=":s%3===1&&(o=o.substring(0,o.length-2)+"=="),o},e.decode=function(t){var e,r,s,o,i,a=.75*t.length,c=t.length,u=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var p=new ArrayBuffer(a),l=new Uint8Array(p);for(e=0;e<c;e+=4)r=n[t.charCodeAt(e)],s=n[t.charCodeAt(e+1)],o=n[t.charCodeAt(e+2)],i=n[t.charCodeAt(e+3)],l[u++]=r<<2|s>>4,l[u++]=(15&s)<<4|o>>2,l[u++]=(3&o)<<6|63&i;return p}}()},505:function(t,e){var n="undefined"!==typeof 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}}(),s=r&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(t){return!1}}(),o=n&&n.prototype.append&&n.prototype.getBlob;function i(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 i(t).forEach((function(t){r.append(t)})),e.type?r.getBlob(e.type):r.getBlob()}function c(t,e){return new Blob(i(t),e||{})}"undefined"!==typeof Blob&&(a.prototype=Blob.prototype,c.prototype=Blob.prototype),t.exports=r?s?Blob:c:o?a:void 0},506:function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,s=+new Date,o=s-(n||s);t.diff=o,t.prev=n,t.curr=s,n=s;for(var i=new Array(arguments.length),a=0;a<i.length;a++)i[a]=arguments[a];i[0]=e.coerce(i[0]),"string"!==typeof i[0]&&i.unshift("%O");var c=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;c++;var s=e.formatters[r];if("function"===typeof s){var o=i[c];n=s.call(t,o),i.splice(c,1),c--}return n})),e.formatArgs.call(t,i);var u=r.log||e.log||console.log.bind(console);u.apply(t,i)}}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=s,"function"===typeof e.init&&e.init(r),e.instances.push(r),r}function s(){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,]+/),s=r.length;for(n=0;n<s;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 o=e.instances[n];o.enabled=e.enabled(o.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(507),e.instances=[],e.names=[],e.skips=[],e.formatters={}},507:function(t,e){var n=1e3,r=60*n,s=60*r,o=24*s,i=365.25*o;function a(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 c,u=typeof t;if("string"===u&&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 a=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*i;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*s;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?a(c=t,o,"day")||a(c,s,"hour")||a(c,r,"minute")||a(c,n,"second")||c+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=s)return Math.round(t/s)+"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))}},508:function(t,e,n){(function(e){var r=n(459),s=n(437);t.exports=p;var o,i=/\n/g,a=/\\n/g;function c(){}function u(){return"undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof e?e:{}}function p(t){if(r.call(this,t),this.query=this.query||{},!o){var e=u();o=e.___eio=e.___eio||[]}this.index=o.length;var n=this;o.push((function(t){n.onData(t)})),this.query.j=this.index,"function"===typeof addEventListener&&addEventListener("beforeunload",(function(){n.script&&(n.script.onerror=c)}),!1)}s(p,r),p.prototype.supportsBinary=!1,p.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)},p.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)},p.prototype.doWrite=function(t,e){var n=this;if(!this.form){var r,s=document.createElement("form"),o=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index;s.className="socketio",s.style.position="absolute",s.style.top="-1000px",s.style.left="-1000px",s.target=c,s.method="POST",s.setAttribute("accept-charset","utf-8"),o.name="d",s.appendChild(o),document.body.appendChild(s),this.form=s,this.area=o}function u(){p(),e()}function p(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(e){n.onError("jsonp polling iframe removal error",e)}try{var t='<iframe src="javascript:0" name="'+n.iframeId+'">';r=document.createElement(t)}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(),p(),t=t.replace(a,"\\\n"),this.area.value=t.replace(i,"\\n");try{this.form.submit()}catch(l){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&u()}:this.iframe.onload=u}}).call(this,n(45))},509:function(t,e,n){(function(e){var r,s,o=n(452),i=n(433),a=n(436),c=n(437),u=n(461),p=n(438)("engine.io-client:websocket");if("undefined"!==typeof WebSocket)r=WebSocket;else if("undefined"!==typeof self)r=self.WebSocket||self.MozWebSocket;else try{s=n(510)}catch(f){}var l=r||s;function h(t){t&&t.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=t.perMessageDeflate,this.usingBrowserWebSocket=r&&!t.forceNode,this.protocols=t.protocols,this.usingBrowserWebSocket||(l=s),o.call(this,t)}t.exports=h,c(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&&!this.isReactNative?e?new l(t,e):new l(t):new l(t,e,n)}catch(r){return this.emit("error",r)}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,s=0,o=r;s<o;s++)!function(t){i.encodePacket(t,n.supportsBinary,(function(s){if(!n.usingBrowserWebSocket){var o={};if(t.options&&(o.compress=t.options.compress),n.perMessageDeflate)("string"===typeof s?e.byteLength(s):s.length)<n.perMessageDeflate.threshold&&(o.compress=!1)}try{n.usingBrowserWebSocket?n.ws.send(s):n.ws.send(s,o)}catch(f){p("websocket closed before onclose event")}--r||a()}))}(t[s]);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(){"undefined"!==typeof 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]=u()),this.supportsBinary||(t.b64=1),(t=a.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(216).Buffer)},511: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}},512: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}},513:function(t,e,n){var r=n(442),s=n(440);t.exports=function(){function t(t){void 0===t&&(t={}),this.opts=t,this._reportError=this._reportError.bind(this),this._headers={"Transloadit-Client":this.opts.client}}var e=t.prototype;return e.createAssembly=function(t){var e=this,n=t.params,o=t.fields,i=t.signature,a=t.expectedFiles,c=new FormData;c.append("params","string"===typeof n?n:JSON.stringify(n)),i&&c.append("signature",i),Object.keys(o).forEach((function(t){c.append(t,o[t])})),c.append("num_expected_upload_files",a);var u=new s("/assemblies",""+this.opts.service).href;return r(u,{method:"post",headers:this._headers,body:c}).then((function(t){return t.json()})).then((function(t){if(t.error){var e=new Error(t.error);throw e.details=t.message,e.assembly=t,t.assembly_id&&(e.details+=" Assembly ID: "+t.assembly_id),e}return t})).catch((function(t){return e._reportError(t,{url:u,type:"API_ERROR"})}))},e.reserveFile=function(t,e){var n=this,s=encodeURIComponent(e.size),o=t.assembly_ssl_url+"/reserve_file?size="+s;return r(o,{method:"post",headers:this._headers}).then((function(t){return t.json()})).catch((function(r){return n._reportError(r,{assembly:t,file:e,url:o,type:"API_ERROR"})}))},e.addFile=function(t,e){var n=this;if(!e.uploadURL)return Promise.reject(new Error("File does not have an `uploadURL`."));var s=encodeURIComponent(e.size),o=encodeURIComponent(e.uploadURL),i="size="+s+"&filename="+encodeURIComponent(e.name)+"&fieldname=file&s3Url="+o,a=t.assembly_ssl_url+"/add_file?"+i;return r(a,{method:"post",headers:this._headers}).then((function(t){return t.json()})).catch((function(r){return n._reportError(r,{assembly:t,file:e,url:a,type:"API_ERROR"})}))},e.cancelAssembly=function(t){var e=this,n=t.assembly_ssl_url;return r(n,{method:"delete",headers:this._headers}).then((function(t){return t.json()})).catch((function(t){return e._reportError(t,{url:n,type:"API_ERROR"})}))},e.getAssemblyStatus=function(t){var e=this;return r(t,{headers:this._headers}).then((function(t){return t.json()})).catch((function(n){return e._reportError(n,{url:t,type:"STATUS_ERROR"})}))},e.submitError=function(t,e){var n=e.endpoint,s=e.instance,o=e.assembly,i=t.details?t.message+" ("+t.details+")":t.message;return r("https://transloaditstatus.com/client_error",{method:"post",body:JSON.stringify({endpoint:n,instance:s,assembly_id:o,agent:"undefined"!==typeof navigator?navigator.userAgent:"",client:this.opts.client,error:i})}).then((function(t){return t.json()}))},e._reportError=function(t,e){if(!1===this.opts.errorReporting)throw t;var n={type:e.type};throw e.assembly&&(n.assembly=e.assembly.assembly_id,n.instance=e.assembly.instance),e.url&&(n.endpoint=e.url),this.submitError(t,n).catch((function(t){})),t},t}()},514:function(t,e){function n(t){if(!t)throw new Error("Transloadit: The `params` option is required.");if("string"===typeof t)try{t=JSON.parse(t)}catch(e){throw e.message="Transloadit: The `params` option is a malformed JSON string: "+e.message,e}if(!t.auth||!t.auth.key)throw new Error("Transloadit: The `params.auth.key` option is required. You can find your Transloadit API key at https://transloadit.com/account/api-settings.")}var r=function(){function t(t,e){this.files=t,this.opts=e}var e=t.prototype;return e._normalizeAssemblyOptions=function(t,e){if(Array.isArray(e.fields)){var n=e.fields;e.fields={},n.forEach((function(n){e.fields[n]=t.meta[n]}))}return e.fields||(e.fields={}),e},e._getAssemblyOptions=function(t){var e=this,r=this.opts;return Promise.resolve().then((function(){return r.getAssemblyOptions(t,r)})).then((function(n){return e._normalizeAssemblyOptions(t,n)})).then((function(e){return n(e.params),{fileIDs:[t.id],options:e}}))},e._dedupe=function(t){var e=Object.create(null);return t.forEach((function(t){var n,r=t.fileIDs,s=t.options,o=JSON.stringify(s);e[o]?(n=e[o].fileIDs).push.apply(n,r):e[o]={options:s,fileIDs:[].concat(r)}})),Object.keys(e).map((function(t){return e[t]}))},e.build=function(){var t=this,e=this.opts;return this.files.length>0?Promise.all(this.files.map((function(e){return t._getAssemblyOptions(e)}))).then((function(e){return t._dedupe(e)})):e.alwaysRunAssembly?Promise.resolve(e.getAssemblyOptions(null,e)).then((function(e){return n(e.params),[{fileIDs:t.files.map((function(t){return t.id})),options:e}]})):Promise.resolve([])},t}();t.exports=r,t.exports.validateParams=n},515:function(t,e,n){function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}var o=function(t){var e,n;function o(e,n){var s;return(s=t.call(this)||this)._uppy=e,s._assemblyIDs=n,s._remaining=n.length,s.promise=new Promise((function(t,e){s._resolve=t,s._reject=e})),s._onAssemblyComplete=s._onAssemblyComplete.bind(r(s)),s._onAssemblyCancel=s._onAssemblyCancel.bind(r(s)),s._onAssemblyError=s._onAssemblyError.bind(r(s)),s._onImportError=s._onImportError.bind(r(s)),s._addListeners(),s}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,s(e,n);var i=o.prototype;return i._watching=function(t){return-1!==this._assemblyIDs.indexOf(t)},i._onAssemblyComplete=function(t){this._watching(t.assembly_id)&&(this._uppy.log("[Transloadit] AssemblyWatcher: Got Assembly finish "+t.assembly_id),this.emit("assembly-complete",t.assembly_id),this._checkAllComplete())},i._onAssemblyCancel=function(t){this._watching(t.assembly_id)&&this._checkAllComplete()},i._onAssemblyError=function(t,e){this._watching(t.assembly_id)&&(this._uppy.log("[Transloadit] AssemblyWatcher: Got Assembly error "+t.assembly_id),this._uppy.log(e),this.emit("assembly-error",t.assembly_id,e),this._checkAllComplete())},i._onImportError=function(t,e,n){this._watching(t.assembly_id)&&this._onAssemblyError(t,n)},i._checkAllComplete=function(){this._remaining-=1,0===this._remaining&&(this._removeListeners(),this._resolve())},i._removeListeners=function(){this._uppy.off("transloadit:complete",this._onAssemblyComplete),this._uppy.off("transloadit:assembly-cancel",this._onAssemblyCancel),this._uppy.off("transloadit:assembly-error",this._onAssemblyError),this._uppy.off("transloadit:import-error",this._onImportError)},i._addListeners=function(){this._uppy.on("transloadit:complete",this._onAssemblyComplete),this._uppy.on("transloadit:assembly-cancel",this._onAssemblyCancel),this._uppy.on("transloadit:assembly-error",this._onAssemblyError),this._uppy.on("transloadit:import-error",this._onImportError)},o}(n(449));t.exports=o},549:function(t,e,n){var r,s;function o(){return o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o.apply(this,arguments)}function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}var c=n(64),u=n(214),p=n(50).Plugin,l=n(474),h=n(485),f=n(513),d=n(514),y=n(515);function m(t,e){return{params:e.params,signature:e.signature,fields:e.fields}}var g="https://api2.transloadit.com/companion",b=/https?:\/\/api2(?:-\w+)?\.transloadit\.com\/companion/,v=/https?:\/\/api2(?:-\w+)?\.transloadit\.com\/uppy-server/;t.exports=(s=r=function(t){var e,n;function r(e,n){var r;(r=t.call(this,e,n)||this).type="uploader",r.id=r.opts.id||"Transloadit",r.title="Transloadit",r.defaultLocale={strings:{creatingAssembly:"Preparing upload...",creatingAssemblyFailed:"Transloadit: Could not create Assembly",encoding:"Encoding..."}};var s={service:"https://api2.transloadit.com",errorReporting:!0,waitForEncoding:!1,waitForMetadata:!1,alwaysRunAssembly:!1,importFromUploadURLs:!1,signature:null,params:null,fields:{},getAssemblyOptions:m,limit:0};r.opts=o({},s,n),r.i18nInit(),r._prepareUpload=r._prepareUpload.bind(i(r)),r._afterUpload=r._afterUpload.bind(i(r)),r._onError=r._onError.bind(i(r)),r._onTusError=r._onTusError.bind(i(r)),r._onCancelAll=r._onCancelAll.bind(i(r)),r._onFileUploadURLAvailable=r._onFileUploadURLAvailable.bind(i(r)),r._onRestored=r._onRestored.bind(i(r)),r._getPersistentData=r._getPersistentData.bind(i(r));var a=r.opts.getAssemblyOptions!==s.getAssemblyOptions;return r.opts.params?d.validateParams(r.opts.params):a||d.validateParams(null),r.client=new f({service:r.opts.service,client:r._getClientVersion(),errorReporting:r.opts.errorReporting}),r.activeAssemblies={},r.assemblyWatchers={},r.completedFiles=Object.create(null),r}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,a(e,n);var s=r.prototype;return s.setOptions=function(e){t.prototype.setOptions.call(this,e),this.i18nInit()},s.i18nInit=function(){this.translator=new c([this.defaultLocale,this.uppy.locale,this.opts.locale]),this.i18n=this.translator.translate.bind(this.translator),this.i18nArray=this.translator.translateArray.bind(this.translator),this.setPluginState()},s._getClientVersion=function(){var t=this,e=["uppy-core:"+this.uppy.constructor.VERSION,"uppy-transloadit:"+this.constructor.VERSION,"uppy-tus:"+l.VERSION],n=function(n,r){var s=t.uppy.getPlugin(n);s&&e.push(r+":"+s.constructor.VERSION)};return this.opts.importFromUploadURLs&&(n("XHRUpload","uppy-xhr-upload"),n("AwsS3","uppy-aws-s3"),n("AwsS3Multipart","uppy-aws-s3-multipart")),n("Dropbox","uppy-dropbox"),n("Box","uppy-box"),n("Facebook","uppy-facebook"),n("GoogleDrive","uppy-google-drive"),n("Instagram","uppy-instagram"),n("OneDrive","uppy-onedrive"),n("Zoom","uppy-zoom"),n("Url","uppy-url"),e.join(",")},s._attachAssemblyMetadata=function(t,e){var n=o({},t.meta,{assembly_url:e.assembly_url,filename:t.name,fieldname:"file"}),r=o({},t.tus,{endpoint:e.tus_url,addRequestId:!0}),s=t.remote;if(t.remote&&v.test(t.remote.companionUrl)){var i=new Error("The https://api2.transloadit.com/uppy-server endpoint was renamed to https://api2.transloadit.com/companion, please update your `companionUrl` options accordingly.");throw this.uppy.log(i),i}if(t.remote&&b.test(t.remote.companionUrl)){var a=e.companion_url.replace(/\/$/,""),c=t.remote.url.replace(t.remote.companionUrl,"").replace(/^\//,"");s=o({},t.remote,{companionUrl:a,url:a+"/"+c})}var u=o({},t,{transloadit:{assembly:e.assembly_id}});return this.opts.importFromUploadURLs||o(u,{meta:n,tus:r,remote:s}),u},s._createAssembly=function(t,e,n){var r=this;return this.uppy.log("[Transloadit] Create Assembly"),this.client.createAssembly({params:n.params,fields:n.fields,expectedFiles:t.length,signature:n.signature}).then((function(n){var s,i,a=new h(n),c=a.status,u=c.assembly_id,p=r.getPluginState(),l=p.assemblies,f=p.uploadsAssemblies;r.setPluginState({assemblies:o({},l,(s={},s[u]=c,s)),uploadsAssemblies:o({},f,(i={},i[e]=[].concat(f[e],[u]),i))});var d=r.uppy.getState().files,y={};return t.forEach((function(t){y[t]=r._attachAssemblyMetadata(r.uppy.getFile(t),c)})),r.uppy.setState({files:o({},d,y)}),r.uppy.emit("transloadit:assembly-created",c,t),r.uppy.log("[Transloadit] Created Assembly "+u),a})).catch((function(t){throw t.message=r.i18n("creatingAssemblyFailed")+": "+t.message,t}))},s._createAssemblyWatcher=function(t,e,n){var r=this,s=new y(this.uppy,t);s.on("assembly-complete",(function(t){r.getAssemblyFiles(t).forEach((function(t){r.completedFiles[t.id]=!0,r.uppy.emit("postprocess-complete",t)}))})),s.on("assembly-error",(function(t,e){r.getAssemblyFiles(t).forEach((function(t){r.uppy.emit("upload-error",t,e),r.uppy.emit("postprocess-complete",t)}))})),this.assemblyWatchers[n]=s},s._shouldWaitAfterUpload=function(){return this.opts.waitForEncoding||this.opts.waitForMetadata},s._reserveFiles=function(t,e){var n=this;return Promise.all(e.map((function(e){var r=n.uppy.getFile(e);return n.client.reserveFile(t.status,r)})))},s._onFileUploadURLAvailable=function(t){var e=this,n=this.uppy.getFile(t.id);if(n&&n.transloadit&&n.transloadit.assembly){var r=this.getPluginState().assemblies[n.transloadit.assembly];this.client.addFile(r,n).catch((function(t){e.uppy.log(t),e.uppy.emit("transloadit:import-error",r,n.id,t)}))}},s._findFile=function(t){for(var e=this.uppy.getFiles(),n=0;n<e.length;n++){var r=e[n];if(r.uploadURL===t.tus_upload_url)return r;if(r.tus&&r.tus.uploadUrl===t.tus_upload_url)return r;if(!t.is_tus_file&&r.name===t.name&&r.size===t.size)return r}},s._onFileUploadComplete=function(t,e){var n,r=this.getPluginState(),s=this._findFile(e);s?(this.setPluginState({files:o({},r.files,(n={},n[e.id]={assembly:t,id:s.id,uploadedFile:e},n))}),this.uppy.emit("transloadit:upload",e,this.getAssembly(t))):this.uppy.log("[Transloadit] Couldn\u2019t file the file, it was likely removed in the process")},s._onResult=function(t,e,n){var r=this.getPluginState(),s=r.files[n.original_id];n.localId=s?s.id:null;var o={result:n,stepName:e,id:n.id,assembly:t};this.setPluginState({results:[].concat(r.results,[o])}),this.uppy.emit("transloadit:result",e,n,this.getAssembly(t))},s._onAssemblyFinished=function(t){var e=this,n=t.assembly_ssl_url;this.client.getAssemblyStatus(n).then((function(t){var n,r=t.assembly_id,s=e.getPluginState();e.setPluginState({assemblies:o({},s.assemblies,(n={},n[r]=t,n))}),e.uppy.emit("transloadit:complete",t)}))},s._cancelAssembly=function(t){var e=this;return this.client.cancelAssembly(t).then((function(){e.uppy.emit("transloadit:assembly-cancelled",t)}))},s._onCancelAll=function(){var t=this,e=this.getPluginState().uploadsAssemblies,n=Object.keys(e).reduce((function(t,n){return t.push.apply(t,e[n]),t}),[]).map((function(e){var n=t.getAssembly(e);return t._cancelAssembly(n)}));Promise.all(n).catch((function(e){t.uppy.log(e)}))},s._getPersistentData=function(t){var e,n=this.getPluginState(),r=n.assemblies,s=n.uploadsAssemblies;t(((e={})[this.id]={assemblies:r,uploadsAssemblies:s},e))},s._onRestored=function(t){var e=this,n=t&&t[this.id]?t[this.id]:{},r=n.assemblies||{},s=n.uploadsAssemblies||{};if(0!==Object.keys(s).length){this.restored=Promise.resolve().then((function(){return function(t){var n={},r=[];Object.keys(t).forEach((function(s){var o=t[s];o.uploads.forEach((function(t){var r=e._findFile(t);n[t.id]={id:r.id,assembly:s,uploadedFile:t}}));var i=e.getPluginState();Object.keys(o.results).forEach((function(t){o.results[t].forEach((function(e){var n=i.files[e.original_id];e.localId=n?n.id:null,r.push({id:e.id,result:e,stepName:t,assembly:s})}))}))})),e.setPluginState({assemblies:t,files:n,results:r,uploadsAssemblies:s})}(r),function(){var t=e.getPluginState(),n=t.assemblies,r=t.uploadsAssemblies;Object.keys(r).forEach((function(t){var n=r[t],s=n.reduce((function(t,n){var r=e.getAssemblyFiles(n).map((function(t){return t.id}));return t.push.apply(t,r),t}),[]);e._createAssemblyWatcher(n,s,t)})),Object.keys(n).forEach((function(t){var r=new h(n[t]);e._connectAssembly(r)}))}(),function(){var t=e.getPluginState().assemblies;return Promise.all(Object.keys(t).map((function(t){return e.activeAssemblies[t].update()})))}()})),this.restored.then((function(){e.restored=null}))}},s._connectAssembly=function(t){var e=this,n=t.status.assembly_id;if(this.activeAssemblies[n]=t,t.on("status",(function(t){var r,s=e.getPluginState().assemblies;e.setPluginState({assemblies:o({},s,(r={},r[n]=t,r))})})),t.on("upload",(function(t){e._onFileUploadComplete(n,t)})),t.on("error",(function(n){n.assembly=t.status,e.uppy.emit("transloadit:assembly-error",t.status,n)})),t.on("executing",(function(){e.uppy.emit("transloadit:assembly-executing",t.status)})),this.opts.waitForEncoding&&t.on("result",(function(t,r){e._onResult(n,t,r)})),this.opts.waitForEncoding?t.on("finished",(function(){e._onAssemblyFinished(t.status)})):this.opts.waitForMetadata&&t.on("metadata",(function(){e._onAssemblyFinished(t.status)})),"ASSEMBLY_COMPLETE"===t.ok)return t;new Promise((function(e,n){t.once("connect",e),t.once("status",e),t.once("error",n)})).then((function(){e.uppy.log("[Transloadit] Socket is ready")}));return t.connect(),t},s._prepareUpload=function(t,e){var n,r=this;(t=t.filter((function(t){return!t.error}))).forEach((function(t){var e=r.uppy.getFile(t);r.uppy.emit("preprocess-progress",e,{mode:"indeterminate",message:r.i18n("creatingAssembly")})}));var s=function(t){var n,s=t.fileIDs,o=t.options;return r._createAssembly(s,e,o).then((function(t){if(n=t,r.opts.importFromUploadURLs)return r._reserveFiles(t,s)})).then((function(){return s.forEach((function(t){var e=r.uppy.getFile(t);r.uppy.emit("preprocess-complete",e)})),n})).catch((function(t){throw s.forEach((function(e){var n=r.uppy.getFile(e);r.uppy.emit("preprocess-complete",n),r.uppy.emit("upload-error",n,t)})),t}))},i=this.getPluginState().uploadsAssemblies;this.setPluginState({uploadsAssemblies:o({},i,(n={},n[e]=[],n))});var a=t.map((function(t){return r.uppy.getFile(t)}));return new d(a,this.opts).build().then((function(n){return Promise.all(n.map(s)).then((function(n){var s=n.map((function(t){return t.status.assembly_id}));r._createAssemblyWatcher(s,t,e),n.map((function(t){return r._connectAssembly(t)}))}))}),(function(e){throw t.forEach((function(t){var n=r.uppy.getFile(t);r.uppy.emit("preprocess-complete",n),r.uppy.emit("upload-error",n,e)})),e}))},s._afterUpload=function(t,e){var n=this,r=t.map((function(t){return n.uppy.getFile(t)}));t=r.filter((function(t){return!t.error})).map((function(t){return t.id}));var s=this.getPluginState();if(this.restored)return this.restored.then((function(){return n._afterUpload(t,e)}));var i=s.uploadsAssemblies[e],a=function(){i.forEach((function(t){n.activeAssemblies[t].close(),delete n.activeAssemblies[t]}))};if(!this._shouldWaitAfterUpload()){a();var c=i.map((function(t){return n.getAssembly(t)}));return this.uppy.addResultData(e,{transloadit:c}),Promise.resolve()}return 0===i.length?(this.uppy.addResultData(e,{transloadit:[]}),Promise.resolve()):(r.filter((function(t){return!u(n.completedFiles,t.id)})).forEach((function(t){n.uppy.emit("postprocess-progress",t,{mode:"indeterminate",message:n.i18n("encoding")})})),this.assemblyWatchers[e].promise.then((function(){a();var t=i.map((function(t){return n.getAssembly(t)})),r=o({},n.getPluginState().uploadsAssemblies);delete r[e],n.setPluginState({uploadsAssemblies:r}),n.uppy.addResultData(e,{transloadit:t})})))},s._onError=function(t,e){var n=this;void 0===t&&(t=null),this.getPluginState().uploadsAssemblies[e].forEach((function(t){n.activeAssemblies[t]&&n.activeAssemblies[t].close()}))},s._onTusError=function(t){if(t&&/^tus: /.test(t.message)){var e=t.originalRequest?t.originalRequest.getUnderlyingObject():null,n=e&&e.responseURL?e.responseURL:null;this.client.submitError(t,{url:n,type:"TUS_ERROR"}).then((function(t){}))}},s.install=function(){this.uppy.addPreProcessor(this._prepareUpload),this.uppy.addPostProcessor(this._afterUpload),this.uppy.on("error",this._onError),this.uppy.on("cancel-all",this._onCancelAll),this.uppy.on("upload-error",this._onTusError),this.opts.importFromUploadURLs?this.uppy.on("upload-success",this._onFileUploadURLAvailable):this.uppy.use(l,{storeFingerprintForResuming:!1,resume:!1,useFastRemoteRetry:!1,metaFields:["assembly_url","filename","fieldname"],limit:this.opts.limit}),this.uppy.on("restore:get-data",this._getPersistentData),this.uppy.on("restored",this._onRestored),this.setPluginState({assemblies:{},uploadsAssemblies:{},files:{},results:[]});var t=this.uppy.getState().capabilities;this.uppy.setState({capabilities:o({},t,{individualCancellation:!1})})},s.uninstall=function(){this.uppy.removePreProcessor(this._prepareUpload),this.uppy.removePostProcessor(this._afterUpload),this.uppy.off("error",this._onError),this.opts.importFromUploadURLs&&this.uppy.off("upload-success",this._onFileUploadURLAvailable);var t=this.uppy.getState().capabilities;this.uppy.setState({capabilities:o({},t,{individualCancellation:!0})})},s.getAssembly=function(t){return this.getPluginState().assemblies[t]},s.getAssemblyFiles=function(t){return this.uppy.getFiles().filter((function(e){return e&&e.transloadit&&e.transloadit.assembly===t}))},r}(p),r.VERSION="1.7.0",s),t.exports.COMPANION=g,t.exports.UPPY_SERVER=g,t.exports.COMPANION_PATTERN=/\.transloadit\.com$/}}]);
|
|
3
|
+
//# sourceMappingURL=6.cd3776b3.chunk.js.map
|
|
File without changes
|