videomail-client 8.2.1 → 8.3.0

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.
@@ -1,4 +1,4 @@
1
- !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).VideomailClient=e()}}((function(){return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};t[a][0].call(l.exports,(function(e){return i(t[a][1][e]||e)}),l,l.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){t.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r},t.exports.__esModule=!0,t.exports.default=t.exports},{}],2:[function(e,t,n){var r=e("./arrayLikeToArray.js");t.exports=function(e){if(Array.isArray(e))return r(e)},t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayLikeToArray.js":1}],3:[function(e,t,n){t.exports=function(e){return e&&e.__esModule?e:{default:e}},t.exports.__esModule=!0,t.exports.default=t.exports},{}],4:[function(e,t,n){t.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},t.exports.__esModule=!0,t.exports.default=t.exports},{}],5:[function(e,t,n){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},{}],6:[function(e,t,n){var r=e("./arrayWithoutHoles.js"),i=e("./iterableToArray.js"),o=e("./unsupportedIterableToArray.js"),a=e("./nonIterableSpread.js");t.exports=function(e){return r(e)||i(e)||o(e)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayWithoutHoles.js":2,"./iterableToArray.js":4,"./nonIterableSpread.js":5,"./unsupportedIterableToArray.js":8}],7:[function(e,t,n){function r(e){return t.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},{}],8:[function(e,t,n){var r=e("./arrayLikeToArray.js");t.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayLikeToArray.js":1}],9:[function(e,t,n){var r,i;r=this,i=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,i){var o,a,s,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"passive";if(void 0!==e.addEventListener){var c=r.SupportMap[u]?Object.assign({},i,(s=!0,(a=u)in(o={})?Object.defineProperty(o,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[a]=s,o)):i;e.addEventListener(t,n,c)}};var r=n(1)},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SupportMap=void 0;var i=n(2);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=(o(r={},i.PASSIVE,!1),o(r,i.CAPTURE,!1),o(r,i.ONCE,!1),r);t.SupportMap=(Object.keys(a).forEach((function(e,t){a[e]=function(e){if(a[e])return a[e];try{var t=Object.defineProperty({},e,{get:function(){a[e]=!0}});window.addEventListener("test",null,t),window.removeListener("test",null)}catch(e){}return a[e]}(e)})),a)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PASSIVE="passive",t.CAPTURE="capture",t.ONCE="once"}])},"object"==typeof n&&"object"==typeof t?t.exports=i():"object"==typeof n?n["add-eventlistener-with-options"]=i():r["add-eventlistener-with-options"]=i()},{}],10:[function(e,t,n){var r,i=e("events").EventEmitter,o=e("inherits"),a=e("raf"),s={requestAnimationFrame:a,cancelAnimationFrame:a.cancel};function u(){return!0}function c(e){e=e||{},this.__delay=e.delay||0,this.fixedDelta=!!e.fixedDelta,this.frameCount=0,this.deltaTime=0,this.elapsedTime=0,this.__running=!1,this.__completed=!1,this.setFPS(e.fps||1/0),this.setRequestAnimationFrameObject(e.requestAnimationFrameObject||s)}function l(e){var t,r=Date.now();if(e.__running)return e;n.running+=1,e.__running=!0,e.__lastTime=r,e.deltaTime=0,e.emit("start",e.deltaTime,0,e.frameCount);var i=e.requestAnimationFrameObject,o=function(){if(i!==e.requestAnimationFrameObject)return i=e.requestAnimationFrameObject,void e.requestAnimationFrameObject.requestAnimationFrame(o);e.__isReadyForUpdate()&&e.update(),e.__running?t=e.requestAnimationFrameObject.requestAnimationFrame(o):e.requestAnimationFrameObject.cancelAnimationFrame(t)};return e.requestAnimationFrameObject.requestAnimationFrame(o),e}for(var f in o(c,i),r={off:i.prototype.removeListener,trigger:i.prototype.emit,complete:function(){return this.stop(),this.__completed=!0,this.emit("complete",this.frameCount,this.deltaTime),this},dispose:function(){return this.stop(),this.removeAllListeners(),this},getDeltaTime:function(){return this.deltaTime},getElapsedTime:function(){return this.elapsedTime},getFPS:function(){return this.deltaTime>0?1e3/this.deltaTime:0},getFPSLimit:function(){return this.__fps},getFrameCount:function(){return this.frameCount},getRequestAnimationFrameObject:function(){return this.requestAnimationFrameObject},isRunning:function(){return this.__running},isCompleted:function(){return this.__completed},reset:function(){return this.stop(),this.__completed=!1,this.__lastTime=0,this.deltaTime=0,this.elapsedTime=0,this.frameCount=0,this.emit("reset",0,0,this.frameCount),this},setFPS:function(e){return this.__fps=e,this.__isReadyForUpdate=function(e){var t=1e3/e,n=Date.now();if(e<=0||e===1/0)return u;var r=Math.ceil(1e3/60)/2;return function(){var e=Date.now();return!(e-n<t-r||(n=e,0))}}(e),this},setRequestAnimationFrameObject:function(e){if("function"!=typeof e.requestAnimationFrame||"function"!=typeof e.cancelAnimationFrame)throw new Error("Invalid object provide to `setRequestAnimationFrameObject`");return this.requestAnimationFrameObject=e,this},start:function(){var e=this;return this.__delay?setTimeout((function(){l(e)}),this.__delay):l(this),this},stop:function(){return this.__running&&(this.__running=!1,n.running-=1,this.emit("stop",this.deltaTime,this.elapsedTime,this.frameCount)),this},update:function(){this.frameCount++;var e=Date.now();return this.__lastTime=this.__lastTime||e,this.deltaTime=this.fixedDelta||n.globalFixedDelta?1e3/Math.min(60,this.__fps):e-this.__lastTime,this.elapsedTime+=this.deltaTime,this.__lastTime=e,this.emit("update",this.deltaTime,this.elapsedTime,this.frameCount),this}})c.prototype[f]=r[f];function d(e,t){1===arguments.length&&"function"==typeof e&&(t=e,e={});var n=new c(e);return t&&n.on("update",t),n}function h(e,t){return"function"==typeof e.bind?e.bind(t):function(){return e.apply(t,arguments)}}t.exports=n=d,n.bound=function(e,t){for(var n,r=d(e,t),i=function(e){for(var t=Object.keys(e),n=[],r=0;r<t.length;r++)"function"==typeof e[t[r]]&&n.push(t[r]);return n}(c.prototype),o=!!Function.prototype.bind,a=0;a<i.length;a++)r[n=i[a]]=o?r[n].bind(r):h(r[n],r);return r},n.Animitter=c,n.globalFixedDelta=!1,n.EventEmitter=i,n.running=0,Date.now=Date.now||function(){return(new Date).getTime()}},{events:42,inherits:64,raf:83}],11:[function(e,t,n){var r=e("typedarray-to-buffer"),i=e("validate.io-float32array");t.exports=function(e){if(!e)throw new Error("A Float32Array parameter is missing.");if(!i(e))throw new Error("The parameter is not a Float32Array.");this.toBuffer=function(){var t,n=e.length,i=new Int16Array(n);for(t=0;t<n;t++)i[t]=32767*Math.min(1,e[t]);return r(i)}}},{"typedarray-to-buffer":109,"validate.io-float32array":112}],12:[function(e,t,n){"use strict";n.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},n.toByteArray=function(e){var t,n,r=u(e),a=r[0],s=r[1],c=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,c[l++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},n.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,u=n-i;s<u;s+=a)o.push(c(e,s,s+a>u?u:s+a));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],13:[function(e,t,n){},{}],14:[function(e,t,n){
1
+ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).VideomailClient=e()}}((function(){return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};t[a][0].call(l.exports,(function(e){return i(t[a][1][e]||e)}),l,l.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){t.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r},t.exports.__esModule=!0,t.exports.default=t.exports},{}],2:[function(e,t,n){var r=e("./arrayLikeToArray.js");t.exports=function(e){if(Array.isArray(e))return r(e)},t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayLikeToArray.js":1}],3:[function(e,t,n){t.exports=function(e){return e&&e.__esModule?e:{default:e}},t.exports.__esModule=!0,t.exports.default=t.exports},{}],4:[function(e,t,n){t.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},t.exports.__esModule=!0,t.exports.default=t.exports},{}],5:[function(e,t,n){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},{}],6:[function(e,t,n){var r=e("./arrayWithoutHoles.js"),i=e("./iterableToArray.js"),o=e("./unsupportedIterableToArray.js"),a=e("./nonIterableSpread.js");t.exports=function(e){return r(e)||i(e)||o(e)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayWithoutHoles.js":2,"./iterableToArray.js":4,"./nonIterableSpread.js":5,"./unsupportedIterableToArray.js":8}],7:[function(e,t,n){function r(e){return t.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},{}],8:[function(e,t,n){var r=e("./arrayLikeToArray.js");t.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayLikeToArray.js":1}],9:[function(e,t,n){var r,i;r=this,i=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,i){var o,a,s,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"passive";if(void 0!==e.addEventListener){var c=r.SupportMap[u]?Object.assign({},i,(s=!0,(a=u)in(o={})?Object.defineProperty(o,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[a]=s,o)):i;e.addEventListener(t,n,c)}};var r=n(1)},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SupportMap=void 0;var i=n(2);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=(o(r={},i.PASSIVE,!1),o(r,i.CAPTURE,!1),o(r,i.ONCE,!1),r);t.SupportMap=(Object.keys(a).forEach((function(e,t){a[e]=function(e){if(a[e])return a[e];try{var t=Object.defineProperty({},e,{get:function(){a[e]=!0}});window.addEventListener("test",null,t),window.removeListener("test",null)}catch(e){}return a[e]}(e)})),a)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PASSIVE="passive",t.CAPTURE="capture",t.ONCE="once"}])},"object"==typeof n&&"object"==typeof t?t.exports=i():"object"==typeof n?n["add-eventlistener-with-options"]=i():r["add-eventlistener-with-options"]=i()},{}],10:[function(e,t,n){var r,i=e("events").EventEmitter,o=e("inherits"),a=e("raf"),s={requestAnimationFrame:a,cancelAnimationFrame:a.cancel};function u(){return!0}function c(e){e=e||{},this.__delay=e.delay||0,this.fixedDelta=!!e.fixedDelta,this.frameCount=0,this.deltaTime=0,this.elapsedTime=0,this.__running=!1,this.__completed=!1,this.setFPS(e.fps||1/0),this.setRequestAnimationFrameObject(e.requestAnimationFrameObject||s)}function l(e){var t,r=Date.now();if(e.__running)return e;n.running+=1,e.__running=!0,e.__lastTime=r,e.deltaTime=0,e.emit("start",e.deltaTime,0,e.frameCount);var i=e.requestAnimationFrameObject,o=function(){if(i!==e.requestAnimationFrameObject)return i=e.requestAnimationFrameObject,void e.requestAnimationFrameObject.requestAnimationFrame(o);e.__isReadyForUpdate()&&e.update(),e.__running?t=e.requestAnimationFrameObject.requestAnimationFrame(o):e.requestAnimationFrameObject.cancelAnimationFrame(t)};return e.requestAnimationFrameObject.requestAnimationFrame(o),e}for(var f in o(c,i),r={off:i.prototype.removeListener,trigger:i.prototype.emit,complete:function(){return this.stop(),this.__completed=!0,this.emit("complete",this.frameCount,this.deltaTime),this},dispose:function(){return this.stop(),this.removeAllListeners(),this},getDeltaTime:function(){return this.deltaTime},getElapsedTime:function(){return this.elapsedTime},getFPS:function(){return this.deltaTime>0?1e3/this.deltaTime:0},getFPSLimit:function(){return this.__fps},getFrameCount:function(){return this.frameCount},getRequestAnimationFrameObject:function(){return this.requestAnimationFrameObject},isRunning:function(){return this.__running},isCompleted:function(){return this.__completed},reset:function(){return this.stop(),this.__completed=!1,this.__lastTime=0,this.deltaTime=0,this.elapsedTime=0,this.frameCount=0,this.emit("reset",0,0,this.frameCount),this},setFPS:function(e){return this.__fps=e,this.__isReadyForUpdate=function(e){var t=1e3/e,n=Date.now();if(e<=0||e===1/0)return u;var r=Math.ceil(1e3/60)/2;return function(){var e=Date.now();return!(e-n<t-r||(n=e,0))}}(e),this},setRequestAnimationFrameObject:function(e){if("function"!=typeof e.requestAnimationFrame||"function"!=typeof e.cancelAnimationFrame)throw new Error("Invalid object provide to `setRequestAnimationFrameObject`");return this.requestAnimationFrameObject=e,this},start:function(){var e=this;return this.__delay?setTimeout((function(){l(e)}),this.__delay):l(this),this},stop:function(){return this.__running&&(this.__running=!1,n.running-=1,this.emit("stop",this.deltaTime,this.elapsedTime,this.frameCount)),this},update:function(){this.frameCount++;var e=Date.now();return this.__lastTime=this.__lastTime||e,this.deltaTime=this.fixedDelta||n.globalFixedDelta?1e3/Math.min(60,this.__fps):e-this.__lastTime,this.elapsedTime+=this.deltaTime,this.__lastTime=e,this.emit("update",this.deltaTime,this.elapsedTime,this.frameCount),this}})c.prototype[f]=r[f];function d(e,t){1===arguments.length&&"function"==typeof e&&(t=e,e={});var n=new c(e);return t&&n.on("update",t),n}function h(e,t){return"function"==typeof e.bind?e.bind(t):function(){return e.apply(t,arguments)}}t.exports=n=d,n.bound=function(e,t){for(var n,r=d(e,t),i=function(e){for(var t=Object.keys(e),n=[],r=0;r<t.length;r++)"function"==typeof e[t[r]]&&n.push(t[r]);return n}(c.prototype),o=!!Function.prototype.bind,a=0;a<i.length;a++)r[n=i[a]]=o?r[n].bind(r):h(r[n],r);return r},n.Animitter=c,n.globalFixedDelta=!1,n.EventEmitter=i,n.running=0,Date.now=Date.now||function(){return(new Date).getTime()}},{events:42,inherits:64,raf:83}],11:[function(e,t,n){function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=r(e("typedarray-to-buffer"));t.exports=function(){function e(e){this.float32Array=void 0,this.float32Array=e}return e.prototype.toBuffer=function(){var e=new Int16Array(this.float32Array.length);return this.float32Array.forEach((function(t,n){e[n]=32767*Math.min(1,t)})),i.default(e)},e}()},{"typedarray-to-buffer":109}],12:[function(e,t,n){"use strict";n.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},n.toByteArray=function(e){var t,n,r=u(e),a=r[0],s=r[1],c=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,c[l++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},n.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,u=n-i;s<u;s+=a)o.push(c(e,s,s+a>u?u:s+a));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],13:[function(e,t,n){},{}],14:[function(e,t,n){
2
2
  /*!
3
3
  * Cross-Browser Split 1.1.1
4
4
  * Copyright 2007-2012 Steven Levithan <stevenlevithan.com>
@@ -28,7 +28,7 @@ n.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,f=n?i-1:0,d=
28
28
  /*! npm.im/intervalometer */
29
29
  "use strict";function r(e,t,n,r){var i,o;function a(n){i=t(a,r),e(n-(o||n)),o=n}return{start:function(){i||a(0)},stop:function(){n(i),i=null,o=0}}}Object.defineProperty(n,"__esModule",{value:!0}),n.intervalometer=r,n.frameIntervalometer=function(e){return r(e,requestAnimationFrame,cancelAnimationFrame)},n.timerIntervalometer=function(e,t){return r(e,setTimeout,clearTimeout,t)}},{}],67:[function(e,t,n){
30
30
  /*! npm.im/iphone-inline-video 2.2.2 */
31
- "use strict";var r=e("intervalometer");function i(e,t,n){function r(r){n&&!n(e,t)||r.stopImmediatePropagation()}return e.addEventListener(t,r),r}function o(e,t,n,r){function i(e){n[t]=e}r&&i(e[t]),Object.defineProperty(e,t,{get:function(){return n[t]},set:i})}function a(e,t,n){n.addEventListener(t,(function(){return e.dispatchEvent(new Event(t))}))}function s(e,t){Promise.resolve().then((function(){e.dispatchEvent(new Event(t))}))}var u="object"==typeof document&&"object-fit"in document.head.style&&!matchMedia("(-webkit-video-playable-inline)").matches,c="bfred-it:iphone-inline-video",l="bfred-it:iphone-inline-video:event",f="bfred-it:iphone-inline-video:nativeplay",d="bfred-it:iphone-inline-video:nativepause";var h,p=[],m=0;function y(e,t,n){(h||0)+200<Date.now()&&(e[l]=!0,h=Date.now()),n||(e.currentTime=t),p[++m%3]=100*t|0}function b(e){return e.driver.currentTime>=e.video.duration}function g(e){var t=this;t.video.readyState>=t.video.HAVE_FUTURE_DATA?(t.hasAudio||(t.driver.currentTime=t.video.currentTime+e*t.video.playbackRate/1e3,t.video.loop&&b(t)&&(t.driver.currentTime=0)),y(t.video,t.driver.currentTime)):t.video.networkState===t.video.NETWORK_IDLE&&0===t.video.buffered.length&&t.video.load(),t.video.ended&&(delete t.video[l],t.video.pause(!0))}function v(){var e=this,t=e[c];e.webkitDisplayingFullscreen?e[f]():("data:"!==t.driver.src&&t.driver.src!==e.src&&(y(e,0,!0),t.driver.src=e.src),e.paused&&(t.paused=!1,0===e.buffered.length&&e.load(),t.driver.play(),t.updater.start(),t.hasAudio||(s(e,"play"),t.video.readyState>=t.video.HAVE_ENOUGH_DATA&&s(e,"playing"))))}function w(e){var t=this,n=t[c];n.driver.pause(),n.updater.stop(),t.webkitDisplayingFullscreen&&t[d](),n.paused&&!e||(n.paused=!0,n.hasAudio||s(t,"pause"),t.ended&&!t.webkitDisplayingFullscreen&&(t[l]=!0,s(t,"ended")))}function E(e,t){var n={};e[c]=n,n.paused=!0,n.hasAudio=t,n.video=e,n.updater=r.frameIntervalometer(g.bind(n)),t?n.driver=function(e){var t=new Audio;return a(e,"play",t),a(e,"playing",t),a(e,"pause",t),t.crossOrigin=e.crossOrigin,t.src=e.src||e.currentSrc||"data:",t}(e):(e.addEventListener("canplay",(function(){e.paused||s(e,"playing")})),n.driver={src:e.src||e.currentSrc||"data:",muted:!0,paused:!0,pause:function(){n.driver.paused=!0},play:function(){n.driver.paused=!1,b(n)&&y(e,0)},get ended(){return b(n)}}),e.addEventListener("emptied",(function(){var r=!n.driver.src||"data:"===n.driver.src;n.driver.src&&n.driver.src!==e.src&&(y(e,0,!0),n.driver.src=e.src,r||!t&&e.autoplay?n.driver.play():n.updater.stop())}),!1),e.addEventListener("webkitbeginfullscreen",(function(){e.paused?t&&0===n.driver.buffered.length&&n.driver.load():(e.pause(),e[f]())})),t&&(e.addEventListener("webkitendfullscreen",(function(){n.driver.currentTime=e.currentTime})),e.addEventListener("seeking",(function(){p.indexOf(100*e.currentTime|0)<0&&(n.driver.currentTime=e.currentTime)})))}function _(e){var t=e[l];return delete e[l],!e.webkitDisplayingFullscreen&&!t}t.exports=function(e,t){if(void 0===t&&(t={}),!e[c]){if(!t.everywhere){if(!u)return;if(!(t.iPad||t.ipad?/iPhone|iPod|iPad/:/iPhone|iPod/).test(navigator.userAgent))return}e.pause();var n=e.autoplay;e.autoplay=!1,E(e,!e.muted),function(e){var t=e[c];e[f]=e.play,e[d]=e.pause,e.play=v,e.pause=w,o(e,"paused",t.driver),o(e,"muted",t.driver,!0),o(e,"playbackRate",t.driver,!0),o(e,"ended",t.driver),o(e,"loop",t.driver,!0),i(e,"seeking",(function(e){return!e.webkitDisplayingFullscreen})),i(e,"seeked",(function(e){return!e.webkitDisplayingFullscreen})),i(e,"timeupdate",_),i(e,"ended",_)}(e),e.classList.add("IIV"),e.muted&&n&&(e.play(),e.addEventListener("playing",(function t(){e.autoplay=!0,e.removeEventListener("playing",t)}))),/iPhone|iPod|iPad/.test(navigator.platform)||console.warn("iphone-inline-video is not guaranteed to work in emulated environments")}}},{intervalometer:66}],68:[function(e,t,n){"use strict";t.exports=Number.isFinite||function(e){return!("number"!=typeof e||e!=e||e===1/0||e===-1/0)}},{}],69:[function(e,t,n){t.exports=function(e){return 0!==e&&!(e&e-1)}},{}],70:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],71:[function(e,t,n){"use strict";t.exports=function(e){var t,n={};if(!(e instanceof Object)||Array.isArray(e))throw new Error("keyMirror(...): Argument must be an object.");for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n}},{}],72:[function(e,t,n){"use strict";var r=e("is-finite");t.exports=Number.isInteger||function(e){return r(e)&&Math.floor(e)===e}},{"is-finite":68}],73:[function(e,t,n){(function(n){(function(){var r="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"==typeof i.get?i.get:null,a=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,m=Object.prototype.toString,y=Function.prototype.toString,b=String.prototype.match,g=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,E=String.prototype.toLowerCase,_=RegExp.prototype.test,R=Array.prototype.concat,S=Array.prototype.join,A=Array.prototype.slice,O=Math.floor,k="function"==typeof BigInt?BigInt.prototype.valueOf:null,T=Object.getOwnPropertySymbols,x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,j="function"==typeof Symbol&&"object"==typeof Symbol.iterator,M="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===j||"symbol")?Symbol.toStringTag:null,C=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function D(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||_.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-O(-e):O(e);if(r!==e){var i=String(r),o=g.call(t,i.length+1);return v.call(i,n,"$&_")+"."+v.call(v.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(t,n,"$&_")}var I=e("./util.inspect"),L=I.custom,P=q(L)?L:null;function B(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function U(e){return v.call(String(e),/"/g,"&quot;")}function F(e){return!("[object Array]"!==z(e)||M&&"object"==typeof e&&M in e)}function W(e){return!("[object RegExp]"!==z(e)||M&&"object"==typeof e&&M in e)}function q(e){if(j)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!x)return!1;try{return x.call(e),!0}catch(e){}return!1}t.exports=function e(t,r,i,s){var u=r||{};if(V(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(u,"maxStringLength")&&("number"==typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!V(u,"customInspect")||u.customInspect;if("boolean"!=typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(u,"numericSeparator")&&"boolean"!=typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var w=u.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return $(t,u);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var _=String(t);return w?D(t,_):_}if("bigint"==typeof t){var O=String(t)+"n";return w?D(t,O):O}var T=void 0===u.depth?5:u.depth;if(void 0===i&&(i=0),i>=T&&T>0&&"object"==typeof t)return F(t)?"[Array]":"[Object]";var L=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=S.call(Array(e.indent+1)," ")}return{base:n,prev:S.call(Array(t+1),n)}}(u,i);if(void 0===s)s=[];else if(G(s,t)>=0)return"[Circular]";function H(t,n,r){if(n&&(s=A.call(s)).push(n),r){var o={depth:u.depth};return V(u,"quoteStyle")&&(o.quoteStyle=u.quoteStyle),e(t,o,i+1,s)}return e(t,u,i+1,s)}if("function"==typeof t&&!W(t)){var Y=function(e){if(e.name)return e.name;var t=b.call(y.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=Z(t,H);return"[Function"+(Y?": "+Y:" (anonymous)")+"]"+(ee.length>0?" { "+S.call(ee,", ")+" }":"")}if(q(t)){var te=j?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):x.call(t);return"object"!=typeof t||j?te:K(te)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var ne="<"+E.call(String(t.nodeName)),re=t.attributes||[],ie=0;ie<re.length;ie++)ne+=" "+re[ie].name+"="+B(U(re[ie].value),"double",u);return ne+=">",t.childNodes&&t.childNodes.length&&(ne+="..."),ne+="</"+E.call(String(t.nodeName))+">"}if(F(t)){if(0===t.length)return"[]";var oe=Z(t,H);return L&&!function(e){for(var t=0;t<e.length;t++)if(G(e[t],"\n")>=0)return!1;return!0}(oe)?"["+Q(oe,L)+"]":"[ "+S.call(oe,", ")+" ]"}if(function(e){return!("[object Error]"!==z(e)||M&&"object"==typeof e&&M in e)}(t)){var ae=Z(t,H);return"cause"in Error.prototype||!("cause"in t)||C.call(t,"cause")?0===ae.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(ae,", ")+" }":"{ ["+String(t)+"] "+S.call(R.call("[cause]: "+H(t.cause),ae),", ")+" }"}if("object"==typeof t&&m){if(P&&"function"==typeof t[P]&&I)return I(t,{depth:T-i});if("symbol"!==m&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var se=[];return a&&a.call(t,(function(e,n){se.push(H(n,t,!0)+" => "+H(e,t))})),X("Map",o.call(t),se,L)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{o.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ue=[];return l&&l.call(t,(function(e){ue.push(H(e,t))})),X("Set",c.call(t),ue,L)}if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return J("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return J("WeakSet");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{return h.call(e),!0}catch(e){}return!1}(t))return J("WeakRef");if(function(e){return!("[object Number]"!==z(e)||M&&"object"==typeof e&&M in e)}(t))return K(H(Number(t)));if(function(e){if(!e||"object"!=typeof e||!k)return!1;try{return k.call(e),!0}catch(e){}return!1}(t))return K(H(k.call(t)));if(function(e){return!("[object Boolean]"!==z(e)||M&&"object"==typeof e&&M in e)}(t))return K(p.call(t));if(function(e){return!("[object String]"!==z(e)||M&&"object"==typeof e&&M in e)}(t))return K(H(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==n&&t===n)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==z(e)||M&&"object"==typeof e&&M in e)}(t)&&!W(t)){var ce=Z(t,H),le=N?N(t)===Object.prototype:t instanceof Object||t.constructor===Object,fe=t instanceof Object?"":"null prototype",de=!le&&M&&Object(t)===t&&M in t?g.call(z(t),8,-1):fe?"Object":"",he=(le||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(de||fe?"["+S.call(R.call([],de||[],fe||[]),": ")+"] ":"");return 0===ce.length?he+"{}":L?he+"{"+Q(ce,L)+"}":he+"{ "+S.call(ce,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function V(e,t){return H.call(e,t)}function z(e){return m.call(e)}function G(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function $(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return $(g.call(e,0,t.maxStringLength),t)+r}return B(v.call(v.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",t)}function Y(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function K(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function X(e,t,n,r){return e+" ("+t+") {"+(r?Q(n,r):S.call(n,", "))+"}"}function Q(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+S.call(e,","+n)+"\n"+t.prev}function Z(e,t){var n=F(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=V(e,i)?t(e[i],e):""}var o,a="function"==typeof T?T(e):[];if(j){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var u in e)V(e,u)&&(n&&String(Number(u))===u&&u<e.length||j&&o["$"+u]instanceof Symbol||(_.call(/[^\w$]/,u)?r.push(t(u,e)+": "+t(e[u],e)):r.push(u+": "+t(e[u],e))));if("function"==typeof T)for(var c=0;c<a.length;c++)C.call(e,a[c])&&r.push("["+t(a[c])+"]: "+t(e[a[c]],e));return r}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./util.inspect":13}],74:[function(e,t,n){var r=e("wrappy");function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}t.exports=r(i),t.exports.strict=r(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},{wrappy:116}],75:[function(e,t,n){(function(e){(function(){(function(){var n,r,i,o,a,s;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:null!=e&&e.hrtime?(t.exports=function(){return(n()-a)/1e6},r=e.hrtime,o=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),s=1e9*e.uptime(),a=o-s):Date.now?(t.exports=function(){return Date.now()-i},i=Date.now()):(t.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(this)}).call(this,e("_process"))},{_process:77}],76:[function(e,t,n){(function(e){(function(){"use strict";void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,n)}));case 3:return e.nextTick((function(){t.call(null,n,r)}));case 4:return e.nextTick((function(){t.call(null,n,r,i)}));default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return e.nextTick((function(){t.apply(null,o)}))}}}:t.exports=e}).call(this)}).call(this,e("_process"))},{_process:77}],77:[function(e,t,n){var r,i,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,l=[],f=!1,d=-1;function h(){f&&c&&(f=!1,c.length?l=c.concat(l):d=-1,l.length&&p())}function p(){if(!f){var e=u(h);f=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,f=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{return i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function y(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new m(e,t)),1!==l.length||f||u(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],78:[function(e,t,n){"use strict";var r=String.prototype.replace,i=/%20/g,o="RFC1738",a="RFC3986";t.exports={default:a,formatters:{RFC1738:function(e){return r.call(e,i,"+")},RFC3986:function(e){return String(e)}},RFC1738:o,RFC3986:a}},{}],79:[function(e,t,n){"use strict";var r=e("./stringify"),i=e("./parse"),o=e("./formats");t.exports={formats:o,parse:i,stringify:r}},{"./formats":78,"./parse":80,"./stringify":81}],80:[function(e,t,n){"use strict";var r=e("./utils"),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=s?o.slice(0,s.index):o,l=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}for(var f=0;n.depth>0&&null!==(s=a.exec(o))&&f<n.depth;){if(f+=1,!n.plainObjects&&i.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+o.slice(s.index)+"]"),function(e,t,n,r){for(var i=r?t:u(t,n),o=e.length-1;o>=0;--o){var a,s=e[o];if("[]"===s&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(c,10);n.parseArrays||""!==c?!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(a=[])[l]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(l,t,n,r)}};t.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var n,c={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=l.split(t.delimiter,f),h=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n<d.length;++n)0===d[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[n]?p="utf-8":"utf8=%26%2310003%3B"===d[n]&&(p="iso-8859-1"),h=n,n=d.length);for(n=0;n<d.length;++n)if(n!==h){var m,y,b=d[n],g=b.indexOf("]="),v=-1===g?b.indexOf("="):g+1;-1===v?(m=t.decoder(b,a.decoder,p,"key"),y=t.strictNullHandling?null:""):(m=t.decoder(b.slice(0,v),a.decoder,p,"key"),y=r.maybeMap(u(b.slice(v+1),t),(function(e){return t.decoder(e,a.decoder,p,"value")}))),y&&t.interpretNumericEntities&&"iso-8859-1"===p&&(y=s(y)),b.indexOf("[]=")>-1&&(y=o(y)?[y]:y),i.call(c,m)?c[m]=r.combine(c[m],y):c[m]=y}return c}(e,n):e,f=n.plainObjects?Object.create(null):{},d=Object.keys(l),h=0;h<d.length;++h){var p=d[h],m=c(p,l[p],n,"string"==typeof e);f=r.merge(f,m,n)}return!0===n.allowSparse?f:r.compact(f)}},{"./utils":82}],81:[function(e,t,n){"use strict";var r=e("side-channel"),i=e("./utils"),o=e("./formats"),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,c=String.prototype.split,l=Array.prototype.push,f=function(e,t){l.apply(e,u(t)?t:[t])},d=Date.prototype.toISOString,h=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:h,formatter:o.formatters[h],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},m={},y=function e(t,n,o,a,s,l,d,h,y,b,g,v,w,E,_,R){for(var S,A=t,O=R,k=0,T=!1;void 0!==(O=O.get(m))&&!T;){var x=O.get(t);if(k+=1,void 0!==x){if(x===k)throw new RangeError("Cyclic object value");T=!0}void 0===O.get(m)&&(k=0)}if("function"==typeof h?A=h(n,A):A instanceof Date?A=g(A):"comma"===o&&u(A)&&(A=i.maybeMap(A,(function(e){return e instanceof Date?g(e):e}))),null===A){if(s)return d&&!E?d(n,p.encoder,_,"key",v):n;A=""}if("string"==typeof(S=A)||"number"==typeof S||"boolean"==typeof S||"symbol"==typeof S||"bigint"==typeof S||i.isBuffer(A)){if(d){var j=E?n:d(n,p.encoder,_,"key",v);if("comma"===o&&E){for(var M=c.call(String(A),","),C="",N=0;N<M.length;++N)C+=(0===N?"":",")+w(d(M[N],p.encoder,_,"value",v));return[w(j)+(a&&u(A)&&1===M.length?"[]":"")+"="+C]}return[w(j)+"="+w(d(A,p.encoder,_,"value",v))]}return[w(n)+"="+w(String(A))]}var D,I=[];if(void 0===A)return I;if("comma"===o&&u(A))D=[{value:A.length>0?A.join(",")||null:void 0}];else if(u(h))D=h;else{var L=Object.keys(A);D=y?L.sort(y):L}for(var P=a&&u(A)&&1===A.length?n+"[]":n,B=0;B<D.length;++B){var U=D[B],F="object"==typeof U&&void 0!==U.value?U.value:A[U];if(!l||null!==F){var W=u(A)?"function"==typeof o?o(P,U):P:P+(b?"."+U:"["+U+"]");R.set(t,k);var q=r();q.set(m,R),f(I,e(F,W,o,a,s,l,d,h,y,b,g,v,w,E,_,q))}}return I};t.exports=function(e,t){var n,i=e,c=function(e){if(!e)return p;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==e.format){if(!a.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=o.formatters[n],i=p.filter;return("function"==typeof e.filter||u(e.filter))&&(i=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:void 0===e.allowDots?p.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,delimiter:void 0===e.delimiter?p.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:p.encode,encoder:"function"==typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(t);"function"==typeof c.filter?i=(0,c.filter)("",i):u(c.filter)&&(n=c.filter);var l,d=[];if("object"!=typeof i||null===i)return"";l=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var h=s[l];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var m="comma"===h&&t&&t.commaRoundTrip;n||(n=Object.keys(i)),c.sort&&n.sort(c.sort);for(var b=r(),g=0;g<n.length;++g){var v=n[g];c.skipNulls&&null===i[v]||f(d,y(i[v],v,h,m,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,b))}var w=d.join(c.delimiter),E=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?E+="utf8=%26%2310003%3B&":E+="utf8=%E2%9C%93&"),w.length>0?E+w:""}},{"./formats":78,"./utils":82,"side-channel":101}],82:[function(e,t,n){"use strict";var r=e("./formats"),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};t.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var i=t[r],a=i.obj[i.prop],s=Object.keys(a),u=0;u<s.length;++u){var c=s[u],l=a[c];"object"==typeof l&&null!==l&&-1===n.indexOf(l)&&(t.push({obj:a,prop:c}),n.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)void 0!==n[i]&&r.push(n[i]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n,i,o){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var u="",c=0;c<s.length;++c){var l=s.charCodeAt(c);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===r.RFC1738&&(40===l||41===l)?u+=s.charAt(c):l<128?u+=a[l]:l<2048?u+=a[192|l>>6]+a[128|63&l]:l<55296||l>=57344?u+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l]:(c+=1,l=65536+((1023&l)<<10|1023&s.charCodeAt(c)),u+=a[240|l>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l])}return u},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(o(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!i.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var a=t;return o(t)&&!o(n)&&(a=s(t,r)),o(t)&&o(n)?(n.forEach((function(n,o){if(i.call(t,o)){var a=t[o];a&&"object"==typeof a&&n&&"object"==typeof n?t[o]=e(a,n,r):t.push(n)}else t[o]=n})),t):Object.keys(n).reduce((function(t,o){var a=n[o];return i.call(t,o)?t[o]=e(t[o],a,r):t[o]=a,t}),a)}}},{"./formats":78}],83:[function(e,t,n){(function(n){(function(){for(var r=e("performance-now"),i="undefined"==typeof window?n:window,o=["moz","webkit"],a="AnimationFrame",s=i["request"+a],u=i["cancel"+a]||i["cancelRequest"+a],c=0;!s&&c<o.length;c++)s=i[o[c]+"Request"+a],u=i[o[c]+"Cancel"+a]||i[o[c]+"CancelRequest"+a];if(!s||!u){var l=0,f=0,d=[],h=1e3/60;s=function(e){if(0===d.length){var t=r(),n=Math.max(0,h-(t-l));l=n+t,setTimeout((function(){var e=d.slice(0);d.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(l)}catch(e){setTimeout((function(){throw e}),0)}}),Math.round(n))}return d.push({handle:++f,callback:e,cancelled:!1}),f},u=function(e){for(var t=0;t<d.length;t++)d[t].handle===e&&(d[t].cancelled=!0)}}t.exports=function(e){return s.call(i,e)},t.exports.cancel=function(){u.apply(i,arguments)},t.exports.polyfill=function(e){e||(e=i),e.requestAnimationFrame=s,e.cancelAnimationFrame=u}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"performance-now":75}],84:[function(e,t,n){"use strict";var r=e("process-nextick-args"),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=f;var o=Object.create(e("core-util-is"));o.inherits=e("inherits");var a=e("./_stream_readable"),s=e("./_stream_writable");o.inherits(f,a);for(var u=i(s.prototype),c=0;c<u.length;c++){var l=u[c];f.prototype[l]||(f.prototype[l]=s.prototype[l])}function f(e){if(!(this instanceof f))return new f(e);a.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",d)}function d(){this.allowHalfOpen||this._writableState.ended||r.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},{"./_stream_readable":86,"./_stream_writable":88,"core-util-is":23,inherits:64,"process-nextick-args":76}],85:[function(e,t,n){"use strict";t.exports=o;var r=e("./_stream_transform"),i=Object.create(e("core-util-is"));function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=e("inherits"),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},{"./_stream_transform":87,"core-util-is":23,inherits:64}],86:[function(e,t,n){(function(n,r){(function(){"use strict";var i=e("process-nextick-args");t.exports=v;var o,a=e("isarray");v.ReadableState=g;e("events").EventEmitter;var s=function(e,t){return e.listeners(t).length},u=e("./internal/streams/stream"),c=e("safe-buffer").Buffer,l=(void 0!==r?r:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var f=Object.create(e("core-util-is"));f.inherits=e("inherits");var d=e("util"),h=void 0;h=d&&d.debuglog?d.debuglog("stream"):function(){};var p,m=e("./internal/streams/BufferList"),y=e("./internal/streams/destroy");f.inherits(v,u);var b=["error","close","destroy","pause","resume"];function g(t,n){t=t||{};var r=n instanceof(o=o||e("./_stream_duplex"));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=e("string_decoder/").StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function v(t){if(o=o||e("./_stream_duplex"),!(this instanceof v))return new v(t);this._readableState=new g(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(e,t,n,r,i){var o,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,S(e)}(e,a)):(i||(o=function(e,t){var n;r=t,c.isBuffer(r)||r instanceof l||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):E(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?E(e,a,t,!1):O(e,a)):E(e,a,t,!1))):r||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function E(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&S(e)),O(e,t)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(e,t){this.push(null),t(e)},v.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=c.from(e,t),t=""),n=!0),w(this,e,t,!1,n)},v.prototype.unshift=function(e){return w(this,e,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(t){return p||(p=e("string_decoder/").StringDecoder),this._readableState.decoder=new p(t),this._readableState.encoding=t,this};var _=8388608;function R(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(A,e):A(e))}function A(e){h("emit readable"),e.emit("readable"),j(e)}function O(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(k,e,t))}function k(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(h("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function T(e){h("readable nexttick read 0"),e.read(0)}function x(e,t){t.reading||(h("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(h("flow",t.flowing);t.flowing&&null!==e.read(););}function M(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;e-=i.length;for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),0===(e-=a)){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function C(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(N,t,e))}function N(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function D(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}v.prototype.read=function(e){h("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?C(this):S(this),null;if(0===(e=R(e,t))&&t.ended)return 0===t.length&&C(this),null;var r,i=t.needReadable;return h("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&h("length less than watermark",i=!0),t.ended||t.reading?h("reading or ended",i=!1):i&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=R(n,t))),null===(r=e>0?M(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&C(this)),null!==r&&this.emit("data",r),r},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,h("pipe count=%d opts=%j",o.pipesCount,t);var u=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?l:v;function c(t,n){h("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,h("cleanup"),e.removeListener("close",b),e.removeListener("finish",g),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",c),r.removeListener("end",l),r.removeListener("end",v),r.removeListener("data",m),d=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){h("onend"),e.end()}o.endEmitted?i.nextTick(u):r.once("end",u),e.on("unpipe",c);var f=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,j(e))}}(r);e.on("drain",f);var d=!1;var p=!1;function m(t){h("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==D(o.pipes,e))&&!d&&(h("false write response, pause",o.awaitDrain),o.awaitDrain++,p=!0),r.pause())}function y(t){h("onerror",t),v(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",g),v()}function g(){h("onfinish"),e.removeListener("close",b),v()}function v(){h("unpipe"),r.unpipe(e)}return r.on("data",m),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",y),e.once("close",b),e.once("finish",g),e.emit("pipe",r),o.flowing||(h("pipe resume"),r.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=D(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},v.prototype.on=function(e,t){var n=u.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&S(this):i.nextTick(T,this))}return n},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(x,e,t))}(this,e)),this},v.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(h("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(h("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<b.length;o++)e.on(b[o],this.emit.bind(this,b[o]));return this._read=function(t){h("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=M}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":84,"./internal/streams/BufferList":89,"./internal/streams/destroy":90,"./internal/streams/stream":91,_process:77,"core-util-is":23,events:42,inherits:64,isarray:70,"process-nextick-args":76,"safe-buffer":92,"string_decoder/":93,util:13}],87:[function(e,t,n){"use strict";t.exports=a;var r=e("./_stream_duplex"),i=Object.create(e("core-util-is"));function o(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);r.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"==typeof this._flush?this._flush((function(t,n){u(e,t,n)})):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=e("inherits"),i.inherits(a,r),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,(function(e){t(e),n.emit("close")}))}},{"./_stream_duplex":84,"core-util-is":23,inherits:64}],88:[function(e,t,n){(function(n,r,i){(function(){"use strict";var o=e("process-nextick-args");function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}t.exports=g;var s,u=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?i:o.nextTick;g.WritableState=b;var c=Object.create(e("core-util-is"));c.inherits=e("inherits");var l={deprecate:e("util-deprecate")},f=e("./internal/streams/stream"),d=e("safe-buffer").Buffer,h=(void 0!==r?r:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var p,m=e("./internal/streams/destroy");function y(){}function b(t,n){s=s||e("./_stream_duplex"),t=t||{};var r=n instanceof s;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===t.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(o.nextTick(i,r),o.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),S(e,t))}(e,n,r,t,i);else{var a=_(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||E(e,n),r?u(w,e,n,a,i):w(e,n,a,i)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function g(t){if(s=s||e("./_stream_duplex"),!(p.call(g,this)||this instanceof s))return new g(t);this._writableState=new b(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),f.call(this)}function v(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function w(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),S(e,t)}function E(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var s=0,u=!0;n;)i[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;i.allBuffers=u,v(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,l=n.encoding,f=n.callback;if(v(e,t,!1,t.objectMode?1:c.length,c,l,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function R(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),S(e,t)}))}function S(e,t){var n=_(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(R,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}c.inherits(g,f),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(b.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===g&&(e&&e._writableState instanceof b)}})):p=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,n){var r,i=this._writableState,a=!1,s=!i.objectMode&&(r=e,d.isBuffer(r)||r instanceof h);return s&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=y),i.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),o.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),o.nextTick(r,a),i=!1),i}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,n));return t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else v(e,t,!1,s,r,i,o);return u}(this,i,s,e,t,n)),a},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||E(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,S(e,t),n&&(t.finished?o.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=m.destroy,g.prototype._undestroy=m.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{"./_stream_duplex":84,"./internal/streams/destroy":90,"./internal/streams/stream":91,_process:77,"core-util-is":23,inherits:64,"process-nextick-args":76,"safe-buffer":92,timers:108,"util-deprecate":111}],89:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer,i=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);for(var t,n,i,o=r.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=o,i=s,t.copy(n,i),s+=a.data.length,a=a.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":92,util:13}],90:[function(e,t,n){"use strict";var r=e("process-nextick-args");function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var n=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(i,this,e)):r.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,r.nextTick(i,n,e)):r.nextTick(i,n,e):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":76}],91:[function(e,t,n){t.exports=e("events").EventEmitter},{events:42}],92:[function(e,t,n){var r=e("buffer"),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,n),n.Buffer=a),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{buffer:15}],93:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function l(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}n.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=a(t[r]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if(i=a(t[r]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if(i=a(t[r]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":92}],94:[function(e,t,n){(n=t.exports=e("./lib/_stream_readable.js")).Stream=n,n.Readable=n,n.Writable=e("./lib/_stream_writable.js"),n.Duplex=e("./lib/_stream_duplex.js"),n.Transform=e("./lib/_stream_transform.js"),n.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":84,"./lib/_stream_passthrough.js":85,"./lib/_stream_readable.js":86,"./lib/_stream_transform.js":87,"./lib/_stream_writable.js":88}],95:[function(e,t,n){"use strict";var r=t.exports=e("./readystate"),i=new Function("return this")(),o="complete",a=!0,s=i?i.document:null,u=s?s.documentElement:null,c=function(){return s?s.readyState:null};!function(){if(o===c())return r.change(o);var e=s&&!!s.addEventListener,t=e?"":"on",n=e?"addEventListener":"attachEvent",l=e?"removeEventListener":"detachEvent",f=u?u.doScroll:null;if(!e&&"function"==typeof f){try{a=!i.frameElement}catch(e){}a&&function e(){try{f("left")}catch(t){return setTimeout(e,50)}r.change("interactive")}()}function d(e){"readystatechange"===(e=e||i.event).type&&(r.change(c()),o!==c())||("load"===e.type?r.change("complete"):r.change("interactive"),("load"===e.type?i:s)[l](e.type,d,!1))}s[n](t+"DOMContentLoaded",d,!1),s[n](t+"readystatechange",d,!1),i[n](t+"load",d,!1)}()},{"./readystate":96}],96:[function(e,t,n){"use strict";function r(e){return function(t,n){var r=this;return r.is(e)?setTimeout((function(){t.call(n,r.readyState)}),0):(r._events[e]||(r._events[e]=[]),r._events[e].push({fn:t,context:n})),r}}function i(){this.readyState=i.UNKNOWN,this._events={}}i.states="ALL,UNKNOWN,LOADING,INTERACTIVE,COMPLETE".split(",");for(var o,a=0;a<i.states.length;a++)i[o=i.states[a]]=i.prototype[o]=a,i.prototype[o.toLowerCase()]=r(o);i.prototype.change=function(e){e=this.clean(e,!0);var t,n,r,o=0,a=this,s=a.readyState;if(s>=e)return a;for(a.readyState=e;o<i.states.length&&!(o>e);o++)if((n=i.states[o])in a._events){for(t=0;t<a._events[n].length;t++)(r=a._events[n][t]).fn.call(r.context||a,s);delete a._events[n]}return a},i.prototype.is=function(e){return this.readyState>=this.clean(e,!0)},i.prototype.clean=function(e,t){var n=typeof e;return t?"number"!==n?+i[e.toUpperCase()]||0:e:("number"===n?i.states[e]:e).toUpperCase()},i.prototype.removeAllListeners=function(){return this._events={},this},t.exports=new i},{}],97:[function(e,t,n){
31
+ "use strict";var r=e("intervalometer");function i(e,t,n){function r(r){n&&!n(e,t)||r.stopImmediatePropagation()}return e.addEventListener(t,r),r}function o(e,t,n,r){function i(e){n[t]=e}r&&i(e[t]),Object.defineProperty(e,t,{get:function(){return n[t]},set:i})}function a(e,t,n){n.addEventListener(t,(function(){return e.dispatchEvent(new Event(t))}))}function s(e,t){Promise.resolve().then((function(){e.dispatchEvent(new Event(t))}))}var u="object"==typeof document&&"object-fit"in document.head.style&&!matchMedia("(-webkit-video-playable-inline)").matches,c="bfred-it:iphone-inline-video",l="bfred-it:iphone-inline-video:event",f="bfred-it:iphone-inline-video:nativeplay",d="bfred-it:iphone-inline-video:nativepause";var h,p=[],m=0;function y(e,t,n){(h||0)+200<Date.now()&&(e[l]=!0,h=Date.now()),n||(e.currentTime=t),p[++m%3]=100*t|0}function b(e){return e.driver.currentTime>=e.video.duration}function g(e){var t=this;t.video.readyState>=t.video.HAVE_FUTURE_DATA?(t.hasAudio||(t.driver.currentTime=t.video.currentTime+e*t.video.playbackRate/1e3,t.video.loop&&b(t)&&(t.driver.currentTime=0)),y(t.video,t.driver.currentTime)):t.video.networkState===t.video.NETWORK_IDLE&&0===t.video.buffered.length&&t.video.load(),t.video.ended&&(delete t.video[l],t.video.pause(!0))}function v(){var e=this,t=e[c];e.webkitDisplayingFullscreen?e[f]():("data:"!==t.driver.src&&t.driver.src!==e.src&&(y(e,0,!0),t.driver.src=e.src),e.paused&&(t.paused=!1,0===e.buffered.length&&e.load(),t.driver.play(),t.updater.start(),t.hasAudio||(s(e,"play"),t.video.readyState>=t.video.HAVE_ENOUGH_DATA&&s(e,"playing"))))}function w(e){var t=this,n=t[c];n.driver.pause(),n.updater.stop(),t.webkitDisplayingFullscreen&&t[d](),n.paused&&!e||(n.paused=!0,n.hasAudio||s(t,"pause"),t.ended&&!t.webkitDisplayingFullscreen&&(t[l]=!0,s(t,"ended")))}function E(e,t){var n={};e[c]=n,n.paused=!0,n.hasAudio=t,n.video=e,n.updater=r.frameIntervalometer(g.bind(n)),t?n.driver=function(e){var t=new Audio;return a(e,"play",t),a(e,"playing",t),a(e,"pause",t),t.crossOrigin=e.crossOrigin,t.src=e.src||e.currentSrc||"data:",t}(e):(e.addEventListener("canplay",(function(){e.paused||s(e,"playing")})),n.driver={src:e.src||e.currentSrc||"data:",muted:!0,paused:!0,pause:function(){n.driver.paused=!0},play:function(){n.driver.paused=!1,b(n)&&y(e,0)},get ended(){return b(n)}}),e.addEventListener("emptied",(function(){var r=!n.driver.src||"data:"===n.driver.src;n.driver.src&&n.driver.src!==e.src&&(y(e,0,!0),n.driver.src=e.src,r||!t&&e.autoplay?n.driver.play():n.updater.stop())}),!1),e.addEventListener("webkitbeginfullscreen",(function(){e.paused?t&&0===n.driver.buffered.length&&n.driver.load():(e.pause(),e[f]())})),t&&(e.addEventListener("webkitendfullscreen",(function(){n.driver.currentTime=e.currentTime})),e.addEventListener("seeking",(function(){p.indexOf(100*e.currentTime|0)<0&&(n.driver.currentTime=e.currentTime)})))}function _(e){var t=e[l];return delete e[l],!e.webkitDisplayingFullscreen&&!t}t.exports=function(e,t){if(void 0===t&&(t={}),!e[c]){if(!t.everywhere){if(!u)return;if(!(t.iPad||t.ipad?/iPhone|iPod|iPad/:/iPhone|iPod/).test(navigator.userAgent))return}e.pause();var n=e.autoplay;e.autoplay=!1,E(e,!e.muted),function(e){var t=e[c];e[f]=e.play,e[d]=e.pause,e.play=v,e.pause=w,o(e,"paused",t.driver),o(e,"muted",t.driver,!0),o(e,"playbackRate",t.driver,!0),o(e,"ended",t.driver),o(e,"loop",t.driver,!0),i(e,"seeking",(function(e){return!e.webkitDisplayingFullscreen})),i(e,"seeked",(function(e){return!e.webkitDisplayingFullscreen})),i(e,"timeupdate",_),i(e,"ended",_)}(e),e.classList.add("IIV"),e.muted&&n&&(e.play(),e.addEventListener("playing",(function t(){e.autoplay=!0,e.removeEventListener("playing",t)}))),/iPhone|iPod|iPad/.test(navigator.platform)||console.warn("iphone-inline-video is not guaranteed to work in emulated environments")}}},{intervalometer:66}],68:[function(e,t,n){"use strict";t.exports=Number.isFinite||function(e){return!("number"!=typeof e||e!=e||e===1/0||e===-1/0)}},{}],69:[function(e,t,n){t.exports=function(e){return 0!==e&&!(e&e-1)}},{}],70:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],71:[function(e,t,n){"use strict";t.exports=function(e){var t,n={};if(!(e instanceof Object)||Array.isArray(e))throw new Error("keyMirror(...): Argument must be an object.");for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n}},{}],72:[function(e,t,n){"use strict";var r=e("is-finite");t.exports=Number.isInteger||function(e){return r(e)&&Math.floor(e)===e}},{"is-finite":68}],73:[function(e,t,n){(function(n){(function(){var r="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"==typeof i.get?i.get:null,a=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,m=Object.prototype.toString,y=Function.prototype.toString,b=String.prototype.match,g=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,E=String.prototype.toLowerCase,_=RegExp.prototype.test,R=Array.prototype.concat,S=Array.prototype.join,A=Array.prototype.slice,O=Math.floor,k="function"==typeof BigInt?BigInt.prototype.valueOf:null,T=Object.getOwnPropertySymbols,x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,j="function"==typeof Symbol&&"object"==typeof Symbol.iterator,M="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===j||"symbol")?Symbol.toStringTag:null,C=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function D(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||_.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-O(-e):O(e);if(r!==e){var i=String(r),o=g.call(t,i.length+1);return v.call(i,n,"$&_")+"."+v.call(v.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(t,n,"$&_")}var I=e("./util.inspect"),L=I.custom,P=q(L)?L:null;function B(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function U(e){return v.call(String(e),/"/g,"&quot;")}function F(e){return!("[object Array]"!==z(e)||M&&"object"==typeof e&&M in e)}function W(e){return!("[object RegExp]"!==z(e)||M&&"object"==typeof e&&M in e)}function q(e){if(j)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!x)return!1;try{return x.call(e),!0}catch(e){}return!1}t.exports=function e(t,r,i,s){var u=r||{};if(V(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(u,"maxStringLength")&&("number"==typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!V(u,"customInspect")||u.customInspect;if("boolean"!=typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(u,"numericSeparator")&&"boolean"!=typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var w=u.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return $(t,u);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var _=String(t);return w?D(t,_):_}if("bigint"==typeof t){var O=String(t)+"n";return w?D(t,O):O}var T=void 0===u.depth?5:u.depth;if(void 0===i&&(i=0),i>=T&&T>0&&"object"==typeof t)return F(t)?"[Array]":"[Object]";var L=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=S.call(Array(e.indent+1)," ")}return{base:n,prev:S.call(Array(t+1),n)}}(u,i);if(void 0===s)s=[];else if(G(s,t)>=0)return"[Circular]";function H(t,n,r){if(n&&(s=A.call(s)).push(n),r){var o={depth:u.depth};return V(u,"quoteStyle")&&(o.quoteStyle=u.quoteStyle),e(t,o,i+1,s)}return e(t,u,i+1,s)}if("function"==typeof t&&!W(t)){var Y=function(e){if(e.name)return e.name;var t=b.call(y.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=Z(t,H);return"[Function"+(Y?": "+Y:" (anonymous)")+"]"+(ee.length>0?" { "+S.call(ee,", ")+" }":"")}if(q(t)){var te=j?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):x.call(t);return"object"!=typeof t||j?te:K(te)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var ne="<"+E.call(String(t.nodeName)),re=t.attributes||[],ie=0;ie<re.length;ie++)ne+=" "+re[ie].name+"="+B(U(re[ie].value),"double",u);return ne+=">",t.childNodes&&t.childNodes.length&&(ne+="..."),ne+="</"+E.call(String(t.nodeName))+">"}if(F(t)){if(0===t.length)return"[]";var oe=Z(t,H);return L&&!function(e){for(var t=0;t<e.length;t++)if(G(e[t],"\n")>=0)return!1;return!0}(oe)?"["+Q(oe,L)+"]":"[ "+S.call(oe,", ")+" ]"}if(function(e){return!("[object Error]"!==z(e)||M&&"object"==typeof e&&M in e)}(t)){var ae=Z(t,H);return"cause"in Error.prototype||!("cause"in t)||C.call(t,"cause")?0===ae.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(ae,", ")+" }":"{ ["+String(t)+"] "+S.call(R.call("[cause]: "+H(t.cause),ae),", ")+" }"}if("object"==typeof t&&m){if(P&&"function"==typeof t[P]&&I)return I(t,{depth:T-i});if("symbol"!==m&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var se=[];return a&&a.call(t,(function(e,n){se.push(H(n,t,!0)+" => "+H(e,t))})),X("Map",o.call(t),se,L)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{o.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ue=[];return l&&l.call(t,(function(e){ue.push(H(e,t))})),X("Set",c.call(t),ue,L)}if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return J("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return J("WeakSet");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{return h.call(e),!0}catch(e){}return!1}(t))return J("WeakRef");if(function(e){return!("[object Number]"!==z(e)||M&&"object"==typeof e&&M in e)}(t))return K(H(Number(t)));if(function(e){if(!e||"object"!=typeof e||!k)return!1;try{return k.call(e),!0}catch(e){}return!1}(t))return K(H(k.call(t)));if(function(e){return!("[object Boolean]"!==z(e)||M&&"object"==typeof e&&M in e)}(t))return K(p.call(t));if(function(e){return!("[object String]"!==z(e)||M&&"object"==typeof e&&M in e)}(t))return K(H(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==n&&t===n)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==z(e)||M&&"object"==typeof e&&M in e)}(t)&&!W(t)){var ce=Z(t,H),le=N?N(t)===Object.prototype:t instanceof Object||t.constructor===Object,fe=t instanceof Object?"":"null prototype",de=!le&&M&&Object(t)===t&&M in t?g.call(z(t),8,-1):fe?"Object":"",he=(le||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(de||fe?"["+S.call(R.call([],de||[],fe||[]),": ")+"] ":"");return 0===ce.length?he+"{}":L?he+"{"+Q(ce,L)+"}":he+"{ "+S.call(ce,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function V(e,t){return H.call(e,t)}function z(e){return m.call(e)}function G(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function $(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return $(g.call(e,0,t.maxStringLength),t)+r}return B(v.call(v.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",t)}function Y(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function K(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function X(e,t,n,r){return e+" ("+t+") {"+(r?Q(n,r):S.call(n,", "))+"}"}function Q(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+S.call(e,","+n)+"\n"+t.prev}function Z(e,t){var n=F(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=V(e,i)?t(e[i],e):""}var o,a="function"==typeof T?T(e):[];if(j){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var u in e)V(e,u)&&(n&&String(Number(u))===u&&u<e.length||j&&o["$"+u]instanceof Symbol||(_.call(/[^\w$]/,u)?r.push(t(u,e)+": "+t(e[u],e)):r.push(u+": "+t(e[u],e))));if("function"==typeof T)for(var c=0;c<a.length;c++)C.call(e,a[c])&&r.push("["+t(a[c])+"]: "+t(e[a[c]],e));return r}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./util.inspect":13}],74:[function(e,t,n){var r=e("wrappy");function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}t.exports=r(i),t.exports.strict=r(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},{wrappy:115}],75:[function(e,t,n){(function(e){(function(){(function(){var n,r,i,o,a,s;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:null!=e&&e.hrtime?(t.exports=function(){return(n()-a)/1e6},r=e.hrtime,o=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),s=1e9*e.uptime(),a=o-s):Date.now?(t.exports=function(){return Date.now()-i},i=Date.now()):(t.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(this)}).call(this,e("_process"))},{_process:77}],76:[function(e,t,n){(function(e){(function(){"use strict";void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,n)}));case 3:return e.nextTick((function(){t.call(null,n,r)}));case 4:return e.nextTick((function(){t.call(null,n,r,i)}));default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return e.nextTick((function(){t.apply(null,o)}))}}}:t.exports=e}).call(this)}).call(this,e("_process"))},{_process:77}],77:[function(e,t,n){var r,i,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,l=[],f=!1,d=-1;function h(){f&&c&&(f=!1,c.length?l=c.concat(l):d=-1,l.length&&p())}function p(){if(!f){var e=u(h);f=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,f=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{return i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function y(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new m(e,t)),1!==l.length||f||u(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],78:[function(e,t,n){"use strict";var r=String.prototype.replace,i=/%20/g,o="RFC1738",a="RFC3986";t.exports={default:a,formatters:{RFC1738:function(e){return r.call(e,i,"+")},RFC3986:function(e){return String(e)}},RFC1738:o,RFC3986:a}},{}],79:[function(e,t,n){"use strict";var r=e("./stringify"),i=e("./parse"),o=e("./formats");t.exports={formats:o,parse:i,stringify:r}},{"./formats":78,"./parse":80,"./stringify":81}],80:[function(e,t,n){"use strict";var r=e("./utils"),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=s?o.slice(0,s.index):o,l=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}for(var f=0;n.depth>0&&null!==(s=a.exec(o))&&f<n.depth;){if(f+=1,!n.plainObjects&&i.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+o.slice(s.index)+"]"),function(e,t,n,r){for(var i=r?t:u(t,n),o=e.length-1;o>=0;--o){var a,s=e[o];if("[]"===s&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(c,10);n.parseArrays||""!==c?!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(a=[])[l]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(l,t,n,r)}};t.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var n,c={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=l.split(t.delimiter,f),h=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n<d.length;++n)0===d[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[n]?p="utf-8":"utf8=%26%2310003%3B"===d[n]&&(p="iso-8859-1"),h=n,n=d.length);for(n=0;n<d.length;++n)if(n!==h){var m,y,b=d[n],g=b.indexOf("]="),v=-1===g?b.indexOf("="):g+1;-1===v?(m=t.decoder(b,a.decoder,p,"key"),y=t.strictNullHandling?null:""):(m=t.decoder(b.slice(0,v),a.decoder,p,"key"),y=r.maybeMap(u(b.slice(v+1),t),(function(e){return t.decoder(e,a.decoder,p,"value")}))),y&&t.interpretNumericEntities&&"iso-8859-1"===p&&(y=s(y)),b.indexOf("[]=")>-1&&(y=o(y)?[y]:y),i.call(c,m)?c[m]=r.combine(c[m],y):c[m]=y}return c}(e,n):e,f=n.plainObjects?Object.create(null):{},d=Object.keys(l),h=0;h<d.length;++h){var p=d[h],m=c(p,l[p],n,"string"==typeof e);f=r.merge(f,m,n)}return!0===n.allowSparse?f:r.compact(f)}},{"./utils":82}],81:[function(e,t,n){"use strict";var r=e("side-channel"),i=e("./utils"),o=e("./formats"),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,c=String.prototype.split,l=Array.prototype.push,f=function(e,t){l.apply(e,u(t)?t:[t])},d=Date.prototype.toISOString,h=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:h,formatter:o.formatters[h],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},m={},y=function e(t,n,o,a,s,l,d,h,y,b,g,v,w,E,_,R){for(var S,A=t,O=R,k=0,T=!1;void 0!==(O=O.get(m))&&!T;){var x=O.get(t);if(k+=1,void 0!==x){if(x===k)throw new RangeError("Cyclic object value");T=!0}void 0===O.get(m)&&(k=0)}if("function"==typeof h?A=h(n,A):A instanceof Date?A=g(A):"comma"===o&&u(A)&&(A=i.maybeMap(A,(function(e){return e instanceof Date?g(e):e}))),null===A){if(s)return d&&!E?d(n,p.encoder,_,"key",v):n;A=""}if("string"==typeof(S=A)||"number"==typeof S||"boolean"==typeof S||"symbol"==typeof S||"bigint"==typeof S||i.isBuffer(A)){if(d){var j=E?n:d(n,p.encoder,_,"key",v);if("comma"===o&&E){for(var M=c.call(String(A),","),C="",N=0;N<M.length;++N)C+=(0===N?"":",")+w(d(M[N],p.encoder,_,"value",v));return[w(j)+(a&&u(A)&&1===M.length?"[]":"")+"="+C]}return[w(j)+"="+w(d(A,p.encoder,_,"value",v))]}return[w(n)+"="+w(String(A))]}var D,I=[];if(void 0===A)return I;if("comma"===o&&u(A))D=[{value:A.length>0?A.join(",")||null:void 0}];else if(u(h))D=h;else{var L=Object.keys(A);D=y?L.sort(y):L}for(var P=a&&u(A)&&1===A.length?n+"[]":n,B=0;B<D.length;++B){var U=D[B],F="object"==typeof U&&void 0!==U.value?U.value:A[U];if(!l||null!==F){var W=u(A)?"function"==typeof o?o(P,U):P:P+(b?"."+U:"["+U+"]");R.set(t,k);var q=r();q.set(m,R),f(I,e(F,W,o,a,s,l,d,h,y,b,g,v,w,E,_,q))}}return I};t.exports=function(e,t){var n,i=e,c=function(e){if(!e)return p;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==e.format){if(!a.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=o.formatters[n],i=p.filter;return("function"==typeof e.filter||u(e.filter))&&(i=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:void 0===e.allowDots?p.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,delimiter:void 0===e.delimiter?p.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:p.encode,encoder:"function"==typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(t);"function"==typeof c.filter?i=(0,c.filter)("",i):u(c.filter)&&(n=c.filter);var l,d=[];if("object"!=typeof i||null===i)return"";l=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var h=s[l];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var m="comma"===h&&t&&t.commaRoundTrip;n||(n=Object.keys(i)),c.sort&&n.sort(c.sort);for(var b=r(),g=0;g<n.length;++g){var v=n[g];c.skipNulls&&null===i[v]||f(d,y(i[v],v,h,m,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,b))}var w=d.join(c.delimiter),E=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?E+="utf8=%26%2310003%3B&":E+="utf8=%E2%9C%93&"),w.length>0?E+w:""}},{"./formats":78,"./utils":82,"side-channel":101}],82:[function(e,t,n){"use strict";var r=e("./formats"),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};t.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var i=t[r],a=i.obj[i.prop],s=Object.keys(a),u=0;u<s.length;++u){var c=s[u],l=a[c];"object"==typeof l&&null!==l&&-1===n.indexOf(l)&&(t.push({obj:a,prop:c}),n.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)void 0!==n[i]&&r.push(n[i]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n,i,o){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var u="",c=0;c<s.length;++c){var l=s.charCodeAt(c);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===r.RFC1738&&(40===l||41===l)?u+=s.charAt(c):l<128?u+=a[l]:l<2048?u+=a[192|l>>6]+a[128|63&l]:l<55296||l>=57344?u+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l]:(c+=1,l=65536+((1023&l)<<10|1023&s.charCodeAt(c)),u+=a[240|l>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l])}return u},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(o(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!i.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var a=t;return o(t)&&!o(n)&&(a=s(t,r)),o(t)&&o(n)?(n.forEach((function(n,o){if(i.call(t,o)){var a=t[o];a&&"object"==typeof a&&n&&"object"==typeof n?t[o]=e(a,n,r):t.push(n)}else t[o]=n})),t):Object.keys(n).reduce((function(t,o){var a=n[o];return i.call(t,o)?t[o]=e(t[o],a,r):t[o]=a,t}),a)}}},{"./formats":78}],83:[function(e,t,n){(function(n){(function(){for(var r=e("performance-now"),i="undefined"==typeof window?n:window,o=["moz","webkit"],a="AnimationFrame",s=i["request"+a],u=i["cancel"+a]||i["cancelRequest"+a],c=0;!s&&c<o.length;c++)s=i[o[c]+"Request"+a],u=i[o[c]+"Cancel"+a]||i[o[c]+"CancelRequest"+a];if(!s||!u){var l=0,f=0,d=[],h=1e3/60;s=function(e){if(0===d.length){var t=r(),n=Math.max(0,h-(t-l));l=n+t,setTimeout((function(){var e=d.slice(0);d.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(l)}catch(e){setTimeout((function(){throw e}),0)}}),Math.round(n))}return d.push({handle:++f,callback:e,cancelled:!1}),f},u=function(e){for(var t=0;t<d.length;t++)d[t].handle===e&&(d[t].cancelled=!0)}}t.exports=function(e){return s.call(i,e)},t.exports.cancel=function(){u.apply(i,arguments)},t.exports.polyfill=function(e){e||(e=i),e.requestAnimationFrame=s,e.cancelAnimationFrame=u}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"performance-now":75}],84:[function(e,t,n){"use strict";var r=e("process-nextick-args"),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=f;var o=Object.create(e("core-util-is"));o.inherits=e("inherits");var a=e("./_stream_readable"),s=e("./_stream_writable");o.inherits(f,a);for(var u=i(s.prototype),c=0;c<u.length;c++){var l=u[c];f.prototype[l]||(f.prototype[l]=s.prototype[l])}function f(e){if(!(this instanceof f))return new f(e);a.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",d)}function d(){this.allowHalfOpen||this._writableState.ended||r.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},{"./_stream_readable":86,"./_stream_writable":88,"core-util-is":23,inherits:64,"process-nextick-args":76}],85:[function(e,t,n){"use strict";t.exports=o;var r=e("./_stream_transform"),i=Object.create(e("core-util-is"));function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=e("inherits"),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},{"./_stream_transform":87,"core-util-is":23,inherits:64}],86:[function(e,t,n){(function(n,r){(function(){"use strict";var i=e("process-nextick-args");t.exports=v;var o,a=e("isarray");v.ReadableState=g;e("events").EventEmitter;var s=function(e,t){return e.listeners(t).length},u=e("./internal/streams/stream"),c=e("safe-buffer").Buffer,l=(void 0!==r?r:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var f=Object.create(e("core-util-is"));f.inherits=e("inherits");var d=e("util"),h=void 0;h=d&&d.debuglog?d.debuglog("stream"):function(){};var p,m=e("./internal/streams/BufferList"),y=e("./internal/streams/destroy");f.inherits(v,u);var b=["error","close","destroy","pause","resume"];function g(t,n){t=t||{};var r=n instanceof(o=o||e("./_stream_duplex"));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=e("string_decoder/").StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function v(t){if(o=o||e("./_stream_duplex"),!(this instanceof v))return new v(t);this._readableState=new g(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(e,t,n,r,i){var o,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,S(e)}(e,a)):(i||(o=function(e,t){var n;r=t,c.isBuffer(r)||r instanceof l||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):E(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?E(e,a,t,!1):O(e,a)):E(e,a,t,!1))):r||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function E(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&S(e)),O(e,t)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(e,t){this.push(null),t(e)},v.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=c.from(e,t),t=""),n=!0),w(this,e,t,!1,n)},v.prototype.unshift=function(e){return w(this,e,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(t){return p||(p=e("string_decoder/").StringDecoder),this._readableState.decoder=new p(t),this._readableState.encoding=t,this};var _=8388608;function R(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(A,e):A(e))}function A(e){h("emit readable"),e.emit("readable"),j(e)}function O(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(k,e,t))}function k(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(h("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function T(e){h("readable nexttick read 0"),e.read(0)}function x(e,t){t.reading||(h("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(h("flow",t.flowing);t.flowing&&null!==e.read(););}function M(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;e-=i.length;for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),0===(e-=a)){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function C(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(N,t,e))}function N(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function D(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}v.prototype.read=function(e){h("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?C(this):S(this),null;if(0===(e=R(e,t))&&t.ended)return 0===t.length&&C(this),null;var r,i=t.needReadable;return h("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&h("length less than watermark",i=!0),t.ended||t.reading?h("reading or ended",i=!1):i&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=R(n,t))),null===(r=e>0?M(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&C(this)),null!==r&&this.emit("data",r),r},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,h("pipe count=%d opts=%j",o.pipesCount,t);var u=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?l:v;function c(t,n){h("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,h("cleanup"),e.removeListener("close",b),e.removeListener("finish",g),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",c),r.removeListener("end",l),r.removeListener("end",v),r.removeListener("data",m),d=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){h("onend"),e.end()}o.endEmitted?i.nextTick(u):r.once("end",u),e.on("unpipe",c);var f=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,j(e))}}(r);e.on("drain",f);var d=!1;var p=!1;function m(t){h("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==D(o.pipes,e))&&!d&&(h("false write response, pause",o.awaitDrain),o.awaitDrain++,p=!0),r.pause())}function y(t){h("onerror",t),v(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",g),v()}function g(){h("onfinish"),e.removeListener("close",b),v()}function v(){h("unpipe"),r.unpipe(e)}return r.on("data",m),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",y),e.once("close",b),e.once("finish",g),e.emit("pipe",r),o.flowing||(h("pipe resume"),r.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=D(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},v.prototype.on=function(e,t){var n=u.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&S(this):i.nextTick(T,this))}return n},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(x,e,t))}(this,e)),this},v.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(h("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(h("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<b.length;o++)e.on(b[o],this.emit.bind(this,b[o]));return this._read=function(t){h("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=M}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":84,"./internal/streams/BufferList":89,"./internal/streams/destroy":90,"./internal/streams/stream":91,_process:77,"core-util-is":23,events:42,inherits:64,isarray:70,"process-nextick-args":76,"safe-buffer":92,"string_decoder/":93,util:13}],87:[function(e,t,n){"use strict";t.exports=a;var r=e("./_stream_duplex"),i=Object.create(e("core-util-is"));function o(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);r.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"==typeof this._flush?this._flush((function(t,n){u(e,t,n)})):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=e("inherits"),i.inherits(a,r),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,(function(e){t(e),n.emit("close")}))}},{"./_stream_duplex":84,"core-util-is":23,inherits:64}],88:[function(e,t,n){(function(n,r,i){(function(){"use strict";var o=e("process-nextick-args");function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}t.exports=g;var s,u=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?i:o.nextTick;g.WritableState=b;var c=Object.create(e("core-util-is"));c.inherits=e("inherits");var l={deprecate:e("util-deprecate")},f=e("./internal/streams/stream"),d=e("safe-buffer").Buffer,h=(void 0!==r?r:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var p,m=e("./internal/streams/destroy");function y(){}function b(t,n){s=s||e("./_stream_duplex"),t=t||{};var r=n instanceof s;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===t.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(o.nextTick(i,r),o.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),S(e,t))}(e,n,r,t,i);else{var a=_(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||E(e,n),r?u(w,e,n,a,i):w(e,n,a,i)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function g(t){if(s=s||e("./_stream_duplex"),!(p.call(g,this)||this instanceof s))return new g(t);this._writableState=new b(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),f.call(this)}function v(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function w(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),S(e,t)}function E(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var s=0,u=!0;n;)i[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;i.allBuffers=u,v(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,l=n.encoding,f=n.callback;if(v(e,t,!1,t.objectMode?1:c.length,c,l,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function R(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),S(e,t)}))}function S(e,t){var n=_(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(R,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}c.inherits(g,f),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(b.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===g&&(e&&e._writableState instanceof b)}})):p=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,n){var r,i=this._writableState,a=!1,s=!i.objectMode&&(r=e,d.isBuffer(r)||r instanceof h);return s&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=y),i.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),o.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),o.nextTick(r,a),i=!1),i}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,n));return t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else v(e,t,!1,s,r,i,o);return u}(this,i,s,e,t,n)),a},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||E(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,S(e,t),n&&(t.finished?o.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=m.destroy,g.prototype._undestroy=m.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{"./_stream_duplex":84,"./internal/streams/destroy":90,"./internal/streams/stream":91,_process:77,"core-util-is":23,inherits:64,"process-nextick-args":76,"safe-buffer":92,timers:108,"util-deprecate":111}],89:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer,i=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);for(var t,n,i,o=r.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=o,i=s,t.copy(n,i),s+=a.data.length,a=a.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":92,util:13}],90:[function(e,t,n){"use strict";var r=e("process-nextick-args");function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var n=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(i,this,e)):r.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,r.nextTick(i,n,e)):r.nextTick(i,n,e):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":76}],91:[function(e,t,n){t.exports=e("events").EventEmitter},{events:42}],92:[function(e,t,n){var r=e("buffer"),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,n),n.Buffer=a),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{buffer:15}],93:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function l(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}n.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=a(t[r]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if(i=a(t[r]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if(i=a(t[r]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":92}],94:[function(e,t,n){(n=t.exports=e("./lib/_stream_readable.js")).Stream=n,n.Readable=n,n.Writable=e("./lib/_stream_writable.js"),n.Duplex=e("./lib/_stream_duplex.js"),n.Transform=e("./lib/_stream_transform.js"),n.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":84,"./lib/_stream_passthrough.js":85,"./lib/_stream_readable.js":86,"./lib/_stream_transform.js":87,"./lib/_stream_writable.js":88}],95:[function(e,t,n){"use strict";var r=t.exports=e("./readystate"),i=new Function("return this")(),o="complete",a=!0,s=i?i.document:null,u=s?s.documentElement:null,c=function(){return s?s.readyState:null};!function(){if(o===c())return r.change(o);var e=s&&!!s.addEventListener,t=e?"":"on",n=e?"addEventListener":"attachEvent",l=e?"removeEventListener":"detachEvent",f=u?u.doScroll:null;if(!e&&"function"==typeof f){try{a=!i.frameElement}catch(e){}a&&function e(){try{f("left")}catch(t){return setTimeout(e,50)}r.change("interactive")}()}function d(e){"readystatechange"===(e=e||i.event).type&&(r.change(c()),o!==c())||("load"===e.type?r.change("complete"):r.change("interactive"),("load"===e.type?i:s)[l](e.type,d,!1))}s[n](t+"DOMContentLoaded",d,!1),s[n](t+"readystatechange",d,!1),i[n](t+"load",d,!1)}()},{"./readystate":96}],96:[function(e,t,n){"use strict";function r(e){return function(t,n){var r=this;return r.is(e)?setTimeout((function(){t.call(n,r.readyState)}),0):(r._events[e]||(r._events[e]=[]),r._events[e].push({fn:t,context:n})),r}}function i(){this.readyState=i.UNKNOWN,this._events={}}i.states="ALL,UNKNOWN,LOADING,INTERACTIVE,COMPLETE".split(",");for(var o,a=0;a<i.states.length;a++)i[o=i.states[a]]=i.prototype[o]=a,i.prototype[o.toLowerCase()]=r(o);i.prototype.change=function(e){e=this.clean(e,!0);var t,n,r,o=0,a=this,s=a.readyState;if(s>=e)return a;for(a.readyState=e;o<i.states.length&&!(o>e);o++)if((n=i.states[o])in a._events){for(t=0;t<a._events[n].length;t++)(r=a._events[n][t]).fn.call(r.context||a,s);delete a._events[n]}return a},i.prototype.is=function(e){return this.readyState>=this.clean(e,!0)},i.prototype.clean=function(e,t){var n=typeof e;return t?"number"!==n?+i[e.toUpperCase()]||0:e:("number"===n?i.states[e]:e).toUpperCase()},i.prototype.removeAllListeners=function(){return this._events={},this},t.exports=new i},{}],97:[function(e,t,n){
32
32
  /**
33
33
  * request-frame - requestAnimationFrame & cancelAnimationFrame polyfill for optimal cross-browser development.
34
34
  * @version v1.5.3
@@ -47,5 +47,5 @@ function f(){var e,t,n,r,i,o=window.webkitRequestAnimationFrame,a=window.request
47
47
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
48
48
  var r=e("buffer"),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,n),n.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{buffer:15}],99:[function(e,t,n){var r=Object.prototype.hasOwnProperty;function i(e){return"[Throws: "+(e?e.message:"?")+"]"}function o(e){var t=[];return function e(n){if(null===n||"object"!=typeof n)return n;if(-1!==t.indexOf(n))return"[Circular]";if(t.push(n),"function"==typeof n.toJSON)try{var o=e(n.toJSON());return t.pop(),o}catch(e){return i(e)}if(Array.isArray(n)){var a=n.map(e);return t.pop(),a}var s=Object.keys(n).reduce((function(t,o){return t[o]=e(function(e,t){if(r.call(e,t))try{return e[t]}catch(e){return i(e)}return e[t]}(n,o)),t}),{});return t.pop(),s}(e)}t.exports=function(e,t,n){return JSON.stringify(o(e),t,n)},t.exports.ensureProperties=o},{}],100:[function(e,t,n){"use strict";var r=e("get-intrinsic"),i=e("define-data-property"),o=e("has-property-descriptors")(),a=e("gopd"),s=e("es-errors/type"),u=r("%Math.floor%");t.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||u(t)!==t)throw new s("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(r=!1),l&&!l.writable&&(c=!1)}return(r||c||!n)&&(o?i(e,"length",t,!0,!0):i(e,"length",t)),e}},{"define-data-property":26,"es-errors/type":40,"get-intrinsic":49,gopd:53,"has-property-descriptors":54}],101:[function(e,t,n){"use strict";var r=e("get-intrinsic"),i=e("call-bind/callBound"),o=e("object-inspect"),a=e("es-errors/type"),s=r("%WeakMap%",!0),u=r("%Map%",!0),c=i("WeakMap.prototype.get",!0),l=i("WeakMap.prototype.set",!0),f=i("WeakMap.prototype.has",!0),d=i("Map.prototype.get",!0),h=i("Map.prototype.set",!0),p=i("Map.prototype.has",!0),m=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};t.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+o(e))},get:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(e)return c(e,r)}else if(u){if(t)return d(t,r)}else if(n)return function(e,t){var n=m(e,t);return n&&n.value}(n,r)},has:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(e)return f(e,r)}else if(u){if(t)return p(t,r)}else if(n)return function(e,t){return!!m(e,t)}(n,r);return!1},set:function(r,i){s&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new s),l(e,r,i)):u?(t||(t=new u),h(t,r,i)):(n||(n={key:{},next:null}),function(e,t,n){var r=m(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,i))}};return r}},{"call-bind/callBound":16,"es-errors/type":40,"get-intrinsic":49,"object-inspect":73}],102:[function(e,t,n){t.exports=function(e){var t=e._readableState;return t?t.objectMode||"number"==typeof e._duplexState?e.read():e.read(function(e){if(e.buffer.length){var t=e.bufferIndex||0;if(e.buffer.head)return e.buffer.head.data.length;if(e.buffer.length-t>0&&e.buffer[t])return e.buffer[t].length}return e.length}(t)):null}},{}],103:[function(e,t,n){"use strict";function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(){this._defaults=[]}for(var a=0,s=["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"];a<s.length;a++){const e=s[a];o.prototype[e]=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this._defaults.push({fn:e,args:n}),this}}o.prototype._setDefaults=function(e){var t,n=r(this._defaults);try{for(n.s();!(t=n.n()).done;){const n=t.value;e[n.fn](...n.args)}}catch(e){n.e(e)}finally{n.f()}},t.exports=o},{}],104:[function(e,t,n){"use strict";function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}let o;"undefined"!=typeof window?o=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),o=void 0):o=self;const a=e("component-emitter"),s=e("fast-safe-stringify"),u=e("qs"),c=e("./request-base"),l=e("./utils"),f=l.isObject,d=l.mixin,h=l.hasOwn,p=e("./response-base"),m=e("./agent-base");function y(){}t.exports=function(e,t){return"function"==typeof t?new n.Request("GET",e).end(t):1===arguments.length?new n.Request("GET",e):new n.Request(e,t)};const b=n=t.exports;n.Request=S,b.getXHR=()=>{if(o.XMLHttpRequest)return new o.XMLHttpRequest;throw new Error("Browser-only version of superagent could not find XHR")};const g="".trim?e=>e.trim():e=>e.replace(/(^\s*|\s*$)/g,"");function v(e){if(!f(e))return e;const t=[];for(const n in e)h(e,n)&&w(t,n,e[n]);return t.join("&")}function w(e,t,n){if(void 0!==n)if(null!==n)if(Array.isArray(n)){var i,o=r(n);try{for(o.s();!(i=o.n()).done;){w(e,t,i.value)}}catch(e){o.e(e)}finally{o.f()}}else if(f(n))for(const r in n)h(n,r)&&w(e,`${t}[${r}]`,n[r]);else e.push(encodeURI(t)+"="+encodeURIComponent(n));else e.push(encodeURI(t))}function E(e){const t={},n=e.split("&");let r,i;for(let e=0,o=n.length;e<o;++e)r=n[e],i=r.indexOf("="),-1===i?t[decodeURIComponent(r)]="":t[decodeURIComponent(r.slice(0,i))]=decodeURIComponent(r.slice(i+1));return t}function _(e){return/[/+]json($|[^-\w])/i.test(e)}function R(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;let t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.headers=function(e){const t=e.split(/\r?\n/),n={};let r,i,o,a;for(let e=0,s=t.length;e<s;++e)i=t[e],r=i.indexOf(":"),-1!==r&&(o=i.slice(0,r).toLowerCase(),a=g(i.slice(r+1)),n[o]=a);return n}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function S(e,t){const n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",(()=>{let e,t=null,r=null;try{r=new R(n)}catch(e){return t=new Error("Parser is unable to parse the response"),t.parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",r);try{n._isResponseOK(r)||(e=new Error(r.statusText||r.text||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=r,e.status=e.status||r.status,n.callback(e,r)):n.callback(null,r)}))}b.serializeObject=v,b.parseString=E,b.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},b.serialize={"application/x-www-form-urlencoded":u.stringify,"application/json":s},b.parse={"application/x-www-form-urlencoded":E,"application/json":JSON.parse},d(R.prototype,p.prototype),R.prototype._parseBody=function(e){let t=b.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&_(this.type)&&(t=b.parse["application/json"]),t&&e&&(e.length>0||e instanceof Object)?t(e):null)},R.prototype.toError=function(){const e=this.req,t=e.method,n=e.url,r=`cannot ${t} ${n} (${this.status})`,i=new Error(r);return i.status=this.status,i.method=t,i.url=n,i},b.Response=R,a(S.prototype),d(S.prototype,c.prototype),S.prototype.type=function(e){return this.set("Content-Type",b.types[e]||e),this},S.prototype.accept=function(e){return this.set("Accept",b.types[e]||e),this},S.prototype.auth=function(e,t,n){1===arguments.length&&(t=""),"object"==typeof t&&null!==t&&(n=t,t=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});const r=n.encoder?n.encoder:e=>{if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,n,r)},S.prototype.query=function(e){return"string"!=typeof e&&(e=v(e)),e&&this._query.push(e),this},S.prototype.attach=function(e,t,n){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},S.prototype._getFormData=function(){return this._formData||(this._formData=new o.FormData),this._formData},S.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();const n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},S.prototype.crossDomainError=function(){const e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},S.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},S.prototype.ca=S.prototype.agent,S.prototype.buffer=S.prototype.ca,S.prototype.write=()=>{throw new Error("Streaming is not supported in browser version of superagent")},S.prototype.pipe=S.prototype.write,S.prototype._isHost=function(e){return e&&"object"==typeof e&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},S.prototype.end=function(e){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||y,this._finalizeQueryString(),this._end()},S.prototype._setUploadTimeout=function(){const e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((()=>{e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},S.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));const e=this;this.xhr=b.getXHR();const t=this.xhr;let n=this._formData||this._data;this._setTimeouts(),t.addEventListener("readystatechange",(()=>{const n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4!==n)return;let r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}));const r=(t,n)=>{n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(e._uploadTimeoutTimer)),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.addEventListener("progress",r.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",r.bind(null,"upload"))}catch(e){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){const e=this._header["content-type"];let t=this._serializer||b.serialize[e?e.split(";")[0]:""];!t&&_(e)&&(t=b.serialize["application/json"]),t&&(n=t(n))}for(const e in this.header)null!==this.header[e]&&h(this.header,e)&&t.setRequestHeader(e,this.header[e]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===n?null:n)},b.agent=()=>new m;for(var A=0,O=["GET","POST","OPTIONS","PATCH","PUT","DELETE"];A<O.length;A++){const e=O[A];m.prototype[e.toLowerCase()]=function(t,n){const r=new b.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}}function k(e,t,n){const r=b("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}m.prototype.del=m.prototype.delete,b.get=(e,t,n)=>{const r=b("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},b.head=(e,t,n)=>{const r=b("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},b.options=(e,t,n)=>{const r=b("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.del=k,b.delete=k,b.patch=(e,t,n)=>{const r=b("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.post=(e,t,n)=>{const r=b("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.put=(e,t,n)=>{const r=b("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},{"./agent-base":103,"./request-base":105,"./response-base":106,"./utils":107,"component-emitter":21,"fast-safe-stringify":43,qs:79}],105:[function(e,t,n){(function(n){(function(){"use strict";const r=e("semver"),i=e("./utils"),o=i.isObject,a=i.hasOwn;function s(){}t.exports=s,s.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},s.prototype.parse=function(e){return this._parser=e,this},s.prototype.responseType=function(e){return this._responseType=e,this},s.prototype.serialize=function(e){return this._serializer=e,this},s.prototype.timeout=function(e){if(!e||"object"!=typeof e)return this._timeout=e,this._responseTimeout=0,this._uploadTimeout=0,this;for(const t in e)if(a(e,t))switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;case"upload":this._uploadTimeout=e.upload;break;default:console.warn("Unknown timeout option",t)}return this},s.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};const u=new Set(["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]),c=new Set([408,413,429,500,502,503,504,521,522,524]);s.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{const n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&c.has(t.status))return!0;if(e){if(e.code&&u.has(e.code))return!0;if(e.timeout&&"ECONNABORTED"===e.code)return!0;if(e.crossDomain)return!0}return!1},s.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},s.prototype.then=function(e,t){if(!this._fullfilledPromise){const e=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(((t,n)=>{e.on("abort",(()=>{if(this._maxRetries&&this._maxRetries>this._retries)return;if(this.timedout&&this.timedoutError)return void n(this.timedoutError);const e=new Error("Aborted");e.code="ABORTED",e.status=this.status,e.method=this.method,e.url=this.url,n(e)})),e.end(((e,r)=>{e?n(e):t(r)}))}))}return this._fullfilledPromise.then(e,t)},s.prototype.catch=function(e){return this.then(void 0,e)},s.prototype.use=function(e){return e(this),this},s.prototype.ok=function(e){if("function"!=typeof e)throw new Error("Callback required");return this._okCallback=e,this},s.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},s.prototype.get=function(e){return this._header[e.toLowerCase()]},s.prototype.getHeader=s.prototype.get,s.prototype.set=function(e,t){if(o(e)){for(const t in e)a(e,t)&&this.set(t,e[t]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},s.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},s.prototype.field=function(e,t,n){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(o(e)){for(const t in e)a(e,t)&&this.field(t,e[t]);return this}if(Array.isArray(t)){for(const n in t)a(t,n)&&this.field(e,t[n]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=String(t)),n?this._getFormData().append(e,t,n):this._getFormData().append(e,t),this},s.prototype.abort=function(){if(this._aborted)return this;if(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req){if(r.gte(n.version,"v13.0.0")&&r.lt(n.version,"v14.0.0"))throw new Error("Superagent does not work in v13 properly with abort() due to Node.js core changes");this.req.abort()}return this.clearTimeout(),this.emit("abort"),this},s.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization",`Basic ${r(`${e}:${t}`)}`);break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization",`Bearer ${e}`)}return this},s.prototype.withCredentials=function(e){return void 0===e&&(e=!0),this._withCredentials=e,this},s.prototype.redirects=function(e){return this._maxRedirects=e,this},s.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw new TypeError("Invalid argument");return this._maxResponseSize=e,this},s.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},s.prototype.send=function(e){const t=o(e);let n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&o(this._data))for(const t in e){if("bigint"==typeof e[t]&&!e[t].toJSON)throw new Error("Cannot serialize BigInt value to json");a(e,t)&&(this._data[t]=e[t])}else{if("bigint"==typeof e)throw new Error("Cannot send value of type BigInt");"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],n&&(n=n.toLowerCase().trim()),this._data="application/x-www-form-urlencoded"===n?this._data?`${this._data}&${e}`:e:(this._data||"")+e):this._data=e}return!t||this._isHost(e)||n||this.type("json"),this},s.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},s.prototype._finalizeQueryString=function(){const e=this._query.join("&");if(e&&(this.url+=(this.url.includes("?")?"&":"?")+e),this._query.length=0,this._sort){const e=this.url.indexOf("?");if(e>=0){const t=this.url.slice(e+1).split("&");"function"==typeof this._sort?t.sort(this._sort):t.sort(),this.url=this.url.slice(0,e)+"?"+t.join("&")}}},s.prototype._appendQueryString=()=>{console.warn("Unsupported")},s.prototype._timeoutError=function(e,t,n){if(this._aborted)return;const r=new Error(`${e+t}ms exceeded`);r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)},s.prototype._setTimeouts=function(){const e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((()=>{e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((()=>{e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}}).call(this)}).call(this,e("_process"))},{"./utils":107,_process:77,semver:13}],106:[function(e,t,n){"use strict";const r=e("./utils");function i(){}t.exports=i,i.prototype.get=function(e){return this.header[e.toLowerCase()]},i.prototype._setHeaderProperties=function(e){const t=e["content-type"]||"";this.type=r.type(t);const n=r.params(t);for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(this[e]=n[e]);this.links={};try{e.link&&(this.links=r.parseLinks(e.link))}catch(e){}},i.prototype._setStatusProperties=function(e){const t=Math.trunc(e/100);this.statusCode=e,this.status=this.statusCode,this.statusType=t,this.info=1===t,this.ok=2===t,this.redirect=3===t,this.clientError=4===t,this.serverError=5===t,this.error=(4===t||5===t)&&this.toError(),this.created=201===e,this.accepted=202===e,this.noContent=204===e,this.badRequest=400===e,this.unauthorized=401===e,this.notAcceptable=406===e,this.forbidden=403===e,this.notFound=404===e,this.unprocessableEntity=422===e}},{"./utils":107}],107:[function(e,t,n){"use strict";function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.type=e=>e.split(/ *; */).shift(),n.params=e=>{const t={};var n,i=r(e.split(/ *; */));try{for(i.s();!(n=i.n()).done;){const e=n.value.split(/ *= */),r=e.shift(),i=e.shift();r&&i&&(t[r]=i)}}catch(e){i.e(e)}finally{i.f()}return t},n.parseLinks=e=>{const t={};var n,i=r(e.split(/ *, */));try{for(i.s();!(n=i.n()).done;){const e=n.value.split(/ *; */),r=e[0].slice(1,-1);t[e[1].split(/ *= */)[1].slice(1,-1)]=r}}catch(e){i.e(e)}finally{i.f()}return t},n.cleanHeader=(e,t)=>(delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e),n.isObject=e=>null!==e&&"object"==typeof e,n.hasOwn=Object.hasOwn||function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(new Object(e),t)},n.mixin=(e,t)=>{for(const r in t)n.hasOwn(t,r)&&(e[r]=t[r])}},{}],108:[function(e,t,n){(function(t,r){(function(){var i=e("process/browser.js").nextTick,o=Function.prototype.apply,a=Array.prototype.slice,s={},u=0;function c(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new c(o.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new c(o.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"==typeof t?t:function(e){var t=u++,r=!(arguments.length<2)&&a.call(arguments,1);return s[t]=!0,i((function(){s[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"==typeof r?r:function(e){delete s[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":77,timers:108}],109:[function(e,t,n){(function(e){(function(){
49
49
  /*! typedarray-to-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
50
- t.exports=function(t){return ArrayBuffer.isView(t)?e.from(t.buffer,t.byteOffset,t.byteLength):e.from(t)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:15}],110:[function(e,t,n){!function(e,r){"use strict";var i="function",o="undefined",a="object",s="string",u="major",c="model",l="name",f="type",d="vendor",h="version",p="architecture",m="console",y="mobile",b="tablet",g="smarttv",v="wearable",w="embedded",E="Amazon",_="Apple",R="ASUS",S="BlackBerry",A="Browser",O="Chrome",k="Firefox",T="Google",x="Huawei",j="LG",M="Microsoft",C="Motorola",N="Opera",D="Samsung",I="Sharp",L="Sony",P="Xiaomi",B="Zebra",U="Facebook",F="Chromium OS",W="Mac OS",q=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},H=function(e,t){return typeof e===s&&-1!==V(t).indexOf(V(e))},V=function(e){return e.toLowerCase()},z=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,500)},G=function(e,t){for(var n,o,s,u,c,l,f=0;f<t.length&&!c;){var d=t[f],h=t[f+1];for(n=o=0;n<d.length&&!c&&d[n];)if(c=d[n++].exec(e))for(s=0;s<h.length;s++)l=c[++o],typeof(u=h[s])===a&&u.length>0?2===u.length?typeof u[1]==i?this[u[0]]=u[1].call(this,l):this[u[0]]=u[1]:3===u.length?typeof u[1]!==i||u[1].exec&&u[1].test?this[u[0]]=l?l.replace(u[1],u[2]):r:this[u[0]]=l?u[1].call(this,l,u[2]):r:4===u.length&&(this[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):r):this[u]=l||r;f+=2}},$=function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(H(t[n][i],e))return"?"===n?r:n}else if(H(t[n],e))return"?"===n?r:n;return e},Y={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},K={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,h],[/opios[\/ ]+([\w\.]+)/i],[h,[l,N+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[h,[l,N+" GX"]],[/\bopr\/([\w\.]+)/i],[h,[l,N]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[h,[l,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[l,h],[/\bddg\/([\w\.]+)/i],[h,[l,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[l,"UC"+A]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[h,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[l,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[h,[l,"Smart Lenovo "+A]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+A],h],[/\bfocus\/([\w\.]+)/i],[h,[l,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[l,N+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[l,N+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[l,"MIUI "+A]],[/fxios\/([-\w\.]+)/i],[h,[l,k]],[/\bqihu|(qi?ho?o?|360)browser/i],[[l,"360 "+A]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1 "+A],h],[/samsungbrowser\/([\w\.]+)/i],[h,[l,D+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],h],[/metasr[\/ ]?([\d\.]+)/i],[h,[l,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[l,"Sogou Mobile"],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[l,h],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,U],h],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[l,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[l,O+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,O+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[l,"Android "+A]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[h,$,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[l,k+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[l,h],[/(cobalt)\/([\w\.]+)/i],[l,[h,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,V]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,"",V]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,V]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[d,D],[f,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[c,[d,D],[f,y]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[d,_],[f,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[d,_],[f,b]],[/(macintosh);/i],[c,[d,_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[d,I],[f,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[d,x],[f,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[d,x],[f,y]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[c,/_/g," "],[d,P],[f,y]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[d,P],[f,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[d,"OPPO"],[f,y]],[/\b(opd2\d{3}a?) bui/i],[c,[d,"OPPO"],[f,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[d,"Vivo"],[f,y]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[d,"Realme"],[f,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[d,C],[f,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[d,C],[f,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[d,j],[f,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[d,j],[f,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[d,"Lenovo"],[f,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[d,"Nokia"],[f,y]],[/(pixel c)\b/i],[c,[d,T],[f,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[d,T],[f,y]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[d,L],[f,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[d,L],[f,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[d,"OnePlus"],[f,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[d,E],[f,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[d,E],[f,y]],[/(playbook);[-\w\),; ]+(rim)/i],[c,d,[f,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[d,S],[f,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[d,R],[f,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[d,R],[f,y]],[/(nexus 9)/i],[c,[d,"HTC"],[f,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[c,/_/g," "],[f,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[d,"Acer"],[f,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[d,"Meizu"],[f,y]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[d,"Ulefone"],[f,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d,c,[f,y]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d,c,[f,b]],[/(surface duo)/i],[c,[d,M],[f,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[d,"Fairphone"],[f,y]],[/(u304aa)/i],[c,[d,"AT&T"],[f,y]],[/\bsie-(\w*)/i],[c,[d,"Siemens"],[f,y]],[/\b(rct\w+) b/i],[c,[d,"RCA"],[f,b]],[/\b(venue[\d ]{2,7}) b/i],[c,[d,"Dell"],[f,b]],[/\b(q(?:mv|ta)\w+) b/i],[c,[d,"Verizon"],[f,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[d,"Barnes & Noble"],[f,b]],[/\b(tm\d{3}\w+) b/i],[c,[d,"NuVision"],[f,b]],[/\b(k88) b/i],[c,[d,"ZTE"],[f,b]],[/\b(nx\d{3}j) b/i],[c,[d,"ZTE"],[f,y]],[/\b(gen\d{3}) b.+49h/i],[c,[d,"Swiss"],[f,y]],[/\b(zur\d{3}) b/i],[c,[d,"Swiss"],[f,b]],[/\b((zeki)?tb.*\b) b/i],[c,[d,"Zeki"],[f,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],c,[f,b]],[/\b(ns-?\w{0,9}) b/i],[c,[d,"Insignia"],[f,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[d,"NextBook"],[f,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],c,[f,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],c,[f,y]],[/\b(ph-1) /i],[c,[d,"Essential"],[f,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[d,"Envizen"],[f,b]],[/\b(trio[-\w\. ]+) b/i],[c,[d,"MachSpeed"],[f,b]],[/\btu_(1491) b/i],[c,[d,"Rotor"],[f,b]],[/(shield[\w ]+) b/i],[c,[d,"Nvidia"],[f,b]],[/(sprint) (\w+)/i],[d,c,[f,y]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[d,M],[f,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[d,B],[f,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[d,B],[f,y]],[/smart-tv.+(samsung)/i],[d,[f,g]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[d,D],[f,g]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,j],[f,g]],[/(apple) ?tv/i],[d,[c,_+" TV"],[f,g]],[/crkey/i],[[c,O+"cast"],[d,T],[f,g]],[/droid.+aft(\w+)( bui|\))/i],[c,[d,E],[f,g]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[d,I],[f,g]],[/(bravia[\w ]+)( bui|\))/i],[c,[d,L],[f,g]],[/(mitv-\w{5}) bui/i],[c,[d,P],[f,g]],[/Hbbtv.*(technisat) (.*);/i],[d,c,[f,g]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[d,z],[c,z],[f,g]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,g]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,c,[f,m]],[/droid.+; (shield) bui/i],[c,[d,"Nvidia"],[f,m]],[/(playstation [345portablevi]+)/i],[c,[d,L],[f,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[d,M],[f,m]],[/((pebble))app/i],[d,c,[f,v]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[d,_],[f,v]],[/droid.+; (glass) \d/i],[c,[d,T],[f,v]],[/droid.+; (wt63?0{2,3})\)/i],[c,[d,B],[f,v]],[/(quest( \d| pro)?)/i],[c,[d,U],[f,v]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[f,w]],[/(aeobc)\b/i],[c,[d,E],[f,w]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[f,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[f,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[f,y]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[l,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[l,h],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,h],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[l,[h,$,Y]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,$,Y],[l,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,W],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,h],[/\(bb(10);/i],[h,[l,S]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[h,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[l,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[h,[l,O+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,F],h],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,h],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,h]]},J=function(t,n){if(typeof t===a&&(n=t,t=r),!(this instanceof J))return new J(t,n).getResult();var m=typeof e!==o&&e.navigator?e.navigator:r,g=t||(m&&m.userAgent?m.userAgent:""),v=m&&m.userAgentData?m.userAgentData:r,w=n?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(K,n):K,E=m&&m.userAgent==g;return this.getBrowser=function(){var e,t={};return t[l]=r,t[h]=r,G.call(t,g,w.browser),t[u]=typeof(e=t[h])===s?e.replace(/[^\d\.]/g,"").split(".")[0]:r,E&&m&&m.brave&&typeof m.brave.isBrave==i&&(t[l]="Brave"),t},this.getCPU=function(){var e={};return e[p]=r,G.call(e,g,w.cpu),e},this.getDevice=function(){var e={};return e[d]=r,e[c]=r,e[f]=r,G.call(e,g,w.device),E&&!e[f]&&v&&v.mobile&&(e[f]=y),E&&"Macintosh"==e[c]&&m&&typeof m.standalone!==o&&m.maxTouchPoints&&m.maxTouchPoints>2&&(e[c]="iPad",e[f]=b),e},this.getEngine=function(){var e={};return e[l]=r,e[h]=r,G.call(e,g,w.engine),e},this.getOS=function(){var e={};return e[l]=r,e[h]=r,G.call(e,g,w.os),E&&!e[l]&&v&&v.platform&&"Unknown"!=v.platform&&(e[l]=v.platform.replace(/chrome os/i,F).replace(/macos/i,W)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return g},this.setUA=function(e){return g=typeof e===s&&e.length>500?z(e,500):e,this},this.setUA(g),this};J.VERSION="1.0.38",J.BROWSER=q([l,h,u]),J.CPU=q([p]),J.DEVICE=q([c,d,f,m,y,g,b,v,w]),J.ENGINE=J.OS=q([l,h]),typeof n!==o?(typeof t!==o&&t.exports&&(n=t.exports=J),n.UAParser=J):typeof e!==o&&(e.UAParser=J);var X=typeof e!==o&&(e.jQuery||e.Zepto);if(X&&!X.ua){var Q=new J;X.ua=Q.getResult(),X.ua.get=function(){return Q.getUA()},X.ua.set=function(e){Q.setUA(e);var t=Q.getResult();for(var n in t)X.ua[n]=t[n]}}}("object"==typeof window?window:this)},{}],111:[function(e,t,n){(function(e){(function(){function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],112:[function(e,t,n){"use strict";var r=Object.prototype.toString;t.exports=function(e){return"[object Float32Array]"===r.call(e)}},{}],113:[function(e,t,n){(function(n,r){(function(){var i=e("readable-stream"),o=e("end-of-stream"),a=e("inherits"),s=e("stream-shift"),u=r.from&&r.from!==Uint8Array.from?r.from([0]):new r([0]),c=function(e,t){e._corked?e.once("uncork",t):t()},l=function(e,t){return function(n){n?function(e,t){e._autoDestroy&&e.destroy(t)}(e,"premature close"===n.message?null:n):t&&!e._ended&&e.end()}},f=function(e,t,n){if(!(this instanceof f))return new f(e,t,n);i.Duplex.call(this,n),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!n||!1!==n.autoDestroy,this._forwardDestroy=!n||!1!==n.destroy,this._forwardEnd=!n||!1!==n.end,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,e&&this.setWritable(e),t&&this.setReadable(t)};a(f,i.Duplex),f.obj=function(e,t,n){return n||(n={}),n.objectMode=!0,n.highWaterMark=16,new f(e,t,n)},f.prototype.cork=function(){1==++this._corked&&this.emit("cork")},f.prototype.uncork=function(){this._corked&&0==--this._corked&&this.emit("uncork")},f.prototype.setWritable=function(e){if(this._unwrite&&this._unwrite(),this.destroyed)e&&e.destroy&&e.destroy();else if(null!==e&&!1!==e){var t=this,r=o(e,{writable:!0,readable:!1},l(this,this._forwardEnd)),i=function(){var e=t._ondrain;t._ondrain=null,e&&e()};this._unwrite&&n.nextTick(i),this._writable=e,this._writable.on("drain",i),this._unwrite=function(){t._writable.removeListener("drain",i),r()},this.uncork()}else this.end()},f.prototype.setReadable=function(e){if(this._unread&&this._unread(),this.destroyed)e&&e.destroy&&e.destroy();else{if(null===e||!1===e)return this.push(null),void this.resume();var t,n=this,r=o(e,{writable:!1,readable:!0},l(this)),a=function(){n._forward()},s=function(){n.push(null)};this._drained=!0,this._readable=e,this._readable2=e._readableState?e:(t=e,new i.Readable({objectMode:!0,highWaterMark:16}).wrap(t)),this._readable2.on("readable",a),this._readable2.on("end",s),this._unread=function(){n._readable2.removeListener("readable",a),n._readable2.removeListener("end",s),r()},this._forward()}},f.prototype._read=function(){this._drained=!0,this._forward()},f.prototype._forward=function(){if(!this._forwarding&&this._readable2&&this._drained){var e;for(this._forwarding=!0;this._drained&&null!==(e=s(this._readable2));)this.destroyed||(this._drained=this.push(e));this._forwarding=!1}},f.prototype.destroy=function(e){if(!this.destroyed){this.destroyed=!0;var t=this;n.nextTick((function(){t._destroy(e)}))}},f.prototype._destroy=function(e){if(e){var t=this._ondrain;this._ondrain=null,t?t(e):this.emit("error",e)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},f.prototype._write=function(e,t,n){return this.destroyed?n():this._corked?c(this,this._write.bind(this,e,t,n)):e===u?this._finish(n):this._writable?void(!1===this._writable.write(e)?this._ondrain=n:n()):n()},f.prototype._finish=function(e){var t=this;this.emit("preend"),c(this,(function(){var n,r;n=t._forwardEnd&&t._writable,r=function(){!1===t._writableState.prefinished&&(t._writableState.prefinished=!0),t.emit("prefinish"),c(t,e)},n?n._writableState&&n._writableState.finished?r():n._writableState?n.end(r):(n.end(),r()):r()}))},f.prototype.end=function(e,t,n){return"function"==typeof e?this.end(null,null,e):"function"==typeof t?this.end(e,null,t):(this._ended=!0,e&&this.write(e),this._writableState.ending||this.write(u),i.Writable.prototype.end.call(this,n))},t.exports=f}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{_process:77,buffer:15,"end-of-stream":33,inherits:64,"readable-stream":94,"stream-shift":102}],114:[function(e,t,n){(function(n,r){(function(){"use strict";var i=e("readable-stream").Transform,o=e("duplexify"),a=e("ws"),s=e("safe-buffer").Buffer;t.exports=function(e,t,u){var c,l,f="browser"===n.title,d=!!r.WebSocket,h=f?function e(t,n,r){if(l.bufferedAmount>m)return void setTimeout(e,y,t,n,r);g&&"string"==typeof t&&(t=s.from(t,"utf8"));try{l.send(t)}catch(e){return r(e)}r()}:function(e,t,n){if(l.readyState!==l.OPEN)return void n();g&&"string"==typeof e&&(e=s.from(e,"utf8"));l.send(e,n)};t&&!Array.isArray(t)&&"object"==typeof t&&(u=t,t=null,("string"==typeof u.protocol||Array.isArray(u.protocol))&&(t=u.protocol));u||(u={});void 0===u.objectMode&&(u.objectMode=!(!0===u.binary||void 0===u.binary));var p=function(e,t,n){var r=new i({objectMode:e.objectMode});return r._write=t,r._flush=n,r}(u,h,(function(e){l.close(),e()}));u.objectMode||(p._writev=R);var m=u.browserBufferSize||524288,y=u.browserBufferTimeout||1e3;"object"==typeof e?l=e:(l=d&&f?new a(e,t):new a(e,t,u)).binaryType="arraybuffer";var b=void 0===l.addEventListener;l.readyState===l.OPEN?c=p:(c=c=o(void 0,void 0,u),u.objectMode||(c._writev=R),b?l.addEventListener("open",v):l.onopen=v);c.socket=l,b?(l.addEventListener("close",w),l.addEventListener("error",E),l.addEventListener("message",_)):(l.onclose=w,l.onerror=E,l.onmessage=_);p.on("close",(function(){l.close()}));var g=!u.objectMode;function v(){c.setReadable(p),c.setWritable(p),c.emit("connect")}function w(){c.end(),c.destroy()}function E(e){c.destroy(e)}function _(e){var t=e.data;t=t instanceof ArrayBuffer?s.from(t):s.from(t,"utf8"),p.push(t)}function R(e,t){for(var n=new Array(e.length),r=0;r<e.length;r++)"string"==typeof e[r].chunk?n[r]=s.from(e[r],"utf8"):n[r]=e[r].chunk;this._write(s.concat(n),"binary",t)}return c}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:77,duplexify:113,"readable-stream":94,"safe-buffer":98,ws:115}],115:[function(e,t,n){var r=null;"undefined"!=typeof WebSocket?r=WebSocket:"undefined"!=typeof MozWebSocket?r=MozWebSocket:"undefined"!=typeof window&&(r=window.WebSocket||window.MozWebSocket),t.exports=r},{}],116:[function(e,t,n){t.exports=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),i=e[e.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach((function(e){r[e]=i[e]})),r}}},{}],117:[function(e,t,n){t.exports={name:"videomail-client",version:"8.2.1",description:"A wicked npm package to record videos directly in the browser, wohooo!",author:"Michael Heuberger <michael.heuberger@binarykitchen.com>",contributors:[{name:"Michael Heuberger",email:"michael.heuberger@binarykitchen.com"}],homepage:"https://videomail.io",repository:{type:"git",url:"https://github.com/binarykitchen/videomail-client.git"},license:"CC0-1.0",readmeFilename:"README.md",module:"src/js/index.js",main:"prototype/js/videomail-client.js",scripts:{build:"gulp build",clean:"rm -rf node_modules && rm -rf package-lock.json",test:"gulp test",watch:"NODE_NO_HTTP2=1 gulp watch",audit:"npx audit-ci --config audit-ci.json",patch:"./env/dev/release.sh --importance=patch",minor:"./env/dev/release.sh --importance=minor",major:"./env/dev/release.sh --importance=major",lint:"eslint --color ./src ./test ./gulpfile.js","lint:fix":"npm --silent run lint -- --fix",prettier:"prettier --check ./src ./test ./prototype/*.html gulpfile.js","prettier:fix":"prettier --write ./src ./test ./prototype/*.html gulpfile.js"},engines:{node:"^20.12.2",npm:"^10.5.0"},keywords:["webcam","video","videomail","encoder","getusermedia","audio","recorder"],prettier:"./prettier.config.js",dependencies:{"@babel/core":"7.25.2","add-eventlistener-with-options":"1.25.5",animitter:"3.0.0","audio-sample":"3.0.1","canvas-to-buffer":"4.0.1","classlist.js":"1.1.20150312",contains:"0.1.1","core-js":"3.37.1","create-error":"0.3.1",deepmerge:"4.3.1",defined:"1.0.1",despot:"2.0.0","document-visibility":"1.0.1","element-closest":"3.0.2",filesize:"10.1.4","format-util":"1.0.5","get-form-data":"3.0.0",hidden:"1.1.1","humanize-duration":"3.32.1",hyperscript:"2.0.2",inherits:"2.0.4","insert-css":"2.0.0","iphone-inline-video":"2.2.2","is-power-of-two":"1.0.0",keymirror:"0.1.1","number-is-integer":"2.0.0",readystate:"0.4.1","request-frame":"1.5.3","safe-json-stringify":"1.2.0",superagent:"8.1.2","ua-parser-js":"1.0.38","websocket-stream":"5.5.2"},devDependencies:{"@babel/eslint-parser":"7.25.1","@babel/plugin-transform-runtime":"7.24.7","@babel/preset-env":"7.25.3","audit-ci":"7.1.0",autoprefixer:"10.4.20",babelify:"10.0.0","body-parser":"1.20.2",browserify:"17.0.0","connect-send-json":"1.0.0",cssnano:"6.0.5",del:"6.1.1",eslint:"8.57.0","eslint-config-prettier":"9.1.0","eslint-plugin-import":"2.29.1","eslint-plugin-node":"11.1.0","eslint-plugin-promise":"6.2.0","fancy-log":"2.0.0",glob:"10.4.2",gulp:"4.0.2","gulp-bump":"3.2.0","gulp-bytediff":"1.0.0","gulp-concat":"2.6.1","gulp-connect":"5.7.0","gulp-derequire":"3.0.0","gulp-if":"3.0.0","gulp-inject-string":"1.1.2","gulp-load-plugins":"2.0.8","gulp-plumber":"1.2.1","gulp-postcss":"10.0.0","gulp-rename":"2.0.0","gulp-sourcemaps":"3.0.0","gulp-stylus":"3.0.1","gulp-terser":"2.1.0",minimist:"1.2.8",nib:"1.2.0",postcss:"8.4.40",prettier:"3.3.3",router:"1.3.8",tape:"5.8.1","tape-catch":"1.0.6","tape-run":"11.0.0","vinyl-buffer":"1.0.1","vinyl-source-stream":"2.0.0",watchify:"4.0.0"}}},{}],118:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i,o,a=r(e("deepmerge")),s=r(e("readystate")),u=r(e("inherits")),c=r(e("./options")),l=r(e("./constants")),f=r(e("./events")),d=r(e("./util/collectLogger")),h=r(e("./util/eventEmitter")),p=r(e("./wrappers/container")),m=r(e("./wrappers/visuals/replay")),y=r(e("./wrappers/optionsWrapper")),b=r(e("./util/browser")),g=r(e("./resource"));var v=function(e){var t,n,r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,a.default)(c.default,e,{arrayMerge:function(e,t){return t}});return i||(i=new d.default(t)),t.logger=i,t.debug=t.logger.debug,y.default.addFunctions(t),t}(e),u=new p.default(r),l=r.debug;h.default.call(this,r,"VideomailClient"),this.events=f.default,this.show=function(){u.isBuilt()?u.show():this.once(f.default.BUILT,u.show)},this.replay=function(e,n){s.default.interactive((function(){if("string"==typeof n&&(n=document.getElementById(n)),n)u.isOutsideElementOf(n)&&(t=new m.default(n,r)).build();else if(u.isBuilt()||u.build(),!u.hasElement())throw s.default.removeAllListeners(),new Error("Unable to replay video without a container nor parent element.");t||(t=u.getReplay()),n||(n=t.getParentElement()),e&&(e=u.addPlayerDimensions(e,n)),u.isOutsideElementOf(n)?u.hideForm({deep:!0}):u.loadForm(e),setTimeout((function(){t.setVideomail(e),u.showReplayOnly()}),1e3)}))},this.startOver=function(e){t&&(t.hide(),t.reset()),u.startOver(e)},this.unload=function(e){s.default.removeAllListeners(),u.unload(e)},this.hide=function(){u.hide()},this.get=function(e,t){new g.default(r).get(e,(function(e,n){e?t(e):t(null,u.addPlayerDimensions(n))}))},this.canRecord=function(){return function(e){return o||(o=new b.default(e)),o}(r).canRecord()},this.isDirty=function(){return u.isDirty()},this.isRecording=function(){return u.isRecording()},this.submit=function(){u.submit()},this.getLogLines=function(){if(r.logger&&r.logger.getLines)return r.logger.getLines()},n=!1,s.default.interactive((function(e){l("Client: interactive(),","previousState =","".concat(e,","),"!building =","".concat(!n,","),"!isBuilt() =",!u.isBuilt()),n||u.isBuilt()||(n=!0,u.build(),n=!1)}))};(0,u.default)(v,h.default),Object.keys(l.default.public).forEach((function(e){v[e]=l.default.public[e]})),v.events=f.default;n.default=v},{"./constants":119,"./events":120,"./options":121,"./resource":122,"./util/browser":124,"./util/collectLogger":125,"./util/eventEmitter":126,"./wrappers/container":133,"./wrappers/optionsWrapper":136,"./wrappers/visuals/replay":146,"@babel/runtime/helpers/interopRequireDefault":3,deepmerge:25,inherits:64,readystate:95}],119:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default={SITE_NAME_LABEL:"x-videomail-site-name",VERSION_LABEL:"videomailClientVersion",public:{ENC_TYPE_APP_JSON:"application/json",ENC_TYPE_FORM:"application/x-www-form-urlencoded"}}},{}],120:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("keymirror"));n.default=(0,i.default)({BUILT:null,FORM_READY:null,LOADING_USER_MEDIA:null,USER_MEDIA_READY:null,CONNECTING:null,CONNECTED:null,DISCONNECTED:null,COUNTDOWN:null,RECORDING:null,STOPPING:null,STOPPED:null,PROGRESS:null,BEGIN_AUDIO_ENCODING:null,BEGIN_VIDEO_ENCODING:null,RESETTING:null,PAUSED:null,RESUMING:null,PREVIEW:null,PREVIEW_SHOWN:null,REPLAY_SHOWN:null,INVALID:null,VALIDATING:null,VALID:null,SUBMITTING:null,SUBMITTED:null,ERROR:null,BLOCKING:null,SENDING_FIRST_FRAME:null,FIRST_FRAME_SENT:null,HIDE:null,NOTIFYING:null,ENABLING_AUDIO:null,DISABLING_AUDIO:null,LOADED_META_DATA:null,EVENT_EMITTED:null,GOING_BACK:null,STARTING_OVER:null,ASKING_WEBCAM_PERMISSION:null,VISIBLE:null,INVISIBLE:null,SWITCH_FACING_MODE:null,SERVER_READY:null})},{"@babel/runtime/helpers/interopRequireDefault":3,keymirror:71}],121:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("../../package.json"),i="production"===t.env.NODE_ENV;n.default={logger:null,logStackSize:30,verbose:!i,baseUrl:"https://videomail.io",socketUrl:"wss://videomail.io",siteName:"videomail-client-demo",cache:!0,insertCss:!0,enablePause:!0,enableAutoPause:!0,enableSpace:!0,submitWithVideomail:!1,disableSubmit:!1,enableAutoValidation:!0,enableAutoSubmission:!0,enctype:"application/json",selectors:{containerId:"videomail",replayClass:"replay",userMediaClass:"userMedia",visualsClass:"visuals",buttonClass:null,buttonsClass:"buttons",recordButtonClass:"record",pauseButtonClass:"pause",resumeButtonClass:"resume",previewButtonClass:"preview",recordAgainButtonClass:"recordAgain",submitButtonClass:"submit",subjectInputName:"subject",fromInputName:"from",toInputName:"to",ccInputName:"cc",bccInputName:"bcc",bodyInputName:"body",sendCopyInputName:"sendCopy",keyInputName:"videomail_key",parentKeyInputName:"videomail_parent_key",aliasInputName:"videomail_alias",formId:null,submitButtonId:null,submitButtonSelector:null},audio:{enabled:!1,switch:!1,volume:.2,bufferSize:"auto"},video:{fps:15,limitSeconds:30,countdown:3,width:"auto",height:"auto",facingMode:"user",facingModeButton:!1,stretch:!1},image:{quality:.42,types:["webp","jpeg"]},text:{pausedHeader:"Paused",pausedHint:null,sending:"Teleporting",encoding:"Encoding",limitReached:"Limit reached",audioOff:"Audio off",audioOn:"Audio on",buttons:{record:"Record video",recordAgain:"Record again",resume:"Resume",pause:"Pause",preview:"Preview"}},notifier:{entertain:!1,entertainClass:"bg",entertainLimit:6,entertainInterval:9e3},timeouts:{userMedia:2e4,connection:1e4,pingInterval:35e3},loadUserMediaOnRecord:!1,callbacks:{adjustFormDataBeforePosting:null},defaults:{from:null,to:null,cc:null,bcc:null,subject:null,body:null},playerOnly:!1,displayErrors:!0,adjustFormOnBrowserError:!1,reportErrors:!1,fakeUaString:null,version:r.version}}).call(this)}).call(this,e("_process"))},{"../../package.json":117,_process:77}],122:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var t={};function n(t,n){return e.defaults[n]&&!t[n]&&(t[n]=e.defaults[n]),t}function r(e,t){return t&&t.body&&t.body.error&&!(e=t.body.error).message&&t.text&&(e.message=t.text),e}function u(n,u,c,l){l||(l=c,c=null);var f={},d="".concat(e.baseUrl,"/videomail/");c&&(d+=c);var h=(0,i.default)(n,d);f[o.default.SITE_NAME_LABEL]=e.siteName,h.query(f).set("Timezone-Id",s).send(u).timeout(e.timeout).end((function(n,i){if(n=r(n,i))l(n);else{var o=i.body&&i.body.videomail?i.body.videomail:null;e.cache&&u[a]&&(t[u[a]]=o),l(null,o,i.body)}}))}this.get=function(n,u){e.cache&&t[n]?setTimeout((function(){u(null,t[n])}),0):function(n,u){i.default.get("/videomail/".concat(n,"/snapshot")).set("Accept","application/json").set("Timezone-Id",s).set(o.default.SITE_NAME_LABEL,e.siteName).timeout(e.timeouts.connection).end((function(n,i){if(n=r(n,i))u(n);else{var o=i.body?i.body:null;e.cache&&(t[a]=o),u(null,o)}}))}(n,u)},this.reportError=function(t,n){var a={},s="".concat(e.baseUrl,"/client-error/"),u=(0,i.default)("post",s);a[o.default.SITE_NAME_LABEL]=e.siteName,u.query(a).send(t).timeout(e.timeout).end((function(e,t){(e=r(e,t))?n&&n(e):n&&n()}))},this.post=function(t,r){(t=function(t){return e.defaults&&(t=n(t,"from"),t=n(t,"to"),t=n(t,"cc"),t=n(t,"bcc"),t=n(t,"subject"),t=n(t,"body")),t}(t))[o.default.VERSION_LABEL]=e.version,e.callbacks.adjustFormDataBeforePosting?e.callbacks.adjustFormDataBeforePosting(t,(function(e,t){e?r(e):u("post",t,r)})):u("post",t,r)},this.put=function(e,t){u("put",e,e.key,t)},this.form=function(t,n,a){var u;switch(e.enctype){case o.default.public.ENC_TYPE_APP_JSON:u="json";break;case o.default.public.ENC_TYPE_FORM:u="form";break;default:setTimeout((function(){a(new Error("Invalid enctype given: ".concat(e.enctype)))}),0)}u&&i.default.post(n).type(u).set("Timezone-Id",s).send(t).timeout(e.timeout).end((function(e,t){(e=r(e,t))?a(e):a(null,t)}))}};var i=r(e("superagent")),o=r(e("./constants")),a="alias",s=Intl.DateTimeFormat().resolvedOptions().timeZone},{"./constants":119,"@babel/runtime/helpers/interopRequireDefault":3,superagent:104}],123:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){var n,r,c,l=new o.default(t);function f(){return window.AudioContext||window.webkitAudioContext}function d(){return Boolean(f())&&Boolean(h())}function h(){if(!c){var e=f();c=new e}return c}this.init=function(e){t.debug("AudioRecorder: init()");var i=h().createGain();try{r=h().createMediaStreamSource(e)}catch(e){throw a.default.create("Webcam has no audio",e.toString(),t)}var o=t.audio.bufferSize;if("auto"===o&&(o=l.isFirefox()?512:2048),!(0,s.default)(o))throw a.default.create("Audio buffer size must be a power of two.",t);if(!t.audio.volume||t.audio.volume>1)throw a.default.create("Audio volume must be between zero and one.",t);i.gain.value=t.audio.volume,n=h().createScriptProcessor(o,u,u),r.connect(n),n.connect(h().destination),r.connect(i),i.connect(n)},this.record=function(r){t.debug("AudioRecorder: record()"),n.onaudioprocess=function(t){!function(t,n){if(e.isRecording()&&!e.isPaused()){var r=t.inputBuffer.getChannelData(0);n(new i.default(r))}}(t,r)}},this.stop=function(){t.debug("AudioRecorder: stop()"),n&&(n.onaudioprocess=void 0),r&&r.disconnect(),d()&&(h().close?h().close().then((function(){t.debug("AudioRecorder: audio context is closed"),c=null})).catch((function(e){throw a.default.create(e,t)})):c=null)},this.getSampleRate=function(){return d()?h().sampleRate:-1}};var i=r(e("audio-sample")),o=r(e("./browser")),a=r(e("./videomailError")),s=r(e("is-power-of-two")),u=1},{"./browser":124,"./videomailError":131,"@babel/runtime/helpers/interopRequireDefault":3,"audio-sample":11,"is-power-of-two":69}],124:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("@babel/runtime/helpers/typeof")),o=r(e("defined")),a=r(e("ua-parser-js")),s=r(e("./videomailError"));n.default=function(e){e||(e={});var t,n="http://www.mozilla.org/firefox/update/",r="https://www.microsoft.com/en-us/download/details.aspx?id=48126",u="http://www.google.com/chrome/",c="http://www.chromium.org/getting-involved/download-chromium",l=(0,o.default)(e.fakeUaString,"undefined"!=typeof window&&window.navigator&&window.navigator.userAgent,""),f=new a.default(l).getResult(),d="iOS"===f.os.name,h=parseFloat(f.browser.version),p="Chrome"===f.browser.name,m="Brave"===f.browser.name,y="Chromium"===f.browser.name,b="Firefox"===f.browser.name,g=parseFloat(f.os.version),v="Windows"===f.os.name,w="Edge"===f.browser.name||v&&g>=10,E=/IE/.test(f.browser.name),_=/Safari/.test(f.browser.name),R=/Opera/.test(f.browser.name),S=/Android/.test(f.os.name),A=p||y,O="Facebook"===f.browser.name,k=d||S,T=_&&h>=11,x=d&&g>=11,j=d&&g<11,M=e.fakeHttps||"https:"===window.location.protocol,C=A||b||S||R||w||T||x||m,N=this;function D(){var e;return(e=j?"On iPads or iPhones below iOS v11 this camera feature is missing.<br/><br/>For now, we recommend you to upgrade iOS or to use an Android device.":function(){var e;return b?e=d?"Firefox on iOS is not ready for cameras yet. Hopefully in near future ...":'Probably you need to <a href="'.concat(n,'" target="_blank">')+"upgrade Firefox</a> to fix this.":p?e=d?"Use Safari instead. Apple doesn't give Chrome access to iPhone cameras (booo).":'Probably you need to <a href="'.concat(u,'" target="_blank">')+"upgrade Chrome</a> to fix this.":y?e='Probably you need to <a href="'.concat(c,'" target="_blank">')+"upgrade Chromium</a> to fix this.":E?e="Instead of Internet Explorer you need to upgrade to"+' <a href="'.concat(r,'" target="_blank">Edge</a>.'):T?e="Probably you need to shut down Safari and restart it, this for correct webcam access.":_&&(e="Safari below version 11 has no webcam support.<br/>Better upgrade Safari or pick"+' <a href="'.concat(u,'" target="_blank">Chrome</a>,')+' <a href="'.concat(n,'" target="_blank">Firefox</a> or Android.')),e}())||(e=N.isChromeBased()||N.isFirefox()||_?"For the webcam feature, your browser needs an upgrade.":O?"Hence we recommend you to use a real browser like "+'<a href="'.concat(u,'" target="_blank">Chrome</a>, ')+'<a href="'.concat(n,'" target="_blank">Firefox</a> or ')+'<a href="'.concat(r,'" target="_blank">Edge</a>.'):"Hence we recommend you to use either "+'<a href="'.concat(u,'" target="_blank">Chrome</a>, ')+'<a href="'.concat(n,'" target="_blank">Firefox</a>, ')+'<a href="'.concat(r,'" target="_blank">Edge</a> or Android.')),e}function I(e,t){var n;return e&&e.canPlayType&&(n=e.canPlayType("video/".concat(t))),""!==n&&n}this.canRecord=function(){var e="undefined"!=typeof navigator,t=!1;e&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?t=!0:t="function"===(e&&(0,i.default)(navigator.getUserMedia_));return t},this.checkRecordingCapabilities=function(){var t;if(M){if(!C||!this.canRecord()){var n,r=[];j?r.push(s.default.IOS_PROBLEM):r.push(s.default.BROWSER_PROBLEM),n=C?k?O?"Sorry, the Facebook app cannot record from your mobile camera":"Sorry, your browser cannot record from your mobile camera":"Sorry, your browser cannot record from webcams":k?"Sorry, your browser is unable to use your mobile camera":"Sorry, your browser is unable to use webcams",j&&(e.reportErrors=!1),t=s.default.create({message:n},D(),e,{classList:r})}}else t=s.default.create({message:"Sorry, your page is insecure"},"Please switch to HTTPS to ensure all is encrypted.",e,{classList:[s.default.BROWSER_PROBLEM]});return t},this.checkBufferTypes=function(){var t;return"undefined"==typeof window||void 0===window.atob?t=s.default.create("atob is not supported",e):void 0===window.ArrayBuffer?t=s.default.create("ArrayBuffers are not supported",e):void 0===window.Uint8Array&&(t=s.default.create("Uint8Arrays are not supported",e)),t},this.getVideoType=function(e){return!t&&e&&(I(e,"mp4")?t="mp4":I(e,"webm")&&(t="webm")),"webm"!==t&&"mp4"!==t&&(t="mp4"),t&&""!==t||(t="mp4"),t},this.getNoAccessIssue=function(){var t;return t=this.isChromeBased()?"Click on the allow button to grant access to your webcam.":this.isFirefox()?"Please grant Firefox access to your webcam.":"Your system does not let your browser access your webcam.",s.default.create("Unable to access webcam",t,e)},this.isChromeBased=function(){return A},this.isFirefox=function(){return b},this.isEdge=function(){return w},this.isAndroid=function(){return S},this.isMobile=function(){return"mobile"===f.device.type},this.isOkSafari=function(){return T},this.isIOS=function(){return d},this.getUsefulData=function(){return{browser:f.browser,device:f.device,os:f.os,engine:f.engine,userAgent:l}}}},{"./videomailError":131,"@babel/runtime/helpers/interopRequireDefault":3,"@babel/runtime/helpers/typeof":7,defined:27,"ua-parser-js":110}],125:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new o.default(e),n=e.logger||console,r=e.selectors&&e.selectors.containerId||"undefined container id",s=[];function u(t,n){var r=a.default.apply(void 0,(0,i.default)(n));return s.length>e.logStackSize&&s.pop(),s.push("[".concat(t,"] ").concat(r)),r}function c(e){return"#".concat(r," [").concat((new Date).toLocaleTimeString(),"] > ").concat(e)}this.debug=function(){var r=[].slice.call(arguments,0);r[0]=c(r[0]);var i=u("debug",r);e.verbose&&(t.isFirefox()?n.debug(i):n.groupCollapsed?(n.groupCollapsed(i),n.trace("Trace"),n.groupEnd()):n.debug?n.debug(i):console.log(i))},this.error=function(){var e=[].slice.call(arguments,0);e[0]=c(e[0]),n.error(u("error",e))},this.warn=function(){var e=[].slice.call(arguments,0);e[0]=c(e[0]),n.warn(u("warn",e))},this.getLines=function(){return s}};var i=r(e("@babel/runtime/helpers/toConsumableArray")),o=r(e("./browser")),a=r(e("format-util"))},{"./browser":124,"@babel/runtime/helpers/interopRequireDefault":3,"@babel/runtime/helpers/toConsumableArray":6,"format-util":45}],126:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){this.emit=function(n){var r,u=Array.prototype.slice.call(arguments,0);if(!n)throw a.default.create("You cannot emit without an event.",e);if(n===s.default.ERROR){var c=u[1];c=a.default.create(c,e),u[1]=c}e.debug&&("removeListener"!==n&&"newListener"!==n&&(u[1]&&(r=u.slice(1)),r?e.debug("%s emits: %s",t,n,(0,o.default)(r)):e.debug("%s emits: %s",t,n)));return i.default.emit.apply(i.default,u)},this.on=function(e,t){return i.default.on(e,t)},this.once=function(e,t){return i.default.once(e,t)},this.listeners=function(e){return i.default.listeners(e)},this.removeListener=function(e,t){return i.default.removeListener(e,t)},this.removeAllListeners=function(){i.default.removeAllListeners()}};var i=r(e("despot")),o=r(e("safe-json-stringify")),a=r(e("./videomailError")),s=r(e("./../events"))},{"./../events":120,"./videomailError":131,"@babel/runtime/helpers/interopRequireDefault":3,despot:28,"safe-json-stringify":99}],127:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=e("filesize"),o=r(e("humanize-duration"));n.default={filesize:function(e,t){return(0,i.filesize)(e,{round:t})},toTime:function(e){return(0,o.default)(e)}}},{"@babel/runtime/helpers/interopRequireDefault":3,filesize:44,"humanize-duration":60}],128:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=["loadstart","suspend","progress","abort","emptied","stalled","pause","loadeddata","waiting","playing","canplay","canplaythrough","seeking","seeked","ended","ratechange","durationchange","volumechange"]},{}],129:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){if(null===e)return"null";if(void 0===e)return"undefined";if("string"==typeof e)return e;if(Array.isArray(e))return function(e){if(e&&e.length>0){var t=[];return e.forEach((function(e){e&&t.push((0,o.default)(e))})),a+t.join(s)}}(e);if("object"===(0,i.default)(e))return function(e,t){var n,r=Object.getOwnPropertyNames(e),i=t&&t.excludes||[],u=[];if(i.push("stack"),r&&r.length>0){var c=!1;r.forEach((function(t){i&&(c=i.indexOf(t)>=0),!c&&e[t]&&u.push((0,o.default)(e[t]))}))}1===u.length?n=u.join():u.length>1&&(n=a+u.join(s));return n}(e,t);return e.toString()};var i=r(e("@babel/runtime/helpers/typeof")),o=r(e("safe-json-stringify")),a="- ",s="<br/>".concat(a)},{"@babel/runtime/helpers/interopRequireDefault":3,"@babel/runtime/helpers/typeof":7,"safe-json-stringify":99}],130:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.screen||(e.screen={});(0,i.default)("native"),t.mediaDevices&&t.mediaDevices.getUserMedia||(t.getUserMedia_=t.getUserMedia||t.webkitGetUserMedia||t.mozGetUserMedia||t.msGetUserMedia);!e.AudioContext&&e.webkitAudioContext&&(e.AudioContext=e.webkitAudioContext);e.URL||(e.URL=e.webkitURL||e.mozURL||e.msURL);t.connection||(t.connection=t.mozConnection||t.webkitConnection);var n,r=["debug","groupCollapsed","groupEnd","error","exception","info","log","trace","warn"],o={};e.console?o=e.console:e.console=function(){};var a=r.length;for(;a--;)o[n=r[a]]||(o[n]=function(){})},e("classlist.js");var i=r(e("request-frame"))},{"@babel/runtime/helpers/interopRequireDefault":3,"classlist.js":20,"request-frame":97}],131:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("@babel/runtime/helpers/typeof")),o=r(e("./../resource")),a=r(e("create-error")),s=r(e("./pretty")),u=r(e("safe-json-stringify")),c="Videomail Error",l=(0,a.default)(Error,c,{explanation:void 0,logLines:void 0,useragent:void 0,url:void 0,stack:void 0}),f=function(e){return(0,s.default)(e,{excludes:["stack"]})};l.PERMISSION_DENIED="PERMISSION_DENIED",l.NOT_ALLOWED_ERROR="NotAllowedError",l.NOT_CONNECTED="Not connected",l.DOM_EXCEPTION="DOMException",l.STARTING_FAILED="Starting video failed",l.MEDIA_DEVICE_NOT_SUPPORTED="MediaDeviceNotSupported",l.BROWSER_PROBLEM="browser-problem",l.WEBCAM_PROBLEM="webcam-problem",l.IOS_PROBLEM="ios-problem",l.OVERCONSTRAINED="OverconstrainedError",l.NOT_FOUND_ERROR="NotFoundError",l.NOT_READABLE_ERROR="NotReadableError",l.SECURITY_ERROR="SecurityError",l.TRACK_START_ERROR="TrackStartError",l.INVALID_STATE_ERROR="InvalidStateError",l.create=function(t,n,r,a){if(t&&t.name===c)return t;!r&&n&&(r=n,n=void 0),r||(r={}),a||(a={});var s=r&&r.debug||console.log,d=r&&r.isAudioEnabled&&r.isAudioEnabled();s("VideomailError: create()",t,n||"(no explanation set)");var h,p,m,y=a.classList||[],b=new(0,e("./browser").default)(r);switch("object"===(0,i.default)(t)?t.name===l.TRACK_START_ERROR?h=l.TRACK_START_ERROR:t.name===l.SECURITY_ERROR?h=l.SECURITY_ERROR:8===t.code&&t.name===l.NotFoundError?h=l.NotFoundError:35===t.code||t.name===l.NOT_ALLOWED_ERROR?h=l.NOT_ALLOWED_ERROR:1===t.code&&1===t.PERMISSION_DENIED?h=l.PERMISSION_DENIED:t.constructor&&t.constructor.name===l.DOM_EXCEPTION?h=t.name===l.NOT_READABLE_ERROR?l.NOT_READABLE_ERROR:l.DOM_EXCEPTION:t.constructor&&t.constructor.name===l.OVERCONSTRAINED?h=l.OVERCONSTRAINED:t.message===l.STARTING_FAILED?h=t.message:t.name?h=t.name:"error"===t.type&&0===t.target.bufferedAmount&&(h=l.NOT_CONNECTED):h=t===l.NOT_CONNECTED?l.NOT_CONNECTED:t,m=t&&t.stack?t.stack:(new Error).stack,h){case l.SECURITY_ERROR:p="The operation was insecure",n="Probably you have disallowed Cookies for this page?",y.push(l.BROWSER_PROBLEM);break;case l.OVERCONSTRAINED:p="Invalid webcam constraints",n=t.constraint?"width"===t.constraint?"Your webcam does not meet the width requirement.":"Unmet constraint: ".concat(t.constraint):t.toString();break;case"MediaDeviceFailedDueToShutdown":p="Webcam is shutting down",n="This happens your webcam is already switching off and not giving you permission to use it.";break;case"SourceUnavailableError":p="Source of your webcam cannot be accessed",n="Probably it is locked from another process or has a hardware error.",t.message&&(t.message+=" Details: ".concat(t.message));break;case l.NOT_FOUND_ERROR:case"NO_DEVICES_FOUND":d?(p="No webcam nor microphone found",n="Your browser cannot find a webcam with microphone attached to your machine."):(p="No webcam found",n="Your browser cannot find a webcam attached to your machine."),y.push(l.WEBCAM_PROBLEM);break;case"PermissionDismissedError":p="Ooops, you didn't give me any permissions?",n="Looks like you skipped the webcam permission dialogue.<br/>Please grant access next time the dialogue appears.",y.push(l.WEBCAM_PROBLEM);break;case l.NOT_ALLOWED_ERROR:case l.PERMISSION_DENIED:case"PermissionDeniedError":p="Permission denied",n="Cannot access your webcam. This can have two reasons:<br/>a) you blocked access to webcam; or<br/>b) your webcam is already in use.",y.push(l.WEBCAM_PROBLEM);break;case"HARDWARE_UNAVAILABLE":p="Webcam is unavailable",n="Maybe it is already busy in another window?",(b.isChromeBased()||b.isFirefox())&&(n+=" Or you have to allow access above?"),y.push(l.WEBCAM_PROBLEM);break;case l.NOT_CONNECTED:p="Unable to connect",n="Either the videomail server or your connection is down. Trying to reconnect every few seconds …";break;case"NO_VIDEO_FEED":p="No video feed found!",n="Your webcam is already used in another browser.",y.push(l.WEBCAM_PROBLEM);break;case l.STARTING_FAILED:p="Starting video failed",n="Most likely this happens when the webam is already active in another browser.",y.push(l.WEBCAM_PROBLEM);break;case"DevicesNotFoundError":p="No available webcam could be found",n="Looks like you do not have any webcam attached to your machine; or the one you plugged in is already used.",y.push(l.WEBCAM_PROBLEM);break;case l.NOT_READABLE_ERROR:case l.TRACK_START_ERROR:p="No access to webcam",n="A hardware error occurred which prevented access to your webcam.",y.push(l.WEBCAM_PROBLEM);break;case l.INVALID_STATE_ERROR:p="Invalid state",n="Video recording stream from your webcam already has finished.",y.push(l.WEBCAM_PROBLEM);break;case l.DOM_EXCEPTION:switch(t.code){case 8:p="Requested webcam not found",n="A webcam is needed but could not be found.",y.push(l.WEBCAM_PROBLEM);break;case 9:var g="https:".concat(window.location.href.substring(window.location.protocol.length));p="Security upgrade needed",n='Click <a href="'.concat(g,'">here</a> to switch to HTTPs which is more safe ')+" and enables encrypted videomail transfers.",y.push(l.BROWSER_PROBLEM);break;case 11:p="Invalid State",n="The object is in an invalid, unusable state.",y.push(l.BROWSER_PROBLEM);break;default:p="DOM Exception",n=f(t),y.push(l.BROWSER_PROBLEM)}break;case l.MEDIA_DEVICE_NOT_SUPPORTED:p="Media device not supported",n=f(t);break;default:var v=n;if(n&&"object"===(0,i.default)(n)&&(n=f(n)),!n&&v&&(n=v.message?v.message:"Inspected: ".concat((0,u.default)(v))),t)if("string"==typeof t)p=t;else if(t.message&&(p=f(t.message)),t.explanation&&(n?n+=";<br/>".concat(f(t.explanation)):n=f(t.explanation)),t.details){var w=f(t.details);n?n+=";<br/>".concat(w):n=w}p||(h&&(p=h),!n&&t&&(n=f(t)),f(p)===n&&(n=void 0))}var E=null;r.logger&&r.logger.getLines&&(E=r.logger.getLines()),m&&((p=new Error(p)).stack=m);var _="none";t&&(_="code=".concat(t.code?t.code:"undefined"),_+=", type=".concat(t.type?t.type:"undefined"),_+=", name=".concat(t.name?t.name:"undefined"),_+=", message=".concat(t.message?t.message:"undefined"));var R,S=new l(p,{explanation:n,logLines:E,client:b.getUsefulData(),url:window.location.href,siteName:r.siteName,code:_,stack:m}),A=!1;function O(e){return y.indexOf(e)>=0}return r.reportErrors&&(A="function"==typeof r.reportErrors?r.reportErrors(S):r.reportErrors),A&&(R=new o.default(r)),R&&R.reportError(S,(function(e){e&&console.error("Unable to report error",e)})),S.getClassList=function(){return y},S.removeDimensions=function(){return O(l.IOS_PROBLEM)||b.isMobile()},S.hideButtons=function(){return O(l.BROWSER_PROBLEM)||a.browserProblem||O(l.IOS_PROBLEM)},S.hideForm=function(){return O(l.IOS_PROBLEM)},S};n.default=l},{"./../resource":122,"./browser":124,"./pretty":129,"@babel/runtime/helpers/interopRequireDefault":3,"@babel/runtime/helpers/typeof":7,"create-error":24,"safe-json-stringify":99}],132:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("contains")),o=r(e("hidden")),a=r(e("hyperscript")),s=r(e("inherits")),u=r(e("../events")),c=r(e("../util/eventEmitter")),l=function(e,t){c.default.call(this,t,"Buttons");var n,r,s,l,f,d,h,p,m,y,b=this,g=t.debug;function v(e){e&&!Array.isArray(e)&&(e=[e]),e&&e.forEach((function(e){(0,o.default)(e,!0)}))}function w(e){e&&!Array.isArray(e)&&(e=[e]),e&&e.forEach((function(e){(0,o.default)(e,!1)}))}function E(e){var t=e&&!0;return e&&!Array.isArray(e)&&(e=[e]),e&&e.forEach((function(e){t&&(t=e&&!(0,o.default)(e))})),t}function _(e){e&&!Array.isArray(e)&&(e=[e]),e&&e.forEach((function(e){e&&("INPUT"===e.tagName||"BUTTON"===e.tagName?e.disabled=!0:e.classList.add("disabled"))}))}function R(e){e&&!Array.isArray(e)&&(e=[e]),e&&e.forEach((function(e){e&&("INPUT"===e.tagName||"BUTTON"===e.tagName?e.disabled=!1:e.classList.remove("disabled"))}))}function S(e,t,n,r){return r&&_(e),n?e.type=n:e.type||(e.type="button"),!t&&v(e),e}function A(e,t){e.onclick=function(e){e&&e.preventDefault();try{t({event:e})}catch(e){b.emit(u.default.ERROR,e)}}}function O(e){var t,r;return e.id&&(t=document.getElementById(e.id)),t||(t=(0,a.default)("input#".concat(e.id),{type:"radio",name:e.name,value:e.value,checked:e.checked}),r=(0,a.default)("span.radioGroup",t,(0,a.default)("label",{htmlFor:e.id},e.label)),h&&(0,i.default)(n,h)?n.insertBefore(r,h):n.appendChild(r)),e.changeHandler&&(t.onchange=e.changeHandler),_(t),[t,r]}function k(e,r,o,s,u,c,l){var f,d=!(arguments.length>7&&void 0!==arguments[7])||arguments[7];return(f=u?document.getElementById(u):l?document.querySelector(l):n.querySelector(".".concat(e)))?f=S(f,s,c,d):(t.selectors.buttonClass&&(e+=".".concat(t.selectors.buttonClass)),(f=S(f=(0,a.default)("button.".concat(e)),s,c,d)).innerHTML=r,h&&(0,i.default)(n,h)?n.insertBefore(f,h):n.appendChild(f)),o&&A(f,o),f}function T(e){E(d)||e.paused||w(r),e.paused||(_(f),v(f)),t.enableAutoValidation||R(h),e.recordWhenReady||(E(p)&&R(p),E(m)&&R(m))}function x(){v(r),v(d),s&&(w(s),R(s)),R(f),w(f)}function j(){_(d),e.beginWaiting(),e.recordAgain()}function M(){e.submit()}function C(t){_(r),e.record(t)}function N(){g("Buttons: initEvents()"),b.on(u.default.USER_MEDIA_READY,(function(e){e.switchingFacingMode||function(e){T(e),E(r)&&!e.recordWhenReady&&R(r),t.enableAutoValidation&&_(h)}(e)})).on(u.default.PREVIEW,(function(){v(r),v(f),_(p),_(m),w(d),R(d),t.enableAutoValidation||R(h)})).on(u.default.PAUSED,(function(){b.adjustButtonsForPause()})).on(u.default.RECORDING,(function(e){!function(e){e>1?x():(_(m),_(p),_(d),_(r))}(e)})).on(u.default.FIRST_FRAME_SENT,(function(){x()})).on(u.default.RESUMING,(function(){v(l),v(r),s&&(R(s),w(s))})).on(u.default.STOPPING,(function(){_(f),_(r),v(s),v(l)})).on(u.default.COUNTDOWN,(function(){_(r),_(m),_(p)})).on(u.default.SUBMITTING,(function(){_(h),_(d)})).on(u.default.RESETTING,(function(){_(h),b.reset()})).on(u.default.INVALID,(function(){t.enableAutoValidation&&_(h)})).on(u.default.VALID,(function(){t.enableAutoValidation&&R(h)})).on(u.default.SUBMITTED,(function(){_(f),_(d),_(r),_(h)})).on(u.default.HIDE,(function(){v(r),v(f),v(d),v(l)})).on(u.default.FORM_READY,(function(e){T(e)})).on(u.default.REPLAY_SHOWN,(function(){b.hide()})).on(u.default.GOING_BACK,(function(){v(d),w(r),w(h)})).on(u.default.ENABLING_AUDIO,(function(){_(r),_(p),_(m)})).on(u.default.DISABLING_AUDIO,(function(){_(r),_(p),_(m)})).on(u.default.STARTING_OVER,(function(){w(h)})).on(u.default.CONNECTED,(function(){t.loadUserMediaOnRecord&&E(r)&&R(r)})).on(u.default.ERROR,(function(e){e.hideButtons&&e.hideButtons()&&t.adjustFormOnBrowserError&&b.hide()}))}this.enableSubmit=function(){R(h)},this.adjustButtonsForPause=function(){b.isCountingDown()||(s&&v(s),w(l),R(l),v(r),w(f),R(f))},this.reset=function(){t.debug("Buttons: reset()"),_(s),_(l),_(r),_(f),_(d)},this.isRecordAgainButtonEnabled=function(){return!d.disabled},this.isRecordButtonEnabled=function(){return!r.disabled},this.setSubmitButton=function(e){h=e},this.getSubmitButton=function(){return h},this.build=function(){(n=e.querySelector(".".concat(t.selectors.buttonsClass)))||(n=(0,a.default)("div.".concat(t.selectors.buttonsClass)),e.appendChild(n)),t.disableSubmit||(h?_(h):h=k(t.selectors.submitButtonClass,"Submit",null,!0,t.selectors.submitButtonId,"submit",t.selectors.submitButtonSelector,t.enableAutoValidation),!e.hasForm()&&h&&A(h,M)),r=k(t.selectors.recordButtonClass,t.text.buttons.record,C,!1),t.enablePause&&(s=k(t.selectors.pauseButtonClass,t.text.buttons.pause,e.pause,!1)),t.enablePause&&(l=k(t.selectors.resumeButtonClass,t.text.buttons.resume,e.resume,!1)),f=k(t.selectors.previewButtonClass,t.text.buttons.preview,e.stop,!1),d=k(t.selectors.recordAgainButtonClass,t.text.buttons.recordAgain,j,!1),t.audio&&t.audio.switch&&(m=O({id:"audioOffOption",name:"audio",value:"off",label:t.text.audioOff,checked:!t.isAudioEnabled(),changeHandler:function(){e.disableAudio()}}),p=O({id:"audioOnOption",name:"audio",value:"on",label:t.text.audioOn,checked:t.isAudioEnabled(),changeHandler:function(){e.enableAudio()}})),!y&&N(),y=!0},this.unload=function(){y=!1},this.hide=function(e){v(n),e&&e.deep&&(v(r),v(s),v(l),v(f),v(d),v(h))},this.show=function(){w(n)},this.isCountingDown=function(){return e.isCountingDown()}};(0,s.default)(l,c.default);n.default=l},{"../events":120,"../util/eventEmitter":126,"@babel/runtime/helpers/interopRequireDefault":3,contains:22,hidden:59,hyperscript:61,inherits:64}],133:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("document-visibility")),o=r(e("element-closest")),a=r(e("hidden")),s=r(e("insert-css")),u=r(e("inherits")),c=r(e("../../styles/css/main.min.css.js")),l=r(e("../events")),f=r(e("../resource")),d=r(e("../util/eventEmitter")),h=r(e("../util/videomailError")),p=r(e("./buttons")),m=r(e("./dimension")),y=r(e("./form")),b=r(e("./optionsWrapper")),g=r(e("./visuals"));(0,o.default)(window);var v=function(e){d.default.call(this,e,"Container");var t,n,r,o=this,u=(0,i.default)(),v=new g.default(this,e),w=new p.default(this,e),E=new f.default(e),_=document&&document.querySelector&&document.querySelector("html"),R=e.debug,S=!1,A=!1,O=!1;function k(){return"FORM"===t.tagName?t:e.selectors.formId?document.getElementById(e.selectors.formId):t.closest("form")}function T(){R("Container: initEvents()"),window.addEventListener("beforeunload",(function(e){o.unload(e)})),e.playerOnly||u.onChange((function(t){n&&(t?(e.isAutoPauseEnabled()&&o.isCountingDown()&&o.resume(),o.emit(l.default.VISIBLE)):(e.isAutoPauseEnabled()&&(o.isCountingDown()||o.isRecording())&&o.pause("document invisible"),o.emit(l.default.INVISIBLE)))})),e.enableSpace&&(e.playerOnly||window.addEventListener("keypress",(function(t){var n=t.target.tagName;t.target.isContentEditable||"true"===t.target.contentEditable||!0===t.target.contentEditable||"INPUT"===n||"TEXTAREA"===n||32===(t.keyCode?t.keyCode:t.which)&&(t.preventDefault(),e.enablePause?v.pauseOrResume():v.recordOrStop())}))),o.on(l.default.ERROR,(function(t){!function(t){S=!0,t.stack?e.logger.error(t.stack):e.logger.error(t),e.displayErrors?v.error(t):v.reset()}(t),M(t),t.removeDimensions&&t.removeDimensions()&&j()})),e.playerOnly||o.on(l.default.LOADED_META_DATA,(function(){x()}))}function x(){if(e.video.stretch)j();else{var n=v.getRecorderWidth(!0);if(n<1)throw h.default.create("Recorder width cannot be less than 1!",e);t.style.width="".concat(n,"px")}}function j(){t.style.width="auto"}function M(e){v.unload(e),w.unload(),o.endWaiting()}function C(t,n,r,i){r&&""!==r||(r=document.baseURI),n&&(t[e.selectors.aliasInputName]=n.videomail.alias,e.submitWithVideomail&&(t.videomail=n.videomail)),E.form(t,r,i)}function N(e,t,n,r,i){o.endWaiting(),e?o.emit(l.default.ERROR,e):(A=!0,r&&i&&i.body&&Object.keys(i.body).forEach((function(e){r[e]=i.body[e]})),o.emit(l.default.SUBMITTED,n,r||i),i&&"text/html"===i.type&&i.text&&(document.body.innerHTML=i.text))}function D(e){return e&&"POST"===e.toUpperCase()}this.addPlayerDimensions=function(e,t){try{return e.playerHeight=this.calculateHeight({responsive:!0,videoWidth:e.width,ratio:e.height/e.width},t),e.playerWidth=this.calculateWidth({responsive:!0,videoHeight:e.playerHeight,ratio:e.height/e.width}),e}catch(e){o.emit(l.default.ERROR,e)}},this.limitWidth=function(n){return m.default.limitWidth(t,n,e)},this.limitHeight=function(t){return m.default.limitHeight(t,e)},this.calculateWidth=function(t){return m.default.calculateWidth(b.default.merge(e,t,!0))},this.calculateHeight=function(n,r){return r||(r=t||document.body),m.default.calculateHeight(r,b.default.merge(e,n,!0))},this.areVisualsHidden=function(){return v.isHidden()},this.hasElement=function(){return Boolean(t)},this.build=function(){try{(t=document.getElementById(e.selectors.containerId))&&(e.insertCss&&(0,s.default)(c.default,{prepend:!0}),!n&&T(),function(){if(e.hasDefinedWidth()&&e.video.width%2!=0)throw h.default.create("Width must be divisible by two.",e);if(e.hasDefinedHeight()&&e.video.height%2!=0)throw h.default.create("Height must be divisible by two.",e)}(),x(),e.playerOnly||function(){var t=k();if(t){R("Container: buildForm()");var n=(r=new y.default(o,t,e)).findSubmitButton();n&&w.setSubmitButton(n),r.build()}}(),R("Container: buildChildren()"),t.classList?(t.classList.add("videomail"),e.playerOnly||w.build(),v.build()):o.emit(l.default.ERROR,h.default.create("Sorry, your browser is too old!",e)),S?R("Container: building failed due to an error."):(R("Container: built."),n=!0,o.emit(l.default.BUILT)))}catch(e){if(!v.isNotifierBuilt())throw e;o.emit(l.default.ERROR,e)}},this.getSubmitButton=function(){return w.getSubmitButton()},this.querySelector=function(e){return t.querySelector(e)},this.beginWaiting=function(){_.classList&&_.classList.add("wait")},this.endWaiting=function(){_.classList&&_.classList.remove("wait")},this.appendChild=function(e){t.appendChild(e)},this.insertBefore=function(e,n){t.insertBefore(e,n)},this.unload=function(e){R("Container: unload()",e);try{M(e),this.removeAllListeners(),n=A=!1}catch(e){o.emit(l.default.ERROR,e)}},this.show=function(){if(t&&((0,a.default)(t,!1),v.show(),!S)){var e=o.isPaused();e&&w.adjustButtonsForPause(),w.show(),o.isReplayShown()?o.emit(l.default.PREVIEW):o.emit(l.default.FORM_READY,"paused",e)}},this.hide=function(){R("Container: hide()"),S=!1,this.isRecording()&&this.pause(),v.hide(),A&&(w.hide(),(0,a.default)(t,!0))},this.startOver=function(e){try{o.emit(l.default.STARTING_OVER),A=!1,r.show(),v.back(e,(function(){e&&e.keepHidden?o.enableForm():o.show(e)}))}catch(e){o.emit(l.default.ERROR,e)}},this.showReplayOnly=function(){S=!1,this.isRecording()&&this.pause(),v.showReplayOnly(),A&&w.hide()},this.isNotifying=function(){return v.isNotifying()},this.isPaused=function(){return v.isPaused()},this.pause=function(e){v.pause(e)},this.validate=function(t){var n,i=!0;if(e.enableAutoValidation?t?i=t:o.isNotifying()?i=!1:v.isConnected()?i=v.isUserMediaLoaded()||v.isReplayShown():v.isConnecting()&&(i=!1):(i=!1,O=!0),i){this.emit(l.default.VALIDATING);var a,s=v.validate()&&w.isRecordAgainButtonEnabled();if(r){if(n=r.validate())this.areVisualsHidden()||s||((A||this.isReady()||this.isRecording()||this.isPaused()||this.isCountingDown())&&(n=!1),n||(a="Video is not recorded"));else{var u=r.getInvalidElement();a=u?"Form input named ".concat(u.name,' is invalid. It has the value: "').concat(u.value,'"'):"Form input(s) are invalid"}if(n){var c,f,d,h=r.getRecipients(),p="to"in h,m="cc"in h,y="bcc"in h,b=(null===(c=h.to)||void 0===c?void 0:c.length)>0,g=(null===(f=h.cc)||void 0===f?void 0:f.length)>0,E=(null===(d=h.bcc)||void 0===d?void 0:d.length)>0;p?b||(m&&y?g||E||(n=!1):m?g||(n=!1):y?E||(n=!1):a="Please configure the form to have at least one recipient."):m&&(g||y&&(E||(n=!1))),n||(a="Please enter at least one recipient.")}}else n=s;n?this.emit(l.default.VALID):this.emit(l.default.INVALID,a),O=n}return n},this.disableForm=function(e){r&&r.disable(e)},this.enableForm=function(e){r&&r.enable(e)},this.hasForm=function(){return Boolean(r)},this.isReady=function(){return w.isRecordButtonEnabled()},this.submitAll=function(t,n,i){var a=D(n);function s(){o.beginWaiting(),o.disableForm(!0),o.emit(l.default.SUBMITTING)}Boolean(t[e.selectors.keyInputName])?(s(),function(e,t,n){var i=r.transformFormData(e);D(t)||!t?(i.recordingStats=v.getRecordingStats(),i.width=v.getRecorderWidth(!0),i.height=v.getRecorderHeight(!0),navigator.connection&&(i.connection={downlink:"".concat(navigator.connection.downlink," Mbit/s"),effectiveType:navigator.connection.effectiveType,rtt:navigator.connection.rtt,type:navigator.connection.type}),E.post(i,n)):function(e){return e&&"PUT"===e.toUpperCase()}(t)&&E.put(i,n)}(t,n,(function(e,n,r){e?N(e,0,n,r):a?C(t,r,i,(function(e,t){N(e,0,n,r,t)})):N(null,0,n,r)}))):e.enableAutoSubmission&&(s(),C(t,null,i,(function(e,t){N(e,0,null,null,t)})))},this.isBuilt=function(){return n},this.isReplayShown=function(){return v.isReplayShown()},this.isDirty=function(){var e=!1;return r&&(v.isRecorderUnloaded()?e=!1:(this.isReplayShown()||this.isPaused())&&(e=!0)),e},this.getReplay=function(){return v.getReplay()},this.isOutsideElementOf=function(e){return e.parentNode!==t&&e!==t},this.hideForm=function(e){r&&r.hide(),w&&w.hide(e)},this.loadForm=function(e){r&&(r.loadVideomail(e),this.validate())},this.enableAudio=function(){e.setAudioEnabled(!0),this.emit(l.default.ENABLING_AUDIO)},this.disableAudio=function(){e.setAudioEnabled(!1),this.emit(l.default.DISABLING_AUDIO)},this.submit=function(){O&&r&&r.doTheSubmit()},this.isCountingDown=v.isCountingDown.bind(v),this.isRecording=v.isRecording.bind(v),this.record=v.record.bind(v),this.resume=v.resume.bind(v),this.stop=v.stop.bind(v),this.recordAgain=v.recordAgain.bind(v)};(0,u.default)(v,d.default);n.default=v},{"../../styles/css/main.min.css.js":148,"../events":120,"../resource":122,"../util/eventEmitter":126,"../util/videomailError":131,"./buttons":132,"./dimension":134,"./form":135,"./optionsWrapper":136,"./visuals":137,"@babel/runtime/helpers/interopRequireDefault":3,"document-visibility":29,"element-closest":32,hidden:59,inherits:64,"insert-css":65}],134:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("number-is-integer")),o=r(e("./../util/videomailError"));function a(e,t){if(t.hasDefinedHeight()&&(e=e?Math.min(t.video.height,e):t.video.height),(0,i.default)(e)&&e<1)throw o.default.create("Got a video height less than 1 (".concat(e,") while figuring out the minimum!"),t);return e}n.default={limitWidth:function(e,t,n){var r,a=function(e){var t=0,n=e.getBoundingClientRect();return n&&(t=n.right-n.left),t<1&&(t=(n=document.body.getBoundingClientRect()).right-n.left),t}(e);if(r=t?a>0&&a<t?a:t:a,(0,i.default)(r)&&r<1)throw o.default.create("Limited width cannot be less than 1!",n);return r},limitHeight:function(e,t){if((0,i.default)(e)&&e<1)throw o.default.create("Passed limit-height argument cannot be less than 1!",t);var n=Math.min(e,document.documentElement.clientHeight);if(n<1)throw o.default.create("Limited height cannot be less than 1!",t);return n},calculateWidth:function(e){var t=e.videoHeight||null,n=e.ratio||e.getRatio();if(t=a(t,e),e.responsive&&(t=this.limitHeight(t,e)),(0,i.default)(t)&&t<1)throw o.default.create("Height cannot be smaller than 1 when calculating width.",e);var r=parseInt(t/n);if(r<1)throw o.default.create("Calculated width cannot be smaller than 1!",e);return r},calculateHeight:function(e,t){var n,r=t.videoWidth||null,s=t.ratio||t.getRatio();if(t.hasDefinedWidth()&&(r=t.video.width),(0,i.default)(r)&&r<1)throw o.default.create("Unable to calculate height when width is less than 1.",t);if(t.responsive&&(r=this.limitWidth(e,r,t)),r&&(n=parseInt(r*s)),(0,i.default)(n)&&n<1)throw o.default.create("Just calculated a height less than 1 which is wrong.",t);return a(n,t)}}},{"./../util/videomailError":131,"@babel/runtime/helpers/interopRequireDefault":3,"number-is-integer":72}],135:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("get-form-data")),o=r(e("hidden")),a=r(e("hyperscript")),s=r(e("inherits")),u=r(e("../events")),c=r(e("../util/eventEmitter")),l=r(e("../util/videomailError"));function f(e){return e.replace(/(^[,\s]+)|([,\s]+$)/g,"")}var d=function(e,t,n){c.default.call(this,n,"Form");var r,s=this;function d(){return(0,i.default)(t,{includeDisabled:!0})}function h(e,n){for(var r,i=t.elements.length,o=0;o<i;o++)(n||!n&&("BUTTON"!==(r=t.elements[o]).tagName&&"submit"!==r.type))&&(t.elements[o].disabled=e)}function p(){return t.querySelectorAll("input, textarea")}function m(){return t.querySelectorAll("select")}this.transformFormData=function(e){var t={subject:n.selectors.subjectInputName,from:n.selectors.fromInputName,to:n.selectors.toInputName,cc:n.selectors.ccInputName,bcc:n.selectors.bccInputName,body:n.selectors.bodyInputName,key:n.selectors.keyInputName,parentKey:n.selectors.parentKeyInputName,sendCopy:n.selectors.sendCopyInputName},r={};return Object.keys(t).forEach((function(n){var i=t[n];i in e&&(r[n]=e[i])})),r.from&&(r.from=f(r.from)),r.to&&(r.to=f(r.to)),r.cc&&(r.cc=f(r.cc)),r.bcc&&(r.bcc=f(r.bcc)),r},this.getRecipients=function(){var e=this.transformFormData(d()),t={};return"to"in e&&(t.to=e.to),"cc"in e&&(t.cc=e.cc),"bcc"in e&&(t.bcc=e.bcc),t},this.loadVideomail=function(e){for(var r,i,o=t.elements.length,a=0;a<o;a++)e[i=(r=t.elements[a]).name]&&(r.value=e[i]),i!==n.selectors.subjectInputName&&i!==n.selectors.bodyInputName||(r.disabled=!0);t.setAttribute("method","put")},this.disable=function(e){h(!0,e)},this.enable=function(e){h(!1,e)},this.build=function(){if(n.enableAutoValidation){for(var i,c=p(),f=0,d=c.length;f<d;f++)"radio"===(i=c[f]).type?i.addEventListener("change",(function(){e.validate()})):i.addEventListener("input",(function(){setTimeout((function(){e.validate()}),0)}));for(var h=m(),y=0,b=h.length;y<b;y++)h[y].addEventListener("change",(function(){e.validate()}))}(r=t.querySelector('input[name="'.concat(n.selectors.keyInputName,'"]')))||(r=(0,a.default)("input",{name:n.selectors.keyInputName,type:"hidden"}),t.appendChild(r)),this.on(u.default.PREVIEW,(function(e){e||r.value?e&&(r.value=e):s.emit(u.default.ERROR,l.default.create("Videomail key for preview is missing!",n))})),this.on(u.default.GOING_BACK,(function(){r.value=null})),this.on(u.default.ERROR,(function(e){var r;e.hideForm&&e.hideForm()&&n.adjustFormOnBrowserError?function(){for(var e=t.elements.length,n=0;n<e;n++)(0,o.default)(t.elements[n],!0);(0,o.default)(t,!0)}():e.hideButtons&&e.hideButtons()&&n.adjustFormOnBrowserError&&(r=s.findSubmitButton(),(0,o.default)(r,!0))})),this.on(u.default.BUILT,(function(){e.getSubmitButton().addEventListener("click",s.doTheSubmit.bind(s))}))},this.doTheSubmit=function(n){return n&&n.preventDefault(),e.hasElement()&&e.submitAll(d(),t.getAttribute("method"),t.getAttribute("action")),!1},this.getInvalidElement=function(){for(var e=p(),t=0,n=e.length;t<n;t++)if(!e[t].validity.valid)return e[t];for(var r=m(),i=0,o=r.length;i<o;i++)if(!r[i].validity.valid)return r[i];return null},this.validate=function(){return t.checkValidity()},this.findSubmitButton=function(){return t.querySelector("[type='submit']")},this.hide=function(){t&&(0,o.default)(t,!0)},this.show=function(){t&&(0,o.default)(t,!1)}};(0,s.default)(d,c.default);n.default=d},{"../events":120,"../util/eventEmitter":126,"../util/videomailError":131,"@babel/runtime/helpers/interopRequireDefault":3,"get-form-data":48,hidden:59,hyperscript:61,inherits:64}],136:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("deepmerge"));n.default={addFunctions:function(e){var t=e.audio&&e.audio.enabled;e.hasDefinedHeight=function(){return this.video.height&&"auto"!==this.video.height},e.hasDefinedWidth=function(){return this.video.width&&"auto"!==this.video.width},e.hasDefinedDimension=function(){return this.hasDefinedWidth()||this.hasDefinedHeight()},e.hasDefinedDimensions=function(){return this.hasDefinedWidth()&&this.hasDefinedHeight()},e.getRatio=function(){var e=1,t=this.videoHeight&&this.videoWidth;return this.hasDefinedDimensions()?e=t&&(this.videoHeight<this.video.height||this.videoWidth<this.video.width)?this.videoHeight/this.videoWidth:this.video.height/this.video.width:t&&(e=this.videoHeight/this.videoWidth),e},e.isAudioEnabled=function(){return t},e.setAudioEnabled=function(e){t=e},e.isAutoPauseEnabled=function(){return this.enableAutoPause&&this.enablePause}},merge:function(e,t){var n=(0,i.default)(e,t,{arrayMerge:function(e,t){return t}});return this.addFunctions(n),n}}},{"@babel/runtime/helpers/interopRequireDefault":3,deepmerge:25}],137:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("hidden")),o=r(e("hyperscript")),a=r(e("inherits")),s=r(e("../events")),u=r(e("../util/eventEmitter")),c=r(e("./visuals/inside/recorderInsides")),l=r(e("./visuals/notifier")),f=r(e("./visuals/recorder")),d=r(e("./visuals/replay")),h=function(e,t){u.default.call(this,t,"Visuals");var n,r,a=this,h=new d.default(this,t),p=new f.default(this,h,t),m=new c.default(this,t),y=new l.default(this,t),b=t.debug;function g(){var r;b("Visuals: buildChildren()"),(r=e.querySelector("noscript"))||((r=(0,o.default)("noscript")).innerHTML="Please enable Javascript",n.appendChild(r)),t.playerOnly||(y.build(),m.build()),h.build(),b("Visuals: built.")}function v(){t.video.stretch?w():(n.style.width="".concat(a.getRecorderWidth(!0),"px"),n.style.height="".concat(a.getRecorderHeight(!0),"px"))}function w(){n.style.width="auto",n.style.height="auto"}function E(){return!a.isNotifying()&&!h.isShown()&&!a.isCountingDown()}this.getRatio=function(){return n.clientWidth?n.clientHeight/n.clientWidth:0},this.isCountingDown=function(){return m.isCountingDown()},this.build=function(){if(!(n=e.querySelector(".".concat(t.selectors.visualsClass)))){n=(0,o.default)("div.".concat(t.selectors.visualsClass));var i=e.querySelector(".".concat(t.selectors.buttonsClass));i&&!e.isOutsideElementOf(i)?e.insertBefore(n,i):e.appendChild(n)}n.classList.add("visuals"),v(),!r&&(t.playerOnly||(b("Visuals: initEvents()"),a.on(s.default.USER_MEDIA_READY,(function(){r=!0,a.endWaiting(),e.enableForm(!1)})).on(s.default.PREVIEW,(function(){a.endWaiting()})).on(s.default.BLOCKING,(function(n){(n.hideForm||t.adjustFormOnBrowserError)&&e.disableForm(!0)})).on(s.default.PREVIEW_SHOWN,(function(){e.validate(!0)})).on(s.default.LOADED_META_DATA,(function(){v()})).on(s.default.ERROR,(function(e){e.removeDimensions&&e.removeDimensions()&&w()})))),g(),a.parentNode=n.parentNode,r=!0},this.querySelector=function(e){return n&&n.querySelector(e)},this.appendChild=function(e){n&&n.appendChild(e)},this.removeChild=function(e){n.removeChild(e)},this.reset=function(){this.endWaiting(),p.reset()},this.beginWaiting=function(){e.beginWaiting()},this.endWaiting=function(){e.endWaiting()},this.stop=function(e){p.stop(e),m.hidePause()},this.back=function(e,t){!t&&e&&(t=e,e={}),h.hide(),y.hide(),e&&e.keepHidden?(p.hide(),t&&t()):p.back(t)},this.recordAgain=function(){this.back((function(){t.loadUserMediaOnRecord?a.once(s.default.SERVER_READY,(function(){a.record()})):a.once(s.default.USER_MEDIA_READY,(function(){a.record()}))}))},this.unload=function(e){try{p.unload(e),m.unload(e),h.unload(e),r=!1}catch(e){this.emit(s.default.ERROR,e)}},this.isNotifying=function(){return y.isVisible()},this.isReplayShown=function(){return h.isShown()},this.pause=function(e){p.pause(e),m.showPause()},this.resume=function(){m.isCountingDown()?m.resumeCountdown():p.resume(),m.hidePause()},this.pauseOrResume=function(){E.call(this)&&(this.isRecording()?this.pause():p.isPaused()?this.resume():p.isReady()&&this.record())},this.recordOrStop=function(){E()&&(this.isRecording()?this.stop():p.isReady()&&this.record())},this.record=function(){t.video.countdown?(this.emit(s.default.COUNTDOWN),m.startCountdown(p.record.bind(p))):p.record()},this.getRecorder=function(){return p},this.getReplay=function(){return h},this.validate=function(){return p.validate()&&this.isReplayShown()},this.getRecordingStats=function(){return p.getRecordingStats()},this.getAudioSampleRate=function(){return p.getAudioSampleRate()},this.isPaused=function(){return p.isPaused()},this.error=function(e){y.error(e)},this.hide=function(){n&&((0,i.default)(n,!0),this.emit(s.default.HIDE))},this.isHidden=function(){return!r||(n?(0,i.default)(n):void 0)},this.showVisuals=function(){n&&(0,i.default)(n,!1)},this.show=function(){!this.isReplayShown()&&n&&p.build(),this.showVisuals()},this.showReplayOnly=function(){!this.isReplayShown()&&h.show(),this.show(),p.hide(),y.hide()},this.isRecorderUnloaded=function(){return p.isUnloaded()},this.isConnecting=function(){return p.isConnecting()},this.getRecorderWidth=function(e){return p.getRecorderWidth(e)},this.getRecorderHeight=function(e,t){return p.getRecorderHeight(e,t)},this.limitWidth=function(n){return e.limitWidth(n,t)},this.limitHeight=function(t){return e.limitHeight(t)},this.calculateWidth=function(t){return e.calculateWidth(t)},this.calculateHeight=function(t){return e.calculateHeight(t)},this.getReplay=function(){return h},this.getBoundingClientRect=function(){return n&&n.getBoundingClientRect()},this.checkTimer=function(e){m.checkTimer(e)},this.isNotifierBuilt=function(){return y&&y.isBuilt()},this.isReplayShown=h.isShown.bind(h),this.hideReplay=h.hide.bind(h),this.hideRecorder=p.hide.bind(p),this.isRecording=p.isRecording.bind(p),this.isUserMediaLoaded=p.isUserMediaLoaded.bind(p),this.isConnected=p.isConnected.bind(p)};(0,a.default)(h,u.default);n.default=h},{"../events":120,"../util/eventEmitter":126,"./visuals/inside/recorderInsides":143,"./visuals/notifier":144,"./visuals/recorder":145,"./visuals/replay":146,"@babel/runtime/helpers/interopRequireDefault":3,hidden:59,hyperscript:61,inherits:64}],138:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){var n,r,a,s,u=this;function c(e){s||(t.debug("Countdown",a),--a<1?function(e){u.unload(),u.hide(),setTimeout((function(){e()}),0)}(e):n.innerHTML=a)}this.start=function(e){n.innerHTML=a=t.video.countdown,this.show(),r=setInterval(c.bind(this,e),950)},this.pause=function(){s=!0},this.resume=function(){s=!1},this.build=function(){(n=e.querySelector(".countdown"))?this.hide():(n=(0,i.default)("p.countdown"),this.hide(),e.appendChild(n))},this.show=function(){(0,o.default)(n,!1)},this.isCountingDown=function(){return Boolean(r)},this.unload=function(){clearInterval(r),s=!1,r=null},this.hide=function(){(0,o.default)(n,!0),this.unload()}};var i=r(e("hyperscript")),o=r(e("hidden"))},{"@babel/runtime/helpers/interopRequireDefault":3,hidden:59,hyperscript:61}],139:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){s.default.call(this,t,"Facing Mode");var n,r=this;this.build=function(){(n=e.querySelector(".facingMode"))?this.hide():((n=(0,i.default)("button.facingMode")).innerHTML="⤾",n.onclick=function(e){e&&e.preventDefault();try{r.emit(a.default.SWITCH_FACING_MODE)}catch(e){r.emit(a.default.ERROR,e)}},this.hide(),e.appendChild(n)),r.on(a.default.ERROR,(function(){r.hide()}))},this.hide=function(){(0,o.default)(n,!0)},this.show=function(){(0,o.default)(n,!1)}};var i=r(e("hyperscript")),o=r(e("hidden")),a=r(e("./../../../../events")),s=r(e("./../../../../util/eventEmitter"))},{"./../../../../events":120,"./../../../../util/eventEmitter":126,"@babel/runtime/helpers/interopRequireDefault":3,hidden:59,hyperscript:61}],140:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){if(!t.text.pausedHeader)throw a.default.create("Paused header cannot be empty",t);var n,r,s;function u(){return t.text.pausedHint}this.build=function(){n=e.querySelector(".paused"),(r=e.querySelector(".pausedHeader"))?(this.hide(),r.innerHTML=t.text.pausedHeader,u()&&(s.innerHTML=t.text.pausedHint)):(n=(0,i.default)("div.paused"),r=(0,i.default)("p.pausedHeader"),this.hide(),r.innerHTML=t.text.pausedHeader,n.appendChild(r),u()&&(s=e.querySelector(".pausedHint"),(s=(0,i.default)("p.pausedHint")).innerHTML=t.text.pausedHint,n.appendChild(s)),e.appendChild(n))},this.hide=function(){(0,o.default)(n,!0)},this.show=function(){(0,o.default)(n,!1)}};var i=r(e("hyperscript")),o=r(e("hidden")),a=r(e("./../../../../util/videomailError"))},{"./../../../../util/videomailError":131,"@babel/runtime/helpers/interopRequireDefault":3,hidden:59,hyperscript:61}],141:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var t;this.build=function(){(t=e.querySelector(".recordNote"))?this.hide():(t=(0,i.default)("p.recordNote"),this.hide(),e.appendChild(t))},this.stop=function(){this.hide(),t.classList.remove("near"),t.classList.remove("nigh")},this.setNear=function(){t.classList.add("near")},this.setNigh=function(){t.classList.add("nigh")},this.hide=function(){(0,o.default)(t,!0)},this.show=function(){(0,o.default)(t,!1)}};var i=r(e("hyperscript")),o=r(e("hidden"))},{"@babel/runtime/helpers/interopRequireDefault":3,hidden:59,hyperscript:61}],142:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t,n){var r,a,s,u=!1,c=!1;function l(e,t){return e>=n.video.limitSeconds*t}function f(){var e,i=parseInt(s/60,10),o=s-60*i;if(!u||!c){var a=n.video.limitSeconds-s;!function(e){return!(u||!l(e,.6)||(u=!0,0))}(a)?function(e){return!(c||!l(e,.8)||(c=!0,0))}(a)&&(t.setNigh(),r.classList.add("nigh"),n.debug("End is nigh, ".concat(s," seconds to go"))):(t.setNear(),r.classList.add("near"),n.debug("End is near, ".concat(s," seconds to go")))}r.innerHTML="".concat(i,":").concat((e=o)<10?"0".concat(e):e)}function d(){(0,o.default)(r,!0)}function h(){return n.video.limitSeconds}this.check=function(t){var n=h()-Math.floor(t.intervalSum/1e3);n!==s&&(s=n,f(),s<1&&e.stop(!0))},this.start=function(){s=h(),u=c=!1,a=!0,f(),r.classList.remove("near"),r.classList.remove("nigh"),(0,o.default)(r,!1)},this.pause=function(){t.hide()},this.resume=function(){t.show()},this.stop=function(){null!==s&&a&&(n.debug("Stopping record timer. Was recording for about ~".concat(h()-s," seconds.")),d(),t.stop(),s=null,a=!1)},this.build=function(){(r=e.querySelector(".recordTimer"))?d():(r=(0,i.default)("p.recordTimer"),d(),e.appendChild(r))}};var i=r(e("hyperscript")),o=r(e("hidden"))},{"@babel/runtime/helpers/interopRequireDefault":3,hidden:59,hyperscript:61}],143:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("inherits")),o=r(e("./../../../events")),a=r(e("./../../../util/eventEmitter")),s=r(e("./../../../util/browser")),u=r(e("./recorder/countdown")),c=r(e("./recorder/pausedNote")),l=r(e("./recorder/recordNote")),f=r(e("./recorder/recordTimer")),d=r(e("./recorder/facingMode")),h=function(e,t){a.default.call(this,t,"RecorderInsides");var n,r,i,h,p=this,m=t.debug,y=new l.default(e),b=new f.default(e,y,t),g=new s.default(t);function v(){p.hidePause(),p.hideCountdown(),b.stop(),h&&h.hide()}function w(){m("RecorderInsides: initEvents()"),p.on(o.default.USER_MEDIA_READY,(function(){h&&h.show()})).on(o.default.RECORDING,(function(){b.start()})).on(o.default.RESUMING,(function(){b.resume()})).on(o.default.STOPPING,(function(){b.stop()})).on(o.default.PAUSED,(function(){p.isCountingDown()?n.pause():b.pause()})).on(o.default.RESETTING,v).on(o.default.HIDE,(function(){p.hideCountdown()}))}t.video.countdown&&(n=new u.default(e,t)),t.video.facingModeButton&&g.isMobile()&&(h=new d.default(e,t)),t.enablePause&&(r=new c.default(e,t)),this.build=function(){m("RecorderInsides: build()"),n&&n.build(),r&&r.build(),h&&h.build(),y.build(),b.build(),!i&&w(),i=!0},this.unload=function(){n&&n.unload(),i=!1},this.showPause=function(){r&&r.show()},this.hidePause=function(){r&&r.hide()},this.hideCountdown=function(){n&&n.hide()},this.startCountdown=function(e){n&&n.start(e)},this.resumeCountdown=function(){n&&n.resume()},this.isCountingDown=function(){return n&&n.isCountingDown()},this.checkTimer=function(e){b.check(e)}};(0,i.default)(h,a.default);n.default=h},{"./../../../events":120,"./../../../util/browser":124,"./../../../util/eventEmitter":126,"./recorder/countdown":138,"./recorder/facingMode":139,"./recorder/pausedNote":140,"./recorder/recordNote":141,"./recorder/recordTimer":142,"@babel/runtime/helpers/interopRequireDefault":3,inherits:64}],144:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("hidden")),o=r(e("hyperscript")),a=r(e("inherits")),s=r(e("../../events")),u=r(e("../../util/eventEmitter")),c=function(e,t){u.default.call(this,t,"Notifier");var n,r,a,c,l,f,d=this,h=t&&t.debug;function p(){h("Notifier: initEvents()"),d.on(s.default.CONNECTING,(function(){d.notify("Connecting …")})).on(s.default.LOADING_USER_MEDIA,(function(){d.notify("Loading webcam …")})).on(s.default.USER_MEDIA_READY,(function(){t.video.stretch?(n.style.width="auto",n.style.height="".concat(e.getRecorderHeight(!0,!0),"px")):(n.style.width="".concat(e.getRecorderWidth(!0),"px"),n.style.height="".concat(e.getRecorderHeight(!0),"px")),d.hide()})).on(s.default.LOADED_META_DATA,(function(){})).on(s.default.PREVIEW,(function(){d.hide()})).on(s.default.STOPPING,(function(n){!function(n){var r="";e.beginWaiting(),n&&(h("Limit reached"),r+="".concat(t.text.limitReached,".<br/>")),r+="".concat(t.text.sending," …"),d.notify(r,null,{stillWait:!0,entertain:t.notifier.entertain})}(n)})).on(s.default.PROGRESS,(function(e,n){!function(e,n){var r;t.isAudioEnabled()?(r="Video: ".concat(e),n&&(r+=", Audio: ".concat(n))):r=e,d.setExplanation(r)}(e,n)})).on(s.default.BEGIN_VIDEO_ENCODING,(function(){!function(){e.beginWaiting();var n="".concat(t.text.encoding," …");d.notify(n,null,{stillWait:!0,entertain:t.notifier.entertain}),b()}()})).on(s.default.CONNECTED,(function(){d.notify("Connected."),t.loadUserMediaOnRecord&&d.hide()}))}function m(){if(t.notifier.entertain){if(!l){var e=Math.floor(Math.random()*t.notifier.entertainLimit+1);n.className="notifier entertain ".concat(t.notifier.entertainClass).concat(e),c=setTimeout(m,t.notifier.entertainInterval),l=!0}}else y()}function y(){n&&n.classList.remove("entertain"),clearTimeout(c),c=null,l=!1}function b(){a&&(a.innerHTML=null,(0,i.default)(a,!0))}this.error=function(e){var n=e.message?e.message.toString():e.toString(),r=e.explanation?e.explanation.toString():null;n||t.debug("Weird empty message generated for error",e),d.notify(n,r,{blocking:!0,problem:!0,hideForm:e.hideForm&&e.hideForm(),classList:e.getClassList&&e.getClassList(),removeDimensions:e.removeDimensions&&e.removeDimensions()})},this.setExplanation=function(e){a||(a=(0,o.default)("p"),n?n.appendChild(a):t.logger.warn("Unable to show explanation because notifyElement is empty:",e)),a.innerHTML=e,(0,i.default)(a,!1)},this.build=function(){t.debug("Notifier: build()"),(n=e.querySelector(".notifier"))?this.hide():(n=(0,o.default)(".notifier"),this.hide(),e.appendChild(n)),!f&&p(),f=!0},this.hide=function(){y(),n&&((0,i.default)(n,!0),n.classList.remove("blocking")),r&&(r.innerHTML=null),b()},this.isVisible=function(){return!!f&&(n&&!(0,i.default)(n))},this.isBuilt=function(){return f},this.notify=function(u,c,l){t.debug("Notifier: notify()"),l||(l={});var f=!!l.stillWait&&l.stillWait,d=!!l.entertain&&l.entertain,h=!!l.blocking&&l.blocking,p=!!l.hideForm&&l.hideForm,b=!!l.classList&&l.classList,g=!!l.removeDimensions&&l.removeDimensions;!r&&n&&(r=(0,o.default)("h2"),a?n.insertBefore(r,a):n.appendChild(r)),n&&(d||(n.className="notifier"),b&&b.forEach((function(e){n.classList.add(e)})),g&&(n.style.width="auto",n.style.height="auto")),h?(n&&n.classList.add("blocking"),this.emit(s.default.BLOCKING,{hideForm:p})):this.emit(s.default.NOTIFYING),e.hideReplay(),e.hideRecorder(),function(e,n){var i=!!n.problem&&n.problem;r?r.innerHTML=(i?"&#x2639; ":"")+e:t.logger.warn("Unable to show following because messageElement is empty:",e)}(u,l),c&&c.length>0&&this.setExplanation(c),d?m():y(),e.showVisuals(),n&&(0,i.default)(n,!1),!f&&e.endWaiting()}};(0,a.default)(c,u.default);n.default=c},{"../../events":120,"../../util/eventEmitter":126,"@babel/runtime/helpers/interopRequireDefault":3,hidden:59,hyperscript:61,inherits:64}],145:[function(e,t,n){(function(t){(function(){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("animitter")),o=r(e("canvas-to-buffer")),a=r(e("deepmerge")),s=r(e("hidden")),u=r(e("hyperscript")),c=r(e("safe-json-stringify")),l=r(e("inherits")),f=r(e("websocket-stream")),d=r(e("../../constants")),h=r(e("../../events")),p=r(e("../../util/browser")),m=r(e("../../util/eventEmitter")),y=r(e("../../util/humanize")),b=r(e("../../util/pretty")),g=r(e("../../util/videomailError")),v=r(e("./userMedia")),w="°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸ ",E=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};m.default.call(this,r,"Recorder");var l=new p.default(r),E=(0,a.default)(r,{image:{quality:l.isMobile()?r.image.quality-.05:r.image.quality}});if(!E.video||!E.video.fps)throw g.default.create("FPS must be defined",E);var _,R,S,A,O,k,T,x,j,M,C,N,D,I,L,P,B,U,F,W,q,H,V,z,G,$,Y=this,K=E.debug,J=null,X=0,Q=0,Z=E.video.facingMode,ee={},te=0,ne=0;function re(e,t){if(P)if(P.destroyed)ie(),Y.emit(h.default.ERROR,g.default.create("Already disconnected","Sorry, connection to the server has been destroyed. Please reload.",E));else{var n=t&&t.onFlushedCallback;try{P.write(e,(function(){n&&n(t)}))}catch(e){Y.emit(h.default.ERROR,g.default.create("Failed writing to server","stream.write() failed because of ".concat((0,b.default)(e)),E))}}}function ie(){clearInterval(V)}function oe(e){X++,re(e.toBuffer())}function ae(){R&&(0,s.default)(R,!1)}function se(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{K("Recorder: onUserMediaReady()",(0,c.default)(t));var n=t.switchingFacingMode;N=F=I=D=!1,C=!0,n||(e=(0,i.default)({fps:E.video.fps},Ae),_=e.getRequestAnimationFrameObject(),J=e),ae(),t.recordWhenReady&&Y.record(),Y.emit(h.default.USER_MEDIA_READY,{switchingFacingMode:t.switchingFacingMode,paused:Y.isPaused(),recordWhenReady:t.recordWhenReady})}catch(e){Y.emit(h.default.ERROR,e)}}function ue(){A&&(K("Recorder: clearUserMediaTimeout()"),A&&clearTimeout(A),A=null)}function ce(){return"".concat((te/(Q||1)*100).toFixed(2),"%")}function le(){return"".concat((ne/(X||1)*100).toFixed(2),"%")}function fe(){T||(T=ce()),x||(x=le()),Y.emit(h.default.PROGRESS,T,x)}function de(e){if(!U){B=!0,K("Recorder: initialising web socket to %s",E.socketUrl),Y.emit(h.default.CONNECTING);var t="".concat(E.socketUrl,"?").concat(encodeURIComponent(d.default.SITE_NAME_LABEL),"=").concat(encodeURIComponent(E.siteName));try{P=(0,f.default)(t,{perMessageDeflate:!1,objectMode:!0})}catch(e){var n;B=U=!1,n=void 0===f.default?g.default.create("There is no websocket","Cause: ".concat((0,b.default)(e)),E):g.default.create("Failed to connect to server","Please upgrade your browser. Your current version does not seem to support websockets.",E,{browserProblem:!0}),Y.emit(h.default.ERROR,n)}P&&(P.on("close",(function(e){K("".concat(w,"Stream has closed")),B=U=!1,e?Y.emit(h.default.ERROR,e||"Unhandled websocket error"):(Y.emit(h.default.DISCONNECTED),Ee())})),P.on("connect",(function(){K("".concat(w,"Stream *connect* event emitted")),U||(U=!0,B=I=!1,Y.emit(h.default.CONNECTED),e&&e())})),P.on("data",(function(e){var t;K("".concat(w,"Stream *data* event emitted"));try{t=JSON.parse(e.toString())}catch(t){K("Failed to parse command:",t),Y.emit(h.default.ERROR,g.default.create("Invalid server command","Contact us asap. Bad command was ".concat(e.toString(),". "),E))}finally{be.call(Y,t)}})),P.on("error",(function(e){var t;K("".concat(w,"Stream *error* event emitted"),e),B=U=!1,t=l.isIOS()?g.default.create(e,"iPhones cannot maintain a live connection for too long. Original error message is: ".concat(e.toString()),E):g.default.create("Data exchange interrupted","Please check your network connection and reload.",E),Y.emit(h.default.ERROR,t)})),P.on("drain",(function(){K("".concat(w,"Stream *drain* event emitted (should not happen!)"))})),P.on("preend",(function(){K("".concat(w,"Stream *preend* event emitted"))})),P.on("end",(function(){K("".concat(w,"Stream *end* event emitted"))})),P.on("drain",(function(){K("".concat(w,"Stream *drain* event emitted"))})),P.on("pipe",(function(){K("".concat(w,"Stream *pipe* event emitted"))})),P.on("unpipe",(function(){K("".concat(w,"Stream *unpipe* event emitted"))})),P.on("resume",(function(){K("".concat(w,"Stream *resume* event emitted"))})),P.on("uncork",(function(){K("".concat(w,"Stream *uncork* event emitted"))})),P.on("readable",(function(){K("".concat(w,"Stream *preend* event emitted"))})),P.on("prefinish",(function(){K("".concat(w,"Stream *preend* event emitted"))})),P.on("finish",(function(){K("".concat(w,"Stream *preend* event emitted"))})))}}function he(e,t,n){N=!1,ue(),K("Recorder: userMediaErrorCallback()",", name:",e.name,", message:",e.message,", Webcam characteristics:",S.getCharacteristics(),", extraA arguments:",t?t.toString():void 0,", extraB arguments:",n?n.toString():void 0);var r=Y.listeners(h.default.ERROR);if(r&&r.length)e.name!==g.default.MEDIA_DEVICE_NOT_SUPPORTED?Y.emit(h.default.ERROR,g.default.create(e,E)):K("Recorder: ignore user media error",e),O=setTimeout(de,E.timeouts.userMedia);else{if(!I)throw K("Recorder: no error listeners attached but throwing error",e),g.default.create(e,"Unable to process this error since there are no error listeners anymore.",E);K("Recorder: already unloaded. Not going to throw error",e)}}function pe(e,t){if(K("Recorder: getUserMediaCallback()",(0,c.default)(t)),U&&(ge()||!ve()||F))try{ue(),S.init(e,(function(){se(t)}),oe.bind(Y),(function(e){Y.emit(h.default.ERROR,e)}),t)}catch(e){Y.emit(h.default.ERROR,e)}}function me(e){if(!navigator)throw new Error("Navigator is missing!");if(K("Recorder: loadGenuineUserMedia()"),Y.emit(h.default.ASKING_WEBCAM_PERMISSION),navigator.mediaDevices&&navigator.mediaDevices.getUserMedia){var t={video:{facingMode:Z,frameRate:{ideal:E.video.fps}},audio:E.isAudioEnabled()};l.isOkSafari()||(E.hasDefinedWidth()?t.video.width={ideal:E.video.width}:t.video.width={ideal:Y.limitWidth()},E.hasDefinedHeight()&&(t.video.height={ideal:E.video.height})),K("Recorder: navigator.mediaDevices.getUserMedia()","constraints",(0,c.default)(t)),navigator.mediaDevices.getSupportedConstraints&&K("Recorder: navigator.mediaDevices.getSupportedConstraints()",(0,c.default)(navigator.mediaDevices.getSupportedConstraints()));var n=navigator.mediaDevices.getUserMedia(t);if(!n)throw g.default.create("Sorry, your browser is unable to use cameras.","Try a different browser with better user media functionalities.",E);n.then((function(t){pe(t,e)})).catch(he)}else K("Recorder: navigator.getUserMedia()"),navigator.getUserMedia_({video:!0,audio:E.isAudioEnabled()},pe,he)}function ye(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(C)return K("Recorder: skipping loadUserMedia() because it is already loaded"),se(e),!1;if(N)return K("Recorder: skipping loadUserMedia() because it is already asking for permission"),!1;K("Recorder: loadUserMedia()",(0,c.default)(e)),Y.emit(h.default.LOADING_USER_MEDIA);try{A=setTimeout((function(){Y.isReady()||Y.emit(h.default.ERROR,l.getNoAccessIssue())}),E.timeouts.userMedia),N=!0,me(e)}catch(e){if(K("Recorder: failed to load genuine user media"),N=!1,!Y.listeners(h.default.ERROR).length)throw K("Recorder: no error listeners attached but throwing exception",e),e;Y.emit(h.default.ERROR,e)}}function be(e){try{switch(K("Server commanded: %s",e.command,e.args?", ".concat((0,c.default)(e.args)):""),e.command){case"ready":this.emit(h.default.SERVER_READY),A||(E.loadUserMediaOnRecord?ae():ye());break;case"preview":!function(e){te=ne=X=Q=0,x=T=null,q=e.key,e.mp4&&n.setMp4Source("".concat(e.mp4+d.default.SITE_NAME_LABEL,"/").concat(E.siteName,"/videomail.mp4"),!0),e.webm&&n.setWebMSource("".concat(e.webm+d.default.SITE_NAME_LABEL,"/").concat(E.siteName,"/videomail.webm"),!0),Y.hide();var t=Y.getRecorderWidth(!0),r=Y.getRecorderHeight(!0);Y.emit(h.default.PREVIEW,q,t,r),H=Date.now()-L,ee.waitingTime=H,E.debug&&K("While recording, %s have been transferred and waiting time was %s",y.default.filesize(k,2),y.default.toTime(H))}(e.args);break;case"error":this.emit(h.default.ERROR,g.default.create("Oh no, server error!",e.args.err.toString()||"(No explanation given)",E));break;case"confirmFrame":t=e.args,te=t.frame?t.frame:te,T=ce(),fe();break;case"confirmSample":!function(e){ne=e.sample?e.sample:ne,x=le(),fe()}(e.args);break;case"beginAudioEncoding":this.emit(h.default.BEGIN_AUDIO_ENCODING);break;case"beginVideoEncoding":this.emit(h.default.BEGIN_VIDEO_ENCODING);break;default:this.emit(h.default.ERROR,"Unknown server command: ".concat(e.command))}}catch(e){Y.emit(h.default.ERROR,e)}var t}function ge(){return e.isNotifying()}function ve(){return!R||(0,s.default)(R)}function we(e,n,r){if(!r&&n&&n.constructor===Function&&(r=n,n=null),U){if(P){K("$ %s",e,n?(0,c.default)(n):"");var i={command:e,args:n};re(t.from((0,c.default)(i))),r&&setTimeout((function(){r()}),0)}}else K("Reconnecting for the command",e,"…"),de((function(){we(e,n),r&&r()}))}function Ee(){J&&J.dispose()}function _e(){return J.getElapsedTime()}function Re(){K("Recorder: reInitialiseAudio()"),ue(),S&&S.stop(),C=q=j=M=null,ye()}function Se(e){1===(e&&e.frameNumber)&&Y.emit(h.default.FIRST_FRAME_SENT)}function Ae(n,r){try{if(!Y.isPaused()&&P&&M){if(0===Q&&Y.emit(h.default.SENDING_FIRST_FRAME),Q++,M.drawImage(S.getRawVisuals(),0,0,j.width,j.height),$=z.toBuffer(),(G=$.length)<1)throw g.default.create("Failed to extract webcam data.",E);k+=G;var i=t.from((0,c.default)({frameNumber:Q}));re(t.concat([$,i]),{frameNumber:Q,onFlushedCallback:Se}),e.checkTimer({intervalSum:r})}}catch(e){Y.emit(h.default.ERROR,e)}}function Oe(e){if(J){var t=Y.isRecording();J.stop(),J.setRequestAnimationFrameObject(e),t&&J.start()}}function ke(){E.hasDefinedWidth()&&(R.width=Y.getRecorderWidth(!0)),E.hasDefinedHeight()&&(R.height=Y.getRecorderHeight(!0))}function Te(){K("Recorder: initEvents()"),Y.on(h.default.SUBMITTING,(function(){D=!0})).on(h.default.SUBMITTED,(function(){D=!1,Y.unload()})).on(h.default.BLOCKING,(function(){F=!0,ue()})).on(h.default.HIDE,(function(){Y.hide()})).on(h.default.LOADED_META_DATA,(function(){ke()})).on(h.default.DISABLING_AUDIO,(function(){Re()})).on(h.default.ENABLING_AUDIO,(function(){Re()})).on(h.default.INVISIBLE,(function(){!function(){K("Recorder: loopWithTimeouts()");var e,t=1e3/E.video.fps,n=0;Oe({requestAnimationFrame:function(r){return setTimeout((function(){e=Date.now(),r(),n=Date.now()-e}),t-n)},cancelAnimationFrame:function(e){clearTimeout(e)}})}()})).on(h.default.VISIBLE,(function(){K("Recorder: restoreAnimationFrameObject()"),Oe(_)})).on(h.default.SWITCH_FACING_MODE,(function(){!function(){if(!l.isMobile())return!1;"user"===Z?Z="environment":"environment"===Z?Z="user":K("Recorder: unsupported facing mode",Z),me({switchingFacingMode:!0})}()}))}function xe(){var t;if(S){var n=S.getVideoWidth();t=n<1?e.getRatio():S.getVideoHeight()/n}else t=E.getRatio();return t}this.getRecordingStats=function(){return ee},this.getAudioSampleRate=function(){return S.getAudioSampleRate()},this.stop=function(e){K("stop()",e);var t=e.limitReached;this.emit(h.default.STOPPING,t),J.complete();var r=this;setTimeout((function(){L=Date.now(),ee={avgFps:Q/_e()*1e3,wantedFps:E.video.fps,avgInterval:_e()/Q,wantedInterval:1e3/E.video.fps,intervalSum:_e(),framesCount:Q,videoType:n.getVideoType()},E.isAudioEnabled()&&(ee.samplesCount=X,ee.sampleRate=S.getAudioSampleRate()),we("stop",ee,(function(){r.emit(h.default.STOPPED,{recordingStats:ee})})),r.reset()}),60)},this.back=function(e){this.emit(h.default.GOING_BACK),ae(),this.reset(),we("back",e)},this.unload=function(e){var t;I||(e&&(t=e.name||e.statusText||e.toString()),K("Recorder: unload()".concat(t?", cause: ".concat(t):"")),this.reset(),ue(),U&&(K("Recorder: disconnect()"),S&&S.unloadRemainingEventListeners(),D?B=U=!1:P&&(P.end(),P=void 0)),I=!0,W=!1)},this.reset=function(){I||(K("Recorder: reset()"),this.emit(h.default.RESETTING),Ee(),S&&S.stop(),n.reset(),C=q=j=M=$=G=null)},this.validate=function(){return U&&Q>0&&null===j},this.isReady=function(){return S.isReady()},this.pause=function(e){var n=e&&e.event;n instanceof window.Event&&(e.eventType=n.type),K("pause() at frame ".concat(Q),e),S.pause(),J.stop(),this.emit(h.default.PAUSED),V=window.setInterval((function(){K("Recorder: pinging..."),re(t.from(""))}),E.timeouts.pingInterval)},this.isPaused=function(){return S&&S.isPaused()},this.resume=function(){K("Recorder: resume() with frame ".concat(Q)),ie(),this.emit(h.default.RESUMING),S.resume(),J.start()},this.record=function(){if(I)return!1;if(!U)return K("Recorder: reconnecting before recording ..."),de((function(){Y.once(h.default.USER_MEDIA_READY,Y.record)})),!1;if(!C)return E.loadUserMediaOnRecord?ye({recordWhenReady:!0}):Y.emit(h.default.ERROR,g.default.create("Load and enable your camera first",E)),!1;try{j=S.createCanvas()}catch(e){return Y.emit(h.default.ERROR,g.default.create(e,E)),!1}return M=j.getContext("2d"),j.width?j.height?(k=0,z=new o.default(j,E.image.types,E.image.quality),K("Recorder: record()"),S.record(),Y.emit(h.default.RECORDING,Q),J.on("update",(function(e,t){var n=Q/t*1e3;K("Recorder: avgFps =",Math.round(n))})),void J.start()):(Y.emit(h.default.ERROR,g.default.create("Canvas has an invalid height.",E)),!1):(Y.emit(h.default.ERROR,g.default.create("Canvas has an invalid width.",E)),!1)},this.build=function(){var t=l.checkRecordingCapabilities();t||(t=l.checkBufferTypes()),t?this.emit(h.default.ERROR,t):((R=e.querySelector("video.".concat(E.selectors.userMediaClass)))||(R=(0,u.default)("video.".concat(E.selectors.userMediaClass)),e.appendChild(R)),ke(),R.muted=!0,R.setAttribute("playsinline",!0),R.setAttribute("webkit-playsinline","webkit-playsinline"),R.style.transform="rotateY(180deg)",R.style["-webkit-transform"]="rotateY(180deg)",R.style["-moz-transform"]="rotateY(180deg)",E.video.stretch&&(R.style.width="100%"),S||(S=new v.default(this,E)),ae(),W?E.loadUserMediaOnRecord&&ye():(Te(),U?E.loadUserMediaOnRecord||ye():de()),W=!0)},this.isPaused=function(){return S&&S.isPaused()&&!J.isRunning()},this.isRecording=function(){return J&&J.isRunning()&&!this.isPaused()&&!ge()&&P&&!P.destroyed},this.hide=function(){ve()||(R&&(0,s.default)(R,!0),ue(),K("Recorder: clearRetryTimeout()"),O&&clearTimeout(O),O=null)},this.isUnloaded=function(){return I},this.getRecorderWidth=function(e){return S&&S.hasVideoWidth()?S.getRawWidth(e):e&&E.hasDefinedWidth()?this.limitWidth(E.video.width):void 0},this.getRecorderHeight=function(e,t){return S&&t?R.getBoundingClientRect().height:S?S.getRawHeight(e):e&&E.hasDefinedHeight()?this.calculateHeight(e):void 0},this.calculateWidth=function(t){var n;return S?n=S.getVideoHeight():R&&(n=R.videoHeight||R.height),e.calculateWidth({responsive:t,ratio:xe(),videoHeight:n})},this.calculateHeight=function(t){var n;return S?n=S.getVideoWidth():R&&(n=R.videoWidth||R.width),e.calculateHeight({responsive:t,ratio:xe(),videoWidth:n})},this.getRawVisualUserMedia=function(){return R},this.isConnected=function(){return U},this.isConnecting=function(){return B},this.limitWidth=function(t){return e.limitWidth(t)},this.limitHeight=function(t){return e.limitHeight(t)},this.isUserMediaLoaded=function(){return C}};(0,l.default)(E,m.default);n.default=E}).call(this)}).call(this,e("buffer").Buffer)},{"../../constants":119,"../../events":120,"../../util/browser":124,"../../util/eventEmitter":126,"../../util/humanize":127,"../../util/pretty":129,"../../util/videomailError":131,"./userMedia":147,"@babel/runtime/helpers/interopRequireDefault":3,animitter:10,buffer:15,"canvas-to-buffer":18,deepmerge:25,hidden:59,hyperscript:61,inherits:64,"safe-json-stringify":99,"websocket-stream":114}],146:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("add-eventlistener-with-options")),o=r(e("hidden")),a=r(e("hyperscript")),s=r(e("iphone-inline-video")),u=r(e("inherits")),c=r(e("../../events")),l=r(e("../../util/browser")),f=r(e("../../util/eventEmitter")),d=r(e("../../util/videomailError")),h=function(e,t){f.default.call(this,t,"Replay");var n,r,u,h=this,p=new l.default(t),m=t.debug;function y(){return"HTMLDivElement"===e.constructor.name}function b(e,n,i){var o=h.getVideoSource(e);if(n&&i&&(n+="?".concat(Date.now())),o)n?o.setAttribute("src",n):r.removeChild(o);else if(n){var s=1/t.video.fps*2;o=(0,a.default)("source",{src:"".concat(n,"#t=").concat(s),type:"video/".concat(e)}),r.appendChild(o)}}function g(e){setTimeout((function(){try{r.pause()}catch(e){t.logger.warn(e)}e&&e()}),15)}function v(){if(r&&r.play){var e;try{e=r.play()}catch(e){t.logger.warn("Caught replay exception:",e)}e&&"undefined"!=typeof Promise&&e instanceof Promise&&e.catch((function(e){t.logger.warn("Caught pending replay promise exception: %s",e)}))}}this.setVideomail=function(t){(u=t)&&(u.mp4&&this.setMp4Source(u.mp4),u.webm&&this.setWebMSource(u.webm),u.poster&&r.setAttribute("poster",u.poster),function(t){var n;Object.keys(t).forEach((function(r){(n=e.querySelector(".".concat(r)))&&(n.innerHTML=t[r])}))}(u));var n=u&&u.recordingStats&&u.recordingStats.sampleRate>0;this.show(u&&u.width,u&&u.height,n)},this.show=function(n,i,a){u&&function(t){var n,i;u&&u.playerWidth?i=u.playerWidth:e.calculateWidth&&(i=e.calculateWidth(t)),u&&u.playerHeight?n=u.playerHeight:e.calculateHeight&&(n=e.calculateHeight(t)),r.style.width=i>0?"".concat(i,"px"):"auto",r.style.height=n>0?"".concat(n,"px"):"auto"}({responsive:!0,videoWidth:n||r.videoWidth,videoHeight:i||r.videoHeight}),(0,o.default)(r,!1),e&&(e.style?(0,o.default)(e,!1):e.show&&e.show()),a?r.setAttribute("volume",1):t.isAudioEnabled()||r.setAttribute("muted",!0),s.default&&(0,s.default)(r,{iPad:!0}),r.load(),u?h.emit(c.default.REPLAY_SHOWN):h.emit(c.default.PREVIEW_SHOWN)},this.build=function(){m("Replay: build()"),(r=e.querySelector("video.".concat(t.selectors.replayClass)))||function(){if(m("Replay: buildElement()"),!(r=(0,a.default)("video.".concat(t.selectors.replayClass))).setAttribute)throw d.default.create("Please upgrade browser",t);e.appendChild(r)}(),this.hide(),r.setAttribute("autoplay",!0),r.setAttribute("autostart",!0),r.setAttribute("autobuffer",!0),r.setAttribute("playsinline",!0),r.setAttribute("webkit-playsinline","webkit-playsinline"),r.setAttribute("controls","controls"),r.setAttribute("preload","auto"),n||(y()||this.on(c.default.PREVIEW,(function(e,t,n){h.show(t,n)})),(0,i.default)(r,"touchstart",(function(e){try{e&&e.preventDefault()}catch(e){}this.paused?v():g()})),r.onclick=function(e){e&&e.preventDefault(),this.paused?v():g()}),n=!0,m("Replay: built.")},this.unload=function(){n=!1},this.getVideoSource=function(e){var t,n,i=r.getElementsByTagName("source"),o=i&&i.length,a="video/".concat(e);if(o)for(n=0;n<o&&!t;n++)i[n].getAttribute("type")===a&&(t=i[n]);return t},this.setMp4Source=function(e,t){b("mp4",e,t)},this.setWebMSource=function(e,t){b("webm",e,t)},this.getVideoType=function(){return p.getVideoType(r)},this.reset=function(e){g((function(){r&&(h.setMp4Source(null),h.setWebMSource(null)),e&&e()}))},this.hide=function(){y()?(0,o.default)(e,!0):r&&(0,o.default)(r,!0)},this.isShown=function(){return r&&!(0,o.default)(r)},this.getParentElement=function(){return e}};(0,u.default)(h,f.default);n.default=h},{"../../events":120,"../../util/browser":124,"../../util/eventEmitter":126,"../../util/videomailError":131,"@babel/runtime/helpers/interopRequireDefault":3,"add-eventlistener-with-options":9,hidden:59,hyperscript:61,inherits:64,"iphone-inline-video":67}],147:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){a.default.call(this,t,"UserMedia");var n,r,p=e&&e.getRawVisualUserMedia(),m=new o.default(t),y=this,b=!1,g=!1;function v(e){e?function(e){if(r=e,void 0!==p.srcObject)p.srcObject=e;else{if(void 0===p.src)throw c.default.create("Error attaching stream to element.","Contact the developer about this",t);var n=window.URL||window.webkitURL;p.src=n.createObjectURL(e)||e}}(e):(p.removeAttribute("srcObject"),p.removeAttribute("src"),r=null)}function w(){return p.mozSrcObject?p.mozSrcObject:p.srcObject?p.srcObject:r}function E(){if(p.ended)return p.ended;var e=w();return e&&e.ended}function _(){if(p.videoWidth&&p.videoWidth<3||p.height&&p.height<3)return!0}function R(e,n){t.debug("UserMedia: ...",h,"event",e,(0,d.default)(n))}function S(e){R(e.type,{readyState:p.readyState}),p.removeEventListener&&p.removeEventListener(e.type,S)}this.unloadRemainingEventListeners=function(){t.debug("UserMedia: unloadRemainingEventListeners()"),u.default.forEach((function(e){p.removeEventListener(e,S)}))},this.init=function(e,r,o,a){var l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};this.stop(e,{aboutToInitialize:!0,switchingFacingMode:l.switchingFacingMode});var d=!1,h=!1,b=!1;function g(){y.removeListener(s.default.SENDING_FIRST_FRAME,g),n&&n.record(o)}function w(){t.debug("UserMedia: unloadAllEventListeners()"),y.removeListener(s.default.SENDING_FIRST_FRAME,g),p.removeEventListener&&p.removeEventListener("play",k),p.removeEventListener&&p.removeEventListener("loadedmetadata",T),y.unloadRemainingEventListeners()}function A(){try{if(p.load(),p.paused){var e;t.debug("UserMedia: play()","media.readyState=".concat(p.readyState),"media.paused=".concat(p.paused),"media.ended=".concat(p.ended),"media.played=".concat((0,f.default)(p.played)));try{e=p.play()}catch(e){t.logger.warn("Caught raw usermedia play exception:",e)}(n=e)&&"undefined"!=typeof Promise&&n instanceof Promise&&e.then((function(){b||(t.debug("UserMedia: play promise successful. Playing now."),b=!0)})).catch((function(e){t.logger.warn("Caught pending usermedia promise exception: %s",e.toString())}))}}catch(e){w(),a(e)}var n}function O(){var i=p.readyState;if(t.debug("UserMedia: fireCallbacks("+"readyState=".concat(i,", ")+"onPlayReached=".concat(d,", ")+"onLoadedMetaDataReached=".concat(h,")")),d&&h&&(r(),n&&o))try{n.init(e),y.on(s.default.SENDING_FIRST_FRAME,g)}catch(e){w(),a(e)}}function k(){try{R("play",{readyState:p.readyState,audio:t.isAudioEnabled(),width:p.width,height:p.height,videoWidth:p.videoWidth,videoHeight:p.videoHeight}),p.removeEventListener&&p.removeEventListener("play",k),E()||_()?a(c.default.create("Already busy","Probably another browser window is using your webcam?",t)):(d=!0,O())}catch(e){w(),a(e)}}function T(){R("loadedmetadata",{readyState:p.readyState,paused:p.paused,width:p.width,height:p.height,videoWidth:p.videoWidth,videoHeight:p.videoHeight}),p.removeEventListener&&p.removeEventListener("loadedmetadata",T),E()||_()||(y.emit(s.default.LOADED_META_DATA),m.isAndroid()&&A(),h=!0,O())}t&&t.isAudioEnabled()&&(n||(n=new i.default(this,t)));try{var x=function(e){var t,n=function(e){var t;return e&&e.getVideoTracks&&(t=e.getVideoTracks()),t}(e);return n&&n[0]&&(t=n[0]),t}(e);if(x){if(!x.enabled)throw c.default.create("Webcam is disabled","The video track seems to be disabled. Enable it in your system.",t);var j;x.label&&x.label.length>0&&(j=x.label),j+=" with enabled=".concat(x.enabled),j+=", muted=".concat(x.muted),j+=", remote=".concat(x.remote),j+=", readyState=".concat(x.readyState),j+=", error=".concat(x.error),t.debug("UserMedia: ".concat(x.kind," detected."),j||"")}else t.debug("UserMedia: detected (but no video tracks exist");u.default.forEach((function(e){p.addEventListener(e,S,!1)})),p.addEventListener("loadedmetadata",T),p.addEventListener("play",k),p.addEventListener("error",(function(e){t.logger.warn("Caught video element error event: %s",(0,f.default)(e))})),v(e),A()}catch(e){y.emit(s.default.ERROR,e)}},this.isReady=function(){return Boolean(p.src)},this.stop=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{var r=t.aboutToInitialize,i=t.switchingFacingMode;if(!r){e||(e=w());var o=function(e){var t;return e&&e.getTracks&&(t=e.getTracks()),t}(e),a=!1;o&&o.forEach((function(e){e.stop&&(a=!0,e.stop())})),!a&&e&&e.stop&&e.stop(),v(null),n&&n.stop(),n=null}i||(b=g=!1)}catch(e){y.emit(s.default.ERROR,e)}},this.createCanvas=function(){return(0,l.default)("canvas",{width:this.getRawWidth(!0),height:this.getRawHeight(!0)})},this.getVideoHeight=function(){return p.videoHeight},this.getVideoWidth=function(){return p.videoWidth},this.hasVideoWidth=function(){return this.getVideoWidth()>0},this.getRawWidth=function(n){var r=this.getVideoWidth(),i=t.hasDefinedWidth();return(i||t.hasDefinedHeight())&&(r=!n&&i?t.video.width:e.calculateWidth(n)),n&&(r=e.limitWidth(r)),r},this.getRawHeight=function(n){var r;if(t.hasDefinedDimension()){if((r=e.calculateHeight(n))<1)throw c.default.create("Bad dimensions","Calculated raw height cannot be less than 1!",t)}else if((r=this.getVideoHeight())<1)throw c.default.create("Bad dimensions","Raw video height from DOM element cannot be less than 1!",t);return n&&(r=e.limitHeight(r)),r},this.getRawVisuals=function(){return p},this.pause=function(){b=!0},this.isPaused=function(){return b},this.resume=function(){b=!1},this.record=function(){g=!0},this.isRecording=function(){return g},this.getAudioSampleRate=function(){return n?n.getSampleRate():-1},this.getCharacteristics=function(){return{audioSampleRate:this.getAudioSampleRate(),muted:p&&p.muted,width:p&&p.width,height:p&&p.height,videoWidth:p&&p.videoWidth,videoHeight:p&&p.videoHeight}}};var i=r(e("./../../util/audioRecorder")),o=r(e("./../../util/browser")),a=r(e("./../../util/eventEmitter")),s=r(e("./../../events")),u=r(e("./../../util/mediaEvents")),c=r(e("./../../util/videomailError")),l=r(e("hyperscript")),f=r(e("./../../util/pretty")),d=r(e("safe-json-stringify")),h="|—O—|"},{"./../../events":120,"./../../util/audioRecorder":123,"./../../util/browser":124,"./../../util/eventEmitter":126,"./../../util/mediaEvents":128,"./../../util/pretty":129,"./../../util/videomailError":131,"@babel/runtime/helpers/interopRequireDefault":3,hyperscript:61,"safe-json-stringify":99}],148:[function(e,t,n){"use strict";t.exports='@-webkit-keyframes blink{0%{opacity:.9}35%{opacity:.9}50%{opacity:.1}85%{opacity:.1}to{opacity:.9}}@keyframes blink{0%{opacity:.9}35%{opacity:.9}50%{opacity:.1}85%{opacity:.1}to{opacity:.9}}.IIV::-webkit-media-controls-play-button,.IIV::-webkit-media-controls-start-playback-button{opacity:0;pointer-events:none;width:5px}.videomail .visuals{position:relative}.videomail .visuals video.replay{height:100%;width:100%}.videomail .countdown,.videomail .pausedHeader,.videomail .pausedHint,.videomail .recordNote,.videomail .recordTimer{height:auto;margin:0}.videomail .countdown,.videomail .facingMode,.videomail .paused,.videomail .recordNote,.videomail .recordTimer,.videomail noscript{position:absolute;z-index:100}.videomail .countdown,.videomail .pausedHeader,.videomail .pausedHint,.videomail .recordNote,.videomail .recordTimer,.videomail noscript{font-weight:700}.videomail .countdown,.videomail .paused,.videomail noscript{top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:100%}.videomail .countdown,.videomail .pausedHeader,.videomail .pausedHint{letter-spacing:4px;text-align:center;text-shadow:-2px 0 #fff,0 2px #fff,2px 0 #fff,0 -2px #fff}.videomail .countdown,.videomail .pausedHeader{font-size:460%;opacity:.9}.videomail .pausedHint{font-size:150%}.videomail .facingMode{background:rgba(30,30,30,.5);border:none;bottom:.6em;color:hsla(0,0%,96%,.9);font-family:monospace;font-size:1.2em;outline:none;padding:.1em .3em;right:.7em;-webkit-transition:all .2s ease;transition:all .2s ease;z-index:10}.videomail .facingMode:hover{background:rgba(50,50,50,.7);cursor:pointer}.videomail .recordNote,.videomail .recordTimer{background:hsla(0,0%,4%,.8);color:#00d814;font-family:monospace;opacity:.9;padding:.3em .4em;right:.7em;-webkit-transition:all 1s ease;transition:all 1s ease}.videomail .recordNote.near,.videomail .recordTimer.near{color:#eb9369}.videomail .recordNote.nigh,.videomail .recordTimer.nigh{color:#ea4b2a}.videomail .recordTimer{top:.7em}.videomail .recordNote{top:3.6em}.videomail .recordNote:before{-webkit-animation:blink 1s infinite;animation:blink 1s infinite;content:"REC"}.videomail .notifier{-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;overflow:hidden}.videomail .radioGroup{display:block}.videomail video{margin-bottom:0}.videomail video.userMedia{background-color:rgba(50,50,50,.1)}'},{}],"videomail-client":[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("./util/standardize")),o=r(e("./client"));if(!navigator)throw new Error("Navigator is missing!");(0,i.default)(window,navigator);n.default=o.default;t.exports=o.default},{"./client":118,"./util/standardize":130,"@babel/runtime/helpers/interopRequireDefault":3}]},{},["videomail-client"])("videomail-client")}));
50
+ t.exports=function(t){return ArrayBuffer.isView(t)?e.from(t.buffer,t.byteOffset,t.byteLength):e.from(t)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:15}],110:[function(e,t,n){!function(e,r){"use strict";var i="function",o="undefined",a="object",s="string",u="major",c="model",l="name",f="type",d="vendor",h="version",p="architecture",m="console",y="mobile",b="tablet",g="smarttv",v="wearable",w="embedded",E="Amazon",_="Apple",R="ASUS",S="BlackBerry",A="Browser",O="Chrome",k="Firefox",T="Google",x="Huawei",j="LG",M="Microsoft",C="Motorola",N="Opera",D="Samsung",I="Sharp",L="Sony",P="Xiaomi",B="Zebra",U="Facebook",F="Chromium OS",W="Mac OS",q=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},H=function(e,t){return typeof e===s&&-1!==V(t).indexOf(V(e))},V=function(e){return e.toLowerCase()},z=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,500)},G=function(e,t){for(var n,o,s,u,c,l,f=0;f<t.length&&!c;){var d=t[f],h=t[f+1];for(n=o=0;n<d.length&&!c&&d[n];)if(c=d[n++].exec(e))for(s=0;s<h.length;s++)l=c[++o],typeof(u=h[s])===a&&u.length>0?2===u.length?typeof u[1]==i?this[u[0]]=u[1].call(this,l):this[u[0]]=u[1]:3===u.length?typeof u[1]!==i||u[1].exec&&u[1].test?this[u[0]]=l?l.replace(u[1],u[2]):r:this[u[0]]=l?u[1].call(this,l,u[2]):r:4===u.length&&(this[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):r):this[u]=l||r;f+=2}},$=function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(H(t[n][i],e))return"?"===n?r:n}else if(H(t[n],e))return"?"===n?r:n;return e},Y={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},K={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,h],[/opios[\/ ]+([\w\.]+)/i],[h,[l,N+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[h,[l,N+" GX"]],[/\bopr\/([\w\.]+)/i],[h,[l,N]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[h,[l,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[l,h],[/\bddg\/([\w\.]+)/i],[h,[l,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[l,"UC"+A]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[h,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[l,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[h,[l,"Smart Lenovo "+A]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+A],h],[/\bfocus\/([\w\.]+)/i],[h,[l,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[l,N+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[l,N+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[l,"MIUI "+A]],[/fxios\/([-\w\.]+)/i],[h,[l,k]],[/\bqihu|(qi?ho?o?|360)browser/i],[[l,"360 "+A]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1 "+A],h],[/samsungbrowser\/([\w\.]+)/i],[h,[l,D+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],h],[/metasr[\/ ]?([\d\.]+)/i],[h,[l,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[l,"Sogou Mobile"],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[l,h],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,U],h],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[l,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[l,O+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,O+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[l,"Android "+A]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[h,$,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[l,k+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[l,h],[/(cobalt)\/([\w\.]+)/i],[l,[h,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,V]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,"",V]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,V]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[d,D],[f,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[c,[d,D],[f,y]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[d,_],[f,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[d,_],[f,b]],[/(macintosh);/i],[c,[d,_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[d,I],[f,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[d,x],[f,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[d,x],[f,y]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[c,/_/g," "],[d,P],[f,y]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[d,P],[f,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[d,"OPPO"],[f,y]],[/\b(opd2\d{3}a?) bui/i],[c,[d,"OPPO"],[f,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[d,"Vivo"],[f,y]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[d,"Realme"],[f,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[d,C],[f,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[d,C],[f,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[d,j],[f,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[d,j],[f,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[d,"Lenovo"],[f,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[d,"Nokia"],[f,y]],[/(pixel c)\b/i],[c,[d,T],[f,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[d,T],[f,y]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[d,L],[f,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[d,L],[f,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[d,"OnePlus"],[f,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[d,E],[f,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[d,E],[f,y]],[/(playbook);[-\w\),; ]+(rim)/i],[c,d,[f,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[d,S],[f,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[d,R],[f,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[d,R],[f,y]],[/(nexus 9)/i],[c,[d,"HTC"],[f,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[c,/_/g," "],[f,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[d,"Acer"],[f,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[d,"Meizu"],[f,y]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[d,"Ulefone"],[f,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d,c,[f,y]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d,c,[f,b]],[/(surface duo)/i],[c,[d,M],[f,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[d,"Fairphone"],[f,y]],[/(u304aa)/i],[c,[d,"AT&T"],[f,y]],[/\bsie-(\w*)/i],[c,[d,"Siemens"],[f,y]],[/\b(rct\w+) b/i],[c,[d,"RCA"],[f,b]],[/\b(venue[\d ]{2,7}) b/i],[c,[d,"Dell"],[f,b]],[/\b(q(?:mv|ta)\w+) b/i],[c,[d,"Verizon"],[f,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[d,"Barnes & Noble"],[f,b]],[/\b(tm\d{3}\w+) b/i],[c,[d,"NuVision"],[f,b]],[/\b(k88) b/i],[c,[d,"ZTE"],[f,b]],[/\b(nx\d{3}j) b/i],[c,[d,"ZTE"],[f,y]],[/\b(gen\d{3}) b.+49h/i],[c,[d,"Swiss"],[f,y]],[/\b(zur\d{3}) b/i],[c,[d,"Swiss"],[f,b]],[/\b((zeki)?tb.*\b) b/i],[c,[d,"Zeki"],[f,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],c,[f,b]],[/\b(ns-?\w{0,9}) b/i],[c,[d,"Insignia"],[f,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[d,"NextBook"],[f,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],c,[f,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],c,[f,y]],[/\b(ph-1) /i],[c,[d,"Essential"],[f,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[d,"Envizen"],[f,b]],[/\b(trio[-\w\. ]+) b/i],[c,[d,"MachSpeed"],[f,b]],[/\btu_(1491) b/i],[c,[d,"Rotor"],[f,b]],[/(shield[\w ]+) b/i],[c,[d,"Nvidia"],[f,b]],[/(sprint) (\w+)/i],[d,c,[f,y]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[d,M],[f,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[d,B],[f,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[d,B],[f,y]],[/smart-tv.+(samsung)/i],[d,[f,g]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[d,D],[f,g]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,j],[f,g]],[/(apple) ?tv/i],[d,[c,_+" TV"],[f,g]],[/crkey/i],[[c,O+"cast"],[d,T],[f,g]],[/droid.+aft(\w+)( bui|\))/i],[c,[d,E],[f,g]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[d,I],[f,g]],[/(bravia[\w ]+)( bui|\))/i],[c,[d,L],[f,g]],[/(mitv-\w{5}) bui/i],[c,[d,P],[f,g]],[/Hbbtv.*(technisat) (.*);/i],[d,c,[f,g]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[d,z],[c,z],[f,g]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,g]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,c,[f,m]],[/droid.+; (shield) bui/i],[c,[d,"Nvidia"],[f,m]],[/(playstation [345portablevi]+)/i],[c,[d,L],[f,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[d,M],[f,m]],[/((pebble))app/i],[d,c,[f,v]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[d,_],[f,v]],[/droid.+; (glass) \d/i],[c,[d,T],[f,v]],[/droid.+; (wt63?0{2,3})\)/i],[c,[d,B],[f,v]],[/(quest( \d| pro)?)/i],[c,[d,U],[f,v]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[f,w]],[/(aeobc)\b/i],[c,[d,E],[f,w]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[f,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[f,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[f,y]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[l,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[l,h],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,h],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[l,[h,$,Y]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,$,Y],[l,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,W],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,h],[/\(bb(10);/i],[h,[l,S]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[h,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[l,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[h,[l,O+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,F],h],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,h],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,h]]},J=function(t,n){if(typeof t===a&&(n=t,t=r),!(this instanceof J))return new J(t,n).getResult();var m=typeof e!==o&&e.navigator?e.navigator:r,g=t||(m&&m.userAgent?m.userAgent:""),v=m&&m.userAgentData?m.userAgentData:r,w=n?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(K,n):K,E=m&&m.userAgent==g;return this.getBrowser=function(){var e,t={};return t[l]=r,t[h]=r,G.call(t,g,w.browser),t[u]=typeof(e=t[h])===s?e.replace(/[^\d\.]/g,"").split(".")[0]:r,E&&m&&m.brave&&typeof m.brave.isBrave==i&&(t[l]="Brave"),t},this.getCPU=function(){var e={};return e[p]=r,G.call(e,g,w.cpu),e},this.getDevice=function(){var e={};return e[d]=r,e[c]=r,e[f]=r,G.call(e,g,w.device),E&&!e[f]&&v&&v.mobile&&(e[f]=y),E&&"Macintosh"==e[c]&&m&&typeof m.standalone!==o&&m.maxTouchPoints&&m.maxTouchPoints>2&&(e[c]="iPad",e[f]=b),e},this.getEngine=function(){var e={};return e[l]=r,e[h]=r,G.call(e,g,w.engine),e},this.getOS=function(){var e={};return e[l]=r,e[h]=r,G.call(e,g,w.os),E&&!e[l]&&v&&v.platform&&"Unknown"!=v.platform&&(e[l]=v.platform.replace(/chrome os/i,F).replace(/macos/i,W)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return g},this.setUA=function(e){return g=typeof e===s&&e.length>500?z(e,500):e,this},this.setUA(g),this};J.VERSION="1.0.38",J.BROWSER=q([l,h,u]),J.CPU=q([p]),J.DEVICE=q([c,d,f,m,y,g,b,v,w]),J.ENGINE=J.OS=q([l,h]),typeof n!==o?(typeof t!==o&&t.exports&&(n=t.exports=J),n.UAParser=J):typeof e!==o&&(e.UAParser=J);var X=typeof e!==o&&(e.jQuery||e.Zepto);if(X&&!X.ua){var Q=new J;X.ua=Q.getResult(),X.ua.get=function(){return Q.getUA()},X.ua.set=function(e){Q.setUA(e);var t=Q.getResult();for(var n in t)X.ua[n]=t[n]}}}("object"==typeof window?window:this)},{}],111:[function(e,t,n){(function(e){(function(){function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],112:[function(e,t,n){(function(n,r){(function(){var i=e("readable-stream"),o=e("end-of-stream"),a=e("inherits"),s=e("stream-shift"),u=r.from&&r.from!==Uint8Array.from?r.from([0]):new r([0]),c=function(e,t){e._corked?e.once("uncork",t):t()},l=function(e,t){return function(n){n?function(e,t){e._autoDestroy&&e.destroy(t)}(e,"premature close"===n.message?null:n):t&&!e._ended&&e.end()}},f=function(e,t,n){if(!(this instanceof f))return new f(e,t,n);i.Duplex.call(this,n),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!n||!1!==n.autoDestroy,this._forwardDestroy=!n||!1!==n.destroy,this._forwardEnd=!n||!1!==n.end,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,e&&this.setWritable(e),t&&this.setReadable(t)};a(f,i.Duplex),f.obj=function(e,t,n){return n||(n={}),n.objectMode=!0,n.highWaterMark=16,new f(e,t,n)},f.prototype.cork=function(){1==++this._corked&&this.emit("cork")},f.prototype.uncork=function(){this._corked&&0==--this._corked&&this.emit("uncork")},f.prototype.setWritable=function(e){if(this._unwrite&&this._unwrite(),this.destroyed)e&&e.destroy&&e.destroy();else if(null!==e&&!1!==e){var t=this,r=o(e,{writable:!0,readable:!1},l(this,this._forwardEnd)),i=function(){var e=t._ondrain;t._ondrain=null,e&&e()};this._unwrite&&n.nextTick(i),this._writable=e,this._writable.on("drain",i),this._unwrite=function(){t._writable.removeListener("drain",i),r()},this.uncork()}else this.end()},f.prototype.setReadable=function(e){if(this._unread&&this._unread(),this.destroyed)e&&e.destroy&&e.destroy();else{if(null===e||!1===e)return this.push(null),void this.resume();var t,n=this,r=o(e,{writable:!1,readable:!0},l(this)),a=function(){n._forward()},s=function(){n.push(null)};this._drained=!0,this._readable=e,this._readable2=e._readableState?e:(t=e,new i.Readable({objectMode:!0,highWaterMark:16}).wrap(t)),this._readable2.on("readable",a),this._readable2.on("end",s),this._unread=function(){n._readable2.removeListener("readable",a),n._readable2.removeListener("end",s),r()},this._forward()}},f.prototype._read=function(){this._drained=!0,this._forward()},f.prototype._forward=function(){if(!this._forwarding&&this._readable2&&this._drained){var e;for(this._forwarding=!0;this._drained&&null!==(e=s(this._readable2));)this.destroyed||(this._drained=this.push(e));this._forwarding=!1}},f.prototype.destroy=function(e){if(!this.destroyed){this.destroyed=!0;var t=this;n.nextTick((function(){t._destroy(e)}))}},f.prototype._destroy=function(e){if(e){var t=this._ondrain;this._ondrain=null,t?t(e):this.emit("error",e)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},f.prototype._write=function(e,t,n){return this.destroyed?n():this._corked?c(this,this._write.bind(this,e,t,n)):e===u?this._finish(n):this._writable?void(!1===this._writable.write(e)?this._ondrain=n:n()):n()},f.prototype._finish=function(e){var t=this;this.emit("preend"),c(this,(function(){var n,r;n=t._forwardEnd&&t._writable,r=function(){!1===t._writableState.prefinished&&(t._writableState.prefinished=!0),t.emit("prefinish"),c(t,e)},n?n._writableState&&n._writableState.finished?r():n._writableState?n.end(r):(n.end(),r()):r()}))},f.prototype.end=function(e,t,n){return"function"==typeof e?this.end(null,null,e):"function"==typeof t?this.end(e,null,t):(this._ended=!0,e&&this.write(e),this._writableState.ending||this.write(u),i.Writable.prototype.end.call(this,n))},t.exports=f}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{_process:77,buffer:15,"end-of-stream":33,inherits:64,"readable-stream":94,"stream-shift":102}],113:[function(e,t,n){(function(n,r){(function(){"use strict";var i=e("readable-stream").Transform,o=e("duplexify"),a=e("ws"),s=e("safe-buffer").Buffer;t.exports=function(e,t,u){var c,l,f="browser"===n.title,d=!!r.WebSocket,h=f?function e(t,n,r){if(l.bufferedAmount>m)return void setTimeout(e,y,t,n,r);g&&"string"==typeof t&&(t=s.from(t,"utf8"));try{l.send(t)}catch(e){return r(e)}r()}:function(e,t,n){if(l.readyState!==l.OPEN)return void n();g&&"string"==typeof e&&(e=s.from(e,"utf8"));l.send(e,n)};t&&!Array.isArray(t)&&"object"==typeof t&&(u=t,t=null,("string"==typeof u.protocol||Array.isArray(u.protocol))&&(t=u.protocol));u||(u={});void 0===u.objectMode&&(u.objectMode=!(!0===u.binary||void 0===u.binary));var p=function(e,t,n){var r=new i({objectMode:e.objectMode});return r._write=t,r._flush=n,r}(u,h,(function(e){l.close(),e()}));u.objectMode||(p._writev=R);var m=u.browserBufferSize||524288,y=u.browserBufferTimeout||1e3;"object"==typeof e?l=e:(l=d&&f?new a(e,t):new a(e,t,u)).binaryType="arraybuffer";var b=void 0===l.addEventListener;l.readyState===l.OPEN?c=p:(c=c=o(void 0,void 0,u),u.objectMode||(c._writev=R),b?l.addEventListener("open",v):l.onopen=v);c.socket=l,b?(l.addEventListener("close",w),l.addEventListener("error",E),l.addEventListener("message",_)):(l.onclose=w,l.onerror=E,l.onmessage=_);p.on("close",(function(){l.close()}));var g=!u.objectMode;function v(){c.setReadable(p),c.setWritable(p),c.emit("connect")}function w(){c.end(),c.destroy()}function E(e){c.destroy(e)}function _(e){var t=e.data;t=t instanceof ArrayBuffer?s.from(t):s.from(t,"utf8"),p.push(t)}function R(e,t){for(var n=new Array(e.length),r=0;r<e.length;r++)"string"==typeof e[r].chunk?n[r]=s.from(e[r],"utf8"):n[r]=e[r].chunk;this._write(s.concat(n),"binary",t)}return c}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:77,duplexify:112,"readable-stream":94,"safe-buffer":98,ws:114}],114:[function(e,t,n){var r=null;"undefined"!=typeof WebSocket?r=WebSocket:"undefined"!=typeof MozWebSocket?r=MozWebSocket:"undefined"!=typeof window&&(r=window.WebSocket||window.MozWebSocket),t.exports=r},{}],115:[function(e,t,n){t.exports=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),i=e[e.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach((function(e){r[e]=i[e]})),r}}},{}],116:[function(e,t,n){t.exports={name:"videomail-client",version:"8.3.0",description:"A wicked npm package to record videos directly in the browser, wohooo!",author:"Michael Heuberger <michael.heuberger@binarykitchen.com>",contributors:[{name:"Michael Heuberger",email:"michael.heuberger@binarykitchen.com"}],homepage:"https://videomail.io",repository:{type:"git",url:"https://github.com/binarykitchen/videomail-client.git"},license:"CC0-1.0",readmeFilename:"README.md",module:"src/js/index.js",main:"prototype/js/videomail-client.js",scripts:{build:"gulp build",clean:"rm -rf node_modules && rm -rf package-lock.json",test:"gulp test",watch:"NODE_NO_HTTP2=1 gulp watch",audit:"npx audit-ci --config audit-ci.json",patch:"./env/dev/release.sh --importance=patch",minor:"./env/dev/release.sh --importance=minor",major:"./env/dev/release.sh --importance=major",lint:"eslint --color ./src ./test ./gulpfile.js","lint:fix":"npm --silent run lint -- --fix",prettier:"prettier --check ./src ./test ./prototype/*.html gulpfile.js","prettier:fix":"prettier --write ./src ./test ./prototype/*.html gulpfile.js"},engines:{node:"^20.12.2",npm:"^10.5.0"},keywords:["webcam","video","videomail","encoder","getusermedia","audio","recorder"],prettier:"./prettier.config.js",dependencies:{"@babel/core":"7.25.2","add-eventlistener-with-options":"1.25.5",animitter:"3.0.0","audio-sample":"4.0.1","canvas-to-buffer":"4.0.1","classlist.js":"1.1.20150312",contains:"0.1.1","core-js":"3.38.0","create-error":"0.3.1",deepmerge:"4.3.1",defined:"1.0.1",despot:"2.0.0","document-visibility":"1.0.1","element-closest":"3.0.2",filesize:"10.1.4","format-util":"1.0.5","get-form-data":"3.0.0",hidden:"1.1.1","humanize-duration":"3.32.1",hyperscript:"2.0.2",inherits:"2.0.4","insert-css":"2.0.0","iphone-inline-video":"2.2.2","is-power-of-two":"1.0.0",keymirror:"0.1.1","number-is-integer":"2.0.0",readystate:"0.4.1","request-frame":"1.5.3","safe-json-stringify":"1.2.0",superagent:"8.1.2","ua-parser-js":"1.0.38","websocket-stream":"5.5.2"},devDependencies:{"@babel/eslint-parser":"7.25.1","@babel/plugin-transform-runtime":"7.24.7","@babel/preset-env":"7.25.3","audit-ci":"7.1.0",autoprefixer:"10.4.20",babelify:"10.0.0","body-parser":"1.20.2",browserify:"17.0.0","connect-send-json":"1.0.0",cssnano:"6.0.5",del:"6.1.1",eslint:"8.57.0","eslint-config-prettier":"9.1.0","eslint-plugin-import":"2.29.1","eslint-plugin-node":"11.1.0","eslint-plugin-promise":"6.2.0","fancy-log":"2.0.0",glob:"10.4.2",gulp:"4.0.2","gulp-bump":"3.2.0","gulp-bytediff":"1.0.0","gulp-concat":"2.6.1","gulp-connect":"5.7.0","gulp-derequire":"3.0.0","gulp-if":"3.0.0","gulp-inject-string":"1.1.2","gulp-load-plugins":"2.0.8","gulp-plumber":"1.2.1","gulp-postcss":"10.0.0","gulp-rename":"2.0.0","gulp-sourcemaps":"3.0.0","gulp-stylus":"3.0.1","gulp-terser":"2.1.0",minimist:"1.2.8",nib:"1.2.0",postcss:"8.4.40",prettier:"3.3.3",router:"1.3.8",tape:"5.8.1","tape-catch":"1.0.6","tape-run":"11.0.0","vinyl-buffer":"1.0.1","vinyl-source-stream":"2.0.0",watchify:"4.0.0"}}},{}],117:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i,o,a=r(e("deepmerge")),s=r(e("readystate")),u=r(e("inherits")),c=r(e("./options")),l=r(e("./constants")),f=r(e("./events")),d=r(e("./util/collectLogger")),h=r(e("./util/eventEmitter")),p=r(e("./wrappers/container")),m=r(e("./wrappers/visuals/replay")),y=r(e("./wrappers/optionsWrapper")),b=r(e("./util/browser")),g=r(e("./resource"));var v=function(e){var t,n,r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,a.default)(c.default,e,{arrayMerge:function(e,t){return t}});return i||(i=new d.default(t)),t.logger=i,t.debug=t.logger.debug,y.default.addFunctions(t),t}(e),u=new p.default(r),l=r.debug;h.default.call(this,r,"VideomailClient"),this.events=f.default,this.show=function(){u.isBuilt()?u.show():this.once(f.default.BUILT,u.show)},this.replay=function(e,n){s.default.interactive((function(){if("string"==typeof n&&(n=document.getElementById(n)),n)u.isOutsideElementOf(n)&&(t=new m.default(n,r)).build();else if(u.isBuilt()||u.build(),!u.hasElement())throw s.default.removeAllListeners(),new Error("Unable to replay video without a container nor parent element.");t||(t=u.getReplay()),n||(n=t.getParentElement()),e&&(e=u.addPlayerDimensions(e,n)),u.isOutsideElementOf(n)?u.hideForm({deep:!0}):u.loadForm(e),setTimeout((function(){t.setVideomail(e),u.showReplayOnly()}),1e3)}))},this.startOver=function(e){t&&(t.hide(),t.reset()),u.startOver(e)},this.unload=function(e){s.default.removeAllListeners(),u.unload(e)},this.hide=function(){u.hide()},this.get=function(e,t){new g.default(r).get(e,(function(e,n){e?t(e):t(null,u.addPlayerDimensions(n))}))},this.canRecord=function(){return function(e){return o||(o=new b.default(e)),o}(r).canRecord()},this.isDirty=function(){return u.isDirty()},this.isRecording=function(){return u.isRecording()},this.submit=function(){u.submit()},this.getLogLines=function(){if(r.logger&&r.logger.getLines)return r.logger.getLines()},n=!1,s.default.interactive((function(e){l("Client: interactive(),","previousState =","".concat(e,","),"!building =","".concat(!n,","),"!isBuilt() =",!u.isBuilt()),n||u.isBuilt()||(n=!0,u.build(),n=!1)}))};(0,u.default)(v,h.default),Object.keys(l.default.public).forEach((function(e){v[e]=l.default.public[e]})),v.events=f.default;n.default=v},{"./constants":118,"./events":119,"./options":120,"./resource":121,"./util/browser":123,"./util/collectLogger":124,"./util/eventEmitter":125,"./wrappers/container":132,"./wrappers/optionsWrapper":135,"./wrappers/visuals/replay":145,"@babel/runtime/helpers/interopRequireDefault":3,deepmerge:25,inherits:64,readystate:95}],118:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default={SITE_NAME_LABEL:"x-videomail-site-name",VERSION_LABEL:"videomailClientVersion",public:{ENC_TYPE_APP_JSON:"application/json",ENC_TYPE_FORM:"application/x-www-form-urlencoded"}}},{}],119:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("keymirror"));n.default=(0,i.default)({BUILT:null,FORM_READY:null,LOADING_USER_MEDIA:null,USER_MEDIA_READY:null,CONNECTING:null,CONNECTED:null,DISCONNECTED:null,COUNTDOWN:null,RECORDING:null,STOPPING:null,STOPPED:null,PROGRESS:null,BEGIN_AUDIO_ENCODING:null,BEGIN_VIDEO_ENCODING:null,RESETTING:null,PAUSED:null,RESUMING:null,PREVIEW:null,PREVIEW_SHOWN:null,REPLAY_SHOWN:null,INVALID:null,VALIDATING:null,VALID:null,SUBMITTING:null,SUBMITTED:null,ERROR:null,BLOCKING:null,SENDING_FIRST_FRAME:null,FIRST_FRAME_SENT:null,HIDE:null,NOTIFYING:null,ENABLING_AUDIO:null,DISABLING_AUDIO:null,LOADED_META_DATA:null,EVENT_EMITTED:null,GOING_BACK:null,STARTING_OVER:null,ASKING_WEBCAM_PERMISSION:null,VISIBLE:null,INVISIBLE:null,SWITCH_FACING_MODE:null,SERVER_READY:null})},{"@babel/runtime/helpers/interopRequireDefault":3,keymirror:71}],120:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("../../package.json"),i="production"===t.env.NODE_ENV;n.default={logger:null,logStackSize:30,verbose:!i,baseUrl:"https://videomail.io",socketUrl:"wss://videomail.io",siteName:"videomail-client-demo",cache:!0,insertCss:!0,enablePause:!0,enableAutoPause:!0,enableSpace:!0,submitWithVideomail:!1,disableSubmit:!1,enableAutoValidation:!0,enableAutoSubmission:!0,enctype:"application/json",selectors:{containerId:"videomail",replayClass:"replay",userMediaClass:"userMedia",visualsClass:"visuals",buttonClass:null,buttonsClass:"buttons",recordButtonClass:"record",pauseButtonClass:"pause",resumeButtonClass:"resume",previewButtonClass:"preview",recordAgainButtonClass:"recordAgain",submitButtonClass:"submit",subjectInputName:"subject",fromInputName:"from",toInputName:"to",ccInputName:"cc",bccInputName:"bcc",bodyInputName:"body",sendCopyInputName:"sendCopy",keyInputName:"videomail_key",parentKeyInputName:"videomail_parent_key",aliasInputName:"videomail_alias",formId:null,submitButtonId:null,submitButtonSelector:null},audio:{enabled:!1,switch:!1,volume:.2,bufferSize:"auto"},video:{fps:15,limitSeconds:30,countdown:3,width:"auto",height:"auto",facingMode:"user",facingModeButton:!1,stretch:!1},image:{quality:.42,types:["webp","jpeg"]},text:{pausedHeader:"Paused",pausedHint:null,sending:"Teleporting",encoding:"Encoding",limitReached:"Limit reached",audioOff:"Audio off",audioOn:"Audio on",buttons:{record:"Record video",recordAgain:"Record again",resume:"Resume",pause:"Pause",preview:"Preview"}},notifier:{entertain:!1,entertainClass:"bg",entertainLimit:6,entertainInterval:9e3},timeouts:{userMedia:2e4,connection:1e4,pingInterval:35e3},loadUserMediaOnRecord:!1,callbacks:{adjustFormDataBeforePosting:null},defaults:{from:null,to:null,cc:null,bcc:null,subject:null,body:null},playerOnly:!1,displayErrors:!0,adjustFormOnBrowserError:!1,reportErrors:!1,fakeUaString:null,version:r.version}}).call(this)}).call(this,e("_process"))},{"../../package.json":116,_process:77}],121:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var t={};function n(t,n){return e.defaults[n]&&!t[n]&&(t[n]=e.defaults[n]),t}function r(e,t){return t&&t.body&&t.body.error&&!(e=t.body.error).message&&t.text&&(e.message=t.text),e}function u(n,u,c,l){l||(l=c,c=null);var f={},d="".concat(e.baseUrl,"/videomail/");c&&(d+=c);var h=(0,i.default)(n,d);f[o.default.SITE_NAME_LABEL]=e.siteName,h.query(f).set("Timezone-Id",s).send(u).timeout(e.timeout).end((function(n,i){if(n=r(n,i))l(n);else{var o=i.body&&i.body.videomail?i.body.videomail:null;e.cache&&u[a]&&(t[u[a]]=o),l(null,o,i.body)}}))}this.get=function(n,u){e.cache&&t[n]?setTimeout((function(){u(null,t[n])}),0):function(n,u){i.default.get("/videomail/".concat(n,"/snapshot")).set("Accept","application/json").set("Timezone-Id",s).set(o.default.SITE_NAME_LABEL,e.siteName).timeout(e.timeouts.connection).end((function(n,i){if(n=r(n,i))u(n);else{var o=i.body?i.body:null;e.cache&&(t[a]=o),u(null,o)}}))}(n,u)},this.reportError=function(t,n){var a={},s="".concat(e.baseUrl,"/client-error/"),u=(0,i.default)("post",s);a[o.default.SITE_NAME_LABEL]=e.siteName,u.query(a).send(t).timeout(e.timeout).end((function(e,t){(e=r(e,t))?n&&n(e):n&&n()}))},this.post=function(t,r){(t=function(t){return e.defaults&&(t=n(t,"from"),t=n(t,"to"),t=n(t,"cc"),t=n(t,"bcc"),t=n(t,"subject"),t=n(t,"body")),t}(t))[o.default.VERSION_LABEL]=e.version,e.callbacks.adjustFormDataBeforePosting?e.callbacks.adjustFormDataBeforePosting(t,(function(e,t){e?r(e):u("post",t,r)})):u("post",t,r)},this.put=function(e,t){u("put",e,e.key,t)},this.form=function(t,n,a){var u;switch(e.enctype){case o.default.public.ENC_TYPE_APP_JSON:u="json";break;case o.default.public.ENC_TYPE_FORM:u="form";break;default:setTimeout((function(){a(new Error("Invalid enctype given: ".concat(e.enctype)))}),0)}u&&i.default.post(n).type(u).set("Timezone-Id",s).send(t).timeout(e.timeout).end((function(e,t){(e=r(e,t))?a(e):a(null,t)}))}};var i=r(e("superagent")),o=r(e("./constants")),a="alias",s=Intl.DateTimeFormat().resolvedOptions().timeZone},{"./constants":118,"@babel/runtime/helpers/interopRequireDefault":3,superagent:104}],122:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){var n,r,c,l=new o.default(t);function f(){return window.AudioContext||window.webkitAudioContext}function d(){return Boolean(f())&&Boolean(h())}function h(){if(!c){var e=f();c=new e}return c}this.init=function(e){t.debug("AudioRecorder: init()");var i=h().createGain();try{r=h().createMediaStreamSource(e)}catch(e){throw a.default.create("Webcam has no audio",e.toString(),t)}var o=t.audio.bufferSize;if("auto"===o&&(o=l.isFirefox()?512:2048),!(0,s.default)(o))throw a.default.create("Audio buffer size must be a power of two.",t);if(!t.audio.volume||t.audio.volume>1)throw a.default.create("Audio volume must be between zero and one.",t);i.gain.value=t.audio.volume,n=h().createScriptProcessor(o,u,u),r.connect(n),n.connect(h().destination),r.connect(i),i.connect(n)},this.record=function(r){t.debug("AudioRecorder: record()"),n.onaudioprocess=function(t){!function(t,n){if(e.isRecording()&&!e.isPaused()){var r=t.inputBuffer.getChannelData(0);n(new i.default(r))}}(t,r)}},this.stop=function(){t.debug("AudioRecorder: stop()"),n&&(n.onaudioprocess=void 0),r&&r.disconnect(),d()&&(h().close?h().close().then((function(){t.debug("AudioRecorder: audio context is closed"),c=null})).catch((function(e){throw a.default.create(e,t)})):c=null)},this.getSampleRate=function(){return d()?h().sampleRate:-1}};var i=r(e("audio-sample")),o=r(e("./browser")),a=r(e("./videomailError")),s=r(e("is-power-of-two")),u=1},{"./browser":123,"./videomailError":130,"@babel/runtime/helpers/interopRequireDefault":3,"audio-sample":11,"is-power-of-two":69}],123:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("@babel/runtime/helpers/typeof")),o=r(e("defined")),a=r(e("ua-parser-js")),s=r(e("./videomailError"));n.default=function(e){e||(e={});var t,n="http://www.mozilla.org/firefox/update/",r="https://www.microsoft.com/en-us/download/details.aspx?id=48126",u="http://www.google.com/chrome/",c="http://www.chromium.org/getting-involved/download-chromium",l=(0,o.default)(e.fakeUaString,"undefined"!=typeof window&&window.navigator&&window.navigator.userAgent,""),f=new a.default(l).getResult(),d="iOS"===f.os.name,h=parseFloat(f.browser.version),p="Chrome"===f.browser.name,m="Brave"===f.browser.name,y="Chromium"===f.browser.name,b="Firefox"===f.browser.name,g=parseFloat(f.os.version),v="Windows"===f.os.name,w="Edge"===f.browser.name||v&&g>=10,E=/IE/.test(f.browser.name),_=/Safari/.test(f.browser.name),R=/Opera/.test(f.browser.name),S=/Android/.test(f.os.name),A=p||y,O="Facebook"===f.browser.name,k=d||S,T=_&&h>=11,x=d&&g>=11,j=d&&g<11,M=e.fakeHttps||"https:"===window.location.protocol,C=A||b||S||R||w||T||x||m,N=this;function D(){var e;return(e=j?"On iPads or iPhones below iOS v11 this camera feature is missing.<br/><br/>For now, we recommend you to upgrade iOS or to use an Android device.":function(){var e;return b?e=d?"Firefox on iOS is not ready for cameras yet. Hopefully in near future ...":'Probably you need to <a href="'.concat(n,'" target="_blank">')+"upgrade Firefox</a> to fix this.":p?e=d?"Use Safari instead. Apple doesn't give Chrome access to iPhone cameras (booo).":'Probably you need to <a href="'.concat(u,'" target="_blank">')+"upgrade Chrome</a> to fix this.":y?e='Probably you need to <a href="'.concat(c,'" target="_blank">')+"upgrade Chromium</a> to fix this.":E?e="Instead of Internet Explorer you need to upgrade to"+' <a href="'.concat(r,'" target="_blank">Edge</a>.'):T?e="Probably you need to shut down Safari and restart it, this for correct webcam access.":_&&(e="Safari below version 11 has no webcam support.<br/>Better upgrade Safari or pick"+' <a href="'.concat(u,'" target="_blank">Chrome</a>,')+' <a href="'.concat(n,'" target="_blank">Firefox</a> or Android.')),e}())||(e=N.isChromeBased()||N.isFirefox()||_?"For the webcam feature, your browser needs an upgrade.":O?"Hence we recommend you to use a real browser like "+'<a href="'.concat(u,'" target="_blank">Chrome</a>, ')+'<a href="'.concat(n,'" target="_blank">Firefox</a> or ')+'<a href="'.concat(r,'" target="_blank">Edge</a>.'):"Hence we recommend you to use either "+'<a href="'.concat(u,'" target="_blank">Chrome</a>, ')+'<a href="'.concat(n,'" target="_blank">Firefox</a>, ')+'<a href="'.concat(r,'" target="_blank">Edge</a> or Android.')),e}function I(e,t){var n;return e&&e.canPlayType&&(n=e.canPlayType("video/".concat(t))),""!==n&&n}this.canRecord=function(){var e="undefined"!=typeof navigator,t=!1;e&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?t=!0:t="function"===(e&&(0,i.default)(navigator.getUserMedia_));return t},this.checkRecordingCapabilities=function(){var t;if(M){if(!C||!this.canRecord()){var n,r=[];j?r.push(s.default.IOS_PROBLEM):r.push(s.default.BROWSER_PROBLEM),n=C?k?O?"Sorry, the Facebook app cannot record from your mobile camera":"Sorry, your browser cannot record from your mobile camera":"Sorry, your browser cannot record from webcams":k?"Sorry, your browser is unable to use your mobile camera":"Sorry, your browser is unable to use webcams",j&&(e.reportErrors=!1),t=s.default.create({message:n},D(),e,{classList:r})}}else t=s.default.create({message:"Sorry, your page is insecure"},"Please switch to HTTPS to ensure all is encrypted.",e,{classList:[s.default.BROWSER_PROBLEM]});return t},this.checkBufferTypes=function(){var t;return"undefined"==typeof window||void 0===window.atob?t=s.default.create("atob is not supported",e):void 0===window.ArrayBuffer?t=s.default.create("ArrayBuffers are not supported",e):void 0===window.Uint8Array&&(t=s.default.create("Uint8Arrays are not supported",e)),t},this.getVideoType=function(e){return!t&&e&&(I(e,"mp4")?t="mp4":I(e,"webm")&&(t="webm")),"webm"!==t&&"mp4"!==t&&(t="mp4"),t&&""!==t||(t="mp4"),t},this.getNoAccessIssue=function(){var t;return t=this.isChromeBased()?"Click on the allow button to grant access to your webcam.":this.isFirefox()?"Please grant Firefox access to your webcam.":"Your system does not let your browser access your webcam.",s.default.create("Unable to access webcam",t,e)},this.isChromeBased=function(){return A},this.isFirefox=function(){return b},this.isEdge=function(){return w},this.isAndroid=function(){return S},this.isMobile=function(){return"mobile"===f.device.type},this.isOkSafari=function(){return T},this.isIOS=function(){return d},this.getUsefulData=function(){return{browser:f.browser,device:f.device,os:f.os,engine:f.engine,userAgent:l}}}},{"./videomailError":130,"@babel/runtime/helpers/interopRequireDefault":3,"@babel/runtime/helpers/typeof":7,defined:27,"ua-parser-js":110}],124:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new o.default(e),n=e.logger||console,r=e.selectors&&e.selectors.containerId||"undefined container id",s=[];function u(t,n){var r=a.default.apply(void 0,(0,i.default)(n));return s.length>e.logStackSize&&s.pop(),s.push("[".concat(t,"] ").concat(r)),r}function c(e){return"#".concat(r," [").concat((new Date).toLocaleTimeString(),"] > ").concat(e)}this.debug=function(){var r=[].slice.call(arguments,0);r[0]=c(r[0]);var i=u("debug",r);e.verbose&&(t.isFirefox()?n.debug(i):n.groupCollapsed?(n.groupCollapsed(i),n.trace("Trace"),n.groupEnd()):n.debug?n.debug(i):console.log(i))},this.error=function(){var e=[].slice.call(arguments,0);e[0]=c(e[0]),n.error(u("error",e))},this.warn=function(){var e=[].slice.call(arguments,0);e[0]=c(e[0]),n.warn(u("warn",e))},this.getLines=function(){return s}};var i=r(e("@babel/runtime/helpers/toConsumableArray")),o=r(e("./browser")),a=r(e("format-util"))},{"./browser":123,"@babel/runtime/helpers/interopRequireDefault":3,"@babel/runtime/helpers/toConsumableArray":6,"format-util":45}],125:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){this.emit=function(n){var r,u=Array.prototype.slice.call(arguments,0);if(!n)throw a.default.create("You cannot emit without an event.",e);if(n===s.default.ERROR){var c=u[1];c=a.default.create(c,e),u[1]=c}e.debug&&("removeListener"!==n&&"newListener"!==n&&(u[1]&&(r=u.slice(1)),r?e.debug("%s emits: %s",t,n,(0,o.default)(r)):e.debug("%s emits: %s",t,n)));return i.default.emit.apply(i.default,u)},this.on=function(e,t){return i.default.on(e,t)},this.once=function(e,t){return i.default.once(e,t)},this.listeners=function(e){return i.default.listeners(e)},this.removeListener=function(e,t){return i.default.removeListener(e,t)},this.removeAllListeners=function(){i.default.removeAllListeners()}};var i=r(e("despot")),o=r(e("safe-json-stringify")),a=r(e("./videomailError")),s=r(e("./../events"))},{"./../events":119,"./videomailError":130,"@babel/runtime/helpers/interopRequireDefault":3,despot:28,"safe-json-stringify":99}],126:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=e("filesize"),o=r(e("humanize-duration"));n.default={filesize:function(e,t){return(0,i.filesize)(e,{round:t})},toTime:function(e){return(0,o.default)(e)}}},{"@babel/runtime/helpers/interopRequireDefault":3,filesize:44,"humanize-duration":60}],127:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=["loadstart","suspend","progress","abort","emptied","stalled","pause","loadeddata","waiting","playing","canplay","canplaythrough","seeking","seeked","ended","ratechange","durationchange","volumechange"]},{}],128:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){if(null===e)return"null";if(void 0===e)return"undefined";if("string"==typeof e)return e;if(Array.isArray(e))return function(e){if(e&&e.length>0){var t=[];return e.forEach((function(e){e&&t.push((0,o.default)(e))})),a+t.join(s)}}(e);if("object"===(0,i.default)(e))return function(e,t){var n,r=Object.getOwnPropertyNames(e),i=t&&t.excludes||[],u=[];if(i.push("stack"),r&&r.length>0){var c=!1;r.forEach((function(t){i&&(c=i.indexOf(t)>=0),!c&&e[t]&&u.push((0,o.default)(e[t]))}))}1===u.length?n=u.join():u.length>1&&(n=a+u.join(s));return n}(e,t);return e.toString()};var i=r(e("@babel/runtime/helpers/typeof")),o=r(e("safe-json-stringify")),a="- ",s="<br/>".concat(a)},{"@babel/runtime/helpers/interopRequireDefault":3,"@babel/runtime/helpers/typeof":7,"safe-json-stringify":99}],129:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.screen||(e.screen={});(0,i.default)("native"),t.mediaDevices&&t.mediaDevices.getUserMedia||(t.getUserMedia_=t.getUserMedia||t.webkitGetUserMedia||t.mozGetUserMedia||t.msGetUserMedia);!e.AudioContext&&e.webkitAudioContext&&(e.AudioContext=e.webkitAudioContext);e.URL||(e.URL=e.webkitURL||e.mozURL||e.msURL);t.connection||(t.connection=t.mozConnection||t.webkitConnection);var n,r=["debug","groupCollapsed","groupEnd","error","exception","info","log","trace","warn"],o={};e.console?o=e.console:e.console=function(){};var a=r.length;for(;a--;)o[n=r[a]]||(o[n]=function(){})},e("classlist.js");var i=r(e("request-frame"))},{"@babel/runtime/helpers/interopRequireDefault":3,"classlist.js":20,"request-frame":97}],130:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("@babel/runtime/helpers/typeof")),o=r(e("./../resource")),a=r(e("create-error")),s=r(e("./pretty")),u=r(e("safe-json-stringify")),c="Videomail Error",l=(0,a.default)(Error,c,{explanation:void 0,logLines:void 0,useragent:void 0,url:void 0,stack:void 0}),f=function(e){return(0,s.default)(e,{excludes:["stack"]})};l.PERMISSION_DENIED="PERMISSION_DENIED",l.NOT_ALLOWED_ERROR="NotAllowedError",l.NOT_CONNECTED="Not connected",l.DOM_EXCEPTION="DOMException",l.STARTING_FAILED="Starting video failed",l.MEDIA_DEVICE_NOT_SUPPORTED="MediaDeviceNotSupported",l.BROWSER_PROBLEM="browser-problem",l.WEBCAM_PROBLEM="webcam-problem",l.IOS_PROBLEM="ios-problem",l.OVERCONSTRAINED="OverconstrainedError",l.NOT_FOUND_ERROR="NotFoundError",l.NOT_READABLE_ERROR="NotReadableError",l.SECURITY_ERROR="SecurityError",l.TRACK_START_ERROR="TrackStartError",l.INVALID_STATE_ERROR="InvalidStateError",l.create=function(t,n,r,a){if(t&&t.name===c)return t;!r&&n&&(r=n,n=void 0),r||(r={}),a||(a={});var s=r&&r.debug||console.log,d=r&&r.isAudioEnabled&&r.isAudioEnabled();s("VideomailError: create()",t,n||"(no explanation set)");var h,p,m,y=a.classList||[],b=new(0,e("./browser").default)(r);switch("object"===(0,i.default)(t)?t.name===l.TRACK_START_ERROR?h=l.TRACK_START_ERROR:t.name===l.SECURITY_ERROR?h=l.SECURITY_ERROR:8===t.code&&t.name===l.NotFoundError?h=l.NotFoundError:35===t.code||t.name===l.NOT_ALLOWED_ERROR?h=l.NOT_ALLOWED_ERROR:1===t.code&&1===t.PERMISSION_DENIED?h=l.PERMISSION_DENIED:t.constructor&&t.constructor.name===l.DOM_EXCEPTION?h=t.name===l.NOT_READABLE_ERROR?l.NOT_READABLE_ERROR:l.DOM_EXCEPTION:t.constructor&&t.constructor.name===l.OVERCONSTRAINED?h=l.OVERCONSTRAINED:t.message===l.STARTING_FAILED?h=t.message:t.name?h=t.name:"error"===t.type&&0===t.target.bufferedAmount&&(h=l.NOT_CONNECTED):h=t===l.NOT_CONNECTED?l.NOT_CONNECTED:t,m=t&&t.stack?t.stack:(new Error).stack,h){case l.SECURITY_ERROR:p="The operation was insecure",n="Probably you have disallowed Cookies for this page?",y.push(l.BROWSER_PROBLEM);break;case l.OVERCONSTRAINED:p="Invalid webcam constraints",n=t.constraint?"width"===t.constraint?"Your webcam does not meet the width requirement.":"Unmet constraint: ".concat(t.constraint):t.toString();break;case"MediaDeviceFailedDueToShutdown":p="Webcam is shutting down",n="This happens your webcam is already switching off and not giving you permission to use it.";break;case"SourceUnavailableError":p="Source of your webcam cannot be accessed",n="Probably it is locked from another process or has a hardware error.",t.message&&(t.message+=" Details: ".concat(t.message));break;case l.NOT_FOUND_ERROR:case"NO_DEVICES_FOUND":d?(p="No webcam nor microphone found",n="Your browser cannot find a webcam with microphone attached to your machine."):(p="No webcam found",n="Your browser cannot find a webcam attached to your machine."),y.push(l.WEBCAM_PROBLEM);break;case"PermissionDismissedError":p="Ooops, you didn't give me any permissions?",n="Looks like you skipped the webcam permission dialogue.<br/>Please grant access next time the dialogue appears.",y.push(l.WEBCAM_PROBLEM);break;case l.NOT_ALLOWED_ERROR:case l.PERMISSION_DENIED:case"PermissionDeniedError":p="Permission denied",n="Cannot access your webcam. This can have two reasons:<br/>a) you blocked access to webcam; or<br/>b) your webcam is already in use.",y.push(l.WEBCAM_PROBLEM);break;case"HARDWARE_UNAVAILABLE":p="Webcam is unavailable",n="Maybe it is already busy in another window?",(b.isChromeBased()||b.isFirefox())&&(n+=" Or you have to allow access above?"),y.push(l.WEBCAM_PROBLEM);break;case l.NOT_CONNECTED:p="Unable to connect",n="Either the videomail server or your connection is down. Trying to reconnect every few seconds …";break;case"NO_VIDEO_FEED":p="No video feed found!",n="Your webcam is already used in another browser.",y.push(l.WEBCAM_PROBLEM);break;case l.STARTING_FAILED:p="Starting video failed",n="Most likely this happens when the webam is already active in another browser.",y.push(l.WEBCAM_PROBLEM);break;case"DevicesNotFoundError":p="No available webcam could be found",n="Looks like you do not have any webcam attached to your machine; or the one you plugged in is already used.",y.push(l.WEBCAM_PROBLEM);break;case l.NOT_READABLE_ERROR:case l.TRACK_START_ERROR:p="No access to webcam",n="A hardware error occurred which prevented access to your webcam.",y.push(l.WEBCAM_PROBLEM);break;case l.INVALID_STATE_ERROR:p="Invalid state",n="Video recording stream from your webcam already has finished.",y.push(l.WEBCAM_PROBLEM);break;case l.DOM_EXCEPTION:switch(t.code){case 8:p="Requested webcam not found",n="A webcam is needed but could not be found.",y.push(l.WEBCAM_PROBLEM);break;case 9:var g="https:".concat(window.location.href.substring(window.location.protocol.length));p="Security upgrade needed",n='Click <a href="'.concat(g,'">here</a> to switch to HTTPs which is more safe ')+" and enables encrypted videomail transfers.",y.push(l.BROWSER_PROBLEM);break;case 11:p="Invalid State",n="The object is in an invalid, unusable state.",y.push(l.BROWSER_PROBLEM);break;default:p="DOM Exception",n=f(t),y.push(l.BROWSER_PROBLEM)}break;case l.MEDIA_DEVICE_NOT_SUPPORTED:p="Media device not supported",n=f(t);break;default:var v=n;if(n&&"object"===(0,i.default)(n)&&(n=f(n)),!n&&v&&(n=v.message?v.message:"Inspected: ".concat((0,u.default)(v))),t)if("string"==typeof t)p=t;else if(t.message&&(p=f(t.message)),t.explanation&&(n?n+=";<br/>".concat(f(t.explanation)):n=f(t.explanation)),t.details){var w=f(t.details);n?n+=";<br/>".concat(w):n=w}p||(h&&(p=h),!n&&t&&(n=f(t)),f(p)===n&&(n=void 0))}var E=null;r.logger&&r.logger.getLines&&(E=r.logger.getLines()),m&&((p=new Error(p)).stack=m);var _="none";t&&(_="code=".concat(t.code?t.code:"undefined"),_+=", type=".concat(t.type?t.type:"undefined"),_+=", name=".concat(t.name?t.name:"undefined"),_+=", message=".concat(t.message?t.message:"undefined"));var R,S=new l(p,{explanation:n,logLines:E,client:b.getUsefulData(),url:window.location.href,siteName:r.siteName,code:_,stack:m}),A=!1;function O(e){return y.indexOf(e)>=0}return r.reportErrors&&(A="function"==typeof r.reportErrors?r.reportErrors(S):r.reportErrors),A&&(R=new o.default(r)),R&&R.reportError(S,(function(e){e&&console.error("Unable to report error",e)})),S.getClassList=function(){return y},S.removeDimensions=function(){return O(l.IOS_PROBLEM)||b.isMobile()},S.hideButtons=function(){return O(l.BROWSER_PROBLEM)||a.browserProblem||O(l.IOS_PROBLEM)},S.hideForm=function(){return O(l.IOS_PROBLEM)},S};n.default=l},{"./../resource":121,"./browser":123,"./pretty":128,"@babel/runtime/helpers/interopRequireDefault":3,"@babel/runtime/helpers/typeof":7,"create-error":24,"safe-json-stringify":99}],131:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("contains")),o=r(e("hidden")),a=r(e("hyperscript")),s=r(e("inherits")),u=r(e("../events")),c=r(e("../util/eventEmitter")),l=function(e,t){c.default.call(this,t,"Buttons");var n,r,s,l,f,d,h,p,m,y,b=this,g=t.debug;function v(e){e&&!Array.isArray(e)&&(e=[e]),e&&e.forEach((function(e){(0,o.default)(e,!0)}))}function w(e){e&&!Array.isArray(e)&&(e=[e]),e&&e.forEach((function(e){(0,o.default)(e,!1)}))}function E(e){var t=e&&!0;return e&&!Array.isArray(e)&&(e=[e]),e&&e.forEach((function(e){t&&(t=e&&!(0,o.default)(e))})),t}function _(e){e&&!Array.isArray(e)&&(e=[e]),e&&e.forEach((function(e){e&&("INPUT"===e.tagName||"BUTTON"===e.tagName?e.disabled=!0:e.classList.add("disabled"))}))}function R(e){e&&!Array.isArray(e)&&(e=[e]),e&&e.forEach((function(e){e&&("INPUT"===e.tagName||"BUTTON"===e.tagName?e.disabled=!1:e.classList.remove("disabled"))}))}function S(e,t,n,r){return r&&_(e),n?e.type=n:e.type||(e.type="button"),!t&&v(e),e}function A(e,t){e.onclick=function(e){e&&e.preventDefault();try{t({event:e})}catch(e){b.emit(u.default.ERROR,e)}}}function O(e){var t,r;return e.id&&(t=document.getElementById(e.id)),t||(t=(0,a.default)("input#".concat(e.id),{type:"radio",name:e.name,value:e.value,checked:e.checked}),r=(0,a.default)("span.radioGroup",t,(0,a.default)("label",{htmlFor:e.id},e.label)),h&&(0,i.default)(n,h)?n.insertBefore(r,h):n.appendChild(r)),e.changeHandler&&(t.onchange=e.changeHandler),_(t),[t,r]}function k(e,r,o,s,u,c,l){var f,d=!(arguments.length>7&&void 0!==arguments[7])||arguments[7];return(f=u?document.getElementById(u):l?document.querySelector(l):n.querySelector(".".concat(e)))?f=S(f,s,c,d):(t.selectors.buttonClass&&(e+=".".concat(t.selectors.buttonClass)),(f=S(f=(0,a.default)("button.".concat(e)),s,c,d)).innerHTML=r,h&&(0,i.default)(n,h)?n.insertBefore(f,h):n.appendChild(f)),o&&A(f,o),f}function T(e){E(d)||e.paused||w(r),e.paused||(_(f),v(f)),t.enableAutoValidation||R(h),e.recordWhenReady||(E(p)&&R(p),E(m)&&R(m))}function x(){v(r),v(d),s&&(w(s),R(s)),R(f),w(f)}function j(){_(d),e.beginWaiting(),e.recordAgain()}function M(){e.submit()}function C(t){_(r),e.record(t)}function N(){g("Buttons: initEvents()"),b.on(u.default.USER_MEDIA_READY,(function(e){e.switchingFacingMode||function(e){T(e),E(r)&&!e.recordWhenReady&&R(r),t.enableAutoValidation&&_(h)}(e)})).on(u.default.PREVIEW,(function(){v(r),v(f),_(p),_(m),w(d),R(d),t.enableAutoValidation||R(h)})).on(u.default.PAUSED,(function(){b.adjustButtonsForPause()})).on(u.default.RECORDING,(function(e){!function(e){e>1?x():(_(m),_(p),_(d),_(r))}(e)})).on(u.default.FIRST_FRAME_SENT,(function(){x()})).on(u.default.RESUMING,(function(){v(l),v(r),s&&(R(s),w(s))})).on(u.default.STOPPING,(function(){_(f),_(r),v(s),v(l)})).on(u.default.COUNTDOWN,(function(){_(r),_(m),_(p)})).on(u.default.SUBMITTING,(function(){_(h),_(d)})).on(u.default.RESETTING,(function(){_(h),b.reset()})).on(u.default.INVALID,(function(){t.enableAutoValidation&&_(h)})).on(u.default.VALID,(function(){t.enableAutoValidation&&R(h)})).on(u.default.SUBMITTED,(function(){_(f),_(d),_(r),_(h)})).on(u.default.HIDE,(function(){v(r),v(f),v(d),v(l)})).on(u.default.FORM_READY,(function(e){T(e)})).on(u.default.REPLAY_SHOWN,(function(){b.hide()})).on(u.default.GOING_BACK,(function(){v(d),w(r),w(h)})).on(u.default.ENABLING_AUDIO,(function(){_(r),_(p),_(m)})).on(u.default.DISABLING_AUDIO,(function(){_(r),_(p),_(m)})).on(u.default.STARTING_OVER,(function(){w(h)})).on(u.default.CONNECTED,(function(){t.loadUserMediaOnRecord&&E(r)&&R(r)})).on(u.default.ERROR,(function(e){e.hideButtons&&e.hideButtons()&&t.adjustFormOnBrowserError&&b.hide()}))}this.enableSubmit=function(){R(h)},this.adjustButtonsForPause=function(){b.isCountingDown()||(s&&v(s),w(l),R(l),v(r),w(f),R(f))},this.reset=function(){t.debug("Buttons: reset()"),_(s),_(l),_(r),_(f),_(d)},this.isRecordAgainButtonEnabled=function(){return!d.disabled},this.isRecordButtonEnabled=function(){return!r.disabled},this.setSubmitButton=function(e){h=e},this.getSubmitButton=function(){return h},this.build=function(){(n=e.querySelector(".".concat(t.selectors.buttonsClass)))||(n=(0,a.default)("div.".concat(t.selectors.buttonsClass)),e.appendChild(n)),t.disableSubmit||(h?_(h):h=k(t.selectors.submitButtonClass,"Submit",null,!0,t.selectors.submitButtonId,"submit",t.selectors.submitButtonSelector,t.enableAutoValidation),!e.hasForm()&&h&&A(h,M)),r=k(t.selectors.recordButtonClass,t.text.buttons.record,C,!1),t.enablePause&&(s=k(t.selectors.pauseButtonClass,t.text.buttons.pause,e.pause,!1)),t.enablePause&&(l=k(t.selectors.resumeButtonClass,t.text.buttons.resume,e.resume,!1)),f=k(t.selectors.previewButtonClass,t.text.buttons.preview,e.stop,!1),d=k(t.selectors.recordAgainButtonClass,t.text.buttons.recordAgain,j,!1),t.audio&&t.audio.switch&&(m=O({id:"audioOffOption",name:"audio",value:"off",label:t.text.audioOff,checked:!t.isAudioEnabled(),changeHandler:function(){e.disableAudio()}}),p=O({id:"audioOnOption",name:"audio",value:"on",label:t.text.audioOn,checked:t.isAudioEnabled(),changeHandler:function(){e.enableAudio()}})),!y&&N(),y=!0},this.unload=function(){y=!1},this.hide=function(e){v(n),e&&e.deep&&(v(r),v(s),v(l),v(f),v(d),v(h))},this.show=function(){w(n)},this.isCountingDown=function(){return e.isCountingDown()}};(0,s.default)(l,c.default);n.default=l},{"../events":119,"../util/eventEmitter":125,"@babel/runtime/helpers/interopRequireDefault":3,contains:22,hidden:59,hyperscript:61,inherits:64}],132:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("document-visibility")),o=r(e("element-closest")),a=r(e("hidden")),s=r(e("insert-css")),u=r(e("inherits")),c=r(e("../../styles/css/main.min.css.js")),l=r(e("../events")),f=r(e("../resource")),d=r(e("../util/eventEmitter")),h=r(e("../util/videomailError")),p=r(e("./buttons")),m=r(e("./dimension")),y=r(e("./form")),b=r(e("./optionsWrapper")),g=r(e("./visuals"));(0,o.default)(window);var v=function(e){d.default.call(this,e,"Container");var t,n,r,o=this,u=(0,i.default)(),v=new g.default(this,e),w=new p.default(this,e),E=new f.default(e),_=document&&document.querySelector&&document.querySelector("html"),R=e.debug,S=!1,A=!1,O=!1;function k(){return"FORM"===t.tagName?t:e.selectors.formId?document.getElementById(e.selectors.formId):t.closest("form")}function T(){R("Container: initEvents()"),window.addEventListener("beforeunload",(function(e){o.unload(e)})),e.playerOnly||u.onChange((function(t){n&&(t?(e.isAutoPauseEnabled()&&o.isCountingDown()&&o.resume(),o.emit(l.default.VISIBLE)):(e.isAutoPauseEnabled()&&(o.isCountingDown()||o.isRecording())&&o.pause("document invisible"),o.emit(l.default.INVISIBLE)))})),e.enableSpace&&(e.playerOnly||window.addEventListener("keypress",(function(t){var n=t.target.tagName;t.target.isContentEditable||"true"===t.target.contentEditable||!0===t.target.contentEditable||"INPUT"===n||"TEXTAREA"===n||32===(t.keyCode?t.keyCode:t.which)&&(t.preventDefault(),e.enablePause?v.pauseOrResume():v.recordOrStop())}))),o.on(l.default.ERROR,(function(t){!function(t){S=!0,t.stack?e.logger.error(t.stack):e.logger.error(t),e.displayErrors?v.error(t):v.reset()}(t),M(t),t.removeDimensions&&t.removeDimensions()&&j()})),e.playerOnly||o.on(l.default.LOADED_META_DATA,(function(){x()}))}function x(){if(e.video.stretch)j();else{var n=v.getRecorderWidth(!0);if(n<1)throw h.default.create("Recorder width cannot be less than 1!",e);t.style.width="".concat(n,"px")}}function j(){t.style.width="auto"}function M(e){v.unload(e),w.unload(),o.endWaiting()}function C(t,n,r,i){r&&""!==r||(r=document.baseURI),n&&(t[e.selectors.aliasInputName]=n.videomail.alias,e.submitWithVideomail&&(t.videomail=n.videomail)),E.form(t,r,i)}function N(e,t,n,r,i){o.endWaiting(),e?o.emit(l.default.ERROR,e):(A=!0,r&&i&&i.body&&Object.keys(i.body).forEach((function(e){r[e]=i.body[e]})),o.emit(l.default.SUBMITTED,n,r||i),i&&"text/html"===i.type&&i.text&&(document.body.innerHTML=i.text))}function D(e){return e&&"POST"===e.toUpperCase()}this.addPlayerDimensions=function(e,t){try{return e.playerHeight=this.calculateHeight({responsive:!0,videoWidth:e.width,ratio:e.height/e.width},t),e.playerWidth=this.calculateWidth({responsive:!0,videoHeight:e.playerHeight,ratio:e.height/e.width}),e}catch(e){o.emit(l.default.ERROR,e)}},this.limitWidth=function(n){return m.default.limitWidth(t,n,e)},this.limitHeight=function(t){return m.default.limitHeight(t,e)},this.calculateWidth=function(t){return m.default.calculateWidth(b.default.merge(e,t,!0))},this.calculateHeight=function(n,r){return r||(r=t||document.body),m.default.calculateHeight(r,b.default.merge(e,n,!0))},this.areVisualsHidden=function(){return v.isHidden()},this.hasElement=function(){return Boolean(t)},this.build=function(){try{(t=document.getElementById(e.selectors.containerId))&&(e.insertCss&&(0,s.default)(c.default,{prepend:!0}),!n&&T(),function(){if(e.hasDefinedWidth()&&e.video.width%2!=0)throw h.default.create("Width must be divisible by two.",e);if(e.hasDefinedHeight()&&e.video.height%2!=0)throw h.default.create("Height must be divisible by two.",e)}(),x(),e.playerOnly||function(){var t=k();if(t){R("Container: buildForm()");var n=(r=new y.default(o,t,e)).findSubmitButton();n&&w.setSubmitButton(n),r.build()}}(),R("Container: buildChildren()"),t.classList?(t.classList.add("videomail"),e.playerOnly||w.build(),v.build()):o.emit(l.default.ERROR,h.default.create("Sorry, your browser is too old!",e)),S?R("Container: building failed due to an error."):(R("Container: built."),n=!0,o.emit(l.default.BUILT)))}catch(e){if(!v.isNotifierBuilt())throw e;o.emit(l.default.ERROR,e)}},this.getSubmitButton=function(){return w.getSubmitButton()},this.querySelector=function(e){return t.querySelector(e)},this.beginWaiting=function(){_.classList&&_.classList.add("wait")},this.endWaiting=function(){_.classList&&_.classList.remove("wait")},this.appendChild=function(e){t.appendChild(e)},this.insertBefore=function(e,n){t.insertBefore(e,n)},this.unload=function(e){R("Container: unload()",e);try{M(e),this.removeAllListeners(),n=A=!1}catch(e){o.emit(l.default.ERROR,e)}},this.show=function(){if(t&&((0,a.default)(t,!1),v.show(),!S)){var e=o.isPaused();e&&w.adjustButtonsForPause(),w.show(),o.isReplayShown()?o.emit(l.default.PREVIEW):o.emit(l.default.FORM_READY,"paused",e)}},this.hide=function(){R("Container: hide()"),S=!1,this.isRecording()&&this.pause(),v.hide(),A&&(w.hide(),(0,a.default)(t,!0))},this.startOver=function(e){try{o.emit(l.default.STARTING_OVER),A=!1,r.show(),v.back(e,(function(){e&&e.keepHidden?o.enableForm():o.show(e)}))}catch(e){o.emit(l.default.ERROR,e)}},this.showReplayOnly=function(){S=!1,this.isRecording()&&this.pause(),v.showReplayOnly(),A&&w.hide()},this.isNotifying=function(){return v.isNotifying()},this.isPaused=function(){return v.isPaused()},this.pause=function(e){v.pause(e)},this.validate=function(t){var n,i=!0;if(e.enableAutoValidation?t?i=t:o.isNotifying()?i=!1:v.isConnected()?i=v.isUserMediaLoaded()||v.isReplayShown():v.isConnecting()&&(i=!1):(i=!1,O=!0),i){this.emit(l.default.VALIDATING);var a,s=v.validate()&&w.isRecordAgainButtonEnabled();if(r){if(n=r.validate())this.areVisualsHidden()||s||((A||this.isReady()||this.isRecording()||this.isPaused()||this.isCountingDown())&&(n=!1),n||(a="Video is not recorded"));else{var u=r.getInvalidElement();a=u?"Form input named ".concat(u.name,' is invalid. It has the value: "').concat(u.value,'"'):"Form input(s) are invalid"}if(n){var c,f,d,h=r.getRecipients(),p="to"in h,m="cc"in h,y="bcc"in h,b=(null===(c=h.to)||void 0===c?void 0:c.length)>0,g=(null===(f=h.cc)||void 0===f?void 0:f.length)>0,E=(null===(d=h.bcc)||void 0===d?void 0:d.length)>0;p?b||(m&&y?g||E||(n=!1):m?g||(n=!1):y?E||(n=!1):a="Please configure the form to have at least one recipient."):m&&(g||y&&(E||(n=!1))),n||(a="Please enter at least one recipient.")}}else n=s;n?this.emit(l.default.VALID):this.emit(l.default.INVALID,a),O=n}return n},this.disableForm=function(e){r&&r.disable(e)},this.enableForm=function(e){r&&r.enable(e)},this.hasForm=function(){return Boolean(r)},this.isReady=function(){return w.isRecordButtonEnabled()},this.submitAll=function(t,n,i){var a=D(n);function s(){o.beginWaiting(),o.disableForm(!0),o.emit(l.default.SUBMITTING)}Boolean(t[e.selectors.keyInputName])?(s(),function(e,t,n){var i=r.transformFormData(e);D(t)||!t?(i.recordingStats=v.getRecordingStats(),i.width=v.getRecorderWidth(!0),i.height=v.getRecorderHeight(!0),navigator.connection&&(i.connection={downlink:"".concat(navigator.connection.downlink," Mbit/s"),effectiveType:navigator.connection.effectiveType,rtt:navigator.connection.rtt,type:navigator.connection.type}),E.post(i,n)):function(e){return e&&"PUT"===e.toUpperCase()}(t)&&E.put(i,n)}(t,n,(function(e,n,r){e?N(e,0,n,r):a?C(t,r,i,(function(e,t){N(e,0,n,r,t)})):N(null,0,n,r)}))):e.enableAutoSubmission&&(s(),C(t,null,i,(function(e,t){N(e,0,null,null,t)})))},this.isBuilt=function(){return n},this.isReplayShown=function(){return v.isReplayShown()},this.isDirty=function(){var e=!1;return r&&(v.isRecorderUnloaded()?e=!1:(this.isReplayShown()||this.isPaused())&&(e=!0)),e},this.getReplay=function(){return v.getReplay()},this.isOutsideElementOf=function(e){return e.parentNode!==t&&e!==t},this.hideForm=function(e){r&&r.hide(),w&&w.hide(e)},this.loadForm=function(e){r&&(r.loadVideomail(e),this.validate())},this.enableAudio=function(){e.setAudioEnabled(!0),this.emit(l.default.ENABLING_AUDIO)},this.disableAudio=function(){e.setAudioEnabled(!1),this.emit(l.default.DISABLING_AUDIO)},this.submit=function(){O&&r&&r.doTheSubmit()},this.isCountingDown=v.isCountingDown.bind(v),this.isRecording=v.isRecording.bind(v),this.record=v.record.bind(v),this.resume=v.resume.bind(v),this.stop=v.stop.bind(v),this.recordAgain=v.recordAgain.bind(v)};(0,u.default)(v,d.default);n.default=v},{"../../styles/css/main.min.css.js":147,"../events":119,"../resource":121,"../util/eventEmitter":125,"../util/videomailError":130,"./buttons":131,"./dimension":133,"./form":134,"./optionsWrapper":135,"./visuals":136,"@babel/runtime/helpers/interopRequireDefault":3,"document-visibility":29,"element-closest":32,hidden:59,inherits:64,"insert-css":65}],133:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("number-is-integer")),o=r(e("./../util/videomailError"));function a(e,t){if(t.hasDefinedHeight()&&(e=e?Math.min(t.video.height,e):t.video.height),(0,i.default)(e)&&e<1)throw o.default.create("Got a video height less than 1 (".concat(e,") while figuring out the minimum!"),t);return e}n.default={limitWidth:function(e,t,n){var r,a=function(e){var t=0,n=e.getBoundingClientRect();return n&&(t=n.right-n.left),t<1&&(t=(n=document.body.getBoundingClientRect()).right-n.left),t}(e);if(r=t?a>0&&a<t?a:t:a,(0,i.default)(r)&&r<1)throw o.default.create("Limited width cannot be less than 1!",n);return r},limitHeight:function(e,t){if((0,i.default)(e)&&e<1)throw o.default.create("Passed limit-height argument cannot be less than 1!",t);var n=Math.min(e,document.documentElement.clientHeight);if(n<1)throw o.default.create("Limited height cannot be less than 1!",t);return n},calculateWidth:function(e){var t=e.videoHeight||null,n=e.ratio||e.getRatio();if(t=a(t,e),e.responsive&&(t=this.limitHeight(t,e)),(0,i.default)(t)&&t<1)throw o.default.create("Height cannot be smaller than 1 when calculating width.",e);var r=parseInt(t/n);if(r<1)throw o.default.create("Calculated width cannot be smaller than 1!",e);return r},calculateHeight:function(e,t){var n,r=t.videoWidth||null,s=t.ratio||t.getRatio();if(t.hasDefinedWidth()&&(r=t.video.width),(0,i.default)(r)&&r<1)throw o.default.create("Unable to calculate height when width is less than 1.",t);if(t.responsive&&(r=this.limitWidth(e,r,t)),r&&(n=parseInt(r*s)),(0,i.default)(n)&&n<1)throw o.default.create("Just calculated a height less than 1 which is wrong.",t);return a(n,t)}}},{"./../util/videomailError":130,"@babel/runtime/helpers/interopRequireDefault":3,"number-is-integer":72}],134:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("get-form-data")),o=r(e("hidden")),a=r(e("hyperscript")),s=r(e("inherits")),u=r(e("../events")),c=r(e("../util/eventEmitter")),l=r(e("../util/videomailError"));function f(e){return e.replace(/(^[,\s]+)|([,\s]+$)/g,"")}var d=function(e,t,n){c.default.call(this,n,"Form");var r,s=this;function d(){return(0,i.default)(t,{includeDisabled:!0})}function h(e,n){for(var r,i=t.elements.length,o=0;o<i;o++)(n||!n&&("BUTTON"!==(r=t.elements[o]).tagName&&"submit"!==r.type))&&(t.elements[o].disabled=e)}function p(){return t.querySelectorAll("input, textarea")}function m(){return t.querySelectorAll("select")}this.transformFormData=function(e){var t={subject:n.selectors.subjectInputName,from:n.selectors.fromInputName,to:n.selectors.toInputName,cc:n.selectors.ccInputName,bcc:n.selectors.bccInputName,body:n.selectors.bodyInputName,key:n.selectors.keyInputName,parentKey:n.selectors.parentKeyInputName,sendCopy:n.selectors.sendCopyInputName},r={};return Object.keys(t).forEach((function(n){var i=t[n];i in e&&(r[n]=e[i])})),r.from&&(r.from=f(r.from)),r.to&&(r.to=f(r.to)),r.cc&&(r.cc=f(r.cc)),r.bcc&&(r.bcc=f(r.bcc)),r},this.getRecipients=function(){var e=this.transformFormData(d()),t={};return"to"in e&&(t.to=e.to),"cc"in e&&(t.cc=e.cc),"bcc"in e&&(t.bcc=e.bcc),t},this.loadVideomail=function(e){for(var r,i,o=t.elements.length,a=0;a<o;a++)e[i=(r=t.elements[a]).name]&&(r.value=e[i]),i!==n.selectors.subjectInputName&&i!==n.selectors.bodyInputName||(r.disabled=!0);t.setAttribute("method","put")},this.disable=function(e){h(!0,e)},this.enable=function(e){h(!1,e)},this.build=function(){if(n.enableAutoValidation){for(var i,c=p(),f=0,d=c.length;f<d;f++)"radio"===(i=c[f]).type?i.addEventListener("change",(function(){e.validate()})):i.addEventListener("input",(function(){setTimeout((function(){e.validate()}),0)}));for(var h=m(),y=0,b=h.length;y<b;y++)h[y].addEventListener("change",(function(){e.validate()}))}(r=t.querySelector('input[name="'.concat(n.selectors.keyInputName,'"]')))||(r=(0,a.default)("input",{name:n.selectors.keyInputName,type:"hidden"}),t.appendChild(r)),this.on(u.default.PREVIEW,(function(e){e||r.value?e&&(r.value=e):s.emit(u.default.ERROR,l.default.create("Videomail key for preview is missing!",n))})),this.on(u.default.GOING_BACK,(function(){r.value=null})),this.on(u.default.ERROR,(function(e){var r;e.hideForm&&e.hideForm()&&n.adjustFormOnBrowserError?function(){for(var e=t.elements.length,n=0;n<e;n++)(0,o.default)(t.elements[n],!0);(0,o.default)(t,!0)}():e.hideButtons&&e.hideButtons()&&n.adjustFormOnBrowserError&&(r=s.findSubmitButton(),(0,o.default)(r,!0))})),this.on(u.default.BUILT,(function(){e.getSubmitButton().addEventListener("click",s.doTheSubmit.bind(s))}))},this.doTheSubmit=function(n){return n&&n.preventDefault(),e.hasElement()&&e.submitAll(d(),t.getAttribute("method"),t.getAttribute("action")),!1},this.getInvalidElement=function(){for(var e=p(),t=0,n=e.length;t<n;t++)if(!e[t].validity.valid)return e[t];for(var r=m(),i=0,o=r.length;i<o;i++)if(!r[i].validity.valid)return r[i];return null},this.validate=function(){return t.checkValidity()},this.findSubmitButton=function(){return t.querySelector("[type='submit']")},this.hide=function(){t&&(0,o.default)(t,!0)},this.show=function(){t&&(0,o.default)(t,!1)}};(0,s.default)(d,c.default);n.default=d},{"../events":119,"../util/eventEmitter":125,"../util/videomailError":130,"@babel/runtime/helpers/interopRequireDefault":3,"get-form-data":48,hidden:59,hyperscript:61,inherits:64}],135:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("deepmerge"));n.default={addFunctions:function(e){var t=e.audio&&e.audio.enabled;e.hasDefinedHeight=function(){return this.video.height&&"auto"!==this.video.height},e.hasDefinedWidth=function(){return this.video.width&&"auto"!==this.video.width},e.hasDefinedDimension=function(){return this.hasDefinedWidth()||this.hasDefinedHeight()},e.hasDefinedDimensions=function(){return this.hasDefinedWidth()&&this.hasDefinedHeight()},e.getRatio=function(){var e=1,t=this.videoHeight&&this.videoWidth;return this.hasDefinedDimensions()?e=t&&(this.videoHeight<this.video.height||this.videoWidth<this.video.width)?this.videoHeight/this.videoWidth:this.video.height/this.video.width:t&&(e=this.videoHeight/this.videoWidth),e},e.isAudioEnabled=function(){return t},e.setAudioEnabled=function(e){t=e},e.isAutoPauseEnabled=function(){return this.enableAutoPause&&this.enablePause}},merge:function(e,t){var n=(0,i.default)(e,t,{arrayMerge:function(e,t){return t}});return this.addFunctions(n),n}}},{"@babel/runtime/helpers/interopRequireDefault":3,deepmerge:25}],136:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("hidden")),o=r(e("hyperscript")),a=r(e("inherits")),s=r(e("../events")),u=r(e("../util/eventEmitter")),c=r(e("./visuals/inside/recorderInsides")),l=r(e("./visuals/notifier")),f=r(e("./visuals/recorder")),d=r(e("./visuals/replay")),h=function(e,t){u.default.call(this,t,"Visuals");var n,r,a=this,h=new d.default(this,t),p=new f.default(this,h,t),m=new c.default(this,t),y=new l.default(this,t),b=t.debug;function g(){var r;b("Visuals: buildChildren()"),(r=e.querySelector("noscript"))||((r=(0,o.default)("noscript")).innerHTML="Please enable Javascript",n.appendChild(r)),t.playerOnly||(y.build(),m.build()),h.build(),b("Visuals: built.")}function v(){t.video.stretch?w():(n.style.width="".concat(a.getRecorderWidth(!0),"px"),n.style.height="".concat(a.getRecorderHeight(!0),"px"))}function w(){n.style.width="auto",n.style.height="auto"}function E(){return!a.isNotifying()&&!h.isShown()&&!a.isCountingDown()}this.getRatio=function(){return n.clientWidth?n.clientHeight/n.clientWidth:0},this.isCountingDown=function(){return m.isCountingDown()},this.build=function(){if(!(n=e.querySelector(".".concat(t.selectors.visualsClass)))){n=(0,o.default)("div.".concat(t.selectors.visualsClass));var i=e.querySelector(".".concat(t.selectors.buttonsClass));i&&!e.isOutsideElementOf(i)?e.insertBefore(n,i):e.appendChild(n)}n.classList.add("visuals"),v(),!r&&(t.playerOnly||(b("Visuals: initEvents()"),a.on(s.default.USER_MEDIA_READY,(function(){r=!0,a.endWaiting(),e.enableForm(!1)})).on(s.default.PREVIEW,(function(){a.endWaiting()})).on(s.default.BLOCKING,(function(n){(n.hideForm||t.adjustFormOnBrowserError)&&e.disableForm(!0)})).on(s.default.PREVIEW_SHOWN,(function(){e.validate(!0)})).on(s.default.LOADED_META_DATA,(function(){v()})).on(s.default.ERROR,(function(e){e.removeDimensions&&e.removeDimensions()&&w()})))),g(),a.parentNode=n.parentNode,r=!0},this.querySelector=function(e){return n&&n.querySelector(e)},this.appendChild=function(e){n&&n.appendChild(e)},this.removeChild=function(e){n.removeChild(e)},this.reset=function(){this.endWaiting(),p.reset()},this.beginWaiting=function(){e.beginWaiting()},this.endWaiting=function(){e.endWaiting()},this.stop=function(e){p.stop(e),m.hidePause()},this.back=function(e,t){!t&&e&&(t=e,e={}),h.hide(),y.hide(),e&&e.keepHidden?(p.hide(),t&&t()):p.back(t)},this.recordAgain=function(){this.back((function(){t.loadUserMediaOnRecord?a.once(s.default.SERVER_READY,(function(){a.record()})):a.once(s.default.USER_MEDIA_READY,(function(){a.record()}))}))},this.unload=function(e){try{p.unload(e),m.unload(e),h.unload(e),r=!1}catch(e){this.emit(s.default.ERROR,e)}},this.isNotifying=function(){return y.isVisible()},this.isReplayShown=function(){return h.isShown()},this.pause=function(e){p.pause(e),m.showPause()},this.resume=function(){m.isCountingDown()?m.resumeCountdown():p.resume(),m.hidePause()},this.pauseOrResume=function(){E.call(this)&&(this.isRecording()?this.pause():p.isPaused()?this.resume():p.isReady()&&this.record())},this.recordOrStop=function(){E()&&(this.isRecording()?this.stop():p.isReady()&&this.record())},this.record=function(){t.video.countdown?(this.emit(s.default.COUNTDOWN),m.startCountdown(p.record.bind(p))):p.record()},this.getRecorder=function(){return p},this.getReplay=function(){return h},this.validate=function(){return p.validate()&&this.isReplayShown()},this.getRecordingStats=function(){return p.getRecordingStats()},this.getAudioSampleRate=function(){return p.getAudioSampleRate()},this.isPaused=function(){return p.isPaused()},this.error=function(e){y.error(e)},this.hide=function(){n&&((0,i.default)(n,!0),this.emit(s.default.HIDE))},this.isHidden=function(){return!r||(n?(0,i.default)(n):void 0)},this.showVisuals=function(){n&&(0,i.default)(n,!1)},this.show=function(){!this.isReplayShown()&&n&&p.build(),this.showVisuals()},this.showReplayOnly=function(){!this.isReplayShown()&&h.show(),this.show(),p.hide(),y.hide()},this.isRecorderUnloaded=function(){return p.isUnloaded()},this.isConnecting=function(){return p.isConnecting()},this.getRecorderWidth=function(e){return p.getRecorderWidth(e)},this.getRecorderHeight=function(e,t){return p.getRecorderHeight(e,t)},this.limitWidth=function(n){return e.limitWidth(n,t)},this.limitHeight=function(t){return e.limitHeight(t)},this.calculateWidth=function(t){return e.calculateWidth(t)},this.calculateHeight=function(t){return e.calculateHeight(t)},this.getReplay=function(){return h},this.getBoundingClientRect=function(){return n&&n.getBoundingClientRect()},this.checkTimer=function(e){m.checkTimer(e)},this.isNotifierBuilt=function(){return y&&y.isBuilt()},this.isReplayShown=h.isShown.bind(h),this.hideReplay=h.hide.bind(h),this.hideRecorder=p.hide.bind(p),this.isRecording=p.isRecording.bind(p),this.isUserMediaLoaded=p.isUserMediaLoaded.bind(p),this.isConnected=p.isConnected.bind(p)};(0,a.default)(h,u.default);n.default=h},{"../events":119,"../util/eventEmitter":125,"./visuals/inside/recorderInsides":142,"./visuals/notifier":143,"./visuals/recorder":144,"./visuals/replay":145,"@babel/runtime/helpers/interopRequireDefault":3,hidden:59,hyperscript:61,inherits:64}],137:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){var n,r,a,s,u=this;function c(e){s||(t.debug("Countdown",a),--a<1?function(e){u.unload(),u.hide(),setTimeout((function(){e()}),0)}(e):n.innerHTML=a)}this.start=function(e){n.innerHTML=a=t.video.countdown,this.show(),r=setInterval(c.bind(this,e),950)},this.pause=function(){s=!0},this.resume=function(){s=!1},this.build=function(){(n=e.querySelector(".countdown"))?this.hide():(n=(0,i.default)("p.countdown"),this.hide(),e.appendChild(n))},this.show=function(){(0,o.default)(n,!1)},this.isCountingDown=function(){return Boolean(r)},this.unload=function(){clearInterval(r),s=!1,r=null},this.hide=function(){(0,o.default)(n,!0),this.unload()}};var i=r(e("hyperscript")),o=r(e("hidden"))},{"@babel/runtime/helpers/interopRequireDefault":3,hidden:59,hyperscript:61}],138:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){s.default.call(this,t,"Facing Mode");var n,r=this;this.build=function(){(n=e.querySelector(".facingMode"))?this.hide():((n=(0,i.default)("button.facingMode")).innerHTML="⤾",n.onclick=function(e){e&&e.preventDefault();try{r.emit(a.default.SWITCH_FACING_MODE)}catch(e){r.emit(a.default.ERROR,e)}},this.hide(),e.appendChild(n)),r.on(a.default.ERROR,(function(){r.hide()}))},this.hide=function(){(0,o.default)(n,!0)},this.show=function(){(0,o.default)(n,!1)}};var i=r(e("hyperscript")),o=r(e("hidden")),a=r(e("./../../../../events")),s=r(e("./../../../../util/eventEmitter"))},{"./../../../../events":119,"./../../../../util/eventEmitter":125,"@babel/runtime/helpers/interopRequireDefault":3,hidden:59,hyperscript:61}],139:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){if(!t.text.pausedHeader)throw a.default.create("Paused header cannot be empty",t);var n,r,s;function u(){return t.text.pausedHint}this.build=function(){n=e.querySelector(".paused"),(r=e.querySelector(".pausedHeader"))?(this.hide(),r.innerHTML=t.text.pausedHeader,u()&&(s.innerHTML=t.text.pausedHint)):(n=(0,i.default)("div.paused"),r=(0,i.default)("p.pausedHeader"),this.hide(),r.innerHTML=t.text.pausedHeader,n.appendChild(r),u()&&(s=e.querySelector(".pausedHint"),(s=(0,i.default)("p.pausedHint")).innerHTML=t.text.pausedHint,n.appendChild(s)),e.appendChild(n))},this.hide=function(){(0,o.default)(n,!0)},this.show=function(){(0,o.default)(n,!1)}};var i=r(e("hyperscript")),o=r(e("hidden")),a=r(e("./../../../../util/videomailError"))},{"./../../../../util/videomailError":130,"@babel/runtime/helpers/interopRequireDefault":3,hidden:59,hyperscript:61}],140:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var t;this.build=function(){(t=e.querySelector(".recordNote"))?this.hide():(t=(0,i.default)("p.recordNote"),this.hide(),e.appendChild(t))},this.stop=function(){this.hide(),t.classList.remove("near"),t.classList.remove("nigh")},this.setNear=function(){t.classList.add("near")},this.setNigh=function(){t.classList.add("nigh")},this.hide=function(){(0,o.default)(t,!0)},this.show=function(){(0,o.default)(t,!1)}};var i=r(e("hyperscript")),o=r(e("hidden"))},{"@babel/runtime/helpers/interopRequireDefault":3,hidden:59,hyperscript:61}],141:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t,n){var r,a,s,u=!1,c=!1;function l(e,t){return e>=n.video.limitSeconds*t}function f(){var e,i=parseInt(s/60,10),o=s-60*i;if(!u||!c){var a=n.video.limitSeconds-s;!function(e){return!(u||!l(e,.6)||(u=!0,0))}(a)?function(e){return!(c||!l(e,.8)||(c=!0,0))}(a)&&(t.setNigh(),r.classList.add("nigh"),n.debug("End is nigh, ".concat(s," seconds to go"))):(t.setNear(),r.classList.add("near"),n.debug("End is near, ".concat(s," seconds to go")))}r.innerHTML="".concat(i,":").concat((e=o)<10?"0".concat(e):e)}function d(){(0,o.default)(r,!0)}function h(){return n.video.limitSeconds}this.check=function(t){var n=h()-Math.floor(t.intervalSum/1e3);n!==s&&(s=n,f(),s<1&&e.stop(!0))},this.start=function(){s=h(),u=c=!1,a=!0,f(),r.classList.remove("near"),r.classList.remove("nigh"),(0,o.default)(r,!1)},this.pause=function(){t.hide()},this.resume=function(){t.show()},this.stop=function(){null!==s&&a&&(n.debug("Stopping record timer. Was recording for about ~".concat(h()-s," seconds.")),d(),t.stop(),s=null,a=!1)},this.build=function(){(r=e.querySelector(".recordTimer"))?d():(r=(0,i.default)("p.recordTimer"),d(),e.appendChild(r))}};var i=r(e("hyperscript")),o=r(e("hidden"))},{"@babel/runtime/helpers/interopRequireDefault":3,hidden:59,hyperscript:61}],142:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("inherits")),o=r(e("./../../../events")),a=r(e("./../../../util/eventEmitter")),s=r(e("./../../../util/browser")),u=r(e("./recorder/countdown")),c=r(e("./recorder/pausedNote")),l=r(e("./recorder/recordNote")),f=r(e("./recorder/recordTimer")),d=r(e("./recorder/facingMode")),h=function(e,t){a.default.call(this,t,"RecorderInsides");var n,r,i,h,p=this,m=t.debug,y=new l.default(e),b=new f.default(e,y,t),g=new s.default(t);function v(){p.hidePause(),p.hideCountdown(),b.stop(),h&&h.hide()}function w(){m("RecorderInsides: initEvents()"),p.on(o.default.USER_MEDIA_READY,(function(){h&&h.show()})).on(o.default.RECORDING,(function(){b.start()})).on(o.default.RESUMING,(function(){b.resume()})).on(o.default.STOPPING,(function(){b.stop()})).on(o.default.PAUSED,(function(){p.isCountingDown()?n.pause():b.pause()})).on(o.default.RESETTING,v).on(o.default.HIDE,(function(){p.hideCountdown()}))}t.video.countdown&&(n=new u.default(e,t)),t.video.facingModeButton&&g.isMobile()&&(h=new d.default(e,t)),t.enablePause&&(r=new c.default(e,t)),this.build=function(){m("RecorderInsides: build()"),n&&n.build(),r&&r.build(),h&&h.build(),y.build(),b.build(),!i&&w(),i=!0},this.unload=function(){n&&n.unload(),i=!1},this.showPause=function(){r&&r.show()},this.hidePause=function(){r&&r.hide()},this.hideCountdown=function(){n&&n.hide()},this.startCountdown=function(e){n&&n.start(e)},this.resumeCountdown=function(){n&&n.resume()},this.isCountingDown=function(){return n&&n.isCountingDown()},this.checkTimer=function(e){b.check(e)}};(0,i.default)(h,a.default);n.default=h},{"./../../../events":119,"./../../../util/browser":123,"./../../../util/eventEmitter":125,"./recorder/countdown":137,"./recorder/facingMode":138,"./recorder/pausedNote":139,"./recorder/recordNote":140,"./recorder/recordTimer":141,"@babel/runtime/helpers/interopRequireDefault":3,inherits:64}],143:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("hidden")),o=r(e("hyperscript")),a=r(e("inherits")),s=r(e("../../events")),u=r(e("../../util/eventEmitter")),c=function(e,t){u.default.call(this,t,"Notifier");var n,r,a,c,l,f,d=this,h=t&&t.debug;function p(){h("Notifier: initEvents()"),d.on(s.default.CONNECTING,(function(){d.notify("Connecting …")})).on(s.default.LOADING_USER_MEDIA,(function(){d.notify("Loading webcam …")})).on(s.default.USER_MEDIA_READY,(function(){t.video.stretch?(n.style.width="auto",n.style.height="".concat(e.getRecorderHeight(!0,!0),"px")):(n.style.width="".concat(e.getRecorderWidth(!0),"px"),n.style.height="".concat(e.getRecorderHeight(!0),"px")),d.hide()})).on(s.default.LOADED_META_DATA,(function(){})).on(s.default.PREVIEW,(function(){d.hide()})).on(s.default.STOPPING,(function(n){!function(n){var r="";e.beginWaiting(),n&&(h("Limit reached"),r+="".concat(t.text.limitReached,".<br/>")),r+="".concat(t.text.sending," …"),d.notify(r,null,{stillWait:!0,entertain:t.notifier.entertain})}(n)})).on(s.default.PROGRESS,(function(e,n){!function(e,n){var r;t.isAudioEnabled()?(r="Video: ".concat(e),n&&(r+=", Audio: ".concat(n))):r=e,d.setExplanation(r)}(e,n)})).on(s.default.BEGIN_VIDEO_ENCODING,(function(){!function(){e.beginWaiting();var n="".concat(t.text.encoding," …");d.notify(n,null,{stillWait:!0,entertain:t.notifier.entertain}),b()}()})).on(s.default.CONNECTED,(function(){d.notify("Connected."),t.loadUserMediaOnRecord&&d.hide()}))}function m(){if(t.notifier.entertain){if(!l){var e=Math.floor(Math.random()*t.notifier.entertainLimit+1);n.className="notifier entertain ".concat(t.notifier.entertainClass).concat(e),c=setTimeout(m,t.notifier.entertainInterval),l=!0}}else y()}function y(){n&&n.classList.remove("entertain"),clearTimeout(c),c=null,l=!1}function b(){a&&(a.innerHTML=null,(0,i.default)(a,!0))}this.error=function(e){var n=e.message?e.message.toString():e.toString(),r=e.explanation?e.explanation.toString():null;n||t.debug("Weird empty message generated for error",e),d.notify(n,r,{blocking:!0,problem:!0,hideForm:e.hideForm&&e.hideForm(),classList:e.getClassList&&e.getClassList(),removeDimensions:e.removeDimensions&&e.removeDimensions()})},this.setExplanation=function(e){a||(a=(0,o.default)("p"),n?n.appendChild(a):t.logger.warn("Unable to show explanation because notifyElement is empty:",e)),a.innerHTML=e,(0,i.default)(a,!1)},this.build=function(){t.debug("Notifier: build()"),(n=e.querySelector(".notifier"))?this.hide():(n=(0,o.default)(".notifier"),this.hide(),e.appendChild(n)),!f&&p(),f=!0},this.hide=function(){y(),n&&((0,i.default)(n,!0),n.classList.remove("blocking")),r&&(r.innerHTML=null),b()},this.isVisible=function(){return!!f&&(n&&!(0,i.default)(n))},this.isBuilt=function(){return f},this.notify=function(u,c,l){t.debug("Notifier: notify()"),l||(l={});var f=!!l.stillWait&&l.stillWait,d=!!l.entertain&&l.entertain,h=!!l.blocking&&l.blocking,p=!!l.hideForm&&l.hideForm,b=!!l.classList&&l.classList,g=!!l.removeDimensions&&l.removeDimensions;!r&&n&&(r=(0,o.default)("h2"),a?n.insertBefore(r,a):n.appendChild(r)),n&&(d||(n.className="notifier"),b&&b.forEach((function(e){n.classList.add(e)})),g&&(n.style.width="auto",n.style.height="auto")),h?(n&&n.classList.add("blocking"),this.emit(s.default.BLOCKING,{hideForm:p})):this.emit(s.default.NOTIFYING),e.hideReplay(),e.hideRecorder(),function(e,n){var i=!!n.problem&&n.problem;r?r.innerHTML=(i?"&#x2639; ":"")+e:t.logger.warn("Unable to show following because messageElement is empty:",e)}(u,l),c&&c.length>0&&this.setExplanation(c),d?m():y(),e.showVisuals(),n&&(0,i.default)(n,!1),!f&&e.endWaiting()}};(0,a.default)(c,u.default);n.default=c},{"../../events":119,"../../util/eventEmitter":125,"@babel/runtime/helpers/interopRequireDefault":3,hidden:59,hyperscript:61,inherits:64}],144:[function(e,t,n){(function(t){(function(){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("animitter")),o=r(e("canvas-to-buffer")),a=r(e("deepmerge")),s=r(e("hidden")),u=r(e("hyperscript")),c=r(e("safe-json-stringify")),l=r(e("inherits")),f=r(e("websocket-stream")),d=r(e("../../constants")),h=r(e("../../events")),p=r(e("../../util/browser")),m=r(e("../../util/eventEmitter")),y=r(e("../../util/humanize")),b=r(e("../../util/pretty")),g=r(e("../../util/videomailError")),v=r(e("./userMedia")),w="°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸ ",E=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};m.default.call(this,r,"Recorder");var l=new p.default(r),E=(0,a.default)(r,{image:{quality:l.isMobile()?r.image.quality-.05:r.image.quality}});if(!E.video||!E.video.fps)throw g.default.create("FPS must be defined",E);var _,R,S,A,O,k,T,x,j,M,C,N,D,I,L,P,B,U,F,W,q,H,V,z,G,$,Y=this,K=E.debug,J=null,X=0,Q=0,Z=E.video.facingMode,ee={},te=0,ne=0;function re(e,t){if(P)if(P.destroyed)ie(),Y.emit(h.default.ERROR,g.default.create("Already disconnected","Sorry, connection to the server has been destroyed. Please reload.",E));else{var n=t&&t.onFlushedCallback;try{P.write(e,(function(){n&&n(t)}))}catch(e){Y.emit(h.default.ERROR,g.default.create("Failed writing to server","stream.write() failed because of ".concat((0,b.default)(e)),E))}}}function ie(){clearInterval(V)}function oe(e){X++,re(e.toBuffer())}function ae(){R&&(0,s.default)(R,!1)}function se(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{K("Recorder: onUserMediaReady()",(0,c.default)(t));var n=t.switchingFacingMode;N=F=I=D=!1,C=!0,n||(e=(0,i.default)({fps:E.video.fps},Ae),_=e.getRequestAnimationFrameObject(),J=e),ae(),t.recordWhenReady&&Y.record(),Y.emit(h.default.USER_MEDIA_READY,{switchingFacingMode:t.switchingFacingMode,paused:Y.isPaused(),recordWhenReady:t.recordWhenReady})}catch(e){Y.emit(h.default.ERROR,e)}}function ue(){A&&(K("Recorder: clearUserMediaTimeout()"),A&&clearTimeout(A),A=null)}function ce(){return"".concat((te/(Q||1)*100).toFixed(2),"%")}function le(){return"".concat((ne/(X||1)*100).toFixed(2),"%")}function fe(){T||(T=ce()),x||(x=le()),Y.emit(h.default.PROGRESS,T,x)}function de(e){if(!U){B=!0,K("Recorder: initialising web socket to %s",E.socketUrl),Y.emit(h.default.CONNECTING);var t="".concat(E.socketUrl,"?").concat(encodeURIComponent(d.default.SITE_NAME_LABEL),"=").concat(encodeURIComponent(E.siteName));try{P=(0,f.default)(t,{perMessageDeflate:!1,objectMode:!0})}catch(e){var n;B=U=!1,n=void 0===f.default?g.default.create("There is no websocket","Cause: ".concat((0,b.default)(e)),E):g.default.create("Failed to connect to server","Please upgrade your browser. Your current version does not seem to support websockets.",E,{browserProblem:!0}),Y.emit(h.default.ERROR,n)}P&&(P.on("close",(function(e){K("".concat(w,"Stream has closed")),B=U=!1,e?Y.emit(h.default.ERROR,e||"Unhandled websocket error"):(Y.emit(h.default.DISCONNECTED),Ee())})),P.on("connect",(function(){K("".concat(w,"Stream *connect* event emitted")),U||(U=!0,B=I=!1,Y.emit(h.default.CONNECTED),e&&e())})),P.on("data",(function(e){var t;K("".concat(w,"Stream *data* event emitted"));try{t=JSON.parse(e.toString())}catch(t){K("Failed to parse command:",t),Y.emit(h.default.ERROR,g.default.create("Invalid server command","Contact us asap. Bad command was ".concat(e.toString(),". "),E))}finally{be.call(Y,t)}})),P.on("error",(function(e){var t;K("".concat(w,"Stream *error* event emitted"),e),B=U=!1,t=l.isIOS()?g.default.create(e,"iPhones cannot maintain a live connection for too long. Original error message is: ".concat(e.toString()),E):g.default.create("Data exchange interrupted","Please check your network connection and reload.",E),Y.emit(h.default.ERROR,t)})),P.on("drain",(function(){K("".concat(w,"Stream *drain* event emitted (should not happen!)"))})),P.on("preend",(function(){K("".concat(w,"Stream *preend* event emitted"))})),P.on("end",(function(){K("".concat(w,"Stream *end* event emitted"))})),P.on("drain",(function(){K("".concat(w,"Stream *drain* event emitted"))})),P.on("pipe",(function(){K("".concat(w,"Stream *pipe* event emitted"))})),P.on("unpipe",(function(){K("".concat(w,"Stream *unpipe* event emitted"))})),P.on("resume",(function(){K("".concat(w,"Stream *resume* event emitted"))})),P.on("uncork",(function(){K("".concat(w,"Stream *uncork* event emitted"))})),P.on("readable",(function(){K("".concat(w,"Stream *preend* event emitted"))})),P.on("prefinish",(function(){K("".concat(w,"Stream *preend* event emitted"))})),P.on("finish",(function(){K("".concat(w,"Stream *preend* event emitted"))})))}}function he(e,t,n){N=!1,ue(),K("Recorder: userMediaErrorCallback()",", name:",e.name,", message:",e.message,", Webcam characteristics:",S.getCharacteristics(),", extraA arguments:",t?t.toString():void 0,", extraB arguments:",n?n.toString():void 0);var r=Y.listeners(h.default.ERROR);if(r&&r.length)e.name!==g.default.MEDIA_DEVICE_NOT_SUPPORTED?Y.emit(h.default.ERROR,g.default.create(e,E)):K("Recorder: ignore user media error",e),O=setTimeout(de,E.timeouts.userMedia);else{if(!I)throw K("Recorder: no error listeners attached but throwing error",e),g.default.create(e,"Unable to process this error since there are no error listeners anymore.",E);K("Recorder: already unloaded. Not going to throw error",e)}}function pe(e,t){if(K("Recorder: getUserMediaCallback()",(0,c.default)(t)),U&&(ge()||!ve()||F))try{ue(),S.init(e,(function(){se(t)}),oe.bind(Y),(function(e){Y.emit(h.default.ERROR,e)}),t)}catch(e){Y.emit(h.default.ERROR,e)}}function me(e){if(!navigator)throw new Error("Navigator is missing!");if(K("Recorder: loadGenuineUserMedia()"),Y.emit(h.default.ASKING_WEBCAM_PERMISSION),navigator.mediaDevices&&navigator.mediaDevices.getUserMedia){var t={video:{facingMode:Z,frameRate:{ideal:E.video.fps}},audio:E.isAudioEnabled()};l.isOkSafari()||(E.hasDefinedWidth()?t.video.width={ideal:E.video.width}:t.video.width={ideal:Y.limitWidth()},E.hasDefinedHeight()&&(t.video.height={ideal:E.video.height})),K("Recorder: navigator.mediaDevices.getUserMedia()","constraints",(0,c.default)(t)),navigator.mediaDevices.getSupportedConstraints&&K("Recorder: navigator.mediaDevices.getSupportedConstraints()",(0,c.default)(navigator.mediaDevices.getSupportedConstraints()));var n=navigator.mediaDevices.getUserMedia(t);if(!n)throw g.default.create("Sorry, your browser is unable to use cameras.","Try a different browser with better user media functionalities.",E);n.then((function(t){pe(t,e)})).catch(he)}else K("Recorder: navigator.getUserMedia()"),navigator.getUserMedia_({video:!0,audio:E.isAudioEnabled()},pe,he)}function ye(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(C)return K("Recorder: skipping loadUserMedia() because it is already loaded"),se(e),!1;if(N)return K("Recorder: skipping loadUserMedia() because it is already asking for permission"),!1;K("Recorder: loadUserMedia()",(0,c.default)(e)),Y.emit(h.default.LOADING_USER_MEDIA);try{A=setTimeout((function(){Y.isReady()||Y.emit(h.default.ERROR,l.getNoAccessIssue())}),E.timeouts.userMedia),N=!0,me(e)}catch(e){if(K("Recorder: failed to load genuine user media"),N=!1,!Y.listeners(h.default.ERROR).length)throw K("Recorder: no error listeners attached but throwing exception",e),e;Y.emit(h.default.ERROR,e)}}function be(e){try{switch(K("Server commanded: %s",e.command,e.args?", ".concat((0,c.default)(e.args)):""),e.command){case"ready":this.emit(h.default.SERVER_READY),A||(E.loadUserMediaOnRecord?ae():ye());break;case"preview":!function(e){te=ne=X=Q=0,x=T=null,q=e.key,e.mp4&&n.setMp4Source("".concat(e.mp4+d.default.SITE_NAME_LABEL,"/").concat(E.siteName,"/videomail.mp4"),!0),e.webm&&n.setWebMSource("".concat(e.webm+d.default.SITE_NAME_LABEL,"/").concat(E.siteName,"/videomail.webm"),!0),Y.hide();var t=Y.getRecorderWidth(!0),r=Y.getRecorderHeight(!0);Y.emit(h.default.PREVIEW,q,t,r),H=Date.now()-L,ee.waitingTime=H,E.debug&&K("While recording, %s have been transferred and waiting time was %s",y.default.filesize(k,2),y.default.toTime(H))}(e.args);break;case"error":this.emit(h.default.ERROR,g.default.create("Oh no, server error!",e.args.err.toString()||"(No explanation given)",E));break;case"confirmFrame":t=e.args,te=t.frame?t.frame:te,T=ce(),fe();break;case"confirmSample":!function(e){ne=e.sample?e.sample:ne,x=le(),fe()}(e.args);break;case"beginAudioEncoding":this.emit(h.default.BEGIN_AUDIO_ENCODING);break;case"beginVideoEncoding":this.emit(h.default.BEGIN_VIDEO_ENCODING);break;default:this.emit(h.default.ERROR,"Unknown server command: ".concat(e.command))}}catch(e){Y.emit(h.default.ERROR,e)}var t}function ge(){return e.isNotifying()}function ve(){return!R||(0,s.default)(R)}function we(e,n,r){if(!r&&n&&n.constructor===Function&&(r=n,n=null),U){if(P){K("$ %s",e,n?(0,c.default)(n):"");var i={command:e,args:n};re(t.from((0,c.default)(i))),r&&setTimeout((function(){r()}),0)}}else K("Reconnecting for the command",e,"…"),de((function(){we(e,n),r&&r()}))}function Ee(){J&&J.dispose()}function _e(){return J.getElapsedTime()}function Re(){K("Recorder: reInitialiseAudio()"),ue(),S&&S.stop(),C=q=j=M=null,ye()}function Se(e){1===(e&&e.frameNumber)&&Y.emit(h.default.FIRST_FRAME_SENT)}function Ae(n,r){try{if(!Y.isPaused()&&P&&M){if(0===Q&&Y.emit(h.default.SENDING_FIRST_FRAME),Q++,M.drawImage(S.getRawVisuals(),0,0,j.width,j.height),$=z.toBuffer(),(G=$.length)<1)throw g.default.create("Failed to extract webcam data.",E);k+=G;var i=t.from((0,c.default)({frameNumber:Q}));re(t.concat([$,i]),{frameNumber:Q,onFlushedCallback:Se}),e.checkTimer({intervalSum:r})}}catch(e){Y.emit(h.default.ERROR,e)}}function Oe(e){if(J){var t=Y.isRecording();J.stop(),J.setRequestAnimationFrameObject(e),t&&J.start()}}function ke(){E.hasDefinedWidth()&&(R.width=Y.getRecorderWidth(!0)),E.hasDefinedHeight()&&(R.height=Y.getRecorderHeight(!0))}function Te(){K("Recorder: initEvents()"),Y.on(h.default.SUBMITTING,(function(){D=!0})).on(h.default.SUBMITTED,(function(){D=!1,Y.unload()})).on(h.default.BLOCKING,(function(){F=!0,ue()})).on(h.default.HIDE,(function(){Y.hide()})).on(h.default.LOADED_META_DATA,(function(){ke()})).on(h.default.DISABLING_AUDIO,(function(){Re()})).on(h.default.ENABLING_AUDIO,(function(){Re()})).on(h.default.INVISIBLE,(function(){!function(){K("Recorder: loopWithTimeouts()");var e,t=1e3/E.video.fps,n=0;Oe({requestAnimationFrame:function(r){return setTimeout((function(){e=Date.now(),r(),n=Date.now()-e}),t-n)},cancelAnimationFrame:function(e){clearTimeout(e)}})}()})).on(h.default.VISIBLE,(function(){K("Recorder: restoreAnimationFrameObject()"),Oe(_)})).on(h.default.SWITCH_FACING_MODE,(function(){!function(){if(!l.isMobile())return!1;"user"===Z?Z="environment":"environment"===Z?Z="user":K("Recorder: unsupported facing mode",Z),me({switchingFacingMode:!0})}()}))}function xe(){var t;if(S){var n=S.getVideoWidth();t=n<1?e.getRatio():S.getVideoHeight()/n}else t=E.getRatio();return t}this.getRecordingStats=function(){return ee},this.getAudioSampleRate=function(){return S.getAudioSampleRate()},this.stop=function(e){K("stop()",e);var t=e.limitReached;this.emit(h.default.STOPPING,t),J.complete();var r=this;setTimeout((function(){L=Date.now(),ee={avgFps:Q/_e()*1e3,wantedFps:E.video.fps,avgInterval:_e()/Q,wantedInterval:1e3/E.video.fps,intervalSum:_e(),framesCount:Q,videoType:n.getVideoType()},E.isAudioEnabled()&&(ee.samplesCount=X,ee.sampleRate=S.getAudioSampleRate()),we("stop",ee,(function(){r.emit(h.default.STOPPED,{recordingStats:ee})})),r.reset()}),60)},this.back=function(e){this.emit(h.default.GOING_BACK),ae(),this.reset(),we("back",e)},this.unload=function(e){var t;I||(e&&(t=e.name||e.statusText||e.toString()),K("Recorder: unload()".concat(t?", cause: ".concat(t):"")),this.reset(),ue(),U&&(K("Recorder: disconnect()"),S&&S.unloadRemainingEventListeners(),D?B=U=!1:P&&(P.end(),P=void 0)),I=!0,W=!1)},this.reset=function(){I||(K("Recorder: reset()"),this.emit(h.default.RESETTING),Ee(),S&&S.stop(),n.reset(),C=q=j=M=$=G=null)},this.validate=function(){return U&&Q>0&&null===j},this.isReady=function(){return S.isReady()},this.pause=function(e){var n=e&&e.event;n instanceof window.Event&&(e.eventType=n.type),K("pause() at frame ".concat(Q),e),S.pause(),J.stop(),this.emit(h.default.PAUSED),V=window.setInterval((function(){K("Recorder: pinging..."),re(t.from(""))}),E.timeouts.pingInterval)},this.isPaused=function(){return S&&S.isPaused()},this.resume=function(){K("Recorder: resume() with frame ".concat(Q)),ie(),this.emit(h.default.RESUMING),S.resume(),J.start()},this.record=function(){if(I)return!1;if(!U)return K("Recorder: reconnecting before recording ..."),de((function(){Y.once(h.default.USER_MEDIA_READY,Y.record)})),!1;if(!C)return E.loadUserMediaOnRecord?ye({recordWhenReady:!0}):Y.emit(h.default.ERROR,g.default.create("Load and enable your camera first",E)),!1;try{j=S.createCanvas()}catch(e){return Y.emit(h.default.ERROR,g.default.create(e,E)),!1}return M=j.getContext("2d"),j.width?j.height?(k=0,z=new o.default(j,E.image.types,E.image.quality),K("Recorder: record()"),S.record(),Y.emit(h.default.RECORDING,Q),J.on("update",(function(e,t){var n=Q/t*1e3;K("Recorder: avgFps =",Math.round(n))})),void J.start()):(Y.emit(h.default.ERROR,g.default.create("Canvas has an invalid height.",E)),!1):(Y.emit(h.default.ERROR,g.default.create("Canvas has an invalid width.",E)),!1)},this.build=function(){var t=l.checkRecordingCapabilities();t||(t=l.checkBufferTypes()),t?this.emit(h.default.ERROR,t):((R=e.querySelector("video.".concat(E.selectors.userMediaClass)))||(R=(0,u.default)("video.".concat(E.selectors.userMediaClass)),e.appendChild(R)),ke(),R.muted=!0,R.setAttribute("playsinline",!0),R.setAttribute("webkit-playsinline","webkit-playsinline"),R.style.transform="rotateY(180deg)",R.style["-webkit-transform"]="rotateY(180deg)",R.style["-moz-transform"]="rotateY(180deg)",E.video.stretch&&(R.style.width="100%"),S||(S=new v.default(this,E)),ae(),W?E.loadUserMediaOnRecord&&ye():(Te(),U?E.loadUserMediaOnRecord||ye():de()),W=!0)},this.isPaused=function(){return S&&S.isPaused()&&!J.isRunning()},this.isRecording=function(){return J&&J.isRunning()&&!this.isPaused()&&!ge()&&P&&!P.destroyed},this.hide=function(){ve()||(R&&(0,s.default)(R,!0),ue(),K("Recorder: clearRetryTimeout()"),O&&clearTimeout(O),O=null)},this.isUnloaded=function(){return I},this.getRecorderWidth=function(e){return S&&S.hasVideoWidth()?S.getRawWidth(e):e&&E.hasDefinedWidth()?this.limitWidth(E.video.width):void 0},this.getRecorderHeight=function(e,t){return S&&t?R.getBoundingClientRect().height:S?S.getRawHeight(e):e&&E.hasDefinedHeight()?this.calculateHeight(e):void 0},this.calculateWidth=function(t){var n;return S?n=S.getVideoHeight():R&&(n=R.videoHeight||R.height),e.calculateWidth({responsive:t,ratio:xe(),videoHeight:n})},this.calculateHeight=function(t){var n;return S?n=S.getVideoWidth():R&&(n=R.videoWidth||R.width),e.calculateHeight({responsive:t,ratio:xe(),videoWidth:n})},this.getRawVisualUserMedia=function(){return R},this.isConnected=function(){return U},this.isConnecting=function(){return B},this.limitWidth=function(t){return e.limitWidth(t)},this.limitHeight=function(t){return e.limitHeight(t)},this.isUserMediaLoaded=function(){return C}};(0,l.default)(E,m.default);n.default=E}).call(this)}).call(this,e("buffer").Buffer)},{"../../constants":118,"../../events":119,"../../util/browser":123,"../../util/eventEmitter":125,"../../util/humanize":126,"../../util/pretty":128,"../../util/videomailError":130,"./userMedia":146,"@babel/runtime/helpers/interopRequireDefault":3,animitter:10,buffer:15,"canvas-to-buffer":18,deepmerge:25,hidden:59,hyperscript:61,inherits:64,"safe-json-stringify":99,"websocket-stream":113}],145:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("add-eventlistener-with-options")),o=r(e("hidden")),a=r(e("hyperscript")),s=r(e("iphone-inline-video")),u=r(e("inherits")),c=r(e("../../events")),l=r(e("../../util/browser")),f=r(e("../../util/eventEmitter")),d=r(e("../../util/videomailError")),h=function(e,t){f.default.call(this,t,"Replay");var n,r,u,h=this,p=new l.default(t),m=t.debug;function y(){return"HTMLDivElement"===e.constructor.name}function b(e,n,i){var o=h.getVideoSource(e);if(n&&i&&(n+="?".concat(Date.now())),o)n?o.setAttribute("src",n):r.removeChild(o);else if(n){var s=1/t.video.fps*2;o=(0,a.default)("source",{src:"".concat(n,"#t=").concat(s),type:"video/".concat(e)}),r.appendChild(o)}}function g(e){setTimeout((function(){try{r.pause()}catch(e){t.logger.warn(e)}e&&e()}),15)}function v(){if(r&&r.play){var e;try{e=r.play()}catch(e){t.logger.warn("Caught replay exception:",e)}e&&"undefined"!=typeof Promise&&e instanceof Promise&&e.catch((function(e){t.logger.warn("Caught pending replay promise exception: %s",e)}))}}this.setVideomail=function(t){(u=t)&&(u.mp4&&this.setMp4Source(u.mp4),u.webm&&this.setWebMSource(u.webm),u.poster&&r.setAttribute("poster",u.poster),function(t){var n;Object.keys(t).forEach((function(r){(n=e.querySelector(".".concat(r)))&&(n.innerHTML=t[r])}))}(u));var n=u&&u.recordingStats&&u.recordingStats.sampleRate>0;this.show(u&&u.width,u&&u.height,n)},this.show=function(n,i,a){u&&function(t){var n,i;u&&u.playerWidth?i=u.playerWidth:e.calculateWidth&&(i=e.calculateWidth(t)),u&&u.playerHeight?n=u.playerHeight:e.calculateHeight&&(n=e.calculateHeight(t)),r.style.width=i>0?"".concat(i,"px"):"auto",r.style.height=n>0?"".concat(n,"px"):"auto"}({responsive:!0,videoWidth:n||r.videoWidth,videoHeight:i||r.videoHeight}),(0,o.default)(r,!1),e&&(e.style?(0,o.default)(e,!1):e.show&&e.show()),a?r.setAttribute("volume",1):t.isAudioEnabled()||r.setAttribute("muted",!0),s.default&&(0,s.default)(r,{iPad:!0}),r.load(),u?h.emit(c.default.REPLAY_SHOWN):h.emit(c.default.PREVIEW_SHOWN)},this.build=function(){m("Replay: build()"),(r=e.querySelector("video.".concat(t.selectors.replayClass)))||function(){if(m("Replay: buildElement()"),!(r=(0,a.default)("video.".concat(t.selectors.replayClass))).setAttribute)throw d.default.create("Please upgrade browser",t);e.appendChild(r)}(),this.hide(),r.setAttribute("autoplay",!0),r.setAttribute("autostart",!0),r.setAttribute("autobuffer",!0),r.setAttribute("playsinline",!0),r.setAttribute("webkit-playsinline","webkit-playsinline"),r.setAttribute("controls","controls"),r.setAttribute("preload","auto"),n||(y()||this.on(c.default.PREVIEW,(function(e,t,n){h.show(t,n)})),(0,i.default)(r,"touchstart",(function(e){try{e&&e.preventDefault()}catch(e){}this.paused?v():g()})),r.onclick=function(e){e&&e.preventDefault(),this.paused?v():g()}),n=!0,m("Replay: built.")},this.unload=function(){n=!1},this.getVideoSource=function(e){var t,n,i=r.getElementsByTagName("source"),o=i&&i.length,a="video/".concat(e);if(o)for(n=0;n<o&&!t;n++)i[n].getAttribute("type")===a&&(t=i[n]);return t},this.setMp4Source=function(e,t){b("mp4",e,t)},this.setWebMSource=function(e,t){b("webm",e,t)},this.getVideoType=function(){return p.getVideoType(r)},this.reset=function(e){g((function(){r&&(h.setMp4Source(null),h.setWebMSource(null)),e&&e()}))},this.hide=function(){y()?(0,o.default)(e,!0):r&&(0,o.default)(r,!0)},this.isShown=function(){return r&&!(0,o.default)(r)},this.getParentElement=function(){return e}};(0,u.default)(h,f.default);n.default=h},{"../../events":119,"../../util/browser":123,"../../util/eventEmitter":125,"../../util/videomailError":130,"@babel/runtime/helpers/interopRequireDefault":3,"add-eventlistener-with-options":9,hidden:59,hyperscript:61,inherits:64,"iphone-inline-video":67}],146:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){a.default.call(this,t,"UserMedia");var n,r,p=e&&e.getRawVisualUserMedia(),m=new o.default(t),y=this,b=!1,g=!1;function v(e){e?function(e){if(r=e,void 0!==p.srcObject)p.srcObject=e;else{if(void 0===p.src)throw c.default.create("Error attaching stream to element.","Contact the developer about this",t);var n=window.URL||window.webkitURL;p.src=n.createObjectURL(e)||e}}(e):(p.removeAttribute("srcObject"),p.removeAttribute("src"),r=null)}function w(){return p.mozSrcObject?p.mozSrcObject:p.srcObject?p.srcObject:r}function E(){if(p.ended)return p.ended;var e=w();return e&&e.ended}function _(){if(p.videoWidth&&p.videoWidth<3||p.height&&p.height<3)return!0}function R(e,n){t.debug("UserMedia: ...",h,"event",e,(0,d.default)(n))}function S(e){R(e.type,{readyState:p.readyState}),p.removeEventListener&&p.removeEventListener(e.type,S)}this.unloadRemainingEventListeners=function(){t.debug("UserMedia: unloadRemainingEventListeners()"),u.default.forEach((function(e){p.removeEventListener(e,S)}))},this.init=function(e,r,o,a){var l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};this.stop(e,{aboutToInitialize:!0,switchingFacingMode:l.switchingFacingMode});var d=!1,h=!1,b=!1;function g(){y.removeListener(s.default.SENDING_FIRST_FRAME,g),n&&n.record(o)}function w(){t.debug("UserMedia: unloadAllEventListeners()"),y.removeListener(s.default.SENDING_FIRST_FRAME,g),p.removeEventListener&&p.removeEventListener("play",k),p.removeEventListener&&p.removeEventListener("loadedmetadata",T),y.unloadRemainingEventListeners()}function A(){try{if(p.load(),p.paused){var e;t.debug("UserMedia: play()","media.readyState=".concat(p.readyState),"media.paused=".concat(p.paused),"media.ended=".concat(p.ended),"media.played=".concat((0,f.default)(p.played)));try{e=p.play()}catch(e){t.logger.warn("Caught raw usermedia play exception:",e)}(n=e)&&"undefined"!=typeof Promise&&n instanceof Promise&&e.then((function(){b||(t.debug("UserMedia: play promise successful. Playing now."),b=!0)})).catch((function(e){t.logger.warn("Caught pending usermedia promise exception: %s",e.toString())}))}}catch(e){w(),a(e)}var n}function O(){var i=p.readyState;if(t.debug("UserMedia: fireCallbacks("+"readyState=".concat(i,", ")+"onPlayReached=".concat(d,", ")+"onLoadedMetaDataReached=".concat(h,")")),d&&h&&(r(),n&&o))try{n.init(e),y.on(s.default.SENDING_FIRST_FRAME,g)}catch(e){w(),a(e)}}function k(){try{R("play",{readyState:p.readyState,audio:t.isAudioEnabled(),width:p.width,height:p.height,videoWidth:p.videoWidth,videoHeight:p.videoHeight}),p.removeEventListener&&p.removeEventListener("play",k),E()||_()?a(c.default.create("Already busy","Probably another browser window is using your webcam?",t)):(d=!0,O())}catch(e){w(),a(e)}}function T(){R("loadedmetadata",{readyState:p.readyState,paused:p.paused,width:p.width,height:p.height,videoWidth:p.videoWidth,videoHeight:p.videoHeight}),p.removeEventListener&&p.removeEventListener("loadedmetadata",T),E()||_()||(y.emit(s.default.LOADED_META_DATA),m.isAndroid()&&A(),h=!0,O())}t&&t.isAudioEnabled()&&(n||(n=new i.default(this,t)));try{var x=function(e){var t,n=function(e){var t;return e&&e.getVideoTracks&&(t=e.getVideoTracks()),t}(e);return n&&n[0]&&(t=n[0]),t}(e);if(x){if(!x.enabled)throw c.default.create("Webcam is disabled","The video track seems to be disabled. Enable it in your system.",t);var j;x.label&&x.label.length>0&&(j=x.label),j+=" with enabled=".concat(x.enabled),j+=", muted=".concat(x.muted),j+=", remote=".concat(x.remote),j+=", readyState=".concat(x.readyState),j+=", error=".concat(x.error),t.debug("UserMedia: ".concat(x.kind," detected."),j||"")}else t.debug("UserMedia: detected (but no video tracks exist");u.default.forEach((function(e){p.addEventListener(e,S,!1)})),p.addEventListener("loadedmetadata",T),p.addEventListener("play",k),p.addEventListener("error",(function(e){t.logger.warn("Caught video element error event: %s",(0,f.default)(e))})),v(e),A()}catch(e){y.emit(s.default.ERROR,e)}},this.isReady=function(){return Boolean(p.src)},this.stop=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{var r=t.aboutToInitialize,i=t.switchingFacingMode;if(!r){e||(e=w());var o=function(e){var t;return e&&e.getTracks&&(t=e.getTracks()),t}(e),a=!1;o&&o.forEach((function(e){e.stop&&(a=!0,e.stop())})),!a&&e&&e.stop&&e.stop(),v(null),n&&n.stop(),n=null}i||(b=g=!1)}catch(e){y.emit(s.default.ERROR,e)}},this.createCanvas=function(){return(0,l.default)("canvas",{width:this.getRawWidth(!0),height:this.getRawHeight(!0)})},this.getVideoHeight=function(){return p.videoHeight},this.getVideoWidth=function(){return p.videoWidth},this.hasVideoWidth=function(){return this.getVideoWidth()>0},this.getRawWidth=function(n){var r=this.getVideoWidth(),i=t.hasDefinedWidth();return(i||t.hasDefinedHeight())&&(r=!n&&i?t.video.width:e.calculateWidth(n)),n&&(r=e.limitWidth(r)),r},this.getRawHeight=function(n){var r;if(t.hasDefinedDimension()){if((r=e.calculateHeight(n))<1)throw c.default.create("Bad dimensions","Calculated raw height cannot be less than 1!",t)}else if((r=this.getVideoHeight())<1)throw c.default.create("Bad dimensions","Raw video height from DOM element cannot be less than 1!",t);return n&&(r=e.limitHeight(r)),r},this.getRawVisuals=function(){return p},this.pause=function(){b=!0},this.isPaused=function(){return b},this.resume=function(){b=!1},this.record=function(){g=!0},this.isRecording=function(){return g},this.getAudioSampleRate=function(){return n?n.getSampleRate():-1},this.getCharacteristics=function(){return{audioSampleRate:this.getAudioSampleRate(),muted:p&&p.muted,width:p&&p.width,height:p&&p.height,videoWidth:p&&p.videoWidth,videoHeight:p&&p.videoHeight}}};var i=r(e("./../../util/audioRecorder")),o=r(e("./../../util/browser")),a=r(e("./../../util/eventEmitter")),s=r(e("./../../events")),u=r(e("./../../util/mediaEvents")),c=r(e("./../../util/videomailError")),l=r(e("hyperscript")),f=r(e("./../../util/pretty")),d=r(e("safe-json-stringify")),h="|—O—|"},{"./../../events":119,"./../../util/audioRecorder":122,"./../../util/browser":123,"./../../util/eventEmitter":125,"./../../util/mediaEvents":127,"./../../util/pretty":128,"./../../util/videomailError":130,"@babel/runtime/helpers/interopRequireDefault":3,hyperscript:61,"safe-json-stringify":99}],147:[function(e,t,n){"use strict";t.exports='@-webkit-keyframes blink{0%{opacity:.9}35%{opacity:.9}50%{opacity:.1}85%{opacity:.1}to{opacity:.9}}@keyframes blink{0%{opacity:.9}35%{opacity:.9}50%{opacity:.1}85%{opacity:.1}to{opacity:.9}}.IIV::-webkit-media-controls-play-button,.IIV::-webkit-media-controls-start-playback-button{opacity:0;pointer-events:none;width:5px}.videomail .visuals{position:relative}.videomail .visuals video.replay{height:100%;width:100%}.videomail .countdown,.videomail .pausedHeader,.videomail .pausedHint,.videomail .recordNote,.videomail .recordTimer{height:auto;margin:0}.videomail .countdown,.videomail .facingMode,.videomail .paused,.videomail .recordNote,.videomail .recordTimer,.videomail noscript{position:absolute;z-index:100}.videomail .countdown,.videomail .pausedHeader,.videomail .pausedHint,.videomail .recordNote,.videomail .recordTimer,.videomail noscript{font-weight:700}.videomail .countdown,.videomail .paused,.videomail noscript{top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:100%}.videomail .countdown,.videomail .pausedHeader,.videomail .pausedHint{letter-spacing:4px;text-align:center;text-shadow:-2px 0 #fff,0 2px #fff,2px 0 #fff,0 -2px #fff}.videomail .countdown,.videomail .pausedHeader{font-size:460%;opacity:.9}.videomail .pausedHint{font-size:150%}.videomail .facingMode{background:rgba(30,30,30,.5);border:none;bottom:.6em;color:hsla(0,0%,96%,.9);font-family:monospace;font-size:1.2em;outline:none;padding:.1em .3em;right:.7em;-webkit-transition:all .2s ease;transition:all .2s ease;z-index:10}.videomail .facingMode:hover{background:rgba(50,50,50,.7);cursor:pointer}.videomail .recordNote,.videomail .recordTimer{background:hsla(0,0%,4%,.8);color:#00d814;font-family:monospace;opacity:.9;padding:.3em .4em;right:.7em;-webkit-transition:all 1s ease;transition:all 1s ease}.videomail .recordNote.near,.videomail .recordTimer.near{color:#eb9369}.videomail .recordNote.nigh,.videomail .recordTimer.nigh{color:#ea4b2a}.videomail .recordTimer{top:.7em}.videomail .recordNote{top:3.6em}.videomail .recordNote:before{-webkit-animation:blink 1s infinite;animation:blink 1s infinite;content:"REC"}.videomail .notifier{-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;overflow:hidden}.videomail .radioGroup{display:block}.videomail video{margin-bottom:0}.videomail video.userMedia{background-color:rgba(50,50,50,.1)}'},{}],"videomail-client":[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("./util/standardize")),o=r(e("./client"));if(!navigator)throw new Error("Navigator is missing!");(0,i.default)(window,navigator);n.default=o.default},{"./client":117,"./util/standardize":129,"@babel/runtime/helpers/interopRequireDefault":3}]},{},["videomail-client"])("videomail-client")}));
51
51
  //# sourceMappingURL=videomail-client.min.js.map