@signageos/front-applet 6.5.7 → 6.6.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.
package/dist/bundle.js CHANGED
@@ -5,5 +5,5 @@
5
5
  * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
6
6
  * @license MIT
7
7
  */
8
- var r=n(381),i=n(382),o=n(163);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return u(this,e,t,n)}function u(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=d(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),i=(e=s(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|h(t.length);return 0===(e=s(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):d(e,t);if("Buffer"===t.type&&o(t.data))return d(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t){if(f(t),e=s(e,t<0?0:0|h(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|h(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function h(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return B(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return M(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var f=-1;for(o=n;o<s;o++)if(u(e,o)===u(t,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===c)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(n+c>s&&(n=s-c),o=n;o>=0;o--){for(var l=!0,d=0;d<c;d++)if(u(e,o+d)!==u(t,d)){l=!1;break}if(l)return o}return-1}function y(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function w(e,t,n,r){return U(B(t,e.length-n),e,n,r)}function _(e,t,n,r){return U(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function S(e,t,n,r){return _(e,t,n,r)}function k(e,t,n,r){return U(H(t),e,n,r)}function E(e,t,n,r){return U(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function x(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function M(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,c,u=e[i],f=null,l=u>239?4:u>223?3:u>191?2:1;if(i+l<=n)switch(l){case 1:u<128&&(f=u);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&u)<<6|63&o)>127&&(f=c);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(c=(15&u)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(f=c);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(f=c)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),i+=l}return function(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=I));return n}(r)}t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return u(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,r){return f(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return l(null,e)},c.allocUnsafeSlow=function(e){return l(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=c.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},c.byteLength=p,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?M(this,0,e):m.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,r,i){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(r,i),f=e.slice(t,n),l=0;l<s;++l)if(u[l]!==f[l]){o=u[l],a=f[l];break}return o<a?-1:a<o?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return _(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function R(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function P(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=q(e[o]);return i}function O(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function j(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function A(e,t,n,r,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function T(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function F(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(e,t,n,r,o){return o||F(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,o){return o||F(e,0,n,8),i.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var i=t-e;n=new c(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},c.prototype.readUInt8=function(e,t){return t||j(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||j(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||j(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||j(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||j(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||j(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||j(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||j(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||j(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||A(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||A(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=c.isBuffer(e)?e:B(new c(e,r).toString()),s=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var W=/[^+\/0-9A-Za-z-_]/g;function q(e){return e<16?"0"+e.toString(16):e.toString(16)}function B(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(38))},function(e,t,n){var r=n(27),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){var n=e.exports={version:"2.6.9"};"number"==typeof __e&&(__e=n)},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a=n(418).Buffer}catch(e){}function s(e,t,n){for(var r=0,i=Math.min(e.length,n),o=t;o<i;o++){var a=e.charCodeAt(o)-48;r<<=4,r|=a>=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function c(e,t,n,r){for(var i=0,o=Math.min(e.length,n),a=t;a<o;a++){var s=e.charCodeAt(a)-48;i*=r,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===n)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var r,i,o=0;for(n=e.length-6,r=0;n>=t;n-=6)i=s(e,n,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==t&&(i=s(e,t,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,s=Math.min(o,o-a)+n,u=0,f=n;f<s;f+=r)u=c(e,f,f+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var l=1;for(u=c(e,f,e.length,t),f=0;f<a;f++)l*=t;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;n.words[0]=s;for(var u=1;u<r;u++){for(var f=c>>>26,l=67108863&c,d=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=d;h++){var p=u-h|0;f+=(a=(i=0|e.words[p])*(o=0|t.words[h])+l)/67108864|0,l=67108863&a}n.words[u]=0|l,c=0|f}return 0!==c?n.words[u]=0|c:n.length--,n.strip()}o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],c=(16777215&(s<<i|o)).toString(16);n=0!==(o=s>>>24-i&16777215)||a!==this.length-1?u[6-c.length]+c+n:c+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var d=f[e],h=l[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(e);n=(p=p.idivn(h)).isZero()?m+n:u[d-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return r(void 0!==a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===t,u=new e(o),f=this.clone();if(c){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),u[s]=a;for(;s<o;s++)u[s]=0}else{for(s=0;s<o-i;s++)u[s]=0;for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),u[o-s-1]=a}return u},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},o.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a<r.length;a++)o=(t=(0|n.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<n.length;a++)o=(t=(0|n.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var h=function(e,t,n){var r,i,o,a=e.words,s=t.words,c=n.words,u=0,f=0|a[0],l=8191&f,d=f>>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],b=8191&g,v=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,S=0|a[4],k=8191&S,E=S>>>13,x=0|a[5],M=8191&x,I=x>>>13,C=0|a[6],R=8191&C,P=C>>>13,O=0|a[7],j=8191&O,A=O>>>13,T=0|a[8],N=8191&T,F=T>>>13,D=0|a[9],L=8191&D,W=D>>>13,q=0|s[0],B=8191&q,H=q>>>13,U=0|s[1],V=8191&U,G=U>>>13,z=0|s[2],X=8191&z,Y=z>>>13,K=0|s[3],J=8191&K,$=K>>>13,Z=0|s[4],Q=8191&Z,ee=Z>>>13,te=0|s[5],ne=8191&te,re=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,fe=0|s[8],le=8191&fe,de=fe>>>13,he=0|s[9],pe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(l,B))|0)+((8191&(i=(i=Math.imul(l,H))+Math.imul(d,B)|0))<<13)|0;u=((o=Math.imul(d,H))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,B),i=(i=Math.imul(p,H))+Math.imul(m,B)|0,o=Math.imul(m,H);var be=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(i=(i=i+Math.imul(l,G)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,B),i=(i=Math.imul(b,H))+Math.imul(v,B)|0,o=Math.imul(v,H),r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,G)|0;var ve=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(w,B),i=(i=Math.imul(w,H))+Math.imul(_,B)|0,o=Math.imul(_,H),r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,G)|0,r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Y)|0;var ye=(u+(r=r+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,$)|0)+Math.imul(d,J)|0))<<13)|0;u=((o=o+Math.imul(d,$)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(k,B),i=(i=Math.imul(k,H))+Math.imul(E,B)|0,o=Math.imul(E,H),r=r+Math.imul(w,V)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(b,X)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,Y)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,$)|0;var we=(u+(r=r+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(d,Q)|0))<<13)|0;u=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,B),i=(i=Math.imul(M,H))+Math.imul(I,B)|0,o=Math.imul(I,H),r=r+Math.imul(k,V)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,X)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(b,J)|0,i=(i=i+Math.imul(b,$)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,$)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var _e=(u+(r=r+Math.imul(l,ne)|0)|0)+((8191&(i=(i=i+Math.imul(l,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(R,B),i=(i=Math.imul(R,H))+Math.imul(P,B)|0,o=Math.imul(P,H),r=r+Math.imul(M,V)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(k,X)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,$)|0,r=r+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0;var Se=(u+(r=r+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ae)|0)+Math.imul(d,oe)|0))<<13)|0;u=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,B),i=(i=Math.imul(j,H))+Math.imul(A,B)|0,o=Math.imul(A,H),r=r+Math.imul(R,V)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,G)|0,r=r+Math.imul(M,X)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,Y)|0,r=r+Math.imul(k,J)|0,i=(i=i+Math.imul(k,$)|0)+Math.imul(E,J)|0,o=o+Math.imul(E,$)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(v,ne)|0,o=o+Math.imul(v,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var ke=(u+(r=r+Math.imul(l,ce)|0)|0)+((8191&(i=(i=i+Math.imul(l,ue)|0)+Math.imul(d,ce)|0))<<13)|0;u=((o=o+Math.imul(d,ue)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(N,B),i=(i=Math.imul(N,H))+Math.imul(F,B)|0,o=Math.imul(F,H),r=r+Math.imul(j,V)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(R,X)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,Y)|0,r=r+Math.imul(M,J)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,$)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(_,ne)|0,o=o+Math.imul(_,re)|0,r=r+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,r=r+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,ce)|0,o=o+Math.imul(m,ue)|0;var Ee=(u+(r=r+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,de)|0)+Math.imul(d,le)|0))<<13)|0;u=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(L,B),i=(i=Math.imul(L,H))+Math.imul(W,B)|0,o=Math.imul(W,H),r=r+Math.imul(N,V)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(F,V)|0,o=o+Math.imul(F,G)|0,r=r+Math.imul(j,X)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,Y)|0,r=r+Math.imul(R,J)|0,i=(i=i+Math.imul(R,$)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,$)|0,r=r+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,ee)|0,r=r+Math.imul(k,ne)|0,i=(i=i+Math.imul(k,re)|0)+Math.imul(E,ne)|0,o=o+Math.imul(E,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,r=r+Math.imul(b,ce)|0,i=(i=i+Math.imul(b,ue)|0)+Math.imul(v,ce)|0,o=o+Math.imul(v,ue)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,de)|0;var xe=(u+(r=r+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,me)|0)+Math.imul(d,pe)|0))<<13)|0;u=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,V),i=(i=Math.imul(L,G))+Math.imul(W,V)|0,o=Math.imul(W,G),r=r+Math.imul(N,X)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(F,X)|0,o=o+Math.imul(F,Y)|0,r=r+Math.imul(j,J)|0,i=(i=i+Math.imul(j,$)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,$)|0,r=r+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,r=r+Math.imul(M,ne)|0,i=(i=i+Math.imul(M,re)|0)+Math.imul(I,ne)|0,o=o+Math.imul(I,re)|0,r=r+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,ae)|0,r=r+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(_,ce)|0,o=o+Math.imul(_,ue)|0,r=r+Math.imul(b,le)|0,i=(i=i+Math.imul(b,de)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,de)|0;var Me=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,X),i=(i=Math.imul(L,Y))+Math.imul(W,X)|0,o=Math.imul(W,Y),r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,$)|0)+Math.imul(F,J)|0,o=o+Math.imul(F,$)|0,r=r+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(P,ne)|0,o=o+Math.imul(P,re)|0,r=r+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,r=r+Math.imul(k,ce)|0,i=(i=i+Math.imul(k,ue)|0)+Math.imul(E,ce)|0,o=o+Math.imul(E,ue)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,de)|0;var Ie=(u+(r=r+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,me)|0)+Math.imul(v,pe)|0))<<13)|0;u=((o=o+Math.imul(v,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(L,J),i=(i=Math.imul(L,$))+Math.imul(W,J)|0,o=Math.imul(W,$),r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(F,Q)|0,o=o+Math.imul(F,ee)|0,r=r+Math.imul(j,ne)|0,i=(i=i+Math.imul(j,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(R,oe)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,r=r+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(I,ce)|0,o=o+Math.imul(I,ue)|0,r=r+Math.imul(k,le)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(E,le)|0,o=o+Math.imul(E,de)|0;var Ce=(u+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;u=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(L,Q),i=(i=Math.imul(L,ee))+Math.imul(W,Q)|0,o=Math.imul(W,ee),r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(F,ne)|0,o=o+Math.imul(F,re)|0,r=r+Math.imul(j,oe)|0,i=(i=i+Math.imul(j,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,r=r+Math.imul(R,ce)|0,i=(i=i+Math.imul(R,ue)|0)+Math.imul(P,ce)|0,o=o+Math.imul(P,ue)|0,r=r+Math.imul(M,le)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,de)|0;var Re=(u+(r=r+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(E,pe)|0))<<13)|0;u=((o=o+Math.imul(E,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(L,ne),i=(i=Math.imul(L,re))+Math.imul(W,ne)|0,o=Math.imul(W,re),r=r+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(F,oe)|0,o=o+Math.imul(F,ae)|0,r=r+Math.imul(j,ce)|0,i=(i=i+Math.imul(j,ue)|0)+Math.imul(A,ce)|0,o=o+Math.imul(A,ue)|0,r=r+Math.imul(R,le)|0,i=(i=i+Math.imul(R,de)|0)+Math.imul(P,le)|0,o=o+Math.imul(P,de)|0;var Pe=(u+(r=r+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,me)|0)+Math.imul(I,pe)|0))<<13)|0;u=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,oe),i=(i=Math.imul(L,ae))+Math.imul(W,oe)|0,o=Math.imul(W,ae),r=r+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(F,ce)|0,o=o+Math.imul(F,ue)|0,r=r+Math.imul(j,le)|0,i=(i=i+Math.imul(j,de)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,de)|0;var Oe=(u+(r=r+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(P,pe)|0))<<13)|0;u=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(L,ce),i=(i=Math.imul(L,ue))+Math.imul(W,ce)|0,o=Math.imul(W,ue),r=r+Math.imul(N,le)|0,i=(i=i+Math.imul(N,de)|0)+Math.imul(F,le)|0,o=o+Math.imul(F,de)|0;var je=(u+(r=r+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,me)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,le),i=(i=Math.imul(L,de))+Math.imul(W,le)|0,o=Math.imul(W,de);var Ae=(u+(r=r+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(F,pe)|0))<<13)|0;u=((o=o+Math.imul(F,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863;var Te=(u+(r=Math.imul(L,pe))|0)+((8191&(i=(i=Math.imul(L,me))+Math.imul(W,pe)|0))<<13)|0;return u=((o=Math.imul(W,me))+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,c[0]=ge,c[1]=be,c[2]=ve,c[3]=ye,c[4]=we,c[5]=_e,c[6]=Se,c[7]=ke,c[8]=Ee,c[9]=xe,c[10]=Me,c[11]=Ie,c[12]=Ce,c[13]=Re,c[14]=Pe,c[15]=Oe,c[16]=je,c[17]=Ae,c[18]=Te,0!==u&&(c[19]=u,n.length++),n};function p(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(h=d),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?h(this,e,t):n<63?d(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var a=i;i=0;for(var s=67108863&r,c=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=c;u++){var f=o-u,l=(0|e.words[f])*(0|t.words[u]),d=67108863&l;s=67108863&(d=d+s|0),i+=(a=(a=a+(l/67108864|0)|0)+(d>>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,e,t):p(this,e,t)},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},m.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},m.prototype.permute=function(e,t,n,r,i,o){for(var a=0;a<o;a++)r[a]=t[e[a]],i[a]=n[e[a]]},m.prototype.transform=function(e,t,n,r,i,o){this.permute(o,e,t,n,r,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,c=Math.cos(2*Math.PI/s),u=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var l=c,d=u,h=0;h<a;h++){var p=n[f+h],m=r[f+h],g=n[f+h+a],b=r[f+h+a],v=l*g-d*b;b=l*b+d*g,g=v,n[f+h]=p+g,r[f+h]=m+b,n[f+h+a]=p-g,r[f+h+a]=m-b,h!==s&&(v=c*l-u*d,d=c*d+u*l,l=v)}},m.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},m.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},m.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,n,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],n[2*a]=8191&o,o>>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)n[a]=0;r(0===o),r(0==(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},m.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),o=this.stub(r),a=new Array(r),s=new Array(r),c=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,a,r),this.convert13b(t.words,t.length,u,r),this.transform(a,o,s,c,r,i),this.transform(u,o,f,l,r,i);for(var h=0;h<r;h++){var p=s[h]*f[h]-c[h]*l[h];c[h]=s[h]*l[h]+c[h]*f[h],s[h]=p}return this.conjugate(s,c,r),this.transform(s,c,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),p(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,c=(0|this.words[t])-s<<n;this.words[t]=c|a,a=s>>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,c=n;if(i-=a,i=Math.max(0,i),c){for(var u=0;u<a;u++)c.words[u]=this.words[u];c.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=i);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&s}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n)&&!!(this.words[n]&i)},o.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,n){var i,o,a=e.length+n;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+n])+s;var c=(0|e.words[i])*t;s=((o-=67108863&c)>>26)-(c/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)s=(o=(0|this.words[i+n])+s)>>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,c=r.length-i.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var f=r.clone()._ishlnsubmul(i,1,c);0===f.negative&&(r=f,s&&(s.words[c]=1));for(var l=c-1;l>=0;l--){var d=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(d=Math.min(d/a|0,67108863),r._ishlnsubmul(i,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);s&&(s.words[l]=d)}return s&&s.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},o.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var f=n.clone(),l=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(f),c.isub(l)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s),a.isub(c)):(n.isub(t),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:n.iushln(u)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,f=1;0==(t.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var l=0,d=1;0==(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,a=n;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n.strip(),n},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(v,b),v.prototype.split=function(e,t){for(var n=Math.min(e.length,9),r=0;r<n;r++)t.words[r]=e.words[r];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,r=10;r<e.length;r++){var o=0|e.words[r];e.words[r-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(y,b),i(w,b),i(_,b),_.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new y;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return g[e]=t,t},S.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var l=this.pow(f,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g<p);var b=this.pow(l,new o(1).iushln(p-g-1));d=d.redMul(b),l=b.redSqr(),h=h.redMul(l),p=g}return d},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],a=0,s=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],f=c-1;f>=0;f--){var l=u>>f&1;i!==n[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===r&&0===f)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}c=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},i(k,S),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(182)(e))},function(e,t,n){e.exports=!n(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(5),i=n(130),o=n(36),a=Object.defineProperty;t.f=n(13)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function f(e,t,n,r){var i,o,a,s;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=u(e))>0&&a.length>i&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function l(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,o(this.listener,this.target,e))}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function h(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var u=c.length,f=m(c,u);for(n=0;n<u;++n)o(f[n],this,t)}return!0},s.prototype.addListener=function(e,t){return f(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return f(this,e,t,!0)},s.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,d(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,d(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,o,a;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);if(void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){var r=n(33);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(3),i=n(20),o=n(19),a=n(42)("src"),s=n(209),c=(""+s).split("toString");n(11).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var u="function"==typeof n;u&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(u&&(o(n,a)||i(n,a,e[t]?""+e[t]:c.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||s.call(this)})},function(e,t,n){var r=n(0),i=n(4),o=n(33),a=/"/g,s=function(e,t,n,r){var i=String(o(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,"&quot;")+'"'),s+">"+i+"</"+t+">"};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*i(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(14),i=n(41);e.exports=n(13)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(62),i=n(33);e.exports=function(e){return r(i(e))}},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t,n){"use strict";var r=t,i=n(12),o=n(22),a=n(184);r.assert=o,r.toArray=a.toArray,r.zero2=a.zero2,r.toHex=a.toHex,r.encode=a.encode,r.getNAF=function(e,t){for(var n=[],r=1<<t+1,i=e.clone();i.cmpn(1)>=0;){var o;if(i.isOdd()){var a=i.andln(r-1);o=a>(r>>1)-1?(r>>1)-a:a,i.isubn(o)}else o=0;n.push(o);for(var s=0!==i.cmpn(0)&&0===i.andln(r-1)?t+1:1,c=1;c<s;c++)n.push(0);i.iushrn(s)}return n},r.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r=0,i=0;e.cmpn(-r)>0||t.cmpn(-i)>0;){var o,a,s,c=e.andln(3)+r&3,u=t.andln(3)+i&3;if(3===c&&(c=-1),3===u&&(u=-1),0==(1&c))o=0;else o=3!==(s=e.andln(7)+r&7)&&5!==s||2!==u?c:-c;if(n[0].push(o),0==(1&u))a=0;else a=3!==(s=t.andln(7)+i&7)&&5!==s||2!==c?u:-u;n[1].push(a),2*r===o+1&&(r=1-r),2*i===a+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return n},r.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new i(e,"hex","le")}},function(e,t,n){"use strict";var r=n(4);e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t,n){var r=n(26);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(63),i=n(41),o=n(21),a=n(36),s=n(19),c=n(130),u=Object.getOwnPropertyDescriptor;t.f=n(13)?u:function(e,t){if(e=o(e),t=a(t,!0),c)try{return u(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(0),i=n(11),o=n(4);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(e,t,n){var r=n(25),i=n(62),o=n(16),a=n(10),s=n(146);e.exports=function(e,t){var n=1==e,c=2==e,u=3==e,f=4==e,l=6==e,d=5==e||l,h=t||s;return function(t,s,p){for(var m,g,b=o(t),v=i(b),y=r(s,p,3),w=a(v.length),_=0,S=n?h(t,w):c?h(t,0):void 0;w>_;_++)if((d||_ in v)&&(g=y(m=v[_],_,b),e))if(n)S[_]=g;else if(g)switch(e){case 3:return!0;case 5:return m;case 6:return _;case 2:S.push(m)}else if(f)return!1;return l?-1:u||f?f:S}}},function(e,t,n){"use strict";var r=n(22),i=n(1);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(var r=0,i=0;i<e.length;i++){var a=e.charCodeAt(i);a<128?n[r++]=a:a<2048?(n[r++]=a>>6|192,n[r++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),n[r++]=a>>18|240,n[r++]=a>>12&63|128,n[r++]=a>>6&63|128,n[r++]=63&a|128):(n[r++]=a>>12|224,n[r++]=a>>6&63|128,n[r++]=63&a|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=s(e[n].toString(16));return t},t.htonl=a,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=a(i)),n+=c(i.toString(16))}return n},t.zero2=s,t.zero8=c,t.join32=function(e,t,n,i){var o=n-t;r(o%4==0);for(var a=new Array(o/4),s=0,c=t;s<a.length;s++,c+=4){var u;u="big"===i?e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]:e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c],a[s]=u>>>0}return a},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var o=e[r];"big"===t?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},t.sum64=function(e,t,n,r){var i=e[t],o=r+e[t+1]>>>0,a=(o<r?1:0)+n+i;e[t]=a>>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,i,o,a,s){var c=0,u=t;return c+=(u=u+r>>>0)<t?1:0,c+=(u=u+o>>>0)<o?1:0,e+n+i+a+(c+=(u=u+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,i,o,a,s){return t+r+o+s>>>0},t.sum64_5_hi=function(e,t,n,r,i,o,a,s,c,u){var f=0,l=t;return f+=(l=l+r>>>0)<t?1:0,f+=(l=l+o>>>0)<o?1:0,f+=(l=l+s>>>0)<s?1:0,e+n+i+a+c+(f+=(l=l+u>>>0)<u?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,i,o,a,s,c,u){return t+r+o+s+u>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";if(n(13)){var r=n(43),i=n(3),o=n(4),a=n(0),s=n(83),c=n(112),u=n(25),f=n(57),l=n(41),d=n(20),h=n(58),p=n(27),m=n(10),g=n(157),b=n(45),v=n(36),y=n(19),w=n(64),_=n(6),S=n(16),k=n(104),E=n(46),x=n(48),M=n(47).f,I=n(106),C=n(42),R=n(8),P=n(30),O=n(73),j=n(65),A=n(108),T=n(55),N=n(76),F=n(56),D=n(107),L=n(148),W=n(14),q=n(28),B=W.f,H=q.f,U=i.RangeError,V=i.TypeError,G=i.Uint8Array,z=Array.prototype,X=c.ArrayBuffer,Y=c.DataView,K=P(0),J=P(2),$=P(3),Z=P(4),Q=P(5),ee=P(6),te=O(!0),ne=O(!1),re=A.values,ie=A.keys,oe=A.entries,ae=z.lastIndexOf,se=z.reduce,ce=z.reduceRight,ue=z.join,fe=z.sort,le=z.slice,de=z.toString,he=z.toLocaleString,pe=R("iterator"),me=R("toStringTag"),ge=C("typed_constructor"),be=C("def_constructor"),ve=s.CONSTR,ye=s.TYPED,we=s.VIEW,_e=P(1,function(e,t){return Me(j(e,e[be]),t)}),Se=o(function(){return 1===new G(new Uint16Array([1]).buffer)[0]}),ke=!!G&&!!G.prototype.set&&o(function(){new G(1).set({})}),Ee=function(e,t){var n=p(e);if(n<0||n%t)throw U("Wrong offset!");return n},xe=function(e){if(_(e)&&ye in e)return e;throw V(e+" is not a typed array!")},Me=function(e,t){if(!(_(e)&&ge in e))throw V("It is not a typed array constructor!");return new e(t)},Ie=function(e,t){return Ce(j(e,e[be]),t)},Ce=function(e,t){for(var n=0,r=t.length,i=Me(e,r);r>n;)i[n]=t[n++];return i},Re=function(e,t,n){B(e,t,{get:function(){return this._d[n]}})},Pe=function(e){var t,n,r,i,o,a,s=S(e),c=arguments.length,f=c>1?arguments[1]:void 0,l=void 0!==f,d=I(s);if(null!=d&&!k(d)){for(a=d.call(s),r=[],t=0;!(o=a.next()).done;t++)r.push(o.value);s=r}for(l&&c>2&&(f=u(f,arguments[2],2)),t=0,n=m(s.length),i=Me(this,n);n>t;t++)i[t]=l?f(s[t],t):s[t];return i},Oe=function(){for(var e=0,t=arguments.length,n=Me(this,t);t>e;)n[e]=arguments[e++];return n},je=!!G&&o(function(){he.call(new G(1))}),Ae=function(){return he.apply(je?le.call(xe(this)):xe(this),arguments)},Te={copyWithin:function(e,t){return L.call(xe(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return Z(xe(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return D.apply(xe(this),arguments)},filter:function(e){return Ie(this,J(xe(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Q(xe(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(xe(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){K(xe(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(xe(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(xe(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ue.apply(xe(this),arguments)},lastIndexOf:function(e){return ae.apply(xe(this),arguments)},map:function(e){return _e(xe(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return se.apply(xe(this),arguments)},reduceRight:function(e){return ce.apply(xe(this),arguments)},reverse:function(){for(var e,t=xe(this).length,n=Math.floor(t/2),r=0;r<n;)e=this[r],this[r++]=this[--t],this[t]=e;return this},some:function(e){return $(xe(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return fe.call(xe(this),e)},subarray:function(e,t){var n=xe(this),r=n.length,i=b(e,r);return new(j(n,n[be]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,m((void 0===t?r:b(t,r))-i))}},Ne=function(e,t){return Ie(this,le.call(xe(this),e,t))},Fe=function(e){xe(this);var t=Ee(arguments[1],1),n=this.length,r=S(e),i=m(r.length),o=0;if(i+t>n)throw U("Wrong length!");for(;o<i;)this[t+o]=r[o++]},De={entries:function(){return oe.call(xe(this))},keys:function(){return ie.call(xe(this))},values:function(){return re.call(xe(this))}},Le=function(e,t){return _(e)&&e[ye]&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},We=function(e,t){return Le(e,t=v(t,!0))?l(2,e[t]):H(e,t)},qe=function(e,t,n){return!(Le(e,t=v(t,!0))&&_(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?B(e,t,n):(e[t]=n.value,e)};ve||(q.f=We,W.f=qe),a(a.S+a.F*!ve,"Object",{getOwnPropertyDescriptor:We,defineProperty:qe}),o(function(){de.call({})})&&(de=he=function(){return ue.call(this)});var Be=h({},Te);h(Be,De),d(Be,pe,De.values),h(Be,{slice:Ne,set:Fe,constructor:function(){},toString:de,toLocaleString:Ae}),Re(Be,"buffer","b"),Re(Be,"byteOffset","o"),Re(Be,"byteLength","l"),Re(Be,"length","e"),B(Be,me,{get:function(){return this[ye]}}),e.exports=function(e,t,n,c){var u=e+((c=!!c)?"Clamped":"")+"Array",l="get"+e,h="set"+e,p=i[u],b=p||{},v=p&&x(p),y=!p||!s.ABV,S={},k=p&&p.prototype,I=function(e,n){B(e,n,{get:function(){return function(e,n){var r=e._d;return r.v[l](n*t+r.o,Se)}(this,n)},set:function(e){return function(e,n,r){var i=e._d;c&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[h](n*t+i.o,r,Se)}(this,n,e)},enumerable:!0})};y?(p=n(function(e,n,r,i){f(e,p,u,"_d");var o,a,s,c,l=0,h=0;if(_(n)){if(!(n instanceof X||"ArrayBuffer"==(c=w(n))||"SharedArrayBuffer"==c))return ye in n?Ce(p,n):Pe.call(p,n);o=n,h=Ee(r,t);var b=n.byteLength;if(void 0===i){if(b%t)throw U("Wrong length!");if((a=b-h)<0)throw U("Wrong length!")}else if((a=m(i)*t)+h>b)throw U("Wrong length!");s=a/t}else s=g(n),o=new X(a=s*t);for(d(e,"_d",{b:o,o:h,l:a,e:s,v:new Y(o)});l<s;)I(e,l++)}),k=p.prototype=E(Be),d(k,"constructor",p)):o(function(){p(1)})&&o(function(){new p(-1)})&&N(function(e){new p,new p(null),new p(1.5),new p(e)},!0)||(p=n(function(e,n,r,i){var o;return f(e,p,u),_(n)?n instanceof X||"ArrayBuffer"==(o=w(n))||"SharedArrayBuffer"==o?void 0!==i?new b(n,Ee(r,t),i):void 0!==r?new b(n,Ee(r,t)):new b(n):ye in n?Ce(p,n):Pe.call(p,n):new b(g(n))}),K(v!==Function.prototype?M(b).concat(M(v)):M(b),function(e){e in p||d(p,e,b[e])}),p.prototype=k,r||(k.constructor=p));var C=k[pe],R=!!C&&("values"==C.name||null==C.name),P=De.values;d(p,ge,!0),d(k,ye,u),d(k,we,!0),d(k,be,p),(c?new p(1)[me]==u:me in k)||B(k,me,{get:function(){return u}}),S[u]=p,a(a.G+a.W+a.F*(p!=b),S),a(a.S,u,{BYTES_PER_ELEMENT:t}),a(a.S+a.F*o(function(){b.of.call(p,1)}),u,{from:Pe,of:Oe}),"BYTES_PER_ELEMENT"in k||d(k,"BYTES_PER_ELEMENT",t),a(a.P,u,Te),F(u),a(a.P+a.F*ke,u,{set:Fe}),a(a.P+a.F*!R,u,De),r||k.toString==de||(k.toString=de),a(a.P+a.F*o(function(){new p(1).slice()}),u,{slice:Ne}),a(a.P+a.F*(o(function(){return[1,2].toLocaleString()!=new p([1,2]).toLocaleString()})||!o(function(){k.toLocaleString.call([1,2])})),u,{toLocaleString:Ae}),T[u]=R?C:P,r||R||d(k,pe,P)}}else e.exports=function(){}},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,u=[],f=!1,l=-1;function d(){f&&c&&(f=!1,c.length?u=c.concat(u):l=-1,u.length&&h())}function h(){if(!f){var e=s(d);f=!0;for(var t=u.length;t;){for(c=u,u=[];++l<t;)c&&c[l].run();l=-1,t=u.length}c=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||f||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){var r=n(6);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(42)("meta"),i=n(6),o=n(19),a=n(14).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(4)(function(){return c(Object.preventExtensions({}))}),f=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},l=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!c(e))return"F";if(!t)return"E";f(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!c(e))return!0;if(!t)return!1;f(e)}return e[r].w},onFreeze:function(e){return u&&l.NEED&&c(e)&&!o(e,r)&&f(e),e}}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(2).Buffer,i=n(60).Transform,o=n(116).StringDecoder;function a(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(1)(a,i),a.prototype.update=function(e,t,n){"string"==typeof e&&(e=r.from(e,t));var i=this._update(e);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,n){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){r=e}finally{n(r)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return n&&(r+=this._decoder.end()),r},e.exports=a},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.UNEXPECTED_EXCEPTION="UNEXPECTED_EXCEPTION",e.FILE_IS_NOT_JS_OBJECT="40101",e.FILE_DOES_NOT_HAVE_UID="40102",e.FILE_FLAGS_ARE_NOT_IN_ARRAY="40103",e.FILE_FLAG_IS_NOT_OBJECT="40104",e.COMMAND_TYPE_NOT_VALID="40401",e.COMMAND_TYPE_IS_TOO_LONG="40402",e.HARDWARE_LED_COLOR_IS_NOT_STRING="40601",e.HARDWARE_LED_COLOR_IS_NOT_VALID="40602",e.FILE_NOT_FOUND_IN_CACHE="49902",e.OFFLINE_CACHE_UID_NOT_VALID="40901",e.OFFLINE_CACHE_HEADERS_NOT_VALID="40902",e.STREAM_INVALID_PROTOCOL_TYPE="41401",e.VIDEO_WAS_NOT_PLAYED_YET="41501",e.VIDEO_WAS_STOPPED_ALREADY="41502",e.SECURITY_PIN_CODE_INVALID="41701"}(r||(r={})),t.default=r},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports=!1},function(e,t,n){var r=n(132),i=n(91);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(27),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},function(e,t,n){var r=n(5),i=n(133),o=n(91),a=n(90)("IE_PROTO"),s=function(){},c=function(){var e,t=n(88)("iframe"),r=o.length;for(t.style.display="none",n(92).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;r--;)delete c.prototype[o[r]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[a]=e):n=c(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(132),i=n(91).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(19),i=n(16),o=n(90)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var r=n(8)("unscopables"),i=Array.prototype;null==i[r]&&n(20)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){var r=n(6);e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){"use strict";var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=l;var i=n(114),o=n(67);o.inherits=n(1);var a=n(165),s=n(115);o.inherits(l,a);for(var c=r(s.prototype),u=0;u<c.length;u++){var f=c[u];l.prototype[f]||(l.prototype[f]=s.prototype[f])}function l(e){if(!(this instanceof l))return new l(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||i(h,this)}function h(e){e.end()}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(198),c=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,o(t).call(this,Object.assign(Object.assign({},e),{type:e.type?e.type:"AppletError",kind:"sosError"})))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,s["default"]),t}();t.default=c},function(e,t,n){var r=n(14).f,i=n(19),o=n(8)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){var r=n(0),i=n(33),o=n(4),a=n(94),s="["+a+"]",c=RegExp("^"+s+s+"*"),u=RegExp(s+s+"*$"),f=function(e,t,n){var i={},s=o(function(){return!!a[e]()||"​…"!="​…"[e]()}),c=i[e]=s?t(l):a[e];n&&(i[n]=c),r(r.P+r.F*s,"String",i)},l=f.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(c,"")),2&t&&(e=e.replace(u,"")),e};e.exports=f},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(3),i=n(14),o=n(13),a=n(8)("species");e.exports=function(e){var t=r[e];o&&t&&!t[a]&&i.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(17);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";(function(t,r){var i=65536,o=4294967295;var a=n(2).Buffer,s=t.crypto||t.msCrypto;s&&s.getRandomValues?e.exports=function(e,t){if(e>o)throw new RangeError("requested too many random bytes");var n=a.allocUnsafe(e);if(e>0)if(e>i)for(var c=0;c<e;c+=i)s.getRandomValues(n.slice(c,c+i));else s.getRandomValues(n);if("function"==typeof t)return r.nextTick(function(){t(null,n)});return n}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,n(38),n(35))},function(e,t,n){e.exports=i;var r=n(15).EventEmitter;function i(){r.call(this)}n(1)(i,r),i.Readable=n(383),i.Writable=n(389),i.Duplex=n(390),i.Transform=n(391),i.PassThrough=n(392),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",c));var a=!1;function s(){a||(a=!0,e.end())}function c(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(f(),0===r.listenerCount(this,"error"))throw e}function f(){n.removeListener("data",i),e.removeListener("drain",o),n.removeListener("end",s),n.removeListener("close",c),n.removeListener("error",u),e.removeListener("error",u),n.removeListener("end",f),n.removeListener("close",f),e.removeListener("close",f)}return n.on("error",u),e.on("error",u),n.on("end",f),n.on("close",f),e.on("close",f),e.emit("pipe",n),e}},function(e,t,n){var r=n(2).Buffer;function i(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var n=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s<o;){for(var c=a%i,u=Math.min(o-s,i-c),f=0;f<u;f++)n[c+f]=e[s+f];s+=u,(a+=u)%i==0&&this._update(n)}return this._len+=o,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,n){var r=n(32);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(32),i=n(8)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(5),i=n(26),o=n(8)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},function(e,t,n){"use strict";var r=n(1),i=n(113),o=n(118),a=n(119),s=n(39);function c(e){s.call(this,"digest"),this._hash=e}r(c,s),c.prototype._update=function(e){this._hash.update(e)},c.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new c(a(e))}},function(e,t,n){(function(e){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,n(9).Buffer)},function(e,t,n){(function(t){e.exports=function(e,n){for(var r=Math.min(e.length,n.length),i=new t(r),o=0;o<r;++o)i[o]=e[o]^n[o];return i}}).call(this,n(9).Buffer)},function(e,t,n){"use strict";var r=n(31),i=n(22);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o<this.padLength;o++)r[i++]=0;return r}},function(e,t,n){var r=t;r.bignum=n(12),r.define=n(443).define,r.base=n(71),r.constants=n(190),r.decoders=n(448),r.encoders=n(450)},function(e,t,n){var r=t;r.Reporter=n(445).Reporter,r.DecoderBuffer=n(189).DecoderBuffer,r.EncoderBuffer=n(189).EncoderBuffer,r.Node=n(446)},function(e,t,n){var r=n(11),i=n(3),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(43)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(21),i=n(10),o=n(45);e.exports=function(e){return function(t,n,a){var s,c=r(t),u=i(c.length),f=o(a,u);if(e&&n!=n){for(;u>f;)if((s=c[f++])!=s)return!0}else for(;u>f;f++)if((e||f in c)&&c[f]===n)return e||f||0;return!e&&-1}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(32);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(8)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(5);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var r=n(64),i=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){"use strict";n(150);var r=n(17),i=n(20),o=n(4),a=n(33),s=n(8),c=n(109),u=s("species"),f=!o(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),l=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var d=s(e),h=!o(function(){var t={};return t[d]=function(){return 7},7!=""[e](t)}),p=h?!o(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[u]=function(){return n}),n[d](""),!t}):void 0;if(!h||!p||"replace"===e&&!f||"split"===e&&!l){var m=/./[d],g=n(a,d,""[e],function(e,t,n,r,i){return t.exec===c?h&&!i?{done:!0,value:m.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),b=g[0],v=g[1];r(String.prototype,e,b),i(RegExp.prototype,d,2==t?function(e,t){return v.call(e,this,t)}:function(e){return v.call(e,this)})}}},function(e,t,n){var r=n(25),i=n(145),o=n(104),a=n(5),s=n(10),c=n(106),u={},f={};(t=e.exports=function(e,t,n,l,d){var h,p,m,g,b=d?function(){return e}:c(e),v=r(n,l,t?2:1),y=0;if("function"!=typeof b)throw TypeError(e+" is not iterable!");if(o(b)){for(h=s(e.length);h>y;y++)if((g=t?v(a(p=e[y])[0],p[1]):v(e[y]))===u||g===f)return g}else for(m=b.call(e);!(p=m.next()).done;)if((g=i(m,v,p.value,t))===u||g===f)return g}).BREAK=u,t.RETURN=f},function(e,t,n){var r=n(3).navigator;e.exports=r&&r.userAgent||""},function(e,t,n){"use strict";var r=n(3),i=n(0),o=n(17),a=n(58),s=n(37),c=n(80),u=n(57),f=n(6),l=n(4),d=n(76),h=n(53),p=n(95);e.exports=function(e,t,n,m,g,b){var v=r[e],y=v,w=g?"set":"add",_=y&&y.prototype,S={},k=function(e){var t=_[e];o(_,e,"delete"==e?function(e){return!(b&&!f(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(b&&!f(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return b&&!f(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof y&&(b||_.forEach&&!l(function(){(new y).entries().next()}))){var E=new y,x=E[w](b?{}:-0,1)!=E,M=l(function(){E.has(1)}),I=d(function(e){new y(e)}),C=!b&&l(function(){for(var e=new y,t=5;t--;)e[w](t,t);return!e.has(-0)});I||((y=t(function(t,n){u(t,y,e);var r=p(new v,t,y);return null!=n&&c(n,g,r[w],r),r})).prototype=_,_.constructor=y),(M||C)&&(k("delete"),k("has"),g&&k("get")),(C||x)&&k(w),b&&_.clear&&delete _.clear}else y=m.getConstructor(t,e,g,w),a(y.prototype,n),s.NEED=!0;return h(y,e),S[e]=y,i(i.G+i.W+i.F*(y!=v),S),b||m.setStrong(y,e,g),y}},function(e,t,n){for(var r,i=n(3),o=n(20),a=n(42),s=a("typed_array"),c=a("view"),u=!(!i.ArrayBuffer||!i.DataView),f=u,l=0,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=i[d[l++]])?(o(r.prototype,s,!0),o(r.prototype,c,!0)):f=!1;e.exports={ABV:u,CONSTR:f,TYPED:s,VIEW:c}},function(e,t,n){var r=n(2).Buffer;function i(e){r.isBuffer(e)||(e=r.from(e));for(var t=e.length/4|0,n=new Array(t),i=0;i<t;i++)n[i]=e.readUInt32BE(4*i);return n}function o(e){for(;0<e.length;e++)e[0]=0}function a(e,t,n,r,i){for(var o,a,s,c,u=n[0],f=n[1],l=n[2],d=n[3],h=e[0]^t[0],p=e[1]^t[1],m=e[2]^t[2],g=e[3]^t[3],b=4,v=1;v<i;v++)o=u[h>>>24]^f[p>>>16&255]^l[m>>>8&255]^d[255&g]^t[b++],a=u[p>>>24]^f[m>>>16&255]^l[g>>>8&255]^d[255&h]^t[b++],s=u[m>>>24]^f[g>>>16&255]^l[h>>>8&255]^d[255&p]^t[b++],c=u[g>>>24]^f[h>>>16&255]^l[p>>>8&255]^d[255&m]^t[b++],h=o,p=a,m=s,g=c;return o=(r[h>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&g])^t[b++],a=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[g>>>8&255]<<8|r[255&h])^t[b++],s=(r[m>>>24]<<24|r[g>>>16&255]<<16|r[h>>>8&255]<<8|r[255&p])^t[b++],c=(r[g>>>24]<<24|r[h>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^t[b++],[o>>>=0,a>>>=0,s>>>=0,c>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],r=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,c=0;c<256;++c){var u=s^s<<1^s<<2^s<<3^s<<4;u=u>>>8^255&u^99,n[a]=u,r[u]=a;var f=e[a],l=e[f],d=e[l],h=257*e[u]^16843008*u;i[0][a]=h<<24|h>>>8,i[1][a]=h<<16|h>>>16,i[2][a]=h<<8|h>>>24,i[3][a]=h,h=16843009*d^65537*l^257*f^16843008*a,o[0][u]=h<<24|h>>>8,o[1][u]=h<<16|h>>>16,o[2][u]=h<<8|h>>>24,o[3][u]=h,0===a?a=s=1:(a=f^e[e[e[d^f]]],s^=e[e[s]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:o}}();function u(e){this._key=i(e),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,r=4*(n+1),i=[],o=0;o<t;o++)i[o]=e[o];for(o=t;o<r;o++){var a=i[o-1];o%t==0?(a=a<<8|a>>>24,a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t==4&&(a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a]),i[o]=i[o-t]^a}for(var u=[],f=0;f<r;f++){var l=r-f,d=i[l-(f%4?0:4)];u[f]=f<4||l<=4?d:c.INV_SUB_MIX[0][c.SBOX[d>>>24]]^c.INV_SUB_MIX[1][c.SBOX[d>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[d>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&d]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},u.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=r.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},u.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var n=a(e,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),o=r.allocUnsafe(16);return o.writeUInt32BE(n[0],0),o.writeUInt32BE(n[3],4),o.writeUInt32BE(n[2],8),o.writeUInt32BE(n[1],12),o},u.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=u},function(e,t,n){var r=n(2).Buffer,i=n(113);e.exports=function(e,t,n,o){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=n/8,s=r.alloc(a),c=r.alloc(o||0),u=r.alloc(0);a>0||o>0;){var f=new i;f.update(u),f.update(e),t&&f.update(t),u=f.digest();var l=0;if(a>0){var d=s.length-a;l=Math.min(a,u.length),u.copy(s,d,0,l),a-=l}if(l<u.length&&o>0){var h=c.length-o,p=Math.min(o,u.length-l);u.copy(c,h,l,l+p),o-=p}}return u.fill(0),{key:s,iv:c}}},function(e,t,n){"use strict";var r=n(12),i=n(23),o=i.getNAF,a=i.getJSF,s=i.assert;function c(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(e,t){s(e.precomputed);var n=e._getDoubles(),r=o(t,1),i=(1<<n.step+1)-(n.step%2==0?2:1);i/=3;for(var a=[],c=0;c<r.length;c+=n.step){var u=0;for(t=c+n.step-1;t>=c;t--)u=(u<<1)+r[t];a.push(u)}for(var f=this.jpoint(null,null,null),l=this.jpoint(null,null,null),d=i;d>0;d--){for(c=0;c<a.length;c++){(u=a[c])===d?l=l.mixedAdd(n.points[c]):u===-d&&(l=l.mixedAdd(n.points[c].neg()))}f=f.add(l)}return f.toP()},c.prototype._wnafMul=function(e,t){var n=4,r=e._getNAFPoints(n);n=r.wnd;for(var i=r.points,a=o(t,n),c=this.jpoint(null,null,null),u=a.length-1;u>=0;u--){for(t=0;u>=0&&0===a[u];u--)t++;if(u>=0&&t++,c=c.dblp(t),u<0)break;var f=a[u];s(0!==f),c="affine"===e.type?f>0?c.mixedAdd(i[f-1>>1]):c.mixedAdd(i[-f-1>>1].neg()):f>0?c.add(i[f-1>>1]):c.add(i[-f-1>>1].neg())}return"affine"===e.type?c.toP():c},c.prototype._wnafMulAdd=function(e,t,n,r,i){for(var s=this._wnafT1,c=this._wnafT2,u=this._wnafT3,f=0,l=0;l<r;l++){var d=(x=t[l])._getNAFPoints(e);s[l]=d.wnd,c[l]=d.points}for(l=r-1;l>=1;l-=2){var h=l-1,p=l;if(1===s[h]&&1===s[p]){var m=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(m[1]=t[h].add(t[p]),m[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(m[1]=t[h].toJ().mixedAdd(t[p]),m[2]=t[h].add(t[p].neg())):(m[1]=t[h].toJ().mixedAdd(t[p]),m[2]=t[h].toJ().mixedAdd(t[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],b=a(n[h],n[p]);f=Math.max(b[0].length,f),u[h]=new Array(f),u[p]=new Array(f);for(var v=0;v<f;v++){var y=0|b[0][v],w=0|b[1][v];u[h][v]=g[3*(y+1)+(w+1)],u[p][v]=0,c[h]=m}}else u[h]=o(n[h],s[h]),u[p]=o(n[p],s[p]),f=Math.max(u[h].length,f),f=Math.max(u[p].length,f)}var _=this.jpoint(null,null,null),S=this._wnafT4;for(l=f;l>=0;l--){for(var k=0;l>=0;){var E=!0;for(v=0;v<r;v++)S[v]=0|u[v][l],0!==S[v]&&(E=!1);if(!E)break;k++,l--}if(l>=0&&k++,_=_.dblp(k),l<0)break;for(v=0;v<r;v++){var x,M=S[v];0!==M&&(M>0?x=c[v][M-1>>1]:M<0&&(x=c[v][-M-1>>1].neg()),_="affine"===x.type?_.mixedAdd(x):_.add(x))}}for(l=0;l<r;l++)c[l]=null;return i?_:_.toP()},c.BasePoint=u,u.prototype.eq=function(){throw new Error("Not implemented")},u.prototype.validate=function(){return this.curve.validate(this)},c.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var n=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*n)return 6===e[0]?s(e[e.length-1]%2==0):7===e[0]&&s(e[e.length-1]%2==1),this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));if((2===e[0]||3===e[0])&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),3===e[0]);throw new Error("Unknown point format")},u.prototype.encodeCompressed=function(e){return this.encode(e,!0)},u.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},u.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},u.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},u.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)r=r.dbl();n.push(r)}return{step:e,points:n}},u.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)t[i]=t[i-1].add(r);return{wnd:e,points:t}},u.prototype._getBeta=function(){return null},u.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t}},function(e,t,n){var r=n(442),i=n(453),o=n(454),a=n(121),s=n(172),c=n(2).Buffer;function u(e){var t;"object"!=typeof e||c.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=c.from(e));var n,u,f=o(e,t),l=f.tag,d=f.data;switch(l){case"CERTIFICATE":u=r.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(u||(u=r.PublicKey.decode(d,"der")),n=u.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(u.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return u.subjectPrivateKey=u.subjectPublicKey,{type:"ec",data:u};case"1.2.840.10040.4.1":return u.algorithm.params.pub_key=r.DSAparam.decode(u.subjectPublicKey.data,"der"),{type:"dsa",data:u.algorithm.params};default:throw new Error("unknown key id "+n)}throw new Error("unknown key type "+l);case"ENCRYPTED PRIVATE KEY":d=function(e,t){var n=e.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[e.algorithm.decrypt.cipher.algo.join(".")],u=e.algorithm.decrypt.cipher.iv,f=e.subjectPrivateKey,l=parseInt(o.split("-")[1],10)/8,d=s.pbkdf2Sync(t,n,r,l,"sha1"),h=a.createDecipheriv(o,d,u),p=[];return p.push(h.update(f)),p.push(h.final()),c.concat(p)}(d=r.EncryptedPrivateKey.decode(d,"der"),t);case"PRIVATE KEY":switch(n=(u=r.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(u.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:u.algorithm.curve,privateKey:r.ECPrivateKey.decode(u.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return u.algorithm.params.priv_key=r.DSAparam.decode(u.subjectPrivateKey,"der"),{type:"dsa",params:u.algorithm.params};default:throw new Error("unknown key id "+n)}throw new Error("unknown key type "+l);case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=r.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+l)}}e.exports=u,u.signature=r.signature},function(e,t,n){var r=n(6),i=n(3).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,n){t.f=n(8)},function(e,t,n){var r=n(72)("keys"),i=n(42);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(3).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(6),i=n(5),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(25)(Function.call,n(28).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t){e.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(e,t,n){var r=n(6),i=n(93).set;e.exports=function(e,t,n){var o,a=t.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(e,o),e}},function(e,t,n){"use strict";var r=n(27),i=n(33);e.exports=function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var r=n(27),i=n(33);e.exports=function(e){return function(t,n){var o,a,s=String(i(t)),c=r(n),u=s.length;return c<0||c>=u?e?"":void 0:(o=s.charCodeAt(c))<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?e?s.charAt(c):o:e?s.slice(c,c+2):a-56320+(o-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(43),i=n(0),o=n(17),a=n(20),s=n(55),c=n(144),u=n(53),f=n(48),l=n(8)("iterator"),d=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,n,p,m,g,b){c(n,t,p);var v,y,w,_=function(e){if(!d&&e in x)return x[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},S=t+" Iterator",k="values"==m,E=!1,x=e.prototype,M=x[l]||x["@@iterator"]||m&&x[m],I=M||_(m),C=m?k?_("entries"):I:void 0,R="Array"==t&&x.entries||M;if(R&&(w=f(R.call(new e)))!==Object.prototype&&w.next&&(u(w,S,!0),r||"function"==typeof w[l]||a(w,l,h)),k&&M&&"values"!==M.name&&(E=!0,I=function(){return M.call(this)}),r&&!b||!d&&!E&&x[l]||a(x,l,I),s[t]=I,s[S]=h,m)if(v={values:k?I:_("values"),keys:g?I:_("keys"),entries:C},b)for(y in v)y in x||o(x,y,v[y]);else i(i.P+i.F*(d||E),t,v);return v}},function(e,t,n){var r=n(102),i=n(33);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},function(e,t,n){var r=n(6),i=n(32),o=n(8)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){var r=n(8)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){var r=n(55),i=n(8)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},function(e,t,n){"use strict";var r=n(14),i=n(41);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){var r=n(64),i=n(8)("iterator"),o=n(55);e.exports=n(11).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){"use strict";var r=n(16),i=n(45),o=n(10);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,u=void 0===c?n:i(c,n);u>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(49),i=n(149),o=n(55),a=n(21);e.exports=n(100)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";var r,i,o=n(77),a=RegExp.prototype.exec,s=String.prototype.replace,c=a,u=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),f=void 0!==/()??/.exec("")[1];(u||f)&&(c=function(e){var t,n,r,i,c=this;return f&&(n=new RegExp("^"+c.source+"$(?!\\s)",o.call(c))),u&&(t=c.lastIndex),r=a.call(c,e),u&&r&&(c.lastIndex=c.global?r.index+r[0].length:t),f&&r&&r.length>1&&s.call(r[0],n,function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)}),r}),e.exports=c},function(e,t,n){"use strict";var r=n(99)(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r,i,o,a=n(25),s=n(138),c=n(92),u=n(88),f=n(3),l=f.process,d=f.setImmediate,h=f.clearImmediate,p=f.MessageChannel,m=f.Dispatch,g=0,b={},v=function(){var e=+this;if(b.hasOwnProperty(e)){var t=b[e];delete b[e],t()}},y=function(e){v.call(e.data)};d&&h||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return b[++g]=function(){s("function"==typeof e?e:Function(e),t)},r(g),g},h=function(e){delete b[e]},"process"==n(32)(l)?r=function(e){l.nextTick(a(v,e,1))}:m&&m.now?r=function(e){m.now(a(v,e,1))}:p?(o=(i=new p).port2,i.port1.onmessage=y,r=a(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(e){f.postMessage(e+"","*")},f.addEventListener("message",y,!1)):r="onreadystatechange"in u("script")?function(e){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),v.call(e)}}:function(e){setTimeout(a(v,e,1),0)}),e.exports={set:d,clear:h}},function(e,t,n){"use strict";var r=n(3),i=n(13),o=n(43),a=n(83),s=n(20),c=n(58),u=n(4),f=n(57),l=n(27),d=n(10),h=n(157),p=n(47).f,m=n(14).f,g=n(107),b=n(53),v="prototype",y="Wrong index!",w=r.ArrayBuffer,_=r.DataView,S=r.Math,k=r.RangeError,E=r.Infinity,x=w,M=S.abs,I=S.pow,C=S.floor,R=S.log,P=S.LN2,O=i?"_b":"buffer",j=i?"_l":"byteLength",A=i?"_o":"byteOffset";function T(e,t,n){var r,i,o,a=new Array(n),s=8*n-t-1,c=(1<<s)-1,u=c>>1,f=23===t?I(2,-24)-I(2,-77):0,l=0,d=e<0||0===e&&1/e<0?1:0;for((e=M(e))!=e||e===E?(i=e!=e?1:0,r=c):(r=C(R(e)/P),e*(o=I(2,-r))<1&&(r--,o*=2),(e+=r+u>=1?f/o:f*I(2,1-u))*o>=2&&(r++,o/=2),r+u>=c?(i=0,r=c):r+u>=1?(i=(e*o-1)*I(2,t),r+=u):(i=e*I(2,u-1)*I(2,t),r=0));t>=8;a[l++]=255&i,i/=256,t-=8);for(r=r<<t|i,s+=t;s>0;a[l++]=255&r,r/=256,s-=8);return a[--l]|=128*d,a}function N(e,t,n){var r,i=8*n-t-1,o=(1<<i)-1,a=o>>1,s=i-7,c=n-1,u=e[c--],f=127&u;for(u>>=7;s>0;f=256*f+e[c],c--,s-=8);for(r=f&(1<<-s)-1,f>>=-s,s+=t;s>0;r=256*r+e[c],c--,s-=8);if(0===f)f=1-a;else{if(f===o)return r?NaN:u?-E:E;r+=I(2,t),f-=a}return(u?-1:1)*r*I(2,f-t)}function F(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function D(e){return[255&e]}function L(e){return[255&e,e>>8&255]}function W(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function q(e){return T(e,52,8)}function B(e){return T(e,23,4)}function H(e,t,n){m(e[v],t,{get:function(){return this[n]}})}function U(e,t,n,r){var i=h(+n);if(i+t>e[j])throw k(y);var o=e[O]._b,a=i+e[A],s=o.slice(a,a+t);return r?s:s.reverse()}function V(e,t,n,r,i,o){var a=h(+n);if(a+t>e[j])throw k(y);for(var s=e[O]._b,c=a+e[A],u=r(+i),f=0;f<t;f++)s[c+f]=u[o?f:t-f-1]}if(a.ABV){if(!u(function(){w(1)})||!u(function(){new w(-1)})||u(function(){return new w,new w(1.5),new w(NaN),"ArrayBuffer"!=w.name})){for(var G,z=(w=function(e){return f(this,w),new x(h(e))})[v]=x[v],X=p(x),Y=0;X.length>Y;)(G=X[Y++])in w||s(w,G,x[G]);o||(z.constructor=w)}var K=new _(new w(2)),J=_[v].setInt8;K.setInt8(0,2147483648),K.setInt8(1,2147483649),!K.getInt8(0)&&K.getInt8(1)||c(_[v],{setInt8:function(e,t){J.call(this,e,t<<24>>24)},setUint8:function(e,t){J.call(this,e,t<<24>>24)}},!0)}else w=function(e){f(this,w,"ArrayBuffer");var t=h(e);this._b=g.call(new Array(t),0),this[j]=t},_=function(e,t,n){f(this,_,"DataView"),f(e,w,"DataView");var r=e[j],i=l(t);if(i<0||i>r)throw k("Wrong offset!");if(i+(n=void 0===n?r-i:d(n))>r)throw k("Wrong length!");this[O]=e,this[A]=i,this[j]=n},i&&(H(w,"byteLength","_l"),H(_,"buffer","_b"),H(_,"byteLength","_l"),H(_,"byteOffset","_o")),c(_[v],{getInt8:function(e){return U(this,1,e)[0]<<24>>24},getUint8:function(e){return U(this,1,e)[0]},getInt16:function(e){var t=U(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=U(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return F(U(this,4,e,arguments[1]))},getUint32:function(e){return F(U(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return N(U(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return N(U(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){V(this,1,e,D,t)},setUint8:function(e,t){V(this,1,e,D,t)},setInt16:function(e,t){V(this,2,e,L,t,arguments[2])},setUint16:function(e,t){V(this,2,e,L,t,arguments[2])},setInt32:function(e,t){V(this,4,e,W,t,arguments[2])},setUint32:function(e,t){V(this,4,e,W,t,arguments[2])},setFloat32:function(e,t){V(this,4,e,B,t,arguments[2])},setFloat64:function(e,t){V(this,8,e,q,t,arguments[2])}});b(w,"ArrayBuffer"),b(_,"DataView"),s(_[v],a.VIEW,!0),t.ArrayBuffer=w,t.DataView=_},function(e,t,n){"use strict";(function(t){var r=n(1),i=n(164),o=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(e,t){return e<<t|e>>>32-t}function c(e,t,n,r,i,o,a){return s(e+(t&n|~t&r)+i+o|0,a)+t|0}function u(e,t,n,r,i,o,a){return s(e+(t&r|n&~r)+i+o|0,a)+t|0}function f(e,t,n,r,i,o,a){return s(e+(t^n^r)+i+o|0,a)+t|0}function l(e,t,n,r,i,o,a){return s(e+(n^(t|~r))+i+o|0,a)+t|0}r(a,i),a.prototype._update=function(){for(var e=o,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var n=this._a,r=this._b,i=this._c,a=this._d;n=c(n,r,i,a,e[0],3614090360,7),a=c(a,n,r,i,e[1],3905402710,12),i=c(i,a,n,r,e[2],606105819,17),r=c(r,i,a,n,e[3],3250441966,22),n=c(n,r,i,a,e[4],4118548399,7),a=c(a,n,r,i,e[5],1200080426,12),i=c(i,a,n,r,e[6],2821735955,17),r=c(r,i,a,n,e[7],4249261313,22),n=c(n,r,i,a,e[8],1770035416,7),a=c(a,n,r,i,e[9],2336552879,12),i=c(i,a,n,r,e[10],4294925233,17),r=c(r,i,a,n,e[11],2304563134,22),n=c(n,r,i,a,e[12],1804603682,7),a=c(a,n,r,i,e[13],4254626195,12),i=c(i,a,n,r,e[14],2792965006,17),n=u(n,r=c(r,i,a,n,e[15],1236535329,22),i,a,e[1],4129170786,5),a=u(a,n,r,i,e[6],3225465664,9),i=u(i,a,n,r,e[11],643717713,14),r=u(r,i,a,n,e[0],3921069994,20),n=u(n,r,i,a,e[5],3593408605,5),a=u(a,n,r,i,e[10],38016083,9),i=u(i,a,n,r,e[15],3634488961,14),r=u(r,i,a,n,e[4],3889429448,20),n=u(n,r,i,a,e[9],568446438,5),a=u(a,n,r,i,e[14],3275163606,9),i=u(i,a,n,r,e[3],4107603335,14),r=u(r,i,a,n,e[8],1163531501,20),n=u(n,r,i,a,e[13],2850285829,5),a=u(a,n,r,i,e[2],4243563512,9),i=u(i,a,n,r,e[7],1735328473,14),n=f(n,r=u(r,i,a,n,e[12],2368359562,20),i,a,e[5],4294588738,4),a=f(a,n,r,i,e[8],2272392833,11),i=f(i,a,n,r,e[11],1839030562,16),r=f(r,i,a,n,e[14],4259657740,23),n=f(n,r,i,a,e[1],2763975236,4),a=f(a,n,r,i,e[4],1272893353,11),i=f(i,a,n,r,e[7],4139469664,16),r=f(r,i,a,n,e[10],3200236656,23),n=f(n,r,i,a,e[13],681279174,4),a=f(a,n,r,i,e[0],3936430074,11),i=f(i,a,n,r,e[3],3572445317,16),r=f(r,i,a,n,e[6],76029189,23),n=f(n,r,i,a,e[9],3654602809,4),a=f(a,n,r,i,e[12],3873151461,11),i=f(i,a,n,r,e[15],530742520,16),n=l(n,r=f(r,i,a,n,e[2],3299628645,23),i,a,e[0],4096336452,6),a=l(a,n,r,i,e[7],1126891415,10),i=l(i,a,n,r,e[14],2878612391,15),r=l(r,i,a,n,e[5],4237533241,21),n=l(n,r,i,a,e[12],1700485571,6),a=l(a,n,r,i,e[3],2399980690,10),i=l(i,a,n,r,e[10],4293915773,15),r=l(r,i,a,n,e[1],2240044497,21),n=l(n,r,i,a,e[8],1873313359,6),a=l(a,n,r,i,e[15],4264355552,10),i=l(i,a,n,r,e[6],2734768916,15),r=l(r,i,a,n,e[13],1309151649,21),n=l(n,r,i,a,e[4],4149444226,6),a=l(a,n,r,i,e[11],3174756917,10),i=l(i,a,n,r,e[2],718787259,15),r=l(r,i,a,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+i|0,this._d=this._d+a|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=new t(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=a}).call(this,n(9).Buffer)},function(e,t,n){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports=function(e,n,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,n)});case 3:return t.nextTick(function(){e.call(null,n,r)});case 4:return t.nextTick(function(){e.call(null,n,r,i)});default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return t.nextTick(function(){e.apply(null,o)})}}:e.exports=t.nextTick}).call(this,n(35))},function(e,t,n){"use strict";(function(t,r){e.exports=p;var i=n(114),o=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:i,a=n(9).Buffer;p.WritableState=h;var s=n(67);s.inherits=n(1);var c,u={deprecate:n(387)};!function(){try{c=n(60)}catch(e){}finally{c||(c=n(15).EventEmitter)}}();var f;a=n(9).Buffer;function l(){}function d(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function h(e,t){f=f||n(51),e=e||{},this.objectMode=!!e.objectMode,t instanceof f&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,a=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:a,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.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,a=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,o){--t.pendingcb,n?i(o,r):o(r);e._writableState.errorEmitted=!0,e.emit("error",r)}(e,n,r,t,a);else{var s=v(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||b(e,n),r?o(g,e,n,s,a):g(e,n,s,a)}}(t,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 _(this),this.corkedRequestsFree.next=new _(this)}function p(e){if(f=f||n(51),!(this instanceof p||this instanceof f))return new p(e);this._writableState=new h(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),c.call(this)}function m(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 g(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),w(e,t)}function b(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 a=0;n;)i[a]=n,n=n.next,a+=1;m(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,t.corkedRequestsFree=o.next,o.next=null}else{for(;n;){var s=n.chunk,c=n.encoding,u=n.callback;if(m(e,t,!1,t.objectMode?1:s.length,s,c,u),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function v(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function y(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function w(e,t){var n=v(t);return n&&(0===t.pendingcb?(y(e,t),t.finished=!0,e.emit("finish")):y(e,t)),n}function _(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}s.inherits(p,c),h.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(h.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}(),p.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},p.prototype.write=function(e,t,n){var r=this._writableState,o=!1;return"function"==typeof t&&(n=t,t=null),a.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=l),r.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),i(t,n)}(this,n):function(e,t,n,r){var o=!0;if(!a.isBuffer(n)&&"string"!=typeof n&&null!=n&&!t.objectMode){var s=new TypeError("Invalid non-string/buffer chunk");e.emit("error",s),i(r,s),o=!1}return o}(this,r,e,n)&&(r.pendingcb++,o=function(e,t,n,r,i){n=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=new a(t,n));return t}(t,n,r),a.isBuffer(n)&&(r="buffer");var o=t.objectMode?1:n.length;t.length+=o;var s=t.length<t.highWaterMark;s||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest=new d(n,r,i),c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else m(e,t,!1,o,n,r,i);return s}(this,r,e,t,n)),o},p.prototype.cork=function(){this._writableState.corked++},p.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||b(this,e))},p.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);this._writableState.defaultEncoding=e},p.prototype._write=function(e,t,n){n(new Error("not implemented"))},p.prototype._writev=null,p.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||r.finished||function(e,t,n){t.ending=!0,w(e,t),n&&(t.finished?i(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)}}).call(this,n(35),n(385).setImmediate)},function(e,t,n){"use strict";var r=n(388).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=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=f,this.end=l,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,n){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 c(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 u(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 f(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 l(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):""}t.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]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=a(t[r]))>=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}},function(e,t,n){"use strict";e.exports=a;var r=n(51),i=n(67);function o(e){this.afterTransform=function(t,n){return function(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!=n&&e.push(n);i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function a(e){if(!(this instanceof a))return new a(e);r.call(this,e),this._transformState=new o(this);var t=this;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.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(e){s(t,e)}):s(t)})}function s(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=e._transformState;if(n.length)throw new Error("calling transform done when ws.length != 0");if(r.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}i.inherits=n(1),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("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}},function(e,t,n){"use strict";var r=n(9).Buffer,i=n(1),o=n(164),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],l=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function h(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<<t|e>>>32-t}function m(e,t,n,r,i,o,a,s){return p(e+(t^n^r)+o+a|0,s)+i|0}function g(e,t,n,r,i,o,a,s){return p(e+(t&n|~t&r)+o+a|0,s)+i|0}function b(e,t,n,r,i,o,a,s){return p(e+((t|~n)^r)+o+a|0,s)+i|0}function v(e,t,n,r,i,o,a,s){return p(e+(t&r|n&~r)+o+a|0,s)+i|0}function y(e,t,n,r,i,o,a,s){return p(e+(t^(n|~r))+o+a|0,s)+i|0}i(h,o),h.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,h=0|this._e,w=0|this._a,_=0|this._b,S=0|this._c,k=0|this._d,E=0|this._e,x=0;x<80;x+=1){var M,I;x<16?(M=m(n,r,i,o,h,e[s[x]],l[0],u[x]),I=y(w,_,S,k,E,e[c[x]],d[0],f[x])):x<32?(M=g(n,r,i,o,h,e[s[x]],l[1],u[x]),I=v(w,_,S,k,E,e[c[x]],d[1],f[x])):x<48?(M=b(n,r,i,o,h,e[s[x]],l[2],u[x]),I=b(w,_,S,k,E,e[c[x]],d[2],f[x])):x<64?(M=v(n,r,i,o,h,e[s[x]],l[3],u[x]),I=g(w,_,S,k,E,e[c[x]],d[3],f[x])):(M=y(n,r,i,o,h,e[s[x]],l[4],u[x]),I=m(w,_,S,k,E,e[c[x]],d[4],f[x])),n=h,h=o,o=p(i,10),i=r,r=M,w=E,E=k,k=p(S,10),S=_,_=I}var C=this._b+i+k|0;this._b=this._c+o+E|0,this._c=this._d+h+w|0,this._d=this._e+n+_|0,this._e=this._a+r+S|0,this._a=C},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=r.alloc?r.alloc(20):new r(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},function(e,t,n){(t=e.exports=function(e){e=e.toLowerCase();var n=t[e];if(!n)throw new Error(e+" is not supported (we accept pull requests)");return new n}).sha=n(393),t.sha1=n(394),t.sha224=n(395),t.sha256=n(167),t.sha384=n(396),t.sha512=n(168)},function(e,t,n){"use strict";t.utils=n(402),t.Cipher=n(403),t.DES=n(404),t.CBC=n(405),t.EDE=n(406)},function(e,t,n){var r=n(407),i=n(415),o=n(178);t.createCipher=t.Cipher=r.createCipher,t.createCipheriv=t.Cipheriv=r.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},function(e,t,n){var r={ECB:n(408),CBC:n(409),CFB:n(410),CFB8:n(411),CFB1:n(412),OFB:n(413),CTR:n(176),GCM:n(176)},i=n(178);for(var o in i)i[o].module=r[i[o].mode];e.exports=i},function(e,t,n){var r;function i(e){this.rand=e}if(e.exports=function(e){return r||(r=new i(null)),r.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=n(419);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return o.randomBytes(e)}}catch(e){}},function(e,t,n){(function(t){var r=n(12),i=n(59);function o(e,n){var i=function(e){var t=a(e);return{blinder:t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(n),o=n.modulus.byteLength(),s=(r.mont(n.modulus),new r(e).mul(i.blinder).umod(n.modulus)),c=s.toRed(r.mont(n.prime1)),u=s.toRed(r.mont(n.prime2)),f=n.coefficient,l=n.prime1,d=n.prime2,h=c.redPow(n.exponent1),p=u.redPow(n.exponent2);h=h.fromRed(),p=p.fromRed();var m=h.isub(p).imul(f).umod(l);return m.imul(d),p.iadd(m),new t(p.imul(i.unblinder).umod(n.modulus).toArray(!1,o))}function a(e){for(var t=e.modulus.byteLength(),n=new r(i(t));n.cmp(e.modulus)>=0||!n.umod(e.prime1)||!n.umod(e.prime2);)n=new r(i(t));return n}e.exports=o,o.getr=a}).call(this,n(9).Buffer)},function(e,t,n){"use strict";var r=t;r.version=n(424).version,r.utils=n(23),r.rand=n(123),r.curve=n(185),r.curves=n(126),r.ec=n(435),r.eddsa=n(439)},function(e,t,n){"use strict";var r,i=t,o=n(127),a=n(185),s=n(23).assert;function c(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var n=new c(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=c,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=n(434)}catch(e){r=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},function(e,t,n){var r=t;r.utils=n(31),r.common=n(69),r.sha=n(428),r.ripemd=n(432),r.hmac=n(433),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.COMMAND_TYPE_NOT_VALID="Allowed characters are: a-z, A-Z, 0-9, ., -, _",e.VIDEO_WAS_NOT_PLAYED="Play the video first.",e.VIDEO_WAS_STOPPED_ALREADY="Ignore the rejection if you stop video on demand. Video could never end because it is stopped before it's end. If you'd like to continue video to it's end, you probably looking for pause/resume methods.",e.SECURITY_PIN_CODE_FORMAT="PIN code has to be 4 digits string. E.g.: 1234"}(r||(r={})),t.default=r},function(e,t,n){"use strict";var r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(40),a=(i(r={},o.default.UNEXPECTED_EXCEPTION,"Unexpected exception"),i(r,o.default.FILE_IS_NOT_JS_OBJECT,"File needs to be object"),i(r,o.default.FILE_DOES_NOT_HAVE_UID,"File uid needs to be defined"),i(r,o.default.FILE_FLAGS_ARE_NOT_IN_ARRAY,"File flags needs to be Array of objects"),i(r,o.default.FILE_FLAG_IS_NOT_OBJECT,"File flag needs to be object"),i(r,o.default.COMMAND_TYPE_NOT_VALID,"Type contains invalid characters."),i(r,o.default.COMMAND_TYPE_IS_TOO_LONG,"Type is longer then 100 characters."),i(r,o.default.HARDWARE_LED_COLOR_IS_NOT_STRING,"Color must be string"),i(r,o.default.HARDWARE_LED_COLOR_IS_NOT_VALID,"Color must be in format #000000 or null"),i(r,o.default.FILE_NOT_FOUND_IN_CACHE,"File was not found"),i(r,o.default.OFFLINE_CACHE_UID_NOT_VALID,"Uid contains invalid characters"),i(r,o.default.OFFLINE_CACHE_HEADERS_NOT_VALID,"Invalid headers"),i(r,o.default.STREAM_INVALID_PROTOCOL_TYPE,"Invalid stream protocol type"),i(r,o.default.VIDEO_WAS_NOT_PLAYED_YET,"This video was not played yet"),i(r,o.default.VIDEO_WAS_STOPPED_ALREADY,"This video was already stopped"),i(r,o.default.SECURITY_PIN_CODE_INVALID,"Invalid PIN code"),r);t.default=a},function(e,t,n){e.exports=!n(13)&&!n(4)(function(){return 7!=Object.defineProperty(n(88)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(3),i=n(11),o=n(43),a=n(89),s=n(14).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t,n){var r=n(19),i=n(21),o=n(73)(!1),a=n(90)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;t.length>c;)r(s,n=t[c++])&&(~o(u,n)||u.push(n));return u}},function(e,t,n){var r=n(14),i=n(5),o=n(44);e.exports=n(13)?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),s=a.length,c=0;s>c;)r.f(e,n=a[c++],t[n]);return e}},function(e,t,n){var r=n(21),i=n(47).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},function(e,t,n){"use strict";var r=n(13),i=n(44),o=n(74),a=n(63),s=n(16),c=n(62),u=Object.assign;e.exports=!u||n(4)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r})?function(e,t){for(var n=s(e),u=arguments.length,f=1,l=o.f,d=a.f;u>f;)for(var h,p=c(arguments[f++]),m=l?i(p).concat(l(p)):i(p),g=m.length,b=0;g>b;)h=m[b++],r&&!d.call(p,h)||(n[h]=p[h]);return n}:u},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var r=n(26),i=n(6),o=n(138),a=[].slice,s={},c=function(e,t,n){if(!(t in s)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";s[t]=Function("F,a","return new F("+r.join(",")+")")}return s[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=a.call(arguments,1),s=function(){var r=n.concat(a.call(arguments));return this instanceof s?c(t,r.length,r):o(t,r,e)};return i(t.prototype)&&(s.prototype=t.prototype),s}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(3).parseInt,i=n(54).trim,o=n(94),a=/^[-+]?0[xX]/;e.exports=8!==r(o+"08")||22!==r(o+"0x16")?function(e,t){var n=i(String(e),3);return r(n,t>>>0||(a.test(n)?16:10))}:r},function(e,t,n){var r=n(3).parseFloat,i=n(54).trim;e.exports=1/r(n(94)+"-0")!=-1/0?function(e){var t=i(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){var r=n(32);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){var r=n(6),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){"use strict";var r=n(46),i=n(41),o=n(53),a={};n(20)(a,n(8)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){var r=n(5);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r=n(299);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(26),i=n(16),o=n(62),a=n(10);e.exports=function(e,t,n,s,c){r(t);var u=i(e),f=o(u),l=a(u.length),d=c?l-1:0,h=c?-1:1;if(n<2)for(;;){if(d in f){s=f[d],d+=h;break}if(d+=h,c?d<0:l<=d)throw TypeError("Reduce of empty array with no initial value")}for(;c?d>=0:l>d;d+=h)d in f&&(s=t(s,f[d],d,u));return s}},function(e,t,n){"use strict";var r=n(16),i=n(45),o=n(10);e.exports=[].copyWithin||function(e,t){var n=r(this),a=o(n.length),s=i(e,a),c=i(t,a),u=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===u?a:i(u,a))-c,a-s),l=1;for(c<s&&s<c+f&&(l=-1,c+=f-1,s+=f-1);f-- >0;)c in n?n[s]=n[c]:delete n[s],s+=l,c+=l;return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var r=n(109);n(0)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(e,t,n){n(13)&&"g"!=/./g.flags&&n(14).f(RegExp.prototype,"flags",{configurable:!0,get:n(77)})},function(e,t,n){"use strict";var r,i,o,a,s=n(43),c=n(3),u=n(25),f=n(64),l=n(0),d=n(6),h=n(26),p=n(57),m=n(80),g=n(65),b=n(111).set,v=n(319)(),y=n(153),w=n(320),_=n(81),S=n(154),k=c.TypeError,E=c.process,x=E&&E.versions,M=x&&x.v8||"",I=c.Promise,C="process"==f(E),R=function(){},P=i=y.f,O=!!function(){try{var e=I.resolve(1),t=(e.constructor={})[n(8)("species")]=function(e){e(R,R)};return(C||"function"==typeof PromiseRejectionEvent)&&e.then(R)instanceof t&&0!==M.indexOf("6.6")&&-1===_.indexOf("Chrome/66")}catch(e){}}(),j=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},A=function(e,t){if(!e._n){e._n=!0;var n=e._c;v(function(){for(var r=e._v,i=1==e._s,o=0,a=function(t){var n,o,a,s=i?t.ok:t.fail,c=t.resolve,u=t.reject,f=t.domain;try{s?(i||(2==e._h&&F(e),e._h=1),!0===s?n=r:(f&&f.enter(),n=s(r),f&&(f.exit(),a=!0)),n===t.promise?u(k("Promise-chain cycle")):(o=j(n))?o.call(n,c,u):c(n)):u(r)}catch(e){f&&!a&&f.exit(),u(e)}};n.length>o;)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&T(e)})}},T=function(e){b.call(c,function(){var t,n,r,i=e._v,o=N(e);if(o&&(t=w(function(){C?E.emit("unhandledRejection",i,e):(n=c.onunhandledrejection)?n({promise:e,reason:i}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",i)}),e._h=C||N(e)?2:1),e._a=void 0,o&&t.e)throw t.v})},N=function(e){return 1!==e._h&&0===(e._a||e._c).length},F=function(e){b.call(c,function(){var t;C?E.emit("rejectionHandled",e):(t=c.onrejectionhandled)&&t({promise:e,reason:e._v})})},D=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),A(t,!0))},L=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw k("Promise can't be resolved itself");(t=j(e))?v(function(){var r={_w:n,_d:!1};try{t.call(e,u(L,r,1),u(D,r,1))}catch(e){D.call(r,e)}}):(n._v=e,n._s=1,A(n,!1))}catch(e){D.call({_w:n,_d:!1},e)}}};O||(I=function(e){p(this,I,"Promise","_h"),h(e),r.call(this);try{e(u(L,this,1),u(D,this,1))}catch(e){D.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(58)(I.prototype,{then:function(e,t){var n=P(g(this,I));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=C?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&A(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r;this.promise=e,this.resolve=u(L,e,1),this.reject=u(D,e,1)},y.f=P=function(e){return e===I||e===a?new o(e):i(e)}),l(l.G+l.W+l.F*!O,{Promise:I}),n(53)(I,"Promise"),n(56)("Promise"),a=n(11).Promise,l(l.S+l.F*!O,"Promise",{reject:function(e){var t=P(this);return(0,t.reject)(e),t.promise}}),l(l.S+l.F*(s||!O),"Promise",{resolve:function(e){return S(s&&this===a?I:this,e)}}),l(l.S+l.F*!(O&&n(76)(function(e){I.all(e).catch(R)})),"Promise",{all:function(e){var t=this,n=P(t),r=n.resolve,i=n.reject,o=w(function(){var n=[],o=0,a=1;m(e,!1,function(e){var s=o++,c=!1;n.push(void 0),a++,t.resolve(e).then(function(e){c||(c=!0,n[s]=e,--a||r(n))},i)}),--a||r(n)});return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=P(t),r=n.reject,i=w(function(){m(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(e,t,n){"use strict";var r=n(26);function i(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new i(e)}},function(e,t,n){var r=n(5),i=n(6),o=n(153);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(14).f,i=n(46),o=n(58),a=n(25),s=n(57),c=n(80),u=n(100),f=n(149),l=n(56),d=n(13),h=n(37).fastKey,p=n(50),m=d?"_s":"size",g=function(e,t){var n,r=h(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,u){var f=e(function(e,r){s(e,f,t,"_i"),e._t=t,e._i=i(null),e._f=void 0,e._l=void 0,e[m]=0,null!=r&&c(r,n,e[u],e)});return o(f.prototype,{clear:function(){for(var e=p(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var n=p(this,t),r=g(n,e);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[m]--}return!!r},forEach:function(e){p(this,t);for(var n,r=a(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!g(p(this,t),e)}}),d&&r(f.prototype,"size",{get:function(){return p(this,t)[m]}}),f},def:function(e,t,n){var r,i,o=g(e,t);return o?o.v=n:(e._l=o={i:i=h(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o),r&&(r.n=o),e[m]++,"F"!==i&&(e._i[i]=o)),e},getEntry:g,setStrong:function(e,t,n){u(e,t,function(e,n){this._t=p(e,t),this._k=n,this._l=void 0},function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?f(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,f(1))},n?"entries":"values",!n,!0),l(t)}}},function(e,t,n){"use strict";var r=n(58),i=n(37).getWeak,o=n(5),a=n(6),s=n(57),c=n(80),u=n(30),f=n(19),l=n(50),d=u(5),h=u(6),p=0,m=function(e){return e._l||(e._l=new g)},g=function(){this.a=[]},b=function(e,t){return d(e.a,function(e){return e[0]===t})};g.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=h(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,o){var u=e(function(e,r){s(e,u,t,"_i"),e._t=t,e._i=p++,e._l=void 0,null!=r&&c(r,n,e[o],e)});return r(u.prototype,{delete:function(e){if(!a(e))return!1;var n=i(e);return!0===n?m(l(this,t)).delete(e):n&&f(n,this._i)&&delete n[this._i]},has:function(e){if(!a(e))return!1;var n=i(e);return!0===n?m(l(this,t)).has(e):n&&f(n,this._i)}}),u},def:function(e,t,n){var r=i(o(t),!0);return!0===r?m(e).set(t,n):r[e._i]=n,e},ufstore:m}},function(e,t,n){var r=n(27),i=n(10);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw RangeError("Wrong length!");return n}},function(e,t,n){var r=n(47),i=n(74),o=n(5),a=n(3).Reflect;e.exports=a&&a.ownKeys||function(e){var t=r.f(o(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(10),i=n(96),o=n(33);e.exports=function(e,t,n,a){var s=String(o(e)),c=s.length,u=void 0===n?" ":String(n),f=r(t);if(f<=c||""==u)return s;var l=f-c,d=i.call(u,Math.ceil(l/u.length));return d.length>l&&(d=d.slice(0,l)),a?d+s:s+d}},function(e,t,n){var r=n(13),i=n(44),o=n(21),a=n(63).f;e.exports=function(e){return function(t){for(var n,s=o(t),c=i(s),u=c.length,f=0,l=[];u>f;)n=c[f++],r&&!a.call(s,n)||l.push(e?[n,s[n]]:s[n]);return l}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUniqueHash=void 0;var r=n(162);t.generateUniqueHash=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,t=r.createHash("sha256");return t.update(""+(new Date).valueOf()+Math.random()),t.digest("hex").substring(0,e)}},function(e,t,n){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=n(59),t.createHash=t.Hash=n(66),t.createHmac=t.Hmac=n(169);var r=n(398),i=Object.keys(r),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var a=n(172);t.pbkdf2=a.pbkdf2,t.pbkdf2Sync=a.pbkdf2Sync;var s=n(400);t.Cipher=s.Cipher,t.createCipher=s.createCipher,t.Cipheriv=s.Cipheriv,t.createCipheriv=s.createCipheriv,t.Decipher=s.Decipher,t.createDecipher=s.createDecipher,t.Decipheriv=s.Decipheriv,t.createDecipheriv=s.createDecipheriv,t.getCiphers=s.getCiphers,t.listCiphers=s.listCiphers;var c=n(417);t.DiffieHellmanGroup=c.DiffieHellmanGroup,t.createDiffieHellmanGroup=c.createDiffieHellmanGroup,t.getDiffieHellman=c.getDiffieHellman,t.createDiffieHellman=c.createDiffieHellman,t.DiffieHellman=c.DiffieHellman;var u=n(422);t.createSign=u.createSign,t.Sign=u.Sign,t.createVerify=u.createVerify,t.Verify=u.Verify,t.createECDH=n(456);var f=n(457);t.publicEncrypt=f.publicEncrypt,t.privateEncrypt=f.privateEncrypt,t.publicDecrypt=f.publicDecrypt,t.privateDecrypt=f.privateDecrypt;var l=n(460);t.randomFill=l.randomFill,t.randomFillSync=l.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(t){var r=n(60).Transform;function i(e){r.call(this),this._block=new t(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(1)(i,r),i.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(e){r=e}n(r)},i.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},i.prototype.update=function(e,n){if(!t.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");t.isBuffer(e)||(e=new t(e,n));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)r[this._blockOffset++]=e[i++];for(var a=0,s=8*e.length;s>0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},i.prototype._update=function(e){throw new Error("_update is not implemented")},i.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();return void 0!==e&&(t=t.toString(e)),t},i.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=i}).call(this,n(9).Buffer)},function(e,t,n){"use strict";(function(t){e.exports=p;var r=n(114),i=n(163),o=n(9).Buffer;p.ReadableState=h;n(15);var a,s=function(e,t){return e.listeners(t).length};!function(){try{a=n(60)}catch(e){}finally{a||(a=n(15).EventEmitter)}}();o=n(9).Buffer;var c=n(67);c.inherits=n(1);var u,f,l=n(384),d=void 0;function h(e,t){f=f||n(51),e=e||{},this.objectMode=!!e.objectMode,t instanceof f&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.buffer=[],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.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(u||(u=n(116).StringDecoder),this.decoder=new u(e.encoding),this.encoding=e.encoding)}function p(e){if(f=f||n(51),!(this instanceof p))return new p(e);this._readableState=new h(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),a.call(this)}function m(e,t,n,i,a){var s=function(e,t){var n=null;o.isBuffer(t)||"string"==typeof t||null==t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));return n}(t,n);if(s)e.emit("error",s);else if(null===n)t.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,v(e)}(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!a){var c=new Error("stream.push() after EOF");e.emit("error",c)}else if(t.endEmitted&&a){c=new Error("stream.unshift() after end event");e.emit("error",c)}else{var u;!t.decoder||a||i||(n=t.decoder.write(n),u=!t.objectMode&&0===n.length),a||(t.reading=!1),u||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,a?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&v(e))),function(e,t){t.readingMore||(t.readingMore=!0,r(w,e,t))}(e,t)}else a||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}d=l&&l.debuglog?l.debuglog("stream"):function(){},c.inherits(p,a),p.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding)!==n.encoding&&(e=new o(e,t),t=""),m(this,n,e,t,!1)},p.prototype.unshift=function(e){return m(this,this._readableState,e,"",!0)},p.prototype.isPaused=function(){return!1===this._readableState.flowing},p.prototype.setEncoding=function(e){return u||(u=n(116).StringDecoder),this._readableState.decoder=new u(e),this._readableState.encoding=e,this};var g=8388608;function b(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:null===e||isNaN(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=g?e=g:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function v(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?r(y,e):y(e))}function y(e){d("emit readable"),e.emit("readable"),k(e)}function w(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(d("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function _(e){d("readable nexttick read 0"),e.read(0)}function S(e,t){t.reading||(d("resume read 0"),e.read(0)),t.resumeScheduled=!1,e.emit("resume"),k(e),t.flowing&&!t.reading&&e.read(0)}function k(e){var t=e._readableState;if(d("flow",t.flowing),t.flowing)do{var n=e.read()}while(null!==n&&t.flowing)}function E(e,t){var n,r=t.buffer,i=t.length,a=!!t.decoder,s=!!t.objectMode;if(0===r.length)return null;if(0===i)n=null;else if(s)n=r.shift();else if(!e||e>=i)n=a?r.join(""):1===r.length?r[0]:o.concat(r,i),r.length=0;else{if(e<r[0].length)n=(l=r[0]).slice(0,e),r[0]=l.slice(e);else if(e===r[0].length)n=r.shift();else{n=a?"":new o(e);for(var c=0,u=0,f=r.length;u<f&&c<e;u++){var l=r[0],d=Math.min(e-c,l.length);a?n+=l.slice(0,d):l.copy(n,c,0,d),d<l.length?r[0]=l.slice(d):r.shift(),c+=d}}}return n}function x(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,r(M,t,e))}function M(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}p.prototype.read=function(e){d("read",e);var t=this._readableState,n=e;if(("number"!=typeof e||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?x(this):v(this),null;if(0===(e=b(e,t))&&t.ended)return 0===t.length&&x(this),null;var r,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",i=!0),(t.ended||t.reading)&&d("reading or ended",i=!1),i&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),i&&!t.reading&&(e=b(n,t)),null===(r=e>0?E(e,t):null)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),n!==e&&t.ended&&0===t.length&&x(this),null!==r&&this.emit("data",r),r},p.prototype._read=function(e){this.emit("error",new Error("not implemented"))},p.prototype.pipe=function(e,n){var o=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,d("pipe count=%d opts=%j",a.pipesCount,n);var c=(!n||!1!==n.end)&&e!==t.stdout&&e!==t.stderr?f:p;function u(e){d("onunpipe"),e===o&&p()}function f(){d("onend"),e.end()}a.endEmitted?r(c):o.once("end",c),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,k(e))}}(o);e.on("drain",l);var h=!1;function p(){d("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",l),e.removeListener("error",g),e.removeListener("unpipe",u),o.removeListener("end",f),o.removeListener("end",p),o.removeListener("data",m),h=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||l()}function m(t){d("ondata"),!1===e.write(t)&&(1!==a.pipesCount||a.pipes[0]!==e||1!==o.listenerCount("data")||h||(d("false write response, pause",o._readableState.awaitDrain),o._readableState.awaitDrain++),o.pause())}function g(t){d("onerror",t),y(),e.removeListener("error",g),0===s(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),y()}function v(){d("onfinish"),e.removeListener("close",b),y()}function y(){d("unpipe"),o.unpipe(e)}return o.on("data",m),e._events&&e._events.error?i(e._events.error)?e._events.error.unshift(g):e._events.error=[g,e._events.error]:e.on("error",g),e.once("close",b),e.once("finish",v),e.emit("pipe",o),a.flowing||(d("pipe resume"),o.resume()),e},p.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var o=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}(t.pipes,e);return-1===o?this:(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},p.prototype.on=function(e,t){var n=a.prototype.on.call(this,e,t);if("data"===e&&!1!==this._readableState.flowing&&this.resume(),"readable"===e&&!this._readableState.endEmitted){var i=this._readableState;i.readableListening||(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading?i.length&&v(this):r(_,this))}return n},p.prototype.addListener=p.prototype.on,p.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r(S,e,t))}(this,e)),this},p.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},p.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;for(var i in e.on("end",function(){if(d("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),e.on("data",function(i){(d("wrapped data"),t.decoder&&(i=t.decoder.write(i)),t.objectMode&&null==i)||(t.objectMode||i&&i.length)&&(r.push(i)||(n=!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));return function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}(["error","close","destroy","pause","resume"],function(t){e.on(t,r.emit.bind(r,t))}),r._read=function(t){d("wrapped _read",t),n&&(n=!1,e.resume())},r},p._fromList=E}).call(this,n(35))},function(e,t,n){"use strict";e.exports=o;var r=n(117),i=n(67);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n(1),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){var r=n(1),i=n(61),o=n(2).Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(e,t,n){return n^e&(t^n)}function f(e,t,n){return e&t|n&(e|t)}function l(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(c,i),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,b=0;b<16;++b)n[b]=e.readInt32BE(4*b);for(;b<64;++b)n[b]=0|(((t=n[b-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[b-7]+h(n[b-15])+n[b-16];for(var v=0;v<64;++v){var y=g+d(c)+u(c,p,m)+a[v]+n[v]|0,w=l(r)+f(r,i,o)|0;g=m,m=p,p=c,c=s+y|0,s=o,o=i,i=r,r=y+w|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},c.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=c},function(e,t,n){var r=n(1),i=n(61),o=n(2).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function c(){this.init(),this._w=s,i.call(this,128,112)}function u(e,t,n){return n^e&(t^n)}function f(e,t,n){return e&t|n&(e|t)}function l(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function b(e,t){return e>>>0<t>>>0?1:0}r(c,i),c.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},c.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,c=0|this._fh,v=0|this._gh,y=0|this._hh,w=0|this._al,_=0|this._bl,S=0|this._cl,k=0|this._dl,E=0|this._el,x=0|this._fl,M=0|this._gl,I=0|this._hl,C=0;C<32;C+=2)t[C]=e.readInt32BE(4*C),t[C+1]=e.readInt32BE(4*C+4);for(;C<160;C+=2){var R=t[C-30],P=t[C-30+1],O=h(R,P),j=p(P,R),A=m(R=t[C-4],P=t[C-4+1]),T=g(P,R),N=t[C-14],F=t[C-14+1],D=t[C-32],L=t[C-32+1],W=j+F|0,q=O+N+b(W,j)|0;q=(q=q+A+b(W=W+T|0,T)|0)+D+b(W=W+L|0,L)|0,t[C]=q,t[C+1]=W}for(var B=0;B<160;B+=2){q=t[B],W=t[B+1];var H=f(n,r,i),U=f(w,_,S),V=l(n,w),G=l(w,n),z=d(s,E),X=d(E,s),Y=a[B],K=a[B+1],J=u(s,c,v),$=u(E,x,M),Z=I+X|0,Q=y+z+b(Z,I)|0;Q=(Q=(Q=Q+J+b(Z=Z+$|0,$)|0)+Y+b(Z=Z+K|0,K)|0)+q+b(Z=Z+W|0,W)|0;var ee=G+U|0,te=V+H+b(ee,G)|0;y=v,I=M,v=c,M=x,c=s,x=E,s=o+Q+b(E=k+Z|0,k)|0,o=i,k=S,i=r,S=_,r=n,_=w,n=Q+te+b(w=Z+ee|0,Z)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+S|0,this._dl=this._dl+k|0,this._el=this._el+E|0,this._fl=this._fl+x|0,this._gl=this._gl+M|0,this._hl=this._hl+I|0,this._ah=this._ah+n+b(this._al,w)|0,this._bh=this._bh+r+b(this._bl,_)|0,this._ch=this._ch+i+b(this._cl,S)|0,this._dh=this._dh+o+b(this._dl,k)|0,this._eh=this._eh+s+b(this._el,E)|0,this._fh=this._fh+c+b(this._fl,x)|0,this._gh=this._gh+v+b(this._gl,M)|0,this._hh=this._hh+y+b(this._hl,I)|0},c.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=c},function(e,t,n){"use strict";var r=n(1),i=n(397),o=n(39),a=n(2).Buffer,s=n(170),c=n(118),u=n(119),f=a.alloc(128);function l(e,t){o.call(this,"digest"),"string"==typeof t&&(t=a.from(t));var n="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>n)?t=("rmd160"===e?new c:u(e)).update(t).digest():t.length<n&&(t=a.concat([t,f],n));for(var r=this._ipad=a.allocUnsafe(n),i=this._opad=a.allocUnsafe(n),s=0;s<n;s++)r[s]=54^t[s],i[s]=92^t[s];this._hash="rmd160"===e?new c:u(e),this._hash.update(r)}r(l,o),l.prototype._update=function(e){this._hash.update(e)},l.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new c:u(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new l("rmd160",t):"md5"===e?new i(s,t):new l(e,t)}},function(e,t,n){var r=n(113);e.exports=function(e){return(new r).update(e).digest()}},function(e){e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},function(e,t,n){t.pbkdf2=n(399),t.pbkdf2Sync=n(175)},function(e,t,n){(function(t){var n=Math.pow(2,30)-1;function r(e,n){if("string"!=typeof e&&!t.isBuffer(e))throw new TypeError(n+" must be a buffer or string")}e.exports=function(e,t,i,o){if(r(e,"Password"),r(t,"Salt"),"number"!=typeof i)throw new TypeError("Iterations not a number");if(i<0)throw new TypeError("Bad iterations");if("number"!=typeof o)throw new TypeError("Key length not a number");if(o<0||o>n||o!=o)throw new TypeError("Bad key length")}}).call(this,n(9).Buffer)},function(e,t,n){(function(t){var n;t.browser?n="utf-8":n=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";e.exports=n}).call(this,n(35))},function(e,t,n){var r=n(170),i=n(118),o=n(119),a=n(173),s=n(174),c=n(2).Buffer,u=c.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(e,t,n){var a=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?r:function(t){return o(e).update(t).digest()}}(e),s="sha512"===e||"sha384"===e?128:64;t.length>s?t=a(t):t.length<s&&(t=c.concat([t,u],s));for(var l=c.allocUnsafe(s+f[e]),d=c.allocUnsafe(s+f[e]),h=0;h<s;h++)l[h]=54^t[h],d[h]=92^t[h];var p=c.allocUnsafe(s+n+4);l.copy(p,0,0,s),this.ipad1=p,this.ipad2=l,this.opad=d,this.alg=e,this.blocksize=s,this.hash=a,this.size=f[e]}l.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=function(e,t,n,r,i){a(e,t,n,r),c.isBuffer(e)||(e=c.from(e,s)),c.isBuffer(t)||(t=c.from(t,s));var o=new l(i=i||"sha1",e,t.length),u=c.allocUnsafe(r),d=c.allocUnsafe(t.length+4);t.copy(d,0,0,t.length);for(var h=0,p=f[i],m=Math.ceil(r/p),g=1;g<=m;g++){d.writeUInt32BE(g,t.length);for(var b=o.run(d,o.ipad1),v=b,y=1;y<n;y++){v=o.run(v,o.ipad2);for(var w=0;w<p;w++)b[w]^=v[w]}b.copy(u,h),h+=p}return u}},function(e,t,n){var r=n(68),i=n(2).Buffer,o=n(177);function a(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var n=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*n)]);for(var s=0;s<n;s++){var c=a(e),u=o+16*s;e._cache.writeUInt32BE(c[0],u+0),e._cache.writeUInt32BE(c[1],u+4),e._cache.writeUInt32BE(c[2],u+8),e._cache.writeUInt32BE(c[3],u+12)}var f=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),r(t,f)}},function(e,t){e.exports=function(e){for(var t,n=e.length;n--;){if(255!==(t=e.readUInt8(n))){t++,e.writeUInt8(t,n);break}e.writeUInt8(0,n)}}},function(e){e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},function(e,t,n){var r=n(84),i=n(2).Buffer,o=n(39),a=n(1),s=n(414),c=n(68),u=n(177);function f(e,t,n,a){o.call(this);var c=i.alloc(4,0);this._cipher=new r.AES(t);var f=this._cipher.encryptBlock(c);this._ghash=new s(f),n=function(e,t,n){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var r=new s(n),o=t.length,a=o%16;r.update(t),a&&(a=16-a,r.update(i.alloc(a,0))),r.update(i.alloc(8,0));var c=8*o,f=i.alloc(8);f.writeUIntBE(c,0,8),r.update(f),e._finID=r.state;var l=i.from(e._finID);return u(l),l}(this,n,f),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(f,o),f.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var n=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(n),this._len+=e.length,n},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var n=0;e.length!==t.length&&n++;for(var r=Math.min(e.length,t.length),i=0;i<r;++i)n+=e[i]^t[i];return n}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},f.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},f.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},f.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=f},function(e,t,n){var r=n(84),i=n(2).Buffer,o=n(39);function a(e,t,n,a){o.call(this),this._cipher=new r.AES(t),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._mode=e}n(1)(a,o),a.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},e.exports=a},function(e,t,n){var r=n(59);e.exports=v,v.simpleSieve=g,v.fermatTest=b;var i=n(12),o=new i(24),a=new(n(183)),s=new i(1),c=new i(2),u=new i(5),f=(new i(16),new i(8),new i(10)),l=new i(3),d=(new i(7),new i(11)),h=new i(4),p=(new i(12),null);function m(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,n=3;n<1048576;n+=2){for(var r=Math.ceil(Math.sqrt(n)),i=0;i<t&&e[i]<=r&&n%e[i]!=0;i++);t!==i&&e[i]<=r||(e[t++]=n)}return p=e,e}function g(e){for(var t=m(),n=0;n<t.length;n++)if(0===e.modn(t[n]))return 0===e.cmpn(t[n]);return!0}function b(e){var t=i.mont(e);return 0===c.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function v(e,t){if(e<16)return new i(2===t||5===t?[140,123]:[140,39]);var n,p;for(t=new i(t);;){for(n=new i(r(Math.ceil(e/8)));n.bitLength()>e;)n.ishrn(1);if(n.isEven()&&n.iadd(s),n.testn(1)||n.iadd(c),t.cmp(c)){if(!t.cmp(u))for(;n.mod(f).cmp(l);)n.iadd(h)}else for(;n.mod(o).cmp(d);)n.iadd(h);if(g(p=n.shrn(1))&&g(n)&&b(p)&&b(n)&&a.test(p)&&a.test(n))return n}}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(12),i=n(123);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),n=Math.ceil(t/8);do{var i=new r(this.rand.generate(n))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},o.prototype.test=function(e,t,n){var i=e.bitLength(),o=r.mont(e),a=new r(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),c=0;!s.testn(c);c++);for(var u=e.shrn(c),f=s.toRed(o);t>0;t--){var l=this._randrange(new r(2),s);n&&n(l);var d=l.toRed(o).redPow(u);if(0!==d.cmp(a)&&0!==d.cmp(f)){for(var h=1;h<c;h++){if(0===(d=d.redSqr()).cmp(a))return!1;if(0===d.cmp(f))break}if(h===c)return!1}}return!0},o.prototype.getDivisor=function(e,t){var n=e.bitLength(),i=r.mont(e),o=new r(1).toRed(i);t||(t=Math.max(1,n/48|0));for(var a=e.subn(1),s=0;!a.testn(s);s++);for(var c=e.shrn(s),u=a.toRed(i);t>0;t--){var f=this._randrange(new r(2),a),l=e.gcd(f);if(0!==l.cmpn(1))return l;var d=f.toRed(i).redPow(c);if(0!==d.cmp(o)&&0!==d.cmp(u)){for(var h=1;h<s;h++){if(0===(d=d.redSqr()).cmp(o))return d.fromRed().subn(1).gcd(e);if(0===d.cmp(u))break}if(h===s)return(d=d.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},function(e,t,n){"use strict";var r=t;function i(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",n=0;n<e.length;n++)t+=i(e[n].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16))}else for(r=0;r<e.length;r++){var i=e.charCodeAt(r),o=i>>8,a=255&i;o?n.push(o,a):n.push(a)}return n},r.zero2=i,r.toHex=o,r.encode=function(e,t){return"hex"===t?o(e):e}},function(e,t,n){"use strict";var r=t;r.base=n(86),r.short=n(425),r.mont=n(426),r.edwards=n(427)},function(e,t,n){"use strict";var r=n(31).rotr32;function i(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function a(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?i(t,n,r):1===e||3===e?a(t,n,r):2===e?o(t,n,r):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},function(e,t,n){"use strict";var r=n(31),i=n(69),o=n(186),a=n(22),s=r.sum32,c=r.sum32_4,u=r.sum32_5,f=o.ch32,l=o.maj32,d=o.s0_256,h=o.s1_256,p=o.g0_256,m=o.g1_256,g=i.BlockHash,b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}r.inherits(v,g),e.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=c(m(n[r-2]),n[r-7],p(n[r-15]),n[r-16]);var i=this.h[0],o=this.h[1],g=this.h[2],b=this.h[3],v=this.h[4],y=this.h[5],w=this.h[6],_=this.h[7];for(a(this.k.length===n.length),r=0;r<n.length;r++){var S=u(_,h(v),f(v,y,w),this.k[r],n[r]),k=s(d(i),l(i,o,g));_=w,w=y,y=v,v=s(b,S),b=g,g=o,o=i,i=s(S,k)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],g),this.h[3]=s(this.h[3],b),this.h[4]=s(this.h[4],v),this.h[5]=s(this.h[5],y),this.h[6]=s(this.h[6],w),this.h[7]=s(this.h[7],_)},v.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){"use strict";var r=n(31),i=n(69),o=n(22),a=r.rotr64_hi,s=r.rotr64_lo,c=r.shr64_hi,u=r.shr64_lo,f=r.sum64,l=r.sum64_hi,d=r.sum64_lo,h=r.sum64_4_hi,p=r.sum64_4_lo,m=r.sum64_5_hi,g=r.sum64_5_lo,b=i.BlockHash,v=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function y(){if(!(this instanceof y))return new y;b.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=v,this.W=new Array(160)}function w(e,t,n,r,i){var o=e&n^~e&i;return o<0&&(o+=4294967296),o}function _(e,t,n,r,i,o){var a=t&r^~t&o;return a<0&&(a+=4294967296),a}function S(e,t,n,r,i){var o=e&n^e&i^n&i;return o<0&&(o+=4294967296),o}function k(e,t,n,r,i,o){var a=t&r^t&o^r&o;return a<0&&(a+=4294967296),a}function E(e,t){var n=a(e,t,28)^a(t,e,2)^a(t,e,7);return n<0&&(n+=4294967296),n}function x(e,t){var n=s(e,t,28)^s(t,e,2)^s(t,e,7);return n<0&&(n+=4294967296),n}function M(e,t){var n=a(e,t,14)^a(e,t,18)^a(t,e,9);return n<0&&(n+=4294967296),n}function I(e,t){var n=s(e,t,14)^s(e,t,18)^s(t,e,9);return n<0&&(n+=4294967296),n}function C(e,t){var n=a(e,t,1)^a(e,t,8)^c(e,t,7);return n<0&&(n+=4294967296),n}function R(e,t){var n=s(e,t,1)^s(e,t,8)^u(e,t,7);return n<0&&(n+=4294967296),n}function P(e,t){var n=a(e,t,19)^a(t,e,29)^c(e,t,6);return n<0&&(n+=4294967296),n}function O(e,t){var n=s(e,t,19)^s(t,e,29)^u(e,t,6);return n<0&&(n+=4294967296),n}r.inherits(y,b),e.exports=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var i=P(n[r-4],n[r-3]),o=O(n[r-4],n[r-3]),a=n[r-14],s=n[r-13],c=C(n[r-30],n[r-29]),u=R(n[r-30],n[r-29]),f=n[r-32],l=n[r-31];n[r]=h(i,o,a,s,c,u,f,l),n[r+1]=p(i,o,a,s,c,u,f,l)}},y.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,r=this.h[0],i=this.h[1],a=this.h[2],s=this.h[3],c=this.h[4],u=this.h[5],h=this.h[6],p=this.h[7],b=this.h[8],v=this.h[9],y=this.h[10],C=this.h[11],R=this.h[12],P=this.h[13],O=this.h[14],j=this.h[15];o(this.k.length===n.length);for(var A=0;A<n.length;A+=2){var T=O,N=j,F=M(b,v),D=I(b,v),L=w(b,v,y,C,R),W=_(b,v,y,C,R,P),q=this.k[A],B=this.k[A+1],H=n[A],U=n[A+1],V=m(T,N,F,D,L,W,q,B,H,U),G=g(T,N,F,D,L,W,q,B,H,U);T=E(r,i),N=x(r,i),F=S(r,i,a,s,c),D=k(r,i,a,s,c,u);var z=l(T,N,F,D),X=d(T,N,F,D);O=R,j=P,R=y,P=C,y=b,C=v,b=l(h,p,V,G),v=d(p,p,V,G),h=c,p=u,c=a,u=s,a=r,s=i,r=l(V,G,z,X),i=d(V,G,z,X)}f(this.h,0,r,i),f(this.h,2,a,s),f(this.h,4,c,u),f(this.h,6,h,p),f(this.h,8,b,v),f(this.h,10,y,C),f(this.h,12,R,P),f(this.h,14,O,j)},y.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){var r=n(1),i=n(71).Reporter,o=n(9).Buffer;function a(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof s||(e=new s(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}r(a,i),t.DecoderBuffer=a,a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(e){var t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var n=new a(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=s,s.prototype.join=function(e,t){return e||(e=new o(this.length)),t||(t=0),0===this.length?e:(Array.isArray(this.value)?this.value.forEach(function(n){n.join(e,t),t+=n.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},function(e,t,n){var r=t;r._reverse=function(e){var t={};return Object.keys(e).forEach(function(n){(0|n)==n&&(n|=0);var r=e[n];t[r]=n}),t},r.der=n(447)},function(e,t,n){var r=n(1),i=n(70),o=i.base,a=i.bignum,s=i.constants.der;function c(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){o.Node.call(this,"der",e)}function f(e,t){var n=e.readUInt8(t);if(e.isError(n))return n;var r=s.tagClass[n>>6],i=0==(32&n);if(31==(31&n)){var o=n;for(n=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;n<<=7,n|=127&o}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:s.tag[n]}}function l(e,t,n){var r=e.readUInt8(n);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;var i=127&r;if(i>4)return e.error("length octect is too long");r=0;for(var o=0;o<i;o++){r<<=8;var a=e.readUInt8(n);if(e.isError(a))return a;r|=a}return r}e.exports=c,c.prototype.decode=function(e,t){return e instanceof o.DecoderBuffer||(e=new o.DecoderBuffer(e,t)),this.tree._decode(e,t)},r(u,o.Node),u.prototype._peekTag=function(e,t,n){if(e.isEmpty())return!1;var r=e.save(),i=f(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(r),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||n)},u.prototype._decodeTag=function(e,t,n){var r=f(e,'Failed to decode tag of "'+t+'"');if(e.isError(r))return r;var i=l(e,r.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!n&&r.tag!==t&&r.tagStr!==t&&r.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(r.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');var o=e.save(),a=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(a)?a:(i=e.offset-o.offset,e.restore(o),e.skip(i,'Failed to match body of: "'+t+'"'))},u.prototype._skipUntilEnd=function(e,t){for(;;){var n=f(e,t);if(e.isError(n))return n;var r,i=l(e,n.primitive,t);if(e.isError(i))return i;if(r=n.primitive||null!==i?e.skip(i):this._skipUntilEnd(e,t),e.isError(r))return r;if("end"===n.tagStr)break}},u.prototype._decodeList=function(e,t,n,r){for(var i=[];!e.isEmpty();){var o=this._peekTag(e,"end");if(e.isError(o))return o;var a=n.decode(e,"der",r);if(e.isError(a)&&o)break;i.push(a)}return i},u.prototype._decodeStr=function(e,t){if("bitstr"===t){var n=e.readUInt8();return e.isError(n)?n:{unused:n,data:e.raw()}}if("bmpstr"===t){var r=e.raw();if(r.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");for(var i="",o=0;o<r.length/2;o++)i+=String.fromCharCode(r.readUInt16BE(2*o));return i}if("numstr"===t){var a=e.raw().toString("ascii");return this._isNumstr(a)?a:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){var s=e.raw().toString("ascii");return this._isPrintstr(s)?s:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},u.prototype._decodeObjid=function(e,t,n){for(var r,i=[],o=0;!e.isEmpty();){var a=e.readUInt8();o<<=7,o|=127&a,0==(128&a)&&(i.push(o),o=0)}128&a&&i.push(o);var s=i[0]/40|0,c=i[0]%40;if(r=n?i:[s,c].concat(i.slice(1)),t){var u=t[r.join(" ")];void 0===u&&(u=t[r.join(".")]),void 0!==u&&(r=u)}return r},u.prototype._decodeTime=function(e,t){var n=e.raw().toString();if("gentime"===t)var r=0|n.slice(0,4),i=0|n.slice(4,6),o=0|n.slice(6,8),a=0|n.slice(8,10),s=0|n.slice(10,12),c=0|n.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");r=0|n.slice(0,2),i=0|n.slice(2,4),o=0|n.slice(4,6),a=0|n.slice(6,8),s=0|n.slice(8,10),c=0|n.slice(10,12);r=r<70?2e3+r:1900+r}return Date.UTC(r,i-1,o,a,s,c,0)},u.prototype._decodeNull=function(e){return null},u.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},u.prototype._decodeInt=function(e,t){var n=e.raw(),r=new a(n);return t&&(r=t[r.toString(10)]||r),r},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},function(e,t,n){var r=n(1),i=n(9).Buffer,o=n(70),a=o.base,s=o.constants.der;function c(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){a.Node.call(this,"der",e)}function f(e){return e<10?"0"+e:e}e.exports=c,c.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},r(u,a.Node),u.prototype._encodeComposite=function(e,t,n,r){var o,a=function(e,t,n,r){var i;"seqof"===e?e="seq":"setof"===e&&(e="set");if(s.tagByName.hasOwnProperty(e))i=s.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);i=e}if(i>=31)return r.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=s.tagClassByName[n||"universal"]<<6}(e,t,n,this.reporter);if(r.length<128)return(o=new i(2))[0]=a,o[1]=r.length,this._createEncoderBuffer([o,r]);for(var c=1,u=r.length;u>=256;u>>=8)c++;(o=new i(2+c))[0]=a,o[1]=128|c;u=1+c;for(var f=r.length;f>0;u--,f>>=8)o[u]=255&f;return this._createEncoderBuffer([o,r])},u.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var n=new i(2*e.length),r=0;r<e.length;r++)n.writeUInt16BE(e.charCodeAt(r),2*r);return this._createEncoderBuffer(n)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)?this._createEncoderBuffer(e):"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},u.prototype._encodeObjid=function(e,t,n){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var r=0;r<e.length;r++)e[r]|=0}else if(Array.isArray(e)){e=e.slice();for(r=0;r<e.length;r++)e[r]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!n){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var o=0;for(r=0;r<e.length;r++){var a=e[r];for(o++;a>=128;a>>=7)o++}var s=new i(o),c=s.length-1;for(r=e.length-1;r>=0;r--){a=e[r];for(s[c--]=127&a;(a>>=7)>0;)s[c--]=128|127&a}return this._createEncoderBuffer(s)},u.prototype._encodeTime=function(e,t){var n,r=new Date(e);return"gentime"===t?n=[f(r.getFullYear()),f(r.getUTCMonth()+1),f(r.getUTCDate()),f(r.getUTCHours()),f(r.getUTCMinutes()),f(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[f(r.getFullYear()%100),f(r.getUTCMonth()+1),f(r.getUTCDate()),f(r.getUTCHours()),f(r.getUTCMinutes()),f(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var n=e.toArray();!e.sign&&128&n[0]&&n.unshift(0),e=new i(n)}if(i.isBuffer(e)){var r=e.length;0===e.length&&r++;var o=new i(r);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);r=1;for(var a=e;a>=256;a>>=8)r++;for(a=(o=new Array(r)).length-1;a>=0;a--)o[a]=255&e,e>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},u.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},u.prototype._skipDefault=function(e,t,n){var r,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,n).join()),o.length!==i.defaultBuffer.length)return!1;for(r=0;r<o.length;r++)if(o[r]!==i.defaultBuffer[r])return!1;return!0}},function(e){e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},function(e,t,n){var r=n(66),i=n(2).Buffer;function o(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var n,a=i.alloc(0),s=0;a.length<t;)n=o(s++),a=i.concat([a,r("sha1").update(e).update(n).digest()]);return a.slice(0,t)}},function(e,t){e.exports=function(e,t){for(var n=e.length,r=-1;++r<n;)e[r]^=t[r];return e}},function(e,t,n){var r=n(12),i=n(2).Buffer;e.exports=function(e,t){return i.from(e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed().toArray())}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.setDebugConfig=t.getDebugConfig=t.debug=t.createDebugMethod=void 0;var o=n(462),a=n(465),s={serialize:!1,logDuration:!1};function c(e){if(s.logDuration){var t=(new Date).getTime()-e.getTime();return" (".concat(t,"ms)")}}t.createDebugMethod=function(e){return function(t,n,r,o){var u=(0,a.generateUniqueHash)(10),f=new Date;e.apply(void 0,i(["invoking ".concat(r," <").concat(u,">")],function(e){return e.map(function(e){return"object"==typeof e&&null!==e&&s.serialize?JSON.stringify(e):e})}(o),!1));try{var l=t.apply(n,o);return l instanceof Promise?l.then(function(t){return e("success ".concat(r," <").concat(u,">").concat(c(f)),t),t}).catch(function(t){throw e("fail ".concat(r," <").concat(u,">").concat(c(f)),t),t}):(e("success ".concat(r," <").concat(u,">").concat(c(f)),l),l)}catch(t){throw e("fail ".concat(r," <").concat(u,">").concat(c(f)),t),t}}},t.debug=function(e,n){void 0===n&&(n=o);var r=(0,t.createDebugMethod)(n(e));return function(e,t,n){var i=n.value;n.value=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return r(i,this,"".concat(this.constructor.name,":").concat(t),e)}}},t.getDebugConfig=function(){return s},t.setDebugConfig=function(e){s=r(r({},s),e)}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){var t="function"==typeof Map?new Map:void 0;return(o=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return a(e,arguments,c(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),s(r,e)})(e)}function a(e,t,n){return(a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&s(i,n.prototype),i}).apply(null,arguments)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0});var u=n(199),f=function(e){function t(e){var n,r=e.message,o=e.code,a=e.suggestion,s=e.pathToDocs,f=e.type;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=i(this,c(t).call(this,r))).name=f||"SosError",n.code=o,n.suggestion=a,n.pathToDocs=s,n.stack=u.getEnrichedStack({type:n.name,message:r,code:o,stackTrace:n.stack,suggestion:a,pathToDocs:s}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(t,o(Error)),t}();t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnrichedStack=t.createError=void 0;var r="Stack trace is not available for this type of error.";function i(e){var t=e.type,n=e.message,i=e.code,o=e.stackTrace,a=e.pathToDocs,s=e.origin,c=e.originStack,u="";return u+=t+": "+n+"\n",u+="Code: "+i+"\n",u+="Suggestion: "+function(e,t,n){var r;r=n?"".concat("https://docs.signageos.io").concat(n):"".concat("https://docs.signageos.io","/search?key=error%20").concat(e);var i=t?t+"\n":"";return i+="".concat("More information on"," ").concat(r)}(i,e.suggestion,a)+"\n",u+=s?"Origin: "+s+"\n":"",u+=c?"OriginStack: "+c+"\n":s&&!c?"OriginStack: "+r+"\n":"",u+=o?"Stack: "+o:"Stack: "+r}t.createError=function(e){var t=e.message,n=new Error(t);return n.stack=i(e),n.name=e.type,Object.keys(e).forEach(function(t){n[t]=e[t]}),n},t.getEnrichedStack=i},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(52),c=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,o(t).call(this,Object.assign(Object.assign({},e),{pathToDocs:t.PATH_TO_DOCS,kind:"appletError",type:e.type?e.type:"AppletResourcesError"})))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,s["default"]),t}();t.default=c,c.PATH_TO_DOCS="/api/js/js-applet-resources"},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,n){if(isNaN(t))throw Error("Coordination ".concat(e,'="').concat(n,'" is not valid number'));r(t)!==r(n)?console.warn("Coordination ".concat(e,'="').concat(n,'" is not a typeof number but is typeof ').concat(r(n),". ")+'Was automatically casted as "'.concat(t,'"')):t!==n&&console.warn("Coordination ".concat(e,'="').concat(n,'" is not an integer but is float. Was automatically floored to "').concat(t,'"'))}Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeCoordinations=void 0,t.sanitizeCoordinations=function(e){var t,n,r,o;return i("x",t=void 0===e.x||null===e.x?0:"number"!=typeof e.x?parseInt(e.x):Math.floor(e.x),e.x),i("y",n=void 0===e.y||null===e.y?0:"number"!=typeof e.y?parseInt(e.y):Math.floor(e.y),e.y),i("width",r=void 0===e.width||null===e.width?0:"number"!=typeof e.width?parseInt(e.width):Math.floor(e.width),e.width),i("height",o=void 0===e.height||null===e.height?0:"number"!=typeof e.height?parseInt(e.height):Math.floor(e.height),e.height),{x:t,y:n,width:r,height:o}}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.window=t,this.name="javascript"}var t,n,i;return t=e,(n=[{key:"load",value:function(e,t){var n=this;return new Promise(function(r,i){var o=n.window.document.createElement("script");o.setAttribute("type","text/javascript"),o.setAttribute("src",e),o.onerror=function(){i(new Error('File "'+e+'" cannot be loaded'))},o.onload=function(){console.info("File "+e.substring(0,100)+" was loaded"),r()},t.appendChild(o)})}}])&&r(t.prototype,n),i&&r(t,i),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseUpgradeArguments=void 0;var r=n(508);function i(e){return!!r.parse(e).hostname}t.parseUpgradeArguments=function(e,t){var n,r,o;if(i(e)&&t&&!i(t))n=e,r=t;else if(!i(e)&&t&&i(t))n=t,r=e;else if(i(e)&&!t)o=e;else{if(i(e)||t)throw new Error("Invalid arguments. See JSDoc for details");r=e}return{baseUrl:n,version:r,directUri:o}}},function(e,t,n){n(205),e.exports=n(378)},function(e,t,n){n(206)},function(e,t,n){"use strict";n(207),n(350),n(352),n(355),n(357),n(359),n(361),n(363),n(365),n(367),n(369),n(371),n(373),n(377)},function(e,t,n){n(208),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(289),n(290),n(292),n(293),n(294),n(295),n(296),n(297),n(298),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(108),n(313),n(150),n(314),n(151),n(315),n(316),n(317),n(318),n(152),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),n(335),n(336),n(337),n(338),n(339),n(340),n(341),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),e.exports=n(11)},function(e,t,n){"use strict";var r=n(3),i=n(19),o=n(13),a=n(0),s=n(17),c=n(37).KEY,u=n(4),f=n(72),l=n(53),d=n(42),h=n(8),p=n(89),m=n(131),g=n(210),b=n(75),v=n(5),y=n(6),w=n(16),_=n(21),S=n(36),k=n(41),E=n(46),x=n(134),M=n(28),I=n(74),C=n(14),R=n(44),P=M.f,O=C.f,j=x.f,A=r.Symbol,T=r.JSON,N=T&&T.stringify,F=h("_hidden"),D=h("toPrimitive"),L={}.propertyIsEnumerable,W=f("symbol-registry"),q=f("symbols"),B=f("op-symbols"),H=Object.prototype,U="function"==typeof A&&!!I.f,V=r.QObject,G=!V||!V.prototype||!V.prototype.findChild,z=o&&u(function(){return 7!=E(O({},"a",{get:function(){return O(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=P(H,t);r&&delete H[t],O(e,t,n),r&&e!==H&&O(H,t,r)}:O,X=function(e){var t=q[e]=E(A.prototype);return t._k=e,t},Y=U&&"symbol"==typeof A.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof A},K=function(e,t,n){return e===H&&K(B,t,n),v(e),t=S(t,!0),v(n),i(q,t)?(n.enumerable?(i(e,F)&&e[F][t]&&(e[F][t]=!1),n=E(n,{enumerable:k(0,!1)})):(i(e,F)||O(e,F,k(1,{})),e[F][t]=!0),z(e,t,n)):O(e,t,n)},J=function(e,t){v(e);for(var n,r=g(t=_(t)),i=0,o=r.length;o>i;)K(e,n=r[i++],t[n]);return e},$=function(e){var t=L.call(this,e=S(e,!0));return!(this===H&&i(q,e)&&!i(B,e))&&(!(t||!i(this,e)||!i(q,e)||i(this,F)&&this[F][e])||t)},Z=function(e,t){if(e=_(e),t=S(t,!0),e!==H||!i(q,t)||i(B,t)){var n=P(e,t);return!n||!i(q,t)||i(e,F)&&e[F][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=j(_(e)),r=[],o=0;n.length>o;)i(q,t=n[o++])||t==F||t==c||r.push(t);return r},ee=function(e){for(var t,n=e===H,r=j(n?B:_(e)),o=[],a=0;r.length>a;)!i(q,t=r[a++])||n&&!i(H,t)||o.push(q[t]);return o};U||(s((A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(n){this===H&&t.call(B,n),i(this,F)&&i(this[F],e)&&(this[F][e]=!1),z(this,e,k(1,n))};return o&&G&&z(H,e,{configurable:!0,set:t}),X(e)}).prototype,"toString",function(){return this._k}),M.f=Z,C.f=K,n(47).f=x.f=Q,n(63).f=$,I.f=ee,o&&!n(43)&&s(H,"propertyIsEnumerable",$,!0),p.f=function(e){return X(h(e))}),a(a.G+a.W+a.F*!U,{Symbol:A});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)h(te[ne++]);for(var re=R(h.store),ie=0;re.length>ie;)m(re[ie++]);a(a.S+a.F*!U,"Symbol",{for:function(e){return i(W,e+="")?W[e]:W[e]=A(e)},keyFor:function(e){if(!Y(e))throw TypeError(e+" is not a symbol!");for(var t in W)if(W[t]===e)return t},useSetter:function(){G=!0},useSimple:function(){G=!1}}),a(a.S+a.F*!U,"Object",{create:function(e,t){return void 0===t?E(e):J(E(e),t)},defineProperty:K,defineProperties:J,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:ee});var oe=u(function(){I.f(1)});a(a.S+a.F*oe,"Object",{getOwnPropertySymbols:function(e){return I.f(w(e))}}),T&&a(a.S+a.F*(!U||u(function(){var e=A();return"[null]"!=N([e])||"{}"!=N({a:e})||"{}"!=N(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(y(t)||void 0!==e)&&!Y(e))return b(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!Y(t))return t}),r[1]=t,N.apply(T,r)}}),A.prototype[D]||n(20)(A.prototype,D,A.prototype.valueOf),l(A,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(e,t,n){e.exports=n(72)("native-function-to-string",Function.toString)},function(e,t,n){var r=n(44),i=n(74),o=n(63);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var a,s=n(e),c=o.f,u=0;s.length>u;)c.call(e,a=s[u++])&&t.push(a);return t}},function(e,t,n){var r=n(0);r(r.S,"Object",{create:n(46)})},function(e,t,n){var r=n(0);r(r.S+r.F*!n(13),"Object",{defineProperty:n(14).f})},function(e,t,n){var r=n(0);r(r.S+r.F*!n(13),"Object",{defineProperties:n(133)})},function(e,t,n){var r=n(21),i=n(28).f;n(29)("getOwnPropertyDescriptor",function(){return function(e,t){return i(r(e),t)}})},function(e,t,n){var r=n(16),i=n(48);n(29)("getPrototypeOf",function(){return function(e){return i(r(e))}})},function(e,t,n){var r=n(16),i=n(44);n(29)("keys",function(){return function(e){return i(r(e))}})},function(e,t,n){n(29)("getOwnPropertyNames",function(){return n(134).f})},function(e,t,n){var r=n(6),i=n(37).onFreeze;n(29)("freeze",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(6),i=n(37).onFreeze;n(29)("seal",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(6),i=n(37).onFreeze;n(29)("preventExtensions",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(6);n(29)("isFrozen",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(6);n(29)("isSealed",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(6);n(29)("isExtensible",function(e){return function(t){return!!r(t)&&(!e||e(t))}})},function(e,t,n){var r=n(0);r(r.S+r.F,"Object",{assign:n(135)})},function(e,t,n){var r=n(0);r(r.S,"Object",{is:n(136)})},function(e,t,n){var r=n(0);r(r.S,"Object",{setPrototypeOf:n(93).set})},function(e,t,n){"use strict";var r=n(64),i={};i[n(8)("toStringTag")]="z",i+""!="[object z]"&&n(17)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(e,t,n){var r=n(0);r(r.P,"Function",{bind:n(137)})},function(e,t,n){var r=n(14).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||n(13)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(6),i=n(48),o=n(8)("hasInstance"),a=Function.prototype;o in a||n(14).f(a,o,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(0),i=n(139);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(e,t,n){var r=n(0),i=n(140);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(e,t,n){"use strict";var r=n(3),i=n(19),o=n(32),a=n(95),s=n(36),c=n(4),u=n(47).f,f=n(28).f,l=n(14).f,d=n(54).trim,h=r.Number,p=h,m=h.prototype,g="Number"==o(n(46)(m)),b="trim"in String.prototype,v=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){var n,r,i,o=(t=b?t.trim():d(t,3)).charCodeAt(0);if(43===o||45===o){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(t.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+t}for(var a,c=t.slice(2),u=0,f=c.length;u<f;u++)if((a=c.charCodeAt(u))<48||a>i)return NaN;return parseInt(c,r)}}return+t};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof h&&(g?c(function(){m.valueOf.call(n)}):"Number"!=o(n))?a(new p(v(t)),n,h):v(t)};for(var y,w=n(13)?u(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),_=0;w.length>_;_++)i(p,y=w[_])&&!i(h,y)&&l(h,y,f(p,y));h.prototype=m,m.constructor=h,n(17)(r,"Number",h)}},function(e,t,n){"use strict";var r=n(0),i=n(27),o=n(141),a=n(96),s=1..toFixed,c=Math.floor,u=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",l=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*u[n],u[n]=r%1e7,r=c(r/1e7)},d=function(e){for(var t=6,n=0;--t>=0;)n+=u[t],u[t]=c(n/e),n=n%e*1e7},h=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==u[e]){var n=String(u[e]);t=""===t?n:t+a.call("0",7-n.length)+n}return t},p=function(e,t,n){return 0===t?n:t%2==1?p(e,t-1,n*e):p(e*e,t/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(4)(function(){s.call({})})),"Number",{toFixed:function(e){var t,n,r,s,c=o(this,f),u=i(e),m="",g="0";if(u<0||u>20)throw RangeError(f);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(m="-",c=-c),c>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(c*p(2,69,1))-69)<0?c*p(2,-t,1):c/p(2,t,1),n*=4503599627370496,(t=52-t)>0){for(l(0,n),r=u;r>=7;)l(1e7,0),r-=7;for(l(p(10,r,1),0),r=t-1;r>=23;)d(1<<23),r-=23;d(1<<r),l(1,1),d(2),g=h()}else l(0,n),l(1<<-t,0),g=h()+a.call("0",u);return g=u>0?m+((s=g.length)<=u?"0."+a.call("0",u-s)+g:g.slice(0,s-u)+"."+g.slice(s-u)):m+g}})},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n(141),a=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==a.call(1,void 0)})||!i(function(){a.call({})})),"Number",{toPrecision:function(e){var t=o(this,"Number#toPrecision: incorrect invocation!");return void 0===e?a.call(t):a.call(t,e)}})},function(e,t,n){var r=n(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(0),i=n(3).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},function(e,t,n){var r=n(0);r(r.S,"Number",{isInteger:n(142)})},function(e,t,n){var r=n(0);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(0),i=n(142),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return i(e)&&o(e)<=9007199254740991}})},function(e,t,n){var r=n(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(0),i=n(140);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(e,t,n){var r=n(0),i=n(139);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(e,t,n){var r=n(0),i=n(143),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+o(e-1)*o(e+1))}})},function(e,t,n){var r=n(0),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},function(e,t,n){var r=n(0),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(0),i=n(97);r(r.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var r=n(0);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(0),i=Math.exp;r(r.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},function(e,t,n){var r=n(0),i=n(98);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(e,t,n){var r=n(0);r(r.S,"Math",{fround:n(253)})},function(e,t,n){var r=n(97),i=Math.pow,o=i(2,-52),a=i(2,-23),s=i(2,127)*(2-a),c=i(2,-126);e.exports=Math.fround||function(e){var t,n,i=Math.abs(e),u=r(e);return i<c?u*(i/c/a+1/o-1/o)*c*a:(n=(t=(1+a/o)*i)-(t-i))>s||n!=n?u*(1/0):u*n}},function(e,t,n){var r=n(0),i=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,o=0,a=0,s=arguments.length,c=0;a<s;)c<(n=i(arguments[a++]))?(o=o*(r=c/n)*r+1,c=n):o+=n>0?(r=n/c)*r:n;return c===1/0?1/0:c*Math.sqrt(o)}})},function(e,t,n){var r=n(0),i=Math.imul;r(r.S+r.F*n(4)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(e,t){var n=+e,r=+t,i=65535&n,o=65535&r;return 0|i*o+((65535&n>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},function(e,t,n){var r=n(0);r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var r=n(0);r(r.S,"Math",{log1p:n(143)})},function(e,t,n){var r=n(0);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(0);r(r.S,"Math",{sign:n(97)})},function(e,t,n){var r=n(0),i=n(98),o=Math.exp;r(r.S+r.F*n(4)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(o(e-1)-o(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(0),i=n(98),o=Math.exp;r(r.S,"Math",{tanh:function(e){var t=i(e=+e),n=i(-e);return t==1/0?1:n==1/0?-1:(t-n)/(o(e)+o(-e))}})},function(e,t,n){var r=n(0);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(0),i=n(45),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(0),i=n(21),o=n(10);r(r.S,"String",{raw:function(e){for(var t=i(e.raw),n=o(t.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},function(e,t,n){"use strict";n(54)("trim",function(e){return function(){return e(this,3)}})},function(e,t,n){"use strict";var r=n(99)(!0);n(100)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){"use strict";var r=n(0),i=n(99)(!1);r(r.P,"String",{codePointAt:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(0),i=n(10),o=n(101),a="".endsWith;r(r.P+r.F*n(103)("endsWith"),"String",{endsWith:function(e){var t=o(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=i(t.length),s=void 0===n?r:Math.min(i(n),r),c=String(e);return a?a.call(t,c,s):t.slice(s-c.length,s)===c}})},function(e,t,n){"use strict";var r=n(0),i=n(101);r(r.P+r.F*n(103)("includes"),"String",{includes:function(e){return!!~i(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(0);r(r.P,"String",{repeat:n(96)})},function(e,t,n){"use strict";var r=n(0),i=n(10),o=n(101),a="".startsWith;r(r.P+r.F*n(103)("startsWith"),"String",{startsWith:function(e){var t=o(this,e,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return a?a.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(18)("anchor",function(e){return function(t){return e(this,"a","name",t)}})},function(e,t,n){"use strict";n(18)("big",function(e){return function(){return e(this,"big","","")}})},function(e,t,n){"use strict";n(18)("blink",function(e){return function(){return e(this,"blink","","")}})},function(e,t,n){"use strict";n(18)("bold",function(e){return function(){return e(this,"b","","")}})},function(e,t,n){"use strict";n(18)("fixed",function(e){return function(){return e(this,"tt","","")}})},function(e,t,n){"use strict";n(18)("fontcolor",function(e){return function(t){return e(this,"font","color",t)}})},function(e,t,n){"use strict";n(18)("fontsize",function(e){return function(t){return e(this,"font","size",t)}})},function(e,t,n){"use strict";n(18)("italics",function(e){return function(){return e(this,"i","","")}})},function(e,t,n){"use strict";n(18)("link",function(e){return function(t){return e(this,"a","href",t)}})},function(e,t,n){"use strict";n(18)("small",function(e){return function(){return e(this,"small","","")}})},function(e,t,n){"use strict";n(18)("strike",function(e){return function(){return e(this,"strike","","")}})},function(e,t,n){"use strict";n(18)("sub",function(e){return function(){return e(this,"sub","","")}})},function(e,t,n){"use strict";n(18)("sup",function(e){return function(){return e(this,"sup","","")}})},function(e,t,n){var r=n(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(0),i=n(16),o=n(36);r(r.P+r.F*n(4)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(e){var t=i(this),n=o(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var r=n(0),i=n(288);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(e,t,n){"use strict";var r=n(4),i=Date.prototype.getTime,o=Date.prototype.toISOString,a=function(e){return e>9?e:"0"+e};e.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))})||!r(function(){o.call(new Date(NaN))})?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+a(e.getUTCMonth()+1)+"-"+a(e.getUTCDate())+"T"+a(e.getUTCHours())+":"+a(e.getUTCMinutes())+":"+a(e.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:o},function(e,t,n){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(17)(r,"toString",function(){var e=o.call(this);return e==e?i.call(this):"Invalid Date"})},function(e,t,n){var r=n(8)("toPrimitive"),i=Date.prototype;r in i||n(20)(i,r,n(291))},function(e,t,n){"use strict";var r=n(5),i=n(36);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return i(r(this),"number"!=e)}},function(e,t,n){var r=n(0);r(r.S,"Array",{isArray:n(75)})},function(e,t,n){"use strict";var r=n(25),i=n(0),o=n(16),a=n(145),s=n(104),c=n(10),u=n(105),f=n(106);i(i.S+i.F*!n(76)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,i,l,d=o(e),h="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,g=void 0!==m,b=0,v=f(d);if(g&&(m=r(m,p>2?arguments[2]:void 0,2)),null==v||h==Array&&s(v))for(n=new h(t=c(d.length));t>b;b++)u(n,b,g?m(d[b],b):d[b]);else for(l=v.call(d),n=new h;!(i=l.next()).done;b++)u(n,b,g?a(l,m,[i.value,b],!0):i.value);return n.length=b,n}})},function(e,t,n){"use strict";var r=n(0),i=n(105);r(r.S+r.F*n(4)(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(0),i=n(21),o=[].join;r(r.P+r.F*(n(62)!=Object||!n(24)(o)),"Array",{join:function(e){return o.call(i(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var r=n(0),i=n(92),o=n(32),a=n(45),s=n(10),c=[].slice;r(r.P+r.F*n(4)(function(){i&&c.call(i)}),"Array",{slice:function(e,t){var n=s(this.length),r=o(this);if(t=void 0===t?n:t,"Array"==r)return c.call(this,e,t);for(var i=a(e,n),u=a(t,n),f=s(u-i),l=new Array(f),d=0;d<f;d++)l[d]="String"==r?this.charAt(i+d):this[i+d];return l}})},function(e,t,n){"use strict";var r=n(0),i=n(26),o=n(16),a=n(4),s=[].sort,c=[1,2,3];r(r.P+r.F*(a(function(){c.sort(void 0)})||!a(function(){c.sort(null)})||!n(24)(s)),"Array",{sort:function(e){return void 0===e?s.call(o(this)):s.call(o(this),i(e))}})},function(e,t,n){"use strict";var r=n(0),i=n(30)(0),o=n(24)([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(e){return i(this,e,arguments[1])}})},function(e,t,n){var r=n(6),i=n(75),o=n(8)("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&null===(t=t[o])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){"use strict";var r=n(0),i=n(30)(1);r(r.P+r.F*!n(24)([].map,!0),"Array",{map:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),i=n(30)(2);r(r.P+r.F*!n(24)([].filter,!0),"Array",{filter:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),i=n(30)(3);r(r.P+r.F*!n(24)([].some,!0),"Array",{some:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),i=n(30)(4);r(r.P+r.F*!n(24)([].every,!0),"Array",{every:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),i=n(147);r(r.P+r.F*!n(24)([].reduce,!0),"Array",{reduce:function(e){return i(this,e,arguments.length,arguments[1],!1)}})},function(e,t,n){"use strict";var r=n(0),i=n(147);r(r.P+r.F*!n(24)([].reduceRight,!0),"Array",{reduceRight:function(e){return i(this,e,arguments.length,arguments[1],!0)}})},function(e,t,n){"use strict";var r=n(0),i=n(73)(!1),o=[].indexOf,a=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(24)(o)),"Array",{indexOf:function(e){return a?o.apply(this,arguments)||0:i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),i=n(21),o=n(27),a=n(10),s=[].lastIndexOf,c=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(c||!n(24)(s)),"Array",{lastIndexOf:function(e){if(c)return s.apply(this,arguments)||0;var t=i(this),n=a(t.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(0);r(r.P,"Array",{copyWithin:n(148)}),n(49)("copyWithin")},function(e,t,n){var r=n(0);r(r.P,"Array",{fill:n(107)}),n(49)("fill")},function(e,t,n){"use strict";var r=n(0),i=n(30)(5),o=!0;"find"in[]&&Array(1).find(function(){o=!1}),r(r.P+r.F*o,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(49)("find")},function(e,t,n){"use strict";var r=n(0),i=n(30)(6),o="findIndex",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(49)(o)},function(e,t,n){n(56)("Array")},function(e,t,n){var r=n(3),i=n(95),o=n(14).f,a=n(47).f,s=n(102),c=n(77),u=r.RegExp,f=u,l=u.prototype,d=/a/g,h=/a/g,p=new u(d)!==d;if(n(13)&&(!p||n(4)(function(){return h[n(8)("match")]=!1,u(d)!=d||u(h)==h||"/a/i"!=u(d,"i")}))){u=function(e,t){var n=this instanceof u,r=s(e),o=void 0===t;return!n&&r&&e.constructor===u&&o?e:i(p?new f(r&&!o?e.source:e,t):f((r=e instanceof u)?e.source:e,r&&o?c.call(e):t),n?this:l,u)};for(var m=function(e){e in u||o(u,e,{configurable:!0,get:function(){return f[e]},set:function(t){f[e]=t}})},g=a(f),b=0;g.length>b;)m(g[b++]);l.constructor=u,u.prototype=l,n(17)(r,"RegExp",u)}n(56)("RegExp")},function(e,t,n){"use strict";n(151);var r=n(5),i=n(77),o=n(13),a=/./.toString,s=function(e){n(17)(RegExp.prototype,"toString",e,!0)};n(4)(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?s(function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)}):"toString"!=a.name&&s(function(){return a.call(this)})},function(e,t,n){"use strict";var r=n(5),i=n(10),o=n(110),a=n(78);n(79)("match",1,function(e,t,n,s){return[function(n){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=s(n,e,this);if(t.done)return t.value;var c=r(e),u=String(this);if(!c.global)return a(c,u);var f=c.unicode;c.lastIndex=0;for(var l,d=[],h=0;null!==(l=a(c,u));){var p=String(l[0]);d[h]=p,""===p&&(c.lastIndex=o(u,i(c.lastIndex),f)),h++}return 0===h?null:d}]})},function(e,t,n){"use strict";var r=n(5),i=n(16),o=n(10),a=n(27),s=n(110),c=n(78),u=Math.max,f=Math.min,l=Math.floor,d=/\$([$&`']|\d\d?|<[^>]*>)/g,h=/\$([$&`']|\d\d?)/g;n(79)("replace",2,function(e,t,n,p){return[function(r,i){var o=e(this),a=null==r?void 0:r[t];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},function(e,t){var i=p(n,e,this,t);if(i.done)return i.value;var l=r(e),d=String(this),h="function"==typeof t;h||(t=String(t));var g=l.global;if(g){var b=l.unicode;l.lastIndex=0}for(var v=[];;){var y=c(l,d);if(null===y)break;if(v.push(y),!g)break;""===String(y[0])&&(l.lastIndex=s(d,o(l.lastIndex),b))}for(var w,_="",S=0,k=0;k<v.length;k++){y=v[k];for(var E=String(y[0]),x=u(f(a(y.index),d.length),0),M=[],I=1;I<y.length;I++)M.push(void 0===(w=y[I])?w:String(w));var C=y.groups;if(h){var R=[E].concat(M,x,d);void 0!==C&&R.push(C);var P=String(t.apply(void 0,R))}else P=m(E,d,x,M,C,t);x>=S&&(_+=d.slice(S,x)+P,S=x+E.length)}return _+d.slice(S)}];function m(e,t,r,o,a,s){var c=r+e.length,u=o.length,f=h;return void 0!==a&&(a=i(a),f=d),n.call(s,f,function(n,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(c);case"<":s=a[i.slice(1,-1)];break;default:var f=+i;if(0===f)return n;if(f>u){var d=l(f/10);return 0===d?n:d<=u?void 0===o[d-1]?i.charAt(1):o[d-1]+i.charAt(1):n}s=o[f-1]}return void 0===s?"":s})}})},function(e,t,n){"use strict";var r=n(5),i=n(136),o=n(78);n(79)("search",1,function(e,t,n,a){return[function(n){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=a(n,e,this);if(t.done)return t.value;var s=r(e),c=String(this),u=s.lastIndex;i(u,0)||(s.lastIndex=0);var f=o(s,c);return i(s.lastIndex,u)||(s.lastIndex=u),null===f?-1:f.index}]})},function(e,t,n){"use strict";var r=n(102),i=n(5),o=n(65),a=n(110),s=n(10),c=n(78),u=n(109),f=n(4),l=Math.min,d=[].push,h=!f(function(){RegExp(4294967295,"y")});n(79)("split",2,function(e,t,n,f){var p;return p="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,t){var i=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(i,e,t);for(var o,a,s,c=[],f=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,h=void 0===t?4294967295:t>>>0,p=new RegExp(e.source,f+"g");(o=u.call(p,i))&&!((a=p.lastIndex)>l&&(c.push(i.slice(l,o.index)),o.length>1&&o.index<i.length&&d.apply(c,o.slice(1)),s=o[0].length,l=a,c.length>=h));)p.lastIndex===o.index&&p.lastIndex++;return l===i.length?!s&&p.test("")||c.push(""):c.push(i.slice(l)),c.length>h?c.slice(0,h):c}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var i=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i,r):p.call(String(i),n,r)},function(e,t){var r=f(p,e,this,t,p!==n);if(r.done)return r.value;var u=i(e),d=String(this),m=o(u,RegExp),g=u.unicode,b=(u.ignoreCase?"i":"")+(u.multiline?"m":"")+(u.unicode?"u":"")+(h?"y":"g"),v=new m(h?u:"^(?:"+u.source+")",b),y=void 0===t?4294967295:t>>>0;if(0===y)return[];if(0===d.length)return null===c(v,d)?[d]:[];for(var w=0,_=0,S=[];_<d.length;){v.lastIndex=h?_:0;var k,E=c(v,h?d:d.slice(_));if(null===E||(k=l(s(v.lastIndex+(h?0:_)),d.length))===w)_=a(d,_,g);else{if(S.push(d.slice(w,_)),S.length===y)return S;for(var x=1;x<=E.length-1;x++)if(S.push(E[x]),S.length===y)return S;_=w=k}}return S.push(d.slice(w)),S}]})},function(e,t,n){var r=n(3),i=n(111).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==n(32)(a);e.exports=function(){var e,t,n,u=function(){var r,i;for(c&&(r=a.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(u)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var f=s.resolve(void 0);n=function(){f.then(u)}}else n=function(){i.call(r,u)};else{var l=!0,d=document.createTextNode("");new o(u).observe(d,{characterData:!0}),n=function(){d.data=l=!l}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){"use strict";var r=n(155),i=n(50);e.exports=n(82)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(i(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(i(this,"Map"),0===e?0:e,t)}},r,!0)},function(e,t,n){"use strict";var r=n(155),i=n(50);e.exports=n(82)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(i(this,"Set"),e=0===e?0:e,e)}},r)},function(e,t,n){"use strict";var r,i=n(3),o=n(30)(0),a=n(17),s=n(37),c=n(135),u=n(156),f=n(6),l=n(50),d=n(50),h=!i.ActiveXObject&&"ActiveXObject"in i,p=s.getWeak,m=Object.isExtensible,g=u.ufstore,b=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},v={get:function(e){if(f(e)){var t=p(e);return!0===t?g(l(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(l(this,"WeakMap"),e,t)}},y=e.exports=n(82)("WeakMap",b,v,u,!0,!0);d&&h&&(c((r=u.getConstructor(b,"WeakMap")).prototype,v),s.NEED=!0,o(["delete","has","get","set"],function(e){var t=y.prototype,n=t[e];a(t,e,function(t,i){if(f(t)&&!m(t)){this._f||(this._f=new r);var o=this._f[e](t,i);return"set"==e?this:o}return n.call(this,t,i)})}))},function(e,t,n){"use strict";var r=n(156),i=n(50);n(82)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(i(this,"WeakSet"),e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(0),i=n(83),o=n(112),a=n(5),s=n(45),c=n(10),u=n(6),f=n(3).ArrayBuffer,l=n(65),d=o.ArrayBuffer,h=o.DataView,p=i.ABV&&f.isView,m=d.prototype.slice,g=i.VIEW;r(r.G+r.W+r.F*(f!==d),{ArrayBuffer:d}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(e){return p&&p(e)||u(e)&&g in e}}),r(r.P+r.U+r.F*n(4)(function(){return!new d(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(e,t){if(void 0!==m&&void 0===t)return m.call(a(this),e);for(var n=a(this).byteLength,r=s(e,n),i=s(void 0===t?n:t,n),o=new(l(this,d))(c(i-r)),u=new h(this),f=new h(o),p=0;r<i;)f.setUint8(p++,u.getUint8(r++));return o}}),n(56)("ArrayBuffer")},function(e,t,n){var r=n(0);r(r.G+r.W+r.F*!n(83).ABV,{DataView:n(112).DataView})},function(e,t,n){n(34)("Int8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(34)("Uint8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(34)("Uint8",1,function(e){return function(t,n,r){return e(this,t,n,r)}},!0)},function(e,t,n){n(34)("Int16",2,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(34)("Uint16",2,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(34)("Int32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(34)("Uint32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(34)("Float32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(34)("Float64",8,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){var r=n(0),i=n(26),o=n(5),a=(n(3).Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!n(4)(function(){a(function(){})}),"Reflect",{apply:function(e,t,n){var r=i(e),c=o(n);return a?a(r,t,c):s.call(r,t,c)}})},function(e,t,n){var r=n(0),i=n(46),o=n(26),a=n(5),s=n(6),c=n(4),u=n(137),f=(n(3).Reflect||{}).construct,l=c(function(){function e(){}return!(f(function(){},[],e)instanceof e)}),d=!c(function(){f(function(){})});r(r.S+r.F*(l||d),"Reflect",{construct:function(e,t){o(e),a(t);var n=arguments.length<3?e:o(arguments[2]);if(d&&!l)return f(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(u.apply(e,r))}var c=n.prototype,h=i(s(c)?c:Object.prototype),p=Function.apply.call(e,h,t);return s(p)?p:h}})},function(e,t,n){var r=n(14),i=n(0),o=n(5),a=n(36);i(i.S+i.F*n(4)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(e,t,n){o(e),t=a(t,!0),o(n);try{return r.f(e,t,n),!0}catch(e){return!1}}})},function(e,t,n){var r=n(0),i=n(28).f,o=n(5);r(r.S,"Reflect",{deleteProperty:function(e,t){var n=i(o(e),t);return!(n&&!n.configurable)&&delete e[t]}})},function(e,t,n){"use strict";var r=n(0),i=n(5),o=function(e){this._t=i(e),this._i=0;var t,n=this._k=[];for(t in e)n.push(t)};n(144)(o,"Object",function(){var e,t=this._k;do{if(this._i>=t.length)return{value:void 0,done:!0}}while(!((e=t[this._i++])in this._t));return{value:e,done:!1}}),r(r.S,"Reflect",{enumerate:function(e){return new o(e)}})},function(e,t,n){var r=n(28),i=n(48),o=n(19),a=n(0),s=n(6),c=n(5);a(a.S,"Reflect",{get:function e(t,n){var a,u,f=arguments.length<3?t:arguments[2];return c(t)===f?t[n]:(a=r.f(t,n))?o(a,"value")?a.value:void 0!==a.get?a.get.call(f):void 0:s(u=i(t))?e(u,n,f):void 0}})},function(e,t,n){var r=n(28),i=n(0),o=n(5);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(o(e),t)}})},function(e,t,n){var r=n(0),i=n(48),o=n(5);r(r.S,"Reflect",{getPrototypeOf:function(e){return i(o(e))}})},function(e,t,n){var r=n(0);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(0),i=n(5),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return i(e),!o||o(e)}})},function(e,t,n){var r=n(0);r(r.S,"Reflect",{ownKeys:n(158)})},function(e,t,n){var r=n(0),i=n(5),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){i(e);try{return o&&o(e),!0}catch(e){return!1}}})},function(e,t,n){var r=n(14),i=n(28),o=n(48),a=n(19),s=n(0),c=n(41),u=n(5),f=n(6);s(s.S,"Reflect",{set:function e(t,n,s){var l,d,h=arguments.length<4?t:arguments[3],p=i.f(u(t),n);if(!p){if(f(d=o(t)))return e(d,n,s,h);p=c(0)}if(a(p,"value")){if(!1===p.writable||!f(h))return!1;if(l=i.f(h,n)){if(l.get||l.set||!1===l.writable)return!1;l.value=s,r.f(h,n,l)}else r.f(h,n,c(0,s));return!0}return void 0!==p.set&&(p.set.call(h,s),!0)}})},function(e,t,n){var r=n(0),i=n(93);i&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){i.check(e,t);try{return i.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){n(351),e.exports=n(11).Array.includes},function(e,t,n){"use strict";var r=n(0),i=n(73)(!0);r(r.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(49)("includes")},function(e,t,n){n(353),e.exports=n(11).Array.flatMap},function(e,t,n){"use strict";var r=n(0),i=n(354),o=n(16),a=n(10),s=n(26),c=n(146);r(r.P,"Array",{flatMap:function(e){var t,n,r=o(this);return s(e),t=a(r.length),n=c(r,0),i(n,r,r,t,0,1,e,arguments[1]),n}}),n(49)("flatMap")},function(e,t,n){"use strict";var r=n(75),i=n(6),o=n(10),a=n(25),s=n(8)("isConcatSpreadable");e.exports=function e(t,n,c,u,f,l,d,h){for(var p,m,g=f,b=0,v=!!d&&a(d,h,3);b<u;){if(b in c){if(p=v?v(c[b],b,n):c[b],m=!1,i(p)&&(m=void 0!==(m=p[s])?!!m:r(p)),m&&l>0)g=e(t,n,p,o(p.length),g,l-1)-1;else{if(g>=9007199254740991)throw TypeError();t[g]=p}g++}b++}return g}},function(e,t,n){n(356),e.exports=n(11).String.padStart},function(e,t,n){"use strict";var r=n(0),i=n(159),o=n(81),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*a,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){n(358),e.exports=n(11).String.padEnd},function(e,t,n){"use strict";var r=n(0),i=n(159),o=n(81),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*a,"String",{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){n(360),e.exports=n(11).String.trimLeft},function(e,t,n){"use strict";n(54)("trimLeft",function(e){return function(){return e(this,1)}},"trimStart")},function(e,t,n){n(362),e.exports=n(11).String.trimRight},function(e,t,n){"use strict";n(54)("trimRight",function(e){return function(){return e(this,2)}},"trimEnd")},function(e,t,n){n(364),e.exports=n(89).f("asyncIterator")},function(e,t,n){n(131)("asyncIterator")},function(e,t,n){n(366),e.exports=n(11).Object.getOwnPropertyDescriptors},function(e,t,n){var r=n(0),i=n(158),o=n(21),a=n(28),s=n(105);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,r=o(e),c=a.f,u=i(r),f={},l=0;u.length>l;)void 0!==(n=c(r,t=u[l++]))&&s(f,t,n);return f}})},function(e,t,n){n(368),e.exports=n(11).Object.values},function(e,t,n){var r=n(0),i=n(160)(!1);r(r.S,"Object",{values:function(e){return i(e)}})},function(e,t,n){n(370),e.exports=n(11).Object.entries},function(e,t,n){var r=n(0),i=n(160)(!0);r(r.S,"Object",{entries:function(e){return i(e)}})},function(e,t,n){"use strict";n(152),n(372),e.exports=n(11).Promise.finally},function(e,t,n){"use strict";var r=n(0),i=n(11),o=n(3),a=n(65),s=n(154);r(r.P+r.R,"Promise",{finally:function(e){var t=a(this,i.Promise||o.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then(function(){return n})}:e,n?function(n){return s(t,e()).then(function(){throw n})}:e)}})},function(e,t,n){n(374),n(375),n(376),e.exports=n(11)},function(e,t,n){var r=n(3),i=n(0),o=n(81),a=[].slice,s=/MSIE .\./.test(o),c=function(e){return function(t,n){var r=arguments.length>2,i=!!r&&a.call(arguments,2);return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,i)}:t,n)}};i(i.G+i.B+i.F*s,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(e,t,n){var r=n(0),i=n(111);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){for(var r=n(108),i=n(44),o=n(17),a=n(3),s=n(20),c=n(55),u=n(8),f=u("iterator"),l=u("toStringTag"),d=c.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(h),m=0;m<p.length;m++){var g,b=p[m],v=h[b],y=a[b],w=y&&y.prototype;if(w&&(w[f]||s(w,f,d),w[l]||s(w,l,b),c[b]=d,v))for(g in r)w[g]||o(w,g,r[g],!0)}},function(e,t,n){var r=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,n,r){var i=t&&t.prototype instanceof m?t:m,o=Object.create(i.prototype),a=new I(r||[]);return o._invoke=function(e,t,n){var r=f;return function(i,o){if(r===d)throw new Error("Generator is already running");if(r===h){if("throw"===i)throw o;return R()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var c=u(e,t,n);if("normal"===c.type){if(r=n.done?h:l,c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=h,n.method="throw",n.arg=c.arg)}}}(e,n,a),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f="suspendedStart",l="suspendedYield",d="executing",h="completed",p={};function m(){}function g(){}function b(){}var v={};v[o]=function(){return this};var y=Object.getPrototypeOf,w=y&&y(y(C([])));w&&w!==n&&r.call(w,o)&&(v=w);var _=b.prototype=m.prototype=Object.create(v);function S(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function k(e){var t;this._invoke=function(n,i){function o(){return new Promise(function(t,o){!function t(n,i,o,a){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?Promise.resolve(f.__await).then(function(e){t("next",e,o,a)},function(e){t("throw",e,o,a)}):Promise.resolve(f).then(function(e){c.value=e,o(c)},function(e){return t("throw",e,o,a)})}a(s.arg)}(n,i,t,o)})}return t=t?t.then(o,o):o()}}function E(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method))return p;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var i=u(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,p;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,p):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function C(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:R}}function R(){return{value:t,done:!0}}return g.prototype=_.constructor=b,b.constructor=g,b[s]=g.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(_),e},e.awrap=function(e){return{__await:e}},S(k.prototype),k.prototype[a]=function(){return this},e.AsyncIterator=k,e.async=function(t,n,r,i){var o=new k(c(t,n,r,i));return e.isGeneratorFunction(n)?o:o.next().then(function(e){return e.done?e.value:o.next()})},S(_),_[s]="Generator",_[o]=function(){return this},_.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=C,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;M(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:C(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),p}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.monitoring=t.sos=t.frontApplet=void 0;var r=n(379),i=n(547);t.frontApplet=r.default(window,"hug"),t.sos=t.frontApplet,t.monitoring=new i.default(t.frontApplet),window.sos=t.frontApplet,window.sosMonitoring=t.monitoring,t.default=t.frontApplet,e.exports=t.frontApplet,e.exports.default=t.frontApplet},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(380);t.default=function(e,t){return new r.default(e,t)}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var a=n(15),s=n(161),c=n(461),u=n(469),f=n(471),l=n(202),d=n(484),h=n(486),p=n(490),m=n(493),g=n(494),b=n(495),v=n(496),y=n(498),w=n(499),_=n(500),S=n(502),k=n(504),E=n(199),x=n(506),M=n(538),I=n(539),C=n(541),R=n(542),P=n(543),O=n(545),j=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.window=t,this.messagePrefix=n;var i=C.createExchange(n,this.postMessage.bind(this));this.readyEmitter=new a.EventEmitter,this.invocationResponseEmitter=new a.EventEmitter,this.debug=new v.default(this.window,n,this.postMessage.bind(this)),this.deviceInfo=new y.default(n,this.postMessage.bind(this)),this.display=new w.default(n,this.postMessage.bind(this)),this.stream=new u.default(n,this.postMessage.bind(this)),this.video=new c.default(n,this.postMessage.bind(this)),this.command=new d.default(this.messagePrefix,this.postMessage.bind(this)),this.hardware=new h.default(this.messagePrefix,this.postMessage.bind(this)),this.offline=new f.default(n,this.window,this.postMessage.bind(this)),this.browser=new p.default(i.createNamespaced("browser")),this.touch=new g.default(this.window,this.messagePrefix,this.postMessage.bind(this)),this.iframe=new m.default(this.window,this.messagePrefix,this,[this.touch.transformIframeData.bind(this.touch)]),this.input=new b.default(this.window,this.messagePrefix),this.timing=new _.default(this.messagePrefix,this.postMessage.bind(this)),this.sync=new S.default(this.messagePrefix,this.postMessage.bind(this)),this.fileSystem=new k.default(this.messagePrefix,this.postMessage.bind(this)),this.management=new x.default(n,this.postMessage.bind(this)),this.monitors=new M.default(n,this.postMessage.bind(this)),this.osd=new R.default(n,this.postMessage.bind(this)),this.proofOfPlay=new P.default(this.command),this.sensors=new I.default(n),this.native=new O.default(n,this.postMessage.bind(this)),this.javascriptLoadFileController=new l.default(this.window),this.window.addEventListener("message",function(e){return r.handleMessage(e)}),this.postMessage({type:n+"_api.ready"}),this.startPinging()}var t,n,j;return t=e,(n=[{key:"postMessage",value:function(e){var t=this,n=s.generateUniqueHash();return this.window.setTimeout(function(){var r;null===(r=t.window.parent)||void 0===r||r.postMessage(Object.assign({invocationUid:n},e),"*")}),new Promise(function(e,r){t.invocationResponseEmitter.once(n,function(t){t.error?t.error.error?r(E.createError(t.error.error)):r(t.error):e(t.success)})})}},{key:"onReady",value:function(e){var t=this;return new Promise(function(n){t.readyEmitter.once("ready",function(){n(),void 0!==e&&e()}),t.checkIfReady()})}},{key:"restore",value:function(){this.postMessage({type:this.getMessage("restore")}),this.removeMediaListeners(),this.forwardRestoreToFrontAppletWindows()}},{key:"refresh",value:function(){return o(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("applet_refresh")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"forwardRestoreToFrontAppletWindows",value:function(){var e={type:this.messagePrefix+"restore"};this.iframe.forwardToFrontAppletWindows(e)}},{key:"removeMediaListeners",value:function(){this.video.removeEventListeners(),this.stream.removeEventListeners(),this.sync.removeEventListeners(),this.input.removeEventListeners()}},{key:"checkIfReady",value:function(){void 0!==this.authHash&&void 0!==this.config&&null!==this.display.version&&this.readyEmitter.emit("ready")}},{key:"handleMessage",value:function(e){if("object"===r(e.data)){var t=e.source;if(t===this.window.parent){var n=e.data;switch(n.type){case this.getMessage("invocation.success"):this.invocationResponseEmitter.emit(n.invocationUid,{success:n});break;case this.getMessage("invocation.error"):this.invocationResponseEmitter.emit(n.invocationUid,{error:n});break;case this.getMessage("config.update"):this.config=n.config,this.checkIfReady();break;case this.getMessage("auth_hash.update"):this.authHash=n.authHash,this.checkIfReady();break;case this.getMessage("front_display_version.update"):this.display.version=n.version,this.checkIfReady();break;case this.getMessage("applet_version.update"):this.appletVersion=n.version;break;case this.getMessage("restore"):this.removeMediaListeners();break;case this.getMessage("assets.load_js"):this.javascriptLoadFileController.load(n.src,this.window.document.body);break;default:this.browser.handleMessageData(n),this.sync.handleMessageData(n),this.video.handleMessageData(n),this.stream.handleMessageData(n),this.input.handleMessageData(n),this.command.handleMessageData(n),this.fileSystem.handleMessageData(n),this.sensors.handleMessageData(n),this.management.wifi.handleMessageData(n),this.hardware.handleMessageData(n),this.touch.handleMessageData(n),this.debug.handleMessageData(n)}this.iframe.forwardToFrontAppletWindows(n)}else if(function(e){return Boolean(e)}(t)&&t!==this.window){var i=e.data;switch(i.type){case this.messagePrefix+"_loader.ready":this.iframe.registerFrontAppletLoaderWindow(t);break;case this.messagePrefix+"_api.ready":this.iframe.registerBundledFrontAppletWindow(t);break;default:this.iframe.forwardFromFrontAppletWindows(t,i)}}}}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}},{key:"startPinging",value:function(){var e=this,t=function(){return e.postMessage({type:e.getMessage("ping")})};this.window.setInterval(t,3e4),t()}}])&&i(t.prototype,n),j&&i(t,j),e}();t.default=j},function(e,t,n){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=u(e),a=r[0],s=r[1],c=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),f=0,l=s>0?a-4:a;for(n=0;n<l;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[f++]=t>>16&255,c[f++]=t>>8&255,c[f++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,c[f++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,c[f++]=t>>8&255,c[f++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(f(e,a,a+16383>s?s:a+16383));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,c=a.length;s<c;++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 f(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},function(e,t){t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,c=(1<<s)-1,u=c>>1,f=-7,l=n?i-1:0,d=n?-1:1,h=e[t+l];for(l+=d,o=h&(1<<-f)-1,h>>=-f,f+=s;f>0;o=256*o+e[t+l],l+=d,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=r;f>0;a=256*a+e[t+l],l+=d,f-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=u}return(h?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,c,u=8*o-i-1,f=(1<<u)-1,l=f>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+l>=1?d/c:d*Math.pow(2,1-l))*c>=2&&(a++,c/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(t*c-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=p,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[n+h]=255&a,h+=p,a/=256,u-=8);e[n+h-p]|=128*m}},function(e,t,n){var r=function(){try{return n(60)}catch(e){}}();(t=e.exports=n(165)).Stream=r||t,t.Readable=t,t.Writable=n(115),t.Duplex=n(51),t.Transform=n(117),t.PassThrough=n(166)},function(e,t){},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(386),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(38))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,o,a,s,c=1,u={},f=!1,l=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){p(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){p(e.data)},r=function(e){o.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(i=l.documentElement,r=function(e){var t=l.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(p,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&p(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return u[c]=i,r(c),c++},d.clearImmediate=h}function h(e){delete u[e]}function p(e){if(f)setTimeout(p,0,e);else{var t=u[e];if(t){f=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{h(e),f=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(38),n(35))},function(e,t,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.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,n(38))},function(e,t,n){var r=n(9),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?e.exports=r:(o(r,t),t.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)}},function(e,t,n){e.exports=n(115)},function(e,t,n){e.exports=n(51)},function(e,t,n){e.exports=n(117)},function(e,t,n){e.exports=n(166)},function(e,t,n){var r=n(1),i=n(61),o=n(2).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function f(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}r(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,l=0;l<16;++l)n[l]=e.readInt32BE(4*l);for(;l<80;++l)n[l]=n[l-3]^n[l-8]^n[l-14]^n[l-16];for(var d=0;d<80;++d){var h=~~(d/20),p=0|((t=r)<<5|t>>>27)+f(h,i,o,s)+c+n[d]+a[h];c=s,s=o,o=u(i),i=r,r=p}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},function(e,t,n){var r=n(1),i=n(61),o=n(2).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function f(e){return e<<30|e>>>2}function l(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}r(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,d=0;d<16;++d)n[d]=e.readInt32BE(4*d);for(;d<80;++d)n[d]=(t=n[d-3]^n[d-8]^n[d-14]^n[d-16])<<1|t>>>31;for(var h=0;h<80;++h){var p=~~(h/20),m=u(r)+l(p,i,o,s)+c+n[h]+a[p]|0;c=s,s=o,o=f(i),i=r,r=m}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},function(e,t,n){var r=n(1),i=n(167),o=n(61),a=n(2).Buffer,s=new Array(64);function c(){this.init(),this._w=s,o.call(this,64,56)}r(c,i),c.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},c.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=c},function(e,t,n){var r=n(1),i=n(168),o=n(61),a=n(2).Buffer,s=new Array(160);function c(){this.init(),this._w=s,o.call(this,128,112)}r(c,i),c.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},c.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=c},function(e,t,n){"use strict";var r=n(1),i=n(2).Buffer,o=n(39),a=i.alloc(128),s=64;function c(e,t){o.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>s?t=e(t):t.length<s&&(t=i.concat([t,a],s));for(var n=this._ipad=i.allocUnsafe(s),r=this._opad=i.allocUnsafe(s),c=0;c<s;c++)n[c]=54^t[c],r[c]=92^t[c];this._hash=[n]}r(c,o),c.prototype._update=function(e){this._hash.push(e)},c.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=c},function(e,t,n){e.exports=n(171)},function(e,t,n){(function(t,r){var i,o=n(173),a=n(174),s=n(175),c=n(2).Buffer,u=t.crypto&&t.crypto.subtle,f={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},l=[];function d(e,t,n,r,i){return u.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(e){return u.deriveBits({name:"PBKDF2",salt:t,iterations:n,hash:{name:i}},e,r<<3)}).then(function(e){return c.from(e)})}e.exports=function(e,n,h,p,m,g){"function"==typeof m&&(g=m,m=void 0);var b=f[(m=m||"sha1").toLowerCase()];if(!b||"function"!=typeof t.Promise)return r.nextTick(function(){var t;try{t=s(e,n,h,p,m)}catch(e){return g(e)}g(null,t)});if(o(e,n,h,p),"function"!=typeof g)throw new Error("No callback provided to pbkdf2");c.isBuffer(e)||(e=c.from(e,a)),c.isBuffer(n)||(n=c.from(n,a)),function(e,t){e.then(function(e){r.nextTick(function(){t(null,e)})},function(e){r.nextTick(function(){t(e)})})}(function(e){if(t.process&&!t.process.browser)return Promise.resolve(!1);if(!u||!u.importKey||!u.deriveBits)return Promise.resolve(!1);if(void 0!==l[e])return l[e];var n=d(i=i||c.alloc(8),i,10,128,e).then(function(){return!0}).catch(function(){return!1});return l[e]=n,n}(b).then(function(t){return t?d(e,n,h,p,b):s(e,n,h,p,m)}),g)}}).call(this,n(38),n(35))},function(e,t,n){var r=n(401),i=n(121),o=n(122),a=n(416),s=n(85);function c(e,t,n){if(e=e.toLowerCase(),o[e])return i.createCipheriv(e,t,n);if(a[e])return new r({key:t,iv:n,mode:e});throw new TypeError("invalid suite type")}function u(e,t,n){if(e=e.toLowerCase(),o[e])return i.createDecipheriv(e,t,n);if(a[e])return new r({key:t,iv:n,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var n,r;if(e=e.toLowerCase(),o[e])n=o[e].key,r=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");n=8*a[e].key,r=a[e].iv}var i=s(t,!1,n,r);return c(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=c,t.createDecipher=t.Decipher=function(e,t){var n,r;if(e=e.toLowerCase(),o[e])n=o[e].key,r=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");n=8*a[e].key,r=a[e].iv}var i=s(t,!1,n,r);return u(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=u,t.listCiphers=t.getCiphers=function(){return Object.keys(a).concat(i.getCiphers())}},function(e,t,n){var r=n(39),i=n(120),o=n(1),a=n(2).Buffer,s={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function c(e){r.call(this);var t,n=e.mode.toLowerCase(),i=s[n];t=e.decrypt?"decrypt":"encrypt";var o=e.key;a.isBuffer(o)||(o=a.from(o)),"des-ede"!==n&&"des-ede-cbc"!==n||(o=a.concat([o,o.slice(0,8)]));var c=e.iv;a.isBuffer(c)||(c=a.from(c)),this._des=i.create({key:o,iv:c,type:t})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],e.exports=c,o(c,r),c.prototype._update=function(e){return a.from(this._des.update(e))},c.prototype._final=function(){return a.from(this._des.final())}},function(e,t,n){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},t.ip=function(e,t,n,r){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}n[r+0]=i>>>0,n[r+1]=o>>>0},t.rip=function(e,t,n,r){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;n[r+0]=i>>>0,n[r+1]=o>>>0},t.pc1=function(e,t,n,r){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;n[r+0]=i>>>0,n[r+1]=o>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,i){for(var o=0,a=0,s=r.length>>>1,c=0;c<s;c++)o<<=1,o|=e>>>r[c]&1;for(c=s;c<r.length;c++)a<<=1,a|=t>>>r[c]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},t.expand=function(e,t,n){var r=0,i=0;r=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)r<<=6,r|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[n+0]=r>>>0,t[n+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var n=0,r=0;r<4;r++){n<<=4,n|=i[64*r+(e>>>18-6*r&63)]}for(r=0;r<4;r++){n<<=4,n|=i[256+64*r+(t>>>18-6*r&63)]}return n>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,n=0;n<o.length;n++)t<<=1,t|=e>>>o[n]&1;return t>>>0},t.padSplit=function(e,t,n){for(var r=e.toString(2);r.length<t;)r="0"+r;for(var i=[],o=0;o<t;o+=n)i.push(r.slice(o,o+n));return i.join(" ")}},function(e,t,n){"use strict";var r=n(22);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),r=0;r<n;r++)this.buffer[this.bufferOff+r]=e[t+r];return this.bufferOff+=n,n},i.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(e){var t=0,n=0,r=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(r*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(i,n)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,i,n),n+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},i.prototype._updateDecrypt=function(e){for(var t=0,n=0,r=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(r*this.blockSize);r>0;r--)t+=this._buffer(e,t),n+=this._flushBuffer(i,n);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,n;return e&&(t=this.update(e)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},i.prototype._unpad=function(e){return e},i.prototype._finalDecrypt=function(){r.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},function(e,t,n){"use strict";var r=n(22),i=n(1),o=n(120),a=o.utils,s=o.Cipher;function c(){this.tmp=new Array(2),this.keys=null}function u(e){s.call(this,e);var t=new c;this._desState=t,this.deriveKeys(t,e.key)}i(u,s),e.exports=u,u.create=function(e){return new u(e)};var f=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(e,t){e.keys=new Array(32),r.equal(t.length,this.blockSize,"Invalid key length");var n=a.readUInt32BE(t,0),i=a.readUInt32BE(t,4);a.pc1(n,i,e.tmp,0),n=e.tmp[0],i=e.tmp[1];for(var o=0;o<e.keys.length;o+=2){var s=f[o>>>1];n=a.r28shl(n,s),i=a.r28shl(i,s),a.pc2(n,i,e.keys,o)}},u.prototype._update=function(e,t,n,r){var i=this._desState,o=a.readUInt32BE(e,t),s=a.readUInt32BE(e,t+4);a.ip(o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,s,i.tmp,0):this._decrypt(i,o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],a.writeUInt32BE(n,o,r),a.writeUInt32BE(n,s,r+4)},u.prototype._pad=function(e,t){for(var n=e.length-t,r=t;r<e.length;r++)e[r]=n;return!0},u.prototype._unpad=function(e){for(var t=e[e.length-1],n=e.length-t;n<e.length;n++)r.equal(e[n],t);return e.slice(0,e.length-t)},u.prototype._encrypt=function(e,t,n,r,i){for(var o=t,s=n,c=0;c<e.keys.length;c+=2){var u=e.keys[c],f=e.keys[c+1];a.expand(s,e.tmp,0),u^=e.tmp[0],f^=e.tmp[1];var l=a.substitute(u,f),d=s;s=(o^a.permute(l))>>>0,o=d}a.rip(s,o,r,i)},u.prototype._decrypt=function(e,t,n,r,i){for(var o=n,s=t,c=e.keys.length-2;c>=0;c-=2){var u=e.keys[c],f=e.keys[c+1];a.expand(o,e.tmp,0),u^=e.tmp[0],f^=e.tmp[1];var l=a.substitute(u,f),d=o;o=(s^a.permute(l))>>>0,s=d}a.rip(o,s,r,i)}},function(e,t,n){"use strict";var r=n(22),i=n(1),o={};function a(e){r.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}t.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}i(t,e);for(var n=Object.keys(o),r=0;r<n.length;r++){var a=n[r];t.prototype[a]=o[a]}return t.create=function(e){return new t(e)},t},o._cbcInit=function(){var e=new a(this.options.iv);this._cbcState=e},o._update=function(e,t,n,r){var i=this._cbcState,o=this.constructor.super_.prototype,a=i.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)a[s]^=e[t+s];o._update.call(this,a,0,n,r);for(s=0;s<this.blockSize;s++)a[s]=n[r+s]}else{o._update.call(this,e,t,n,r);for(s=0;s<this.blockSize;s++)n[r+s]^=a[s];for(s=0;s<this.blockSize;s++)a[s]=e[t+s]}}},function(e,t,n){"use strict";var r=n(22),i=n(1),o=n(120),a=o.Cipher,s=o.DES;function c(e,t){r.equal(t.length,24,"Invalid key length");var n=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:n}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:o})]:[s.create({type:"decrypt",key:o}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:n})]}function u(e){a.call(this,e);var t=new c(this.type,this.options.key);this._edeState=t}i(u,a),e.exports=u,u.create=function(e){return new u(e)},u.prototype._update=function(e,t,n,r){var i=this._edeState;i.ciphers[0]._update(e,t,n,r),i.ciphers[1]._update(n,r,n,r),i.ciphers[2]._update(n,r,n,r)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},function(e,t,n){var r=n(122),i=n(179),o=n(2).Buffer,a=n(180),s=n(39),c=n(84),u=n(85);function f(e,t,n){s.call(this),this._cache=new d,this._cipher=new c.AES(t),this._prev=o.from(n),this._mode=e,this._autopadding=!0}n(1)(f,s),f.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get();)n=this._mode.encrypt(this,t),r.push(n);return o.concat(r)};var l=o.alloc(16,16);function d(){this.cache=o.allocUnsafe(0)}function h(e,t,n){var s=r[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof n&&(n=o.from(n)),"GCM"!==s.mode&&n.length!==s.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===s.type?new a(s.module,t,n):"auth"===s.type?new i(s.module,t,n):new f(s.module,t,n)}f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=o.concat([this.cache,e])},d.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),n=-1;++n<e;)t.writeUInt8(e,n);return o.concat([this.cache,t])},t.createCipheriv=h,t.createCipher=function(e,t){var n=r[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var i=u(t,!1,n.key,n.iv);return h(e,i.key,i.iv)}},function(e,t){t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},function(e,t,n){var r=n(68);t.encrypt=function(e,t){var n=r(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},t.decrypt=function(e,t){var n=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return r(i,n)}},function(e,t,n){var r=n(2).Buffer,i=n(68);function o(e,t,n){var o=t.length,a=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=r.concat([e._prev,n?t:a]),a}t.encrypt=function(e,t,n){for(var i,a=r.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=r.allocUnsafe(0)),!(e._cache.length<=t.length)){a=r.concat([a,o(e,t,n)]);break}i=e._cache.length,a=r.concat([a,o(e,t.slice(0,i),n)]),t=t.slice(i)}return a}},function(e,t,n){var r=n(2).Buffer;function i(e,t,n){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=r.concat([e._prev.slice(1),r.from([n?t:i])]),i}t.encrypt=function(e,t,n){for(var o=t.length,a=r.allocUnsafe(o),s=-1;++s<o;)a[s]=i(e,t[s],n);return a}},function(e,t,n){var r=n(2).Buffer;function i(e,t,n){for(var r,i,a=-1,s=0;++a<8;)r=t&1<<7-a?128:0,s+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^r))>>a%8,e._prev=o(e._prev,n?r:i);return s}function o(e,t){var n=e.length,i=-1,o=r.allocUnsafe(e.length);for(e=r.concat([e,r.from([t])]);++i<n;)o[i]=e[i]<<1|e[i+1]>>7;return o}t.encrypt=function(e,t,n){for(var o=t.length,a=r.allocUnsafe(o),s=-1;++s<o;)a[s]=i(e,t[s],n);return a}},function(e,t,n){(function(e){var r=n(68);function i(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(t,n){for(;t._cache.length<n.length;)t._cache=e.concat([t._cache,i(t)]);var o=t._cache.slice(0,n.length);return t._cache=t._cache.slice(n.length),r(n,o)}}).call(this,n(9).Buffer)},function(e,t,n){var r=n(2).Buffer,i=r.alloc(16,0);function o(e){var t=r.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},a.prototype._multiply=function(){for(var e,t,n,r=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],a=-1;++a<128;){for(0!=(this.state[~~(a/8)]&1<<7-a%8)&&(i[0]^=r[0],i[1]^=r[1],i[2]^=r[2],i[3]^=r[3]),n=0!=(1&r[3]),t=3;t>0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,n&&(r[0]=r[0]^225<<24)}this.state=o(i)},a.prototype.update=function(e){var t;for(this.cache=r.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(r.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=a},function(e,t,n){var r=n(179),i=n(2).Buffer,o=n(122),a=n(180),s=n(39),c=n(84),u=n(85);function f(e,t,n){s.call(this),this._cache=new l,this._last=void 0,this._cipher=new c.AES(t),this._prev=i.from(n),this._mode=e,this._autopadding=!0}function l(){this.cache=i.allocUnsafe(0)}function d(e,t,n){var s=o[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=i.from(n)),"GCM"!==s.mode&&n.length!==s.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof t&&(t=i.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===s.type?new a(s.module,t,n,!0):"auth"===s.type?new r(s.module,t,n,!0):new f(s.module,t,n)}n(1)(f,s),f.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,t),r.push(n);return i.concat(r)},f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var n=-1;for(;++n<t;)if(e[n+(16-t)]!==t)throw new Error("unable to decrypt data");if(16===t)return;return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},l.prototype.add=function(e){this.cache=i.concat([this.cache,e])},l.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},l.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var n=o[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=u(t,!1,n.key,n.iv);return d(e,r.key,r.iv)},t.createDecipheriv=d},function(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},function(e,t,n){(function(e){var r=n(181),i=n(420),o=n(421);var a={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(t){var n=new e(i[t].prime,"hex"),r=new e(i[t].gen,"hex");return new o(n,r)},t.createDiffieHellman=t.DiffieHellman=function t(n,i,s,c){return e.isBuffer(i)||void 0===a[i]?t(n,"binary",i,s):(i=i||"binary",c=c||"binary",s=s||new e([2]),e.isBuffer(s)||(s=new e(s,c)),"number"==typeof n?new o(r(n,s),s,!0):(e.isBuffer(n)||(n=new e(n,i)),new o(n,s,!0)))}}).call(this,n(9).Buffer)},function(e,t){},function(e,t){},function(e){e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(e,t,n){(function(t){var r=n(12),i=new(n(183)),o=new r(24),a=new r(11),s=new r(10),c=new r(3),u=new r(7),f=n(181),l=n(59);function d(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this._pub=new r(e),this}function h(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this._priv=new r(e),this}e.exports=m;var p={};function m(e,t,n){this.setGenerator(t),this.__prime=new r(e),this._prime=r.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=d,this.setPrivateKey=h):this._primeCode=8}function g(e,n){var r=new t(e.toArray());return n?r.toString(n):r}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var n=t.toString("hex"),r=[n,e.toString(16)].join("_");if(r in p)return p[r];var l,d=0;if(e.isEven()||!f.simpleSieve||!f.fermatTest(e)||!i.test(e))return d+=1,d+="02"===n||"05"===n?8:4,p[r]=d,d;switch(i.test(e.shrn(1))||(d+=2),n){case"02":e.mod(o).cmp(a)&&(d+=8);break;case"05":(l=e.mod(s)).cmp(c)&&l.cmp(u)&&(d+=8);break;default:d+=4}return p[r]=d,d}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new r(l(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(e){var n=(e=(e=new r(e)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new t(n.toArray()),o=this.getPrime();if(i.length<o.length){var a=new t(o.length-i.length);a.fill(0),i=t.concat([a,i])}return i},m.prototype.getPublicKey=function(e){return g(this._pub,e)},m.prototype.getPrivateKey=function(e){return g(this._priv,e)},m.prototype.getPrime=function(e){return g(this.__prime,e)},m.prototype.getGenerator=function(e){return g(this._gen,e)},m.prototype.setGenerator=function(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this.__gen=e,this._gen=new r(e),this}}).call(this,n(9).Buffer)},function(e,t,n){(function(t){var r=n(66),i=n(60),o=n(1),a=n(423),s=n(455),c=n(171);function u(e){i.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=r(t.hash),this._tag=t.id,this._signType=t.sign}function f(e){i.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=r(t.hash),this._tag=t.id,this._signType=t.sign}function l(e){return new u(e)}function d(e){return new f(e)}Object.keys(c).forEach(function(e){c[e].id=new t(c[e].id,"hex"),c[e.toLowerCase()]=c[e]}),o(u,i.Writable),u.prototype._write=function(e,t,n){this._hash.update(e),n()},u.prototype.update=function(e,n){return"string"==typeof e&&(e=new t(e,n)),this._hash.update(e),this},u.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),r=a(n,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},o(f,i.Writable),f.prototype._write=function(e,t,n){this._hash.update(e),n()},f.prototype.update=function(e,n){return"string"==typeof e&&(e=new t(e,n)),this._hash.update(e),this},f.prototype.verify=function(e,n,r){"string"==typeof n&&(n=new t(n,r)),this.end();var i=this._hash.digest();return s(n,i,e,this._signType,this._tag)},e.exports={Sign:l,Verify:d,createSign:l,createVerify:d}}).call(this,n(9).Buffer)},function(e,t,n){(function(t){var r=n(169),i=n(124),o=n(125).ec,a=n(12),s=n(87),c=n(193);function u(e,n,i,o){if((e=new t(e.toArray())).length<n.byteLength()){var a=new t(n.byteLength()-e.length);a.fill(0),e=t.concat([a,e])}var s=i.length,c=function(e,n){e=(e=f(e,n)).mod(n);var r=new t(e.toArray());if(r.length<n.byteLength()){var i=new t(n.byteLength()-r.length);i.fill(0),r=t.concat([i,r])}return r}(i,n),u=new t(s);u.fill(1);var l=new t(s);return l.fill(0),l=r(o,l).update(u).update(new t([0])).update(e).update(c).digest(),u=r(o,l).update(u).digest(),{k:l=r(o,l).update(u).update(new t([1])).update(e).update(c).digest(),v:u=r(o,l).update(u).digest()}}function f(e,t){var n=new a(e),r=(e.length<<3)-t.bitLength();return r>0&&n.ishrn(r),n}function l(e,n,i){var o,a;do{for(o=new t(0);8*o.length<e.bitLength();)n.v=r(i,n.k).update(n.v).digest(),o=t.concat([o,n.v]);a=f(o,e),n.k=r(i,n.k).update(n.v).update(new t([0])).digest(),n.v=r(i,n.k).update(n.v).digest()}while(-1!==a.cmp(e));return a}function d(e,t,n,r){return e.toRed(a.mont(n)).redPow(t).fromRed().mod(r)}e.exports=function(e,n,r,h,p){var m=s(n);if(m.curve){if("ecdsa"!==h&&"ecdsa/rsa"!==h)throw new Error("wrong private key type");return function(e,n){var r=c[n.curve.join(".")];if(!r)throw new Error("unknown curve "+n.curve.join("."));var i=new o(r).keyFromPrivate(n.privateKey).sign(e);return new t(i.toDER())}(e,m)}if("dsa"===m.type){if("dsa"!==h)throw new Error("wrong private key type");return function(e,n,r){var i,o=n.params.priv_key,s=n.params.p,c=n.params.q,h=n.params.g,p=new a(0),m=f(e,c).mod(c),g=!1,b=u(o,c,e,r);for(;!1===g;)i=l(c,b,r),p=d(h,i,s,c),0===(g=i.invm(c).imul(m.add(o.mul(p))).mod(c)).cmpn(0)&&(g=!1,p=new a(0));return function(e,n){e=e.toArray(),n=n.toArray(),128&e[0]&&(e=[0].concat(e));128&n[0]&&(n=[0].concat(n));var r=[48,e.length+n.length+4,2,e.length];return r=r.concat(e,[2,n.length],n),new t(r)}(p,g)}(e,m,r)}if("rsa"!==h&&"ecdsa/rsa"!==h)throw new Error("wrong private key type");e=t.concat([p,e]);for(var g=m.modulus.byteLength(),b=[0,1];e.length+b.length+1<g;)b.push(255);b.push(0);for(var v=-1;++v<e.length;)b.push(e[v]);return i(b,m)},e.exports.getKey=u,e.exports.makeKey=l}).call(this,n(9).Buffer)},function(e){e.exports=JSON.parse('{"_args":[["elliptic@6.5.0","/builds/signageos/display/front-applet"]],"_development":true,"_from":"elliptic@6.5.0","_id":"elliptic@6.5.0","_inBundle":false,"_integrity":"sha512-eFOJTMyCYb7xtE/caJ6JJu+bhi67WCYNbkGSknu20pmM8Ke/bqOfdnZWxyoGN26JgfxTbXrsCkEw4KheCT/KGg==","_location":"/elliptic","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"elliptic@6.5.0","name":"elliptic","escapedName":"elliptic","rawSpec":"6.5.0","saveSpec":null,"fetchSpec":"6.5.0"},"_requiredBy":["/browserify-sign","/create-ecdh"],"_resolved":"https://signageos-524256255273.d.codeartifact.eu-central-1.amazonaws.com/npm/private/elliptic/-/elliptic-6.5.0.tgz","_spec":"6.5.0","_where":"/builds/signageos/display/front-applet","author":{"name":"Fedor Indutny","email":"fedor@indutny.com"},"bugs":{"url":"https://github.com/indutny/elliptic/issues"},"dependencies":{"bn.js":"^4.4.0","brorand":"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0","inherits":"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},"description":"EC cryptography","devDependencies":{"brfs":"^1.4.3","coveralls":"^2.11.3","grunt":"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2","istanbul":"^0.4.2","jscs":"^2.9.0","jshint":"^2.6.0","mocha":"^2.1.0"},"files":["lib"],"homepage":"https://github.com/indutny/elliptic","keywords":["EC","Elliptic","curve","Cryptography"],"license":"MIT","main":"lib/elliptic.js","name":"elliptic","repository":{"type":"git","url":"git+ssh://git@github.com/indutny/elliptic.git"},"scripts":{"jscs":"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js","jshint":"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js","lint":"npm run jscs && npm run jshint","test":"npm run lint && npm run unit","unit":"istanbul test _mocha --reporter=spec test/index.js","version":"grunt dist && git add dist/"},"version":"6.5.0"}')},function(e,t,n){"use strict";var r=n(23),i=n(12),o=n(1),a=n(86),s=r.assert;function c(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(e,t,n,r){a.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(e,t,n,r){a.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(n,16),this.z=new i(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(c,a),e.exports=c,c.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)n=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?n=o[0]:(n=o[1],s(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:n,basis:e.basis?e.basis.map(function(e){return{a:new i(e.a,16),b:new i(e.b,16)}}):this._getEndoBasis(n)}}},c.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),n=new i(2).toRed(t).redInvm(),r=n.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(n);return[r.redAdd(o).fromRed(),r.redSub(o).fromRed()]},c.prototype._getEndoBasis=function(e){for(var t,n,r,o,a,s,c,u,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,h=this.n.clone(),p=new i(1),m=new i(0),g=new i(0),b=new i(1),v=0;0!==d.cmpn(0);){var y=h.div(d);u=h.sub(y.mul(d)),f=g.sub(y.mul(p));var w=b.sub(y.mul(m));if(!r&&u.cmp(l)<0)t=c.neg(),n=p,r=u.neg(),o=f;else if(r&&2==++v)break;c=u,h=d,d=u,g=p,p=f,b=m,m=w}a=u.neg(),s=f;var _=r.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(_)>=0&&(a=t,s=n),r.negative&&(r=r.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:r,b:o},{a:a,b:s}]},c.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],i=r.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=i.mul(n.a),s=o.mul(r.a),c=i.mul(n.b),u=o.mul(r.b);return{k1:e.sub(a).sub(s),k2:c.add(u).neg()}},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var o=r.fromRed().isOdd();return(t&&!o||!t&&o)&&(r=r.redNeg()),this.point(e,r)},c.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),s=e[o],c=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),c=c.neg(!0)),r[2*o]=s,r[2*o+1]=c,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var u=this._wnafMulAdd(1,r,i,2*o,n),f=0;f<2*o;f++)r[f]=null,i[f]=null;return u},o(u,a.BasePoint),c.prototype.point=function(e,t,n){return new u(this,e,t,n)},c.prototype.pointFromJSON=function(e,t){return u.fromJSON(this,e,t)},u.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},u.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},u.fromJSON=function(e,t,n){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);if(!t[2])return r;function i(t){return e.point(t[0],t[1],n)}var o=t[2];return r.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[r].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[r].concat(o.naf.points.map(i))}},r},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},u.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return e=new i(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},u.prototype.jmulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},u.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},u.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(f,a.BasePoint),c.prototype.jpoint=function(e,t,n){return new f(this,e,t,n)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),i=e.x.redMul(n),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),s=r.redSub(i),c=o.redSub(a);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),f=u.redMul(s),l=r.redMul(u),d=c.redSqr().redIAdd(f).redISub(l).redISub(l),h=c.redMul(l.redISub(d)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,h,p)},f.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=n.redSub(r),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),f=n.redMul(c),l=s.redSqr().redIAdd(u).redISub(f).redISub(f),d=s.redMul(f.redISub(l)).redISub(i.redMul(u)),h=this.z.redMul(a);return this.curve.jpoint(l,d,h)},f.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,n=0;n<e;n++)t=t.dbl();return t}var r=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,c=s.redSqr().redSqr(),u=a.redAdd(a);for(n=0;n<e;n++){var f=o.redSqr(),l=u.redSqr(),d=l.redSqr(),h=f.redAdd(f).redIAdd(f).redIAdd(r.redMul(c)),p=o.redMul(l),m=h.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),b=h.redMul(g);b=b.redIAdd(b).redISub(d);var v=u.redMul(s);n+1<e&&(c=c.redMul(d)),o=m,s=v,u=b}return this.curve.jpoint(o,u.redMul(i),s)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(r).redISub(o);a=a.redIAdd(a);var s=r.redAdd(r).redIAdd(r),c=s.redSqr().redISub(a).redISub(a),u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),e=c,t=s.redMul(a.redISub(c)).redISub(u),n=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),l=this.y.redSqr(),d=l.redSqr(),h=this.x.redAdd(l).redSqr().redISub(f).redISub(d);h=h.redIAdd(h);var p=f.redAdd(f).redIAdd(f),m=p.redSqr(),g=d.redIAdd(d);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(h).redISub(h),t=p.redMul(h.redISub(e)).redISub(g),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(e,t,n)},f.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(r).redISub(o);a=a.redIAdd(a);var s=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),c=s.redSqr().redISub(a).redISub(a);e=c;var u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),t=s.redMul(a.redISub(c)).redISub(u),n=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),l=this.y.redSqr(),d=this.x.redMul(l),h=this.x.redSub(f).redMul(this.x.redAdd(f));h=h.redAdd(h).redIAdd(h);var p=d.redIAdd(d),m=(p=p.redIAdd(p)).redAdd(p);e=h.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(l).redISub(f);var g=l.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=h.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,n)},f.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),o=t.redSqr(),a=n.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),c=t.redAdd(t),u=(c=c.redIAdd(c)).redMul(a),f=s.redSqr().redISub(u.redAdd(u)),l=u.redISub(f),d=a.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=s.redMul(l).redISub(d),p=n.redAdd(n).redMul(r);return this.curve.jpoint(f,h,p)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(r),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),c=r.redIAdd(r);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var u=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(c),f=t.redMul(u);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.x.redMul(s).redISub(f);l=(l=l.redIAdd(l)).redIAdd(l);var d=this.y.redMul(u.redMul(c.redISub(u)).redISub(a.redMul(s)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=this.z.redAdd(a).redSqr().redISub(n).redISub(s);return this.curve.jpoint(l,d,h)},f.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},f.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),n=e.z.redSqr();if(0!==this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),i=n.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(r)).cmpn(0)},f.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(n))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,n){"use strict";var r=n(12),i=n(1),o=n(86),a=n(23);function s(e){o.call(this,"mont",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(e.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,n){o.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(t,16),this.z=new r(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),r=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},i(c,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new c(this,e,t)},s.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(e,t){return new c(e,t[0],t[1]||e.one)},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),r=e.redMul(t),i=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(n),a=i.redMul(r),s=t.z.redMul(o.redAdd(a).redSqr()),c=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,c)},c.prototype.mul=function(e){for(var t=e.clone(),n=this,r=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,n){"use strict";var r=n(23),i=n(12),o=n(1),a=n(86),s=r.assert;function c(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function u(e,t,n,r,o){a.BasePoint.call(this,e,"projective"),null===t&&null===n&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(n,16),this.z=r?new i(r,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(c,a),e.exports=c,c.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},c.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},c.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=this.c2.redSub(this.a.redMul(n)),o=this.one.redSub(this.c2.redMul(this.d).redMul(n)),a=r.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var c=s.fromRed().isOdd();return(t&&!c||!t&&c)&&(s=s.redNeg()),this.point(e,s)},c.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=n.redSub(this.c2),o=n.redMul(this.d).redMul(this.c2).redSub(this.a),a=r.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},c.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),r=t.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return 0===r.cmp(i)},o(u,a.BasePoint),c.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},c.prototype.point=function(e,t,n,r){return new u(this,e,t,n,r)},u.fromJSON=function(e,t){return new u(e,t[0],t[1],t[2])},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=r.redAdd(t),a=o.redSub(n),s=r.redSub(t),c=i.redMul(a),u=o.redMul(s),f=i.redMul(s),l=a.redMul(o);return this.curve.point(c,u,l,f)},u.prototype._projDbl=function(){var e,t,n,r=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var a=(u=this.curve._mulA(i)).redAdd(o);if(this.zOne)e=r.redSub(i).redSub(o).redMul(a.redSub(this.curve.two)),t=a.redMul(u.redSub(o)),n=a.redSqr().redSub(a).redSub(a);else{var s=this.z.redSqr(),c=a.redSub(s).redISub(s);e=r.redSub(i).redISub(o).redMul(c),t=a.redMul(u.redSub(o)),n=a.redMul(c)}}else{var u=i.redAdd(o);s=this.curve._mulC(this.z).redSqr(),c=u.redSub(s).redSub(s);e=this.curve._mulC(r.redISub(u)).redMul(c),t=this.curve._mulC(u).redMul(i.redISub(o)),n=u.redMul(c)}return this.curve.point(e,t,n)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=n.redSub(t),a=i.redSub(r),s=i.redAdd(r),c=n.redAdd(t),u=o.redMul(a),f=s.redMul(c),l=o.redMul(c),d=a.redMul(s);return this.curve.point(u,f,d,l)},u.prototype._projAdd=function(e){var t,n,r=this.z.redMul(e.z),i=r.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),c=i.redSub(s),u=i.redAdd(s),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),l=r.redMul(c).redMul(f);return this.curve.twisted?(t=r.redMul(u).redMul(a.redSub(this.curve._mulA(o))),n=c.redMul(u)):(t=r.redMul(u).redMul(a.redSub(o)),n=this.curve._mulC(c).redMul(u)),this.curve.point(l,t,n)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},u.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},function(e,t,n){"use strict";t.sha1=n(429),t.sha224=n(430),t.sha256=n(187),t.sha384=n(431),t.sha512=n(188)},function(e,t,n){"use strict";var r=n(31),i=n(69),o=n(186),a=r.rotl32,s=r.sum32,c=r.sum32_5,u=o.ft_1,f=i.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(d,f),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=a(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],o=this.h[1],f=this.h[2],d=this.h[3],h=this.h[4];for(r=0;r<n.length;r++){var p=~~(r/20),m=c(a(i,5),u(p,o,f,d),h,n[r],l[p]);h=d,d=f,f=a(o,30),o=i,i=m}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],f),this.h[3]=s(this.h[3],d),this.h[4]=s(this.h[4],h)},d.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){"use strict";var r=n(31),i=n(187);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},function(e,t,n){"use strict";var r=n(31),i=n(188);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},function(e,t,n){"use strict";var r=n(31),i=n(69),o=r.rotl32,a=r.sum32,s=r.sum32_3,c=r.sum32_4,u=i.BlockHash;function f(){if(!(this instanceof f))return new f;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}r.inherits(f,u),t.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],i=this.h[2],u=this.h[3],f=this.h[4],v=n,y=r,w=i,_=u,S=f,k=0;k<80;k++){var E=a(o(c(n,l(k,r,i,u),e[p[k]+t],d(k)),g[k]),f);n=f,f=u,u=o(i,10),i=r,r=E,E=a(o(c(v,l(79-k,y,w,_),e[m[k]+t],h(k)),b[k]),S),v=S,S=_,_=o(w,10),w=y,y=E}E=s(this.h[1],i,_),this.h[1]=s(this.h[2],u,S),this.h[2]=s(this.h[3],f,v),this.h[3]=s(this.h[4],n,y),this.h[4]=s(this.h[0],r,w),this.h[0]=E},f.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],b=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(e,t,n){"use strict";var r=n(31),i=n(22);function o(e,t,n){if(!(this instanceof o))return new o(e,t,n);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(t,n))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},function(e,t){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(e,t,n){"use strict";var r=n(12),i=n(436),o=n(23),a=n(126),s=n(123),c=o.assert,u=n(437),f=n(438);function l(e){if(!(this instanceof l))return new l(e);"string"==typeof e&&(c(a.hasOwnProperty(e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=l,l.prototype.keyPair=function(e){return new u(this,e)},l.prototype.keyFromPrivate=function(e,t){return u.fromPrivate(this,e,t)},l.prototype.keyFromPublic=function(e,t){return u.fromPublic(this,e,t)},l.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),o=this.n.sub(new r(2));;){var a=new r(t.generate(n));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},l.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},l.prototype.sign=function(e,t,n,o){"object"==typeof n&&(o=n,n=null),o||(o={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new r(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),c=e.toArray("be",a),u=new i({hash:this.hash,entropy:s,nonce:c,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new r(1)),d=0;;d++){var h=o.k?o.k(d):new r(u.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(l)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var b=h.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(b=b.umod(this.n)).cmpn(0)){var v=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),v^=1),new f({r:g,s:b,recoveryParam:v})}}}}}},l.prototype.verify=function(e,t,n,i){e=this._truncateToN(new r(e,16)),n=this.keyFromPublic(n,i);var o=(t=new f(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,c=a.invm(this.n),u=c.mul(e).umod(this.n),l=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,n.getPublic(),l)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(u,n.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},l.prototype.recoverPubKey=function(e,t,n,i){c((3&n)===n,"The recovery param is more than two bits"),t=new f(t,i);var o=this.n,a=new r(e),s=t.r,u=t.s,l=1&n,d=n>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");s=d?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var h=t.r.invm(o),p=o.sub(a).mul(h).umod(o),m=u.mul(h).umod(o);return this.g.mulAdd(p,s,m)},l.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new f(t,r)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(n))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t,n){"use strict";var r=n(127),i=n(184),o=n(22);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),n=i.toArray(e.nonce,e.nonceEnc||"hex"),r=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}e.exports=a,a.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new r.hmac(this.hash,this.K)},a.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(e,t,n,r){"string"!=typeof t&&(r=n,n=t,t=null),e=i.toArray(e,t),n=i.toArray(n,r),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},a.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=n,n=t,t=null),n&&(n=i.toArray(n,r||"hex"),this._update(n));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var a=o.slice(0,e);return this._update(n),this._reseed++,i.encode(a,t)}},function(e,t,n){"use strict";var r=n(12),i=n(23).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,n){return t instanceof o?t:new o(e,{pub:t,pubEnc:n})},o.fromPrivate=function(e,t,n){return t instanceof o?t:new o(e,{priv:t,privEnc:n})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.mul(this.priv).getX()},o.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(e,t,n){"use strict";var r=n(12),i=n(23),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new r(e.r,16),this.s=new r(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function c(e,t){var n=e[t.place++];if(!(128&n))return n;for(var r=15&n,i=0,o=0,a=t.place;o<r;o++,a++)i<<=8,i|=e[a];return t.place=a,i}function u(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function f(e,t){if(t<128)e.push(t);else{var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var n=new s;if(48!==e[n.place++])return!1;if(c(e,n)+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var o=c(e,n),a=e.slice(n.place,o+n.place);if(n.place+=o,2!==e[n.place++])return!1;var u=c(e,n);if(e.length!==u+n.place)return!1;var f=e.slice(n.place,u+n.place);return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===f[0]&&128&f[1]&&(f=f.slice(1)),this.r=new r(a),this.s=new r(f),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=u(t),n=u(n);!(n[0]||128&n[1]);)n=n.slice(1);var r=[2];f(r,t.length),(r=r.concat(t)).push(2),f(r,n.length);var o=r.concat(n),a=[48];return f(a,o.length),a=a.concat(o),i.encode(a,e)}},function(e,t,n){"use strict";var r=n(127),i=n(126),o=n(23),a=o.assert,s=o.parseBytes,c=n(440),u=n(441);function f(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof f))return new f(e);e=i[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512}e.exports=f,f.prototype.sign=function(e,t){e=s(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),i=this.g.mul(r),o=this.encodePoint(i),a=this.hashInt(o,n.pubBytes(),e).mul(n.priv()),c=r.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:c,Rencoded:o})},f.prototype.verify=function(e,t,n){e=s(e),t=this.makeSignature(t);var r=this.keyFromPublic(n),i=this.hashInt(t.Rencoded(),r.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(r.pub().mul(i)).eq(o)},f.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(e){return c.fromPublic(this,e)},f.prototype.keyFromSecret=function(e){return c.fromSecret(this,e)},f.prototype.makeSignature=function(e){return e instanceof u?e:new u(this,e)},f.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},f.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,n=e.slice(0,t).concat(-129&e[t]),r=0!=(128&e[t]),i=o.intFromLE(n);return this.curve.pointFromY(i,r)},f.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(e){return o.intFromLE(e)},f.prototype.isPoint=function(e){return e instanceof this.pointClass}},function(e,t,n){"use strict";var r=n(23),i=r.assert,o=r.parseBytes,a=r.cachedProperty;function s(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),a(s,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),a(s,"privBytes",function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r}),a(s,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),a(s,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),a(s,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),r.encode(this.secret(),e)},s.prototype.getPublic=function(e){return r.encode(this.pubBytes(),e)},e.exports=s},function(e,t,n){"use strict";var r=n(12),i=n(23),o=i.assert,a=i.cachedProperty,s=i.parseBytes;function c(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof r&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}a(c,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),a(c,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),a(c,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),a(c,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),c.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},c.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=c},function(e,t,n){"use strict";var r=n(70);t.certificate=n(452);var i=r.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});t.RSAPrivateKey=i;var o=r.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});t.RSAPublicKey=o;var a=r.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())});t.PublicKey=a;var s=r.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),c=r.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())});t.PrivateKey=c;var u=r.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});t.EncryptedPrivateKey=u;var f=r.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});t.DSAPrivateKey=f,t.DSAparam=r.define("DSAparam",function(){this.int()});var l=r.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())});t.ECPrivateKey=l;var d=r.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});t.signature=r.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},function(e,t,n){var r=n(70),i=n(1);function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(e){var t;try{t=n(444).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return i(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(r.decoders[e])),this.decoders[e]},o.prototype.decode=function(e,t,n){return this._getDecoder(t).decode(e,n)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(r.encoders[e])),this.encoders[e]},o.prototype.encode=function(e,t,n){return this._getEncoder(t).encode(e,n)}},function(module,exports){var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1},Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var n in e)t.push(n);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(e,t,n){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:n})}}catch(e){return function(e,t,n){e[t]=n}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw new TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var n=t.contentWindow,r=n.eval,i=n.execScript;!r&&i&&(i.call(n,"null"),r=n.eval),forEach(Object_keys(e),function(t){n[t]=e[t]}),forEach(globals,function(t){e[t]&&(n[t]=e[t])});var o=Object_keys(n),a=r.call(n,this.code);return forEach(Object_keys(n),function(t){(t in e||-1===indexOf(o,t))&&(e[t]=n[t])}),forEach(globals,function(t){t in e||defineProp(e,t,n[t])}),document.body.removeChild(t),a},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),n=this.runInContext(t);return e&&forEach(Object_keys(t),function(n){e[n]=t[n]}),n},forEach(Object_keys(Script.prototype),function(e){exports[e]=Script[e]=function(t){var n=Script(t);return n[e].apply(n,[].slice.call(arguments,1))}}),exports.isContext=function(e){return e instanceof Context},exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(e){var t=new Context;return"object"==typeof e&&forEach(Object_keys(e),function(n){t[n]=e[n]}),t}},function(e,t,n){var r=n(1);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.Reporter=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,n){var r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=n)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,n=t.obj;return t.obj=e,n},i.prototype.error=function(e){var t,n=this._reporterState,r=e instanceof o;if(t=r?e:new o(n.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!n.options.partial)throw t;return r||n.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},r(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},function(e,t,n){var r=n(71).Reporter,i=n(71).EncoderBuffer,o=n(71).DecoderBuffer,a=n(22),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function u(e,t){var n={};this._baseState=n,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.exports=u;var f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];u.prototype.clone=function(){var e=this._baseState,t={};f.forEach(function(n){t[n]=e[n]});var n=new this.constructor(t.parent);return n._baseState=t,n},u.prototype._wrap=function(){var e=this._baseState;c.forEach(function(t){this[t]=function(){var n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}},this)},u.prototype._init=function(e){var t=this._baseState;a(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),a.equal(t.children.length,1,"Root node can have only one child")},u.prototype._useArgs=function(e){var t=this._baseState,n=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==n.length&&(a(null===t.children),t.children=n,n.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(a(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach(function(n){n==(0|n)&&(n|=0);var r=e[n];t[r]=n}),t}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(e){u.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),s.forEach(function(e){u.prototype[e]=function(){var t=this._baseState,n=Array.prototype.slice.call(arguments);return a(null===t.tag),t.tag=e,this._useArgs(n),this}}),u.prototype.use=function(e){a(e);var t=this._baseState;return a(null===t.use),t.use=e,this},u.prototype.optional=function(){return this._baseState.optional=!0,this},u.prototype.def=function(e){var t=this._baseState;return a(null===t.default),t.default=e,t.optional=!0,this},u.prototype.explicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.explicit=e,this},u.prototype.implicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.implicit=e,this},u.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},u.prototype.key=function(e){var t=this._baseState;return a(null===t.key),t.key=e,this},u.prototype.any=function(){return this._baseState.any=!0,this},u.prototype.choice=function(e){var t=this._baseState;return a(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},u.prototype.contains=function(e){var t=this._baseState;return a(null===t.use),t.contains=e,this},u.prototype._decode=function(e,t){var n=this._baseState;if(null===n.parent)return e.wrapResult(n.children[0]._decode(e,t));var r,i=n.default,a=!0,s=null;if(null!==n.key&&(s=e.enterKey(n.key)),n.optional){var c=null;if(null!==n.explicit?c=n.explicit:null!==n.implicit?c=n.implicit:null!==n.tag&&(c=n.tag),null!==c||n.any){if(a=this._peekTag(e,c,n.any),e.isError(a))return a}else{var u=e.save();try{null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),a=!0}catch(e){a=!1}e.restore(u)}}if(n.obj&&a&&(r=e.enterObject()),a){if(null!==n.explicit){var f=this._decodeTag(e,n.explicit);if(e.isError(f))return f;e=f}var l=e.offset;if(null===n.use&&null===n.choice){if(n.any)u=e.save();var d=this._decodeTag(e,null!==n.implicit?n.implicit:n.tag,n.any);if(e.isError(d))return d;n.any?i=e.raw(u):e=d}if(t&&t.track&&null!==n.tag&&t.track(e.path(),l,e.length,"tagged"),t&&t.track&&null!==n.tag&&t.track(e.path(),e.offset,e.length,"content"),i=n.any?i:null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),e.isError(i))return i;if(n.any||null!==n.choice||null===n.children||n.children.forEach(function(n){n._decode(e,t)}),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){var h=new o(i);i=this._getUse(n.contains,e._reporterState.obj)._decode(h,t)}}return n.obj&&a&&(i=e.leaveObject(r)),null===n.key||null===i&&!0!==a?null!==s&&e.exitKey(s):e.leaveKey(s,n.key,i),i},u.prototype._decodeGeneric=function(e,t,n){var r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],n):/str$/.test(e)?this._decodeStr(t,e,n):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],n):"objid"===e?this._decodeObjid(t,null,null,n):"gentime"===e||"utctime"===e?this._decodeTime(t,e,n):"null_"===e?this._decodeNull(t,n):"bool"===e?this._decodeBool(t,n):"objDesc"===e?this._decodeStr(t,e,n):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,n):t.error("unknown tag: "+e)},u.prototype._getUse=function(e,t){var n=this._baseState;return n.useDecoder=this._use(e,t),a(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},u.prototype._decodeChoice=function(e,t){var n=this._baseState,r=null,i=!1;return Object.keys(n.choice).some(function(o){var a=e.save(),s=n.choice[o];try{var c=s._decode(e,t);if(e.isError(c))return!1;r={type:o,value:c},i=!0}catch(t){return e.restore(a),!1}return!0},this),i?r:e.error("Choice not matched")},u.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},u.prototype._encode=function(e,t,n){var r=this._baseState;if(null===r.default||r.default!==e){var i=this._encodeValue(e,t,n);if(void 0!==i&&!this._skipDefault(i,t,n))return i}},u.prototype._encodeValue=function(e,t,n){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new r);var o=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}var a=null,s=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,t);else if(i.contains)a=this._getUse(i.contains,n)._encode(e,t),s=!0;else if(i.children)a=i.children.map(function(n){if("null_"===n._baseState.tag)return n._encode(null,t,e);if(null===n._baseState.key)return t.error("Child should have a key");var r=t.enterKey(n._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var i=n._encode(e[n._baseState.key],t,e);return t.leaveKey(r),i},this).filter(function(e){return e}),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var c=this.clone();c._baseState.implicit=null,a=this._createEncoderBuffer(e.map(function(n){var r=this._baseState;return this._getUse(r.args[0],e)._encode(n,t)},c))}else null!==i.use?o=this._getUse(i.use,n)._encode(e,t):(a=this._encodePrimitive(i.tag,e),s=!0);if(!i.any&&null===i.choice){var u=null!==i.implicit?i.implicit:i.tag,f=null===i.implicit?"universal":"context";null===u?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(u,s,f,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},u.prototype._encodeChoice=function(e,t){var n=this._baseState,r=n.choice[e.type];return r||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(e.value,t)},u.prototype._encodePrimitive=function(e,t){var n=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&n.args)return this._encodeObjid(t,n.reverseArgs[0],n.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,n.args&&n.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},u.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},u.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},function(e,t,n){var r=n(190);t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r._reverse(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=r._reverse(t.tag)},function(e,t,n){var r=t;r.der=n(191),r.pem=n(449)},function(e,t,n){var r=n(1),i=n(9).Buffer,o=n(191);function a(e){o.call(this,e),this.enc="pem"}r(a,o),e.exports=a,a.prototype.decode=function(e,t){for(var n=e.toString().split(/[\r\n]+/g),r=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,c=-1,u=0;u<n.length;u++){var f=n[u].match(a);if(null!==f&&f[2]===r){if(-1!==s){if("END"!==f[1])break;c=u;break}if("BEGIN"!==f[1])break;s=u}}if(-1===s||-1===c)throw new Error("PEM section not found for: "+r);var l=n.slice(s+1,c).join("");l.replace(/[^a-z0-9\+\/=]+/gi,"");var d=new i(l,"base64");return o.prototype.decode.call(this,d,t)}},function(e,t,n){var r=t;r.der=n(192),r.pem=n(451)},function(e,t,n){var r=n(1),i=n(192);function o(e){i.call(this,e),this.enc="pem"}r(o,i),e.exports=o,o.prototype.encode=function(e,t){for(var n=i.prototype.encode.call(this,e).toString("base64"),r=["-----BEGIN "+t.label+"-----"],o=0;o<n.length;o+=64)r.push(n.slice(o,o+64));return r.push("-----END "+t.label+"-----"),r.join("\n")}},function(e,t,n){"use strict";var r=n(70),i=r.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),o=r.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),a=r.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),s=r.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}),c=r.define("RelativeDistinguishedName",function(){this.setof(o)}),u=r.define("RDNSequence",function(){this.seqof(c)}),f=r.define("Name",function(){this.choice({rdnSequence:this.use(u)})}),l=r.define("Validity",function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))}),d=r.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),h=r.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(f),this.key("validity").use(l),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())}),p=r.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(h),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())});e.exports=p},function(e){e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},function(e,t,n){var r=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r\+\/\=]+)-----END \1-----$/m,a=n(85),s=n(121),c=n(2).Buffer;e.exports=function(e,t){var n,u=e.toString(),f=u.match(r);if(f){var l="aes"+f[1],d=c.from(f[2],"hex"),h=c.from(f[3].replace(/[\r\n]/g,""),"base64"),p=a(t,d.slice(0,8),parseInt(f[1],10)).key,m=[],g=s.createDecipheriv(l,p,d);m.push(g.update(h)),m.push(g.final()),n=c.concat(m)}else{var b=u.match(o);n=new c(b[2].replace(/[\r\n]/g,""),"base64")}return{tag:u.match(i)[1],data:n}}},function(e,t,n){(function(t){var r=n(12),i=n(125).ec,o=n(87),a=n(193);function s(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}e.exports=function(e,n,c,u,f){var l=o(c);if("ec"===l.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(e,t,n){var r=a[n.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var o=new i(r),s=n.data.subjectPrivateKey.data;return o.verify(t,e,s)}(e,n,l)}if("dsa"===l.type){if("dsa"!==u)throw new Error("wrong public key type");return function(e,t,n){var i=n.data.p,a=n.data.q,c=n.data.g,u=n.data.pub_key,f=o.signature.decode(e,"der"),l=f.s,d=f.r;s(l,a),s(d,a);var h=r.mont(i),p=l.invm(a);return 0===c.toRed(h).redPow(new r(t).mul(p).mod(a)).fromRed().mul(u.toRed(h).redPow(d.mul(p).mod(a)).fromRed()).mod(i).mod(a).cmp(d)}(e,n,l)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");n=t.concat([f,n]);for(var d=l.modulus.byteLength(),h=[1],p=0;n.length+h.length+2<d;)h.push(255),p++;h.push(0);for(var m=-1;++m<n.length;)h.push(n[m]);h=new t(h);var g=r.mont(l.modulus);e=(e=new r(e).toRed(g)).redPow(new r(l.publicExponent)),e=new t(e.fromRed().toArray());var b=p<8?1:0;for(d=Math.min(e.length,h.length),e.length!==h.length&&(b=1),m=-1;++m<d;)b|=e[m]^h[m];return 0===b}}).call(this,n(9).Buffer)},function(e,t,n){(function(t){var r=n(125),i=n(12);e.exports=function(e){return new a(e)};var o={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function a(e){this.curveType=o[e],this.curveType||(this.curveType={name:e}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function s(e,n,r){Array.isArray(e)||(e=e.toArray());var i=new t(e);if(r&&i.length<r){var o=new t(r-i.length);o.fill(0),i=t.concat([o,i])}return n?i.toString(n):i}o.p224=o.secp224r1,o.p256=o.secp256r1=o.prime256v1,o.p192=o.secp192r1=o.prime192v1,o.p384=o.secp384r1,o.p521=o.secp521r1,a.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},a.prototype.computeSecret=function(e,n,r){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),s(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},a.prototype.getPublicKey=function(e,t){var n=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(n[n.length-1]%2?n[0]=7:n[0]=6),s(n,e)},a.prototype.getPrivateKey=function(e){return s(this.keys.getPrivate(),e)},a.prototype.setPublicKey=function(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this.keys._importPublic(e),this},a.prototype.setPrivateKey=function(e,n){n=n||"utf8",t.isBuffer(e)||(e=new t(e,n));var r=new i(e);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}}).call(this,n(9).Buffer)},function(e,t,n){t.publicEncrypt=n(458),t.privateDecrypt=n(459),t.privateEncrypt=function(e,n){return t.publicEncrypt(e,n,!0)},t.publicDecrypt=function(e,n){return t.privateDecrypt(e,n,!0)}},function(e,t,n){var r=n(87),i=n(59),o=n(66),a=n(194),s=n(195),c=n(12),u=n(196),f=n(124),l=n(2).Buffer;e.exports=function(e,t,n){var d;d=e.padding?e.padding:n?1:4;var h,p=r(e);if(4===d)h=function(e,t){var n=e.modulus.byteLength(),r=t.length,u=o("sha1").update(l.alloc(0)).digest(),f=u.length,d=2*f;if(r>n-d-2)throw new Error("message too long");var h=l.alloc(n-r-d-2),p=n-f-1,m=i(f),g=s(l.concat([u,h,l.alloc(1,1),t],p),a(m,p)),b=s(m,a(g,f));return new c(l.concat([l.alloc(1),b,g],n))}(p,t);else if(1===d)h=function(e,t,n){var r,o=t.length,a=e.modulus.byteLength();if(o>a-11)throw new Error("message too long");r=n?l.alloc(a-o-3,255):function(e){var t,n=l.allocUnsafe(e),r=0,o=i(2*e),a=0;for(;r<e;)a===o.length&&(o=i(2*e),a=0),(t=o[a++])&&(n[r++]=t);return n}(a-o-3);return new c(l.concat([l.from([0,n?1:2]),r,l.alloc(1),t],a))}(p,t,n);else{if(3!==d)throw new Error("unknown padding");if((h=new c(t)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return n?f(h,p):u(h,p)}},function(e,t,n){var r=n(87),i=n(194),o=n(195),a=n(12),s=n(124),c=n(66),u=n(196),f=n(2).Buffer;e.exports=function(e,t,n){var l;l=e.padding?e.padding:n?1:4;var d,h=r(e),p=h.modulus.byteLength();if(t.length>p||new a(t).cmp(h.modulus)>=0)throw new Error("decryption error");d=n?u(new a(t),h):s(t,h);var m=f.alloc(p-d.length);if(d=f.concat([m,d],p),4===l)return function(e,t){var n=e.modulus.byteLength(),r=c("sha1").update(f.alloc(0)).digest(),a=r.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,a+1),u=t.slice(a+1),l=o(s,i(u,a)),d=o(u,i(l,n-a-1));if(function(e,t){e=f.from(e),t=f.from(t);var n=0,r=e.length;e.length!==t.length&&(n++,r=Math.min(e.length,t.length));var i=-1;for(;++i<r;)n+=e[i]^t[i];return n}(r,d.slice(0,a)))throw new Error("decryption error");var h=a;for(;0===d[h];)h++;if(1!==d[h++])throw new Error("decryption error");return d.slice(h)}(h,d);if(1===l)return function(e,t,n){var r=t.slice(0,2),i=2,o=0;for(;0!==t[i++];)if(i>=t.length){o++;break}var a=t.slice(2,i-1);("0002"!==r.toString("hex")&&!n||"0001"!==r.toString("hex")&&n)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(i)}(0,d,n);if(3===l)return d;throw new Error("unknown padding")}},function(e,t,n){"use strict";(function(e,r){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=n(2),a=n(59),s=o.Buffer,c=o.kMaxLength,u=e.crypto||e.msCrypto,f=Math.pow(2,32)-1;function l(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>f||e<0)throw new TypeError("offset must be a uint32");if(e>c||e>t)throw new RangeError("offset out of range")}function d(e,t,n){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>f||e<0)throw new TypeError("size must be a uint32");if(e+t>n||e>c)throw new RangeError("buffer too small")}function h(e,t,n,i){if(r.browser){var o=e.buffer,s=new Uint8Array(o,t,n);return u.getRandomValues(s),i?void r.nextTick(function(){i(null,e)}):e}if(!i)return a(n).copy(e,t),e;a(n,function(n,r){if(n)return i(n);r.copy(e,t),i(null,e)})}u&&u.getRandomValues||!r.browser?(t.randomFill=function(t,n,r,i){if(!(s.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof n)i=n,n=0,r=t.length;else if("function"==typeof r)i=r,r=t.length-n;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return l(n,t.length),d(r,n,t.length),h(t,n,r,i)},t.randomFillSync=function(t,n,r){void 0===n&&(n=0);if(!(s.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');l(n,t.length),void 0===r&&(r=t.length-n);return d(r,n,t.length),h(t,n,r)}):(t.randomFill=i,t.randomFillSync=i)}).call(this,n(38),n(35))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=this&&this.__decorate||function(e,t,n,r){var o,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===("undefined"==typeof Reflect?"undefined":i(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":i(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var c=n(15),u=n(197),f=n(466),l=n(467),d=n(40),h=n(128),p=n(198),m=n(7),g=n(201),b="@signageos/front-applet:FrontApplet:Video",v=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.onceDeferredIndex={},this.eventEmitter=new c.EventEmitter}var t,n,i;return t=e,(n=[{key:"play",value:function(e,t,n,r,i){return s(this,void 0,void 0,regeneratorRuntime.mark(function o(){var a,s,c,u;return regeneratorRuntime.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return this.checkParamsValidity(e,t,n,r,i),a=g.sanitizeCoordinations({x:t,y:n,width:r,height:i}),t=a.x,n=a.y,r=a.width,i=a.height,this.removeAllVideoListeners(e,t,n,r,i),s=this.createOncePromise("ended",e,t,n,r,i),c=this.createOncePromise("stop",e,t,n,r,i),o.next=11,this.postMessage({type:this.getMessage("play"),uri:e,x:t,y:n,width:r,height:i});case 11:u=f.stringifySrcArguments(e,t,n,r,i),this.onceDeferredIndex[u]={ended:s,stop:c},this.createAndEmitEvent("play",e,t,n,r,i);case 14:case"end":return o.stop()}},o,this)}))}},{key:"prepare",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return s(this,void 0,void 0,regeneratorRuntime.mark(function a(){var s;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return this.checkParamsValidity(e,t,n,r,i),s=g.sanitizeCoordinations({x:t,y:n,width:r,height:i}),t=s.x,n=s.y,r=s.width,i=s.height,a.next=8,this.postMessage({type:this.getMessage("prepare"),uri:e,x:t,y:n,width:r,height:i,options:o});case 8:this.createAndEmitEvent("prepare",e,t,n,r,i);case 9:case"end":return a.stop()}},a,this)}))}},{key:"stop",value:function(e,t,n,r,i){var o,a,c;return s(this,void 0,void 0,regeneratorRuntime.mark(function s(){var u,p;return regeneratorRuntime.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return this.checkParamsValidity(e,t,n,r,i),u=g.sanitizeCoordinations({x:t,y:n,width:r,height:i}),t=u.x,n=u.y,r=u.width,i=u.height,s.next=8,this.postMessage({type:this.getMessage("stop"),uri:e,x:t,y:n,width:r,height:i});case 8:this.createAndEmitEvent("stop",e,t,n,r,i),p=f.stringifySrcArguments(e,t,n,r,i),null===(c=null===(o=this.onceDeferredIndex[p])||void 0===o?void 0:(a=o.ended).reject)||void 0===c||c.call(a,new l.default({kind:"appletVideoError",message:"This video was stopped already. The arguments: ".concat(p),code:d.default.VIDEO_WAS_STOPPED_ALREADY,suggestion:h.default.VIDEO_WAS_STOPPED_ALREADY})),delete this.onceDeferredIndex[p];case 12:case"end":return s.stop()}},s,this)}))}},{key:"pause",value:function(e,t,n,r,i){return s(this,void 0,void 0,regeneratorRuntime.mark(function o(){var a;return regeneratorRuntime.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return this.checkParamsValidity(e,t,n,r,i),a=g.sanitizeCoordinations({x:t,y:n,width:r,height:i}),t=a.x,n=a.y,r=a.width,i=a.height,o.next=8,this.postMessage({type:this.getMessage("pause"),uri:e,x:t,y:n,width:r,height:i});case 8:this.createAndEmitEvent("pause",e,t,n,r,i);case 9:case"end":return o.stop()}},o,this)}))}},{key:"resume",value:function(e,t,n,r,i){return s(this,void 0,void 0,regeneratorRuntime.mark(function o(){var a;return regeneratorRuntime.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return this.checkParamsValidity(e,t,n,r,i),a=g.sanitizeCoordinations({x:t,y:n,width:r,height:i}),t=a.x,n=a.y,r=a.width,i=a.height,o.next=8,this.postMessage({type:this.getMessage("resume"),uri:e,x:t,y:n,width:r,height:i});case 8:this.createAndEmitEvent("resume",e,t,n,r,i);case 9:case"end":return o.stop()}},o,this)}))}},{key:"onceEnded",value:function(e,t,n,r,i){this.checkParamsValidity(e,t,n,r,i);var o=g.sanitizeCoordinations({x:t,y:n,width:r,height:i});t=o.x,n=o.y,r=o.width,i=o.height;var a=f.stringifySrcArguments(e,t,n,r,i),s=this.onceDeferredIndex[a];if(void 0===s)throw new l.default({kind:"appletVideoError",message:"This video was not played yet. The arguments: ".concat(a),code:d.default.VIDEO_WAS_NOT_PLAYED_YET,suggestion:h.default.VIDEO_WAS_NOT_PLAYED});return s.ended.oncePromise}},{key:"onceStop",value:function(e,t,n,r,i){this.checkParamsValidity(e,t,n,r,i);var o=g.sanitizeCoordinations({x:t,y:n,width:r,height:i});t=o.x,n=o.y,r=o.width,i=o.height;var a=f.stringifySrcArguments(e,t,n,r,i),s=this.onceDeferredIndex[a];if(void 0===s)throw new l.default({kind:"appletVideoError",message:"This video was not played yet. The arguments: ".concat(a),code:d.default.VIDEO_WAS_NOT_PLAYED_YET,suggestion:h.default.VIDEO_WAS_NOT_PLAYED});return s.stop.oncePromise}},{key:"onPlay",value:function(e){m.default({listener:e}).required().function(),this.eventEmitter.addListener("play",e)}},{key:"onPrepare",value:function(e){m.default({listener:e}).required().function(),this.eventEmitter.addListener("prepare",e)}},{key:"onStop",value:function(e){m.default({listener:e}).required().function(),this.eventEmitter.addListener("stop",e)}},{key:"onPause",value:function(e){m.default({listener:e}).required().function(),this.eventEmitter.addListener("pause",e)}},{key:"onResume",value:function(e){m.default({listener:e}).required().function(),this.eventEmitter.addListener("resume",e)}},{key:"onEnded",value:function(e){m.default({listener:e}).required().function(),this.eventEmitter.addListener("ended",e)}},{key:"onError",value:function(e){m.default({listener:e}).required().function(),this.eventEmitter.addListener("error",e)}},{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage("ended"):case this.getMessage("error"):var t=e.type.substring(this.getMessage("").length);this.createAndEmitEvent(t,e.uri,e.x,e.y,e.width,e.height)}}},{key:"removeEventListeners",value:function(){this.eventEmitter.removeAllListeners()}},{key:"createOncePromise",value:function(e,t,n,r,i,o){var a=this,s={};return s.oncePromise=new Promise(function(c,u){s.reject=u;var l={uri:t,x:n,y:r,width:i,height:o},h=f.getEventName({type:e,srcArguments:l}),m=f.getEventName({type:"error",srcArguments:l}),g=function s(f){JSON.stringify(f.srcArguments)===JSON.stringify({uri:t,x:n,y:r,width:i,height:o})&&(a.eventEmitter.removeListener(h,s),a.eventEmitter.removeListener(m,s),f.type===e?c():"error"===f.type&&u(new p.default({kind:"sosError",message:JSON.stringify(f.srcArguments),code:d.default.UNEXPECTED_EXCEPTION})))};a.eventEmitter.addListener(h,g),a.eventEmitter.addListener(m,g)}),s}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}},{key:"removeAllVideoListeners",value:function(e,t,n,r,i){var o=!0,a=!1,s=void 0;try{for(var c,u=f.VIDEO_EVENT_TYPES[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var l=c.value,d=f.getEventName({type:l,srcArguments:{uri:e,x:t,y:n,width:r,height:i}});this.eventEmitter.removeAllListeners(d)}}catch(e){a=!0,s=e}finally{try{o||null==u.return||u.return()}finally{if(a)throw s}}}},{key:"createAndEmitEvent",value:function(e,t,n,r,i,o){var a={type:e,srcArguments:{uri:t,x:n,y:r,width:i,height:o}},s=f.getEventName(a);this.eventEmitter.emit(s,a),this.eventEmitter.emit(a.type,a)}},{key:"checkParamsValidity",value:function(e,t,n,r,i){m.default({uri:e}).required().uri(),m.default({x:t}).required().number(),m.default({y:n}).required().number(),m.default({width:r}).required().number(),m.default({height:i}).required().number()}}])&&r(t.prototype,n),i&&r(t,i),e}();v.MESSAGE_PREFIX="video",o([u.debug(b),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number]),a("design:returntype",Promise)],v.prototype,"play",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number,Object]),a("design:returntype",Promise)],v.prototype,"prepare",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number]),a("design:returntype",Promise)],v.prototype,"stop",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number]),a("design:returntype",Promise)],v.prototype,"pause",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number]),a("design:returntype",Promise)],v.prototype,"resume",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number]),a("design:returntype",void 0)],v.prototype,"onceEnded",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number]),a("design:returntype",void 0)],v.prototype,"onceStop",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],v.prototype,"onPlay",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],v.prototype,"onPrepare",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],v.prototype,"onStop",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],v.prototype,"onPause",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],v.prototype,"onResume",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],v.prototype,"onEnded",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],v.prototype,"onError",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[]),a("design:returntype",void 0)],v.prototype,"removeEventListeners",null),t.default=v},function(e,t,n){(function(r){var i;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(i=!1,function(){i||(i=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=n(463)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(35))},function(e,t,n){function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}e.exports=function(e){function t(e){var n,r,o,a=null;function s(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];if(s.enabled){var o=s,a=Number(new Date),c=a-(n||a);o.diff=c,o.prev=n,o.curr=a,n=a,r[0]=t.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");var u=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,function(e,n){if("%%"===e)return"%";u++;var i=t.formatters[n];if("function"==typeof i){var a=r[u];e=i.call(o,a),r.splice(u,1),u--}return e}),t.formatArgs.call(o,r),(o.log||t.log).apply(o,r)}}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=i,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==a?a:(r!==t.namespaces&&(r=t.namespaces,o=t.enabled(e)),o)},set:function(e){a=e}}),"function"==typeof t.init&&t.init(s),s}function i(e,n){var r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){var e=[].concat(r(t.names.map(o)),r(t.skips.map(o).map(function(e){return"-"+e}))).join(",");return t.enable(""),e},t.enable=function(e){var n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(464),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(function(n){t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},function(e,t){var n=1e3,r=60*n,i=60*r,o=24*i,a=7*o,s=365.25*o;function c(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,t){t=t||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var c=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"weeks":case"week":case"w":return c*a;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*i;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===u&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return c(e,t,o,"day");if(t>=i)return c(e,t,i,"hour");if(t>=r)return c(e,t,r,"minute");if(t>=n)return c(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=o)return Math.round(e/o)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateSalt=t.generateUniqueHash=void 0;var r=n(162);t.generateUniqueHash=function(e){void 0===e&&(e=50);var t=(0,r.createHash)("sha256");return t.update(""+(new Date).valueOf()+Math.random()),t.digest("hex").substring(0,e)},t.generateSalt=function(e){return(0,r.randomBytes)(e).toString("hex").substring(0,e)}},function(e,t,n){"use strict";function r(e,t,n,r,i){return"".concat(e,"$").concat(t,"_").concat(n,"_").concat(r,"_").concat(i)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringifySrcArguments=t.getEventName=t.VIDEO_EVENT_TYPES=void 0,t.VIDEO_EVENT_TYPES=["prepare","play","stop","pause","resume","ended","error"],t.getEventName=function(e){var t=r(e.srcArguments.uri,e.srcArguments.x,e.srcArguments.y,e.srcArguments.width,e.srcArguments.height);return"".concat(e.type,"_").concat(t)},t.stringifySrcArguments=r},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(52),c=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,o(t).call(this,Object.assign(Object.assign({},e),{pathToDocs:t.PATH_TO_DOCS,kind:"appletError",type:e.type?e.type:"AppletVideoError"})))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,s["default"]),t}();t.default=c,c.PATH_TO_DOCS="/api/js/js-video"},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a=n(200),s=n(129),c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,c;return t=e,(n=[{key:"validate",value:function(e,t,n){if("object"!==r(e))throw new Error("invalid object interface, needs to be object");var i=!0;for(var o in e)if(e.hasOwnProperty(o)){var a=e[o];if("object"===r(a)){var s=this.validateTypingObject(a,o,t);!0!==s&&(i=!0===i?s:i+"\n"+s)}else{var c=this.validateType(a,o,t);!0!==c&&(i=!0===i?c:i+"\n"+c)}}return void 0===n&&void 0!==this.error&&!0!==i&&this.throwError(this.error,i),!0===i||"".concat(void 0!==n?"".concat(n,":\n"):""," {\n").concat(i,"\n}")}},{key:"validateType",value:function(e,t,n){var i=!e.startsWith("?");return e=i?e:e.substring(1),!i&&!n.hasOwnProperty(t)||(i&&!n.hasOwnProperty(t)?"".concat(t,": is required"):r(n[t])===e||"".concat(t,": needs to be type ").concat(e,". Got ").concat(r(n[t])))}},{key:"validateTypingObject",value:function(e,t,n){var i=void 0!==e.error?e.error:void 0;for(var a in e)if(e.hasOwnProperty(a)&&"error"!==a&&(o.validatableType.includes(a)||o.validatableType.includes(a.substr(1)))){var s=e[a],c=!a.startsWith("?");if(a=c?a:a.substring(1),!n.hasOwnProperty(t)){if(c){var u="".concat(t,": is required");return void 0===this.error&&void 0!==i&&(this.error=i),u}return!0}var f=n[t];if(r(f)!==("array"===a?"object":a)){var l="".concat(t,": needs to be type ").concat(a,". Got ").concat(r(f));return void 0===this.error&&void 0!==i&&(this.error=i),l}if(("string"===a||"number"===a)&&Array.isArray(s)&&!s.includes(f)){var d="".concat(t,": has to be one of ").concat(JSON.stringify(s));return void 0===this.error&&void 0!==i&&(this.error=i),d}if("array"===a){var h=this.validateArray(s,t,f);if(!0!==h)return void 0===this.error&&void 0!==i&&(this.error=i),h}if("object"===a)return this.validate(s,f,t)}return!0}},{key:"validateArray",value:function(e,t,n){var i;i="string"==typeof e?[e]:Array.isArray(e)?e:Object.keys(e).filter(function(e){return"error"!==e});var a=!0,s=!1,c=void 0;try{for(var u,f=n[Symbol.iterator]();!(a=(u=f.next()).done);a=!0){var l=u.value,d=o.Validate.validateType(i,l);if(!0!==d)return"has to be array of types: ".concat(JSON.stringify(i),". ").concat(JSON.stringify(l)," is ").concat(d," instead");if("object"===r(l)&&void 0!==e.object){var h=this.validate(e.object,l,t);if(!0!==h)return h}}}catch(e){s=!0,c=e}finally{try{a||null==f.return||f.return()}finally{if(s)throw c}}return!0}},{key:"throwError",value:function(e,t){throw new a.default({kind:"appletResourcesError",message:"".concat(s.default[e.code],"\n\nValidation info:\n").concat(t,"\n"),code:e.code})}}])&&i(t.prototype,n),c&&i(t,c),e}();t.default=c},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=this&&this.__decorate||function(e,t,n,r){var o,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===("undefined"==typeof Reflect?"undefined":i(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":i(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var c=n(15),u=n(197),f=n(470),l=n(40),d=n(7),h=n(201),p="@signageos/front-applet:FrontApplet:Stream",m=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.eventEmitter=new c.EventEmitter}var t,n,i;return t=e,(n=[{key:"prepare",value:function(e,t,n,r,i,o){return s(this,void 0,void 0,regeneratorRuntime.mark(function a(){var s,c;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(c=void 0,(null==(s="string"==typeof o?{protocol:o}:o)?void 0:s.protocol)&&(c=s.protocol),!c||"string"==typeof c){a.next=5;break}throw new f.default({kind:"appletStreamError",message:"Invalid format of protocol, must be string.",code:l.default.STREAM_INVALID_PROTOCOL_TYPE});case 5:return this.checkParamsValidity(e,t,n,r,i),this.createAndEmitEvent("prepare",{type:"prepare",srcArguments:{uri:e,x:t,y:n,width:r,height:i,protocol:c}}),a.abrupt("return",this.postMessage({type:this.getMessage("prepare"),uri:e,x:t,y:n,width:r,height:i,protocol:c,options:s}));case 8:case"end":return a.stop()}},a,this)}))}},{key:"play",value:function(e,t,n,r,i,o){return s(this,void 0,void 0,regeneratorRuntime.mark(function a(){var s,c,u;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(c=void 0,(null==(s="string"==typeof o?{protocol:o}:o)?void 0:s.protocol)&&(c=s.protocol),this.checkParamsValidity(e,t,n,r,i),u=h.sanitizeCoordinations({x:t,y:n,width:r,height:i}),t=u.x,n=u.y,r=u.width,i=u.height,!c||"string"==typeof c){a.next=11;break}throw new f.default({kind:"appletStreamError",message:"Invalid format of protocol, must be string.",code:l.default.STREAM_INVALID_PROTOCOL_TYPE});case 11:return this.createAndEmitEvent("play",{type:"play",srcArguments:{uri:e,x:t,y:n,width:r,height:i,protocol:c}}),a.abrupt("return",this.postMessage({type:this.getMessage("play"),uri:e,x:t,y:n,width:r,height:i,protocol:c,options:s}));case 13:case"end":return a.stop()}},a,this)}))}},{key:"stop",value:function(e,t,n,r,i){return s(this,void 0,void 0,regeneratorRuntime.mark(function o(){var a;return regeneratorRuntime.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return this.checkParamsValidity(e,t,n,r,i),a=h.sanitizeCoordinations({x:t,y:n,width:r,height:i}),t=a.x,n=a.y,r=a.width,i=a.height,this.createAndEmitEvent("stop",{type:"stop",srcArguments:{uri:e,x:t,y:n,width:r,height:i}}),o.abrupt("return",this.postMessage({type:this.getMessage("stop"),uri:e,x:t,y:n,width:r,height:i}));case 8:case"end":return o.stop()}},o,this)}))}},{key:"pause",value:function(e,t,n,r,i){this.checkParamsValidity(e,t,n,r,i);var o=h.sanitizeCoordinations({x:t,y:n,width:r,height:i});return t=o.x,n=o.y,r=o.width,i=o.height,this.createAndEmitEvent("pause",{type:"pause",srcArguments:{uri:e,x:t,y:n,width:r,height:i}}),this.postMessage({type:this.getMessage("pause"),uri:e,x:t,y:n,width:r,height:i})}},{key:"resume",value:function(e,t,n,r,i){this.checkParamsValidity(e,t,n,r,i);var o=h.sanitizeCoordinations({x:t,y:n,width:r,height:i});return t=o.x,n=o.y,r=o.width,i=o.height,this.createAndEmitEvent("resume",{type:"resume",srcArguments:{uri:e,x:t,y:n,width:r,height:i}}),this.postMessage({type:this.getMessage("resume"),uri:e,x:t,y:n,width:r,height:i})}},{key:"getTracks",value:function(e){return s(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return d.default({videoId:e}).required().object(),t.next=3,this.postMessage({type:this.getMessage("get_tracks"),videoId:e});case 3:return n=t.sent,r=n.tracks,t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}))}},{key:"selectTrack",value:function(e,t,n,r){return s(this,void 0,void 0,regeneratorRuntime.mark(function i(){return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return d.default({videoId:e}).required().object(),d.default({trackType:t}).required().string(),d.default({groupId:n}).required().string(),d.default({trackIndex:r}).required().number(),i.abrupt("return",this.postMessage({type:this.getMessage("select_track"),videoId:e,trackType:t,groupId:n,trackIndex:r}));case 5:case"end":return i.stop()}},i,this)}))}},{key:"resetTrack",value:function(e,t,n){return s(this,void 0,void 0,regeneratorRuntime.mark(function r(){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return d.default({videoId:e}).required().object(),d.default({trackType:t}).required().string(),n&&d.default({groupId:n}).string(),r.abrupt("return",this.postMessage({type:this.getMessage("reset_track"),videoId:e,trackType:t,groupId:n}));case 4:case"end":return r.stop()}},r,this)}))}},{key:"onTracksChanged",value:function(e){d.default({listener:e}).required().function(),this.eventEmitter.on("tracks_changed",e)}},{key:"onError",value:function(e){d.default({listener:e}).required().function(),this.eventEmitter.on("error",e)}},{key:"onConnected",value:function(e){d.default({listener:e}).required().function(),this.eventEmitter.on("connected",e)}},{key:"onDisconnected",value:function(e){d.default({listener:e}).required().function(),this.eventEmitter.on("disconnected",e)}},{key:"onPrepare",value:function(e){d.default({listener:e}).required().function(),this.eventEmitter.on("prepare",e)}},{key:"onPlay",value:function(e){d.default({listener:e}).required().function(),this.eventEmitter.on("play",e)}},{key:"onStop",value:function(e){d.default({listener:e}).required().function(),this.eventEmitter.on("stop",e)}},{key:"onPause",value:function(e){d.default({listener:e}).required().function(),this.eventEmitter.on("pause",e)}},{key:"onResume",value:function(e){d.default({listener:e}).required().function(),this.eventEmitter.on("resume",e)}},{key:"handleMessageData",value:function(e){var t,n,r,i,o,a;switch(e.type){case this.getMessage("error"):this.createAndEmitEvent("error",{type:"error",srcArguments:{uri:e.uri,x:e.x,y:e.y,width:e.width,height:e.height,protocol:null!==(n=null===(t=e.options)||void 0===t?void 0:t.protocol)&&void 0!==n?n:e.protocol},errorMessage:e.errorMessage});break;case this.getMessage("connected"):this.createAndEmitEvent("connected",{type:"connected",srcArguments:{uri:e.uri,x:e.x,y:e.y,width:e.width,height:e.height,protocol:null!==(i=null===(r=e.options)||void 0===r?void 0:r.protocol)&&void 0!==i?i:e.protocol}});break;case this.getMessage("disconnected"):this.createAndEmitEvent("disconnected",{type:"disconnected",srcArguments:{uri:e.uri,x:e.x,y:e.y,width:e.width,height:e.height,protocol:null!==(a=null===(o=e.options)||void 0===o?void 0:o.protocol)&&void 0!==a?a:e.protocol}});break;case this.getMessage("tracks_changed"):this.createAndEmitEvent("tracks_changed",{type:"tracks_changed",srcArguments:{uri:e.uri,x:e.x,y:e.y,width:e.width,height:e.height},tracks:e.tracks})}}},{key:"removeEventListeners",value:function(){this.eventEmitter.removeAllListeners()}},{key:"createAndEmitEvent",value:function(e,t){this.eventEmitter.emit(e,t)}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}},{key:"checkParamsValidity",value:function(e,t,n,r,i){d.default({uri:e}).required().uri(),d.default({x:t}).required().number(),d.default({y:n}).required().number(),d.default({width:r}).required().number(),d.default({height:i}).required().number()}}])&&r(t.prototype,n),i&&r(t,i),e}();m.MESSAGE_PREFIX="stream",o([u.debug(p),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number,Object]),a("design:returntype",Promise)],m.prototype,"prepare",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number,Object]),a("design:returntype",Promise)],m.prototype,"play",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number]),a("design:returntype",Promise)],m.prototype,"stop",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number]),a("design:returntype",Promise)],m.prototype,"pause",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number]),a("design:returntype",Promise)],m.prototype,"resume",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",Promise)],m.prototype,"getTracks",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Object,String,String,Number]),a("design:returntype",Promise)],m.prototype,"selectTrack",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Object,String,String]),a("design:returntype",Promise)],m.prototype,"resetTrack",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],m.prototype,"onTracksChanged",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],m.prototype,"onError",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],m.prototype,"onConnected",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],m.prototype,"onDisconnected",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],m.prototype,"onPrepare",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],m.prototype,"onPlay",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],m.prototype,"onStop",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],m.prototype,"onPause",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],m.prototype,"onResume",null),t.default=m},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(52),c=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,o(t).call(this,Object.assign(Object.assign({},e),{kind:"appletError",type:e.type?e.type:"AppletStreamError"})))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,s["default"]),t}();t.default=c},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(472),a=n(475),s=n(476),c=n(477),u=n(202),f=n(481),l=n(482),d=n(483),h=n(7),p=function(){function e(t,n,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.window=n,this.postMessage=r,this.FlagControllers=[s.default],this.LoadFileControllers=[u.default,f.default],this.cache=new o.default(this.getMessagePrefix(),this.postMessage),this.types=a.default,this.loadFile=this.LoadFileControllers.reduce(function(e,t){var n=new t(i.window);return e[n.name]=n,e},{}),this.flagControllers=this.FlagControllers.reduce(function(e,t){var n=new t(i.loadFile);return e[n.name]=n,e},{}),this.flags=Object.keys(this.flagControllers).reduce(function(e,t){var n=i.flagControllers[t];return e[n.name]=function(){return n.create.apply(n,arguments)},e},{append:null})}var t,n,p;return t=e,(n=[{key:"addFiles",value:function(e){var t=this;h.default({addFiles:e}).required().array("object");var n=e.map(function(e){return t.addFile(e)});return Promise.all(n)}},{key:"addFilesSync",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r,i,o,a,s;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:h.default({addFiles:e}).required().array("object"),n=!0,r=!1,i=void 0,t.prev=4,o=e[Symbol.iterator]();case 6:if(n=(a=o.next()).done){t.next=13;break}return s=a.value,t.next=10,this.addFile(s);case 10:n=!0,t.next=6;break;case 13:t.next=19;break;case 15:t.prev=15,t.t0=t.catch(4),r=!0,i=t.t0;case 19:t.prev=19,t.prev=20,n||null==o.return||o.return();case 22:if(t.prev=22,!r){t.next=25;break}throw i;case 25:return t.finish(22);case 26:return t.finish(19);case 27:case"end":return t.stop()}},t,this,[[4,15,19,27],[20,,22,26]])}))}},{key:"addFile",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r,i,o,a,s,u,f;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return h.default({addFile:e}).required().object(c.VISaveFile),t.next=3,this.cache.loadOrSaveFile(e.uid,e.uri,e.headers);case 3:n=t.sent,r=e.flags||[],i=!0,o=!1,a=void 0,t.prev=8,s=r[Symbol.iterator]();case 10:if(i=(u=s.next()).done){t.next=17;break}return f=u.value,t.next=14,this.handleFileFlag(f,n,e.type);case 14:i=!0,t.next=10;break;case 17:t.next=23;break;case 19:t.prev=19,t.t0=t.catch(8),o=!0,a=t.t0;case 23:t.prev=23,t.prev=24,i||null==s.return||s.return();case 26:if(t.prev=26,!o){t.next=29;break}throw a;case 29:return t.finish(26);case 30:return t.finish(23);case 31:case"end":return t.stop()}},t,this,[[8,19,23,31],[24,,26,30]])}))}},{key:"addFont",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r,o,a=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return h.default({addFont:e}).required().object(l.VIAddFont),n=d.fontFaceGenerator(this.window,e),r=Object.keys(e.formats).map(function(t){return i(a,void 0,void 0,regeneratorRuntime.mark(function r(){var i;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.cache.loadOrSaveFile(d.generateFontUid(e.uid,t),e.formats[t]);case 2:i=r.sent,n.setFormat(t,i.filePath);case 4:case"end":return r.stop()}},r,this)}))}),t.next=5,Promise.all(r);case 5:o=n.generateStyleElement(),e.append.appendChild(o);case 7:case"end":return t.stop()}},t,this)}))}},{key:"handleFileFlag",value:function(e,t,n){return i(this,void 0,void 0,regeneratorRuntime.mark(function r(){var i,o;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(void 0!==(i=this.flagControllers[e.type])){r.next=3;break}throw new Error("Not implemented apply flag "+e.type);case 3:return o=t.filePath,r.next=6,i.applyFlag(e,n,o);case 6:case"end":return r.stop()}},r,this)}))}},{key:"getMessagePrefix",value:function(){return this.messagePrefix+"."+e.MESSAGE_PREFIX}}])&&r(t.prototype,n),p&&r(t,p),e}();t.default=p,p.MESSAGE_PREFIX="offline"},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var a=n(473),s=n(40),c=n(474),u=n(7),f=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.savedFiles={},this.savedContents={}}var t,n,f;return t=e,(n=[{key:"listFiles",value:function(){return o(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("list_files")});case 2:return t=e.sent,e.abrupt("return",t.fileUids);case 4:case"end":return e.stop()}},e,this)}))}},{key:"loadFile",value:function(e){return o(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return u.default({uid:e}).required().string(),t.next=3,this.postMessage({type:this.getMessage("load_file"),uid:e});case 3:return n=t.sent,this.savedFiles[e]=n.loadedFile,t.abrupt("return",n.loadedFile);case 6:case"end":return t.stop()}},t,this)}))}},{key:"saveFile",value:function(e,t,n){return o(this,void 0,void 0,regeneratorRuntime.mark(function r(){var i;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(this.checkUidValidity(e),!n||this.isHeaders(n)){r.next=3;break}throw new c.default({kind:"appletOfflineCacheError",message:"Invalid headers ".concat(n),code:s.default.OFFLINE_CACHE_HEADERS_NOT_VALID});case 3:return r.next=5,this.postMessage({type:this.getMessage("save_file"),uid:e,uri:t,headers:n});case 5:i=r.sent,this.savedFiles[e]=i.savedFile;case 7:case"end":return r.stop()}},r,this)}))}},{key:"loadOrSaveFile",value:function(e,t,n){return o(this,void 0,void 0,regeneratorRuntime.mark(function r(){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return u.default({uid:e}).required().string(),u.default({uri:t}).required().uri(),r.prev=2,r.abrupt("return",this.getCachedFile(e));case 6:return r.prev=6,r.t0=r.catch(2),r.prev=8,r.next=11,this.loadFile(e);case 11:return r.abrupt("return",r.sent);case 14:return r.prev=14,r.t1=r.catch(8),r.next=18,this.saveFile(e,t,n);case 18:return r.abrupt("return",this.getCachedFile(e));case 19:case"end":return r.stop()}},r,this,[[2,6],[8,14]])}))}},{key:"deleteFile",value:function(e){return o(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.checkUidValidity(e),t.next=3,this.postMessage({type:this.getMessage("delete_file"),uid:e});case 3:delete this.savedFiles[e];case 4:case"end":return t.stop()}},t,this)}))}},{key:"listContents",value:function(){return o(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("list_contents")});case 2:return t=e.sent,e.abrupt("return",t.contentUids);case 4:case"end":return e.stop()}},e,this)}))}},{key:"loadContent",value:function(e){return o(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.postMessage({type:this.getMessage("load_content"),uid:e});case 2:return n=t.sent,this.savedContents[e]=n.loadedContent,t.abrupt("return",n.loadedContent);case 5:case"end":return t.stop()}},t,this)}))}},{key:"saveContent",value:function(e,t){return o(this,void 0,void 0,regeneratorRuntime.mark(function n(){var r;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return this.checkUidValidity(e),u.default({content:t}).required().string(),n.next=4,this.postMessage({type:this.getMessage("save_content"),uid:e,content:""+t});case 4:r=n.sent,this.savedContents[e]=r.savedContent;case 6:case"end":return n.stop()}},n,this)}))}},{key:"deleteContent",value:function(e){return o(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.checkUidValidity(e),t.next=3,this.postMessage({type:this.getMessage("delete_content"),uid:e});case 3:delete this.savedContents[e];case 4:case"end":return t.stop()}},t,this)}))}},{key:"validateChecksumFile",value:function(e,t,n){return o(this,void 0,void 0,regeneratorRuntime.mark(function r(){var i;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return this.checkUidValidity(e),u.default({hash:t}).required().string(),u.default({hashType:n}).required().string(),r.next=5,this.postMessage({type:this.getMessage("validate_checksum"),uid:e,hash:t,hashType:n});case 5:return i=r.sent,r.abrupt("return",i.validatedChecksum);case 7:case"end":return r.stop()}},r,this)}))}},{key:"getChecksumFile",value:function(e,t){return o(this,void 0,void 0,regeneratorRuntime.mark(function n(){var r;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return this.checkUidValidity(e),u.default({hashType:t}).required().string(),n.next=4,this.postMessage({type:this.getMessage("get_checksum"),uid:e,hashType:t});case 4:return r=n.sent,n.abrupt("return",r.checksum);case 6:case"end":return n.stop()}},n,this)}))}},{key:"decompressFile",value:function(e,t,n){return o(this,void 0,void 0,regeneratorRuntime.mark(function r(){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return this.checkUidValidity(e),u.default({destinationUid:t}).required().string(),r.next=4,this.postMessage({type:this.getMessage("decompress_file"),uid:e,destinationUid:t,method:n});case 4:case"end":return r.stop()}},r,this)}))}},{key:"getCachedFile",value:function(e){if(void 0===this.savedFiles[e])throw new a.default({kind:"fileNotFoundError",message:"File was not found "+e,code:s.default.FILE_NOT_FOUND_IN_CACHE});return this.savedFiles[e]}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}},{key:"checkUidValidity",value:function(e){return u.default({uid:e}).required().string().matchRegExp(/^[^\\:*"<>|]+$/g,s.default.OFFLINE_CACHE_UID_NOT_VALID),!0}},{key:"isHeaders",value:function(e){return"object"===r(e)&&(Object.getOwnPropertyNames(e).forEach(function(t){if("string"!=typeof t||"string"!=typeof e[t])return!1}),!0)}}])&&i(t.prototype,n),f&&i(t,f),e}();t.default=f,f.MESSAGE_PREFIX="cache"},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(52),c=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,o(t).call(this,Object.assign(Object.assign({},e),{kind:"appletError",type:e.type?e.type:"FileNotFoundError"})))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,s["default"]),t}();t.default=c},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(52),c=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,o(t).call(this,Object.assign(Object.assign({},e),{kind:"appletError",type:e.type?e.type:"AppletOfflineCacheError"})))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,s["default"]),t}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={javascript:"javascript",css:"css",video:"video"}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var a=n(161),s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.loadFile=t,this.name="append",this.elementCache={}}var t,n,s;return t=e,(n=[{key:"create",value:function(e){var t=a.generateUniqueHash();return this.elementCache[t]=e,{type:"append",element:{uid:t}}}},{key:"applyFlag",value:function(e,t,n){return o(this,void 0,void 0,regeneratorRuntime.mark(function i(){var o,a;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if("object"===r(e.element)){i.next=2;break}throw new Error('File flag of type "append" needs to be object');case 2:if(void 0!==(o=this.elementCache[e.element.uid])){i.next=5;break}throw new Error('File flag element for "append" not found');case 5:if(void 0!==(a=this.loadFile[t])){i.next=8;break}throw new Error('File of type "'+t+'" cannot be appent');case 8:return i.next=10,a.load(n,o);case 10:case"end":return i.stop()}},i,this)}))}}])&&i(t.prototype,n),s&&i(t,s),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VISaveFile=void 0;var r=n(478),i=n(479),o=n(40),a=n(129);t.VISaveFile={uid:{string:null,error:{code:o.default.FILE_DOES_NOT_HAVE_UID,message:a.default[o.default.FILE_DOES_NOT_HAVE_UID]}},uri:"string",type:{string:r.VIFileType,error:{code:o.default.FILE_FLAGS_ARE_NOT_IN_ARRAY,message:a.default[o.default.FILE_FLAGS_ARE_NOT_IN_ARRAY]}},headers:"?object",flags:{"?array":{object:i.VIFlag,error:{code:o.default.FILE_FLAG_IS_NOT_OBJECT,message:a.default[o.default.FILE_FLAG_IS_NOT_OBJECT]}}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIFileType=void 0,t.VIFileType=["javascript","css","video"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIFlag=void 0;var r=n(480);t.VIFlag={type:{string:["append"]},element:{object:r.VIElement}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIElement=void 0,t.VIElement={uid:"string"}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.window=t,this.name="css"}var t,n,i;return t=e,(n=[{key:"load",value:function(e,t){var n=this;return new Promise(function(r,i){var o=n.window.document.createElement("link");o.setAttribute("type","text/css"),o.setAttribute("rel","stylesheet"),o.setAttribute("href",e),o.onerror=function(){i(new Error('File "'+e+'" cannot be loaded'))},o.onload=function(){console.info("File "+e.substring(0,100)+" was loaded"),r()},t.appendChild(o)})}}])&&r(t.prototype,n),i&&r(t,i),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIAddFont=t.VIFontFaceProperties=t.VIFontFormats=void 0,t.VIFontFormats={woff2:"string",eot:"?string",woff:"?string",ttf:"?string",svg:"?string"},t.VIFontFaceProperties={fontFamily:"string",fontStretch:"?string",fontStyle:"?string",fontWeight:"?string",unicodeRange:"?string"},t.VIAddFont=Object.assign(t.VIFontFaceProperties,{uid:"string",append:"object",formats:t.VIFontFormats})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fontFaceGenerator=t.generateFontUid=void 0;t.generateFontUid=function(e,t){return e+"."+t};t.fontFaceGenerator=function(e,t){var n="font-family: '".concat(t.fontFamily,"';"),r=t.fontStretch?"font-stretch: ".concat(t.fontStretch,";"):"",i=t.fontStyle?"font-style: ".concat(t.fontStyle,";"):"",o=t.fontWeight?"font-weight: ".concat(t.fontWeight,";"):"",a=t.unicodeRange?"unicode-range: ".concat(t.unicodeRange,";"):"",s=[],c="";return{setFormat:function(e,t){switch(e){case"woff":s.push("url('".concat(t,"') format('woff')"));break;case"woff2":s.push("url('".concat(t,"') format('woff2')"));break;case"ttf":s.push("url('".concat(t,"') format('truetype')"));break;case"svg":s.push("url('".concat(t,"#svgFontName') format('svg')"));break;case"eot":c="src: url('".concat(t,"');"),s.push("url('".concat(t,"?#iefix') format('embedded-opentype')"));break;default:console.warn("Not supported font format: ".concat(e))}},generateStyleElement:function(){var t="src: "+s.join(", "),u="@font-face {".concat(n).concat(r).concat(i).concat(o).concat(a).concat(c).concat(t," }"),f=e.document.createElement("style");return f.innerHTML=u,f}}}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(15),a=n(485),s=n(40),c=n(128),u=n(7),f=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.eventEmitter=new o.EventEmitter}var t,n,f;return t=e,(n=[{key:"dispatch",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.checkTypeValidity(e.type),t.next=3,this.postMessage({type:this.getMessage("dispatch"),command:e});case 3:case"end":return t.stop()}},t,this)}))}},{key:"onCommand",value:function(e){u.default({listener:e}).required().function(),this.eventEmitter.addListener("command",e)}},{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage("dispatch_to_applet"):var t={type:"command",command:e.command};this.eventEmitter.emit("command",t)}}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}},{key:"checkTypeValidity",value:function(e){u.default({type:e}).setError(new a.default({kind:"appletCommandError",message:"Type contains invalid characters.",code:s.default.COMMAND_TYPE_NOT_VALID,suggestion:c.default.COMMAND_TYPE_NOT_VALID})).required().string().matchRegExp(/^[a-zA-Z0-9\.\-_]+$/g),u.default({type:e}).setError(new a.default({kind:"appletCommandError",message:"Type is longer then 100 characters.",code:s.default.COMMAND_TYPE_IS_TOO_LONG})).lengthMax(100)}}])&&r(t.prototype,n),f&&r(t,f),e}();t.default=f,f.MESSAGE_PREFIX="command"},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(52),c=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,o(t).call(this,Object.assign(Object.assign({},e),{type:e.type?e.type:"AppletCommandError",pathToDocs:t.PATH_TO_DOCS,kind:"appletError"})))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,s["default"]),t}();t.default=c,c.PATH_TO_DOCS="/api/js/js-command"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(15),a=n(487),s=n(488),c=n(489),u=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.eventEmitter=new o.EventEmitter,this.led=new a.default(this.getMessagePrefix(),this.postMessage),this.barcodeScanner=new c.default(this.getMessagePrefix(),this.postMessage)}var t,n,u;return t=e,(n=[{key:"openSerialPort",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.postMessage({type:this.getMessage("serial_port.open"),options:e});case 2:return n=t.sent,r=n.refid,t.abrupt("return",new s.default(r,this.eventEmitter,this.getMessagePrefix(),this.postMessage));case 5:case"end":return t.stop()}},t,this)}))}},{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage("serial_port.data"):this.eventEmitter.emit("serial_port.data."+e.refid,e.data);break;default:this.barcodeScanner.handleMessageData(e)}}},{key:"getMessage",value:function(e){return this.getMessagePrefix()+"."+e}},{key:"getMessagePrefix",value:function(){return this.messagePrefix+"."+e.MESSAGE_PREFIX}}])&&r(t.prototype,n),u&&r(t,u),e}();t.default=u,u.MESSAGE_PREFIX="hardware"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(40),a=n(7),s=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,s;return t=e,(n=[{key:"setColor",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.checkColorValidity(e),t.next=3,this.postMessage({type:this.getMessage("set_color"),color:e?e.toUpperCase():null});case 3:case"end":return t.stop()}},t,this)}))}},{key:"checkColorValidity",value:function(e){a.default({color:e}).canBeNull().string(null,o.default.HARDWARE_LED_COLOR_IS_NOT_STRING),a.default({color:e}).canBeNull().matchRegExp(/^#[0-9A-Fa-f]{6,6}$/,o.default.HARDWARE_LED_COLOR_IS_NOT_VALID)}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}}])&&r(t.prototype,n),s&&r(t,s),e}();t.default=s,s.MESSAGE_PREFIX="led"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.refid=t,this.eventEmitter=n,this.messagePrefix=r,this.postMessage=i}var t,n,o;return t=e,(n=[{key:"onData",value:function(e){this.eventEmitter.addListener("serial_port.data."+this.refid,e)}},{key:"write",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.postMessage({type:this.getMessage("serial_port.write"),refid:this.refid,data:e});case 2:case"end":return t.stop()}},t,this)}))}},{key:"close",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("serial_port.close"),refid:this.refid});case 2:this.eventEmitter.removeAllListeners("serial_port.data."+this.refid);case 3:case"end":return e.stop()}},e,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_SCANNER_ID=void 0;var a=n(15);t.DEFAULT_SCANNER_ID=0;var s=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.eventEmitter=new a.EventEmitter}var n,s,c;return n=e,(s=[{key:"getVersion",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_version")});case 2:return t=e.sent,n=t.version,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"start",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){var r,a,s,c,u,f,l,d=this;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r={scannerId:t.DEFAULT_SCANNER_ID,timeout:1e4,cancelPrevious:!1},a=Object.assign(Object.assign({},r),e),s=a.scannerId,(c=o(a,["scannerId"])).cancelPrevious&&(this.eventEmitter.removeAllListeners("scanner_id_".concat(s,".data")),this.eventEmitter.removeAllListeners("scanner_id_".concat(s,".error"))),n.next=5,this.postMessage({type:this.getMessage("start"),scannerId:s,options:c});case 5:return u=function(e){d.eventEmitter.addListener("scanner_id_".concat(s,".data"),e)},f=function(e){d.eventEmitter.addListener("scanner_id_".concat(s,".error"),e)},l=function(){return i(d,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("stop"),scannerId:s});case 2:this.eventEmitter.removeAllListeners("scanner_id_".concat(s,".data")),this.eventEmitter.removeAllListeners("scanner_id_".concat(s,".error"));case 4:case"end":return e.stop()}},e,this)}))},n.abrupt("return",{stop:l,onData:u,onError:f});case 9:case"end":return n.stop()}},n,this)}))}},{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage("data"):this.eventEmitter.emit("scanner_id_".concat(e.scannerId,".data"),e.data);break;case this.getMessage("error"):this.eventEmitter.emit("scanner_id_".concat(e.scannerId,".error"),e.data)}}},{key:"getMessage",value:function(t){return[this.messagePrefix,e.MESSAGE_PREFIX,t].join(".")}}])&&r(n.prototype,s),c&&r(n,c),e}();t.default=s,s.MESSAGE_PREFIX="barcode_scanner"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(491),a=n(7),s=n(492),c=n(15),u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.exchange=t,this.events=new c.EventEmitter}var t,n,u;return t=e,(n=[{key:"open",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,void 0,void 0,regeneratorRuntime.mark(function r(){var i;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return a.default({uri:e}).required().uri(),a.default({options:n}).required().object(o.VIOpenLinkOptions),i=null===(t=n.headlessMode)||void 0===t||t,r.next=5,this.exchange.postMessage(Object.assign(Object.assign({uri:e},n),{headlessMode:i,type:"open"}));case 5:case"end":return r.stop()}},r,this)}))}},{key:"close",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.exchange.postMessage({type:"close"});case 2:case"end":return e.stop()}},e,this)}))}},{key:"onClose",value:function(e){var t=this;return a.default({listener:e}).required().function(),this.events.addListener(s.EventType.CLOSE,e),function(){t.events.removeListener(s.EventType.CLOSE,e)}}},{key:"handleMessageData",value:function(e){switch(e.type){case this.exchange.messageNameToType("closed"):var t={type:s.EventType.CLOSE,reason:e.reason};this.events.emit(s.EventType.CLOSE,t)}}},{key:"openLink",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.warn("sos.browser.openLink() is deprecated and will be removed in the future versions. Use sos.browser.open() instead."),a.default({uri:e}).required().uri(),a.default({options:t}).required().object(),n.next=5,this.exchange.postMessage(Object.assign(Object.assign({uri:e},t),{headlessMode:!1,type:"open_link"}));case 5:case"end":return n.stop()}},n,this)}))}}])&&r(t.prototype,n),u&&r(t,u),e}();t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIOpenLinkOptions=t.VITheme=void 0,t.VITheme={base:{"?string":["light","dark"]},shape:{"?object":{cornerSize:"?number"}},colors:{"?object":{primary:"?string",background:"?string",control:"?string"}},widgets:{"?object":{editAddress:{"?object":{colors:{"?object":{background:"?string",text:"?string"}}}},buttonClose:{"?object":{colors:{"?object":{background:"?string",text:"?string",icon:"?string"}},icon:{"?string":["none","exit_to_app","close","cancel"]},text:"?string"}},progress:{"?object":{color:"?string"}}}}},t.VIOpenLinkOptions={aclDomains:{"?array":"string"},aclMode:{"?string":["blacklist","whitelist"]},readOnlyAddressBar:"?boolean",idleTimeout:"?number",coordinates:{"?object":{x:"number",y:"number",width:"number",height:"number"}},theme:{"?object":t.VITheme},headlessMode:"?boolean",clearData:"?boolean",canUserClose:"?boolean",method:{"?string":["native","iframe"]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CloseReason=t.VIEventType=t.EventType=void 0,function(e){e.CLOSE="close"}(t.EventType||(t.EventType={})),t.VIEventType=["close"],function(e){e.API="API",e.USER="USER",e.TIMEOUT="TIMEOUT"}(t.CloseReason||(t.CloseReason={}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.window=t,this.messagePrefix=n,this.base=r,this.transformers=i,this.frontAppletWindows=[]}var t,n,i;return t=e,(n=[{key:"registerFrontAppletLoaderWindow",value:function(e){e.postMessage({type:this.getMessage("api_js_uri"),uri:this.base.apiJsUri},"*")}},{key:"registerBundledFrontAppletWindow",value:function(e){this.frontAppletWindows.push(e),e.postMessage({type:this.getMessage("config.update"),config:this.base.config},"*"),e.postMessage({type:this.getMessage("auth_hash.update"),authHash:this.base.authHash},"*"),e.postMessage({type:this.getMessage("front_display_version.update"),version:this.base.display.version},"*")}},{key:"forwardToFrontAppletWindows",value:function(e){var t=this,n=!0,r=!1,i=void 0;try{for(var o,a=function(){var n=o.value,r=t.transformers.reduce(function(e,t){return e?t(e,n):e},e);if(void 0===r)return"continue";n.postMessage(r,"*")},s=this.frontAppletWindows[Symbol.iterator]();!(n=(o=s.next()).done);n=!0)a()}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}}},{key:"forwardFromFrontAppletWindows",value:function(e,t){-1!==this.frontAppletWindows.indexOf(e)&&this.window.parent.postMessage(t,"*")}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),i&&r(t,i),e}();t.default=i},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(t,n,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.window=t,this.messagePrefix=n,this.postMessageToParent=r;var o=function(e){return i.handleTouch(e)};this.window.addEventListener("touchstart",o,!0),this.window.addEventListener("touchend",o,!0),this.window.addEventListener("touchcancel",o,!0),this.window.addEventListener("touchmove",o,!0)}var t,n,i;return t=e,(n=[{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage("propagate"):var t=this.window.document.elementFromPoint(e.x,e.y);t&&"click"in t&&t.click()}}},{key:"transformIframeData",value:function(e,t){if(e.type!==this.getMessage("propagate"))return e;var n=Array.from(this.window.document.getElementsByTagName("iframe")).find(function(e){return e.contentWindow===t});return void 0===n||e.x<n.offsetLeft||e.x>n.offsetLeft+n.offsetWidth||e.y<n.offsetTop||e.y>n.offsetTop+n.offsetHeight?void 0:Object.assign(Object.assign({},e),{x:e.x-n.offsetLeft,y:e.y-n.offsetTop})}},{key:"handleTouch",value:function(e){this.postMessageToParent({type:this.getMessage("event"),eventType:e.type})}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}}])&&r(t.prototype,n),i&&r(t,i),e}();t.default=i,i.MESSAGE_PREFIX="touch"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(15),o=n(7),a=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.window=t,this.messagePrefix=n,this.eventEmitter=new i.EventEmitter,this.hasWindowEventListener=!1,this.alive=!0,this.dispatchEventToParent=function(e){try{r.window.parent.document.dispatchEvent(new KeyboardEvent("keyup",e))}catch(t){if(!(t instanceof ReferenceError))throw t;r.window.parent.document.dispatchEvent(e)}},!this.isTopLevelFrame()&&this.canAccessParentOrigin()&&(this.hasWindowEventListener=!0,this.window.addEventListener("keyup",this.dispatchEventToParent))}var t,n,a;return t=e,(n=[{key:"destroy",value:function(){this.alive&&(this.alive=!1,this.removeEventListeners(),this.hasWindowEventListener&&this.window.removeEventListener("keyup",this.dispatchEventToParent))}},{key:"onKeyUp",value:function(e){this.checkAlive(),o.default({listener:e}).required().function(),this.eventEmitter.addListener("keyup",e)}},{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage("keyup"):var t={type:"keyup",keyCode:e.keyCode,keyName:e.keyName};this.emitKeyUpEvent(t)}}},{key:"removeEventListeners",value:function(){this.eventEmitter.removeAllListeners()}},{key:"removeEventListener",value:function(e,t){this.eventEmitter.removeListener(e,t)}},{key:"emitKeyUpEvent",value:function(e){this.checkAlive(),this.eventEmitter.emit("keyup",e)}},{key:"isTopLevelFrame",value:function(){return this.window===this.window.parent}},{key:"canAccessParentOrigin",value:function(){var e,t;try{var n=!!(null===(t=null===(e=this.window)||void 0===e?void 0:e.parent)||void 0===t?void 0:t.document);return n||console.warn("Parent window or document is not defined"),n}catch(e){if(e instanceof DOMException)return console.warn("Parent document is not accessible"),!1;throw e}}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}},{key:"checkAlive",value:function(){if(!this.alive)throw new Error("destroyed")}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a,a.MESSAGE_PREFIX="input"},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var u=n(15),f=n(7),l=function(e){function t(e,n,r){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(i=o(this,a(t).call(this))).window=e,i.messagePrefix=n,i.postMessage=r,i}var r,l,d;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(t,u.EventEmitter),r=t,(l=[{key:"isRemoteDebugEnabled",value:function(){return c(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("is_remote_enabled")});case 2:return t=e.sent,n=t.isEnabled,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"onRemoteDebugChanged",value:function(e){f.default({listener:e}).required().function(),this.addListener(t.DEBUG_CHANGED,function(t){return e({enabled:t.enabled})})}},{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage("configure"):this.emit(t.DEBUG_CHANGED,{enabled:e.enabled}),e.enabled?(this.window.WeinreServerURL=e.url,this.window.WeinreServerId=e.id,this.window.__weinreLoaded||(n(497),this.window.__weinreLoaded=!0)):(this.window.WeinreServerURL=void 0,this.window.WeinreServerId=void 0)}}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+t.MESSAGE_PREFIX+"."+e}}])&&i(r.prototype,l),d&&i(r,d),t}();t.default=l,l.MESSAGE_PREFIX="debug",l.DEBUG_CHANGED="debug.changed"},function(module,exports){!function(){eval('/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * "License"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n//----------------------------------------------------------------------------\n// an implementation of the require() function as specified for use with\n// CommonJS Modules - see http://commonjs.org/specs/modules/1.0.html\n//----------------------------------------------------------------------------\n\n//----------------------------------------------------------------------------\n// inspired from David Flanagan\'s require() function documented here:\n// http://www.davidflanagan.com/2009/11/a-module-loader.html\n//----------------------------------------------------------------------------\n\n//----------------------------------------------------------------------------\n// only supports "preloaded" modules ala define() (AMD)\n// http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition\n// but the id parameter is required\n//----------------------------------------------------------------------------\n\n//----------------------------------------------------------------------------\n// function wrapper\n//----------------------------------------------------------------------------\n(function(){\n\n//----------------------------------------------------------------------------\n// some constants\n//----------------------------------------------------------------------------\nvar PROGRAM = "modjewel"\nvar VERSION = "2.0.0"\nvar global = this\n\n//----------------------------------------------------------------------------\n// if require() is already defined, leave\n//----------------------------------------------------------------------------\nif (global.modjewel) {\n log("modjewel global variable already defined")\n return\n}\n\nglobal.modjewel = null\n\n//----------------------------------------------------------------------------\n// "globals" (local to this function scope though)\n//----------------------------------------------------------------------------\nvar ModuleStore\nvar ModulePreloadStore\nvar MainModule\nvar WarnOnRecursiveRequire = false\n\n//----------------------------------------------------------------------------\n// the require function\n//----------------------------------------------------------------------------\nfunction get_require(currentModule) {\n var result = function require(moduleId) {\n\n if (moduleId.match(/^\\.{1,2}\\//)) {\n moduleId = normalize(currentModule, moduleId)\n }\n\n if (hop(ModuleStore, moduleId)) {\n var module = ModuleStore[moduleId]\n if (module.__isLoading) {\n if (WarnOnRecursiveRequire) {\n var fromModule = currentModule ? currentModule.id : "<root>"\n console.log("module \'" + moduleId + "\' recursively require()d from \'" + fromModule + "\', problem?")\n }\n }\n\n currentModule.moduleIdsRequired.push(moduleId)\n\n return module.exports\n }\n\n if (!hop(ModulePreloadStore, moduleId)) {\n var fromModule = currentModule ? currentModule.id : "<root>"\n error("module \'" + moduleId + "\' not found from \'" + fromModule + "\', must be define()\'d first")\n }\n\n var factory = ModulePreloadStore[moduleId][0]\n var prereqs = ModulePreloadStore[moduleId][1]\n\n var module = create_module(moduleId)\n\n var newRequire = get_require(module)\n\n ModuleStore[moduleId] = module\n\n module.__isLoading = true\n try {\n currentModule.moduleIdsRequired.push(moduleId)\n\n var prereqModules = []\n for (var i=0; i<prereqs.length; i++) {\n var prereqId = prereqs[i]\n var prereqModule\n\n if (prereqId == "require") prereqModule = newRequire\n else if (prereqId == "exports") prereqModule = module.exports\n else if (prereqId == "module") prereqModule = module\n else prereqModule = newRequire(prereqId)\n\n prereqModules.push(prereqModule)\n }\n\n if (typeof factory == "function") {\n var result = factory.apply(null, prereqModules)\n if (result) {\n module.exports = result\n }\n }\n else {\n module.exports = factory\n }\n }\n finally {\n module.__isLoading = false\n }\n\n return module.exports\n }\n\n result.define = require_define\n result.implementation = PROGRAM\n result.version = VERSION\n\n return result\n}\n\n//----------------------------------------------------------------------------\n// shorter version of hasOwnProperty\n//----------------------------------------------------------------------------\nfunction hop(object, name) {\n return Object.prototype.hasOwnProperty.call(object, name)\n}\n\n//----------------------------------------------------------------------------\n// create a new module\n//----------------------------------------------------------------------------\nfunction create_module(id) {\n return {\n id: id,\n uri: id,\n exports: {},\n prereqIds: [],\n moduleIdsRequired: []\n }\n}\n\n//----------------------------------------------------------------------------\n// reset the stores\n//----------------------------------------------------------------------------\nfunction require_reset() {\n ModuleStore = {}\n ModulePreloadStore = {}\n MainModule = create_module(null)\n\n var require = get_require(MainModule)\n var define = require_define\n \n define("modjewel", modjewel_module)\n\n global.modjewel = require("modjewel")\n global.modjewel.require = require\n global.modjewel.define = define\n global.modjewel.define.amd = {implementation: PROGRAM, version: VERSION}\n}\n\n//----------------------------------------------------------------------------\n// used by pre-built modules that can be included via <script src=>\n// a simplification of\n// http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition\n// where id is required\n//----------------------------------------------------------------------------\nfunction require_define(moduleId, prereqs, factory) {\n var rem = ["require", "exports", "module"]\n\n if (typeof moduleId != "string") {\n console.log("modjewel.define(): first parameter must be a string; was: " + moduleId)\n return\n }\n\n if (arguments.length == 2) {\n factory = prereqs\n prereqs = null\n }\n\n if (!prereqs || prereqs.length == 0) {\n prereqs = rem\n }\n\n if (typeof factory != "function") {\n if (factory) {\n ModulePreloadStore[moduleId] = [factory, prereqs]\n return\n }\n\n console.log("modjewel.define(): factory was falsy: " + factory)\n return\n }\n\n if (moduleId.match(/^\\./)) {\n console.log("modjewel.define(): moduleId must not start with \'.\': \'" + moduleName + "\'")\n return\n }\n\n if (hop(ModulePreloadStore, moduleId)) {\n console.log("modjewel.define(): module \'" + moduleId + "\' has already been defined")\n return\n }\n\n ModulePreloadStore[moduleId] = [factory, prereqs]\n}\n\n//----------------------------------------------------------------------------\n// get the path of a module\n//----------------------------------------------------------------------------\nfunction getModulePath(module) {\n if (!module || !module.id) return ""\n\n var parts = module.id.split("/")\n\n return parts.slice(0, parts.length-1).join("/")\n}\n\n//----------------------------------------------------------------------------\n// normalize a \'file name\' with . and .. with a \'directory name\'\n//----------------------------------------------------------------------------\nfunction normalize(module, file) {\n var modulePath = getModulePath(module)\n var dirParts = ("" == modulePath) ? [] : modulePath.split("/")\n var fileParts = file.split("/")\n\n for (var i=0; i<fileParts.length; i++) {\n var filePart = fileParts[i]\n\n if (filePart == ".") {\n }\n\n else if (filePart == "..") {\n if (dirParts.length > 0) {\n dirParts.pop()\n }\n else {\n // error("error normalizing \'" + module + "\' and \'" + file + "\'")\n // eat non-valid .. paths\n }\n }\n\n else {\n dirParts.push(filePart)\n }\n }\n\n return dirParts.join("/")\n}\n\n//----------------------------------------------------------------------------\n// throw an error\n//----------------------------------------------------------------------------\nfunction error(message) {\n throw new Error(PROGRAM + ": " + message)\n}\n\n//----------------------------------------------------------------------------\n// get a list of loaded modules\n//----------------------------------------------------------------------------\nfunction modjewel_getLoadedModuleIds() {\n var result = []\n\n for (moduleId in ModuleStore) {\n result.push(moduleId)\n }\n\n return result\n}\n\n//----------------------------------------------------------------------------\n// get a list of the preloaded module ids\n//----------------------------------------------------------------------------\nfunction modjewel_getPreloadedModuleIds() {\n var result = []\n\n for (moduleId in ModulePreloadStore) {\n result.push(moduleId)\n }\n\n return result\n}\n\n//----------------------------------------------------------------------------\n// get a module by module id\n//----------------------------------------------------------------------------\nfunction modjewel_getModule(moduleId) {\n if (null == moduleId) return MainModule\n\n return ModuleStore[moduleId]\n}\n\n//----------------------------------------------------------------------------\n// get a list of module ids which have been required by the specified module id\n//----------------------------------------------------------------------------\nfunction modjewel_getModuleIdsRequired(moduleId) {\n var module = modjewel_getModule(moduleId)\n if (null == module) return null\n\n return module.moduleIdsRequired.slice()\n}\n\n//----------------------------------------------------------------------------\n// set the WarnOnRecursiveRequireFlag\n// - if you make use of "module.exports =" in your code, you will want this on\n//----------------------------------------------------------------------------\nfunction modjewel_warnOnRecursiveRequire(value) {\n if (arguments.length == 0) return WarnOnRecursiveRequire\n WarnOnRecursiveRequire = !!value\n}\n\n//----------------------------------------------------------------------------\n// the modjewel module\n//----------------------------------------------------------------------------\nfunction modjewel_module(require, exports, module) {\n exports.VERSION = VERSION\n exports.require = null // filled in later\n exports.define = null // filled in later\n exports.getLoadedModuleIds = modjewel_getLoadedModuleIds\n exports.getPreloadedModuleIds = modjewel_getPreloadedModuleIds\n exports.getModule = modjewel_getModule\n exports.getModuleIdsRequired = modjewel_getModuleIdsRequired\n exports.warnOnRecursiveRequire = modjewel_warnOnRecursiveRequire\n}\n\n//----------------------------------------------------------------------------\n// log a message\n//----------------------------------------------------------------------------\nfunction log(message) {\n console.log("modjewel: " + message)\n}\n\n//----------------------------------------------------------------------------\n// make the require function a global\n//----------------------------------------------------------------------------\nrequire_reset()\n\n//----------------------------------------------------------------------------\n})();\n\n//@ sourceURL=modjewel.js'),modjewel.require("modjewel").warnOnRecursiveRequire(!0),eval(';modjewel.define("weinre/common/Binding", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Binding, Ex;\n\nEx = require(\'./Ex\');\n\nmodule.exports = Binding = (function() {\n function Binding(receiver, method) {\n if (!receiver) {\n throw new Ex(arguments, "receiver argument for Binding constructor was null");\n }\n if (typeof method === "string") {\n method = receiver[method];\n }\n if (typeof method === !"function") {\n throw new Ex(arguments, "method argument didn\'t specify a function");\n }\n return function() {\n return method.apply(receiver, [].slice.call(arguments));\n };\n }\n\n return Binding;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/Binding.amd.js'),eval(';modjewel.define("weinre/common/Callback", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Callback, CallbackIndex, CallbackTable, ConnectorChannel, Ex;\n\nEx = require(\'./Ex\');\n\nCallbackTable = {};\n\nCallbackIndex = 1;\n\nConnectorChannel = "???";\n\nmodule.exports = Callback = (function() {\n function Callback() {\n throw new Ex(arguments, "this class is not intended to be instantiated");\n }\n\n Callback.setConnectorChannel = function(connectorChannel) {\n return ConnectorChannel = "" + connectorChannel;\n };\n\n Callback.register = function(callback) {\n var data, func, index, receiver;\n if (typeof callback === "function") {\n callback = [null, callback];\n }\n if (typeof callback.slice !== "function") {\n throw new Ex(arguments, "callback must be an array or function");\n }\n receiver = callback[0];\n func = callback[1];\n data = callback.slice(2);\n if (typeof func === "string") {\n func = receiver[func];\n }\n if (typeof func !== "function") {\n throw new Ex(arguments, "callback function was null or not found");\n }\n index = ConnectorChannel + "::" + CallbackIndex;\n CallbackIndex++;\n if (CallbackIndex >= 65536 * 65536) {\n CallbackIndex = 1;\n }\n CallbackTable[index] = [receiver, func, data];\n return index;\n };\n\n Callback.deregister = function(index) {\n return delete CallbackTable[index];\n };\n\n Callback.invoke = function(index, args) {\n var callback, e, func, funcName, receiver;\n callback = CallbackTable[index];\n if (!callback) {\n throw new Ex(arguments, "callback " + index + " not registered or already invoked");\n }\n receiver = callback[0];\n func = callback[1];\n args = callback[2].concat(args);\n try {\n return func.apply(receiver, args);\n } catch (_error) {\n e = _error;\n funcName = func.name || func.signature;\n if (!funcName) {\n funcName = "<unnamed>";\n }\n return require("./Weinre").logError(arguments.callee.signature + (" exception invoking callback: " + funcName + "(" + (args.join(\',\')) + "): ") + e);\n } finally {\n Callback.deregister(index);\n }\n };\n\n return Callback;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/Callback.amd.js'),eval(';modjewel.define("weinre/common/Debug", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Debug;\n\nmodule.exports = new (Debug = (function() {\n function Debug() {\n this._printCalledArgs = {};\n }\n\n Debug.prototype.log = function(message) {\n var console;\n console = window.console.__original || window.console;\n return console.log("" + (this.timeStamp()) + ": " + message);\n };\n\n Debug.prototype.logCall = function(context, intf, method, args, message) {\n var printArgs, signature;\n if (message) {\n message = ": " + message;\n } else {\n message = "";\n }\n signature = this.signature(intf, method);\n printArgs = this._printCalledArgs[signature];\n if (printArgs) {\n args = JSON.stringify(args, null, 4);\n } else {\n args = "";\n }\n return this.log("" + context + " " + signature + "(" + args + ")" + message);\n };\n\n Debug.prototype.logCallArgs = function(intf, method) {\n return this._printCalledArgs[this.signature(intf, method)] = true;\n };\n\n Debug.prototype.signature = function(intf, method) {\n return "" + intf + "." + method;\n };\n\n Debug.prototype.timeStamp = function() {\n var date, mins, secs;\n date = new Date();\n mins = "" + (date.getMinutes());\n secs = "" + (date.getSeconds());\n if (mins.length === 1) {\n mins = "0" + mins;\n }\n if (secs.length === 1) {\n secs = "0" + secs;\n }\n return "" + mins + ":" + secs;\n };\n\n return Debug;\n\n})());\n\n});\n\n//@ sourceURL=weinre/common/Debug.amd.js'),eval(';modjewel.define("weinre/common/EventListeners", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar EventListeners, Ex, Weinre;\n\nEx = require(\'./Ex\');\n\nWeinre = require(\'./Weinre\');\n\nmodule.exports = EventListeners = (function() {\n function EventListeners() {\n this.listeners = [];\n }\n\n EventListeners.prototype.add = function(listener, useCapture) {\n return this.listeners.push([listener, useCapture]);\n };\n\n EventListeners.prototype.remove = function(listener, useCapture) {\n var listeners, _i, _len, _listener;\n listeners = this.listeners.slice();\n for (_i = 0, _len = listeners.length; _i < _len; _i++) {\n _listener = listeners[_i];\n if (_listener[0] !== listener) {\n continue;\n }\n if (_listener[1] !== useCapture) {\n continue;\n }\n this._listeners.splice(i, 1);\n return;\n }\n };\n\n EventListeners.prototype.fire = function(event) {\n var e, listener, listeners, _i, _len, _results;\n listeners = this.listeners.slice();\n _results = [];\n for (_i = 0, _len = listeners.length; _i < _len; _i++) {\n listener = listeners[_i];\n listener = listener[0];\n if (typeof listener === "function") {\n try {\n listener.call(null, event);\n } catch (_error) {\n e = _error;\n Weinre.logError("" + arguments.callee.name + " invocation exception: " + e);\n }\n continue;\n }\n if (typeof (listener != null ? listener.handleEvent : void 0) !== "function") {\n throw new Ex(arguments, "listener does not implement the handleEvent() method");\n }\n try {\n _results.push(listener.handleEvent.call(listener, event));\n } catch (_error) {\n e = _error;\n _results.push(Weinre.logError("" + arguments.callee.name + " invocation exception: " + e));\n }\n }\n return _results;\n };\n\n return EventListeners;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/EventListeners.amd.js'),eval(';modjewel.define("weinre/common/Ex", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Ex, StackTrace, prefix;\n\nStackTrace = require(\'./StackTrace\');\n\nmodule.exports = Ex = (function() {\n Ex.catching = function(func) {\n var e;\n try {\n return func.call(this);\n } catch (_error) {\n e = _error;\n console.log("runtime error: " + e);\n return StackTrace.dump(arguments);\n }\n };\n\n function Ex(args, message) {\n if (!args || !args.callee) {\n throw Ex(arguments, "first parameter must be an Arguments object");\n }\n StackTrace.dump(args);\n if (message instanceof Error) {\n message = "threw error: " + message;\n }\n message = prefix(args, message);\n message;\n }\n\n return Ex;\n\n})();\n\nprefix = function(args, string) {\n if (args.callee.signature) {\n return args.callee.signature + ": " + string;\n }\n if (args.callee.displayName) {\n return args.callee.displayName + ": " + string;\n }\n if (args.callee.name) {\n return args.callee.name + ": " + string;\n }\n return "<anonymous>" + ": " + string;\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/Ex.amd.js'),eval(';modjewel.define("weinre/common/HookLib", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar HookLib, HookSite, HookSites, IgnoreHooks, callAfterHooks, callBeforeHooks, callExceptHooks, getHookSite, getHookedFunction;\n\nHookLib = exports;\n\nHookSites = [];\n\nIgnoreHooks = 0;\n\nmodule.exports = HookLib = (function() {\n function HookLib() {}\n\n HookLib.addHookSite = function(object, property) {\n return getHookSite(object, property, true);\n };\n\n HookLib.getHookSite = function(object, property) {\n return getHookSite(object, property, false);\n };\n\n HookLib.ignoreHooks = function(func) {\n var result;\n try {\n IgnoreHooks++;\n result = func.call();\n } finally {\n IgnoreHooks--;\n }\n return result;\n };\n\n return HookLib;\n\n})();\n\ngetHookSite = function(object, property, addIfNotFound) {\n var hookSite, i, _i, _len;\n i = 0;\n for (_i = 0, _len = HookSites.length; _i < _len; _i++) {\n hookSite = HookSites[_i];\n if (hookSite.object !== object) {\n continue;\n }\n if (hookSite.property !== property) {\n continue;\n }\n return hookSite;\n }\n if (!addIfNotFound) {\n return null;\n }\n hookSite = new HookSite(object, property);\n HookSites.push(hookSite);\n return hookSite;\n};\n\nHookSite = (function() {\n function HookSite(object, property) {\n var hookedFunction;\n this.object = object;\n this.property = property;\n this.target = object[property];\n this.hookss = [];\n if (typeof this.target === \'undefined\') {\n return;\n } else {\n hookedFunction = getHookedFunction(this.target, this);\n if (!(navigator.userAgent.match(/MSIE/i) && (object === localStorage || object === sessionStorage))) {\n object[property] = hookedFunction;\n }\n }\n }\n\n HookSite.prototype.addHooks = function(hooks) {\n return this.hookss.push(hooks);\n };\n\n HookSite.prototype.removeHooks = function(hooks) {\n var i, _i, _ref;\n for (i = _i = 0, _ref = this.hookss.length; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (this.hookss[i] === hooks) {\n this.hookss.splice(i, 1);\n return;\n }\n }\n };\n\n return HookSite;\n\n})();\n\ngetHookedFunction = function(func, hookSite) {\n var hookedFunction;\n hookedFunction = function() {\n var e, result;\n callBeforeHooks(hookSite, this, arguments);\n try {\n result = func.apply(this, arguments);\n } catch (_error) {\n e = _error;\n callExceptHooks(hookSite, this, arguments, e);\n throw e;\n } finally {\n callAfterHooks(hookSite, this, arguments, result);\n }\n return result;\n };\n hookedFunction.displayName = func.displayName || func.name;\n return hookedFunction;\n};\n\ncallBeforeHooks = function(hookSite, receiver, args) {\n var hooks, _i, _len, _ref, _results;\n if (IgnoreHooks > 0) {\n return;\n }\n _ref = hookSite.hookss;\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n hooks = _ref[_i];\n if (hooks.before) {\n _results.push(hooks.before.call(hooks, receiver, args));\n } else {\n _results.push(void 0);\n }\n }\n return _results;\n};\n\ncallAfterHooks = function(hookSite, receiver, args, result) {\n var hooks, _i, _len, _ref, _results;\n if (IgnoreHooks > 0) {\n return;\n }\n _ref = hookSite.hookss;\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n hooks = _ref[_i];\n if (hooks.after) {\n _results.push(hooks.after.call(hooks, receiver, args, result));\n } else {\n _results.push(void 0);\n }\n }\n return _results;\n};\n\ncallExceptHooks = function(hookSite, receiver, args, e) {\n var hooks, _i, _len, _ref, _results;\n if (IgnoreHooks > 0) {\n return;\n }\n _ref = hookSite.hookss;\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n hooks = _ref[_i];\n if (hooks.except) {\n _results.push(hooks.except.call(hooks, receiver, args, e));\n } else {\n _results.push(void 0);\n }\n }\n return _results;\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/HookLib.amd.js'),eval(';modjewel.define("weinre/common/IDGenerator", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar IDGenerator, idName, nextId, nextIdValue;\n\nnextIdValue = 1;\n\nidName = "__weinre__id";\n\nmodule.exports = IDGenerator = (function() {\n function IDGenerator() {}\n\n IDGenerator.checkId = function(object) {\n return object[idName];\n };\n\n IDGenerator.getId = function(object, map) {\n var id;\n id = IDGenerator.checkId(object);\n if (!id) {\n id = nextId();\n object[idName] = id;\n }\n if (map) {\n map[id] = object;\n }\n return id;\n };\n\n IDGenerator.next = function() {\n return nextId();\n };\n\n return IDGenerator;\n\n})();\n\nnextId = function() {\n var result;\n result = nextIdValue;\n nextIdValue += 1;\n return result;\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/IDGenerator.amd.js'),eval(';modjewel.define("weinre/common/IDLTools", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Callback, Ex, IDLTools, IDLs, getProxyMethod;\n\nEx = require(\'./Ex\');\n\nCallback = require(\'./Callback\');\n\nIDLs = {};\n\nmodule.exports = IDLTools = (function() {\n function IDLTools() {\n throw new Ex(arguments, "this class is not intended to be instantiated");\n }\n\n IDLTools.addIDLs = function(idls) {\n var idl, intf, _i, _len, _results;\n _results = [];\n for (_i = 0, _len = idls.length; _i < _len; _i++) {\n idl = idls[_i];\n _results.push((function() {\n var _j, _len1, _ref, _results1;\n _ref = idl.interfaces;\n _results1 = [];\n for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {\n intf = _ref[_j];\n IDLs[intf.name] = intf;\n _results1.push(intf.module = idl.name);\n }\n return _results1;\n })());\n }\n return _results;\n };\n\n IDLTools.getIDL = function(name) {\n return IDLs[name];\n };\n\n IDLTools.getIDLsMatching = function(regex) {\n var intf, intfName, results;\n results = [];\n for (intfName in IDLs) {\n intf = IDLs[intfName];\n if (intfName.match(regex)) {\n results.push(intf);\n }\n }\n return results;\n };\n\n IDLTools.validateAgainstIDL = function(klass, interfaceName) {\n var classMethod, error, errors, intf, intfMethod, messagePrefix, printName, propertyName, _i, _j, _len, _len1, _ref, _results;\n intf = IDLTools.getIDL(interfaceName);\n messagePrefix = "IDL validation for " + interfaceName + ": ";\n if (null === intf) {\n throw new Ex(arguments, messagePrefix + ("idl not found: \'" + interfaceName + "\'"));\n }\n errors = [];\n _ref = intf.methods;\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n intfMethod = _ref[_i];\n classMethod = klass.prototype[intfMethod.name];\n printName = klass.name + "::" + intfMethod.name;\n if (null === classMethod) {\n errors.push(messagePrefix + ("method not implemented: \'" + printName + "\'"));\n continue;\n }\n if (classMethod.length !== intfMethod.parameters.length) {\n if (classMethod.length !== intfMethod.parameters.length + 1) {\n errors.push(messagePrefix + ("wrong number of parameters: \'" + printName + "\'"));\n continue;\n }\n }\n }\n for (propertyName in klass.prototype) {\n if (klass.prototype.hasOwnProperty(propertyName)) {\n continue;\n }\n if (propertyName.match(/^_.*/)) {\n continue;\n }\n printName = klass.name + "::" + propertyName;\n if (!intf.methods[propertyName]) {\n errors.push(messagePrefix + ("method should not be implemented: \'" + printName + "\'"));\n continue;\n }\n }\n if (!errors.length) {\n return;\n }\n _results = [];\n for (_j = 0, _len1 = errors.length; _j < _len1; _j++) {\n error = errors[_j];\n _results.push(require("./Weinre").logError(error));\n }\n return _results;\n };\n\n IDLTools.buildProxyForIDL = function(proxyObject, interfaceName) {\n var intf, intfMethod, messagePrefix, _i, _len, _ref, _results;\n intf = IDLTools.getIDL(interfaceName);\n messagePrefix = "building proxy for IDL " + interfaceName + ": ";\n if (null === intf) {\n throw new Ex(arguments, messagePrefix + ("idl not found: \'" + interfaceName + "\'"));\n }\n _ref = intf.methods;\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n intfMethod = _ref[_i];\n _results.push(proxyObject[intfMethod.name] = getProxyMethod(intf, intfMethod));\n }\n return _results;\n };\n\n return IDLTools;\n\n})();\n\ngetProxyMethod = function(intf, method) {\n var proxyMethod, result;\n result = proxyMethod = function() {\n var args, callbackId;\n callbackId = null;\n args = [].slice.call(arguments);\n if (args.length > 0) {\n if (typeof args[args.length - 1] === "function") {\n callbackId = Callback.register(args[args.length - 1]);\n args = args.slice(0, args.length - 1);\n }\n }\n while (args.length < method.parameters.length) {\n args.push(null);\n }\n args.push(callbackId);\n return this.__invoke(intf.name, method.name, args);\n };\n result.displayName = intf.name + "__" + method.name;\n return result;\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/IDLTools.amd.js'),eval(';modjewel.define("weinre/common/MessageDispatcher", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Binding, Callback, Ex, IDLTools, InspectorBackend, MessageDispatcher, Verbose, WebSocketXhr, Weinre,\n __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };\n\nWeinre = require(\'./Weinre\');\n\nWebSocketXhr = require(\'./WebSocketXhr\');\n\nIDLTools = require(\'./IDLTools\');\n\nBinding = require(\'./Binding\');\n\nEx = require(\'./Ex\');\n\nCallback = require(\'./Callback\');\n\nVerbose = false;\n\nInspectorBackend = null;\n\nmodule.exports = MessageDispatcher = (function() {\n function MessageDispatcher(url, id) {\n if (!id) {\n id = "anonymous";\n }\n this._url = url;\n this._id = id;\n this.error = null;\n this._opening = false;\n this._opened = false;\n this._closed = false;\n this._interfaces = {};\n this._open();\n }\n\n MessageDispatcher.setInspectorBackend = function(inspectorBackend) {\n return InspectorBackend = inspectorBackend;\n };\n\n MessageDispatcher.verbose = function(value) {\n if (arguments.length >= 1) {\n Verbose = !!value;\n }\n return Verbose;\n };\n\n MessageDispatcher.prototype._open = function() {\n if (this._opened || this._opening) {\n return;\n }\n if (this._closed) {\n throw new Ex(arguments, "socket has already been closed");\n }\n this._opening = true;\n this._socket = new WebSocketXhr(this._url, this._id);\n this._socket.addEventListener("open", Binding(this, "_handleOpen"));\n this._socket.addEventListener("error", Binding(this, "_handleError"));\n this._socket.addEventListener("message", Binding(this, "_handleMessage"));\n return this._socket.addEventListener("close", Binding(this, "_handleClose"));\n };\n\n MessageDispatcher.prototype.close = function() {\n if (this._closed) {\n return;\n }\n this._opened = false;\n this._closed = true;\n return this._socket.close();\n };\n\n MessageDispatcher.prototype.send = function(data) {\n return this._socket.send(data);\n };\n\n MessageDispatcher.prototype.getWebSocket = function() {\n return this._socket;\n };\n\n MessageDispatcher.prototype.registerInterface = function(intfName, intf, validate) {\n if (validate) {\n IDLTools.validateAgainstIDL(intf.constructor, intfName);\n }\n if (this._interfaces[intfName]) {\n throw new Ex(arguments, "interface " + intfName + " has already been registered");\n }\n return this._interfaces[intfName] = intf;\n };\n\n MessageDispatcher.prototype.createProxy = function(intfName) {\n var proxy, self, __invoke;\n proxy = {};\n IDLTools.buildProxyForIDL(proxy, intfName);\n self = this;\n proxy.__invoke = __invoke = function(intfName, methodName, args) {\n return self._sendMethodInvocation(intfName, methodName, args);\n };\n return proxy;\n };\n\n MessageDispatcher.prototype._sendMethodInvocation = function(intfName, methodName, args) {\n var data;\n if (typeof intfName !== "string") {\n throw new Ex(arguments, "expecting intf parameter to be a string");\n }\n if (typeof methodName !== "string") {\n throw new Ex(arguments, "expecting method parameter to be a string");\n }\n data = {\n "interface": intfName,\n method: methodName,\n args: args\n };\n data = JSON.stringify(data);\n this._socket.send(data);\n if (Verbose) {\n return Weinre.logDebug(this.constructor.name + ("[" + this._url + "]: send " + intfName + "." + methodName + "(" + (JSON.stringify(args)) + ")"));\n }\n };\n\n MessageDispatcher.prototype.getState = function() {\n if (this._opening) {\n return "opening";\n }\n if (this._opened) {\n return "opened";\n }\n if (this._closed) {\n return "closed";\n }\n return "unknown";\n };\n\n MessageDispatcher.prototype.isOpen = function() {\n return this._opened === true;\n };\n\n MessageDispatcher.prototype._handleOpen = function(event) {\n this._opening = false;\n this._opened = true;\n this.channel = event.channel;\n Callback.setConnectorChannel(this.channel);\n if (Verbose) {\n return Weinre.logDebug(this.constructor.name + ("[" + this._url + "]: opened"));\n }\n };\n\n MessageDispatcher.prototype._handleError = function(message) {\n this.error = message;\n this.close();\n if (Verbose) {\n return Weinre.logDebug(this.constructor.name + ("[" + this._url + "]: error: ") + message);\n }\n };\n\n MessageDispatcher.prototype._handleMessage = function(message) {\n var args, data, e, intf, intfName, method, methodName, methodSignature, skipErrorForMethods;\n skipErrorForMethods = [\'domContentEventFired\', \'loadEventFired\', \'childNodeRemoved\'];\n try {\n data = JSON.parse(message.data);\n } catch (_error) {\n e = _error;\n throw new Ex(arguments, "invalid JSON data received: " + e + ": \'" + message.data + "\'");\n }\n intfName = data["interface"];\n methodName = data.method;\n args = data.args;\n methodSignature = "" + intfName + "." + methodName + "()";\n intf = this._interfaces.hasOwnProperty(intfName) && this._interfaces[intfName];\n if (!intf && InspectorBackend && intfName.match(/.*Notify/)) {\n intf = InspectorBackend.getRegisteredDomainDispatcher(intfName.substr(0, intfName.length - 6));\n }\n if (!intf) {\n Weinre.notImplemented("weinre: request for non-registered interface: " + methodSignature);\n return;\n }\n methodSignature = intf.constructor.name + ("." + methodName + "()");\n method = intf[methodName];\n if (typeof method !== "function") {\n Weinre.notImplemented(methodSignature);\n return;\n }\n try {\n method.apply(intf, args);\n } catch (_error) {\n e = _error;\n if (__indexOf.call(skipErrorForMethods, methodName) < 0) {\n Weinre.logError(("weinre: invocation exception on " + methodSignature + ": ") + e);\n }\n }\n if (Verbose) {\n return Weinre.logDebug(this.constructor.name + ("[" + this._url + "]: recv " + intfName + "." + methodName + "(" + (JSON.stringify(args)) + ")"));\n }\n };\n\n MessageDispatcher.prototype._handleClose = function() {\n this._reallyClosed = true;\n if (Verbose) {\n return Weinre.logDebug(this.constructor.name + ("[" + this._url + "]: closed"));\n }\n };\n\n return MessageDispatcher;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/MessageDispatcher.amd.js'),eval(';modjewel.define("weinre/common/MethodNamer", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar MethodNamer,\n __hasProp = {}.hasOwnProperty;\n\nmodule.exports = MethodNamer = (function() {\n function MethodNamer() {}\n\n MethodNamer.setNamesForClass = function(aClass) {\n var key, val, _ref, _results;\n for (key in aClass) {\n if (!__hasProp.call(aClass, key)) continue;\n val = aClass[key];\n if (typeof val === "function") {\n val.signature = "" + aClass.name + "::" + key;\n val.displayName = key;\n val.name = key;\n }\n }\n _ref = aClass.prototype;\n _results = [];\n for (key in _ref) {\n if (!__hasProp.call(_ref, key)) continue;\n val = _ref[key];\n if (typeof val === "function") {\n val.signature = "" + aClass.name + "." + key;\n val.displayName = key;\n _results.push(val.name = key);\n } else {\n _results.push(void 0);\n }\n }\n return _results;\n };\n\n return MethodNamer;\n\n})();\n\nMethodNamer.setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/MethodNamer.amd.js'),eval(';modjewel.define("weinre/common/StackTrace", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar StackTrace, getTrace;\n\nmodule.exports = StackTrace = (function() {\n function StackTrace(args) {\n if (!args || !args.callee) {\n throw Error("first parameter to " + arguments.callee.signature + " must be an Arguments object");\n }\n this.trace = getTrace(args);\n }\n\n StackTrace.dump = function(args) {\n var stackTrace;\n args = args || arguments;\n stackTrace = new StackTrace(args);\n return stackTrace.dump();\n };\n\n StackTrace.prototype.dump = function() {\n var frame, _i, _len, _ref, _results;\n console.log("StackTrace:");\n _ref = this.trace;\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n frame = _ref[_i];\n _results.push(console.log(" " + frame));\n }\n return _results;\n };\n\n return StackTrace;\n\n})();\n\ngetTrace = function(args) {\n var err, func, result, visitedFuncs;\n result = [];\n visitedFuncs = [];\n func = args.callee;\n while (func) {\n if (func.signature) {\n result.push(func.signature);\n } else if (func.displayName) {\n result.push(func.displayName);\n } else if (func.name) {\n result.push(func.name);\n } else {\n result.push("<anonymous>");\n }\n if (-1 !== visitedFuncs.indexOf(func)) {\n result.push("... recursion");\n return result;\n }\n visitedFuncs.push(func);\n try {\n func = func.caller;\n } catch (_error) {\n err = _error;\n func = null;\n }\n }\n return result;\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/StackTrace.amd.js'),eval(';modjewel.define("weinre/common/WebSocketXhr", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar EventListeners, Ex, HookLib, WebSocketXhr, Weinre, _xhrEventHandler;\n\nEx = require(\'./Ex\');\n\nWeinre = require(\'./Weinre\');\n\nHookLib = require(\'./HookLib\');\n\nEventListeners = require(\'./EventListeners\');\n\nmodule.exports = WebSocketXhr = (function() {\n WebSocketXhr.CONNECTING = 0;\n\n WebSocketXhr.OPEN = 1;\n\n WebSocketXhr.CLOSING = 2;\n\n WebSocketXhr.CLOSED = 3;\n\n function WebSocketXhr(url, id) {\n this.initialize(url, id);\n }\n\n WebSocketXhr.prototype.initialize = function(url, id) {\n if (!id) {\n id = "anonymous";\n }\n this.readyState = WebSocketXhr.CONNECTING;\n this._url = url;\n this._id = id;\n this._urlChannel = null;\n this._queuedSends = [];\n this._sendInProgress = true;\n this._listeners = {\n open: new EventListeners(),\n message: new EventListeners(),\n error: new EventListeners(),\n close: new EventListeners()\n };\n return this._getChannel();\n };\n\n WebSocketXhr.prototype._getChannel = function() {\n var body;\n body = JSON.stringify({\n id: this._id\n });\n return this._xhr(this._url, "POST", body, this._handleXhrResponseGetChannel);\n };\n\n WebSocketXhr.prototype._handleXhrResponseGetChannel = function(xhr) {\n var e, object;\n if (xhr.status !== 200) {\n return this._handleXhrResponseError(xhr);\n }\n try {\n object = JSON.parse(xhr.responseText);\n } catch (_error) {\n e = _error;\n this._fireEventListeners("error", {\n message: "non-JSON response from channel open request"\n });\n this.close();\n return;\n }\n if (!object.channel) {\n this._fireEventListeners("error", {\n message: "channel open request did not include a channel"\n });\n this.close();\n return;\n }\n this._urlChannel = this._url + "/" + object.channel;\n this.readyState = WebSocketXhr.OPEN;\n this._fireEventListeners("open", {\n message: "open",\n channel: object.channel\n });\n this._sendInProgress = false;\n this._sendQueued();\n return this._readLoop();\n };\n\n WebSocketXhr.prototype._readLoop = function() {\n if (this.readyState === WebSocketXhr.CLOSED) {\n return;\n }\n if (this.readyState === WebSocketXhr.CLOSING) {\n return;\n }\n return this._xhr(this._urlChannel, "GET", "", this._handleXhrResponseGet);\n };\n\n WebSocketXhr.prototype._handleXhrResponseGet = function(xhr) {\n var data, datum, e, self, _i, _len, _results;\n self = this;\n if (xhr.status !== 200) {\n return this._handleXhrResponseError(xhr);\n }\n try {\n datum = JSON.parse(xhr.responseText);\n } catch (_error) {\n e = _error;\n this.readyState = WebSocketXhr.CLOSED;\n this._fireEventListeners("error", {\n message: "non-JSON response from read request"\n });\n return;\n }\n HookLib.ignoreHooks(function() {\n return setTimeout((function() {\n return self._readLoop();\n }), 0);\n });\n _results = [];\n for (_i = 0, _len = datum.length; _i < _len; _i++) {\n data = datum[_i];\n _results.push(self._fireEventListeners("message", {\n data: data\n }));\n }\n return _results;\n };\n\n WebSocketXhr.prototype.send = function(data) {\n if (typeof data !== "string") {\n throw new Ex(arguments, this.constructor.name + ".send");\n }\n this._queuedSends.push(data);\n if (this._sendInProgress) {\n return;\n }\n return this._sendQueued();\n };\n\n WebSocketXhr.prototype._sendQueued = function() {\n var datum;\n if (this._queuedSends.length === 0) {\n return;\n }\n if (this.readyState === WebSocketXhr.CLOSED) {\n return;\n }\n if (this.readyState === WebSocketXhr.CLOSING) {\n return;\n }\n datum = JSON.stringify(this._queuedSends);\n this._queuedSends = [];\n this._sendInProgress = true;\n return this._xhr(this._urlChannel, "POST", datum, this._handleXhrResponseSend);\n };\n\n WebSocketXhr.prototype._handleXhrResponseSend = function(xhr) {\n var httpSocket;\n httpSocket = this;\n if (xhr.status !== 200) {\n return this._handleXhrResponseError(xhr);\n }\n this._sendInProgress = false;\n return HookLib.ignoreHooks(function() {\n return setTimeout((function() {\n return httpSocket._sendQueued();\n }), 0);\n });\n };\n\n WebSocketXhr.prototype.close = function() {\n this._sendInProgress = true;\n this.readyState = WebSocketXhr.CLOSING;\n this._fireEventListeners("close", {\n message: "closing",\n wasClean: true\n });\n return this.readyState = WebSocketXhr.CLOSED;\n };\n\n WebSocketXhr.prototype.addEventListener = function(type, listener, useCapture) {\n return this._getListeners(type).add(listener, useCapture);\n };\n\n WebSocketXhr.prototype.removeEventListener = function(type, listener, useCapture) {\n return this._getListeners(type).remove(listener, useCapture);\n };\n\n WebSocketXhr.prototype._fireEventListeners = function(type, event) {\n if (this.readyState === WebSocketXhr.CLOSED) {\n return;\n }\n event.target = this;\n return this._getListeners(type).fire(event);\n };\n\n WebSocketXhr.prototype._getListeners = function(type) {\n var listeners;\n listeners = this._listeners[type];\n if (null === listeners) {\n throw new Ex(arguments, "invalid event listener type: \'" + type + "\'");\n }\n return listeners;\n };\n\n WebSocketXhr.prototype._handleXhrResponseError = function(xhr) {\n if (xhr.status === 404) {\n this.close();\n return;\n }\n this._fireEventListeners("error", {\n target: this,\n status: xhr.status,\n message: "error from XHR invocation: " + xhr.statusText\n });\n return Weinre.logError(("error from XHR invocation: " + xhr.status + ": ") + xhr.statusText);\n };\n\n WebSocketXhr.prototype._xhr = function(url, method, data, handler) {\n var xhr;\n if (null === handler) {\n throw new Ex(arguments, "handler must not be null");\n }\n xhr = (XMLHttpRequest.noConflict ? new XMLHttpRequest.noConflict() : new XMLHttpRequest());\n xhr.httpSocket = this;\n xhr.httpSocketHandler = handler;\n xhr.onreadystatechange = function() {\n return _xhrEventHandler(xhr);\n };\n HookLib.ignoreHooks(function() {\n return xhr.open(method, url, true);\n });\n xhr.setRequestHeader("Content-Type", "text/plain");\n return HookLib.ignoreHooks(function() {\n return xhr.send(data);\n });\n };\n\n return WebSocketXhr;\n\n})();\n\n_xhrEventHandler = function(xhr) {\n if (xhr.readyState !== 4) {\n return;\n }\n return xhr.httpSocketHandler.call(xhr.httpSocket, xhr);\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/WebSocketXhr.amd.js'),eval(';modjewel.define("weinre/common/Weinre", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar ConsoleLogger, Ex, IDLTools, StackTrace, Weinre, consoleLogger, getLogger, logger, _notImplemented, _showNotImplemented;\n\nEx = require(\'./Ex\');\n\nIDLTools = require(\'./IDLTools\');\n\nStackTrace = require(\'./StackTrace\');\n\n_notImplemented = {};\n\n_showNotImplemented = false;\n\nlogger = null;\n\nmodule.exports = Weinre = (function() {\n function Weinre() {\n throw new Ex(arguments, "this class is not intended to be instantiated");\n }\n\n Weinre.addIDLs = function(idls) {\n return IDLTools.addIDLs(idls);\n };\n\n Weinre.deprecated = function() {\n return StackTrace.dump(arguments);\n };\n\n Weinre.notImplemented = function(thing) {\n if (_notImplemented[thing]) {\n return;\n }\n _notImplemented[thing] = true;\n if (!_showNotImplemented) {\n return;\n }\n return Weinre.logWarning(thing + " not implemented");\n };\n\n Weinre.showNotImplemented = function() {\n var key, _results;\n _showNotImplemented = true;\n _results = [];\n for (key in _notImplemented) {\n _results.push(Weinre.logWarning(key + " not implemented"));\n }\n return _results;\n };\n\n Weinre.logError = function(message) {\n return getLogger().logError(message);\n };\n\n Weinre.logWarning = function(message) {\n return getLogger().logWarning(message);\n };\n\n Weinre.logInfo = function(message) {\n return getLogger().logInfo(message);\n };\n\n Weinre.logDebug = function(message) {\n return getLogger().logDebug(message);\n };\n\n return Weinre;\n\n})();\n\nConsoleLogger = (function() {\n function ConsoleLogger() {}\n\n ConsoleLogger.prototype.logError = function(message) {\n return console.log("error: " + message);\n };\n\n ConsoleLogger.prototype.logWarning = function(message) {\n return console.log("warning: " + message);\n };\n\n ConsoleLogger.prototype.logInfo = function(message) {\n return console.log("info: " + message);\n };\n\n ConsoleLogger.prototype.logDebug = function(message) {\n return console.log("debug: " + message);\n };\n\n return ConsoleLogger;\n\n})();\n\nconsoleLogger = new ConsoleLogger();\n\ngetLogger = function() {\n if (logger) {\n return logger;\n }\n if (Weinre.client) {\n logger = Weinre.WeinreClientCommands;\n return logger;\n }\n if (Weinre.target) {\n logger = Weinre.WeinreTargetCommands;\n return logger;\n }\n return consoleLogger;\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/Weinre.amd.js'),eval(';modjewel.define("weinre/target/BrowserHacks", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar BrowserHacks;\n\nBrowserHacks = function() {\n if (typeof document.addEventListener === "undefined") {\n alert("Oops. It seems the page runs in compatibility mode. Please fix it and try again.");\n return;\n }\n if (typeof window.Element === "undefined") {\n window.Element = function() {};\n }\n if (typeof window.Node === "undefined") {\n window.Node = function() {};\n }\n if (!Object.getPrototypeOf) {\n Object.getPrototypeOf = function(object) {\n if (!object.__proto__) {\n throw new Error("This vm does not support __proto__ and getPrototypeOf. Script requires any of them to operate correctly.");\n }\n return object.__proto__;\n };\n }\n};\n\nBrowserHacks();\n\n});\n\n//@ sourceURL=weinre/target/BrowserHacks.amd.js'),eval(';modjewel.define("weinre/target/CheckForProblems", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar CheckForProblems, checkForOldPrototypeVersion;\n\nmodule.exports = CheckForProblems = (function() {\n function CheckForProblems() {}\n\n CheckForProblems.check = function() {\n return checkForOldPrototypeVersion();\n };\n\n return CheckForProblems;\n\n})();\n\ncheckForOldPrototypeVersion = function() {\n var badVersion;\n badVersion = false;\n if (typeof Prototype === "undefined") {\n return;\n }\n if (!Prototype.Version) {\n return;\n }\n if (Prototype.Version.match(/^1\\.5.*/)) {\n badVersion = true;\n }\n if (Prototype.Version.match(/^1\\.6.*/)) {\n badVersion = true;\n }\n if (badVersion) {\n return alert("Sorry, weinre is not support in versions of Prototype earlier than 1.7");\n }\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/CheckForProblems.amd.js'),eval(";modjewel.define(\"weinre/target/Console\", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Console, MessageLevel, MessageSource, MessageType, OriginalConsole, RemoteConsole, Timeline, UsingRemote, Weinre;\n\nWeinre = require('../common/Weinre');\n\nTimeline = require('../target/Timeline');\n\nUsingRemote = false;\n\nRemoteConsole = null;\n\nOriginalConsole = null;\n\nMessageSource = {\n HTML: 0,\n WML: 1,\n XML: 2,\n JS: 3,\n CSS: 4,\n Other: 5\n};\n\nMessageType = {\n Log: 0,\n Object: 1,\n Trace: 2,\n StartGroup: 3,\n StartGroupCollapsed: 4,\n EndGroup: 5,\n Assert: 6,\n UncaughtException: 7,\n Result: 8\n};\n\nMessageLevel = {\n Tip: 0,\n Log: 1,\n Warning: 2,\n Error: 3,\n Debug: 4\n};\n\nmodule.exports = Console = (function() {\n function Console() {}\n\n Object.defineProperty(Console, 'original', {\n get: function() {\n return OriginalConsole;\n }\n });\n\n Console.useRemote = function(value) {\n var oldValue;\n if (arguments.length === 0) {\n return UsingRemote;\n }\n oldValue = UsingRemote;\n UsingRemote = !!value;\n if (UsingRemote) {\n window.console = RemoteConsole;\n } else {\n window.console = OriginalConsole;\n }\n return oldValue;\n };\n\n Console.prototype._generic = function(level, messageParts) {\n var message, messagePart, parameters, payload, _i, _len;\n message = messageParts[0].toString();\n parameters = [];\n for (_i = 0, _len = messageParts.length; _i < _len; _i++) {\n messagePart = messageParts[_i];\n parameters.push(Weinre.injectedScript.wrapObjectForConsole(messagePart, true));\n }\n payload = {\n source: MessageSource.JS,\n type: MessageType.Log,\n level: level,\n message: message,\n parameters: parameters\n };\n return Weinre.wi.ConsoleNotify.addConsoleMessage(payload);\n };\n\n Console.prototype.log = function() {\n return this._generic(MessageLevel.Log, [].slice.call(arguments));\n };\n\n Console.prototype.debug = function() {\n return this._generic(MessageLevel.Debug, [].slice.call(arguments));\n };\n\n Console.prototype.error = function() {\n return this._generic(MessageLevel.Error, [].slice.call(arguments));\n };\n\n Console.prototype.info = function() {\n return this._generic(MessageLevel.Log, [].slice.call(arguments));\n };\n\n Console.prototype.warn = function() {\n return this._generic(MessageLevel.Warning, [].slice.call(arguments));\n };\n\n Console.prototype.dir = function() {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.dirxml = function() {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.trace = function() {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.assert = function(condition) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.count = function() {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.markTimeline = function(message) {\n return Timeline.addRecord_Mark(message);\n };\n\n Console.prototype.lastWMLErrorMessage = function() {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.profile = function(title) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.profileEnd = function(title) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.time = function(title) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.timeEnd = function(title) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.group = function() {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.groupCollapsed = function() {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.groupEnd = function() {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n return Console;\n\n})();\n\nRemoteConsole = new Console();\n\nOriginalConsole = window.console || {};\n\nRemoteConsole.__original = OriginalConsole;\n\nOriginalConsole.__original = OriginalConsole;\n\nrequire(\"../common/MethodNamer\").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/Console.amd.js"),eval(';modjewel.define("weinre/target/CSSStore", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar CSSStore, IDGenerator, Weinre, _elementMatchesSelector, _fallbackMatchesSelector, _getMappableId, _getMappableObject, _mozMatchesSelector, _msMatchesSelector, _webkitMatchesSelector;\n\nIDGenerator = require(\'../common/IDGenerator\');\n\nWeinre = require(\'../common/Weinre\');\n\n_elementMatchesSelector = null;\n\nmodule.exports = CSSStore = (function() {\n function CSSStore() {\n this.styleSheetMap = {};\n this.styleRuleMap = {};\n this.styleDeclMap = {};\n this.testElement = document.createElement("div");\n }\n\n CSSStore.prototype.getInlineStyle = function(node) {\n var cssProperty, styleObject, _i, _len, _ref;\n styleObject = this._buildMirrorForStyle(node.style, true);\n _ref = styleObject.cssProperties;\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n cssProperty = _ref[_i];\n cssProperty.status = "style";\n }\n return styleObject;\n };\n\n CSSStore.prototype.getComputedStyle = function(node) {\n var styleObject;\n if (!node) {\n return {};\n }\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return {};\n }\n styleObject = this._buildMirrorForStyle(window.getComputedStyle(node), false);\n return styleObject;\n };\n\n CSSStore.prototype.getMatchedCSSRules = function(node) {\n var cssRule, err, object, result, styleSheet, _i, _j, _len, _len1, _ref, _ref1;\n result = [];\n try {\n _ref = document.styleSheets;\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n styleSheet = _ref[_i];\n if (!styleSheet.cssRules) {\n continue;\n }\n _ref1 = styleSheet.cssRules;\n for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {\n cssRule = _ref1[_j];\n if (!_elementMatchesSelector(node, cssRule.selectorText)) {\n continue;\n }\n object = {};\n object.ruleId = this._getStyleRuleId(cssRule);\n object.selectorText = cssRule.selectorText;\n object.style = this._buildMirrorForStyle(cssRule.style, true);\n result.push(object);\n }\n }\n } catch (_error) {\n err = _error;\n return result;\n }\n return result;\n };\n\n CSSStore.prototype.getStyleAttributes = function(node) {\n var result;\n result = {};\n return result;\n };\n\n CSSStore.prototype.getPseudoElements = function(node) {\n var result;\n result = [];\n return result;\n };\n\n CSSStore.prototype.setPropertyText = function(styleId, propertyIndex, text, overwrite) {\n var compare, i, key, mirror, properties, propertyIndices, propertyMirror, styleDecl;\n styleDecl = Weinre.cssStore._getStyleDecl(styleId);\n if (!styleDecl) {\n Weinre.logWarning("requested style not available: " + styleId);\n return null;\n }\n mirror = styleDecl.__weinre__mirror;\n if (!mirror) {\n Weinre.logWarning("requested mirror not available: " + styleId);\n return null;\n }\n properties = mirror.cssProperties;\n propertyMirror = this._parseProperty(text);\n if (null === propertyMirror) {\n this._removePropertyFromMirror(mirror, propertyIndex);\n properties = mirror.cssProperties;\n } else {\n this._removePropertyFromMirror(mirror, propertyIndex);\n properties = mirror.cssProperties;\n propertyIndices = {};\n i = 0;\n while (i < properties.length) {\n propertyIndices[properties[i].name] = i;\n i++;\n }\n i = 0;\n while (i < propertyMirror.cssProperties.length) {\n if (propertyIndices[propertyMirror.cssProperties[i].name] != null) {\n properties[propertyIndices[propertyMirror.cssProperties[i].name]] = propertyMirror.cssProperties[i];\n } else {\n properties.push(propertyMirror.cssProperties[i]);\n }\n i++;\n }\n for (key in propertyMirror.shorthandValues) {\n mirror.shorthandValues[key] = propertyMirror.shorthandValues[key];\n }\n }\n properties.sort(compare = function(p1, p2) {\n if (p1.name < p2.name) {\n return -1;\n } else if (p1.name > p2.name) {\n return 1;\n } else {\n return 0;\n }\n });\n this._setStyleFromMirror(styleDecl);\n return mirror;\n };\n\n CSSStore.prototype._removePropertyFromMirror = function(mirror, index) {\n var i, newProperties, properties, property;\n properties = mirror.cssProperties;\n if (index >= properties.length) {\n return;\n }\n property = properties[index];\n properties[index] = null;\n if (mirror.shorthandValues[property.name]) {\n delete mirror.shorthandValues[property.name];\n i = 0;\n while (i < properties.length) {\n if (properties[i]) {\n if (properties[i].shorthandName === property.name) {\n properties[i] = null;\n }\n }\n i++;\n }\n }\n newProperties = [];\n i = 0;\n while (i < properties.length) {\n if (properties[i]) {\n newProperties.push(properties[i]);\n }\n i++;\n }\n return mirror.cssProperties = newProperties;\n };\n\n CSSStore.prototype.toggleProperty = function(styleId, propertyIndex, disable) {\n var cssProperty, mirror, styleDecl;\n styleDecl = Weinre.cssStore._getStyleDecl(styleId);\n if (!styleDecl) {\n Weinre.logWarning("requested style not available: " + styleId);\n return null;\n }\n mirror = styleDecl.__weinre__mirror;\n if (!mirror) {\n Weinre.logWarning("requested mirror not available: " + styleId);\n return null;\n }\n cssProperty = mirror.cssProperties[propertyIndex];\n if (!cssProperty) {\n Weinre.logWarning(("requested property not available: " + styleId + ": ") + propertyIndex);\n return null;\n }\n if (disable) {\n cssProperty.status = "disabled";\n } else {\n cssProperty.status = "active";\n }\n this._setStyleFromMirror(styleDecl);\n return mirror;\n };\n\n CSSStore.prototype._setStyleFromMirror = function(styleDecl) {\n var cssProperties, cssText, property, _i, _len;\n cssText = [];\n cssProperties = styleDecl.__weinre__mirror.cssProperties;\n cssText = "";\n for (_i = 0, _len = cssProperties.length; _i < _len; _i++) {\n property = cssProperties[_i];\n if (!property.parsedOk) {\n continue;\n }\n if (property.status === "disabled") {\n continue;\n }\n if (property.shorthandName) {\n continue;\n }\n cssText += property.name + ": " + property.value;\n if (property.priority === "important") {\n cssText += " !important; ";\n } else {\n cssText += "; ";\n }\n }\n return styleDecl.cssText = cssText;\n };\n\n CSSStore.prototype._buildMirrorForStyle = function(styleDecl, bind) {\n var i, name, properties, property, result, shorthandName;\n result = {\n properties: {},\n cssProperties: []\n };\n if (!styleDecl) {\n return result;\n }\n if (bind) {\n result.styleId = this._getStyleDeclId(styleDecl);\n styleDecl.__weinre__mirror = result;\n }\n result.properties.width = styleDecl.getPropertyValue("width") || "";\n result.properties.height = styleDecl.getPropertyValue("height") || "";\n result.cssText = styleDecl.cssText;\n result.shorthandValues = {};\n properties = [];\n if (styleDecl) {\n i = 0;\n while (i < styleDecl.length) {\n property = {};\n name = styleDecl.item(i);\n property.name = name;\n property.priority = styleDecl.getPropertyPriority(name);\n property.implicit = typeof styleDecl.isPropertyImplicit !== "undefined" ? styleDecl.isPropertyImplicit(name) : true;\n property.shorthandName = typeof styleDecl.getPropertyShorthand !== "undefined" ? styleDecl.getPropertyShorthand(name) || "" : "";\n property.status = (property.shorthandName ? "style" : "active");\n property.parsedOk = true;\n property.value = styleDecl.getPropertyValue(name);\n properties.push(property);\n if (property.shorthandName) {\n shorthandName = property.shorthandName;\n if (!result.shorthandValues[shorthandName]) {\n result.shorthandValues[shorthandName] = styleDecl.getPropertyValue(shorthandName);\n property = {};\n property.name = shorthandName;\n property.priority = styleDecl.getPropertyPriority(shorthandName);\n property.implicit = styleDecl.isPropertyImplicit(shorthandName);\n property.shorthandName = "";\n property.status = "active";\n property.parsedOk = true;\n property.value = styleDecl.getPropertyValue(name);\n properties.push(property);\n }\n }\n i++;\n }\n }\n properties.sort(function(p1, p2) {\n if (p1.name < p2.name) {\n return -1;\n } else if (p1.name > p2.name) {\n return 1;\n } else {\n return 0;\n }\n });\n result.cssProperties = properties;\n return result;\n };\n\n CSSStore.prototype._parseProperty = function(string) {\n var match, property, propertyPattern, result, testStyleDecl;\n testStyleDecl = this.testElement.style;\n try {\n testStyleDecl.cssText = string;\n if (testStyleDecl.cssText !== "") {\n return this._buildMirrorForStyle(testStyleDecl, false);\n }\n } catch (_error) {}\n propertyPattern = /\\s*(.+)\\s*:\\s*(.+)\\s*(!important)?\\s*;/;\n match = propertyPattern.exec(string);\n if (!match) {\n return null;\n }\n match[3] = (match[3] === "!important" ? "important" : "");\n property = {};\n property.name = match[1];\n property.priority = match[3];\n property.implicit = true;\n property.shorthandName = "";\n property.status = "inactive";\n property.parsedOk = false;\n property.value = match[2];\n result = {};\n result.width = 0;\n result.height = 0;\n result.shorthandValues = 0;\n result.cssProperties = [property];\n return result;\n };\n\n CSSStore.prototype._getStyleSheet = function(id) {\n return _getMappableObject(id, this.styleSheetMap);\n };\n\n CSSStore.prototype._getStyleSheetId = function(styleSheet) {\n return _getMappableId(styleSheet, this.styleSheetMap);\n };\n\n CSSStore.prototype._getStyleRule = function(id) {\n return _getMappableObject(id, this.styleRuleMap);\n };\n\n CSSStore.prototype._getStyleRuleId = function(styleRule) {\n return _getMappableId(styleRule, this.styleRuleMap);\n };\n\n CSSStore.prototype._getStyleDecl = function(id) {\n return _getMappableObject(id, this.styleDeclMap);\n };\n\n CSSStore.prototype._getStyleDeclId = function(styleDecl) {\n return _getMappableId(styleDecl, this.styleDeclMap);\n };\n\n return CSSStore;\n\n})();\n\n_getMappableObject = function(id, map) {\n return map[id];\n};\n\n_getMappableId = function(object, map) {\n return IDGenerator.getId(object, map);\n};\n\n_mozMatchesSelector = function(element, selector) {\n if (!element.mozMatchesSelector) {\n return false;\n }\n return element.mozMatchesSelector(selector);\n};\n\n_webkitMatchesSelector = function(element, selector) {\n if (!element.webkitMatchesSelector) {\n return false;\n }\n return element.webkitMatchesSelector(selector);\n};\n\n_msMatchesSelector = function(element, selector) {\n if (!element.msMatchesSelector) {\n return false;\n }\n return element.msMatchesSelector(selector);\n};\n\n_fallbackMatchesSelector = function(element, selector) {\n return false;\n};\n\nif (Element.prototype.webkitMatchesSelector) {\n _elementMatchesSelector = _webkitMatchesSelector;\n} else if (Element.prototype.mozMatchesSelector) {\n _elementMatchesSelector = _mozMatchesSelector;\n} else if (Element.prototype.msMatchesSelector) {\n _elementMatchesSelector = _msMatchesSelector;\n} else {\n _elementMatchesSelector = _fallbackMatchesSelector;\n}\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/CSSStore.amd.js'),eval(';modjewel.define("weinre/target/ElementHighlighter", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar ElementHighlighter, canvasAvailable, currentHighlighterElement, fromPx, getMetricsForElement, highlighterClass, supportsCanvas;\n\ncanvasAvailable = null;\n\nhighlighterClass = null;\n\ncurrentHighlighterElement = null;\n\nmodule.exports = ElementHighlighter = (function() {\n ElementHighlighter.create = function() {\n if (highlighterClass == null) {\n highlighterClass = require(\'./ElementHighlighterDivs2\');\n }\n return new highlighterClass();\n };\n\n function ElementHighlighter() {\n this.hElement = this.createHighlighterElement();\n this.hElement.__weinreHighlighter = true;\n this.hElement.style.display = "none";\n this.hElement.style.zIndex = 10 * 1000 * 1000;\n if (currentHighlighterElement) {\n document.body.removeChild(currentHighlighterElement);\n }\n currentHighlighterElement = this.hElement;\n document.body.appendChild(this.hElement);\n }\n\n ElementHighlighter.prototype.on = function(element) {\n if (null === element) {\n return;\n }\n if (element.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n this.redraw(getMetricsForElement(element));\n return this.hElement.style.display = "block";\n };\n\n ElementHighlighter.prototype.off = function() {\n return this.hElement.style.display = "none";\n };\n\n return ElementHighlighter;\n\n})();\n\ngetMetricsForElement = function(element) {\n var cStyle, el, left, metrics, top;\n metrics = {};\n left = 0;\n top = 0;\n el = element;\n while (true) {\n left += el.offsetLeft;\n top += el.offsetTop;\n if (!(el = el.offsetParent)) {\n break;\n }\n }\n metrics.x = left;\n metrics.y = top;\n cStyle = document.defaultView.getComputedStyle(element);\n metrics.width = element.offsetWidth;\n metrics.height = element.offsetHeight;\n metrics.marginLeft = fromPx(cStyle["margin-left"] || cStyle["marginLeft"]);\n metrics.marginRight = fromPx(cStyle["margin-right"] || cStyle["marginRight"]);\n metrics.marginTop = fromPx(cStyle["margin-top"] || cStyle["marginTop"]);\n metrics.marginBottom = fromPx(cStyle["margin-bottom"] || cStyle["marginBottom"]);\n metrics.borderLeft = fromPx(cStyle["border-left-width"] || cStyle["borderLeftWidth"]);\n metrics.borderRight = fromPx(cStyle["border-right-width"] || cStyle["borderRightWidth"]);\n metrics.borderTop = fromPx(cStyle["border-top-width"] || cStyle["borderTopWidth"]);\n metrics.borderBottom = fromPx(cStyle["border-bottom-width"] || cStyle["borderBottomWidth"]);\n metrics.paddingLeft = fromPx(cStyle["padding-left"] || cStyle["paddingLeft"]);\n metrics.paddingRight = fromPx(cStyle["padding-right"] || cStyle["paddingRight"]);\n metrics.paddingTop = fromPx(cStyle["padding-top"] || cStyle["paddingTop"]);\n metrics.paddingBottom = fromPx(cStyle["padding-bottom"] || cStyle["paddingBottom"]);\n metrics.x -= metrics.marginLeft;\n metrics.y -= metrics.marginTop;\n return metrics;\n};\n\nfromPx = function(string) {\n return parseInt(string.replace(/px$/, ""));\n};\n\nsupportsCanvas = function() {\n var element;\n element = document.createElement(\'canvas\');\n if (!element.getContext) {\n return false;\n }\n if (element.getContext(\'2d\')) {\n return true;\n }\n return false;\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/ElementHighlighter.amd.js'),eval(";modjewel.define(\"weinre/target/ElementHighlighterDivs2\", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar ColorBorder, ColorContent, ColorMargin, ColorPadding, ElementHighlighter, ElementHighlighterDivs2, px,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\nElementHighlighter = require('./ElementHighlighter');\n\nColorMargin = 'rgba(246, 178, 107, 0.66)';\n\nColorBorder = 'rgba(255, 229, 153, 0.66)';\n\nColorPadding = 'rgba(147, 196, 125, 0.55)';\n\nColorContent = 'rgba(111, 168, 220, 0.66)';\n\nColorBorder = 'rgba(255, 255, 153, 0.40)';\n\nColorPadding = 'rgba( 0, 255, 0, 0.20)';\n\nColorContent = 'rgba( 0, 0, 255, 0.30)';\n\nmodule.exports = ElementHighlighterDivs2 = (function(_super) {\n __extends(ElementHighlighterDivs2, _super);\n\n function ElementHighlighterDivs2() {\n return ElementHighlighterDivs2.__super__.constructor.apply(this, arguments);\n }\n\n ElementHighlighterDivs2.prototype.createHighlighterElement = function() {\n this.hElement1 = document.createElement(\"weinreHighlighter\");\n this.hElement1.style.position = 'absolute';\n this.hElement1.style.overflow = 'hidden';\n this.hElement2 = document.createElement(\"weinreHighlighter\");\n this.hElement2.style.position = 'absolute';\n this.hElement2.style.display = 'block';\n this.hElement2.style.overflow = 'hidden';\n this.hElement1.appendChild(this.hElement2);\n this.hElement1.style.borderTopStyle = 'solid';\n this.hElement1.style.borderLeftStyle = 'solid';\n this.hElement1.style.borderBottomStyle = 'solid';\n this.hElement1.style.borderRightStyle = 'solid';\n this.hElement1.style.borderTopColor = ColorMargin;\n this.hElement1.style.borderLeftColor = ColorMargin;\n this.hElement1.style.borderBottomColor = ColorMargin;\n this.hElement1.style.borderRightColor = ColorMargin;\n this.hElement1.style.backgroundColor = ColorBorder;\n this.hElement2.style.borderTopStyle = 'solid';\n this.hElement2.style.borderLeftStyle = 'solid';\n this.hElement2.style.borderBottomStyle = 'solid';\n this.hElement2.style.borderRightStyle = 'solid';\n this.hElement2.style.borderTopColor = ColorPadding;\n this.hElement2.style.borderLeftColor = ColorPadding;\n this.hElement2.style.borderBottomColor = ColorPadding;\n this.hElement2.style.borderRightColor = ColorPadding;\n this.hElement2.style.backgroundColor = ColorContent;\n this.hElement1.style.outline = 'black solid thin';\n return this.hElement1;\n };\n\n ElementHighlighterDivs2.prototype.redraw = function(metrics) {\n this.hElement1.style.top = px(metrics.y);\n this.hElement1.style.left = px(metrics.x);\n this.hElement1.style.height = px(metrics.height);\n this.hElement1.style.width = px(metrics.width);\n this.hElement1.style.borderTopWidth = px(metrics.marginTop);\n this.hElement1.style.borderLeftWidth = px(metrics.marginLeft);\n this.hElement1.style.borderBottomWidth = px(metrics.marginBottom);\n this.hElement1.style.borderRightWidth = px(metrics.marginRight);\n this.hElement2.style.top = px(metrics.borderTop);\n this.hElement2.style.left = px(metrics.borderLeft);\n this.hElement2.style.bottom = px(metrics.borderBottom);\n this.hElement2.style.right = px(metrics.borderRight);\n this.hElement2.style.borderTopWidth = px(metrics.paddingTop);\n this.hElement2.style.borderLeftWidth = px(metrics.paddingLeft);\n this.hElement2.style.borderBottomWidth = px(metrics.paddingBottom);\n return this.hElement2.style.borderRightWidth = px(metrics.paddingRight);\n };\n\n return ElementHighlighterDivs2;\n\n})(ElementHighlighter);\n\npx = function(value) {\n return \"\" + value + \"px\";\n};\n\nrequire(\"../common/MethodNamer\").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/ElementHighlighterDivs2.amd.js"),eval(';modjewel.define("weinre/target/HookSites", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar HookLib, HookSites;\n\nHookLib = require(\'../common/HookLib\');\n\nmodule.exports = HookSites = (function() {\n function HookSites() {}\n\n return HookSites;\n\n})();\n\nHookSites.window_clearInterval = HookLib.addHookSite(window, "clearInterval");\n\nHookSites.window_clearTimeout = HookLib.addHookSite(window, "clearTimeout");\n\nHookSites.window_setInterval = HookLib.addHookSite(window, "setInterval");\n\nHookSites.window_setTimeout = HookLib.addHookSite(window, "setTimeout");\n\nHookSites.window_addEventListener = HookLib.addHookSite(window, "addEventListener");\n\nHookSites.Node_addEventListener = HookLib.addHookSite(Node.prototype, "addEventListener");\n\nHookSites.XMLHttpRequest_open = HookLib.addHookSite(XMLHttpRequest.prototype, "open");\n\nHookSites.XMLHttpRequest_send = HookLib.addHookSite(XMLHttpRequest.prototype, "send");\n\nHookSites.XMLHttpRequest_addEventListener = HookLib.addHookSite(XMLHttpRequest.prototype, "addEventListener");\n\nif (window.openDatabase) {\n HookSites.window_openDatabase = HookLib.addHookSite(window, "openDatabase");\n}\n\nif (window.localStorage) {\n HookSites.LocalStorage_setItem = HookLib.addHookSite(window.localStorage, "setItem");\n HookSites.LocalStorage_removeItem = HookLib.addHookSite(window.localStorage, "removeItem");\n HookSites.LocalStorage_clear = HookLib.addHookSite(window.localStorage, "clear");\n}\n\nif (window.sessionStorage) {\n HookSites.SessionStorage_setItem = HookLib.addHookSite(window.sessionStorage, "setItem");\n HookSites.SessionStorage_removeItem = HookLib.addHookSite(window.sessionStorage, "removeItem");\n HookSites.SessionStorage_clear = HookLib.addHookSite(window.sessionStorage, "clear");\n}\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/HookSites.amd.js'),eval('var injectedScriptConstructor = \n/*\n * Copyright (C) 2007 Apple Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of\n * its contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n(function (InjectedScriptHost, inspectedWindow, injectedScriptId) {\n\nfunction bind(thisObject, memberFunction)\n{\n var func = memberFunction;\n var args = Array.prototype.slice.call(arguments, 2);\n function bound()\n {\n return func.apply(thisObject, args.concat(Array.prototype.slice.call(arguments, 0)));\n }\n bound.toString = function() {\n return "bound: " + func;\n };\n return bound;\n}\n\nvar InjectedScript = function()\n{\n this._lastBoundObjectId = 1;\n this._idToWrappedObject = {};\n this._objectGroups = {};\n}\n\nInjectedScript.prototype = {\n wrapObjectForConsole: function(object, canAccessInspectedWindow)\n {\n if (canAccessInspectedWindow)\n return this._wrapObject(object, "console");\n var result = {};\n result.type = typeof object;\n result.description = this._toString(object);\n return result;\n },\n\n _wrapObject: function(object, objectGroupName, abbreviate)\n {\n try {\n var objectId;\n if (typeof object === "object" || typeof object === "function" || this._isHTMLAllCollection(object)) {\n var id = this._lastBoundObjectId++;\n this._idToWrappedObject[id] = object;\n \n var group = this._objectGroups[objectGroupName];\n if (!group) {\n group = [];\n this._objectGroups[objectGroupName] = group;\n }\n group.push(id);\n objectId = { injectedScriptId: injectedScriptId,\n id: id,\n groupName: objectGroupName };\n }\n return InjectedScript.RemoteObject.fromObject(object, objectId, abbreviate);\n } catch (e) {\n return InjectedScript.RemoteObject.fromObject("[ Exception: " + e.toString() + " ]");\n }\n },\n\n _parseObjectId: function(objectId)\n {\n return eval("(" + objectId + ")");\n },\n\n releaseWrapperObjectGroup: function(objectGroupName)\n {\n var group = this._objectGroups[objectGroupName];\n if (!group)\n return;\n for (var i = 0; i < group.length; i++)\n delete this._idToWrappedObject[group[i]];\n delete this._objectGroups[objectGroupName];\n },\n\n dispatch: function(methodName, args)\n {\n var argsArray = eval("(" + args + ")");\n var result = this[methodName].apply(this, argsArray);\n if (typeof result === "undefined") {\n inspectedWindow.console.error("Web Inspector error: InjectedScript.%s returns undefined", methodName);\n result = null;\n }\n return result;\n },\n\n getProperties: function(objectId, ignoreHasOwnProperty, abbreviate)\n {\n var parsedObjectId = this._parseObjectId(objectId);\n var object = this._objectForId(parsedObjectId);\n\n if (!this._isDefined(object))\n return false;\n var properties = [];\n var propertyNames;\n\n // IE returns \'Invalid calling object\' for some of the prototypes, so return the object itself\n if (window.navigator.userAgent.indexOf("MSIE") != -1 ) {\n propertyNames = this._getPropertyNames(object);\n } else\n propertyNames = ignoreHasOwnProperty ? this._getPropertyNames(object) : Object.getOwnPropertyNames(object);\n\n\n if (!ignoreHasOwnProperty && object.__proto__)\n propertyNames.push("__proto__");\n \n // Go over properties, prepare results.\n for (var i = 0; i < propertyNames.length; ++i) {\n var propertyName = propertyNames[i];\n \n var property = {};\n property.name = propertyName + "";\n var isGetter = object["__lookupGetter__"] && object.__lookupGetter__(propertyName);\n if (!isGetter) {\n try {\n property.value = this._wrapObject(object[propertyName], parsedObjectId.groupName, abbreviate);\n } catch(e) {\n property.value = new InjectedScript.RemoteObject.fromException(e);\n }\n } else {\n // FIXME: this should show something like "getter" (bug 16734).\n property.value = new InjectedScript.RemoteObject.fromObject("\\u2014"); // em dash\n property.isGetter = true;\n }\n properties.push(property);\n }\n return properties;\n },\n\n setPropertyValue: function(objectId, propertyName, expression)\n {\n var parsedObjectId = this._parseObjectId(objectId);\n var object = this._objectForId(parsedObjectId);\n if (!this._isDefined(object))\n return false;\n \n var expressionLength = expression.length;\n if (!expressionLength) {\n delete object[propertyName];\n return !(propertyName in object);\n }\n \n try {\n // Surround the expression in parenthesis so the result of the eval is the result\n // of the whole expression not the last potential sub-expression.\n \n // There is a regression introduced here: eval is now happening against global object,\n // not call frame while on a breakpoint.\n // TODO: bring evaluation against call frame back.\n var result = inspectedWindow.eval("(" + expression + ")");\n // Store the result in the property.\n object[propertyName] = result;\n return true;\n } catch(e) {\n try {\n var result = inspectedWindow.eval("\\"" + expression.replace(/"/g, "\\\\\\"") + "\\"");\n object[propertyName] = result;\n return true;\n } catch(e) {\n return false;\n }\n }\n },\n\n _populatePropertyNames: function(object, resultSet)\n {\n for (var o = object; o; o = Object.getPrototypeOf(o)) {\n try {\n var names = Object.getOwnPropertyNames(o);\n for (var i = 0; i < names.length; ++i)\n resultSet[names[i]] = true;\n } catch (e) {\n }\n }\n },\n\n _getPropertyNames: function(object, resultSet)\n {\n var propertyNameSet = {};\n this._populatePropertyNames(object, propertyNameSet);\n return Object.keys(propertyNameSet);\n },\n\n getCompletions: function(expression, includeCommandLineAPI)\n {\n var props = {};\n try {\n if (!expression)\n expression = "this";\n var expressionResult = this._evaluateOn(inspectedWindow.eval, inspectedWindow, expression, false, false);\n\n if (typeof expressionResult === "object")\n this._populatePropertyNames(expressionResult, props);\n\n if (includeCommandLineAPI) {\n for (var prop in CommandLineAPI.members_)\n props[CommandLineAPI.members_[prop]] = true;\n }\n } catch(e) {\n }\n return props;\n },\n\n getCompletionsOnCallFrame: function(callFrameId, expression, includeCommandLineAPI)\n {\n var props = {};\n try {\n var callFrame = this._callFrameForId(callFrameId);\n if (!callFrame)\n return props;\n\n if (expression) {\n var expressionResult = this._evaluateOn(callFrame.evaluate, callFrame, expression, true, false);\n if (typeof expressionResult === "object")\n this._populatePropertyNames(expressionResult, props);\n } else {\n // Evaluate into properties in scope of the selected call frame.\n var scopeChain = callFrame.scopeChain;\n for (var i = 0; i < scopeChain.length; ++i)\n this._populatePropertyNames(scopeChain[i], props);\n }\n \n if (includeCommandLineAPI) {\n for (var prop in CommandLineAPI.members_)\n props[CommandLineAPI.members_[prop]] = true;\n }\n } catch(e) {\n }\n return props;\n },\n\n evaluate: function(expression, objectGroup, injectCommandLineAPI)\n {\n return this._evaluateAndWrap(inspectedWindow.eval, inspectedWindow, expression, objectGroup, false, injectCommandLineAPI);\n },\n\n _evaluateAndWrap: function(evalFunction, object, expression, objectGroup, isEvalOnCallFrame, injectCommandLineAPI)\n {\n try {\n return this._wrapObject(this._evaluateOn(evalFunction, object, expression, isEvalOnCallFrame, injectCommandLineAPI), objectGroup);\n } catch (e) {\n return InjectedScript.RemoteObject.fromException(e);\n }\n },\n\n _evaluateOn: function(evalFunction, object, expression, isEvalOnCallFrame, injectCommandLineAPI)\n {\n // Only install command line api object for the time of evaluation.\n // Surround the expression in with statements to inject our command line API so that\n // the window object properties still take more precedent than our API functions.\n\n try {\n if (injectCommandLineAPI && inspectedWindow.console) {\n inspectedWindow.console._commandLineAPI = new CommandLineAPI(this._commandLineAPIImpl, isEvalOnCallFrame ? object : null);\n expression = "with ((window && window.console && window.console._commandLineAPI) || {}) {\\n" + expression + "\\n}";\n }\n\n var value = evalFunction.call(object, expression);\n\n // When evaluating on call frame error is not thrown, but returned as a value.\n if (this._type(value) === "error")\n throw value.toString();\n\n return value;\n } finally {\n if (injectCommandLineAPI && inspectedWindow.console)\n delete inspectedWindow.console._commandLineAPI;\n }\n },\n\n getNodeId: function(node)\n {\n return InjectedScriptHost.pushNodePathToFrontend(node, false, false);\n },\n\n callFrames: function()\n {\n var callFrame = InjectedScriptHost.currentCallFrame();\n if (!callFrame)\n return false;\n \n injectedScript.releaseWrapperObjectGroup("backtrace");\n var result = [];\n var depth = 0;\n do {\n result.push(new InjectedScript.CallFrameProxy(depth++, callFrame));\n callFrame = callFrame.caller;\n } while (callFrame);\n return result;\n },\n\n evaluateOnCallFrame: function(callFrameId, expression, objectGroup, injectCommandLineAPI)\n {\n var callFrame = this._callFrameForId(callFrameId);\n if (!callFrame)\n return false;\n return this._evaluateAndWrap(callFrame.evaluate, callFrame, expression, objectGroup, true, injectCommandLineAPI);\n },\n\n _callFrameForId: function(callFrameId)\n {\n var parsedCallFrameId = eval("(" + callFrameId + ")");\n var ordinal = parsedCallFrameId.ordinal;\n var callFrame = InjectedScriptHost.currentCallFrame();\n while (--ordinal >= 0 && callFrame)\n callFrame = callFrame.caller;\n return callFrame;\n },\n\n _nodeForId: function(nodeId)\n {\n if (!nodeId)\n return null;\n return InjectedScriptHost.nodeForId(nodeId);\n },\n\n _objectForId: function(objectId)\n {\n return this._idToWrappedObject[objectId.id];\n },\n\n resolveNode: function(nodeId)\n {\n var node = this._nodeForId(nodeId);\n if (!node)\n return false;\n // FIXME: receive the object group from client.\n return this._wrapObject(node, "prototype");\n },\n\n getNodeProperties: function(nodeId, properties)\n {\n var node = this._nodeForId(nodeId);\n if (!node)\n return false;\n properties = eval("(" + properties + ")");\n var result = {};\n for (var i = 0; i < properties.length; ++i)\n result[properties[i]] = node[properties[i]];\n return result;\n },\n\n getNodePrototypes: function(nodeId)\n {\n this.releaseWrapperObjectGroup("prototypes");\n var node = this._nodeForId(nodeId);\n if (!node)\n return false;\n\n var result = [];\n var prototype = node;\n\n// if (window.navigator.userAgent.indexOf("MSIE") != -1 )\n// {\n// result.push(this._wrapObject(prototype, "prototypes"));\n// return result;\n// }\n\n do {\n result.push(this._wrapObject(prototype, "prototypes"));\n prototype = Object.getPrototypeOf(prototype);\n } while (prototype)\n return result;\n },\n\n pushNodeToFrontend: function(objectId)\n {\n var parsedObjectId = this._parseObjectId(objectId);\n var object = this._objectForId(parsedObjectId);\n if (!object || this._type(object) !== "node")\n return false;\n return InjectedScriptHost.pushNodePathToFrontend(object, false, false);\n },\n\n evaluateOnSelf: function(funcBody, args)\n {\n var func = eval("(" + funcBody + ")");\n return func.apply(this, eval("(" + args + ")") || []);\n },\n\n _isDefined: function(object)\n {\n return object || this._isHTMLAllCollection(object);\n },\n\n _isHTMLAllCollection: function(object)\n {\n // document.all is reported as undefined, but we still want to process it.\n return (typeof object === "undefined") && inspectedWindow.HTMLAllCollection && object instanceof inspectedWindow.HTMLAllCollection;\n },\n\n _type: function(obj)\n {\n if (obj === null)\n return "null";\n\n var type = typeof obj;\n if (type !== "object" && type !== "function") {\n // FIXME(33716): typeof document.all is always \'undefined\'.\n if (this._isHTMLAllCollection(obj))\n return "array";\n return type;\n }\n\n // If owning frame has navigated to somewhere else window properties will be undefined.\n // In this case just return result of the typeof.\n if (!inspectedWindow.document)\n return type;\n\n if (obj instanceof inspectedWindow.Node) {\n\n try {\n return (obj.nodeType === undefined ? type : "node");\n } catch (ex) {} // for IE there could be \'Invalid calling object\' exception\n\n return obj.toString();\n }\n\n if (obj instanceof inspectedWindow.String)\n return "string";\n if (obj instanceof inspectedWindow.Array)\n return "array";\n if (obj instanceof inspectedWindow.Boolean)\n return "boolean";\n if (obj instanceof inspectedWindow.Number)\n return "number";\n if (obj instanceof inspectedWindow.Date)\n return "date";\n if (obj instanceof inspectedWindow.RegExp)\n return "regexp";\n // FireBug\'s array detection.\n if (isFinite(obj.length) && typeof obj.splice === "function")\n return "array";\n if (isFinite(obj.length) && typeof obj.callee === "function") // arguments.\n return "array";\n if (obj instanceof inspectedWindow.NodeList)\n return "array";\n if (obj instanceof inspectedWindow.HTMLCollection)\n return "array";\n if (obj instanceof inspectedWindow.Error)\n return "error";\n return type;\n },\n\n _describe: function(obj, abbreviated)\n {\n var type = this._type(obj);\n\n switch (type) {\n case "object":\n case "node":\n var result = InjectedScriptHost.internalConstructorName(obj);\n if (result === "Object") {\n // In Chromium DOM wrapper prototypes will have Object as their constructor name,\n // get the real DOM wrapper name from the constructor property.\n var constructorName = obj.constructor && obj.constructor.name;\n if (constructorName)\n return constructorName;\n }\n return result;\n case "array":\n var className = InjectedScriptHost.internalConstructorName(obj);\n if (typeof obj.length === "number")\n className += "[" + obj.length + "]";\n return className;\n case "string":\n if (!abbreviated)\n return obj;\n if (obj.length > 100)\n return "\\"" + obj.substring(0, 100) + "\\u2026\\"";\n return "\\"" + obj + "\\"";\n case "function":\n var objectText = this._toString(obj);\n if (abbreviated)\n objectText = /.*/.exec(objectText)[0].replace(/ +$/g, "");\n return objectText;\n default:\n return this._toString(obj);\n }\n },\n\n _toString: function(obj)\n {\n // We don\'t use String(obj) because inspectedWindow.String is undefined if owning frame navigated to another page.\n return "" + obj;\n }\n}\n\nvar injectedScript = new InjectedScript();\n\nInjectedScript.RemoteObject = function(objectId, type, description, hasChildren)\n{\n this.objectId = objectId;\n this.type = type;\n this.description = description;\n this.hasChildren = hasChildren;\n}\n\nInjectedScript.RemoteObject.fromException = function(e)\n{\n return new InjectedScript.RemoteObject(null, "error", e.toString());\n}\n\nInjectedScript.RemoteObject.fromObject = function(object, objectId, abbreviate)\n{\n var type = injectedScript._type(object);\n var rawType = typeof object;\n var hasChildren = (rawType === "object" && object !== null && (Object.getOwnPropertyNames(object).length || !!Object.getPrototypeOf(object))) || rawType === "function";\n var description = "";\n try {\n var description = injectedScript._describe(object, abbreviate);\n return new InjectedScript.RemoteObject(objectId, type, description, hasChildren);\n } catch (e) {\n return InjectedScript.RemoteObject.fromException(e);\n }\n}\n\nInjectedScript.CallFrameProxy = function(ordinal, callFrame)\n{\n this.id = { ordinal: ordinal, injectedScriptId: injectedScriptId };\n this.type = callFrame.type;\n this.functionName = (this.type === "function" ? callFrame.functionName : "");\n this.sourceID = callFrame.sourceID;\n this.line = callFrame.line;\n this.column = callFrame.column;\n this.scopeChain = this._wrapScopeChain(callFrame);\n}\n\nInjectedScript.CallFrameProxy.prototype = {\n _wrapScopeChain: function(callFrame)\n {\n var GLOBAL_SCOPE = 0;\n var LOCAL_SCOPE = 1;\n var WITH_SCOPE = 2;\n var CLOSURE_SCOPE = 3;\n var CATCH_SCOPE = 4;\n \n var scopeChain = callFrame.scopeChain;\n var scopeChainProxy = [];\n var foundLocalScope = false;\n for (var i = 0; i < scopeChain.length; i++) {\n var scopeType = callFrame.scopeType(i);\n var scopeObject = scopeChain[i];\n var scopeObjectProxy = injectedScript._wrapObject(scopeObject, "backtrace", true);\n\n switch(scopeType) {\n case LOCAL_SCOPE: {\n foundLocalScope = true;\n scopeObjectProxy.isLocal = true;\n scopeObjectProxy.thisObject = injectedScript._wrapObject(callFrame.thisObject, "backtrace", true);\n break;\n }\n case CLOSURE_SCOPE: {\n scopeObjectProxy.isClosure = true;\n break;\n }\n case WITH_SCOPE:\n case CATCH_SCOPE: {\n if (foundLocalScope && scopeObject instanceof inspectedWindow.Element)\n scopeObjectProxy.isElement = true;\n else if (foundLocalScope && scopeObject instanceof inspectedWindow.Document)\n scopeObjectProxy.isDocument = true;\n else\n scopeObjectProxy.isWithBlock = true;\n break;\n }\n }\n scopeChainProxy.push(scopeObjectProxy);\n }\n return scopeChainProxy;\n }\n}\n\nfunction CommandLineAPI(commandLineAPIImpl, callFrame)\n{\n function inScopeVariables(member)\n {\n if (!callFrame)\n return false;\n\n var scopeChain = callFrame.scopeChain;\n for (var i = 0; i < scopeChain.length; ++i) {\n if (member in scopeChain[i])\n return true;\n }\n return false;\n }\n\n for (var i = 0; i < CommandLineAPI.members_.length; ++i) {\n var member = CommandLineAPI.members_[i];\n if (member in inspectedWindow || inScopeVariables(member))\n continue;\n\n this[member] = bind(commandLineAPIImpl, commandLineAPIImpl[member]);\n }\n\n for (var i = 0; i < 5; ++i) {\n var member = "$" + i;\n if (member in inspectedWindow || inScopeVariables(member))\n continue;\n\n // fix for non-webkit browsers\n //this.__defineGetter__("$" + i, bind(commandLineAPIImpl, commandLineAPIImpl._inspectedNode, i));\n Object.defineProperty(this, "$" + i, {\n get: bind(commandLineAPIImpl, commandLineAPIImpl._inspectedNode, i)\n });\n }\n}\n\nCommandLineAPI.members_ = [\n "$", "$$", "$x", "dir", "dirxml", "keys", "values", "profile", "profileEnd",\n "monitorEvents", "unmonitorEvents", "inspect", "copy", "clear"\n];\n\nfunction CommandLineAPIImpl()\n{\n}\n\nCommandLineAPIImpl.prototype = {\n $: function()\n {\n return document.getElementById.apply(document, arguments)\n },\n\n $$: function()\n {\n return document.querySelectorAll.apply(document, arguments)\n },\n\n $x: function(xpath, context)\n {\n var nodes = [];\n try {\n var doc = (context && context.ownerDocument) || inspectedWindow.document;\n var results = doc.evaluate(xpath, context || doc, null, XPathResult.ANY_TYPE, null);\n var node;\n while (node = results.iterateNext())\n nodes.push(node);\n } catch (e) {\n }\n return nodes;\n },\n\n dir: function()\n {\n return console.dir.apply(console, arguments)\n },\n\n dirxml: function()\n {\n return console.dirxml.apply(console, arguments)\n },\n\n keys: function(object)\n {\n return Object.keys(object);\n },\n\n values: function(object)\n {\n var result = [];\n for (var key in object)\n result.push(object[key]);\n return result;\n },\n\n profile: function()\n {\n return console.profile.apply(console, arguments)\n },\n\n profileEnd: function()\n {\n return console.profileEnd.apply(console, arguments)\n },\n\n monitorEvents: function(object, types)\n {\n if (!object || !object.addEventListener || !object.removeEventListener)\n return;\n types = this._normalizeEventTypes(types);\n for (var i = 0; i < types.length; ++i) {\n object.removeEventListener(types[i], this._logEvent, false);\n object.addEventListener(types[i], this._logEvent, false);\n }\n },\n\n unmonitorEvents: function(object, types)\n {\n if (!object || !object.addEventListener || !object.removeEventListener)\n return;\n types = this._normalizeEventTypes(types);\n for (var i = 0; i < types.length; ++i)\n object.removeEventListener(types[i], this._logEvent, false);\n },\n\n inspect: function(object)\n {\n if (arguments.length === 0)\n return;\n\n inspectedWindow.console.log(object);\n if (injectedScript._type(object) === "node")\n InjectedScriptHost.pushNodePathToFrontend(object, false, true);\n else {\n switch (injectedScript._describe(object)) {\n case "Database":\n InjectedScriptHost.selectDatabase(object);\n break;\n case "Storage":\n InjectedScriptHost.selectDOMStorage(object);\n break;\n }\n }\n },\n\n copy: function(object)\n {\n if (injectedScript._type(object) === "node")\n object = object.outerHTML;\n InjectedScriptHost.copyText(object);\n },\n\n clear: function()\n {\n InjectedScriptHost.clearConsoleMessages();\n },\n\n _inspectedNode: function(num)\n {\n var nodeId = InjectedScriptHost.inspectedNode(num);\n return injectedScript._nodeForId(nodeId);\n },\n\n _normalizeEventTypes: function(types)\n {\n if (typeof types === "undefined")\n types = [ "mouse", "key", "load", "unload", "abort", "error", "select", "change", "submit", "reset", "focus", "blur", "resize", "scroll" ];\n else if (typeof types === "string")\n types = [ types ];\n\n var result = [];\n for (var i = 0; i < types.length; i++) {\n if (types[i] === "mouse")\n result.splice(0, 0, "mousedown", "mouseup", "click", "dblclick", "mousemove", "mouseover", "mouseout");\n else if (types[i] === "key")\n result.splice(0, 0, "keydown", "keyup", "keypress");\n else\n result.push(types[i]);\n }\n return result;\n },\n\n _logEvent: function(event)\n {\n console.log(event.type, event);\n }\n}\n\ninjectedScript._commandLineAPIImpl = new CommandLineAPIImpl();\nreturn injectedScript;\n})\n//@ sourceURL=weinre/target/InjectedScript.js'),eval(';modjewel.define("weinre/target/InjectedScriptHostImpl", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar InjectedScriptHostImpl, Weinre;\n\nWeinre = require(\'../common/Weinre\');\n\nmodule.exports = InjectedScriptHostImpl = (function() {\n function InjectedScriptHostImpl() {}\n\n InjectedScriptHostImpl.prototype.clearConsoleMessages = function(callback) {\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n InjectedScriptHostImpl.prototype.nodeForId = function(nodeId, callback) {\n return Weinre.nodeStore.getNode(nodeId);\n };\n\n InjectedScriptHostImpl.prototype.pushNodePathToFrontend = function(node, withChildren, selectInUI, callback) {\n var children, nodeId;\n nodeId = Weinre.nodeStore.getNodeId(node);\n children = Weinre.nodeStore.serializeNode(node, 1);\n Weinre.wi.DOMNotify.setChildNodes(nodeId, children);\n if (callback) {\n Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n if (selectInUI) {\n return Weinre.wi.InspectorNotify.updateFocusedNode(nodeId);\n }\n };\n\n InjectedScriptHostImpl.prototype.inspectedNode = function(num, callback) {\n var nodeId;\n nodeId = Weinre.nodeStore.getInspectedNode(num);\n return nodeId;\n };\n\n InjectedScriptHostImpl.prototype.internalConstructorName = function(object) {\n var ctor, ctorName, match, pattern;\n ctor = object.constructor;\n ctorName = ctor.fullClassName || ctor.displayName || ctor.name;\n if (ctorName && (ctorName !== "Object")) {\n return ctorName;\n }\n pattern = /\\[object (.*)\\]/;\n match = pattern.exec(object.toString());\n if (match) {\n return match[1];\n }\n return "Object";\n };\n\n return InjectedScriptHostImpl;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/InjectedScriptHostImpl.amd.js'),eval(';modjewel.define("weinre/target/NetworkRequest", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Ex, HookLib, HookSites, IDGenerator, Loader, NetworkRequest, StackTrace, Weinre, getFormData, getHeaders, getRequest, getResponse, getXhrEventHandler, splitContentType, trim;\n\nStackTrace = require(\'../common/StackTrace\');\n\nIDGenerator = require(\'../common/IDGenerator\');\n\nHookLib = require(\'../common/HookLib\');\n\nWeinre = require(\'../common/Weinre\');\n\nEx = require(\'../common/Ex\');\n\nHookSites = require(\'./HookSites\');\n\nLoader = {\n url: window.location.href,\n frameId: 0,\n loaderId: 0\n};\n\nmodule.exports = NetworkRequest = (function() {\n function NetworkRequest(xhr, id, method, url, stackTrace) {\n this.xhr = xhr;\n this.id = id;\n this.method = method;\n this.url = url;\n this.stackTrace = stackTrace;\n }\n\n NetworkRequest.prototype.handleSend = function(data) {\n var redirectResponse, request, time;\n Weinre.wi.NetworkNotify.identifierForInitialRequest(this.id, this.url, Loader, this.stackTrace);\n time = Date.now() / 1000.0;\n request = getRequest(this.url, this.method, this.xhr, data);\n redirectResponse = {\n isNull: true\n };\n return Weinre.wi.NetworkNotify.willSendRequest(this.id, time, request, redirectResponse);\n };\n\n NetworkRequest.prototype.handleHeadersReceived = function() {\n var response, time;\n time = Date.now() / 1000.0;\n response = getResponse(this.xhr);\n return Weinre.wi.NetworkNotify.didReceiveResponse(this.id, time, "XHR", response);\n };\n\n NetworkRequest.prototype.handleLoading = function() {};\n\n NetworkRequest.prototype.handleDone = function() {\n var description, e, sourceString, status, statusText, success, time;\n sourceString = "";\n try {\n sourceString = this.xhr.responseText;\n } catch (_error) {\n e = _error;\n }\n Weinre.wi.NetworkNotify.setInitialContent(this.id, sourceString, "XHR");\n time = Date.now() / 1000.0;\n status = this.xhr.status;\n if (status === 0) {\n status = 200;\n }\n statusText = this.xhr.statusText;\n success = status >= 200 && status < 300;\n if (success) {\n return Weinre.wi.NetworkNotify.didFinishLoading(this.id, time);\n } else {\n description = "" + status + " - " + statusText;\n return Weinre.wi.NetworkNotify.didFailLoading(this.id, time, description);\n }\n };\n\n NetworkRequest.installNativeHooks = function() {\n HookSites.XMLHttpRequest_open.addHooks({\n before: function(receiver, args) {\n var frame, id, method, rawStackTrace, stackTrace, url, xhr, _i, _len;\n xhr = receiver;\n method = args[0];\n url = args[1];\n id = IDGenerator.next();\n rawStackTrace = new StackTrace(args).trace.slice(1);\n stackTrace = [];\n for (_i = 0, _len = rawStackTrace.length; _i < _len; _i++) {\n frame = rawStackTrace[_i];\n stackTrace.push({\n functionName: frame\n });\n }\n xhr.__weinreNetworkRequest__ = new NetworkRequest(xhr, id, method, url, stackTrace);\n return HookLib.ignoreHooks(function() {\n return xhr.addEventListener("readystatechange", getXhrEventHandler(xhr), false);\n });\n }\n });\n return HookSites.XMLHttpRequest_send.addHooks({\n before: function(receiver, args) {\n var data, nr, xhr;\n xhr = receiver;\n data = args[0];\n nr = xhr.__weinreNetworkRequest__;\n if (!nr) {\n return;\n }\n return nr.handleSend(data);\n }\n });\n };\n\n return NetworkRequest;\n\n})();\n\ngetRequest = function(url, method, xhr, data) {\n return {\n url: url,\n httpMethod: method,\n httpHeaderFields: {},\n requestFormData: getFormData(url, data)\n };\n};\n\ngetResponse = function(xhr) {\n var contentLength, contentType, encoding, headers, result, _ref;\n contentType = xhr.getResponseHeader("Content-Type");\n contentType || (contentType = \'application/octet-stream\');\n _ref = splitContentType(contentType), contentType = _ref[0], encoding = _ref[1];\n headers = getHeaders(xhr);\n result = {\n mimeType: contentType,\n textEncodingName: encoding,\n httpStatusCode: xhr.status,\n httpStatusText: xhr.statusText,\n httpHeaderFields: headers,\n connectionReused: false,\n connectionID: 0,\n wasCached: false\n };\n contentLength = xhr.getResponseHeader("Content-Length");\n contentLength = parseInt(contentLength);\n if (!isNaN(contentLength)) {\n result.expectedContentLength = contentLength;\n }\n return result;\n};\n\ngetHeaders = function(xhr) {\n var key, line, lines, result, string, val, _i, _len, _ref;\n string = xhr.getAllResponseHeaders();\n lines = string.split(\'\\r\\n\');\n result = {};\n for (_i = 0, _len = lines.length; _i < _len; _i++) {\n line = lines[_i];\n line = trim(line);\n if (line === "") {\n break;\n }\n _ref = line.split(\':\', 2), key = _ref[0], val = _ref[1];\n result[trim(key)] = trim(val);\n }\n return result;\n};\n\ntrim = function(string) {\n return string.replace(/^\\s+|\\s+$/g, \'\');\n};\n\ngetFormData = function(url, data) {\n var match, pattern;\n if (data) {\n return data;\n }\n pattern = /.*?\\?(.*?)(#.*)?$/;\n match = url.match(pattern);\n if (match) {\n return match[1];\n }\n return "";\n};\n\nsplitContentType = function(contentType) {\n var match, pattern;\n pattern = /\\s*(.*?)\\s*(;\\s*(.*))?\\s*$/;\n match = contentType.match(pattern);\n if (!match) {\n return [contentType, ""];\n }\n return [match[1], match[3]];\n};\n\ngetXhrEventHandler = function(xhr) {\n return function() {\n var e, nr;\n nr = xhr.__weinreNetworkRequest__;\n if (!nr) {\n return;\n }\n try {\n switch (xhr.readyState) {\n case 2:\n return nr.handleHeadersReceived();\n case 3:\n return nr.handleLoading();\n case 4:\n return nr.handleDone();\n }\n } catch (_error) {\n e = _error;\n }\n };\n};\n\n});\n\n//@ sourceURL=weinre/target/NetworkRequest.amd.js'),eval(';modjewel.define("weinre/target/NodeStore", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Debug, IDGenerator, NodeStore, Weinre, handleDOMAttrModified, handleDOMCharacterDataModified, handleDOMNodeInserted, handleDOMNodeRemoved, handleDOMSubtreeModified;\n\nWeinre = require(\'../common/Weinre\');\n\nIDGenerator = require(\'../common/IDGenerator\');\n\nDebug = require(\'../common/Debug\');\n\nmodule.exports = NodeStore = (function() {\n function NodeStore() {\n this._nodeMap = {};\n this._childrenSent = {};\n this._inspectedNodes = [];\n document.addEventListener("DOMSubtreeModified", handleDOMSubtreeModified, false);\n document.addEventListener("DOMNodeInserted", handleDOMNodeInserted, false);\n document.addEventListener("DOMNodeRemoved", handleDOMNodeRemoved, false);\n document.addEventListener("DOMAttrModified", handleDOMAttrModified, false);\n document.addEventListener("DOMCharacterDataModified", handleDOMCharacterDataModified, false);\n }\n\n NodeStore.prototype.addInspectedNode = function(nodeId) {\n this._inspectedNodes.unshift(nodeId);\n if (this._inspectedNodes.length > 5) {\n return this._inspectedNodes = this._inspectedNodes.slice(0, 5);\n }\n };\n\n NodeStore.prototype.getInspectedNode = function(index) {\n return this._inspectedNodes[index];\n };\n\n NodeStore.prototype.getNode = function(nodeId) {\n return this._nodeMap[nodeId];\n };\n\n NodeStore.prototype.checkNodeId = function(node) {\n return IDGenerator.checkId(node);\n };\n\n NodeStore.prototype.getNodeId = function(node) {\n var id;\n id = this.checkNodeId(node);\n if (id) {\n return id;\n }\n return IDGenerator.getId(node, this._nodeMap);\n };\n\n NodeStore.prototype.getNodeData = function(nodeId, depth) {\n return this.serializeNode(this.getNode(nodeId), depth);\n };\n\n NodeStore.prototype.getPreviousSiblingId = function(node) {\n var id, sib;\n while (true) {\n sib = node.previousSibling;\n if (!sib) {\n return 0;\n }\n id = this.checkNodeId(sib);\n if (id) {\n return id;\n }\n node = sib;\n }\n };\n\n NodeStore.prototype.nextNodeId = function() {\n return "" + IDGenerator.next();\n };\n\n NodeStore.prototype.serializeNode = function(node, depth) {\n var children, i, id, localName, nodeData, nodeName, nodeValue;\n nodeName = "";\n nodeValue = null;\n localName = null;\n id = this.getNodeId(node);\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n case Node.COMMENT_NODE:\n case Node.CDATA_SECTION_NODE:\n nodeValue = node.nodeValue;\n break;\n case Node.ATTRIBUTE_NODE:\n localName = node.localName;\n break;\n case Node.DOCUMENT_FRAGMENT_NODE:\n break;\n default:\n nodeName = node.nodeName;\n localName = node.localName;\n }\n nodeData = {\n id: id,\n nodeType: node.nodeType,\n nodeName: nodeName,\n localName: localName,\n nodeValue: nodeValue\n };\n if (node.nodeType === Node.ELEMENT_NODE || node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n nodeData.childNodeCount = this.childNodeCount(node);\n children = this.serializeNodeChildren(node, depth);\n if (children.length) {\n nodeData.children = children;\n }\n if (node.nodeType === Node.ELEMENT_NODE) {\n nodeData.attributes = [];\n i = 0;\n while (i < node.attributes.length) {\n nodeData.attributes.push(node.attributes[i].nodeName);\n nodeData.attributes.push(node.attributes[i].nodeValue);\n i++;\n }\n } else {\n if (node.nodeType === Node.DOCUMENT_NODE) {\n nodeData.documentURL = window.location.href;\n }\n }\n } else if (node.nodeType === Node.DOCUMENT_TYPE_NODE) {\n nodeData.publicId = node.publicId;\n nodeData.systemId = node.systemId;\n nodeData.internalSubset = node.internalSubset;\n } else if (node.nodeType === Node.ATTRIBUTE_NODE) {\n nodeData.name = node.nodeName;\n nodeData.value = node.nodeValue;\n }\n return nodeData;\n };\n\n NodeStore.prototype.serializeNodeChildren = function(node, depth) {\n var childIds, childNode, i, result;\n result = [];\n childIds = this.childNodeIds(node);\n if (depth === 0) {\n if (childIds.length === 1) {\n childNode = this.getNode(childIds[0]);\n if (childNode.nodeType === Node.TEXT_NODE) {\n result.push(this.serializeNode(childNode));\n }\n }\n return result;\n }\n depth--;\n i = 0;\n while (i < childIds.length) {\n result.push(this.serializeNode(this.getNode(childIds[i]), depth));\n i++;\n }\n return result;\n };\n\n NodeStore.prototype.childNodeCount = function(node) {\n return this.childNodeIds(node).length;\n };\n\n NodeStore.prototype.childNodeIds = function(node) {\n var childNode, i, ids, _i, _len, _ref;\n ids = [];\n i = 0;\n _ref = node.childNodes;\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n childNode = _ref[_i];\n if (this.isToBeSkipped(childNode)) {\n continue;\n }\n ids.push(this.getNodeId(childNode));\n }\n return ids;\n };\n\n NodeStore.prototype.isToBeSkipped = function(node) {\n if (!node) {\n return true;\n }\n if (node.__weinreHighlighter) {\n return true;\n }\n if (node.nodeType !== Node.TEXT_NODE) {\n return false;\n }\n return !!node.nodeValue.match(/^\\s*$/);\n };\n\n return NodeStore;\n\n})();\n\nhandleDOMSubtreeModified = function(event) {\n if (!event.attrChange) {\n return;\n }\n return NodeStore.handleDOMAttrModified(event);\n};\n\nhandleDOMNodeInserted = function(event) {\n var child, parentId, previous, targetId;\n targetId = Weinre.nodeStore.checkNodeId(event.target);\n parentId = Weinre.nodeStore.checkNodeId(event.relatedNode);\n if (!parentId) {\n return;\n }\n child = Weinre.nodeStore.serializeNode(event.target, 0);\n previous = Weinre.nodeStore.getPreviousSiblingId(event.target);\n return Weinre.wi.DOMNotify.childNodeInserted(parentId, previous, child);\n};\n\nhandleDOMNodeRemoved = function(event) {\n var childCount, parentId, targetId;\n targetId = Weinre.nodeStore.checkNodeId(event.target);\n parentId = Weinre.nodeStore.checkNodeId(event.relatedNode);\n if (!parentId) {\n return;\n }\n if (targetId) {\n if (parentId) {\n return Weinre.wi.DOMNotify.childNodeRemoved(parentId, targetId);\n }\n } else {\n childCount = Weinre.nodeStore.childNodeCount(event.relatedNode);\n return Weinre.wi.DOMNotify.childNodeCountUpdated(parentId, childCount);\n }\n};\n\nhandleDOMAttrModified = function(event) {\n var attrs, i, targetId;\n targetId = Weinre.nodeStore.checkNodeId(event.target);\n if (!targetId) {\n return;\n }\n attrs = [];\n i = 0;\n while (i < event.target.attributes.length) {\n attrs.push(event.target.attributes[i].name);\n attrs.push(event.target.attributes[i].value);\n i++;\n }\n return Weinre.wi.DOMNotify.attributesUpdated(targetId, attrs);\n};\n\nhandleDOMCharacterDataModified = function(event) {\n var targetId;\n targetId = Weinre.nodeStore.checkNodeId(event.target);\n if (!targetId) {\n return;\n }\n return Weinre.wi.DOMNotify.characterDataModified(targetId, event.newValue);\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/NodeStore.amd.js'),eval(';modjewel.define("weinre/target/SqlStepper", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Binding, SqlStepper, executeSql, ourErrorCallback, runStep;\n\nBinding = require(\'../common/Binding\');\n\nmodule.exports = SqlStepper = (function() {\n function SqlStepper(steps) {\n var context;\n if (!(this instanceof SqlStepper)) {\n return new SqlStepper(steps);\n }\n this.__context = {};\n context = this.__context;\n context.steps = steps;\n }\n\n SqlStepper.prototype.run = function(db, errorCallback) {\n var context;\n context = this.__context;\n if (context.hasBeenRun) {\n throw new Ex(arguments, "stepper has already been run");\n }\n context.hasBeenRun = true;\n context.db = db;\n context.errorCallback = errorCallback;\n context.nextStep = 0;\n context.ourErrorCallback = new Binding(this, ourErrorCallback);\n context.runStep = new Binding(this, runStep);\n this.executeSql = new Binding(this, executeSql);\n return db.transaction(context.runStep);\n };\n\n SqlStepper.example = function(db, id) {\n var errorCb, step1, step2, stepper;\n step1 = function() {\n return this.executeSql("SELECT name FROM sqlite_master WHERE type=\'table\'");\n };\n step2 = function(resultSet) {\n var i, name, result, rows;\n rows = resultSet.rows;\n result = [];\n i = 0;\n while (i < rows.length) {\n name = rows.item(i).name;\n if (name === "__WebKitDatabaseInfoTable__") {\n i++;\n continue;\n }\n result.push(name);\n i++;\n }\n return console.log(("[" + this.id + "] table names: ") + result.join(", "));\n };\n errorCb = function(sqlError) {\n return console.log(("[" + this.id + "] sql error:" + sqlError.code + ": ") + sqlError.message);\n };\n stepper = new SqlStepper([step1, step2]);\n stepper.id = id;\n return stepper.run(db, errorCb);\n };\n\n return SqlStepper;\n\n})();\n\nexecuteSql = function(statement, data) {\n var context;\n context = this.__context;\n return context.tx.executeSql(statement, data, context.runStep, context.ourErrorCallback);\n};\n\nourErrorCallback = function(tx, sqlError) {\n var context;\n context = this.__context;\n return context.errorCallback.call(this, sqlError);\n};\n\nrunStep = function(tx, resultSet) {\n var context, step;\n context = this.__context;\n if (context.nextStep >= context.steps.length) {\n return;\n }\n context.tx = tx;\n context.currentStep = context.nextStep;\n context.nextStep++;\n step = context.steps[context.currentStep];\n return step.call(this, resultSet);\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/SqlStepper.amd.js'),eval(';modjewel.define("weinre/target/Target", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Binding, CSSStore, Callback, CheckForProblems, ElementHighlighter, Ex, HookLib, InjectedScriptHostImpl, MessageDispatcher, NetworkRequest, NodeStore, Target, Weinre, WeinreExtraClientCommandsImpl, WeinreTargetEventsImpl, WiCSSImpl, WiConsoleImpl, WiDOMImpl, WiDOMStorageImpl, WiDatabaseImpl, WiInspectorImpl, WiRuntimeImpl, currentTime;\n\nrequire(\'./BrowserHacks\');\n\nEx = require(\'../common/Ex\');\n\nBinding = require(\'../common/Binding\');\n\nCallback = require(\'../common/Callback\');\n\nMessageDispatcher = require(\'../common/MessageDispatcher\');\n\nWeinre = require(\'../common/Weinre\');\n\nHookLib = require(\'../common/HookLib\');\n\nCheckForProblems = require(\'./CheckForProblems\');\n\nNodeStore = require(\'./NodeStore\');\n\nCSSStore = require(\'./CSSStore\');\n\nElementHighlighter = require(\'./ElementHighlighter\');\n\nInjectedScriptHostImpl = require(\'./InjectedScriptHostImpl\');\n\nNetworkRequest = require(\'./NetworkRequest\');\n\nWeinreTargetEventsImpl = require(\'./WeinreTargetEventsImpl\');\n\nWeinreExtraClientCommandsImpl = require(\'./WeinreExtraClientCommandsImpl\');\n\nWiConsoleImpl = require(\'./WiConsoleImpl\');\n\nWiCSSImpl = require(\'./WiCSSImpl\');\n\nWiDatabaseImpl = require(\'./WiDatabaseImpl\');\n\nWiDOMImpl = require(\'./WiDOMImpl\');\n\nWiDOMStorageImpl = require(\'./WiDOMStorageImpl\');\n\nWiInspectorImpl = require(\'./WiInspectorImpl\');\n\nWiRuntimeImpl = require(\'./WiRuntimeImpl\');\n\nmodule.exports = Target = (function() {\n function Target() {}\n\n Target.main = function() {\n CheckForProblems.check();\n Weinre.target = new Target();\n return Weinre.target.initialize();\n };\n\n Target.prototype.setWeinreServerURLFromScriptSrc = function(element) {\n var match, message, pattern;\n if (window.WeinreServerURL) {\n return;\n }\n if (element) {\n pattern = /((https?:)?\\/\\/(.*?)\\/)/;\n match = pattern.exec(element.src);\n if (match) {\n window.WeinreServerURL = match[1];\n return;\n }\n }\n message = "unable to calculate the weinre server url; explicity set the variable window.WeinreServerURL instead";\n alert(message);\n throw new Ex(arguments, message);\n };\n\n Target.prototype.setWeinreServerIdFromScriptSrc = function(element) {\n var attempt, hash;\n if (window.WeinreServerId) {\n return;\n }\n element = this.getTargetScriptElement();\n hash = "anonymous";\n if (element) {\n attempt = element.src.split("#")[1];\n if (attempt) {\n hash = attempt;\n } else {\n attempt = location.hash.split("#")[1];\n if (attempt) {\n hash = attempt;\n }\n }\n }\n return window.WeinreServerId = hash;\n };\n\n Target.prototype.getTargetScriptElement = function() {\n var element, elements, i, j, scripts;\n elements = document.getElementsByTagName("script");\n scripts = ["target-script.js", "target-script-min.js"];\n i = 0;\n while (i < elements.length) {\n element = elements[i];\n j = 0;\n while (j < scripts.length) {\n if (-1 !== element.src.indexOf("/" + scripts[j])) {\n return element;\n }\n j++;\n }\n i++;\n }\n };\n\n Target.prototype.initialize = function() {\n var element, injectedScriptHost, messageDispatcher;\n element = this.getTargetScriptElement();\n this.setWeinreServerURLFromScriptSrc(element);\n this.setWeinreServerIdFromScriptSrc(element);\n if (window.WeinreServerURL[window.WeinreServerURL.length - 1] !== "/") {\n window.WeinreServerURL += "/";\n }\n injectedScriptHost = new InjectedScriptHostImpl();\n Weinre.injectedScript = injectedScriptConstructor(injectedScriptHost, window, 0, "?");\n window.addEventListener("load", Binding(this, "onLoaded"), false);\n document.addEventListener("DOMContentLoaded", Binding(this, "onDOMContent"), false);\n this._startTime = currentTime();\n if (document.readyState === "loaded") {\n HookLib.ignoreHooks((function(_this) {\n return function() {\n return setTimeout((function() {\n return _this.onDOMContent();\n }), 10);\n };\n })(this));\n }\n if (document.readyState === "complete") {\n HookLib.ignoreHooks((function(_this) {\n return function() {\n setTimeout((function() {\n return _this.onDOMContent();\n }), 10);\n return setTimeout((function() {\n return _this.onLoaded();\n }), 20);\n };\n })(this));\n }\n messageDispatcher = new MessageDispatcher(window.WeinreServerURL + "ws/target", window.WeinreServerId);\n Weinre.messageDispatcher = messageDispatcher;\n Weinre.wi = {};\n Weinre.wi.Console = new WiConsoleImpl();\n Weinre.wi.CSS = new WiCSSImpl();\n Weinre.wi.Database = new WiDatabaseImpl();\n Weinre.wi.DOM = new WiDOMImpl();\n Weinre.wi.DOMStorage = new WiDOMStorageImpl();\n Weinre.wi.Inspector = new WiInspectorImpl();\n Weinre.wi.Runtime = new WiRuntimeImpl();\n messageDispatcher.registerInterface("Console", Weinre.wi.Console, false);\n messageDispatcher.registerInterface("CSS", Weinre.wi.CSS, false);\n messageDispatcher.registerInterface("Database", Weinre.wi.Database, false);\n messageDispatcher.registerInterface("DOM", Weinre.wi.DOM, false);\n messageDispatcher.registerInterface("DOMStorage", Weinre.wi.DOMStorage, false);\n messageDispatcher.registerInterface("Inspector", Weinre.wi.Inspector, false);\n messageDispatcher.registerInterface("Runtime", Weinre.wi.Runtime, false);\n messageDispatcher.registerInterface("WeinreExtraClientCommands", new WeinreExtraClientCommandsImpl(), true);\n messageDispatcher.registerInterface("WeinreTargetEvents", new WeinreTargetEventsImpl(), true);\n Weinre.wi.ApplicationCacheNotify = messageDispatcher.createProxy("ApplicationCacheNotify");\n Weinre.wi.ConsoleNotify = messageDispatcher.createProxy("ConsoleNotify");\n Weinre.wi.DOMNotify = messageDispatcher.createProxy("DOMNotify");\n Weinre.wi.DOMStorageNotify = messageDispatcher.createProxy("DOMStorageNotify");\n Weinre.wi.DatabaseNotify = messageDispatcher.createProxy("DatabaseNotify");\n Weinre.wi.InspectorNotify = messageDispatcher.createProxy("InspectorNotify");\n Weinre.wi.TimelineNotify = messageDispatcher.createProxy("TimelineNotify");\n Weinre.wi.NetworkNotify = messageDispatcher.createProxy("NetworkNotify");\n Weinre.WeinreTargetCommands = messageDispatcher.createProxy("WeinreTargetCommands");\n Weinre.WeinreExtraTargetEvents = messageDispatcher.createProxy("WeinreExtraTargetEvents");\n messageDispatcher.getWebSocket().addEventListener("open", Binding(this, this.cb_webSocketOpened));\n Weinre.nodeStore = new NodeStore();\n Weinre.cssStore = new CSSStore();\n return NetworkRequest.installNativeHooks();\n };\n\n Target.prototype.cb_webSocketOpened = function() {\n return Weinre.WeinreTargetCommands.registerTarget(window.location.href, Binding(this, this.cb_registerTarget));\n };\n\n Target.prototype.cb_registerTarget = function(targetDescription) {\n return Weinre.targetDescription = targetDescription;\n };\n\n Target.prototype.onLoaded = function() {\n if (!Weinre.wi.InspectorNotify) {\n HookLib.ignoreHooks((function(_this) {\n return function() {\n return setTimeout((function() {\n return _this.onLoaded();\n }), 10);\n };\n })(this));\n return;\n }\n return Weinre.wi.InspectorNotify.loadEventFired(currentTime() - this._startTime);\n };\n\n Target.prototype.onDOMContent = function() {\n if (!Weinre.wi.InspectorNotify) {\n HookLib.ignoreHooks((function(_this) {\n return function() {\n return setTimeout((function() {\n return _this.onDOMContent();\n }), 10);\n };\n })(this));\n return;\n }\n return Weinre.wi.InspectorNotify.domContentEventFired(currentTime() - this._startTime);\n };\n\n Target.prototype.setDocument = function() {\n var nodeData, nodeId;\n if (!Weinre.elementHighlighter) {\n Weinre.elementHighlighter = ElementHighlighter.create();\n }\n nodeId = Weinre.nodeStore.getNodeId(document);\n nodeData = Weinre.nodeStore.getNodeData(nodeId, 2);\n return Weinre.wi.DOMNotify.setDocument(nodeData);\n };\n\n Target.prototype.whenBodyReady = function(receiver, args, func) {\n if (document.body) {\n func.apply(receiver, args);\n return;\n }\n return document.addEventListener("DOMContentLoaded", function() {\n return func.apply(receiver, args);\n }, false);\n };\n\n return Target;\n\n})();\n\ncurrentTime = function() {\n return (new Date().getMilliseconds()) / 1000.0;\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/Target.amd.js'),eval(';modjewel.define("weinre/target/Timeline", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Ex, HookLib, HookSites, IDGenerator, Running, StackTrace, Timeline, TimelineRecordType, TimerIntervals, TimerTimeouts, Weinre, addStackTrace, addTimer, getXhrEventHandler, instrumentedTimerCode, removeTimer;\n\nEx = require(\'../common/Ex\');\n\nWeinre = require(\'../common/Weinre\');\n\nIDGenerator = require(\'../common/IDGenerator\');\n\nStackTrace = require(\'../common/StackTrace\');\n\nHookLib = require(\'../common/HookLib\');\n\nHookSites = require(\'./HookSites\');\n\nRunning = false;\n\nTimerTimeouts = {};\n\nTimerIntervals = {};\n\nTimelineRecordType = {\n EventDispatch: 0,\n Layout: 1,\n RecalculateStyles: 2,\n Paint: 3,\n ParseHTML: 4,\n TimerInstall: 5,\n TimerRemove: 6,\n TimerFire: 7,\n XHRReadyStateChange: 8,\n XHRLoad: 9,\n EvaluateScript: 10,\n Mark: 11,\n ResourceSendRequest: 12,\n ResourceReceiveResponse: 13,\n ResourceFinish: 14,\n FunctionCall: 15,\n ReceiveResourceData: 16,\n GCEvent: 17,\n MarkDOMContent: 18,\n MarkLoad: 19,\n ScheduleResourceRequest: 20\n};\n\nmodule.exports = Timeline = (function() {\n function Timeline() {}\n\n Timeline.start = function() {\n return Running = true;\n };\n\n Timeline.stop = function() {\n return Running = false;\n };\n\n Timeline.isRunning = function() {\n return Running;\n };\n\n Timeline.addRecord_Mark = function(message) {\n var record;\n if (!Timeline.isRunning()) {\n return;\n }\n record = {};\n record.type = TimelineRecordType.Mark;\n record.category = {\n name: "scripting"\n };\n record.startTime = Date.now();\n record.data = {\n message: message\n };\n addStackTrace(record, 3);\n return Weinre.wi.TimelineNotify.addRecordToTimeline(record);\n };\n\n Timeline.addRecord_EventDispatch = function(event, name, category) {\n var record;\n if (!Timeline.isRunning()) {\n return;\n }\n if (!category) {\n category = "scripting";\n }\n record = {};\n record.type = TimelineRecordType.EventDispatch;\n record.category = {\n name: category\n };\n record.startTime = Date.now();\n record.data = {\n type: event.type\n };\n return Weinre.wi.TimelineNotify.addRecordToTimeline(record);\n };\n\n Timeline.addRecord_TimerInstall = function(id, timeout, singleShot) {\n var record;\n if (!Timeline.isRunning()) {\n return;\n }\n record = {};\n record.type = TimelineRecordType.TimerInstall;\n record.category = {\n name: "scripting"\n };\n record.startTime = Date.now();\n record.data = {\n timerId: id,\n timeout: timeout,\n singleShot: singleShot\n };\n addStackTrace(record, 4);\n return Weinre.wi.TimelineNotify.addRecordToTimeline(record);\n };\n\n Timeline.addRecord_TimerRemove = function(id, timeout, singleShot) {\n var record;\n if (!Timeline.isRunning()) {\n return;\n }\n record = {};\n record.type = TimelineRecordType.TimerRemove;\n record.category = {\n name: "scripting"\n };\n record.startTime = Date.now();\n record.data = {\n timerId: id,\n timeout: timeout,\n singleShot: singleShot\n };\n addStackTrace(record, 4);\n return Weinre.wi.TimelineNotify.addRecordToTimeline(record);\n };\n\n Timeline.addRecord_TimerFire = function(id, timeout, singleShot) {\n var record;\n if (!Timeline.isRunning()) {\n return;\n }\n record = {};\n record.type = TimelineRecordType.TimerFire;\n record.category = {\n name: "scripting"\n };\n record.startTime = Date.now();\n record.data = {\n timerId: id,\n timeout: timeout,\n singleShot: singleShot\n };\n return Weinre.wi.TimelineNotify.addRecordToTimeline(record);\n };\n\n Timeline.addRecord_XHRReadyStateChange = function(method, url, id, xhr) {\n var contentLength, contentType, e, record;\n if (!Timeline.isRunning()) {\n return;\n }\n try {\n contentLength = xhr.getResponseHeader("Content-Length");\n contentLength = parseInt(contentLength);\n contentType = xhr.getResponseHeader("Content-Type");\n } catch (_error) {\n e = _error;\n contentLength = 0;\n contentType = "unknown";\n }\n record = {};\n record.startTime = Date.now();\n record.category = {\n name: "loading"\n };\n if (xhr.readyState === XMLHttpRequest.OPENED) {\n record.type = TimelineRecordType.ResourceSendRequest;\n record.data = {\n identifier: id,\n url: url,\n requestMethod: method\n };\n } else if (xhr.readyState === XMLHttpRequest.DONE) {\n record.type = TimelineRecordType.ResourceReceiveResponse;\n record.data = {\n identifier: id,\n statusCode: xhr.status,\n mimeType: contentType,\n url: url\n };\n if (!isNaN(contentLength)) {\n record.data.expectedContentLength = contentLength;\n }\n } else {\n return;\n }\n return Weinre.wi.TimelineNotify.addRecordToTimeline(record);\n };\n\n Timeline.installGlobalListeners = function() {\n if (window.applicationCache) {\n applicationCache.addEventListener("checking", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "applicationCache.checking", "loading");\n }), false);\n applicationCache.addEventListener("error", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "applicationCache.error", "loading");\n }), false);\n applicationCache.addEventListener("noupdate", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "applicationCache.noupdate", "loading");\n }), false);\n applicationCache.addEventListener("downloading", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "applicationCache.downloading", "loading");\n }), false);\n applicationCache.addEventListener("progress", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "applicationCache.progress", "loading");\n }), false);\n applicationCache.addEventListener("updateready", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "applicationCache.updateready", "loading");\n }), false);\n applicationCache.addEventListener("cached", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "applicationCache.cached", "loading");\n }), false);\n applicationCache.addEventListener("obsolete", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "applicationCache.obsolete", "loading");\n }), false);\n }\n window.addEventListener("error", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "window.error");\n }), false);\n window.addEventListener("hashchange", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "window.hashchange");\n }), false);\n window.addEventListener("message", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "window.message");\n }), false);\n window.addEventListener("offline", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "window.offline");\n }), false);\n window.addEventListener("online", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "window.online");\n }), false);\n return window.addEventListener("scroll", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "window.scroll");\n }), false);\n };\n\n Timeline.installNativeHooks = function() {\n HookSites.window_setInterval.addHooks({\n before: function(receiver, args) {\n var code, interval;\n code = args[0];\n if (typeof code !== "function") {\n return;\n }\n interval = args[1];\n code = instrumentedTimerCode(code, interval, false);\n args[0] = code;\n this.userData = {};\n this.userData.code = code;\n return this.userData.interval = interval;\n },\n after: function(receiver, args, result) {\n var code, id;\n if (!this.userData) {\n return;\n }\n code = this.userData.code;\n if (typeof code !== "function") {\n return;\n }\n id = result;\n code.__timerId = id;\n return addTimer(id, this.userData.interval, false);\n }\n });\n HookSites.window_clearInterval.addHooks({\n before: function(receiver, args) {\n var id;\n id = args[0];\n return removeTimer(id, false);\n }\n });\n HookSites.window_setTimeout.addHooks({\n before: function(receiver, args) {\n var code, interval;\n code = args[0];\n if (typeof code !== "function") {\n return;\n }\n interval = args[1];\n code = instrumentedTimerCode(code, interval, true);\n args[0] = code;\n this.userData = {};\n this.userData.code = code;\n return this.userData.interval = interval;\n },\n after: function(receiver, args, result) {\n var code, id;\n if (!this.userData) {\n return;\n }\n code = this.userData.code;\n if (typeof code !== "function") {\n return;\n }\n id = result;\n code.__timerId = id;\n return addTimer(id, this.userData.interval, true);\n }\n });\n HookSites.window_clearTimeout.addHooks({\n before: function(receiver, args) {\n var id;\n id = args[0];\n return removeTimer(id, true);\n }\n });\n return HookSites.XMLHttpRequest_open.addHooks({\n before: function(receiver, args) {\n var xhr;\n xhr = receiver;\n IDGenerator.getId(xhr);\n xhr.__weinre_method = args[0];\n xhr.__weinre_url = args[1];\n return xhr.addEventListener("readystatechange", getXhrEventHandler(xhr), false);\n }\n });\n };\n\n return Timeline;\n\n})();\n\ngetXhrEventHandler = function(xhr) {\n return function(event) {\n return Timeline.addRecord_XHRReadyStateChange(xhr.__weinre_method, xhr.__weinre_url, IDGenerator.getId(xhr), xhr);\n };\n};\n\naddTimer = function(id, timeout, singleShot) {\n var timerSet;\n timerSet = (singleShot ? TimerTimeouts : TimerIntervals);\n timerSet[id] = {\n id: id,\n timeout: timeout,\n singleShot: singleShot\n };\n return Timeline.addRecord_TimerInstall(id, timeout, singleShot);\n};\n\nremoveTimer = function(id, singleShot) {\n var timer, timerSet;\n timerSet = (singleShot ? TimerTimeouts : TimerIntervals);\n timer = timerSet[id];\n if (!timer) {\n return;\n }\n Timeline.addRecord_TimerRemove(id, timer.timeout, singleShot);\n return delete timerSet[id];\n};\n\ninstrumentedTimerCode = function(code, timeout, singleShot) {\n var instrumentedCode;\n if (typeof code !== "function") {\n return code;\n }\n instrumentedCode = function() {\n var id, result;\n result = code.apply(this, arguments);\n id = arguments.callee.__timerId;\n Timeline.addRecord_TimerFire(id, timeout, singleShot);\n return result;\n };\n instrumentedCode.displayName = code.name || code.displayName;\n return instrumentedCode;\n};\n\naddStackTrace = function(record, skip) {\n var i, trace, _results;\n if (!skip) {\n skip = 1;\n }\n trace = new StackTrace(arguments).trace;\n record.stackTrace = [];\n i = skip;\n _results = [];\n while (i < trace.length) {\n record.stackTrace.push({\n functionName: trace[i],\n scriptName: "",\n lineNumber: ""\n });\n _results.push(i++);\n }\n return _results;\n};\n\nTimeline.installGlobalListeners();\n\nTimeline.installNativeHooks();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/Timeline.amd.js'),eval(";modjewel.define(\"weinre/target/WeinreExtraClientCommandsImpl\", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Console, Weinre, WeinreExtraClientCommandsImpl, WiDatabaseImpl;\n\nWeinre = require('../common/Weinre');\n\nWiDatabaseImpl = require('./WiDatabaseImpl');\n\nConsole = require('./Console');\n\nmodule.exports = WeinreExtraClientCommandsImpl = (function() {\n function WeinreExtraClientCommandsImpl() {}\n\n WeinreExtraClientCommandsImpl.prototype.getDatabases = function(callback) {\n var result;\n if (!callback) {\n return;\n }\n result = WiDatabaseImpl.getDatabases();\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n };\n\n return WeinreExtraClientCommandsImpl;\n\n})();\n\nrequire(\"../common/MethodNamer\").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/WeinreExtraClientCommandsImpl.amd.js"),eval(';modjewel.define("weinre/target/WeinreTargetEventsImpl", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Callback, Console, Weinre, WeinreTargetEventsImpl;\n\nWeinre = require(\'../common/Weinre\');\n\nCallback = require(\'../common/Callback\');\n\nConsole = require(\'./Console\');\n\nmodule.exports = WeinreTargetEventsImpl = (function() {\n function WeinreTargetEventsImpl() {}\n\n WeinreTargetEventsImpl.prototype.connectionCreated = function(clientChannel, targetChannel) {\n var message;\n message = ("weinre: target " + targetChannel + " connected to client ") + clientChannel;\n Weinre.logInfo(message);\n return Weinre.target.whenBodyReady(this, [], function() {\n var oldValue;\n oldValue = Console.useRemote(true);\n Weinre.target.setDocument();\n Weinre.wi.TimelineNotify.timelineProfilerWasStopped();\n return Weinre.wi.DOMStorage.initialize();\n });\n };\n\n WeinreTargetEventsImpl.prototype.connectionDestroyed = function(clientChannel, targetChannel) {\n var message, oldValue;\n message = ("weinre: target " + targetChannel + " disconnected from client ") + clientChannel;\n Weinre.logInfo(message);\n return oldValue = Console.useRemote(false);\n };\n\n WeinreTargetEventsImpl.prototype.sendCallback = function(callbackId, result) {\n return Callback.invoke(callbackId, result);\n };\n\n return WeinreTargetEventsImpl;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/WeinreTargetEventsImpl.amd.js'),eval(';modjewel.define("weinre/target/WiConsoleImpl", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Weinre, WiConsoleImpl;\n\nWeinre = require(\'../common/Weinre\');\n\nmodule.exports = WiConsoleImpl = (function() {\n function WiConsoleImpl() {\n this.messagesEnabled = true;\n }\n\n WiConsoleImpl.prototype.setConsoleMessagesEnabled = function(enabled, callback) {\n var oldValue;\n oldValue = this.messagesEnabled;\n this.messagesEnabled = enabled;\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [oldValue]);\n }\n };\n\n WiConsoleImpl.prototype.clearConsoleMessages = function(callback) {\n Weinre.wi.ConsoleNotify.consoleMessagesCleared();\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, []);\n }\n };\n\n WiConsoleImpl.prototype.setMonitoringXHREnabled = function(enabled, callback) {\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, []);\n }\n };\n\n return WiConsoleImpl;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/WiConsoleImpl.amd.js'),eval(';modjewel.define("weinre/target/WiCSSImpl", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Weinre, WiCSSImpl;\n\nWeinre = require(\'../common/Weinre\');\n\nmodule.exports = WiCSSImpl = (function() {\n function WiCSSImpl() {\n this.dummyComputedStyle = false;\n }\n\n WiCSSImpl.prototype.getStylesForNode = function(nodeId, callback) {\n var computedStyle, node, parentNode, parentStyle, result;\n result = {};\n node = Weinre.nodeStore.getNode(nodeId);\n if (!node) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid nodeId: " + nodeId);\n return;\n }\n if (this.dummyComputedStyle) {\n computedStyle = {\n styleId: null,\n properties: [],\n shorthandValues: [],\n cssProperties: []\n };\n } else {\n computedStyle = Weinre.cssStore.getComputedStyle(node);\n }\n result = {\n inlineStyle: Weinre.cssStore.getInlineStyle(node),\n computedStyle: computedStyle,\n matchedCSSRules: Weinre.cssStore.getMatchedCSSRules(node),\n styleAttributes: Weinre.cssStore.getStyleAttributes(node),\n pseudoElements: Weinre.cssStore.getPseudoElements(node),\n inherited: []\n };\n parentNode = node.parentNode;\n while (parentNode) {\n parentStyle = {\n inlineStyle: Weinre.cssStore.getInlineStyle(parentNode),\n matchedCSSRules: Weinre.cssStore.getMatchedCSSRules(parentNode)\n };\n result.inherited.push(parentStyle);\n parentNode = parentNode.parentNode;\n }\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiCSSImpl.prototype.getComputedStyleForNode = function(nodeId, callback) {\n var node, result;\n node = Weinre.nodeStore.getNode(nodeId);\n if (!node) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid nodeId: " + nodeId);\n return;\n }\n result = Weinre.cssStore.getComputedStyle(node);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiCSSImpl.prototype.getInlineStyleForNode = function(nodeId, callback) {\n var node, result;\n node = Weinre.nodeStore.getNode(nodeId);\n if (!node) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid nodeId: " + nodeId);\n return;\n }\n result = Weinre.cssStore.getInlineStyle(node);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiCSSImpl.prototype.getAllStyles = function(callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiCSSImpl.prototype.getStyleSheet = function(styleSheetId, callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiCSSImpl.prototype.getStyleSheetText = function(styleSheetId, callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiCSSImpl.prototype.setStyleSheetText = function(styleSheetId, text, callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiCSSImpl.prototype.setPropertyText = function(styleId, propertyIndex, text, overwrite, callback) {\n var result;\n result = Weinre.cssStore.setPropertyText(styleId, propertyIndex, text, overwrite);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiCSSImpl.prototype.toggleProperty = function(styleId, propertyIndex, disable, callback) {\n var result;\n result = Weinre.cssStore.toggleProperty(styleId, propertyIndex, disable);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiCSSImpl.prototype.setRuleSelector = function(ruleId, selector, callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiCSSImpl.prototype.addRule = function(contextNodeId, selector, callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiCSSImpl.prototype.querySelectorAll = function(documentId, selector, callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n return WiCSSImpl;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/WiCSSImpl.amd.js'),eval(';modjewel.define("weinre/target/WiDatabaseImpl", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar HookSites, IDGenerator, SqlStepper, Weinre, WiDatabaseImpl, dbAdd, dbById, dbRecordById, dbRecordByName, executeSQL_error, executeSQL_step_1, executeSQL_step_2, getTableNames_step_1, getTableNames_step_2, id2db, logSqlError, name2db;\n\nWeinre = require(\'../common/Weinre\');\n\nIDGenerator = require(\'../common/IDGenerator\');\n\nHookSites = require(\'./HookSites\');\n\nSqlStepper = require(\'./SqlStepper\');\n\nid2db = {};\n\nname2db = {};\n\nmodule.exports = WiDatabaseImpl = (function() {\n function WiDatabaseImpl() {\n if (!window.openDatabase) {\n return;\n }\n HookSites.window_openDatabase.addHooks({\n after: function(receiver, args, db) {\n var name, version;\n if (!db) {\n return;\n }\n name = args[0];\n version = args[1];\n return dbAdd(db, name, version);\n }\n });\n }\n\n WiDatabaseImpl.getDatabases = function() {\n var id, result;\n result = [];\n for (id in id2db) {\n result.push(id2db[id]);\n }\n return result;\n };\n\n WiDatabaseImpl.prototype.getDatabaseTableNames = function(databaseId, callback) {\n var db, stepper;\n db = dbById(databaseId);\n if (!db) {\n return;\n }\n stepper = SqlStepper([getTableNames_step_1, getTableNames_step_2]);\n stepper.callback = callback;\n return stepper.run(db, logSqlError);\n };\n\n WiDatabaseImpl.prototype.executeSQL = function(databaseId, query, callback) {\n var db, stepper, txid;\n db = dbById(databaseId);\n if (!db) {\n return;\n }\n txid = Weinre.targetDescription.channel + "-" + IDGenerator.next();\n stepper = SqlStepper([executeSQL_step_1, executeSQL_step_2]);\n stepper.txid = txid;\n stepper.query = query;\n stepper.callback = callback;\n stepper.run(db, executeSQL_error);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [true, txid]);\n }\n };\n\n return WiDatabaseImpl;\n\n})();\n\nlogSqlError = function(sqlError) {\n return console.log(("SQL Error " + sqlError.code + ": ") + sqlError.message);\n};\n\ngetTableNames_step_1 = function() {\n return this.executeSql("SELECT name FROM sqlite_master WHERE type=\'table\'");\n};\n\ngetTableNames_step_2 = function(resultSet) {\n var i, name, result, rows;\n rows = resultSet.rows;\n result = [];\n i = 0;\n while (i < rows.length) {\n name = rows.item(i).name;\n if (name === "__WebKitDatabaseInfoTable__") {\n i++;\n continue;\n }\n result.push(name);\n i++;\n }\n return Weinre.WeinreTargetCommands.sendClientCallback(this.callback, [result]);\n};\n\nexecuteSQL_step_1 = function() {\n return this.executeSql(this.query);\n};\n\nexecuteSQL_step_2 = function(resultSet) {\n var columnNames, i, j, propName, row, rows, values;\n columnNames = [];\n values = [];\n rows = resultSet.rows;\n i = 0;\n while (i < rows.length) {\n row = rows.item(i);\n if (i === 0) {\n for (propName in row) {\n columnNames.push(propName);\n }\n }\n j = 0;\n while (j < columnNames.length) {\n values.push(row[columnNames[j]]);\n j++;\n }\n i++;\n }\n return Weinre.wi.DatabaseNotify.sqlTransactionSucceeded(this.txid, columnNames, values);\n};\n\nexecuteSQL_error = function(sqlError) {\n var error;\n error = {\n code: sqlError.code,\n message: sqlError.message\n };\n return Weinre.wi.DatabaseNotify.sqlTransactionFailed(this.txid, error);\n};\n\ndbById = function(id) {\n var record;\n record = id2db[id];\n if (!record) {\n return null;\n }\n return record.db;\n};\n\ndbRecordById = function(id) {\n return id2db[id];\n};\n\ndbRecordByName = function(name) {\n return name2db[name];\n};\n\ndbAdd = function(db, name, version) {\n var payload, record;\n record = dbRecordByName(name);\n if (record) {\n return record;\n }\n record = {};\n record.id = IDGenerator.next();\n record.domain = window.location.origin;\n record.name = name;\n record.version = version;\n record.db = db;\n id2db[record.id] = record;\n name2db[name] = record;\n payload = {};\n payload.id = record.id;\n payload.domain = record.domain;\n payload.name = name;\n payload.version = version;\n return Weinre.WeinreExtraTargetEvents.databaseOpened(payload);\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/WiDatabaseImpl.amd.js'),eval(';modjewel.define("weinre/target/WiDOMImpl", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Weinre, WiDOMImpl;\n\nWeinre = require(\'../common/Weinre\');\n\nmodule.exports = WiDOMImpl = (function() {\n function WiDOMImpl() {}\n\n WiDOMImpl.prototype.getChildNodes = function(nodeId, callback) {\n var children, node;\n node = Weinre.nodeStore.getNode(nodeId);\n if (!node) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid nodeId: " + nodeId);\n return;\n }\n children = Weinre.nodeStore.serializeNodeChildren(node, 1);\n Weinre.wi.DOMNotify.setChildNodes(nodeId, children);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n WiDOMImpl.prototype.setAttribute = function(elementId, name, value, callback) {\n var element;\n element = Weinre.nodeStore.getNode(elementId);\n if (!element) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid elementId: " + elementId);\n return;\n }\n element.setAttribute(name, value);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n WiDOMImpl.prototype.removeAttribute = function(elementId, name, callback) {\n var element;\n element = Weinre.nodeStore.getNode(elementId);\n if (!element) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid elementId: " + elementId);\n return;\n }\n element.removeAttribute(name);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n WiDOMImpl.prototype.setTextNodeValue = function(nodeId, value, callback) {\n var node;\n node = Weinre.nodeStore.getNode(nodeId);\n if (!node) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid nodeId: " + nodeId);\n return;\n }\n node.nodeValue = value;\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n WiDOMImpl.prototype.getEventListenersForNode = function(nodeId, callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiDOMImpl.prototype.copyNode = function(nodeId, callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiDOMImpl.prototype.removeNode = function(nodeId, callback) {\n var node;\n node = Weinre.nodeStore.getNode(nodeId);\n if (!node) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid nodeId: " + nodeId);\n return;\n }\n if (!node.parentNode) {\n Weinre.logWarning(arguments.callee.signature + " passed a parentless node: " + node);\n return;\n }\n node.parentNode.removeChild(node);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n WiDOMImpl.prototype.changeTagName = function(nodeId, newTagName, callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiDOMImpl.prototype.getOuterHTML = function(nodeId, callback) {\n var node, value;\n node = Weinre.nodeStore.getNode(nodeId);\n if (!node) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid nodeId: " + nodeId);\n return;\n }\n value = node.outerHTML;\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [value]);\n }\n };\n\n WiDOMImpl.prototype.setOuterHTML = function(nodeId, outerHTML, callback) {\n var node;\n node = Weinre.nodeStore.getNode(nodeId);\n if (!node) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid nodeId: " + nodeId);\n return;\n }\n node.outerHTML = outerHTML;\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n WiDOMImpl.prototype.addInspectedNode = function(nodeId, callback) {\n Weinre.nodeStore.addInspectedNode(nodeId);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n WiDOMImpl.prototype.performSearch = function(query, runSynchronously, callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiDOMImpl.prototype.searchCanceled = function(callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiDOMImpl.prototype.pushNodeByPathToFrontend = function(path, callback) {\n var childNodeIds, curr, currId, i, index, nodeId, nodeName, parts, _i, _ref;\n parts = path.split(",");\n curr = document;\n currId = null;\n nodeId = Weinre.nodeStore.getNodeId(curr);\n this.getChildNodes(nodeId);\n for (i = _i = 0, _ref = parts.length; _i < _ref; i = _i += 2) {\n index = parseInt(parts[i]);\n nodeName = parts[i + 1];\n if (isNaN(index)) {\n return;\n }\n childNodeIds = Weinre.nodeStore.childNodeIds(curr);\n currId = childNodeIds[index];\n if (!currId) {\n return;\n }\n this.getChildNodes(currId);\n curr = Weinre.nodeStore.getNode(currId);\n if (curr.nodeName !== nodeName) {\n return;\n }\n }\n if (callback && currId) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [currId]);\n }\n };\n\n WiDOMImpl.prototype.resolveNode = function(nodeId, callback) {\n var result;\n result = Weinre.injectedScript.resolveNode(nodeId);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiDOMImpl.prototype.getNodeProperties = function(nodeId, propertiesArray, callback) {\n var result;\n propertiesArray = JSON.stringify(propertiesArray);\n result = Weinre.injectedScript.getNodeProperties(nodeId, propertiesArray);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiDOMImpl.prototype.getNodePrototypes = function(nodeId, callback) {\n var result;\n result = Weinre.injectedScript.getNodePrototypes(nodeId);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiDOMImpl.prototype.pushNodeToFrontend = function(objectId, callback) {\n var result;\n objectId = JSON.stringify(objectId);\n result = Weinre.injectedScript.pushNodeToFrontend(objectId);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n return WiDOMImpl;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/WiDOMImpl.amd.js'),eval(';modjewel.define("weinre/target/WiDOMStorageImpl", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar HookSites, Weinre, WiDOMStorageImpl, _getStorageArea, _storageEventHandler;\n\nWeinre = require(\'../common/Weinre\');\n\nHookSites = require(\'./HookSites\');\n\nmodule.exports = WiDOMStorageImpl = (function() {\n function WiDOMStorageImpl() {}\n\n WiDOMStorageImpl.prototype.getDOMStorageEntries = function(storageId, callback) {\n var i, key, length, result, storageArea, val;\n storageArea = _getStorageArea(storageId);\n if (!storageArea) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid storageId: " + storageId);\n return;\n }\n result = [];\n length = storageArea.length;\n i = 0;\n while (i < length) {\n key = storageArea.key(i);\n val = storageArea.getItem(key);\n result.push([key, val]);\n i++;\n }\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiDOMStorageImpl.prototype.setDOMStorageItem = function(storageId, key, value, callback) {\n var e, result, storageArea;\n storageArea = _getStorageArea(storageId);\n if (!storageArea) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid storageId: " + storageId);\n return;\n }\n result = true;\n try {\n HookLib.ignoreHooks(function() {\n if (storageArea === window.localStorage) {\n return localStorage.setItem(key, value);\n } else if (storageArea === window.sessionStorage) {\n return sessionStorage.setItem(key, value);\n }\n });\n } catch (_error) {\n e = _error;\n result = false;\n }\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiDOMStorageImpl.prototype.removeDOMStorageItem = function(storageId, key, callback) {\n var e, result, storageArea;\n storageArea = _getStorageArea(storageId);\n if (!storageArea) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid storageId: " + storageId);\n return;\n }\n result = true;\n try {\n HookLib.ignoreHooks(function() {\n if (storageArea === window.localStorage) {\n return localStorage.removeItem(key);\n } else if (storageArea === window.sessionStorage) {\n return sessionStorage.removeItem(key);\n }\n });\n } catch (_error) {\n e = _error;\n result = false;\n }\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiDOMStorageImpl.prototype.initialize = function() {\n if (window.localStorage) {\n Weinre.wi.DOMStorageNotify.addDOMStorage({\n id: 1,\n host: window.location.host,\n isLocalStorage: true\n });\n HookSites.LocalStorage_setItem.addHooks({\n after: function() {\n return _storageEventHandler({\n storageArea: window.localStorage\n });\n }\n });\n HookSites.LocalStorage_removeItem.addHooks({\n after: function() {\n return _storageEventHandler({\n storageArea: window.localStorage\n });\n }\n });\n HookSites.LocalStorage_clear.addHooks({\n after: function() {\n return _storageEventHandler({\n storageArea: window.localStorage\n });\n }\n });\n }\n if (window.sessionStorage) {\n Weinre.wi.DOMStorageNotify.addDOMStorage({\n id: 2,\n host: window.location.host,\n isLocalStorage: false\n });\n HookSites.SessionStorage_setItem.addHooks({\n after: function() {\n return _storageEventHandler({\n storageArea: window.sessionStorage\n });\n }\n });\n HookSites.SessionStorage_removeItem.addHooks({\n after: function() {\n return _storageEventHandler({\n storageArea: window.sessionStorage\n });\n }\n });\n HookSites.SessionStorage_clear.addHooks({\n after: function() {\n return _storageEventHandler({\n storageArea: window.sessionStorage\n });\n }\n });\n }\n return document.addEventListener("storage", _storageEventHandler, false);\n };\n\n return WiDOMStorageImpl;\n\n})();\n\n_getStorageArea = function(storageId) {\n if (storageId === 1) {\n return window.localStorage;\n } else if (storageId === 2) {\n return window.sessionStorage;\n }\n return null;\n};\n\n_storageEventHandler = function(event) {\n var storageId;\n if (event.storageArea === window.localStorage) {\n storageId = 1;\n } else if (event.storageArea === window.sessionStorage) {\n storageId = 2;\n } else {\n return;\n }\n return Weinre.wi.DOMStorageNotify.updateDOMStorage(storageId);\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/WiDOMStorageImpl.amd.js'),eval(';modjewel.define("weinre/target/WiInspectorImpl", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Timeline, Weinre, WiInspectorImpl;\n\nWeinre = require(\'../common/Weinre\');\n\nTimeline = require(\'../target/Timeline\');\n\nmodule.exports = WiInspectorImpl = (function() {\n function WiInspectorImpl() {}\n\n WiInspectorImpl.prototype.reloadPage = function(callback) {\n if (callback) {\n Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n return window.location.reload();\n };\n\n WiInspectorImpl.prototype.highlightDOMNode = function(nodeId, callback) {\n var node;\n node = Weinre.nodeStore.getNode(nodeId);\n if (!node) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid nodeId: " + nodeId);\n return;\n }\n Weinre.elementHighlighter.on(node);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n WiInspectorImpl.prototype.hideDOMNodeHighlight = function(callback) {\n Weinre.elementHighlighter.off();\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n WiInspectorImpl.prototype.startTimelineProfiler = function(callback) {\n Timeline.start();\n Weinre.wi.TimelineNotify.timelineProfilerWasStarted();\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n WiInspectorImpl.prototype.stopTimelineProfiler = function(callback) {\n Timeline.stop();\n Weinre.wi.TimelineNotify.timelineProfilerWasStopped();\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n return WiInspectorImpl;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/WiInspectorImpl.amd.js'),eval(';modjewel.define("weinre/target/WiRuntimeImpl", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Weinre, WiRuntimeImpl;\n\nWeinre = require(\'../common/Weinre\');\n\nmodule.exports = WiRuntimeImpl = (function() {\n function WiRuntimeImpl() {}\n\n WiRuntimeImpl.prototype.evaluate = function(expression, objectGroup, includeCommandLineAPI, callback) {\n var result;\n result = Weinre.injectedScript.evaluate(expression, objectGroup, includeCommandLineAPI);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiRuntimeImpl.prototype.getCompletions = function(expression, includeCommandLineAPI, callback) {\n var result;\n result = Weinre.injectedScript.getCompletions(expression, includeCommandLineAPI);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiRuntimeImpl.prototype.getProperties = function(objectId, ignoreHasOwnProperty, abbreviate, callback) {\n var result;\n objectId = JSON.stringify(objectId);\n result = Weinre.injectedScript.getProperties(objectId, ignoreHasOwnProperty, abbreviate);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiRuntimeImpl.prototype.setPropertyValue = function(objectId, propertyName, expression, callback) {\n var result;\n objectId = JSON.stringify(objectId);\n result = Weinre.injectedScript.setPropertyValue(objectId, propertyName, expression);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiRuntimeImpl.prototype.releaseWrapperObjectGroup = function(injectedScriptId, objectGroup, callback) {\n var result;\n result = Weinre.injectedScript.releaseWrapperObjectGroup(objectGroup);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n return WiRuntimeImpl;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/WiRuntimeImpl.amd.js'),eval('modjewel.require(\'weinre/common/Weinre\').addIDLs([{"interfaces": [{"name": "InjectedScriptHost", "methods": [{"name": "clearConsoleMessages", "parameters": []}, {"name": "copyText", "parameters": [{"name": "text"}]}, {"parameters": [{"name": "nodeId"}], "name": "nodeForId"}, {"parameters": [{"name": "node"}, {"name": "withChildren"}, {"name": "selectInUI"}], "name": "pushNodePathToFrontend"}, {"name": "inspectedNode", "parameters": [{"name": "num"}]}, {"parameters": [{"name": "object"}], "name": "internalConstructorName"}, {"parameters": [], "name": "currentCallFrame"}, {"parameters": [{"name": "database"}], "name": "selectDatabase"}, {"parameters": [{"name": "storage"}], "name": "selectDOMStorage"}, {"name": "didCreateWorker", "parameters": [{"name": "id"}, {"name": "url"}, {"name": "isFakeWorker"}]}, {"name": "didDestroyWorker", "parameters": [{"name": "id"}]}, {"name": "nextWorkerId", "parameters": []}]}], "name": "core"}, {"interfaces": [{"name": "Inspector", "methods": [{"name": "addScriptToEvaluateOnLoad", "parameters": [{"name": "scriptSource"}]}, {"name": "removeAllScriptsToEvaluateOnLoad", "parameters": []}, {"name": "reloadPage", "parameters": [{"name": "ignoreCache"}]}, {"name": "populateScriptObjects", "parameters": []}, {"name": "openInInspectedWindow", "parameters": [{"name": "url"}]}, {"name": "setSearchingForNode", "parameters": [{"name": "enabled"}]}, {"name": "didEvaluateForTestInFrontend", "parameters": [{"name": "testCallId"}, {"name": "jsonResult"}]}, {"name": "highlightDOMNode", "parameters": [{"name": "nodeId"}]}, {"name": "hideDOMNodeHighlight", "parameters": []}, {"name": "highlightFrame", "parameters": [{"name": "frameId"}]}, {"name": "hideFrameHighlight", "parameters": []}, {"name": "setUserAgentOverride", "parameters": [{"name": "userAgent"}]}, {"name": "getCookies", "parameters": []}, {"name": "deleteCookie", "parameters": [{"name": "cookieName"}, {"name": "domain"}]}, {"name": "startTimelineProfiler", "parameters": []}, {"name": "stopTimelineProfiler", "parameters": []}, {"name": "enableDebugger", "parameters": []}, {"name": "disableDebugger", "parameters": []}, {"name": "enableProfiler", "parameters": []}, {"name": "disableProfiler", "parameters": []}, {"name": "startProfiling", "parameters": []}, {"name": "stopProfiling", "parameters": []}]}, {"name": "Runtime", "methods": [{"name": "evaluate", "parameters": [{"name": "expression"}, {"name": "objectGroup"}, {"name": "includeCommandLineAPI"}]}, {"name": "getCompletions", "parameters": [{"name": "expression"}, {"name": "includeCommandLineAPI"}]}, {"name": "getProperties", "parameters": [{"name": "objectId"}, {"name": "ignoreHasOwnProperty"}, {"name": "abbreviate"}]}, {"name": "setPropertyValue", "parameters": [{"name": "objectId"}, {"name": "propertyName"}, {"name": "expression"}]}, {"name": "releaseWrapperObjectGroup", "parameters": [{"name": "injectedScriptId"}, {"name": "objectGroup"}]}]}, {"name": "InjectedScript", "methods": [{"name": "evaluateOnSelf", "parameters": [{"name": "functionBody"}, {"name": "argumentsArray"}]}]}, {"name": "Console", "methods": [{"name": "setConsoleMessagesEnabled", "parameters": [{"name": "enabled"}]}, {"name": "clearConsoleMessages", "parameters": []}, {"name": "setMonitoringXHREnabled", "parameters": [{"name": "enabled"}]}]}, {"name": "Network", "methods": [{"name": "cachedResources", "parameters": []}, {"name": "resourceContent", "parameters": [{"name": "frameId"}, {"name": "url"}, {"name": "base64Encode"}]}, {"name": "setExtraHeaders", "parameters": [{"name": "headers"}]}]}, {"name": "Database", "methods": [{"name": "getDatabaseTableNames", "parameters": [{"name": "databaseId"}]}, {"name": "executeSQL", "parameters": [{"name": "databaseId"}, {"name": "query"}]}]}, {"name": "DOMStorage", "methods": [{"name": "getDOMStorageEntries", "parameters": [{"name": "storageId"}]}, {"name": "setDOMStorageItem", "parameters": [{"name": "storageId"}, {"name": "key"}, {"name": "value"}]}, {"name": "removeDOMStorageItem", "parameters": [{"name": "storageId"}, {"name": "key"}]}]}, {"name": "ApplicationCache", "methods": [{"name": "getApplicationCaches", "parameters": []}]}, {"name": "DOM", "methods": [{"name": "getChildNodes", "parameters": [{"name": "nodeId"}]}, {"name": "setAttribute", "parameters": [{"name": "elementId"}, {"name": "name"}, {"name": "value"}]}, {"name": "removeAttribute", "parameters": [{"name": "elementId"}, {"name": "name"}]}, {"name": "setTextNodeValue", "parameters": [{"name": "nodeId"}, {"name": "value"}]}, {"name": "getEventListenersForNode", "parameters": [{"name": "nodeId"}]}, {"name": "copyNode", "parameters": [{"name": "nodeId"}]}, {"name": "removeNode", "parameters": [{"name": "nodeId"}]}, {"name": "changeTagName", "parameters": [{"name": "nodeId"}, {"name": "newTagName"}]}, {"name": "getOuterHTML", "parameters": [{"name": "nodeId"}]}, {"name": "setOuterHTML", "parameters": [{"name": "nodeId"}, {"name": "outerHTML"}]}, {"name": "addInspectedNode", "parameters": [{"name": "nodeId"}]}, {"name": "performSearch", "parameters": [{"name": "query"}, {"name": "runSynchronously"}]}, {"name": "searchCanceled", "parameters": []}, {"name": "pushNodeByPathToFrontend", "parameters": [{"name": "path"}]}, {"name": "resolveNode", "parameters": [{"name": "nodeId"}]}, {"name": "getNodeProperties", "parameters": [{"name": "nodeId"}, {"name": "propertiesArray"}]}, {"name": "getNodePrototypes", "parameters": [{"name": "nodeId"}]}, {"name": "pushNodeToFrontend", "parameters": [{"name": "objectId"}]}]}, {"name": "CSS", "methods": [{"name": "getStylesForNode", "parameters": [{"name": "nodeId"}]}, {"name": "getComputedStyleForNode", "parameters": [{"name": "nodeId"}]}, {"name": "getInlineStyleForNode", "parameters": [{"name": "nodeId"}]}, {"name": "getAllStyles", "parameters": []}, {"name": "getStyleSheet", "parameters": [{"name": "styleSheetId"}]}, {"name": "getStyleSheetText", "parameters": [{"name": "styleSheetId"}]}, {"name": "setStyleSheetText", "parameters": [{"name": "styleSheetId"}, {"name": "text"}]}, {"name": "setPropertyText", "parameters": [{"name": "styleId"}, {"name": "propertyIndex"}, {"name": "text"}, {"name": "overwrite"}]}, {"name": "toggleProperty", "parameters": [{"name": "styleId"}, {"name": "propertyIndex"}, {"name": "disable"}]}, {"name": "setRuleSelector", "parameters": [{"name": "ruleId"}, {"name": "selector"}]}, {"name": "addRule", "parameters": [{"name": "contextNodeId"}, {"name": "selector"}]}, {"name": "getSupportedCSSProperties", "parameters": []}, {"name": "querySelectorAll", "parameters": [{"name": "documentId"}, {"name": "selector"}]}]}, {"name": "Timeline", "methods": []}, {"name": "Debugger", "methods": [{"name": "activateBreakpoints", "parameters": []}, {"name": "deactivateBreakpoints", "parameters": []}, {"name": "setJavaScriptBreakpoint", "parameters": [{"name": "url"}, {"name": "lineNumber"}, {"name": "columnNumber"}, {"name": "condition"}, {"name": "enabled"}]}, {"name": "setJavaScriptBreakpointBySourceId", "parameters": [{"name": "sourceId"}, {"name": "lineNumber"}, {"name": "columnNumber"}, {"name": "condition"}, {"name": "enabled"}]}, {"name": "removeJavaScriptBreakpoint", "parameters": [{"name": "breakpointId"}]}, {"name": "continueToLocation", "parameters": [{"name": "sourceId"}, {"name": "lineNumber"}, {"name": "columnNumber"}]}, {"name": "stepOver", "parameters": []}, {"name": "stepInto", "parameters": []}, {"name": "stepOut", "parameters": []}, {"name": "pause", "parameters": []}, {"name": "resume", "parameters": []}, {"name": "editScriptSource", "parameters": [{"name": "sourceID"}, {"name": "newContent"}]}, {"name": "getScriptSource", "parameters": [{"name": "sourceID"}]}, {"name": "setPauseOnExceptionsState", "parameters": [{"name": "pauseOnExceptionsState"}]}, {"name": "evaluateOnCallFrame", "parameters": [{"name": "callFrameId"}, {"name": "expression"}, {"name": "objectGroup"}, {"name": "includeCommandLineAPI"}]}, {"name": "getCompletionsOnCallFrame", "parameters": [{"name": "callFrameId"}, {"name": "expression"}, {"name": "includeCommandLineAPI"}]}]}, {"name": "BrowserDebugger", "methods": [{"name": "setAllBrowserBreakpoints", "parameters": [{"name": "breakpoints"}]}, {"name": "setDOMBreakpoint", "parameters": [{"name": "nodeId"}, {"name": "type"}]}, {"name": "removeDOMBreakpoint", "parameters": [{"name": "nodeId"}, {"name": "type"}]}, {"name": "setEventListenerBreakpoint", "parameters": [{"name": "eventName"}]}, {"name": "removeEventListenerBreakpoint", "parameters": [{"name": "eventName"}]}, {"name": "setXHRBreakpoint", "parameters": [{"name": "url"}]}, {"name": "removeXHRBreakpoint", "parameters": [{"name": "url"}]}]}, {"name": "Profiler", "methods": [{"name": "getProfileHeaders", "parameters": []}, {"name": "getProfile", "parameters": [{"name": "type"}, {"name": "uid"}]}, {"name": "removeProfile", "parameters": [{"name": "type"}, {"name": "uid"}]}, {"name": "clearProfiles", "parameters": []}, {"name": "takeHeapSnapshot", "parameters": [{"name": "detailed"}]}]}, {"name": "InspectorNotify", "methods": [{"parameters": [], "name": "frontendReused"}, {"parameters": [{"name": "nodeIds"}], "name": "addNodesToSearchResult"}, {"parameters": [], "name": "bringToFront"}, {"parameters": [], "name": "disconnectFromBackend"}, {"parameters": [{"name": "url"}], "name": "inspectedURLChanged"}, {"parameters": [{"name": "time"}], "name": "domContentEventFired"}, {"parameters": [{"name": "time"}], "name": "loadEventFired"}, {"parameters": [], "name": "reset"}, {"parameters": [{"name": "panel"}], "name": "showPanel"}, {"parameters": [{"name": "testCallId"}, {"name": "script"}], "name": "evaluateForTestInFrontend"}, {"parameters": [{"name": "nodeId"}], "name": "updateFocusedNode"}]}, {"name": "ConsoleNotify", "methods": [{"parameters": [{"name": "messageObj"}], "name": "addConsoleMessage"}, {"parameters": [{"name": "count"}], "name": "updateConsoleMessageExpiredCount"}, {"parameters": [{"name": "count"}], "name": "updateConsoleMessageRepeatCount"}, {"parameters": [], "name": "consoleMessagesCleared"}]}, {"name": "NetworkNotify", "methods": [{"parameters": [{"name": "frameId"}], "name": "frameDetachedFromParent"}, {"parameters": [{"name": "identifier"}, {"name": "url"}, {"name": "loader"}, {"name": "callStack"}], "name": "identifierForInitialRequest"}, {"parameters": [{"name": "identifier"}, {"name": "time"}, {"name": "request"}, {"name": "redirectResponse"}], "name": "willSendRequest"}, {"parameters": [{"name": "identifier"}], "name": "markResourceAsCached"}, {"parameters": [{"name": "identifier"}, {"name": "time"}, {"name": "resourceType"}, {"name": "response"}], "name": "didReceiveResponse"}, {"parameters": [{"name": "identifier"}, {"name": "time"}, {"name": "lengthReceived"}], "name": "didReceiveContentLength"}, {"parameters": [{"name": "identifier"}, {"name": "finishTime"}], "name": "didFinishLoading"}, {"parameters": [{"name": "identifier"}, {"name": "time"}, {"name": "localizedDescription"}], "name": "didFailLoading"}, {"parameters": [{"name": "time"}, {"name": "resource"}], "name": "didLoadResourceFromMemoryCache"}, {"parameters": [{"name": "identifier"}, {"name": "sourceString"}, {"name": "type"}], "name": "setInitialContent"}, {"parameters": [{"name": "frame"}, {"name": "loader"}], "name": "didCommitLoadForFrame"}, {"parameters": [{"name": "identifier"}, {"name": "requestURL"}], "name": "didCreateWebSocket"}, {"parameters": [{"name": "identifier"}, {"name": "time"}, {"name": "request"}], "name": "willSendWebSocketHandshakeRequest"}, {"parameters": [{"name": "identifier"}, {"name": "time"}, {"name": "response"}], "name": "didReceiveWebSocketHandshakeResponse"}, {"parameters": [{"name": "identifier"}, {"name": "time"}], "name": "didCloseWebSocket"}]}, {"name": "DatabaseNotify", "methods": [{"parameters": [{"name": "database"}], "name": "addDatabase"}, {"parameters": [{"name": "databaseId"}], "name": "selectDatabase"}, {"parameters": [{"name": "transactionId"}, {"name": "columnNames"}, {"name": "values"}], "name": "sqlTransactionSucceeded"}, {"parameters": [{"name": "transactionId"}, {"name": "sqlError"}], "name": "sqlTransactionFailed"}]}, {"name": "DOMStorageNotify", "methods": [{"parameters": [{"name": "storage"}], "name": "addDOMStorage"}, {"parameters": [{"name": "storageId"}], "name": "updateDOMStorage"}, {"parameters": [{"name": "storageId"}], "name": "selectDOMStorage"}]}, {"name": "ApplicationCacheNotify", "methods": [{"parameters": [{"name": "status"}], "name": "updateApplicationCacheStatus"}, {"parameters": [{"name": "isNowOnline"}], "name": "updateNetworkState"}]}, {"name": "DOMNotify", "methods": [{"parameters": [{"name": "root"}], "name": "setDocument"}, {"parameters": [{"name": "id"}, {"name": "attributes"}], "name": "attributesUpdated"}, {"parameters": [{"name": "id"}, {"name": "newValue"}], "name": "characterDataModified"}, {"parameters": [{"name": "parentId"}, {"name": "nodes"}], "name": "setChildNodes"}, {"parameters": [{"name": "root"}], "name": "setDetachedRoot"}, {"parameters": [{"name": "id"}, {"name": "newValue"}], "name": "childNodeCountUpdated"}, {"parameters": [{"name": "parentId"}, {"name": "prevId"}, {"name": "node"}], "name": "childNodeInserted"}, {"parameters": [{"name": "parentId"}, {"name": "id"}], "name": "childNodeRemoved"}]}, {"name": "TimelineNotify", "methods": [{"parameters": [], "name": "timelineProfilerWasStarted"}, {"parameters": [], "name": "timelineProfilerWasStopped"}, {"parameters": [{"name": "record"}], "name": "addRecordToTimeline"}]}, {"name": "DebuggerNotify", "methods": [{"parameters": [], "name": "debuggerWasEnabled"}, {"parameters": [], "name": "debuggerWasDisabled"}, {"parameters": [{"name": "sourceID"}, {"name": "url"}, {"name": "lineOffset"}, {"name": "columnOffset"}, {"name": "length"}, {"name": "scriptWorldType"}], "name": "parsedScriptSource"}, {"parameters": [{"name": "url"}, {"name": "data"}, {"name": "firstLine"}, {"name": "errorLine"}, {"name": "errorMessage"}], "name": "failedToParseScriptSource"}, {"parameters": [{"name": "breakpointId"}, {"name": "sourceId"}, {"name": "lineNumber"}, {"name": "columnNumber"}], "name": "breakpointResolved"}, {"parameters": [{"name": "details"}], "name": "pausedScript"}, {"parameters": [], "name": "resumedScript"}, {"parameters": [{"name": "id"}, {"name": "url"}, {"name": "isShared"}], "name": "didCreateWorker"}, {"parameters": [{"name": "id"}], "name": "didDestroyWorker"}]}, {"name": "ProfilerNotify", "methods": [{"parameters": [], "name": "profilerWasEnabled"}, {"parameters": [], "name": "profilerWasDisabled"}, {"parameters": [{"name": "header"}], "name": "addProfileHeader"}, {"parameters": [{"name": "uid"}, {"name": "chunk"}], "name": "addHeapSnapshotChunk"}, {"parameters": [{"name": "uid"}], "name": "finishHeapSnapshot"}, {"parameters": [{"name": "isProfiling"}], "name": "setRecordingProfile"}, {"parameters": [], "name": "resetProfiles"}, {"parameters": [{"name": "done"}, {"name": "total"}], "name": "reportHeapSnapshotProgress"}]}], "name": "core"}, {"interfaces": [{"name": "InspectorFrontendHost", "methods": [{"name": "loaded", "parameters": []}, {"name": "closeWindow", "parameters": []}, {"name": "disconnectFromBackend", "parameters": []}, {"name": "bringToFront", "parameters": []}, {"name": "inspectedURLChanged", "parameters": [{"name": "newURL"}]}, {"name": "requestAttachWindow", "parameters": []}, {"name": "requestDetachWindow", "parameters": []}, {"name": "setAttachedWindowHeight", "parameters": [{"name": "height"}]}, {"name": "moveWindowBy", "parameters": [{"name": "x"}, {"name": "y"}]}, {"name": "setExtensionAPI", "parameters": [{"name": "script"}]}, {"name": "localizedStringsURL", "parameters": []}, {"name": "hiddenPanels", "parameters": []}, {"name": "copyText", "parameters": [{"name": "text"}]}, {"parameters": [], "name": "platform"}, {"parameters": [], "name": "port"}, {"parameters": [{"name": "event"}, {"name": "items"}], "name": "showContextMenu"}, {"name": "sendMessageToBackend", "parameters": [{"name": "message"}]}]}], "name": "core"}, {"interfaces": [{"name": "WeinreClientCommands", "methods": [{"name": "registerClient", "parameters": []}, {"name": "getTargets", "parameters": []}, {"name": "getClients", "parameters": []}, {"name": "connectTarget", "parameters": [{"name": "clientId"}, {"name": "targetId"}]}, {"name": "disconnectTarget", "parameters": [{"name": "clientId"}]}, {"name": "getExtensions", "parameters": []}, {"name": "logDebug", "parameters": [{"name": "message"}]}, {"name": "logInfo", "parameters": [{"name": "message"}]}, {"name": "logWarning", "parameters": [{"name": "message"}]}, {"name": "logError", "parameters": [{"name": "message"}]}]}], "name": "weinre"}, {"interfaces": [{"name": "WeinreClientEvents", "methods": [{"name": "clientRegistered", "parameters": [{"name": "client"}]}, {"name": "targetRegistered", "parameters": [{"name": "target"}]}, {"name": "clientUnregistered", "parameters": [{"name": "clientId"}]}, {"name": "targetUnregistered", "parameters": [{"name": "targetId"}]}, {"name": "connectionCreated", "parameters": [{"name": "clientId"}, {"name": "targetId"}]}, {"name": "connectionDestroyed", "parameters": [{"name": "clientId"}, {"name": "targetId"}]}, {"name": "sendCallback", "parameters": [{"name": "callbackId"}, {"name": "result"}]}, {"name": "serverProperties", "parameters": [{"name": "properties"}]}]}], "name": "weinre"}, {"interfaces": [{"name": "WeinreExtraClientCommands", "methods": [{"name": "getDatabases", "parameters": []}]}], "name": "weinre"}, {"interfaces": [{"name": "WeinreExtraTargetEvents", "methods": [{"name": "databaseOpened", "parameters": [{"name": "databaseRecord"}]}]}], "name": "weinre"}, {"interfaces": [{"name": "WeinreTargetCommands", "methods": [{"name": "registerTarget", "parameters": [{"name": "url"}]}, {"name": "sendClientCallback", "parameters": [{"name": "callbackId"}, {"name": "args"}]}, {"name": "logDebug", "parameters": [{"name": "message"}]}, {"name": "logInfo", "parameters": [{"name": "message"}]}, {"name": "logWarning", "parameters": [{"name": "message"}]}, {"name": "logError", "parameters": [{"name": "message"}]}]}], "name": "weinre"}, {"interfaces": [{"name": "WeinreTargetEvents", "methods": [{"name": "connectionCreated", "parameters": [{"name": "clientId"}, {"name": "targetId"}]}, {"name": "connectionDestroyed", "parameters": [{"name": "clientId"}, {"name": "targetId"}]}, {"name": "sendCallback", "parameters": [{"name": "callbackId"}, {"name": "result"}]}]}], "name": "weinre"}])\n//@ sourceURL=interfaces/all-json-idls-min.js'),modjewel.require("weinre/target/Target").main()}()},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,o;return t=e,(n=[{key:"getLocation",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_location")});case 2:return t=e.sent,n=t.location,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getOrganizationTags",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_organization_tags")});case 2:return t=e.sent,n=t.tags,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getMessage",value:function(t){return[this.messagePrefix,e.MESSAGE_PREFIX,t].join(".")}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o,o.MESSAGE_PREFIX="device_info"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.version=null}var t,n,a;return t=e,(n=[{key:"supports",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o.default({capability:e}).string(),t.next=3,this.postMessage({type:this.getMessage("supports"),capability:e});case 3:return n=t.sent,r=n.supports,t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}))}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}}])&&r(t.prototype,n),a&&r(t,a),e}();a.MESSAGE_PREFIX="display",t.default=a},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(501),o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.triggers=new i.default(this.getMessagePrefix(),this.postMessage)}var t,n,o;return t=e,(n=[{key:"getMessagePrefix",value:function(){return this.messagePrefix+"."+e.MESSAGE_PREFIX}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o,o.MESSAGE_PREFIX="timing"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,o;return t=e,(n=[{key:"pause",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("pause")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"resume",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("resume")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o,o.MESSAGE_PREFIX="triggers"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.SyncEngine=void 0;var o,a,s=n(15),c=n(503),u=n(7);!function(e){e.SyncServer="sync-server",e.P2PLocal="p2p-local",e.Udp="udp"}(o=t.SyncEngine||(t.SyncEngine={})),function(e){e.Status="status",e.BroadcastedValue="broadcasted_value",e.Closed="closed"}(a||(a={}));var f=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.eventEmitter=new s.EventEmitter}var t,n,f;return t=e,(n=[{key:"connect",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n={engine:o.SyncServer},(r="string"==typeof e?{engine:o.SyncServer,uri:e}:void 0===e?n:e).engine===o.SyncServer&&u.default({uri:r.uri}).uri(),t.next=5,this.postMessage({type:this.getMessage("connect"),engine:r.engine,serverUri:r.uri});case 5:case"end":return t.stop()}},t,this)}))}},{key:"close",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("close")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.DEFAULT_GROUP_NAME,n=arguments.length>1?arguments[1]:void 0;return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.joinGroup({groupName:t,deviceIdentification:n});case 2:case"end":return e.stop()}},e,this)}))}},{key:"joinGroup",value:function(t){var n=t.groupName,r=t.deviceIdentification;return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=null!=n?n:e.DEFAULT_GROUP_NAME,u.default({groupName:n}).required().string(),u.default({deviceIdentification:r}).string(),t.next=5,this.postMessage({type:this.getMessage("init"),groupName:n,deviceIdentification:r});case 5:case"end":return t.stop()}},t,this)}))}},{key:"leaveGroup",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.DEFAULT_GROUP_NAME;return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u.default({groupName:t}).required().string(),e.next=3,this.postMessage({type:this.getMessage("leave_group"),groupName:t});case 3:case"end":return e.stop()}},e,this)}))}},{key:"wait",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.DEFAULT_GROUP_NAME,r=arguments.length>2?arguments[2]:void 0;return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u.default({groupName:n}).required().string(),u.default({timeout:r}).number(),e.next=4,this.postMessage({type:this.getMessage("wait"),groupName:n,data:t,timeout:r});case 4:return i=e.sent,e.abrupt("return",i.responseData);case 6:case"end":return e.stop()}},e,this)}))}},{key:"cancelWait",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.DEFAULT_GROUP_NAME;return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u.default({groupName:t}).required().string(),e.next=3,this.postMessage({type:this.getMessage("cancel_wait"),groupName:t});case 3:case"end":return e.stop()}},e,this)}))}},{key:"setValue",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.DEFAULT_GROUP_NAME;return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.broadcastValue({key:t,value:n,groupName:r});case 2:case"end":return e.stop()}},e,this)}))}},{key:"broadcastValue",value:function(t){var n=t.groupName,r=t.key,o=t.value;return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=null!=n?n:e.DEFAULT_GROUP_NAME,u.default({key:r}).required().string(),u.default({groupName:n}).required().string(),t.next=5,this.postMessage({type:this.getMessage("request_set_value"),groupName:n,key:r,value:o});case 5:case"end":return t.stop()}},t,this)}))}},{key:"onValue",value:function(t){u.default({listener:t}).required().function(),this.eventEmitter.addListener(a.BroadcastedValue,function(n){t(n.key,n.value,n.groupName===e.DEFAULT_GROUP_NAME?void 0:n.groupName)})}},{key:"onStatus",value:function(t){u.default({listener:t}).required().function(),this.eventEmitter.addListener(a.Status,function(n){t({connectedPeers:n.connectedPeers,groupName:n.groupName===e.DEFAULT_GROUP_NAME?void 0:n.groupName})})}},{key:"onClosed",value:function(e){u.default({listener:e}).required().function(),this.eventEmitter.addListener(a.Closed,e)}},{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage(c.SyncMessageType.BroadcastedValue):var t=e,n={groupName:t.groupName,key:t.key,value:t.value};this.eventEmitter.emit(a.BroadcastedValue,n);break;case this.getMessage(c.SyncMessageType.Status):var r=e,i={connectedPeers:r.connectedPeers,groupName:r.groupName};this.eventEmitter.emit(a.Status,i);break;case this.getMessage(c.SyncMessageType.Closed):var o=e,s=o.error?new Error(o.error):void 0;this.eventEmitter.emit(a.Closed,s)}}},{key:"removeEventListeners",value:function(){this.eventEmitter.removeAllListeners()}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}}])&&r(t.prototype,n),f&&r(t,f),e}();t.default=f,f.MESSAGE_PREFIX="sync",f.DEFAULT_GROUP_NAME="____default____"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncMessageType=void 0,function(e){e.BroadcastedValue="set_value",e.Status="device_status",e.Closed="closed"}(t.SyncMessageType||(t.SyncMessageType={}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(15),a=n(505),s=n(7),c=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.eventEmitter=new o.EventEmitter}var t,n,c;return t=e,(n=[{key:"listStorageUnits",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("list_storage_units")});case 2:return t=e.sent,n=t.storageUnits,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"onStorageUnitsChanged",value:function(e){s.default({listener:e}).required().function(),this.eventEmitter.addListener("storage_units_changed",e)}},{key:"removeStorageUnitsChangedListener",value:function(e){s.default({listener:e}).required().function(),this.eventEmitter.removeListener("storage_units_changed",e)}},{key:"removeAllListeners",value:function(){this.eventEmitter.removeAllListeners("storage_units_changed")}},{key:"listFiles",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s.default({directoryPath:e}).required().object(a.VIFilePath),t.next=3,this.postMessage({type:this.getMessage("list_files"),directoryPath:e});case 3:return n=t.sent,r=n.files,t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}))}},{key:"exists",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s.default({filePath:e}).required().object(a.VIFilePath),t.next=3,this.postMessage({type:this.getMessage("exists"),filePath:e});case 3:return n=t.sent,r=n.exists,t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}))}},{key:"getFile",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s.default({filePath:e}).required().object(a.VIFilePath),t.next=3,this.postMessage({type:this.getMessage("get_file"),filePath:e});case 3:return n=t.sent,r=n.file,t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}))}},{key:"writeFile",value:function(e,t){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return s.default({filePath:e}).required().object(a.VIFilePath),n.next=3,this.postMessage({type:this.getMessage("write_file"),filePath:e,contents:t});case 3:case"end":return n.stop()}},n,this)}))}},{key:"appendFile",value:function(e,t){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return s.default({filePath:e}).required().object(a.VIFilePath),n.next=3,this.postMessage({type:this.getMessage("append_file"),filePath:e,contents:t});case 3:case"end":return n.stop()}},n,this)}))}},{key:"readFile",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s.default({filePath:e}).required().object(a.VIFilePath),t.next=3,this.postMessage({type:this.getMessage("read_file"),filePath:e});case 3:return n=t.sent,r=n.contents,t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}))}},{key:"copyFile",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i(this,void 0,void 0,regeneratorRuntime.mark(function r(){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return s.default({sourceFilePath:e}).required().object(a.VIFilePath),s.default({destinationFilePath:t}).required().object(a.VIFilePath),s.default({options:n}).required().object(a.VICopyFileOptions),r.next=5,this.postMessage({type:this.getMessage("copy_file"),sourceFilePath:e,destinationFilePath:t,options:n});case 5:case"end":return r.stop()}},r,this)}))}},{key:"moveFile",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i(this,void 0,void 0,regeneratorRuntime.mark(function r(){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return s.default({sourceFilePath:e}).required().object(a.VIFilePath),s.default({destinationFilePath:t}).required().object(a.VIFilePath),s.default({options:n}).required().object(a.VIMoveFileOptions),r.next=5,this.postMessage({type:this.getMessage("move_file"),sourceFilePath:e,destinationFilePath:t,options:n});case 5:case"end":return r.stop()}},r,this)}))}},{key:"deleteFile",value:function(e,t){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return s.default({filePath:e}).required().object(a.VIFilePath),s.default({recursive:t}).required().boolean(),n.next=4,this.postMessage({type:this.getMessage("delete_file"),filePath:e,recursive:t});case 4:case"end":return n.stop()}},n,this)}))}},{key:"downloadFile",value:function(e,t,n){return i(this,void 0,void 0,regeneratorRuntime.mark(function r(){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return s.default({filePath:e}).required().object(a.VIFilePath),s.default({sourceUri:t}).required().uri(),s.default({headers:n}).object(),r.next=5,this.postMessage({type:this.getMessage("download_file"),filePath:e,sourceUri:t,headers:n});case 5:case"end":return r.stop()}},r,this)}))}},{key:"extractFile",value:function(e,t,n){return i(this,void 0,void 0,regeneratorRuntime.mark(function r(){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return s.default({archiveFilePath:e}).required().object(a.VIFilePath),s.default({destinationDirectoryPath:t}).object(a.VIFilePath),s.default({method:n}).required().string(),r.next=5,this.postMessage({type:this.getMessage("extract_file"),archiveFilePath:e,destinationDirectoryPath:t,method:n});case 5:case"end":return r.stop()}},r,this)}))}},{key:"createArchive",value:function(e,t){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return s.default({archiveFilePath:e}).required().object(a.VIFilePath),s.default({archiveEntries:t}).required().array("object"),n.next=4,this.postMessage({type:this.getMessage("create_archive_file"),archiveFilePath:e,archiveEntries:t});case 4:case"end":return n.stop()}},n,this)}))}},{key:"getFileChecksum",value:function(e,t){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){var r,i;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return s.default({filePath:e}).required().object(a.VIFilePath),s.default({hashType:t}).required().string(),n.next=4,this.postMessage({type:this.getMessage("get_file_checksum"),filePath:e,hashType:t});case 4:return r=n.sent,i=r.checksum,n.abrupt("return",i);case 7:case"end":return n.stop()}},n,this)}))}},{key:"createDirectory",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s.default({directoryPath:e}).required().object(a.VIFilePath),t.next=3,this.postMessage({type:this.getMessage("create_directory"),directoryPath:e});case 3:case"end":return t.stop()}},t,this)}))}},{key:"isDirectory",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s.default({filePath:e}).required().object(a.VIFilePath),t.next=3,this.postMessage({type:this.getMessage("is_directory"),filePath:e});case 3:return n=t.sent,r=n.isDirectory,t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}))}},{key:"link",value:function(e,t){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return s.default({sourceFilePath:e}).required().object(a.VIFilePath),s.default({destinationFilePath:t}).required().object(a.VIFilePath),n.next=4,this.postMessage({type:this.getMessage("link"),sourceFilePath:e,destinationFilePath:t});case 4:case"end":return n.stop()}},n,this)}))}},{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage("storage_units_changed"):this.eventEmitter.emit("storage_units_changed")}}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}}])&&r(t.prototype,n),c&&r(t,c),e}();t.default=c,c.MESSAGE_PREFIX="file_system"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIMoveFileOptions=t.VICopyFileOptions=t.VIFilePath=t.VIStorageUnit=void 0,t.VIStorageUnit={type:"string",capacity:"number",freeSpace:"number",usableSpace:"number",removable:"boolean"},t.VIFilePath={storageUnit:{object:t.VIStorageUnit},filePath:"string"},t.VICopyFileOptions={overwrite:"?boolean"},t.VIMoveFileOptions={overwrite:"?boolean"}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(507),a=n(514),s=n(515),c=n(518),u=n(519),f=n(520),l=n(521),d=n(522),h=n(523),p=n(524),m=n(526),g=n(528),b=n(530),v=n(7),y=n(533),w=n(534),_=n(536),S=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.app=new f.default(this.getMessagePrefix(),this.postMessage),this.os=new l.default(this.getMessagePrefix(),this.postMessage),this.audio=new a.default(this.getMessagePrefix(),this.postMessage),this.debug=new d.default(this.getMessagePrefix(),this.postMessage),this.firmware=new o.default(this.getMessagePrefix(),this.postMessage),this.package=new h.default(this.getMessagePrefix(),this.postMessage),this.power=new p.default(this.getMessagePrefix(),this.postMessage),this.remoteControl=new c.default(this.getMessagePrefix(),this.postMessage),this.screen=new s.default(this.getMessagePrefix(),this.postMessage),this.time=new u.default(this.getMessagePrefix(),this.postMessage),this.network=new m.default(this.getMessagePrefix(),this.postMessage),this.wifi=new g.default(this.getMessagePrefix(),this.postMessage),this.security=new b.default(this.getMessagePrefix(),this.postMessage),this.proxy=new y.default(this.getMessagePrefix(),this.postMessage),this.autoRecovery=new _.default(this.getMessagePrefix(),this.postMessage),this.peerRecovery=new w.default(this.getMessagePrefix(),this.postMessage)}var t,n,S;return t=e,(n=[{key:"supports",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return v.default({capability:e}).required().string(),t.next=3,this.postMessage({type:this.getMessage("supports"),capability:e});case 3:return n=t.sent,r=n.supports,t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}))}},{key:"getModel",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_model")});case 2:return t=e.sent,n=t.model,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getSerialNumber",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_serial_number")});case 2:return t=e.sent,n=t.serialNumber,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getNetworkInfo",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.network.getActiveInfo();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}))}},{key:"getBatteryStatus",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_battery_status")});case 2:return t=e.sent,n=t.batteryStatus,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getTemperature",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_current_temperature")});case 2:return t=e.sent,n=t.currentTemperature,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getBrand",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_brand")});case 2:return t=e.sent,n=t.brand,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"resetSettings",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("reset_settings")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"factoryReset",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("factory_reset")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"getExtendedManagementUrl",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_extendedmanagement_url")});case 2:return t=e.sent,n=t.url,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"setExtendedManagementUrl",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return v.default({url:e}).string().canBeNull(),t.next=3,this.postMessage({type:this.getMessage("set_extendedmanagement_url"),url:e});case 3:case"end":return t.stop()}},t,this)}))}},{key:"getMessage",value:function(e){return this.getMessagePrefix()+"."+e}},{key:"getMessagePrefix",value:function(){return this.messagePrefix+"."+e.MESSAGE_PREFIX}}])&&r(t.prototype,n),S&&r(t,S),e}();t.default=S,S.MESSAGE_PREFIX="management"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(203),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,a;return t=e,(n=[{key:"upgrade",value:function(e,t){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){var r,i,a,s;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=o.parseUpgradeArguments(e,t),i=r.baseUrl,a=r.version,s=r.directUri,n.next=3,this.postMessage({type:this.getMessage("firmware_upgrade"),baseUrl:i,version:a,directUri:s});case 3:case"end":return n.stop()}},n,this)}))}},{key:"getVersion",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_firmware_version")});case 2:return t=e.sent,n=t.firmwareVersion,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getType",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_firmware_type")});case 2:return t=e.sent,n=t.firmwareType,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a},function(e,t,n){"use strict";var r=n(509),i=n(510);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=y,t.resolve=function(e,t){return y(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?y(e,!1,!0).resolveObject(t):t},t.format=function(e){i.isString(e)&&(e=y(e));return e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(u),l=["%","/","?",";","#"].concat(f),d=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=n(511);function y(e,t,n){if(e&&i.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}o.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),s=-1!==o&&o<e.indexOf("#")?"?":"#",u=e.split(s);u[0]=u[0].replace(/\\/g,"/");var y=e=u.join(s);if(y=y.trim(),!n&&1===e.split("#").length){var w=c.exec(y);if(w)return this.path=y,this.href=y,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?v.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var _=a.exec(y);if(_){var S=(_=_[0]).toLowerCase();this.protocol=S,y=y.substr(_.length)}if(n||_||y.match(/^\/\/[^@\/]+@[^@\/]+/)){var k="//"===y.substr(0,2);!k||_&&g[_]||(y=y.substr(2),this.slashes=!0)}if(!g[_]&&(k||_&&!b[_])){for(var E,x,M=-1,I=0;I<d.length;I++){-1!==(C=y.indexOf(d[I]))&&(-1===M||C<M)&&(M=C)}-1!==(x=-1===M?y.lastIndexOf("@"):y.lastIndexOf("@",M))&&(E=y.slice(0,x),y=y.slice(x+1),this.auth=decodeURIComponent(E)),M=-1;for(I=0;I<l.length;I++){var C;-1!==(C=y.indexOf(l[I]))&&(-1===M||C<M)&&(M=C)}-1===M&&(M=y.length),this.host=y.slice(0,M),y=y.slice(M),this.parseHost(),this.hostname=this.hostname||"";var R="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!R)for(var P=this.hostname.split(/\./),O=(I=0,P.length);I<O;I++){var j=P[I];if(j&&!j.match(h)){for(var A="",T=0,N=j.length;T<N;T++)j.charCodeAt(T)>127?A+="x":A+=j[T];if(!A.match(h)){var F=P.slice(0,I),D=P.slice(I+1),L=j.match(p);L&&(F.push(L[1]),D.unshift(L[2])),D.length&&(y="/"+D.join(".")+y),this.hostname=F.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=r.toASCII(this.hostname));var W=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+W,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!m[S])for(I=0,O=f.length;I<O;I++){var B=f[I];if(-1!==y.indexOf(B)){var H=encodeURIComponent(B);H===B&&(H=escape(B)),y=y.split(B).join(H)}}var U=y.indexOf("#");-1!==U&&(this.hash=y.substr(U),y=y.slice(0,U));var V=y.indexOf("?");if(-1!==V?(this.search=y.substr(V),this.query=y.substr(V+1),t&&(this.query=v.parse(this.query)),y=y.slice(0,V)):t&&(this.search="",this.query={}),y&&(this.pathname=y),b[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){W=this.pathname||"";var G=this.search||"";this.path=W+G}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,a="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(a=v.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||b[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+o+(n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(s=s.replace("#","%23"))+r},o.prototype.resolve=function(e){return this.resolveObject(y(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var n=new o,r=Object.keys(this),a=0;a<r.length;a++){var s=r[a];n[s]=this[s]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var c=Object.keys(e),u=0;u<c.length;u++){var f=c[u];"protocol"!==f&&(n[f]=e[f])}return b[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!b[e.protocol]){for(var l=Object.keys(e),d=0;d<l.length;d++){var h=l[d];n[h]=e[h]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||g[e.protocol])n.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",v=n.search||"";n.path=m+v}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var y=n.pathname&&"/"===n.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=w||y||n.host&&e.pathname,S=_,k=n.pathname&&n.pathname.split("/")||[],E=(p=e.pathname&&e.pathname.split("/")||[],n.protocol&&!b[n.protocol]);if(E&&(n.hostname="",n.port=null,n.host&&(""===k[0]?k[0]=n.host:k.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),_=_&&(""===p[0]||""===k[0])),w)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,k=p;else if(p.length)k||(k=[]),k.pop(),k=k.concat(p),n.search=e.search,n.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(E)n.hostname=n.host=k.shift(),(R=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=R.shift(),n.host=n.hostname=R.shift());return n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!k.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var x=k.slice(-1)[0],M=(n.host||e.host||k.length>1)&&("."===x||".."===x)||""===x,I=0,C=k.length;C>=0;C--)"."===(x=k[C])?k.splice(C,1):".."===x?(k.splice(C,1),I++):I&&(k.splice(C,1),I--);if(!_&&!S)for(;I--;I)k.unshift("..");!_||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),M&&"/"!==k.join("/").substr(-1)&&k.push("");var R,P=""===k[0]||k[0]&&"/"===k[0].charAt(0);E&&(n.hostname=n.host=P?"":k.length?k.shift():"",(R=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=R.shift(),n.host=n.hostname=R.shift()));return(_=_||n.host&&k.length)&&!P&&k.unshift(""),k.length?n.pathname=k.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){(function(e,r){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var s,c=2147483647,u=36,f=1,l=26,d=38,h=700,p=72,m=128,g="-",b=/^xn--/,v=/[^\x20-\x7E]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=u-f,S=Math.floor,k=String.fromCharCode;function E(e){throw new RangeError(w[e])}function x(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function M(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+x((e=e.replace(y,".")).split("."),t).join(".")}function I(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function C(e){return x(e,function(e){var t="";return e>65535&&(t+=k((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=k(e)}).join("")}function R(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function P(e,t,n){var r=0;for(e=n?S(e/h):e>>1,e+=S(e/t);e>_*l>>1;r+=u)e=S(e/_);return S(r+(_+1)*e/(e+d))}function O(e){var t,n,r,i,o,a,s,d,h,b,v,y=[],w=e.length,_=0,k=m,x=p;for((n=e.lastIndexOf(g))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&E("not-basic"),y.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<w;){for(o=_,a=1,s=u;i>=w&&E("invalid-input"),((d=(v=e.charCodeAt(i++))-48<10?v-22:v-65<26?v-65:v-97<26?v-97:u)>=u||d>S((c-_)/a))&&E("overflow"),_+=d*a,!(d<(h=s<=x?f:s>=x+l?l:s-x));s+=u)a>S(c/(b=u-h))&&E("overflow"),a*=b;x=P(_-o,t=y.length+1,0==o),S(_/t)>c-k&&E("overflow"),k+=S(_/t),_%=t,y.splice(_++,0,k)}return C(y)}function j(e){var t,n,r,i,o,a,s,d,h,b,v,y,w,_,x,M=[];for(y=(e=I(e)).length,t=m,n=0,o=p,a=0;a<y;++a)(v=e[a])<128&&M.push(k(v));for(r=i=M.length,i&&M.push(g);r<y;){for(s=c,a=0;a<y;++a)(v=e[a])>=t&&v<s&&(s=v);for(s-t>S((c-n)/(w=r+1))&&E("overflow"),n+=(s-t)*w,t=s,a=0;a<y;++a)if((v=e[a])<t&&++n>c&&E("overflow"),v==t){for(d=n,h=u;!(d<(b=h<=o?f:h>=o+l?l:h-o));h+=u)x=d-b,_=u-b,M.push(k(R(b+x%_,0))),d=S(x/_);M.push(k(R(d,0))),o=P(n,w,r==i),n=0,++r}++n,++t}return M.join("")}s={version:"1.4.1",ucs2:{decode:I,encode:C},decode:O,encode:j,toASCII:function(e){return M(e,function(e){return v.test(e)?"xn--"+j(e):e})},toUnicode:function(e){return M(e,function(e){return b.test(e)?O(e.slice(4).toLowerCase()):e})}},void 0===(i=function(){return s}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(182)(e),n(38))},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(512),t.encode=t.stringify=n(513)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var c=1e3;o&&"number"==typeof o.maxKeys&&(c=o.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var f=0;f<u;++f){var l,d,h,p,m=e[f].replace(s,"%20"),g=m.indexOf(n);g>=0?(l=m.substr(0,g),d=m.substr(g+1)):(l=m,d=""),h=decodeURIComponent(l),p=decodeURIComponent(d),r(a,h)?i(a[h])?a[h].push(p):a[h]=[a[h],p]:a[h]=p}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?o(a(e),function(a){var s=encodeURIComponent(r(a))+n;return i(e[a])?o(e[a],function(e){return s+encodeURIComponent(r(e))}).join(t):s+encodeURIComponent(r(e[a]))}).join(t):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var a=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,a;return t=e,(n=[{key:"getVolume",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_volume")});case 2:return t=e.sent,n=t.volume,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"setVolume",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o.default({volume:e}).required().number().min(0).max(100),t.next=3,this.postMessage({type:this.getMessage("set_volume"),volume:e});case 3:case"end":return t.stop()}},t,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(516),a=n(517),s=n(7),c=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,c;return t=e,(n=[{key:"resize",value:function(e,t,n,r,c){return i(this,void 0,void 0,regeneratorRuntime.mark(function i(){return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(s.default({baseUrl:e}).required().uri(),s.default({currentVersion:r}).required().string(),void 0!==o.Orientation[t]){i.next=4;break}throw new Error("Invalid orientation");case 4:if(void 0!==o.Resolution[n]){i.next=6;break}throw new Error("Invalid resolution");case 6:if(!c||void 0!==a.Orientation[c]){i.next=8;break}throw new Error("Invalid video orientation");case 8:return i.next=10,this.postMessage({type:this.getMessage("resize_screen"),baseUrl:e,orientation:t,resolution:n,currentVersion:r,videoOrientation:c});case 10:case"end":return i.stop()}},i,this)}))}},{key:"getOrientation",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_screen_orientation")});case 2:return t=e.sent,n=t.screenOrientation,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"setBrightness",value:function(e,t,n,r){return i(this,void 0,void 0,regeneratorRuntime.mark(function i(){return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return s.default({brightness1:t}).required().number().min(0).max(100),s.default({brightness2:r}).required().number().min(0).max(100),s.default({timeFrom1:e}).canBeNull().required().string().matchRegExp(/\d{2}:\d{2}/).timerTime(),s.default({timeFrom2:n}).canBeNull().required().string().matchRegExp(/\d{2}:\d{2}/).timerTime(),i.next=6,this.postMessage({type:this.getMessage("set_screen_brightness"),timeFrom1:e,brightness1:t,timeFrom2:n,brightness2:r});case 6:case"end":return i.stop()}},i,this)}))}},{key:"getBrightness",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_screen_brightness")});case 2:return t=e.sent,n=t.screenBrightness,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"takeAndUploadScreenshot",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s.default({uploadBaseUrl:e}).required().uri(),t.next=3,this.postMessage({type:this.getMessage("upload_screenshot"),uploadBaseUrl:e});case 3:return n=t.sent,r=n.screenshotUrl,t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}))}},{key:"powerOn",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("power_on_display")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"powerOff",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("power_off_display")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"isPoweredOn",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_is_display_power_on")});case 2:return t=e.sent,n=t.isDisplayPowerOn,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getMessage",value:function(e){return this.getMessagePrefix()+"."+e}},{key:"getMessagePrefix",value:function(){return this.messagePrefix}}])&&r(t.prototype,n),c&&r(t,c),e}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Orientation=t.Resolution=void 0,function(e){e[e.FULL_HD=0]="FULL_HD",e[e.HD_READY=1]="HD_READY"}(t.Resolution||(t.Resolution={})),function(e){e[e.LANDSCAPE=0]="LANDSCAPE",e[e.PORTRAIT=1]="PORTRAIT",e[e.LANDSCAPE_FLIPPED=2]="LANDSCAPE_FLIPPED",e[e.PORTRAIT_FLIPPED=3]="PORTRAIT_FLIPPED",e[e.AUTO=4]="AUTO"}(t.Orientation||(t.Orientation={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Orientation=void 0,function(e){e[e.LANDSCAPE=0]="LANDSCAPE",e[e.LANDSCAPE_FLIPPED=1]="LANDSCAPE_FLIPPED"}(t.Orientation||(t.Orientation={}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,o;return t=e,(n=[{key:"enable",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setEnabled(!0);case 2:case"end":return e.stop()}},e,this)}))}},{key:"disable",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setEnabled(!1);case 2:case"end":return e.stop()}},e,this)}))}},{key:"isEnabled",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_is_remote_control_enabled")});case 2:return t=e.sent,n=t.isRemoteControlEnabled,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"lock",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.disable();case 2:case"end":return e.stop()}},e,this)}))}},{key:"unlock",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.enable();case 2:case"end":return e.stop()}},e,this)}))}},{key:"isLocked",value:function(){return this.isEnabled()}},{key:"setEnabled",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.postMessage({type:this.getMessage("set_remote_control_enabled"),enabled:e});case 2:case"end":return t.stop()}},t,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a={year:"number",month:"number",day:"number",hour:"number",minute:"number",second:"number"},s=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,s;return t=e,(n=[{key:"get",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_current_time_with_timezone")});case 2:return t=e.sent,n=t.currentTimeWithTimezone,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"set",value:function(e,t){return this.setManual(e,t)}},{key:"setManual",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n,r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t[0],r=t[1],n instanceof Date?o.default({currentDate:n}).required().date():o.default({currentDate:n}).required().object(a),o.default({timezone:r}).required().string(),e.next=5,this.postMessage({type:this.getMessage("set_current_time_with_timezone"),currentDate:n,timezone:r});case 5:case"end":return e.stop()}},e,this)}))}},{key:"setNTP",value:function(e,t){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return o.default({ntpServer:e}).required().string(),o.default({timezone:t}).required().string(),n.next=4,this.postMessage({type:this.getMessage("set_ntp_time_with_timezone"),ntpServer:e,timezone:t});case 4:case"end":return n.stop()}},n,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),s&&r(t,s),e}();t.default=s},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(203),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,a;return t=e,(n=[{key:"getType",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_application_type")});case 2:return t=e.sent,n=t.applicationType,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getVersion",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_application_version")});case 2:return t=e.sent,n=t.applicationVersion,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"upgrade",value:function(e,t){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){var r,i,a,s;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=o.parseUpgradeArguments(e,t),i=r.baseUrl,a=r.version,s=r.directUri,n.next=3,this.postMessage({type:this.getMessage("app_upgrade"),baseUrl:i,version:a,directUri:s});case 3:case"end":return n.stop()}},n,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,o;return t=e,(n=[{key:"getInfo",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_os_info")});case 2:return t=e.sent,n=t.osInfo,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getCpuUsage",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_cpu_usage")});case 2:return t=e.sent,n=t.cpuUsage,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getMemoryUsage",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_memory_usage")});case 2:return t=e.sent,n=t.memoryUsage,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,a;return t=e,(n=[{key:"enable",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setDebug(!0);case 2:case"end":return e.stop()}},e,this)}))}},{key:"disable",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setDebug(!1);case 2:case"end":return e.stop()}},e,this)}))}},{key:"isEnabled",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("is_enabled")});case 2:return t=e.sent,n=t.isEnabled,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"setDebug",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o.default({enabled:e}).required().boolean(),t.next=3,this.postMessage({type:this.getMessage("set_debug"),enabled:e});case 3:case"end":return t.stop()}},t,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,a;return t=e,(n=[{key:"install",value:function(e,t,n,r){return i(this,void 0,void 0,regeneratorRuntime.mark(function i(){return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return o.default({baseUrl:e}).required().uri(),o.default({packageName:t}).required().string(),o.default({version:n}).required().string(),o.default({build:r}).canBeNull().required().string(),i.next=6,this.postMessage({type:this.getMessage("install_package"),baseUrl:e,packageName:t,version:n,build:r});case 6:case"end":return i.stop()}},i,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(525),a=n(7),s=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,s;return t=e,(n=[{key:"systemReboot",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("reboot_system")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"appRestart",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("restart_app")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"getTimers",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_timers")});case 2:return t=e.sent,n=t.timers,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"setTimer",value:function(e,t,n,r,s){return i(this,void 0,void 0,regeneratorRuntime.mark(function i(){var c,u,f,l,d,h;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(void 0!==o.TimerType[e]){i.next=2;break}throw new Error("Invalid timer type");case 2:a.default({timeOn:t}).canBeNull().required().string().matchRegExp(/\d{2}:\d{2}:\d{2}/).timerTime(),a.default({timeOff:n}).canBeNull().required().string().matchRegExp(/\d{2}:\d{2}:\d{2}/).timerTime(),a.default({weekdays:r}).required().array("string"),a.default({volume:s}).required().number().min(0).max(100),c=!0,u=!1,f=void 0,i.prev=9,l=r[Symbol.iterator]();case 11:if(c=(d=l.next()).done){i.next=18;break}if(h=d.value,void 0!==o.TimerWeekday[h]){i.next=15;break}throw new Error("Invalid timer weekday");case 15:c=!0,i.next=11;break;case 18:i.next=24;break;case 20:i.prev=20,i.t0=i.catch(9),u=!0,f=i.t0;case 24:i.prev=24,i.prev=25,c||null==l.return||l.return();case 27:if(i.prev=27,!u){i.next=30;break}throw f;case 30:return i.finish(27);case 31:return i.finish(24);case 32:return i.next=34,this.postMessage({type:this.getMessage("set_timer"),timerType:e,timeOn:t,timeOff:n,weekdays:r,volume:s});case 34:case"end":return i.stop()}},i,this,[[9,20,24,32],[25,,27,31]])}))}},{key:"unsetTimer",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===o.TimerType[e]&&console.warn("Invalid timer type"),t.next=3,this.setTimer(e,null,null,[],0);case 3:case"end":return t.stop()}},t,this)}))}},{key:"getProprietaryTimers",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_proprietary_timers")});case 2:return t=e.sent,n=t.timers,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"setProprietaryTimer",value:function(e,t,n,r){var s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return i(this,void 0,void 0,regeneratorRuntime.mark(function i(){var c,u,f,l,d,h;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:a.default({type:e}).required().string().matchRegExp(/^TIMER_\d+$/),a.default({timeOn:t}).canBeNull().required().string().matchRegExp(/\d{2}:\d{2}:\d{2}/).timerTime(),a.default({timeOff:n}).canBeNull().required().string().matchRegExp(/\d{2}:\d{2}:\d{2}/).timerTime(),a.default({weekdays:r}).required().array("string"),a.default({keepAppletRunning:s}).required().boolean(),c=!0,u=!1,f=void 0,i.prev=8,l=r[Symbol.iterator]();case 10:if(c=(d=l.next()).done){i.next=17;break}if(h=d.value,void 0!==o.TimerWeekday[h]){i.next=14;break}throw new Error("Invalid timer weekday");case 14:c=!0,i.next=10;break;case 17:i.next=23;break;case 19:i.prev=19,i.t0=i.catch(8),u=!0,f=i.t0;case 23:i.prev=23,i.prev=24,c||null==l.return||l.return();case 26:if(i.prev=26,!u){i.next=29;break}throw f;case 29:return i.finish(26);case 30:return i.finish(23);case 31:return i.next=33,this.postMessage({type:this.getMessage("set_proprietary_timer"),timerType:e,timeOn:t,timeOff:n,weekdays:r,keepAppletRunning:s});case 33:case"end":return i.stop()}},i,this,[[8,19,23,31],[24,,26,30]])}))}},{key:"unsetProprietaryTimer",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.postMessage({type:this.getMessage("delete_proprietary_timer"),timerType:e});case 3:t.next=9;break;case 5:return t.prev=5,t.t0=t.catch(0),t.next=9,this.setProprietaryTimer(e,null,null,[]);case 9:case"end":return t.stop()}},t,this,[[0,5]])}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),s&&r(t,s),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimerWeekday=t.TimerType=void 0,function(e){e[e.TIMER_1=0]="TIMER_1",e[e.TIMER_2=1]="TIMER_2",e[e.TIMER_3=2]="TIMER_3",e[e.TIMER_4=3]="TIMER_4",e[e.TIMER_5=4]="TIMER_5",e[e.TIMER_6=5]="TIMER_6",e[e.TIMER_7=6]="TIMER_7"}(t.TimerType||(t.TimerType={})),function(e){e[e.sun=0]="sun",e[e.mon=1]="mon",e[e.tue=2]="tue",e[e.wed=3]="wed",e[e.thu=4]="thu",e[e.fri=5]="fri",e[e.sat=6]="sat"}(t.TimerWeekday||(t.TimerWeekday={}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(527),a=n(7),s=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,s;return t=e,(n=[{key:"getActiveInfo",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_network_info")});case 2:return t=e.sent,n=t.networkInfo,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"listInterfaces",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_network_interfaces")});case 2:return t=e.sent,n=t.interfaces,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"setManual",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n,r,i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("string"!=typeof t[0]){e.next=8;break}return n=t[0],r=t[1],a.default({interfaceName:n}).required().string(),a.default({options:r}).required().object(o.VINetworkOptions),e.next=6,this.postMessage({type:this.getMessage("set_network_manual_v2"),interfaceName:n,options:r});case 6:e.next=12;break;case 8:return i=t[0],a.default({options:i}).required().object(o.VINetworkOptionsLegacy),e.next=12,this.postMessage({type:this.getMessage("set_network_manual"),options:i});case 12:case"end":return e.stop()}},e,this)}))}},{key:"setDHCP",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n,r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("ethernet"!==t[0]&&"wifi"!==t[0]){e.next=7;break}return n=t[0],a.default({networkInterface:n}).required().string(o.VNetworkInterface),e.next=5,this.postMessage({type:this.getMessage("set_network_dhcp"),networkInterface:n});case 5:e.next=11;break;case 7:return r=t[0],a.default({interfaceName:r}).required().string(),e.next=11,this.postMessage({type:this.getMessage("set_network_dhcp_v2"),interfaceName:r});case 11:case"end":return e.stop()}},e,this)}))}},{key:"disableInterface",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return a.default({interfaceName:e}).required().string(),t.next=3,this.postMessage({type:this.getMessage("disable_network_interface"),interfaceName:e});case 3:case"end":return t.stop()}},t,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),s&&r(t,s),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VINetworkOptions=t.VINetworkOptionsLegacy=t.VNetworkInterface=void 0,t.VNetworkInterface=["wifi","ethernet"],t.VINetworkOptionsLegacy={interface:{string:t.VNetworkInterface},localAddress:"string",gateway:"string",netmask:"string",dns:{array:"string"}},t.VINetworkOptions={localAddress:"string",gateway:"string",netmask:"string",dns:{array:"string"}}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.VIWifiConnectOptions=void 0;var o=n(15),a=n(529),s=n(7);t.VIWifiConnectOptions={hidden:"?boolean"};var c=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.eventEmitter=new o.EventEmitter}var n,c,u;return n=e,(c=[{key:"isClientEnabled",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("is_enabled")});case 2:return t=e.sent,n=t.isWifiEnabled,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"enableClient",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("enable")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"isAPEnabled",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("is_ap_enabled")});case 2:return t=e.sent,n=t.isWifiAPEnabled,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"enableAP",value:function(e,t){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return s.default({ssid:e}).required().string(),s.default({password:t}).required().string(),n.next=4,this.postMessage({type:this.getMessage("enable_ap"),ssid:e,password:t});case 4:case"end":return n.stop()}},n,this)}))}},{key:"disable",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("disable")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"getConnectedTo",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_connected_to")});case 2:return t=e.sent,e.abrupt("return",t||null);case 4:case"end":return e.stop()}},e,this)}))}},{key:"connect",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i(this,void 0,void 0,regeneratorRuntime.mark(function i(){return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return s.default({ssid:e}).required().string(),s.default({password:n}).string(),s.default({options:r}).object(t.VIWifiConnectOptions),i.next=5,this.postMessage({type:this.getMessage("connect"),ssid:e,password:n,options:r});case 5:case"end":return i.stop()}},i,this)}))}},{key:"disconnect",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("disconnect")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"getCountry",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_country")});case 2:return t=e.sent,n=t.countryCode,e.abrupt("return",n||null);case 5:case"end":return e.stop()}},e,this)}))}},{key:"setCountry",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s.default({countryCode:e}).required().string(),t.next=3,this.postMessage({type:this.getMessage("set_country"),countryCode:e});case 3:case"end":return t.stop()}},t,this)}))}},{key:"scanDevices",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("scan")});case 2:return t=e.sent,n=t.devices,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"on",value:function(e,t){this.eventEmitter.on(e,t)}},{key:"once",value:function(e,t){this.eventEmitter.once(e,t)}},{key:"removeListener",value:function(e,t){this.eventEmitter.removeListener(e,t)}},{key:"removeAllListeners",value:function(e){e?this.eventEmitter.removeAllListeners(e):this.eventEmitter.removeAllListeners()}},{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage("event_"+a.WifiEvent.CLIENT_ENABLED):case this.getMessage("event_"+a.WifiEvent.CLIENT_CONNECTED):case this.getMessage("event_"+a.WifiEvent.CLIENT_CONNECT_REJECTED):case this.getMessage("event_"+a.WifiEvent.CLIENT_DISCONNECTED):case this.getMessage("event_"+a.WifiEvent.AP_ENABLED):case this.getMessage("event_"+a.WifiEvent.DISABLED):var t=this.getMessage("event_"),n=e.type.substring(t.length);this.eventEmitter.emit(n)}}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}}])&&r(n.prototype,c),u&&r(n,u),e}();t.default=c,c.MESSAGE_PREFIX="wifi"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WifiEvent=void 0,function(e){e.CLIENT_ENABLED="client_enabled",e.CLIENT_CONNECTED="client_connected",e.CLIENT_CONNECT_REJECTED="client_connect_rejected",e.CLIENT_DISCONNECTED="client_disconnected",e.AP_ENABLED="ap_enabled",e.DISABLED="disabled"}(t.WifiEvent||(t.WifiEvent={}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(531),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,a;return t=e,(n=[{key:"getPinCode",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_pin_code")});case 2:return t=e.sent,n=t.pinCode,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"setPinCode",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o.validatePinCode(e),t.next=3,this.postMessage({type:this.getMessage("set_pin_code"),pinCode:e});case 3:case"end":return t.stop()}},t,this)}))}},{key:"generateRandomPinCode",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setPinCode(o.generateRandomPin());case 2:case"end":return e.stop()}},e,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validatePinCode=t.generateRandomPin=void 0;var r=n(532),i=n(40),o=n(128);t.generateRandomPin=function(){return Math.floor(1e4*Math.random()).toString().padStart(4,"0")},t.validatePinCode=function(e){if(!e.match(/^\d{4}$/))throw new r.default({kind:"appletSecurityError",message:"Invalid PIN code: ".concat(e),code:i.default.SECURITY_PIN_CODE_INVALID,suggestion:o.default.SECURITY_PIN_CODE_FORMAT})}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(52),c=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,o(t).call(this,Object.assign(Object.assign({},e),{pathToDocs:t.PATH_TO_DOCS,kind:"appletError",type:e.type?e.type:"AppletSecurityError"})))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,s["default"]),t}();t.default=c,c.PATH_TO_DOCS="/api/js/management/12-js-management-security"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,o;return t=e,(n=[{key:"isEnabled",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("proxy_is_enabled")});case 2:return t=e.sent,n=t.isEnabled,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"setManual",value:function(e,t,n,r){return i(this,void 0,void 0,regeneratorRuntime.mark(function i(){return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.postMessage({type:this.getMessage("proxy_set_manual"),uri:e,port:t,username:n,password:r});case 2:case"end":return i.stop()}},i,this)}))}},{key:"disable",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("proxy_disable")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"getConnectedTo",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("proxy_get_connected_to")});case 2:return t=e.sent,n=t.connectedTo,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(535),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,a;return t=e,(n=[{key:"get",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_peer_recovery")});case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}},e,this)}))}},{key:"set",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o.validatePeerRecoveryConfiguration(e),t.next=3,this.postMessage(Object.assign({type:this.getMessage("set_peer_recovery")},e));case 3:case"end":return t.stop()}},t,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validatePeerRecoveryConfiguration=void 0;var r=n(7);t.validatePeerRecoveryConfiguration=function(e){var t=r.default({configuration:e}).setError(new Error("Invalid peer recovery configuration")).required();e.enabled?t.object({enabled:"boolean",urlLauncherAddress:"string"}):t.object({enabled:"boolean",autoEnableTimeoutMs:"?number"})}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(537),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,a;return t=e,(n=[{key:"get",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_auto_recovery")});case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}},e,this)}))}},{key:"set",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o.validateAutoRecoveryConfiguration(e),t.next=3,this.postMessage(Object.assign({type:this.getMessage("set_auto_recovery")},e));case 3:case"end":return t.stop()}},t,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAutoRecoveryConfiguration=void 0;var r=n(7);t.validateAutoRecoveryConfiguration=function(e){var t=r.default({configuration:e}).setError(new Error("Invalid auto recovery configuration")).required();e.enabled?t.object({enabled:"boolean",healthcheckIntervalMs:"number"}):t.object({enabled:"boolean",autoEnableTimeoutMs:"?number"})}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,o;return t=e,(n=[{key:"getList",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_list")});case 2:return t=e.sent,n=t.monitors,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}}])&&r(t.prototype,n),o&&r(t,o),e}();o.MESSAGE_PREFIX="monitors",t.default=o},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(540),o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.proximity=new i.default(this.getMessagePrefix())}var t,n,o;return t=e,(n=[{key:"handleMessageData",value:function(e){this.proximity.handleMessageData(e)}},{key:"getMessagePrefix",value:function(){return this.messagePrefix+"."+e.MESSAGE_PREFIX}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o,o.MESSAGE_PREFIX="sensors"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(15),o=n(7),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.lastDetected=!1,this.eventEmitter=new i.EventEmitter}var t,n,a;return t=e,(n=[{key:"onStateChange",value:function(e){var t=this;return o.default({callback:e}).required().function(),this.lastDetected&&e(this.lastDetected),this.eventEmitter.addListener("change",e),function(){return t.eventEmitter.removeListener("change",e)}}},{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage("change"):e.detected!==this.lastDetected&&(this.lastDetected=e.detected,this.eventEmitter.emit("change",e.detected))}}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a,a.MESSAGE_PREFIX="proximity"},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.createExchange=void 0,t.createExchange=function e(t,n){var i=this,o=function(e){return[t,e].join(".")};return{messageNameToType:o,postMessage:function(e){return r(i,void 0,void 0,regeneratorRuntime.mark(function t(){var r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=o(e.type),e=Object.assign(Object.assign({},e),{type:r}),t.abrupt("return",n(e));case 3:case"end":return t.stop()}},t)}))},createNamespaced:function(t){return e(o(t),n)}}}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,o;return t=e,(n=[{key:"showOSD",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("show_osd")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o,o.MESSAGE_PREFIX="osd"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a=n(544),s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.commandApi=t}var t,n,s;return t=e,(n=[{key:"recordItemPlayed",value:function(e){var t=e.name,n=e.customId,r=e.type,s=e.tags,c=e.fileName,u=e.playbackSuccess,f=e.errorMessage;return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o.default({name:t}).required().string(),o.default({customId:n}).string(),o.default({type:r}).string(["video","image","html","custom"]),o.default({tags:s}).array("string"),o.default({fileName:c}).string(),o.default({playbackSuccess:u}).boolean(),o.default({errorMessage:f}).string(),e.next=9,this.commandApi.dispatch({type:a.default.ItemPlayed,itemName:t,customId:n,itemType:r,itemTags:s,fileName:c,playbackSuccess:u,errorMessage:f});case 9:case"end":return e.stop()}},e,this)}))}}])&&r(t.prototype,n),s&&r(t,s),e}();t.default=s},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.ItemPlayed="PoP.ItemPlayed"}(r||(r={})),t.default=r},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(546),o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.mdc=new i.default(this.getMessagePrefix(),this.postMessage)}var t,n,o;return t=e,(n=[{key:"getMessagePrefix",value:function(){return this.messagePrefix+"."+e.MESSAGE_PREFIX}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o,o.MESSAGE_PREFIX="native_commands"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,a;return t=e,(n=[{key:"sendOne",value:function(e,t,n){return i(this,void 0,void 0,regeneratorRuntime.mark(function r(){var i,a;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return o.default({ipAddress:e}).required().string(),o.default({command:t}).required().number(),void 0!==n&&o.default({data:n}).required().array("number"),void 0===n&&(n=[]),r.next=6,this.postMessage({type:this.getMessage("send_one"),ipAddress:e,command:t,data:n});case 6:return i=r.sent,a=i.commandResponse,r.abrupt("return",a);case 9:case"end":return r.stop()}},r,this)}))}},{key:"getMessage",value:function(e){return this.getMessagePrefix()+"."+e}},{key:"getMessagePrefix",value:function(){return this.messagePrefix+"."+e.MESSAGE_PREFIX}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a,a.MESSAGE_PREFIX="mdc"},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var a=n(548),s=n(549),c=n(550),u=n(551),f=n(552),l=n(553),d=n(554),h=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.frontApplet=t,this.frontApplet.command.onCommand(function(e){e.command.type===a.EnableMonitoring&&(n.frontApplet.config.sosMonitoring=!0)}),this.frontApplet.command.onCommand(function(e){e.command.type===a.DisableMonitoring&&(n.frontApplet.config.sosMonitoring=!1)}),this.handleTimingLoaded(),this.handleHtmlSnapshotTakingRequests(),this.interceptConsoleLogging(),this.handleOfflineCacheFilesRequests(),this.handleVideoStatesChanges(),this.handleFileSystemRequests()}var t,n,h;return t=e,(n=[{key:"onCommand",value:function(e){var t=this;this.frontApplet.command.onCommand(function(n){"object"===r(t.frontApplet.config)&&t.frontApplet.config.sosMonitoring&&e(n)})}},{key:"dispatch",value:function(e){"object"===r(this.frontApplet.config)&&this.frontApplet.config.sosMonitoring&&this.frontApplet.command.dispatch(e)}},{key:"handleTimingLoaded",value:function(){return o(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.frontApplet.onReady();case 2:this.dispatch({type:s.TimingLoaded});case 3:case"end":return e.stop()}},e,this)}))}},{key:"handleHtmlSnapshotTakingRequests",value:function(){var e=this;this.onCommand(function(t){switch(t.command.type){case c.TakeHtmlSnapshot:e.dispatch({type:c.HtmlSnapshotTaken,html:e.frontApplet.window.document.documentElement.outerHTML})}})}},{key:"interceptConsoleLogging",value:function(){var e=this,t=console.log;console.log=function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t.apply(console,r),e.dispatch({type:u.ConsoleLogged,level:"log",messages:r})};var n=console.error;console.error=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];n.apply(console,r),e.dispatch({type:u.ConsoleLogged,level:"error",messages:r})};var r=console.warn;console.warn=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];r.apply(console,n),e.dispatch({type:u.ConsoleLogged,level:"warn",messages:n})};var i=console.info;console.info=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];i.apply(console,n),e.dispatch({type:u.ConsoleLogged,level:"info",messages:n})};var o=console.debug;console.debug=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];o.apply(console,n),e.dispatch({type:u.ConsoleLogged,level:"debug",messages:n})}}},{key:"handleFileSystemRequests",value:function(){var e=this;this.onCommand(function(t){return o(e,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.command.type,e.next=e.t0===d.FileSystemListOfStorageUnitsRequest?3:e.t0===d.FileSystemListFilesRequest?11:e.t0===d.FileSystemGetFileRequest?19:e.t0===d.FileSystemExistsRequest?27:e.t0===d.FileSystemDownloadFileRequest?35:e.t0===d.FileSystemDeleteFileRequest?43:e.t0===d.FileSystemMoveFileRequest?51:e.t0===d.FileSystemGetFileChecksumRequest?59:e.t0===d.FileSystemExtractFileRequest?67:e.t0===d.FileSystemCreateDirectoryRequest?75:e.t0===d.FileSystemCreateArchiveFileRequest?83:e.t0===d.FileSystemIsDirectoryRequest?91:e.t0===d.FileSystemCopyFileRequest?99:e.t0===d.FileSystemWriteFileRequest?107:e.t0===d.FileSystemAppendFileRequest?115:e.t0===d.FileSystemReadFileRequest?123:131;break;case 3:return e.t1=this,e.t2=d.FileSystemListOfStorageUnitsResult,e.next=7,this.frontApplet.fileSystem.listStorageUnits();case 7:return e.t3=e.sent,e.t4={type:e.t2,storageUnits:e.t3},e.t1.dispatch.call(e.t1,e.t4),e.abrupt("break",131);case 11:return e.t5=this,e.t6=d.FileSystemListFilesResult,e.next=15,this.frontApplet.fileSystem.listFiles(t.command.filePath);case 15:return e.t7=e.sent,e.t8={type:e.t6,pathList:e.t7},e.t5.dispatch.call(e.t5,e.t8),e.abrupt("break",131);case 19:return e.t9=this,e.t10=d.FileSystemGetFileResult,e.next=23,this.frontApplet.fileSystem.getFile(t.command.filePath);case 23:return e.t11=e.sent,e.t12={type:e.t10,file:e.t11},e.t9.dispatch.call(e.t9,e.t12),e.abrupt("break",131);case 27:return e.t13=this,e.t14=d.FileSystemExistsResult,e.next=31,this.frontApplet.fileSystem.exists(t.command.filePath);case 31:return e.t15=e.sent,e.t16={type:e.t14,result:e.t15},e.t13.dispatch.call(e.t13,e.t16),e.abrupt("break",131);case 35:return e.t17=this,e.t18=d.FileSystemDownloadFileResult,e.next=39,this.frontApplet.fileSystem.downloadFile(t.command.filePath,t.command.sourceUri,t.command.headers);case 39:return e.t19=e.sent,e.t20={type:e.t18,result:e.t19},e.t17.dispatch.call(e.t17,e.t20),e.abrupt("break",131);case 43:return e.t21=this,e.t22=d.FileSystemDeleteFileResult,e.next=47,this.frontApplet.fileSystem.deleteFile(t.command.filePath,t.command.recursive);case 47:return e.t23=e.sent,e.t24={type:e.t22,result:e.t23},e.t21.dispatch.call(e.t21,e.t24),e.abrupt("break",131);case 51:return e.t25=this,e.t26=d.FileSystemMoveFileResult,e.next=55,this.frontApplet.fileSystem.moveFile(t.command.sourceFilePath,t.command.destinationFilePath,t.command.options);case 55:return e.t27=e.sent,e.t28={type:e.t26,result:e.t27},e.t25.dispatch.call(e.t25,e.t28),e.abrupt("break",131);case 59:return e.t29=this,e.t30=d.FileSystemGetFileChecksumResult,e.next=63,this.frontApplet.fileSystem.getFileChecksum(t.command.filePath,t.command.hashType);case 63:return e.t31=e.sent,e.t32={type:e.t30,result:e.t31},e.t29.dispatch.call(e.t29,e.t32),e.abrupt("break",131);case 67:return e.t33=this,e.t34=d.FileSystemExtractFileResult,e.next=71,this.frontApplet.fileSystem.extractFile(t.command.archiveFilePath,t.command.destinationDirectionPath,t.command.method);case 71:return e.t35=e.sent,e.t36={type:e.t34,result:e.t35},e.t33.dispatch.call(e.t33,e.t36),e.abrupt("break",131);case 75:return e.t37=this,e.t38=d.FileSystemCreateDirectoryResult,e.next=79,this.frontApplet.fileSystem.createDirectory(t.command.directoryPath);case 79:return e.t39=e.sent,e.t40={type:e.t38,result:e.t39},e.t37.dispatch.call(e.t37,e.t40),e.abrupt("break",131);case 83:return e.t41=this,e.t42=d.FileSystemCreateArchiveFileResult,e.next=87,this.frontApplet.fileSystem.createArchive(t.command.archiveFilePath,t.command.archiveEntries);case 87:return e.t43=e.sent,e.t44={type:e.t42,result:e.t43},e.t41.dispatch.call(e.t41,e.t44),e.abrupt("break",131);case 91:return e.t45=this,e.t46=d.FileSystemIsDirectoryResult,e.next=95,this.frontApplet.fileSystem.isDirectory(t.command.filePath);case 95:return e.t47=e.sent,e.t48={type:e.t46,result:e.t47},e.t45.dispatch.call(e.t45,e.t48),e.abrupt("break",131);case 99:return e.t49=this,e.t50=d.FileSystemCopyFileResult,e.next=103,this.frontApplet.fileSystem.copyFile(t.command.sourceFilePath,t.command.destinationFilePath,t.command.options);case 103:return e.t51=e.sent,e.t52={type:e.t50,result:e.t51},e.t49.dispatch.call(e.t49,e.t52),e.abrupt("break",131);case 107:return e.t53=this,e.t54=d.FileSystemWriteFileResult,e.next=111,this.frontApplet.fileSystem.writeFile(t.command.filePath,t.command.content);case 111:return e.t55=e.sent,e.t56={type:e.t54,result:e.t55},e.t53.dispatch.call(e.t53,e.t56),e.abrupt("break",131);case 115:return e.t57=this,e.t58=d.FileSystemAppendFileResult,e.next=119,this.frontApplet.fileSystem.appendFile(t.command.filePath,t.command.content);case 119:return e.t59=e.sent,e.t60={type:e.t58,result:e.t59},e.t57.dispatch.call(e.t57,e.t60),e.abrupt("break",131);case 123:return e.t61=this,e.t62=d.FileSystemReadFileResult,e.next=127,this.frontApplet.fileSystem.readFile(t.command.filePath);case 127:return e.t63=e.sent,e.t64={type:e.t62,data:e.t63},e.t61.dispatch.call(e.t61,e.t64),e.abrupt("break",131);case 131:case"end":return e.stop()}},e,this)}))})}},{key:"handleOfflineCacheFilesRequests",value:function(){var e=this;this.onCommand(function(t){return o(e,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.command.type,e.next=e.t0===f.OfflineCacheListFiles?3:e.t0===f.OfflineCacheLoadFile?11:e.t0===f.OfflineCacheGetChecksumRequest?19:e.t0===f.OfflineCacheValidateChecksumRequest?27:e.t0===f.OfflineCacheLoadOrSaveFileRequest?35:43;break;case 3:return e.t1=this,e.t2=f.OfflineCacheFilesListed,e.next=7,this.frontApplet.offline.cache.listFiles();case 7:return e.t3=e.sent,e.t4={type:e.t2,fileUids:e.t3},e.t1.dispatch.call(e.t1,e.t4),e.abrupt("break",43);case 11:return e.t5=this,e.t6=f.OfflineCacheFileLoaded,e.next=15,this.frontApplet.offline.cache.loadFile(t.command.uid);case 15:return e.t7=e.sent,e.t8={type:e.t6,file:e.t7},e.t5.dispatch.call(e.t5,e.t8),e.abrupt("break",43);case 19:return e.t9=this,e.t10=f.OfflineCacheGetChecksumResult,e.next=23,this.frontApplet.offline.cache.getChecksumFile(t.command.uid,t.command.hashType);case 23:return e.t11=e.sent,e.t12={type:e.t10,result:e.t11},e.t9.dispatch.call(e.t9,e.t12),e.abrupt("break",43);case 27:return e.t13=this,e.t14=f.OfflineCacheValidateChecksumResult,e.next=31,this.frontApplet.offline.cache.validateChecksumFile(t.command.uid,t.command.hash,t.command.hashType);case 31:return e.t15=e.sent,e.t16={type:e.t14,result:e.t15},e.t13.dispatch.call(e.t13,e.t16),e.abrupt("break",43);case 35:return e.t17=this,e.t18=f.OfflineCacheLoadOrSaveFileResult,e.next=39,this.frontApplet.offline.cache.loadOrSaveFile(t.command.uid,t.command.uri,t.command.headers);case 39:return e.t19=e.sent,e.t20={type:e.t18,file:e.t19},e.t17.dispatch.call(e.t17,e.t20),e.abrupt("break",43);case 43:case"end":return e.stop()}},e,this)}))})}},{key:"handleVideoStatesChanges",value:function(){var e=this;this.frontApplet.video.onPlay(function(t){e.dispatch(Object.assign({type:l.VideoStateChanged,state:"play"},t.srcArguments))}),this.frontApplet.video.onPrepare(function(t){e.dispatch(Object.assign({type:l.VideoStateChanged,state:"prepare"},t.srcArguments))}),this.frontApplet.video.onStop(function(t){e.dispatch(Object.assign({type:l.VideoStateChanged,state:"stop"},t.srcArguments))}),this.frontApplet.video.onPause(function(t){e.dispatch(Object.assign({type:l.VideoStateChanged,state:"pause"},t.srcArguments))}),this.frontApplet.video.onResume(function(t){e.dispatch(Object.assign({type:l.VideoStateChanged,state:"resume"},t.srcArguments))}),this.frontApplet.video.onEnded(function(t){e.dispatch(Object.assign({type:l.VideoStateChanged,state:"ended"},t.srcArguments))}),this.frontApplet.video.onError(function(t){e.dispatch(Object.assign({type:l.VideoStateChanged,state:"error"},t.srcArguments))})}}])&&i(t.prototype,n),h&&i(t,h),e}();t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DisableMonitoring=t.EnableMonitoring=void 0,t.EnableMonitoring="sos.Monitoring.EnableMonitoring",t.DisableMonitoring="sos.Monitoring.DisableMonitoring"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimingLoaded=void 0,t.TimingLoaded="sos.Monitoring.Timing.TimingLoaded"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HtmlSnapshotTaken=t.TakeHtmlSnapshot=void 0,t.TakeHtmlSnapshot="sos.Html.TakeHtmlSnapshot",t.HtmlSnapshotTaken="sos.Monitoring.Html.HtmlSnapshotTaken"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleLogged=void 0,t.ConsoleLogged="sos.Monitoring.Console.ConsoleLogged"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OfflineCacheLoadOrSaveFileResult=t.OfflineCacheLoadOrSaveFileRequest=t.OfflineCacheValidateChecksumResult=t.OfflineCacheValidateChecksumRequest=t.OfflineCacheGetChecksumResult=t.OfflineCacheGetChecksumRequest=t.OfflineCacheFileLoaded=t.OfflineCacheLoadFile=t.OfflineCacheFilesListed=t.OfflineCacheListFiles=void 0,t.OfflineCacheListFiles="sos.Monitoring.Offline.Cache.OfflineCacheListFiles",t.OfflineCacheFilesListed="sos.Monitoring.Offline.Cache.OfflineCacheFilesListed",t.OfflineCacheLoadFile="sos.Monitoring.Offline.Cache.OfflineCacheLoadFile",t.OfflineCacheFileLoaded="sos.Monitoring.Offline.Cache.OfflineCacheFileLoaded",t.OfflineCacheGetChecksumRequest="sos.Monitoring.Offline.Cache.OfflineCacheGetChecksumRequest",t.OfflineCacheGetChecksumResult="sos.Monitoring.Offline.Cache.OfflineCacheGetChecksumResult",t.OfflineCacheValidateChecksumRequest="sos.Monitoring.Offline.Cache.OfflineCacheValidateChecksumRequest",t.OfflineCacheValidateChecksumResult="sos.Monitoring.Offline.Cache.OfflineCacheValidateChecksumResult",t.OfflineCacheLoadOrSaveFileRequest="sos.Monitoring.Offline.Cache.OfflineCacheLoadOrSaveFileRequest",t.OfflineCacheLoadOrSaveFileResult="sos.Monitoring.Offline.Cache.OfflineCacheLoadOrSaveFileResult"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VideoStateChanged=void 0,t.VideoStateChanged="sos.Monitoring.Video.VideoStateChanged"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemAppendFileResult=t.FileSystemAppendFileRequest=t.FileSystemGetFileResult=t.FileSystemGetFileRequest=t.FileSystemExtractFileResult=t.FileSystemCreateArchiveFileResult=t.FileSystemCreateArchiveFileRequest=t.FileSystemExtractFileRequest=t.FileSystemGetFileChecksumResult=t.FileSystemGetFileChecksumRequest=t.FileSystemCopyFileResult=t.FileSystemCopyFileRequest=t.FileSystemMoveFileResult=t.FileSystemMoveFileRequest=t.FileSystemReadFileResult=t.FileSystemReadFileRequest=t.FileSystemWriteFileResult=t.FileSystemWriteFileRequest=t.FileSystemDownloadFileResult=t.FileSystemDownloadFileRequest=t.FileSystemCreateDirectoryResult=t.FileSystemCreateDirectoryRequest=t.FileSystemDeleteFileResult=t.FileSystemDeleteFileRequest=t.FileSystemExistsResult=t.FileSystemExistsRequest=t.FileSystemIsDirectoryResult=t.FileSystemIsDirectoryRequest=t.FileSystemListFilesResult=t.FileSystemListFilesRequest=t.FileSystemListOfStorageUnitsResult=t.FileSystemListOfStorageUnitsRequest=void 0,t.FileSystemListOfStorageUnitsRequest="sos.Monitoring.FileSystem.FileSystemListOfStorageUnitsRequest",t.FileSystemListOfStorageUnitsResult="sos.Monitoring.FileSystem.FileSystemListOfStorageUnitsResult",t.FileSystemListFilesRequest="sos.Monitoring.FileSystem.FileSystemListFilesRequest",t.FileSystemListFilesResult="sos.Monitoring.FileSystem.FileSystemListFilesResult",t.FileSystemIsDirectoryRequest="sos.Monitoring.FileSystem.FileSystemIsDirectoryRequest",t.FileSystemIsDirectoryResult="sos.Monitoring.FileSystem.FileSystemIsDirectoryResult",t.FileSystemExistsRequest="sos.Monitoring.FileSystem.FileSystemExistsRequest",t.FileSystemExistsResult="sos.Monitoring.FileSystem.FileSystemExistsResult",t.FileSystemDeleteFileRequest="sos.Monitoring.FileSystem.FileSystemDeleteFileRequest",t.FileSystemDeleteFileResult="sos.Monitoring.FileSystem.FileSystemDeleteFileResult",t.FileSystemCreateDirectoryRequest="sos.Monitoring.FileSystem.FileSystemCreateDirectoryRequest",t.FileSystemCreateDirectoryResult="sos.Monitoring.FileSystem.FileSystemCreateDirectoryResult",t.FileSystemDownloadFileRequest="sos.Monitoring.FileSystem.FileSystemDownloadFileRequest",t.FileSystemDownloadFileResult="sos.Monitoring.FileSystem.FileSystemDownloadFileResult",t.FileSystemWriteFileRequest="sos.Monitoring.FileSystem.FileSystemWriteFileRequest",t.FileSystemWriteFileResult="sos.Monitoring.FileSystem.FileSystemWriteFileResult",t.FileSystemReadFileRequest="sos.Monitoring.FileSystem.FileSystemReadFileRequest",t.FileSystemReadFileResult="sos.Monitoring.FileSystem.FileSystemReadFileResult",t.FileSystemMoveFileRequest="sos.Monitoring.FileSystem.FileSystemMoveFileRequest",t.FileSystemMoveFileResult="sos.Monitoring.FileSystem.FileSystemMoveFileResult",t.FileSystemCopyFileRequest="sos.Monitoring.FileSystem.FileSystemCopyFileRequest",t.FileSystemCopyFileResult="sos.Monitoring.FileSystem.FileSystemCopyFileResult",t.FileSystemGetFileChecksumRequest="sos.Monitoring.FileSystem.FileSystemGetFileChecksumRequest",t.FileSystemGetFileChecksumResult="sos.Monitoring.FileSystem.FileSystemGetFileChecksumResult",t.FileSystemExtractFileRequest="sos.Monitoring.FileSystem.FileSystemExtractFileRequest",t.FileSystemCreateArchiveFileRequest="sos.Monitoring.FileSystem.FileSystemCreateArchiveFileRequest",t.FileSystemCreateArchiveFileResult="sos.Monitoring.FileSystem.FileSystemCreateArchiveFileResult",t.FileSystemExtractFileResult="sos.Monitoring.FileSystem.FileSystemExtractFileResult",t.FileSystemGetFileRequest="sos.Monitoring.FileSystem.FileSystemGetFileRequest",t.FileSystemGetFileResult="sos.Monitoring.FileSystem.FileSystemGetFileResult",t.FileSystemAppendFileRequest="sos.Monitoring.FileSystem.FileSystemAppendFileRequest",t.FileSystemAppendFileResult="sos.Monitoring.FileSystem.FileSystemAppendFileResult"}])});
8
+ var r=n(381),i=n(382),o=n(163);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return u(this,e,t,n)}function u(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=d(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),i=(e=s(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|h(t.length);return 0===(e=s(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):d(e,t);if("Buffer"===t.type&&o(t.data))return d(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t){if(f(t),e=s(e,t<0?0:0|h(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|h(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function h(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return B(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return M(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var f=-1;for(o=n;o<s;o++)if(u(e,o)===u(t,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===c)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(n+c>s&&(n=s-c),o=n;o>=0;o--){for(var l=!0,d=0;d<c;d++)if(u(e,o+d)!==u(t,d)){l=!1;break}if(l)return o}return-1}function y(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function w(e,t,n,r){return U(B(t,e.length-n),e,n,r)}function _(e,t,n,r){return U(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function S(e,t,n,r){return _(e,t,n,r)}function k(e,t,n,r){return U(H(t),e,n,r)}function E(e,t,n,r){return U(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function x(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function M(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,c,u=e[i],f=null,l=u>239?4:u>223?3:u>191?2:1;if(i+l<=n)switch(l){case 1:u<128&&(f=u);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&u)<<6|63&o)>127&&(f=c);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(c=(15&u)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(f=c);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(f=c)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),i+=l}return function(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=I));return n}(r)}t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return u(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,r){return f(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return l(null,e)},c.allocUnsafeSlow=function(e){return l(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=c.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},c.byteLength=p,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?M(this,0,e):m.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,r,i){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(r,i),f=e.slice(t,n),l=0;l<s;++l)if(u[l]!==f[l]){o=u[l],a=f[l];break}return o<a?-1:a<o?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return _(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function R(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function P(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=q(e[o]);return i}function O(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function j(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function A(e,t,n,r,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function T(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function F(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(e,t,n,r,o){return o||F(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,o){return o||F(e,0,n,8),i.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var i=t-e;n=new c(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},c.prototype.readUInt8=function(e,t){return t||j(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||j(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||j(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||j(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||j(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||j(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||j(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||j(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||j(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||A(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||A(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=c.isBuffer(e)?e:B(new c(e,r).toString()),s=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var W=/[^+\/0-9A-Za-z-_]/g;function q(e){return e<16?"0"+e.toString(16):e.toString(16)}function B(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(38))},function(e,t,n){var r=n(27),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){var n=e.exports={version:"2.6.9"};"number"==typeof __e&&(__e=n)},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a=n(418).Buffer}catch(e){}function s(e,t,n){for(var r=0,i=Math.min(e.length,n),o=t;o<i;o++){var a=e.charCodeAt(o)-48;r<<=4,r|=a>=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function c(e,t,n,r){for(var i=0,o=Math.min(e.length,n),a=t;a<o;a++){var s=e.charCodeAt(a)-48;i*=r,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===n)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var r,i,o=0;for(n=e.length-6,r=0;n>=t;n-=6)i=s(e,n,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==t&&(i=s(e,t,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,s=Math.min(o,o-a)+n,u=0,f=n;f<s;f+=r)u=c(e,f,f+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var l=1;for(u=c(e,f,e.length,t),f=0;f<a;f++)l*=t;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;n.words[0]=s;for(var u=1;u<r;u++){for(var f=c>>>26,l=67108863&c,d=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=d;h++){var p=u-h|0;f+=(a=(i=0|e.words[p])*(o=0|t.words[h])+l)/67108864|0,l=67108863&a}n.words[u]=0|l,c=0|f}return 0!==c?n.words[u]=0|c:n.length--,n.strip()}o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],c=(16777215&(s<<i|o)).toString(16);n=0!==(o=s>>>24-i&16777215)||a!==this.length-1?u[6-c.length]+c+n:c+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var d=f[e],h=l[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(e);n=(p=p.idivn(h)).isZero()?m+n:u[d-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return r(void 0!==a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===t,u=new e(o),f=this.clone();if(c){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),u[s]=a;for(;s<o;s++)u[s]=0}else{for(s=0;s<o-i;s++)u[s]=0;for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),u[o-s-1]=a}return u},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},o.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a<r.length;a++)o=(t=(0|n.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<n.length;a++)o=(t=(0|n.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var h=function(e,t,n){var r,i,o,a=e.words,s=t.words,c=n.words,u=0,f=0|a[0],l=8191&f,d=f>>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],b=8191&g,v=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,S=0|a[4],k=8191&S,E=S>>>13,x=0|a[5],M=8191&x,I=x>>>13,C=0|a[6],R=8191&C,P=C>>>13,O=0|a[7],j=8191&O,A=O>>>13,T=0|a[8],N=8191&T,F=T>>>13,D=0|a[9],L=8191&D,W=D>>>13,q=0|s[0],B=8191&q,H=q>>>13,U=0|s[1],V=8191&U,G=U>>>13,z=0|s[2],X=8191&z,Y=z>>>13,K=0|s[3],J=8191&K,$=K>>>13,Z=0|s[4],Q=8191&Z,ee=Z>>>13,te=0|s[5],ne=8191&te,re=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,fe=0|s[8],le=8191&fe,de=fe>>>13,he=0|s[9],pe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(l,B))|0)+((8191&(i=(i=Math.imul(l,H))+Math.imul(d,B)|0))<<13)|0;u=((o=Math.imul(d,H))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,B),i=(i=Math.imul(p,H))+Math.imul(m,B)|0,o=Math.imul(m,H);var be=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(i=(i=i+Math.imul(l,G)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,B),i=(i=Math.imul(b,H))+Math.imul(v,B)|0,o=Math.imul(v,H),r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,G)|0;var ve=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(w,B),i=(i=Math.imul(w,H))+Math.imul(_,B)|0,o=Math.imul(_,H),r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,G)|0,r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Y)|0;var ye=(u+(r=r+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,$)|0)+Math.imul(d,J)|0))<<13)|0;u=((o=o+Math.imul(d,$)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(k,B),i=(i=Math.imul(k,H))+Math.imul(E,B)|0,o=Math.imul(E,H),r=r+Math.imul(w,V)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(b,X)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,Y)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,$)|0;var we=(u+(r=r+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(d,Q)|0))<<13)|0;u=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,B),i=(i=Math.imul(M,H))+Math.imul(I,B)|0,o=Math.imul(I,H),r=r+Math.imul(k,V)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,X)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(b,J)|0,i=(i=i+Math.imul(b,$)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,$)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var _e=(u+(r=r+Math.imul(l,ne)|0)|0)+((8191&(i=(i=i+Math.imul(l,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(R,B),i=(i=Math.imul(R,H))+Math.imul(P,B)|0,o=Math.imul(P,H),r=r+Math.imul(M,V)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(k,X)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,$)|0,r=r+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0;var Se=(u+(r=r+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ae)|0)+Math.imul(d,oe)|0))<<13)|0;u=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,B),i=(i=Math.imul(j,H))+Math.imul(A,B)|0,o=Math.imul(A,H),r=r+Math.imul(R,V)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,G)|0,r=r+Math.imul(M,X)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,Y)|0,r=r+Math.imul(k,J)|0,i=(i=i+Math.imul(k,$)|0)+Math.imul(E,J)|0,o=o+Math.imul(E,$)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(v,ne)|0,o=o+Math.imul(v,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var ke=(u+(r=r+Math.imul(l,ce)|0)|0)+((8191&(i=(i=i+Math.imul(l,ue)|0)+Math.imul(d,ce)|0))<<13)|0;u=((o=o+Math.imul(d,ue)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(N,B),i=(i=Math.imul(N,H))+Math.imul(F,B)|0,o=Math.imul(F,H),r=r+Math.imul(j,V)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(R,X)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,Y)|0,r=r+Math.imul(M,J)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,$)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(_,ne)|0,o=o+Math.imul(_,re)|0,r=r+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,r=r+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,ce)|0,o=o+Math.imul(m,ue)|0;var Ee=(u+(r=r+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,de)|0)+Math.imul(d,le)|0))<<13)|0;u=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(L,B),i=(i=Math.imul(L,H))+Math.imul(W,B)|0,o=Math.imul(W,H),r=r+Math.imul(N,V)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(F,V)|0,o=o+Math.imul(F,G)|0,r=r+Math.imul(j,X)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,Y)|0,r=r+Math.imul(R,J)|0,i=(i=i+Math.imul(R,$)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,$)|0,r=r+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,ee)|0,r=r+Math.imul(k,ne)|0,i=(i=i+Math.imul(k,re)|0)+Math.imul(E,ne)|0,o=o+Math.imul(E,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,r=r+Math.imul(b,ce)|0,i=(i=i+Math.imul(b,ue)|0)+Math.imul(v,ce)|0,o=o+Math.imul(v,ue)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,de)|0;var xe=(u+(r=r+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,me)|0)+Math.imul(d,pe)|0))<<13)|0;u=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,V),i=(i=Math.imul(L,G))+Math.imul(W,V)|0,o=Math.imul(W,G),r=r+Math.imul(N,X)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(F,X)|0,o=o+Math.imul(F,Y)|0,r=r+Math.imul(j,J)|0,i=(i=i+Math.imul(j,$)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,$)|0,r=r+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,r=r+Math.imul(M,ne)|0,i=(i=i+Math.imul(M,re)|0)+Math.imul(I,ne)|0,o=o+Math.imul(I,re)|0,r=r+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,ae)|0,r=r+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(_,ce)|0,o=o+Math.imul(_,ue)|0,r=r+Math.imul(b,le)|0,i=(i=i+Math.imul(b,de)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,de)|0;var Me=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,X),i=(i=Math.imul(L,Y))+Math.imul(W,X)|0,o=Math.imul(W,Y),r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,$)|0)+Math.imul(F,J)|0,o=o+Math.imul(F,$)|0,r=r+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(P,ne)|0,o=o+Math.imul(P,re)|0,r=r+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,r=r+Math.imul(k,ce)|0,i=(i=i+Math.imul(k,ue)|0)+Math.imul(E,ce)|0,o=o+Math.imul(E,ue)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,de)|0;var Ie=(u+(r=r+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,me)|0)+Math.imul(v,pe)|0))<<13)|0;u=((o=o+Math.imul(v,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(L,J),i=(i=Math.imul(L,$))+Math.imul(W,J)|0,o=Math.imul(W,$),r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(F,Q)|0,o=o+Math.imul(F,ee)|0,r=r+Math.imul(j,ne)|0,i=(i=i+Math.imul(j,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(R,oe)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,r=r+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(I,ce)|0,o=o+Math.imul(I,ue)|0,r=r+Math.imul(k,le)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(E,le)|0,o=o+Math.imul(E,de)|0;var Ce=(u+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;u=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(L,Q),i=(i=Math.imul(L,ee))+Math.imul(W,Q)|0,o=Math.imul(W,ee),r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(F,ne)|0,o=o+Math.imul(F,re)|0,r=r+Math.imul(j,oe)|0,i=(i=i+Math.imul(j,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,r=r+Math.imul(R,ce)|0,i=(i=i+Math.imul(R,ue)|0)+Math.imul(P,ce)|0,o=o+Math.imul(P,ue)|0,r=r+Math.imul(M,le)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,de)|0;var Re=(u+(r=r+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(E,pe)|0))<<13)|0;u=((o=o+Math.imul(E,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(L,ne),i=(i=Math.imul(L,re))+Math.imul(W,ne)|0,o=Math.imul(W,re),r=r+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(F,oe)|0,o=o+Math.imul(F,ae)|0,r=r+Math.imul(j,ce)|0,i=(i=i+Math.imul(j,ue)|0)+Math.imul(A,ce)|0,o=o+Math.imul(A,ue)|0,r=r+Math.imul(R,le)|0,i=(i=i+Math.imul(R,de)|0)+Math.imul(P,le)|0,o=o+Math.imul(P,de)|0;var Pe=(u+(r=r+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,me)|0)+Math.imul(I,pe)|0))<<13)|0;u=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,oe),i=(i=Math.imul(L,ae))+Math.imul(W,oe)|0,o=Math.imul(W,ae),r=r+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(F,ce)|0,o=o+Math.imul(F,ue)|0,r=r+Math.imul(j,le)|0,i=(i=i+Math.imul(j,de)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,de)|0;var Oe=(u+(r=r+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(P,pe)|0))<<13)|0;u=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(L,ce),i=(i=Math.imul(L,ue))+Math.imul(W,ce)|0,o=Math.imul(W,ue),r=r+Math.imul(N,le)|0,i=(i=i+Math.imul(N,de)|0)+Math.imul(F,le)|0,o=o+Math.imul(F,de)|0;var je=(u+(r=r+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,me)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,le),i=(i=Math.imul(L,de))+Math.imul(W,le)|0,o=Math.imul(W,de);var Ae=(u+(r=r+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(F,pe)|0))<<13)|0;u=((o=o+Math.imul(F,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863;var Te=(u+(r=Math.imul(L,pe))|0)+((8191&(i=(i=Math.imul(L,me))+Math.imul(W,pe)|0))<<13)|0;return u=((o=Math.imul(W,me))+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,c[0]=ge,c[1]=be,c[2]=ve,c[3]=ye,c[4]=we,c[5]=_e,c[6]=Se,c[7]=ke,c[8]=Ee,c[9]=xe,c[10]=Me,c[11]=Ie,c[12]=Ce,c[13]=Re,c[14]=Pe,c[15]=Oe,c[16]=je,c[17]=Ae,c[18]=Te,0!==u&&(c[19]=u,n.length++),n};function p(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(h=d),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?h(this,e,t):n<63?d(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var a=i;i=0;for(var s=67108863&r,c=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=c;u++){var f=o-u,l=(0|e.words[f])*(0|t.words[u]),d=67108863&l;s=67108863&(d=d+s|0),i+=(a=(a=a+(l/67108864|0)|0)+(d>>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,e,t):p(this,e,t)},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},m.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},m.prototype.permute=function(e,t,n,r,i,o){for(var a=0;a<o;a++)r[a]=t[e[a]],i[a]=n[e[a]]},m.prototype.transform=function(e,t,n,r,i,o){this.permute(o,e,t,n,r,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,c=Math.cos(2*Math.PI/s),u=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var l=c,d=u,h=0;h<a;h++){var p=n[f+h],m=r[f+h],g=n[f+h+a],b=r[f+h+a],v=l*g-d*b;b=l*b+d*g,g=v,n[f+h]=p+g,r[f+h]=m+b,n[f+h+a]=p-g,r[f+h+a]=m-b,h!==s&&(v=c*l-u*d,d=c*d+u*l,l=v)}},m.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},m.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},m.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,n,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],n[2*a]=8191&o,o>>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)n[a]=0;r(0===o),r(0==(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},m.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),o=this.stub(r),a=new Array(r),s=new Array(r),c=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,a,r),this.convert13b(t.words,t.length,u,r),this.transform(a,o,s,c,r,i),this.transform(u,o,f,l,r,i);for(var h=0;h<r;h++){var p=s[h]*f[h]-c[h]*l[h];c[h]=s[h]*l[h]+c[h]*f[h],s[h]=p}return this.conjugate(s,c,r),this.transform(s,c,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),p(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,c=(0|this.words[t])-s<<n;this.words[t]=c|a,a=s>>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,c=n;if(i-=a,i=Math.max(0,i),c){for(var u=0;u<a;u++)c.words[u]=this.words[u];c.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=i);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&s}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n)&&!!(this.words[n]&i)},o.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,n){var i,o,a=e.length+n;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+n])+s;var c=(0|e.words[i])*t;s=((o-=67108863&c)>>26)-(c/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)s=(o=(0|this.words[i+n])+s)>>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,c=r.length-i.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var f=r.clone()._ishlnsubmul(i,1,c);0===f.negative&&(r=f,s&&(s.words[c]=1));for(var l=c-1;l>=0;l--){var d=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(d=Math.min(d/a|0,67108863),r._ishlnsubmul(i,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);s&&(s.words[l]=d)}return s&&s.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},o.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var f=n.clone(),l=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(f),c.isub(l)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s),a.isub(c)):(n.isub(t),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:n.iushln(u)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,f=1;0==(t.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var l=0,d=1;0==(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,a=n;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n.strip(),n},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(v,b),v.prototype.split=function(e,t){for(var n=Math.min(e.length,9),r=0;r<n;r++)t.words[r]=e.words[r];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,r=10;r<e.length;r++){var o=0|e.words[r];e.words[r-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(y,b),i(w,b),i(_,b),_.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new y;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return g[e]=t,t},S.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var l=this.pow(f,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g<p);var b=this.pow(l,new o(1).iushln(p-g-1));d=d.redMul(b),l=b.redSqr(),h=h.redMul(l),p=g}return d},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],a=0,s=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],f=c-1;f>=0;f--){var l=u>>f&1;i!==n[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===r&&0===f)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}c=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},i(k,S),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(182)(e))},function(e,t,n){e.exports=!n(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(5),i=n(130),o=n(36),a=Object.defineProperty;t.f=n(13)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function f(e,t,n,r){var i,o,a,s;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=u(e))>0&&a.length>i&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function l(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,o(this.listener,this.target,e))}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function h(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var u=c.length,f=m(c,u);for(n=0;n<u;++n)o(f[n],this,t)}return!0},s.prototype.addListener=function(e,t){return f(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return f(this,e,t,!0)},s.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,d(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,d(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,o,a;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);if(void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){var r=n(33);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(3),i=n(20),o=n(19),a=n(42)("src"),s=n(209),c=(""+s).split("toString");n(11).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var u="function"==typeof n;u&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(u&&(o(n,a)||i(n,a,e[t]?""+e[t]:c.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||s.call(this)})},function(e,t,n){var r=n(0),i=n(4),o=n(33),a=/"/g,s=function(e,t,n,r){var i=String(o(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,"&quot;")+'"'),s+">"+i+"</"+t+">"};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*i(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(14),i=n(41);e.exports=n(13)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(62),i=n(33);e.exports=function(e){return r(i(e))}},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t,n){"use strict";var r=t,i=n(12),o=n(22),a=n(184);r.assert=o,r.toArray=a.toArray,r.zero2=a.zero2,r.toHex=a.toHex,r.encode=a.encode,r.getNAF=function(e,t){for(var n=[],r=1<<t+1,i=e.clone();i.cmpn(1)>=0;){var o;if(i.isOdd()){var a=i.andln(r-1);o=a>(r>>1)-1?(r>>1)-a:a,i.isubn(o)}else o=0;n.push(o);for(var s=0!==i.cmpn(0)&&0===i.andln(r-1)?t+1:1,c=1;c<s;c++)n.push(0);i.iushrn(s)}return n},r.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r=0,i=0;e.cmpn(-r)>0||t.cmpn(-i)>0;){var o,a,s,c=e.andln(3)+r&3,u=t.andln(3)+i&3;if(3===c&&(c=-1),3===u&&(u=-1),0==(1&c))o=0;else o=3!==(s=e.andln(7)+r&7)&&5!==s||2!==u?c:-c;if(n[0].push(o),0==(1&u))a=0;else a=3!==(s=t.andln(7)+i&7)&&5!==s||2!==c?u:-u;n[1].push(a),2*r===o+1&&(r=1-r),2*i===a+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return n},r.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new i(e,"hex","le")}},function(e,t,n){"use strict";var r=n(4);e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t,n){var r=n(26);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(63),i=n(41),o=n(21),a=n(36),s=n(19),c=n(130),u=Object.getOwnPropertyDescriptor;t.f=n(13)?u:function(e,t){if(e=o(e),t=a(t,!0),c)try{return u(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(0),i=n(11),o=n(4);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(e,t,n){var r=n(25),i=n(62),o=n(16),a=n(10),s=n(146);e.exports=function(e,t){var n=1==e,c=2==e,u=3==e,f=4==e,l=6==e,d=5==e||l,h=t||s;return function(t,s,p){for(var m,g,b=o(t),v=i(b),y=r(s,p,3),w=a(v.length),_=0,S=n?h(t,w):c?h(t,0):void 0;w>_;_++)if((d||_ in v)&&(g=y(m=v[_],_,b),e))if(n)S[_]=g;else if(g)switch(e){case 3:return!0;case 5:return m;case 6:return _;case 2:S.push(m)}else if(f)return!1;return l?-1:u||f?f:S}}},function(e,t,n){"use strict";var r=n(22),i=n(1);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(var r=0,i=0;i<e.length;i++){var a=e.charCodeAt(i);a<128?n[r++]=a:a<2048?(n[r++]=a>>6|192,n[r++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),n[r++]=a>>18|240,n[r++]=a>>12&63|128,n[r++]=a>>6&63|128,n[r++]=63&a|128):(n[r++]=a>>12|224,n[r++]=a>>6&63|128,n[r++]=63&a|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=s(e[n].toString(16));return t},t.htonl=a,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=a(i)),n+=c(i.toString(16))}return n},t.zero2=s,t.zero8=c,t.join32=function(e,t,n,i){var o=n-t;r(o%4==0);for(var a=new Array(o/4),s=0,c=t;s<a.length;s++,c+=4){var u;u="big"===i?e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]:e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c],a[s]=u>>>0}return a},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var o=e[r];"big"===t?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},t.sum64=function(e,t,n,r){var i=e[t],o=r+e[t+1]>>>0,a=(o<r?1:0)+n+i;e[t]=a>>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,i,o,a,s){var c=0,u=t;return c+=(u=u+r>>>0)<t?1:0,c+=(u=u+o>>>0)<o?1:0,e+n+i+a+(c+=(u=u+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,i,o,a,s){return t+r+o+s>>>0},t.sum64_5_hi=function(e,t,n,r,i,o,a,s,c,u){var f=0,l=t;return f+=(l=l+r>>>0)<t?1:0,f+=(l=l+o>>>0)<o?1:0,f+=(l=l+s>>>0)<s?1:0,e+n+i+a+c+(f+=(l=l+u>>>0)<u?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,i,o,a,s,c,u){return t+r+o+s+u>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";if(n(13)){var r=n(43),i=n(3),o=n(4),a=n(0),s=n(83),c=n(112),u=n(25),f=n(57),l=n(41),d=n(20),h=n(58),p=n(27),m=n(10),g=n(157),b=n(45),v=n(36),y=n(19),w=n(64),_=n(6),S=n(16),k=n(104),E=n(46),x=n(48),M=n(47).f,I=n(106),C=n(42),R=n(8),P=n(30),O=n(73),j=n(65),A=n(108),T=n(55),N=n(76),F=n(56),D=n(107),L=n(148),W=n(14),q=n(28),B=W.f,H=q.f,U=i.RangeError,V=i.TypeError,G=i.Uint8Array,z=Array.prototype,X=c.ArrayBuffer,Y=c.DataView,K=P(0),J=P(2),$=P(3),Z=P(4),Q=P(5),ee=P(6),te=O(!0),ne=O(!1),re=A.values,ie=A.keys,oe=A.entries,ae=z.lastIndexOf,se=z.reduce,ce=z.reduceRight,ue=z.join,fe=z.sort,le=z.slice,de=z.toString,he=z.toLocaleString,pe=R("iterator"),me=R("toStringTag"),ge=C("typed_constructor"),be=C("def_constructor"),ve=s.CONSTR,ye=s.TYPED,we=s.VIEW,_e=P(1,function(e,t){return Me(j(e,e[be]),t)}),Se=o(function(){return 1===new G(new Uint16Array([1]).buffer)[0]}),ke=!!G&&!!G.prototype.set&&o(function(){new G(1).set({})}),Ee=function(e,t){var n=p(e);if(n<0||n%t)throw U("Wrong offset!");return n},xe=function(e){if(_(e)&&ye in e)return e;throw V(e+" is not a typed array!")},Me=function(e,t){if(!(_(e)&&ge in e))throw V("It is not a typed array constructor!");return new e(t)},Ie=function(e,t){return Ce(j(e,e[be]),t)},Ce=function(e,t){for(var n=0,r=t.length,i=Me(e,r);r>n;)i[n]=t[n++];return i},Re=function(e,t,n){B(e,t,{get:function(){return this._d[n]}})},Pe=function(e){var t,n,r,i,o,a,s=S(e),c=arguments.length,f=c>1?arguments[1]:void 0,l=void 0!==f,d=I(s);if(null!=d&&!k(d)){for(a=d.call(s),r=[],t=0;!(o=a.next()).done;t++)r.push(o.value);s=r}for(l&&c>2&&(f=u(f,arguments[2],2)),t=0,n=m(s.length),i=Me(this,n);n>t;t++)i[t]=l?f(s[t],t):s[t];return i},Oe=function(){for(var e=0,t=arguments.length,n=Me(this,t);t>e;)n[e]=arguments[e++];return n},je=!!G&&o(function(){he.call(new G(1))}),Ae=function(){return he.apply(je?le.call(xe(this)):xe(this),arguments)},Te={copyWithin:function(e,t){return L.call(xe(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return Z(xe(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return D.apply(xe(this),arguments)},filter:function(e){return Ie(this,J(xe(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Q(xe(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(xe(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){K(xe(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(xe(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(xe(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ue.apply(xe(this),arguments)},lastIndexOf:function(e){return ae.apply(xe(this),arguments)},map:function(e){return _e(xe(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return se.apply(xe(this),arguments)},reduceRight:function(e){return ce.apply(xe(this),arguments)},reverse:function(){for(var e,t=xe(this).length,n=Math.floor(t/2),r=0;r<n;)e=this[r],this[r++]=this[--t],this[t]=e;return this},some:function(e){return $(xe(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return fe.call(xe(this),e)},subarray:function(e,t){var n=xe(this),r=n.length,i=b(e,r);return new(j(n,n[be]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,m((void 0===t?r:b(t,r))-i))}},Ne=function(e,t){return Ie(this,le.call(xe(this),e,t))},Fe=function(e){xe(this);var t=Ee(arguments[1],1),n=this.length,r=S(e),i=m(r.length),o=0;if(i+t>n)throw U("Wrong length!");for(;o<i;)this[t+o]=r[o++]},De={entries:function(){return oe.call(xe(this))},keys:function(){return ie.call(xe(this))},values:function(){return re.call(xe(this))}},Le=function(e,t){return _(e)&&e[ye]&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},We=function(e,t){return Le(e,t=v(t,!0))?l(2,e[t]):H(e,t)},qe=function(e,t,n){return!(Le(e,t=v(t,!0))&&_(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?B(e,t,n):(e[t]=n.value,e)};ve||(q.f=We,W.f=qe),a(a.S+a.F*!ve,"Object",{getOwnPropertyDescriptor:We,defineProperty:qe}),o(function(){de.call({})})&&(de=he=function(){return ue.call(this)});var Be=h({},Te);h(Be,De),d(Be,pe,De.values),h(Be,{slice:Ne,set:Fe,constructor:function(){},toString:de,toLocaleString:Ae}),Re(Be,"buffer","b"),Re(Be,"byteOffset","o"),Re(Be,"byteLength","l"),Re(Be,"length","e"),B(Be,me,{get:function(){return this[ye]}}),e.exports=function(e,t,n,c){var u=e+((c=!!c)?"Clamped":"")+"Array",l="get"+e,h="set"+e,p=i[u],b=p||{},v=p&&x(p),y=!p||!s.ABV,S={},k=p&&p.prototype,I=function(e,n){B(e,n,{get:function(){return function(e,n){var r=e._d;return r.v[l](n*t+r.o,Se)}(this,n)},set:function(e){return function(e,n,r){var i=e._d;c&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[h](n*t+i.o,r,Se)}(this,n,e)},enumerable:!0})};y?(p=n(function(e,n,r,i){f(e,p,u,"_d");var o,a,s,c,l=0,h=0;if(_(n)){if(!(n instanceof X||"ArrayBuffer"==(c=w(n))||"SharedArrayBuffer"==c))return ye in n?Ce(p,n):Pe.call(p,n);o=n,h=Ee(r,t);var b=n.byteLength;if(void 0===i){if(b%t)throw U("Wrong length!");if((a=b-h)<0)throw U("Wrong length!")}else if((a=m(i)*t)+h>b)throw U("Wrong length!");s=a/t}else s=g(n),o=new X(a=s*t);for(d(e,"_d",{b:o,o:h,l:a,e:s,v:new Y(o)});l<s;)I(e,l++)}),k=p.prototype=E(Be),d(k,"constructor",p)):o(function(){p(1)})&&o(function(){new p(-1)})&&N(function(e){new p,new p(null),new p(1.5),new p(e)},!0)||(p=n(function(e,n,r,i){var o;return f(e,p,u),_(n)?n instanceof X||"ArrayBuffer"==(o=w(n))||"SharedArrayBuffer"==o?void 0!==i?new b(n,Ee(r,t),i):void 0!==r?new b(n,Ee(r,t)):new b(n):ye in n?Ce(p,n):Pe.call(p,n):new b(g(n))}),K(v!==Function.prototype?M(b).concat(M(v)):M(b),function(e){e in p||d(p,e,b[e])}),p.prototype=k,r||(k.constructor=p));var C=k[pe],R=!!C&&("values"==C.name||null==C.name),P=De.values;d(p,ge,!0),d(k,ye,u),d(k,we,!0),d(k,be,p),(c?new p(1)[me]==u:me in k)||B(k,me,{get:function(){return u}}),S[u]=p,a(a.G+a.W+a.F*(p!=b),S),a(a.S,u,{BYTES_PER_ELEMENT:t}),a(a.S+a.F*o(function(){b.of.call(p,1)}),u,{from:Pe,of:Oe}),"BYTES_PER_ELEMENT"in k||d(k,"BYTES_PER_ELEMENT",t),a(a.P,u,Te),F(u),a(a.P+a.F*ke,u,{set:Fe}),a(a.P+a.F*!R,u,De),r||k.toString==de||(k.toString=de),a(a.P+a.F*o(function(){new p(1).slice()}),u,{slice:Ne}),a(a.P+a.F*(o(function(){return[1,2].toLocaleString()!=new p([1,2]).toLocaleString()})||!o(function(){k.toLocaleString.call([1,2])})),u,{toLocaleString:Ae}),T[u]=R?C:P,r||R||d(k,pe,P)}}else e.exports=function(){}},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,u=[],f=!1,l=-1;function d(){f&&c&&(f=!1,c.length?u=c.concat(u):l=-1,u.length&&h())}function h(){if(!f){var e=s(d);f=!0;for(var t=u.length;t;){for(c=u,u=[];++l<t;)c&&c[l].run();l=-1,t=u.length}c=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||f||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){var r=n(6);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(42)("meta"),i=n(6),o=n(19),a=n(14).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(4)(function(){return c(Object.preventExtensions({}))}),f=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},l=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!c(e))return"F";if(!t)return"E";f(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!c(e))return!0;if(!t)return!1;f(e)}return e[r].w},onFreeze:function(e){return u&&l.NEED&&c(e)&&!o(e,r)&&f(e),e}}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(2).Buffer,i=n(60).Transform,o=n(116).StringDecoder;function a(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(1)(a,i),a.prototype.update=function(e,t,n){"string"==typeof e&&(e=r.from(e,t));var i=this._update(e);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,n){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){r=e}finally{n(r)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return n&&(r+=this._decoder.end()),r},e.exports=a},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.UNEXPECTED_EXCEPTION="UNEXPECTED_EXCEPTION",e.FILE_IS_NOT_JS_OBJECT="40101",e.FILE_DOES_NOT_HAVE_UID="40102",e.FILE_FLAGS_ARE_NOT_IN_ARRAY="40103",e.FILE_FLAG_IS_NOT_OBJECT="40104",e.COMMAND_TYPE_NOT_VALID="40401",e.COMMAND_TYPE_IS_TOO_LONG="40402",e.HARDWARE_LED_COLOR_IS_NOT_STRING="40601",e.HARDWARE_LED_COLOR_IS_NOT_VALID="40602",e.FILE_NOT_FOUND_IN_CACHE="49902",e.OFFLINE_CACHE_UID_NOT_VALID="40901",e.OFFLINE_CACHE_HEADERS_NOT_VALID="40902",e.STREAM_INVALID_PROTOCOL_TYPE="41401",e.VIDEO_WAS_NOT_PLAYED_YET="41501",e.VIDEO_WAS_STOPPED_ALREADY="41502",e.SECURITY_PIN_CODE_INVALID="41701"}(r||(r={})),t.default=r},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports=!1},function(e,t,n){var r=n(132),i=n(91);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(27),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},function(e,t,n){var r=n(5),i=n(133),o=n(91),a=n(90)("IE_PROTO"),s=function(){},c=function(){var e,t=n(88)("iframe"),r=o.length;for(t.style.display="none",n(92).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;r--;)delete c.prototype[o[r]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[a]=e):n=c(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(132),i=n(91).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(19),i=n(16),o=n(90)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var r=n(8)("unscopables"),i=Array.prototype;null==i[r]&&n(20)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){var r=n(6);e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){"use strict";var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=l;var i=n(114),o=n(67);o.inherits=n(1);var a=n(165),s=n(115);o.inherits(l,a);for(var c=r(s.prototype),u=0;u<c.length;u++){var f=c[u];l.prototype[f]||(l.prototype[f]=s.prototype[f])}function l(e){if(!(this instanceof l))return new l(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||i(h,this)}function h(e){e.end()}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(198),c=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,o(t).call(this,Object.assign(Object.assign({},e),{type:e.type?e.type:"AppletError",kind:"sosError"})))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,s["default"]),t}();t.default=c},function(e,t,n){var r=n(14).f,i=n(19),o=n(8)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){var r=n(0),i=n(33),o=n(4),a=n(94),s="["+a+"]",c=RegExp("^"+s+s+"*"),u=RegExp(s+s+"*$"),f=function(e,t,n){var i={},s=o(function(){return!!a[e]()||"​…"!="​…"[e]()}),c=i[e]=s?t(l):a[e];n&&(i[n]=c),r(r.P+r.F*s,"String",i)},l=f.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(c,"")),2&t&&(e=e.replace(u,"")),e};e.exports=f},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(3),i=n(14),o=n(13),a=n(8)("species");e.exports=function(e){var t=r[e];o&&t&&!t[a]&&i.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(17);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";(function(t,r){var i=65536,o=4294967295;var a=n(2).Buffer,s=t.crypto||t.msCrypto;s&&s.getRandomValues?e.exports=function(e,t){if(e>o)throw new RangeError("requested too many random bytes");var n=a.allocUnsafe(e);if(e>0)if(e>i)for(var c=0;c<e;c+=i)s.getRandomValues(n.slice(c,c+i));else s.getRandomValues(n);if("function"==typeof t)return r.nextTick(function(){t(null,n)});return n}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,n(38),n(35))},function(e,t,n){e.exports=i;var r=n(15).EventEmitter;function i(){r.call(this)}n(1)(i,r),i.Readable=n(383),i.Writable=n(389),i.Duplex=n(390),i.Transform=n(391),i.PassThrough=n(392),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",c));var a=!1;function s(){a||(a=!0,e.end())}function c(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(f(),0===r.listenerCount(this,"error"))throw e}function f(){n.removeListener("data",i),e.removeListener("drain",o),n.removeListener("end",s),n.removeListener("close",c),n.removeListener("error",u),e.removeListener("error",u),n.removeListener("end",f),n.removeListener("close",f),e.removeListener("close",f)}return n.on("error",u),e.on("error",u),n.on("end",f),n.on("close",f),e.on("close",f),e.emit("pipe",n),e}},function(e,t,n){var r=n(2).Buffer;function i(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var n=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s<o;){for(var c=a%i,u=Math.min(o-s,i-c),f=0;f<u;f++)n[c+f]=e[s+f];s+=u,(a+=u)%i==0&&this._update(n)}return this._len+=o,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,n){var r=n(32);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(32),i=n(8)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(5),i=n(26),o=n(8)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},function(e,t,n){"use strict";var r=n(1),i=n(113),o=n(118),a=n(119),s=n(39);function c(e){s.call(this,"digest"),this._hash=e}r(c,s),c.prototype._update=function(e){this._hash.update(e)},c.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new c(a(e))}},function(e,t,n){(function(e){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,n(9).Buffer)},function(e,t,n){(function(t){e.exports=function(e,n){for(var r=Math.min(e.length,n.length),i=new t(r),o=0;o<r;++o)i[o]=e[o]^n[o];return i}}).call(this,n(9).Buffer)},function(e,t,n){"use strict";var r=n(31),i=n(22);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o<this.padLength;o++)r[i++]=0;return r}},function(e,t,n){var r=t;r.bignum=n(12),r.define=n(443).define,r.base=n(71),r.constants=n(190),r.decoders=n(448),r.encoders=n(450)},function(e,t,n){var r=t;r.Reporter=n(445).Reporter,r.DecoderBuffer=n(189).DecoderBuffer,r.EncoderBuffer=n(189).EncoderBuffer,r.Node=n(446)},function(e,t,n){var r=n(11),i=n(3),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(43)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(21),i=n(10),o=n(45);e.exports=function(e){return function(t,n,a){var s,c=r(t),u=i(c.length),f=o(a,u);if(e&&n!=n){for(;u>f;)if((s=c[f++])!=s)return!0}else for(;u>f;f++)if((e||f in c)&&c[f]===n)return e||f||0;return!e&&-1}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(32);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(8)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(5);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var r=n(64),i=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){"use strict";n(150);var r=n(17),i=n(20),o=n(4),a=n(33),s=n(8),c=n(109),u=s("species"),f=!o(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),l=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var d=s(e),h=!o(function(){var t={};return t[d]=function(){return 7},7!=""[e](t)}),p=h?!o(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[u]=function(){return n}),n[d](""),!t}):void 0;if(!h||!p||"replace"===e&&!f||"split"===e&&!l){var m=/./[d],g=n(a,d,""[e],function(e,t,n,r,i){return t.exec===c?h&&!i?{done:!0,value:m.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),b=g[0],v=g[1];r(String.prototype,e,b),i(RegExp.prototype,d,2==t?function(e,t){return v.call(e,this,t)}:function(e){return v.call(e,this)})}}},function(e,t,n){var r=n(25),i=n(145),o=n(104),a=n(5),s=n(10),c=n(106),u={},f={};(t=e.exports=function(e,t,n,l,d){var h,p,m,g,b=d?function(){return e}:c(e),v=r(n,l,t?2:1),y=0;if("function"!=typeof b)throw TypeError(e+" is not iterable!");if(o(b)){for(h=s(e.length);h>y;y++)if((g=t?v(a(p=e[y])[0],p[1]):v(e[y]))===u||g===f)return g}else for(m=b.call(e);!(p=m.next()).done;)if((g=i(m,v,p.value,t))===u||g===f)return g}).BREAK=u,t.RETURN=f},function(e,t,n){var r=n(3).navigator;e.exports=r&&r.userAgent||""},function(e,t,n){"use strict";var r=n(3),i=n(0),o=n(17),a=n(58),s=n(37),c=n(80),u=n(57),f=n(6),l=n(4),d=n(76),h=n(53),p=n(95);e.exports=function(e,t,n,m,g,b){var v=r[e],y=v,w=g?"set":"add",_=y&&y.prototype,S={},k=function(e){var t=_[e];o(_,e,"delete"==e?function(e){return!(b&&!f(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(b&&!f(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return b&&!f(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof y&&(b||_.forEach&&!l(function(){(new y).entries().next()}))){var E=new y,x=E[w](b?{}:-0,1)!=E,M=l(function(){E.has(1)}),I=d(function(e){new y(e)}),C=!b&&l(function(){for(var e=new y,t=5;t--;)e[w](t,t);return!e.has(-0)});I||((y=t(function(t,n){u(t,y,e);var r=p(new v,t,y);return null!=n&&c(n,g,r[w],r),r})).prototype=_,_.constructor=y),(M||C)&&(k("delete"),k("has"),g&&k("get")),(C||x)&&k(w),b&&_.clear&&delete _.clear}else y=m.getConstructor(t,e,g,w),a(y.prototype,n),s.NEED=!0;return h(y,e),S[e]=y,i(i.G+i.W+i.F*(y!=v),S),b||m.setStrong(y,e,g),y}},function(e,t,n){for(var r,i=n(3),o=n(20),a=n(42),s=a("typed_array"),c=a("view"),u=!(!i.ArrayBuffer||!i.DataView),f=u,l=0,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=i[d[l++]])?(o(r.prototype,s,!0),o(r.prototype,c,!0)):f=!1;e.exports={ABV:u,CONSTR:f,TYPED:s,VIEW:c}},function(e,t,n){var r=n(2).Buffer;function i(e){r.isBuffer(e)||(e=r.from(e));for(var t=e.length/4|0,n=new Array(t),i=0;i<t;i++)n[i]=e.readUInt32BE(4*i);return n}function o(e){for(;0<e.length;e++)e[0]=0}function a(e,t,n,r,i){for(var o,a,s,c,u=n[0],f=n[1],l=n[2],d=n[3],h=e[0]^t[0],p=e[1]^t[1],m=e[2]^t[2],g=e[3]^t[3],b=4,v=1;v<i;v++)o=u[h>>>24]^f[p>>>16&255]^l[m>>>8&255]^d[255&g]^t[b++],a=u[p>>>24]^f[m>>>16&255]^l[g>>>8&255]^d[255&h]^t[b++],s=u[m>>>24]^f[g>>>16&255]^l[h>>>8&255]^d[255&p]^t[b++],c=u[g>>>24]^f[h>>>16&255]^l[p>>>8&255]^d[255&m]^t[b++],h=o,p=a,m=s,g=c;return o=(r[h>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&g])^t[b++],a=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[g>>>8&255]<<8|r[255&h])^t[b++],s=(r[m>>>24]<<24|r[g>>>16&255]<<16|r[h>>>8&255]<<8|r[255&p])^t[b++],c=(r[g>>>24]<<24|r[h>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^t[b++],[o>>>=0,a>>>=0,s>>>=0,c>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],r=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,c=0;c<256;++c){var u=s^s<<1^s<<2^s<<3^s<<4;u=u>>>8^255&u^99,n[a]=u,r[u]=a;var f=e[a],l=e[f],d=e[l],h=257*e[u]^16843008*u;i[0][a]=h<<24|h>>>8,i[1][a]=h<<16|h>>>16,i[2][a]=h<<8|h>>>24,i[3][a]=h,h=16843009*d^65537*l^257*f^16843008*a,o[0][u]=h<<24|h>>>8,o[1][u]=h<<16|h>>>16,o[2][u]=h<<8|h>>>24,o[3][u]=h,0===a?a=s=1:(a=f^e[e[e[d^f]]],s^=e[e[s]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:o}}();function u(e){this._key=i(e),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,r=4*(n+1),i=[],o=0;o<t;o++)i[o]=e[o];for(o=t;o<r;o++){var a=i[o-1];o%t==0?(a=a<<8|a>>>24,a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t==4&&(a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a]),i[o]=i[o-t]^a}for(var u=[],f=0;f<r;f++){var l=r-f,d=i[l-(f%4?0:4)];u[f]=f<4||l<=4?d:c.INV_SUB_MIX[0][c.SBOX[d>>>24]]^c.INV_SUB_MIX[1][c.SBOX[d>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[d>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&d]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},u.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=r.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},u.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var n=a(e,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),o=r.allocUnsafe(16);return o.writeUInt32BE(n[0],0),o.writeUInt32BE(n[3],4),o.writeUInt32BE(n[2],8),o.writeUInt32BE(n[1],12),o},u.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=u},function(e,t,n){var r=n(2).Buffer,i=n(113);e.exports=function(e,t,n,o){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=n/8,s=r.alloc(a),c=r.alloc(o||0),u=r.alloc(0);a>0||o>0;){var f=new i;f.update(u),f.update(e),t&&f.update(t),u=f.digest();var l=0;if(a>0){var d=s.length-a;l=Math.min(a,u.length),u.copy(s,d,0,l),a-=l}if(l<u.length&&o>0){var h=c.length-o,p=Math.min(o,u.length-l);u.copy(c,h,l,l+p),o-=p}}return u.fill(0),{key:s,iv:c}}},function(e,t,n){"use strict";var r=n(12),i=n(23),o=i.getNAF,a=i.getJSF,s=i.assert;function c(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(e,t){s(e.precomputed);var n=e._getDoubles(),r=o(t,1),i=(1<<n.step+1)-(n.step%2==0?2:1);i/=3;for(var a=[],c=0;c<r.length;c+=n.step){var u=0;for(t=c+n.step-1;t>=c;t--)u=(u<<1)+r[t];a.push(u)}for(var f=this.jpoint(null,null,null),l=this.jpoint(null,null,null),d=i;d>0;d--){for(c=0;c<a.length;c++){(u=a[c])===d?l=l.mixedAdd(n.points[c]):u===-d&&(l=l.mixedAdd(n.points[c].neg()))}f=f.add(l)}return f.toP()},c.prototype._wnafMul=function(e,t){var n=4,r=e._getNAFPoints(n);n=r.wnd;for(var i=r.points,a=o(t,n),c=this.jpoint(null,null,null),u=a.length-1;u>=0;u--){for(t=0;u>=0&&0===a[u];u--)t++;if(u>=0&&t++,c=c.dblp(t),u<0)break;var f=a[u];s(0!==f),c="affine"===e.type?f>0?c.mixedAdd(i[f-1>>1]):c.mixedAdd(i[-f-1>>1].neg()):f>0?c.add(i[f-1>>1]):c.add(i[-f-1>>1].neg())}return"affine"===e.type?c.toP():c},c.prototype._wnafMulAdd=function(e,t,n,r,i){for(var s=this._wnafT1,c=this._wnafT2,u=this._wnafT3,f=0,l=0;l<r;l++){var d=(x=t[l])._getNAFPoints(e);s[l]=d.wnd,c[l]=d.points}for(l=r-1;l>=1;l-=2){var h=l-1,p=l;if(1===s[h]&&1===s[p]){var m=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(m[1]=t[h].add(t[p]),m[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(m[1]=t[h].toJ().mixedAdd(t[p]),m[2]=t[h].add(t[p].neg())):(m[1]=t[h].toJ().mixedAdd(t[p]),m[2]=t[h].toJ().mixedAdd(t[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],b=a(n[h],n[p]);f=Math.max(b[0].length,f),u[h]=new Array(f),u[p]=new Array(f);for(var v=0;v<f;v++){var y=0|b[0][v],w=0|b[1][v];u[h][v]=g[3*(y+1)+(w+1)],u[p][v]=0,c[h]=m}}else u[h]=o(n[h],s[h]),u[p]=o(n[p],s[p]),f=Math.max(u[h].length,f),f=Math.max(u[p].length,f)}var _=this.jpoint(null,null,null),S=this._wnafT4;for(l=f;l>=0;l--){for(var k=0;l>=0;){var E=!0;for(v=0;v<r;v++)S[v]=0|u[v][l],0!==S[v]&&(E=!1);if(!E)break;k++,l--}if(l>=0&&k++,_=_.dblp(k),l<0)break;for(v=0;v<r;v++){var x,M=S[v];0!==M&&(M>0?x=c[v][M-1>>1]:M<0&&(x=c[v][-M-1>>1].neg()),_="affine"===x.type?_.mixedAdd(x):_.add(x))}}for(l=0;l<r;l++)c[l]=null;return i?_:_.toP()},c.BasePoint=u,u.prototype.eq=function(){throw new Error("Not implemented")},u.prototype.validate=function(){return this.curve.validate(this)},c.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var n=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*n)return 6===e[0]?s(e[e.length-1]%2==0):7===e[0]&&s(e[e.length-1]%2==1),this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));if((2===e[0]||3===e[0])&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),3===e[0]);throw new Error("Unknown point format")},u.prototype.encodeCompressed=function(e){return this.encode(e,!0)},u.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},u.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},u.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},u.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)r=r.dbl();n.push(r)}return{step:e,points:n}},u.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)t[i]=t[i-1].add(r);return{wnd:e,points:t}},u.prototype._getBeta=function(){return null},u.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t}},function(e,t,n){var r=n(442),i=n(453),o=n(454),a=n(121),s=n(172),c=n(2).Buffer;function u(e){var t;"object"!=typeof e||c.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=c.from(e));var n,u,f=o(e,t),l=f.tag,d=f.data;switch(l){case"CERTIFICATE":u=r.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(u||(u=r.PublicKey.decode(d,"der")),n=u.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(u.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return u.subjectPrivateKey=u.subjectPublicKey,{type:"ec",data:u};case"1.2.840.10040.4.1":return u.algorithm.params.pub_key=r.DSAparam.decode(u.subjectPublicKey.data,"der"),{type:"dsa",data:u.algorithm.params};default:throw new Error("unknown key id "+n)}throw new Error("unknown key type "+l);case"ENCRYPTED PRIVATE KEY":d=function(e,t){var n=e.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[e.algorithm.decrypt.cipher.algo.join(".")],u=e.algorithm.decrypt.cipher.iv,f=e.subjectPrivateKey,l=parseInt(o.split("-")[1],10)/8,d=s.pbkdf2Sync(t,n,r,l,"sha1"),h=a.createDecipheriv(o,d,u),p=[];return p.push(h.update(f)),p.push(h.final()),c.concat(p)}(d=r.EncryptedPrivateKey.decode(d,"der"),t);case"PRIVATE KEY":switch(n=(u=r.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(u.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:u.algorithm.curve,privateKey:r.ECPrivateKey.decode(u.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return u.algorithm.params.priv_key=r.DSAparam.decode(u.subjectPrivateKey,"der"),{type:"dsa",params:u.algorithm.params};default:throw new Error("unknown key id "+n)}throw new Error("unknown key type "+l);case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=r.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+l)}}e.exports=u,u.signature=r.signature},function(e,t,n){var r=n(6),i=n(3).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,n){t.f=n(8)},function(e,t,n){var r=n(72)("keys"),i=n(42);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(3).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(6),i=n(5),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(25)(Function.call,n(28).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t){e.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(e,t,n){var r=n(6),i=n(93).set;e.exports=function(e,t,n){var o,a=t.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(e,o),e}},function(e,t,n){"use strict";var r=n(27),i=n(33);e.exports=function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var r=n(27),i=n(33);e.exports=function(e){return function(t,n){var o,a,s=String(i(t)),c=r(n),u=s.length;return c<0||c>=u?e?"":void 0:(o=s.charCodeAt(c))<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?e?s.charAt(c):o:e?s.slice(c,c+2):a-56320+(o-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(43),i=n(0),o=n(17),a=n(20),s=n(55),c=n(144),u=n(53),f=n(48),l=n(8)("iterator"),d=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,n,p,m,g,b){c(n,t,p);var v,y,w,_=function(e){if(!d&&e in x)return x[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},S=t+" Iterator",k="values"==m,E=!1,x=e.prototype,M=x[l]||x["@@iterator"]||m&&x[m],I=M||_(m),C=m?k?_("entries"):I:void 0,R="Array"==t&&x.entries||M;if(R&&(w=f(R.call(new e)))!==Object.prototype&&w.next&&(u(w,S,!0),r||"function"==typeof w[l]||a(w,l,h)),k&&M&&"values"!==M.name&&(E=!0,I=function(){return M.call(this)}),r&&!b||!d&&!E&&x[l]||a(x,l,I),s[t]=I,s[S]=h,m)if(v={values:k?I:_("values"),keys:g?I:_("keys"),entries:C},b)for(y in v)y in x||o(x,y,v[y]);else i(i.P+i.F*(d||E),t,v);return v}},function(e,t,n){var r=n(102),i=n(33);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},function(e,t,n){var r=n(6),i=n(32),o=n(8)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){var r=n(8)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){var r=n(55),i=n(8)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},function(e,t,n){"use strict";var r=n(14),i=n(41);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){var r=n(64),i=n(8)("iterator"),o=n(55);e.exports=n(11).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){"use strict";var r=n(16),i=n(45),o=n(10);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,u=void 0===c?n:i(c,n);u>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(49),i=n(149),o=n(55),a=n(21);e.exports=n(100)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";var r,i,o=n(77),a=RegExp.prototype.exec,s=String.prototype.replace,c=a,u=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),f=void 0!==/()??/.exec("")[1];(u||f)&&(c=function(e){var t,n,r,i,c=this;return f&&(n=new RegExp("^"+c.source+"$(?!\\s)",o.call(c))),u&&(t=c.lastIndex),r=a.call(c,e),u&&r&&(c.lastIndex=c.global?r.index+r[0].length:t),f&&r&&r.length>1&&s.call(r[0],n,function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)}),r}),e.exports=c},function(e,t,n){"use strict";var r=n(99)(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r,i,o,a=n(25),s=n(138),c=n(92),u=n(88),f=n(3),l=f.process,d=f.setImmediate,h=f.clearImmediate,p=f.MessageChannel,m=f.Dispatch,g=0,b={},v=function(){var e=+this;if(b.hasOwnProperty(e)){var t=b[e];delete b[e],t()}},y=function(e){v.call(e.data)};d&&h||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return b[++g]=function(){s("function"==typeof e?e:Function(e),t)},r(g),g},h=function(e){delete b[e]},"process"==n(32)(l)?r=function(e){l.nextTick(a(v,e,1))}:m&&m.now?r=function(e){m.now(a(v,e,1))}:p?(o=(i=new p).port2,i.port1.onmessage=y,r=a(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(e){f.postMessage(e+"","*")},f.addEventListener("message",y,!1)):r="onreadystatechange"in u("script")?function(e){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),v.call(e)}}:function(e){setTimeout(a(v,e,1),0)}),e.exports={set:d,clear:h}},function(e,t,n){"use strict";var r=n(3),i=n(13),o=n(43),a=n(83),s=n(20),c=n(58),u=n(4),f=n(57),l=n(27),d=n(10),h=n(157),p=n(47).f,m=n(14).f,g=n(107),b=n(53),v="prototype",y="Wrong index!",w=r.ArrayBuffer,_=r.DataView,S=r.Math,k=r.RangeError,E=r.Infinity,x=w,M=S.abs,I=S.pow,C=S.floor,R=S.log,P=S.LN2,O=i?"_b":"buffer",j=i?"_l":"byteLength",A=i?"_o":"byteOffset";function T(e,t,n){var r,i,o,a=new Array(n),s=8*n-t-1,c=(1<<s)-1,u=c>>1,f=23===t?I(2,-24)-I(2,-77):0,l=0,d=e<0||0===e&&1/e<0?1:0;for((e=M(e))!=e||e===E?(i=e!=e?1:0,r=c):(r=C(R(e)/P),e*(o=I(2,-r))<1&&(r--,o*=2),(e+=r+u>=1?f/o:f*I(2,1-u))*o>=2&&(r++,o/=2),r+u>=c?(i=0,r=c):r+u>=1?(i=(e*o-1)*I(2,t),r+=u):(i=e*I(2,u-1)*I(2,t),r=0));t>=8;a[l++]=255&i,i/=256,t-=8);for(r=r<<t|i,s+=t;s>0;a[l++]=255&r,r/=256,s-=8);return a[--l]|=128*d,a}function N(e,t,n){var r,i=8*n-t-1,o=(1<<i)-1,a=o>>1,s=i-7,c=n-1,u=e[c--],f=127&u;for(u>>=7;s>0;f=256*f+e[c],c--,s-=8);for(r=f&(1<<-s)-1,f>>=-s,s+=t;s>0;r=256*r+e[c],c--,s-=8);if(0===f)f=1-a;else{if(f===o)return r?NaN:u?-E:E;r+=I(2,t),f-=a}return(u?-1:1)*r*I(2,f-t)}function F(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function D(e){return[255&e]}function L(e){return[255&e,e>>8&255]}function W(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function q(e){return T(e,52,8)}function B(e){return T(e,23,4)}function H(e,t,n){m(e[v],t,{get:function(){return this[n]}})}function U(e,t,n,r){var i=h(+n);if(i+t>e[j])throw k(y);var o=e[O]._b,a=i+e[A],s=o.slice(a,a+t);return r?s:s.reverse()}function V(e,t,n,r,i,o){var a=h(+n);if(a+t>e[j])throw k(y);for(var s=e[O]._b,c=a+e[A],u=r(+i),f=0;f<t;f++)s[c+f]=u[o?f:t-f-1]}if(a.ABV){if(!u(function(){w(1)})||!u(function(){new w(-1)})||u(function(){return new w,new w(1.5),new w(NaN),"ArrayBuffer"!=w.name})){for(var G,z=(w=function(e){return f(this,w),new x(h(e))})[v]=x[v],X=p(x),Y=0;X.length>Y;)(G=X[Y++])in w||s(w,G,x[G]);o||(z.constructor=w)}var K=new _(new w(2)),J=_[v].setInt8;K.setInt8(0,2147483648),K.setInt8(1,2147483649),!K.getInt8(0)&&K.getInt8(1)||c(_[v],{setInt8:function(e,t){J.call(this,e,t<<24>>24)},setUint8:function(e,t){J.call(this,e,t<<24>>24)}},!0)}else w=function(e){f(this,w,"ArrayBuffer");var t=h(e);this._b=g.call(new Array(t),0),this[j]=t},_=function(e,t,n){f(this,_,"DataView"),f(e,w,"DataView");var r=e[j],i=l(t);if(i<0||i>r)throw k("Wrong offset!");if(i+(n=void 0===n?r-i:d(n))>r)throw k("Wrong length!");this[O]=e,this[A]=i,this[j]=n},i&&(H(w,"byteLength","_l"),H(_,"buffer","_b"),H(_,"byteLength","_l"),H(_,"byteOffset","_o")),c(_[v],{getInt8:function(e){return U(this,1,e)[0]<<24>>24},getUint8:function(e){return U(this,1,e)[0]},getInt16:function(e){var t=U(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=U(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return F(U(this,4,e,arguments[1]))},getUint32:function(e){return F(U(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return N(U(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return N(U(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){V(this,1,e,D,t)},setUint8:function(e,t){V(this,1,e,D,t)},setInt16:function(e,t){V(this,2,e,L,t,arguments[2])},setUint16:function(e,t){V(this,2,e,L,t,arguments[2])},setInt32:function(e,t){V(this,4,e,W,t,arguments[2])},setUint32:function(e,t){V(this,4,e,W,t,arguments[2])},setFloat32:function(e,t){V(this,4,e,B,t,arguments[2])},setFloat64:function(e,t){V(this,8,e,q,t,arguments[2])}});b(w,"ArrayBuffer"),b(_,"DataView"),s(_[v],a.VIEW,!0),t.ArrayBuffer=w,t.DataView=_},function(e,t,n){"use strict";(function(t){var r=n(1),i=n(164),o=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(e,t){return e<<t|e>>>32-t}function c(e,t,n,r,i,o,a){return s(e+(t&n|~t&r)+i+o|0,a)+t|0}function u(e,t,n,r,i,o,a){return s(e+(t&r|n&~r)+i+o|0,a)+t|0}function f(e,t,n,r,i,o,a){return s(e+(t^n^r)+i+o|0,a)+t|0}function l(e,t,n,r,i,o,a){return s(e+(n^(t|~r))+i+o|0,a)+t|0}r(a,i),a.prototype._update=function(){for(var e=o,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var n=this._a,r=this._b,i=this._c,a=this._d;n=c(n,r,i,a,e[0],3614090360,7),a=c(a,n,r,i,e[1],3905402710,12),i=c(i,a,n,r,e[2],606105819,17),r=c(r,i,a,n,e[3],3250441966,22),n=c(n,r,i,a,e[4],4118548399,7),a=c(a,n,r,i,e[5],1200080426,12),i=c(i,a,n,r,e[6],2821735955,17),r=c(r,i,a,n,e[7],4249261313,22),n=c(n,r,i,a,e[8],1770035416,7),a=c(a,n,r,i,e[9],2336552879,12),i=c(i,a,n,r,e[10],4294925233,17),r=c(r,i,a,n,e[11],2304563134,22),n=c(n,r,i,a,e[12],1804603682,7),a=c(a,n,r,i,e[13],4254626195,12),i=c(i,a,n,r,e[14],2792965006,17),n=u(n,r=c(r,i,a,n,e[15],1236535329,22),i,a,e[1],4129170786,5),a=u(a,n,r,i,e[6],3225465664,9),i=u(i,a,n,r,e[11],643717713,14),r=u(r,i,a,n,e[0],3921069994,20),n=u(n,r,i,a,e[5],3593408605,5),a=u(a,n,r,i,e[10],38016083,9),i=u(i,a,n,r,e[15],3634488961,14),r=u(r,i,a,n,e[4],3889429448,20),n=u(n,r,i,a,e[9],568446438,5),a=u(a,n,r,i,e[14],3275163606,9),i=u(i,a,n,r,e[3],4107603335,14),r=u(r,i,a,n,e[8],1163531501,20),n=u(n,r,i,a,e[13],2850285829,5),a=u(a,n,r,i,e[2],4243563512,9),i=u(i,a,n,r,e[7],1735328473,14),n=f(n,r=u(r,i,a,n,e[12],2368359562,20),i,a,e[5],4294588738,4),a=f(a,n,r,i,e[8],2272392833,11),i=f(i,a,n,r,e[11],1839030562,16),r=f(r,i,a,n,e[14],4259657740,23),n=f(n,r,i,a,e[1],2763975236,4),a=f(a,n,r,i,e[4],1272893353,11),i=f(i,a,n,r,e[7],4139469664,16),r=f(r,i,a,n,e[10],3200236656,23),n=f(n,r,i,a,e[13],681279174,4),a=f(a,n,r,i,e[0],3936430074,11),i=f(i,a,n,r,e[3],3572445317,16),r=f(r,i,a,n,e[6],76029189,23),n=f(n,r,i,a,e[9],3654602809,4),a=f(a,n,r,i,e[12],3873151461,11),i=f(i,a,n,r,e[15],530742520,16),n=l(n,r=f(r,i,a,n,e[2],3299628645,23),i,a,e[0],4096336452,6),a=l(a,n,r,i,e[7],1126891415,10),i=l(i,a,n,r,e[14],2878612391,15),r=l(r,i,a,n,e[5],4237533241,21),n=l(n,r,i,a,e[12],1700485571,6),a=l(a,n,r,i,e[3],2399980690,10),i=l(i,a,n,r,e[10],4293915773,15),r=l(r,i,a,n,e[1],2240044497,21),n=l(n,r,i,a,e[8],1873313359,6),a=l(a,n,r,i,e[15],4264355552,10),i=l(i,a,n,r,e[6],2734768916,15),r=l(r,i,a,n,e[13],1309151649,21),n=l(n,r,i,a,e[4],4149444226,6),a=l(a,n,r,i,e[11],3174756917,10),i=l(i,a,n,r,e[2],718787259,15),r=l(r,i,a,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+i|0,this._d=this._d+a|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=new t(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=a}).call(this,n(9).Buffer)},function(e,t,n){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports=function(e,n,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,n)});case 3:return t.nextTick(function(){e.call(null,n,r)});case 4:return t.nextTick(function(){e.call(null,n,r,i)});default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return t.nextTick(function(){e.apply(null,o)})}}:e.exports=t.nextTick}).call(this,n(35))},function(e,t,n){"use strict";(function(t,r){e.exports=p;var i=n(114),o=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:i,a=n(9).Buffer;p.WritableState=h;var s=n(67);s.inherits=n(1);var c,u={deprecate:n(387)};!function(){try{c=n(60)}catch(e){}finally{c||(c=n(15).EventEmitter)}}();var f;a=n(9).Buffer;function l(){}function d(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function h(e,t){f=f||n(51),e=e||{},this.objectMode=!!e.objectMode,t instanceof f&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,a=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:a,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.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,a=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,o){--t.pendingcb,n?i(o,r):o(r);e._writableState.errorEmitted=!0,e.emit("error",r)}(e,n,r,t,a);else{var s=v(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||b(e,n),r?o(g,e,n,s,a):g(e,n,s,a)}}(t,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 _(this),this.corkedRequestsFree.next=new _(this)}function p(e){if(f=f||n(51),!(this instanceof p||this instanceof f))return new p(e);this._writableState=new h(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),c.call(this)}function m(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 g(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),w(e,t)}function b(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 a=0;n;)i[a]=n,n=n.next,a+=1;m(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,t.corkedRequestsFree=o.next,o.next=null}else{for(;n;){var s=n.chunk,c=n.encoding,u=n.callback;if(m(e,t,!1,t.objectMode?1:s.length,s,c,u),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function v(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function y(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function w(e,t){var n=v(t);return n&&(0===t.pendingcb?(y(e,t),t.finished=!0,e.emit("finish")):y(e,t)),n}function _(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}s.inherits(p,c),h.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(h.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}(),p.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},p.prototype.write=function(e,t,n){var r=this._writableState,o=!1;return"function"==typeof t&&(n=t,t=null),a.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=l),r.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),i(t,n)}(this,n):function(e,t,n,r){var o=!0;if(!a.isBuffer(n)&&"string"!=typeof n&&null!=n&&!t.objectMode){var s=new TypeError("Invalid non-string/buffer chunk");e.emit("error",s),i(r,s),o=!1}return o}(this,r,e,n)&&(r.pendingcb++,o=function(e,t,n,r,i){n=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=new a(t,n));return t}(t,n,r),a.isBuffer(n)&&(r="buffer");var o=t.objectMode?1:n.length;t.length+=o;var s=t.length<t.highWaterMark;s||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest=new d(n,r,i),c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else m(e,t,!1,o,n,r,i);return s}(this,r,e,t,n)),o},p.prototype.cork=function(){this._writableState.corked++},p.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||b(this,e))},p.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);this._writableState.defaultEncoding=e},p.prototype._write=function(e,t,n){n(new Error("not implemented"))},p.prototype._writev=null,p.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||r.finished||function(e,t,n){t.ending=!0,w(e,t),n&&(t.finished?i(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)}}).call(this,n(35),n(385).setImmediate)},function(e,t,n){"use strict";var r=n(388).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=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=f,this.end=l,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,n){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 c(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 u(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 f(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 l(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):""}t.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]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=a(t[r]))>=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}},function(e,t,n){"use strict";e.exports=a;var r=n(51),i=n(67);function o(e){this.afterTransform=function(t,n){return function(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!=n&&e.push(n);i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function a(e){if(!(this instanceof a))return new a(e);r.call(this,e),this._transformState=new o(this);var t=this;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.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(e){s(t,e)}):s(t)})}function s(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=e._transformState;if(n.length)throw new Error("calling transform done when ws.length != 0");if(r.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}i.inherits=n(1),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("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}},function(e,t,n){"use strict";var r=n(9).Buffer,i=n(1),o=n(164),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],l=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function h(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<<t|e>>>32-t}function m(e,t,n,r,i,o,a,s){return p(e+(t^n^r)+o+a|0,s)+i|0}function g(e,t,n,r,i,o,a,s){return p(e+(t&n|~t&r)+o+a|0,s)+i|0}function b(e,t,n,r,i,o,a,s){return p(e+((t|~n)^r)+o+a|0,s)+i|0}function v(e,t,n,r,i,o,a,s){return p(e+(t&r|n&~r)+o+a|0,s)+i|0}function y(e,t,n,r,i,o,a,s){return p(e+(t^(n|~r))+o+a|0,s)+i|0}i(h,o),h.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,h=0|this._e,w=0|this._a,_=0|this._b,S=0|this._c,k=0|this._d,E=0|this._e,x=0;x<80;x+=1){var M,I;x<16?(M=m(n,r,i,o,h,e[s[x]],l[0],u[x]),I=y(w,_,S,k,E,e[c[x]],d[0],f[x])):x<32?(M=g(n,r,i,o,h,e[s[x]],l[1],u[x]),I=v(w,_,S,k,E,e[c[x]],d[1],f[x])):x<48?(M=b(n,r,i,o,h,e[s[x]],l[2],u[x]),I=b(w,_,S,k,E,e[c[x]],d[2],f[x])):x<64?(M=v(n,r,i,o,h,e[s[x]],l[3],u[x]),I=g(w,_,S,k,E,e[c[x]],d[3],f[x])):(M=y(n,r,i,o,h,e[s[x]],l[4],u[x]),I=m(w,_,S,k,E,e[c[x]],d[4],f[x])),n=h,h=o,o=p(i,10),i=r,r=M,w=E,E=k,k=p(S,10),S=_,_=I}var C=this._b+i+k|0;this._b=this._c+o+E|0,this._c=this._d+h+w|0,this._d=this._e+n+_|0,this._e=this._a+r+S|0,this._a=C},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=r.alloc?r.alloc(20):new r(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},function(e,t,n){(t=e.exports=function(e){e=e.toLowerCase();var n=t[e];if(!n)throw new Error(e+" is not supported (we accept pull requests)");return new n}).sha=n(393),t.sha1=n(394),t.sha224=n(395),t.sha256=n(167),t.sha384=n(396),t.sha512=n(168)},function(e,t,n){"use strict";t.utils=n(402),t.Cipher=n(403),t.DES=n(404),t.CBC=n(405),t.EDE=n(406)},function(e,t,n){var r=n(407),i=n(415),o=n(178);t.createCipher=t.Cipher=r.createCipher,t.createCipheriv=t.Cipheriv=r.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},function(e,t,n){var r={ECB:n(408),CBC:n(409),CFB:n(410),CFB8:n(411),CFB1:n(412),OFB:n(413),CTR:n(176),GCM:n(176)},i=n(178);for(var o in i)i[o].module=r[i[o].mode];e.exports=i},function(e,t,n){var r;function i(e){this.rand=e}if(e.exports=function(e){return r||(r=new i(null)),r.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=n(419);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return o.randomBytes(e)}}catch(e){}},function(e,t,n){(function(t){var r=n(12),i=n(59);function o(e,n){var i=function(e){var t=a(e);return{blinder:t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(n),o=n.modulus.byteLength(),s=(r.mont(n.modulus),new r(e).mul(i.blinder).umod(n.modulus)),c=s.toRed(r.mont(n.prime1)),u=s.toRed(r.mont(n.prime2)),f=n.coefficient,l=n.prime1,d=n.prime2,h=c.redPow(n.exponent1),p=u.redPow(n.exponent2);h=h.fromRed(),p=p.fromRed();var m=h.isub(p).imul(f).umod(l);return m.imul(d),p.iadd(m),new t(p.imul(i.unblinder).umod(n.modulus).toArray(!1,o))}function a(e){for(var t=e.modulus.byteLength(),n=new r(i(t));n.cmp(e.modulus)>=0||!n.umod(e.prime1)||!n.umod(e.prime2);)n=new r(i(t));return n}e.exports=o,o.getr=a}).call(this,n(9).Buffer)},function(e,t,n){"use strict";var r=t;r.version=n(424).version,r.utils=n(23),r.rand=n(123),r.curve=n(185),r.curves=n(126),r.ec=n(435),r.eddsa=n(439)},function(e,t,n){"use strict";var r,i=t,o=n(127),a=n(185),s=n(23).assert;function c(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var n=new c(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=c,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=n(434)}catch(e){r=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},function(e,t,n){var r=t;r.utils=n(31),r.common=n(69),r.sha=n(428),r.ripemd=n(432),r.hmac=n(433),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.COMMAND_TYPE_NOT_VALID="Allowed characters are: a-z, A-Z, 0-9, ., -, _",e.VIDEO_WAS_NOT_PLAYED="Play the video first.",e.VIDEO_WAS_STOPPED_ALREADY="Ignore the rejection if you stop video on demand. Video could never end because it is stopped before it's end. If you'd like to continue video to it's end, you probably looking for pause/resume methods.",e.SECURITY_PIN_CODE_FORMAT="PIN code has to be 4 digits string. E.g.: 1234"}(r||(r={})),t.default=r},function(e,t,n){"use strict";var r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(40),a=(i(r={},o.default.UNEXPECTED_EXCEPTION,"Unexpected exception"),i(r,o.default.FILE_IS_NOT_JS_OBJECT,"File needs to be object"),i(r,o.default.FILE_DOES_NOT_HAVE_UID,"File uid needs to be defined"),i(r,o.default.FILE_FLAGS_ARE_NOT_IN_ARRAY,"File flags needs to be Array of objects"),i(r,o.default.FILE_FLAG_IS_NOT_OBJECT,"File flag needs to be object"),i(r,o.default.COMMAND_TYPE_NOT_VALID,"Type contains invalid characters."),i(r,o.default.COMMAND_TYPE_IS_TOO_LONG,"Type is longer then 100 characters."),i(r,o.default.HARDWARE_LED_COLOR_IS_NOT_STRING,"Color must be string"),i(r,o.default.HARDWARE_LED_COLOR_IS_NOT_VALID,"Color must be in format #000000 or null"),i(r,o.default.FILE_NOT_FOUND_IN_CACHE,"File was not found"),i(r,o.default.OFFLINE_CACHE_UID_NOT_VALID,"Uid contains invalid characters"),i(r,o.default.OFFLINE_CACHE_HEADERS_NOT_VALID,"Invalid headers"),i(r,o.default.STREAM_INVALID_PROTOCOL_TYPE,"Invalid stream protocol type"),i(r,o.default.VIDEO_WAS_NOT_PLAYED_YET,"This video was not played yet"),i(r,o.default.VIDEO_WAS_STOPPED_ALREADY,"This video was already stopped"),i(r,o.default.SECURITY_PIN_CODE_INVALID,"Invalid PIN code"),r);t.default=a},function(e,t,n){e.exports=!n(13)&&!n(4)(function(){return 7!=Object.defineProperty(n(88)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(3),i=n(11),o=n(43),a=n(89),s=n(14).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t,n){var r=n(19),i=n(21),o=n(73)(!1),a=n(90)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;t.length>c;)r(s,n=t[c++])&&(~o(u,n)||u.push(n));return u}},function(e,t,n){var r=n(14),i=n(5),o=n(44);e.exports=n(13)?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),s=a.length,c=0;s>c;)r.f(e,n=a[c++],t[n]);return e}},function(e,t,n){var r=n(21),i=n(47).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},function(e,t,n){"use strict";var r=n(13),i=n(44),o=n(74),a=n(63),s=n(16),c=n(62),u=Object.assign;e.exports=!u||n(4)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r})?function(e,t){for(var n=s(e),u=arguments.length,f=1,l=o.f,d=a.f;u>f;)for(var h,p=c(arguments[f++]),m=l?i(p).concat(l(p)):i(p),g=m.length,b=0;g>b;)h=m[b++],r&&!d.call(p,h)||(n[h]=p[h]);return n}:u},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var r=n(26),i=n(6),o=n(138),a=[].slice,s={},c=function(e,t,n){if(!(t in s)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";s[t]=Function("F,a","return new F("+r.join(",")+")")}return s[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=a.call(arguments,1),s=function(){var r=n.concat(a.call(arguments));return this instanceof s?c(t,r.length,r):o(t,r,e)};return i(t.prototype)&&(s.prototype=t.prototype),s}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(3).parseInt,i=n(54).trim,o=n(94),a=/^[-+]?0[xX]/;e.exports=8!==r(o+"08")||22!==r(o+"0x16")?function(e,t){var n=i(String(e),3);return r(n,t>>>0||(a.test(n)?16:10))}:r},function(e,t,n){var r=n(3).parseFloat,i=n(54).trim;e.exports=1/r(n(94)+"-0")!=-1/0?function(e){var t=i(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){var r=n(32);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){var r=n(6),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){"use strict";var r=n(46),i=n(41),o=n(53),a={};n(20)(a,n(8)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){var r=n(5);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r=n(299);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(26),i=n(16),o=n(62),a=n(10);e.exports=function(e,t,n,s,c){r(t);var u=i(e),f=o(u),l=a(u.length),d=c?l-1:0,h=c?-1:1;if(n<2)for(;;){if(d in f){s=f[d],d+=h;break}if(d+=h,c?d<0:l<=d)throw TypeError("Reduce of empty array with no initial value")}for(;c?d>=0:l>d;d+=h)d in f&&(s=t(s,f[d],d,u));return s}},function(e,t,n){"use strict";var r=n(16),i=n(45),o=n(10);e.exports=[].copyWithin||function(e,t){var n=r(this),a=o(n.length),s=i(e,a),c=i(t,a),u=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===u?a:i(u,a))-c,a-s),l=1;for(c<s&&s<c+f&&(l=-1,c+=f-1,s+=f-1);f-- >0;)c in n?n[s]=n[c]:delete n[s],s+=l,c+=l;return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var r=n(109);n(0)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(e,t,n){n(13)&&"g"!=/./g.flags&&n(14).f(RegExp.prototype,"flags",{configurable:!0,get:n(77)})},function(e,t,n){"use strict";var r,i,o,a,s=n(43),c=n(3),u=n(25),f=n(64),l=n(0),d=n(6),h=n(26),p=n(57),m=n(80),g=n(65),b=n(111).set,v=n(319)(),y=n(153),w=n(320),_=n(81),S=n(154),k=c.TypeError,E=c.process,x=E&&E.versions,M=x&&x.v8||"",I=c.Promise,C="process"==f(E),R=function(){},P=i=y.f,O=!!function(){try{var e=I.resolve(1),t=(e.constructor={})[n(8)("species")]=function(e){e(R,R)};return(C||"function"==typeof PromiseRejectionEvent)&&e.then(R)instanceof t&&0!==M.indexOf("6.6")&&-1===_.indexOf("Chrome/66")}catch(e){}}(),j=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},A=function(e,t){if(!e._n){e._n=!0;var n=e._c;v(function(){for(var r=e._v,i=1==e._s,o=0,a=function(t){var n,o,a,s=i?t.ok:t.fail,c=t.resolve,u=t.reject,f=t.domain;try{s?(i||(2==e._h&&F(e),e._h=1),!0===s?n=r:(f&&f.enter(),n=s(r),f&&(f.exit(),a=!0)),n===t.promise?u(k("Promise-chain cycle")):(o=j(n))?o.call(n,c,u):c(n)):u(r)}catch(e){f&&!a&&f.exit(),u(e)}};n.length>o;)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&T(e)})}},T=function(e){b.call(c,function(){var t,n,r,i=e._v,o=N(e);if(o&&(t=w(function(){C?E.emit("unhandledRejection",i,e):(n=c.onunhandledrejection)?n({promise:e,reason:i}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",i)}),e._h=C||N(e)?2:1),e._a=void 0,o&&t.e)throw t.v})},N=function(e){return 1!==e._h&&0===(e._a||e._c).length},F=function(e){b.call(c,function(){var t;C?E.emit("rejectionHandled",e):(t=c.onrejectionhandled)&&t({promise:e,reason:e._v})})},D=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),A(t,!0))},L=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw k("Promise can't be resolved itself");(t=j(e))?v(function(){var r={_w:n,_d:!1};try{t.call(e,u(L,r,1),u(D,r,1))}catch(e){D.call(r,e)}}):(n._v=e,n._s=1,A(n,!1))}catch(e){D.call({_w:n,_d:!1},e)}}};O||(I=function(e){p(this,I,"Promise","_h"),h(e),r.call(this);try{e(u(L,this,1),u(D,this,1))}catch(e){D.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(58)(I.prototype,{then:function(e,t){var n=P(g(this,I));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=C?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&A(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r;this.promise=e,this.resolve=u(L,e,1),this.reject=u(D,e,1)},y.f=P=function(e){return e===I||e===a?new o(e):i(e)}),l(l.G+l.W+l.F*!O,{Promise:I}),n(53)(I,"Promise"),n(56)("Promise"),a=n(11).Promise,l(l.S+l.F*!O,"Promise",{reject:function(e){var t=P(this);return(0,t.reject)(e),t.promise}}),l(l.S+l.F*(s||!O),"Promise",{resolve:function(e){return S(s&&this===a?I:this,e)}}),l(l.S+l.F*!(O&&n(76)(function(e){I.all(e).catch(R)})),"Promise",{all:function(e){var t=this,n=P(t),r=n.resolve,i=n.reject,o=w(function(){var n=[],o=0,a=1;m(e,!1,function(e){var s=o++,c=!1;n.push(void 0),a++,t.resolve(e).then(function(e){c||(c=!0,n[s]=e,--a||r(n))},i)}),--a||r(n)});return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=P(t),r=n.reject,i=w(function(){m(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(e,t,n){"use strict";var r=n(26);function i(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new i(e)}},function(e,t,n){var r=n(5),i=n(6),o=n(153);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(14).f,i=n(46),o=n(58),a=n(25),s=n(57),c=n(80),u=n(100),f=n(149),l=n(56),d=n(13),h=n(37).fastKey,p=n(50),m=d?"_s":"size",g=function(e,t){var n,r=h(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,u){var f=e(function(e,r){s(e,f,t,"_i"),e._t=t,e._i=i(null),e._f=void 0,e._l=void 0,e[m]=0,null!=r&&c(r,n,e[u],e)});return o(f.prototype,{clear:function(){for(var e=p(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var n=p(this,t),r=g(n,e);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[m]--}return!!r},forEach:function(e){p(this,t);for(var n,r=a(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!g(p(this,t),e)}}),d&&r(f.prototype,"size",{get:function(){return p(this,t)[m]}}),f},def:function(e,t,n){var r,i,o=g(e,t);return o?o.v=n:(e._l=o={i:i=h(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o),r&&(r.n=o),e[m]++,"F"!==i&&(e._i[i]=o)),e},getEntry:g,setStrong:function(e,t,n){u(e,t,function(e,n){this._t=p(e,t),this._k=n,this._l=void 0},function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?f(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,f(1))},n?"entries":"values",!n,!0),l(t)}}},function(e,t,n){"use strict";var r=n(58),i=n(37).getWeak,o=n(5),a=n(6),s=n(57),c=n(80),u=n(30),f=n(19),l=n(50),d=u(5),h=u(6),p=0,m=function(e){return e._l||(e._l=new g)},g=function(){this.a=[]},b=function(e,t){return d(e.a,function(e){return e[0]===t})};g.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=h(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,o){var u=e(function(e,r){s(e,u,t,"_i"),e._t=t,e._i=p++,e._l=void 0,null!=r&&c(r,n,e[o],e)});return r(u.prototype,{delete:function(e){if(!a(e))return!1;var n=i(e);return!0===n?m(l(this,t)).delete(e):n&&f(n,this._i)&&delete n[this._i]},has:function(e){if(!a(e))return!1;var n=i(e);return!0===n?m(l(this,t)).has(e):n&&f(n,this._i)}}),u},def:function(e,t,n){var r=i(o(t),!0);return!0===r?m(e).set(t,n):r[e._i]=n,e},ufstore:m}},function(e,t,n){var r=n(27),i=n(10);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw RangeError("Wrong length!");return n}},function(e,t,n){var r=n(47),i=n(74),o=n(5),a=n(3).Reflect;e.exports=a&&a.ownKeys||function(e){var t=r.f(o(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(10),i=n(96),o=n(33);e.exports=function(e,t,n,a){var s=String(o(e)),c=s.length,u=void 0===n?" ":String(n),f=r(t);if(f<=c||""==u)return s;var l=f-c,d=i.call(u,Math.ceil(l/u.length));return d.length>l&&(d=d.slice(0,l)),a?d+s:s+d}},function(e,t,n){var r=n(13),i=n(44),o=n(21),a=n(63).f;e.exports=function(e){return function(t){for(var n,s=o(t),c=i(s),u=c.length,f=0,l=[];u>f;)n=c[f++],r&&!a.call(s,n)||l.push(e?[n,s[n]]:s[n]);return l}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUniqueHash=void 0;var r=n(162);t.generateUniqueHash=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,t=r.createHash("sha256");return t.update(""+(new Date).valueOf()+Math.random()),t.digest("hex").substring(0,e)}},function(e,t,n){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=n(59),t.createHash=t.Hash=n(66),t.createHmac=t.Hmac=n(169);var r=n(398),i=Object.keys(r),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var a=n(172);t.pbkdf2=a.pbkdf2,t.pbkdf2Sync=a.pbkdf2Sync;var s=n(400);t.Cipher=s.Cipher,t.createCipher=s.createCipher,t.Cipheriv=s.Cipheriv,t.createCipheriv=s.createCipheriv,t.Decipher=s.Decipher,t.createDecipher=s.createDecipher,t.Decipheriv=s.Decipheriv,t.createDecipheriv=s.createDecipheriv,t.getCiphers=s.getCiphers,t.listCiphers=s.listCiphers;var c=n(417);t.DiffieHellmanGroup=c.DiffieHellmanGroup,t.createDiffieHellmanGroup=c.createDiffieHellmanGroup,t.getDiffieHellman=c.getDiffieHellman,t.createDiffieHellman=c.createDiffieHellman,t.DiffieHellman=c.DiffieHellman;var u=n(422);t.createSign=u.createSign,t.Sign=u.Sign,t.createVerify=u.createVerify,t.Verify=u.Verify,t.createECDH=n(456);var f=n(457);t.publicEncrypt=f.publicEncrypt,t.privateEncrypt=f.privateEncrypt,t.publicDecrypt=f.publicDecrypt,t.privateDecrypt=f.privateDecrypt;var l=n(460);t.randomFill=l.randomFill,t.randomFillSync=l.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(t){var r=n(60).Transform;function i(e){r.call(this),this._block=new t(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(1)(i,r),i.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(e){r=e}n(r)},i.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},i.prototype.update=function(e,n){if(!t.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");t.isBuffer(e)||(e=new t(e,n));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)r[this._blockOffset++]=e[i++];for(var a=0,s=8*e.length;s>0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},i.prototype._update=function(e){throw new Error("_update is not implemented")},i.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();return void 0!==e&&(t=t.toString(e)),t},i.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=i}).call(this,n(9).Buffer)},function(e,t,n){"use strict";(function(t){e.exports=p;var r=n(114),i=n(163),o=n(9).Buffer;p.ReadableState=h;n(15);var a,s=function(e,t){return e.listeners(t).length};!function(){try{a=n(60)}catch(e){}finally{a||(a=n(15).EventEmitter)}}();o=n(9).Buffer;var c=n(67);c.inherits=n(1);var u,f,l=n(384),d=void 0;function h(e,t){f=f||n(51),e=e||{},this.objectMode=!!e.objectMode,t instanceof f&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.buffer=[],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.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(u||(u=n(116).StringDecoder),this.decoder=new u(e.encoding),this.encoding=e.encoding)}function p(e){if(f=f||n(51),!(this instanceof p))return new p(e);this._readableState=new h(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),a.call(this)}function m(e,t,n,i,a){var s=function(e,t){var n=null;o.isBuffer(t)||"string"==typeof t||null==t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));return n}(t,n);if(s)e.emit("error",s);else if(null===n)t.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,v(e)}(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!a){var c=new Error("stream.push() after EOF");e.emit("error",c)}else if(t.endEmitted&&a){c=new Error("stream.unshift() after end event");e.emit("error",c)}else{var u;!t.decoder||a||i||(n=t.decoder.write(n),u=!t.objectMode&&0===n.length),a||(t.reading=!1),u||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,a?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&v(e))),function(e,t){t.readingMore||(t.readingMore=!0,r(w,e,t))}(e,t)}else a||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}d=l&&l.debuglog?l.debuglog("stream"):function(){},c.inherits(p,a),p.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding)!==n.encoding&&(e=new o(e,t),t=""),m(this,n,e,t,!1)},p.prototype.unshift=function(e){return m(this,this._readableState,e,"",!0)},p.prototype.isPaused=function(){return!1===this._readableState.flowing},p.prototype.setEncoding=function(e){return u||(u=n(116).StringDecoder),this._readableState.decoder=new u(e),this._readableState.encoding=e,this};var g=8388608;function b(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:null===e||isNaN(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=g?e=g:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function v(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?r(y,e):y(e))}function y(e){d("emit readable"),e.emit("readable"),k(e)}function w(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(d("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function _(e){d("readable nexttick read 0"),e.read(0)}function S(e,t){t.reading||(d("resume read 0"),e.read(0)),t.resumeScheduled=!1,e.emit("resume"),k(e),t.flowing&&!t.reading&&e.read(0)}function k(e){var t=e._readableState;if(d("flow",t.flowing),t.flowing)do{var n=e.read()}while(null!==n&&t.flowing)}function E(e,t){var n,r=t.buffer,i=t.length,a=!!t.decoder,s=!!t.objectMode;if(0===r.length)return null;if(0===i)n=null;else if(s)n=r.shift();else if(!e||e>=i)n=a?r.join(""):1===r.length?r[0]:o.concat(r,i),r.length=0;else{if(e<r[0].length)n=(l=r[0]).slice(0,e),r[0]=l.slice(e);else if(e===r[0].length)n=r.shift();else{n=a?"":new o(e);for(var c=0,u=0,f=r.length;u<f&&c<e;u++){var l=r[0],d=Math.min(e-c,l.length);a?n+=l.slice(0,d):l.copy(n,c,0,d),d<l.length?r[0]=l.slice(d):r.shift(),c+=d}}}return n}function x(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,r(M,t,e))}function M(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}p.prototype.read=function(e){d("read",e);var t=this._readableState,n=e;if(("number"!=typeof e||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?x(this):v(this),null;if(0===(e=b(e,t))&&t.ended)return 0===t.length&&x(this),null;var r,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",i=!0),(t.ended||t.reading)&&d("reading or ended",i=!1),i&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),i&&!t.reading&&(e=b(n,t)),null===(r=e>0?E(e,t):null)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),n!==e&&t.ended&&0===t.length&&x(this),null!==r&&this.emit("data",r),r},p.prototype._read=function(e){this.emit("error",new Error("not implemented"))},p.prototype.pipe=function(e,n){var o=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,d("pipe count=%d opts=%j",a.pipesCount,n);var c=(!n||!1!==n.end)&&e!==t.stdout&&e!==t.stderr?f:p;function u(e){d("onunpipe"),e===o&&p()}function f(){d("onend"),e.end()}a.endEmitted?r(c):o.once("end",c),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,k(e))}}(o);e.on("drain",l);var h=!1;function p(){d("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",l),e.removeListener("error",g),e.removeListener("unpipe",u),o.removeListener("end",f),o.removeListener("end",p),o.removeListener("data",m),h=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||l()}function m(t){d("ondata"),!1===e.write(t)&&(1!==a.pipesCount||a.pipes[0]!==e||1!==o.listenerCount("data")||h||(d("false write response, pause",o._readableState.awaitDrain),o._readableState.awaitDrain++),o.pause())}function g(t){d("onerror",t),y(),e.removeListener("error",g),0===s(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),y()}function v(){d("onfinish"),e.removeListener("close",b),y()}function y(){d("unpipe"),o.unpipe(e)}return o.on("data",m),e._events&&e._events.error?i(e._events.error)?e._events.error.unshift(g):e._events.error=[g,e._events.error]:e.on("error",g),e.once("close",b),e.once("finish",v),e.emit("pipe",o),a.flowing||(d("pipe resume"),o.resume()),e},p.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var o=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}(t.pipes,e);return-1===o?this:(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},p.prototype.on=function(e,t){var n=a.prototype.on.call(this,e,t);if("data"===e&&!1!==this._readableState.flowing&&this.resume(),"readable"===e&&!this._readableState.endEmitted){var i=this._readableState;i.readableListening||(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading?i.length&&v(this):r(_,this))}return n},p.prototype.addListener=p.prototype.on,p.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r(S,e,t))}(this,e)),this},p.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},p.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;for(var i in e.on("end",function(){if(d("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),e.on("data",function(i){(d("wrapped data"),t.decoder&&(i=t.decoder.write(i)),t.objectMode&&null==i)||(t.objectMode||i&&i.length)&&(r.push(i)||(n=!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));return function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}(["error","close","destroy","pause","resume"],function(t){e.on(t,r.emit.bind(r,t))}),r._read=function(t){d("wrapped _read",t),n&&(n=!1,e.resume())},r},p._fromList=E}).call(this,n(35))},function(e,t,n){"use strict";e.exports=o;var r=n(117),i=n(67);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n(1),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){var r=n(1),i=n(61),o=n(2).Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(e,t,n){return n^e&(t^n)}function f(e,t,n){return e&t|n&(e|t)}function l(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(c,i),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,b=0;b<16;++b)n[b]=e.readInt32BE(4*b);for(;b<64;++b)n[b]=0|(((t=n[b-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[b-7]+h(n[b-15])+n[b-16];for(var v=0;v<64;++v){var y=g+d(c)+u(c,p,m)+a[v]+n[v]|0,w=l(r)+f(r,i,o)|0;g=m,m=p,p=c,c=s+y|0,s=o,o=i,i=r,r=y+w|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},c.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=c},function(e,t,n){var r=n(1),i=n(61),o=n(2).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function c(){this.init(),this._w=s,i.call(this,128,112)}function u(e,t,n){return n^e&(t^n)}function f(e,t,n){return e&t|n&(e|t)}function l(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function b(e,t){return e>>>0<t>>>0?1:0}r(c,i),c.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},c.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,c=0|this._fh,v=0|this._gh,y=0|this._hh,w=0|this._al,_=0|this._bl,S=0|this._cl,k=0|this._dl,E=0|this._el,x=0|this._fl,M=0|this._gl,I=0|this._hl,C=0;C<32;C+=2)t[C]=e.readInt32BE(4*C),t[C+1]=e.readInt32BE(4*C+4);for(;C<160;C+=2){var R=t[C-30],P=t[C-30+1],O=h(R,P),j=p(P,R),A=m(R=t[C-4],P=t[C-4+1]),T=g(P,R),N=t[C-14],F=t[C-14+1],D=t[C-32],L=t[C-32+1],W=j+F|0,q=O+N+b(W,j)|0;q=(q=q+A+b(W=W+T|0,T)|0)+D+b(W=W+L|0,L)|0,t[C]=q,t[C+1]=W}for(var B=0;B<160;B+=2){q=t[B],W=t[B+1];var H=f(n,r,i),U=f(w,_,S),V=l(n,w),G=l(w,n),z=d(s,E),X=d(E,s),Y=a[B],K=a[B+1],J=u(s,c,v),$=u(E,x,M),Z=I+X|0,Q=y+z+b(Z,I)|0;Q=(Q=(Q=Q+J+b(Z=Z+$|0,$)|0)+Y+b(Z=Z+K|0,K)|0)+q+b(Z=Z+W|0,W)|0;var ee=G+U|0,te=V+H+b(ee,G)|0;y=v,I=M,v=c,M=x,c=s,x=E,s=o+Q+b(E=k+Z|0,k)|0,o=i,k=S,i=r,S=_,r=n,_=w,n=Q+te+b(w=Z+ee|0,Z)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+S|0,this._dl=this._dl+k|0,this._el=this._el+E|0,this._fl=this._fl+x|0,this._gl=this._gl+M|0,this._hl=this._hl+I|0,this._ah=this._ah+n+b(this._al,w)|0,this._bh=this._bh+r+b(this._bl,_)|0,this._ch=this._ch+i+b(this._cl,S)|0,this._dh=this._dh+o+b(this._dl,k)|0,this._eh=this._eh+s+b(this._el,E)|0,this._fh=this._fh+c+b(this._fl,x)|0,this._gh=this._gh+v+b(this._gl,M)|0,this._hh=this._hh+y+b(this._hl,I)|0},c.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=c},function(e,t,n){"use strict";var r=n(1),i=n(397),o=n(39),a=n(2).Buffer,s=n(170),c=n(118),u=n(119),f=a.alloc(128);function l(e,t){o.call(this,"digest"),"string"==typeof t&&(t=a.from(t));var n="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>n)?t=("rmd160"===e?new c:u(e)).update(t).digest():t.length<n&&(t=a.concat([t,f],n));for(var r=this._ipad=a.allocUnsafe(n),i=this._opad=a.allocUnsafe(n),s=0;s<n;s++)r[s]=54^t[s],i[s]=92^t[s];this._hash="rmd160"===e?new c:u(e),this._hash.update(r)}r(l,o),l.prototype._update=function(e){this._hash.update(e)},l.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new c:u(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new l("rmd160",t):"md5"===e?new i(s,t):new l(e,t)}},function(e,t,n){var r=n(113);e.exports=function(e){return(new r).update(e).digest()}},function(e){e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},function(e,t,n){t.pbkdf2=n(399),t.pbkdf2Sync=n(175)},function(e,t,n){(function(t){var n=Math.pow(2,30)-1;function r(e,n){if("string"!=typeof e&&!t.isBuffer(e))throw new TypeError(n+" must be a buffer or string")}e.exports=function(e,t,i,o){if(r(e,"Password"),r(t,"Salt"),"number"!=typeof i)throw new TypeError("Iterations not a number");if(i<0)throw new TypeError("Bad iterations");if("number"!=typeof o)throw new TypeError("Key length not a number");if(o<0||o>n||o!=o)throw new TypeError("Bad key length")}}).call(this,n(9).Buffer)},function(e,t,n){(function(t){var n;t.browser?n="utf-8":n=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";e.exports=n}).call(this,n(35))},function(e,t,n){var r=n(170),i=n(118),o=n(119),a=n(173),s=n(174),c=n(2).Buffer,u=c.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(e,t,n){var a=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?r:function(t){return o(e).update(t).digest()}}(e),s="sha512"===e||"sha384"===e?128:64;t.length>s?t=a(t):t.length<s&&(t=c.concat([t,u],s));for(var l=c.allocUnsafe(s+f[e]),d=c.allocUnsafe(s+f[e]),h=0;h<s;h++)l[h]=54^t[h],d[h]=92^t[h];var p=c.allocUnsafe(s+n+4);l.copy(p,0,0,s),this.ipad1=p,this.ipad2=l,this.opad=d,this.alg=e,this.blocksize=s,this.hash=a,this.size=f[e]}l.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=function(e,t,n,r,i){a(e,t,n,r),c.isBuffer(e)||(e=c.from(e,s)),c.isBuffer(t)||(t=c.from(t,s));var o=new l(i=i||"sha1",e,t.length),u=c.allocUnsafe(r),d=c.allocUnsafe(t.length+4);t.copy(d,0,0,t.length);for(var h=0,p=f[i],m=Math.ceil(r/p),g=1;g<=m;g++){d.writeUInt32BE(g,t.length);for(var b=o.run(d,o.ipad1),v=b,y=1;y<n;y++){v=o.run(v,o.ipad2);for(var w=0;w<p;w++)b[w]^=v[w]}b.copy(u,h),h+=p}return u}},function(e,t,n){var r=n(68),i=n(2).Buffer,o=n(177);function a(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var n=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*n)]);for(var s=0;s<n;s++){var c=a(e),u=o+16*s;e._cache.writeUInt32BE(c[0],u+0),e._cache.writeUInt32BE(c[1],u+4),e._cache.writeUInt32BE(c[2],u+8),e._cache.writeUInt32BE(c[3],u+12)}var f=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),r(t,f)}},function(e,t){e.exports=function(e){for(var t,n=e.length;n--;){if(255!==(t=e.readUInt8(n))){t++,e.writeUInt8(t,n);break}e.writeUInt8(0,n)}}},function(e){e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},function(e,t,n){var r=n(84),i=n(2).Buffer,o=n(39),a=n(1),s=n(414),c=n(68),u=n(177);function f(e,t,n,a){o.call(this);var c=i.alloc(4,0);this._cipher=new r.AES(t);var f=this._cipher.encryptBlock(c);this._ghash=new s(f),n=function(e,t,n){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var r=new s(n),o=t.length,a=o%16;r.update(t),a&&(a=16-a,r.update(i.alloc(a,0))),r.update(i.alloc(8,0));var c=8*o,f=i.alloc(8);f.writeUIntBE(c,0,8),r.update(f),e._finID=r.state;var l=i.from(e._finID);return u(l),l}(this,n,f),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(f,o),f.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var n=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(n),this._len+=e.length,n},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var n=0;e.length!==t.length&&n++;for(var r=Math.min(e.length,t.length),i=0;i<r;++i)n+=e[i]^t[i];return n}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},f.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},f.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},f.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=f},function(e,t,n){var r=n(84),i=n(2).Buffer,o=n(39);function a(e,t,n,a){o.call(this),this._cipher=new r.AES(t),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._mode=e}n(1)(a,o),a.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},e.exports=a},function(e,t,n){var r=n(59);e.exports=v,v.simpleSieve=g,v.fermatTest=b;var i=n(12),o=new i(24),a=new(n(183)),s=new i(1),c=new i(2),u=new i(5),f=(new i(16),new i(8),new i(10)),l=new i(3),d=(new i(7),new i(11)),h=new i(4),p=(new i(12),null);function m(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,n=3;n<1048576;n+=2){for(var r=Math.ceil(Math.sqrt(n)),i=0;i<t&&e[i]<=r&&n%e[i]!=0;i++);t!==i&&e[i]<=r||(e[t++]=n)}return p=e,e}function g(e){for(var t=m(),n=0;n<t.length;n++)if(0===e.modn(t[n]))return 0===e.cmpn(t[n]);return!0}function b(e){var t=i.mont(e);return 0===c.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function v(e,t){if(e<16)return new i(2===t||5===t?[140,123]:[140,39]);var n,p;for(t=new i(t);;){for(n=new i(r(Math.ceil(e/8)));n.bitLength()>e;)n.ishrn(1);if(n.isEven()&&n.iadd(s),n.testn(1)||n.iadd(c),t.cmp(c)){if(!t.cmp(u))for(;n.mod(f).cmp(l);)n.iadd(h)}else for(;n.mod(o).cmp(d);)n.iadd(h);if(g(p=n.shrn(1))&&g(n)&&b(p)&&b(n)&&a.test(p)&&a.test(n))return n}}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(12),i=n(123);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),n=Math.ceil(t/8);do{var i=new r(this.rand.generate(n))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},o.prototype.test=function(e,t,n){var i=e.bitLength(),o=r.mont(e),a=new r(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),c=0;!s.testn(c);c++);for(var u=e.shrn(c),f=s.toRed(o);t>0;t--){var l=this._randrange(new r(2),s);n&&n(l);var d=l.toRed(o).redPow(u);if(0!==d.cmp(a)&&0!==d.cmp(f)){for(var h=1;h<c;h++){if(0===(d=d.redSqr()).cmp(a))return!1;if(0===d.cmp(f))break}if(h===c)return!1}}return!0},o.prototype.getDivisor=function(e,t){var n=e.bitLength(),i=r.mont(e),o=new r(1).toRed(i);t||(t=Math.max(1,n/48|0));for(var a=e.subn(1),s=0;!a.testn(s);s++);for(var c=e.shrn(s),u=a.toRed(i);t>0;t--){var f=this._randrange(new r(2),a),l=e.gcd(f);if(0!==l.cmpn(1))return l;var d=f.toRed(i).redPow(c);if(0!==d.cmp(o)&&0!==d.cmp(u)){for(var h=1;h<s;h++){if(0===(d=d.redSqr()).cmp(o))return d.fromRed().subn(1).gcd(e);if(0===d.cmp(u))break}if(h===s)return(d=d.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},function(e,t,n){"use strict";var r=t;function i(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",n=0;n<e.length;n++)t+=i(e[n].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16))}else for(r=0;r<e.length;r++){var i=e.charCodeAt(r),o=i>>8,a=255&i;o?n.push(o,a):n.push(a)}return n},r.zero2=i,r.toHex=o,r.encode=function(e,t){return"hex"===t?o(e):e}},function(e,t,n){"use strict";var r=t;r.base=n(86),r.short=n(425),r.mont=n(426),r.edwards=n(427)},function(e,t,n){"use strict";var r=n(31).rotr32;function i(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function a(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?i(t,n,r):1===e||3===e?a(t,n,r):2===e?o(t,n,r):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},function(e,t,n){"use strict";var r=n(31),i=n(69),o=n(186),a=n(22),s=r.sum32,c=r.sum32_4,u=r.sum32_5,f=o.ch32,l=o.maj32,d=o.s0_256,h=o.s1_256,p=o.g0_256,m=o.g1_256,g=i.BlockHash,b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}r.inherits(v,g),e.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=c(m(n[r-2]),n[r-7],p(n[r-15]),n[r-16]);var i=this.h[0],o=this.h[1],g=this.h[2],b=this.h[3],v=this.h[4],y=this.h[5],w=this.h[6],_=this.h[7];for(a(this.k.length===n.length),r=0;r<n.length;r++){var S=u(_,h(v),f(v,y,w),this.k[r],n[r]),k=s(d(i),l(i,o,g));_=w,w=y,y=v,v=s(b,S),b=g,g=o,o=i,i=s(S,k)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],g),this.h[3]=s(this.h[3],b),this.h[4]=s(this.h[4],v),this.h[5]=s(this.h[5],y),this.h[6]=s(this.h[6],w),this.h[7]=s(this.h[7],_)},v.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){"use strict";var r=n(31),i=n(69),o=n(22),a=r.rotr64_hi,s=r.rotr64_lo,c=r.shr64_hi,u=r.shr64_lo,f=r.sum64,l=r.sum64_hi,d=r.sum64_lo,h=r.sum64_4_hi,p=r.sum64_4_lo,m=r.sum64_5_hi,g=r.sum64_5_lo,b=i.BlockHash,v=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function y(){if(!(this instanceof y))return new y;b.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=v,this.W=new Array(160)}function w(e,t,n,r,i){var o=e&n^~e&i;return o<0&&(o+=4294967296),o}function _(e,t,n,r,i,o){var a=t&r^~t&o;return a<0&&(a+=4294967296),a}function S(e,t,n,r,i){var o=e&n^e&i^n&i;return o<0&&(o+=4294967296),o}function k(e,t,n,r,i,o){var a=t&r^t&o^r&o;return a<0&&(a+=4294967296),a}function E(e,t){var n=a(e,t,28)^a(t,e,2)^a(t,e,7);return n<0&&(n+=4294967296),n}function x(e,t){var n=s(e,t,28)^s(t,e,2)^s(t,e,7);return n<0&&(n+=4294967296),n}function M(e,t){var n=a(e,t,14)^a(e,t,18)^a(t,e,9);return n<0&&(n+=4294967296),n}function I(e,t){var n=s(e,t,14)^s(e,t,18)^s(t,e,9);return n<0&&(n+=4294967296),n}function C(e,t){var n=a(e,t,1)^a(e,t,8)^c(e,t,7);return n<0&&(n+=4294967296),n}function R(e,t){var n=s(e,t,1)^s(e,t,8)^u(e,t,7);return n<0&&(n+=4294967296),n}function P(e,t){var n=a(e,t,19)^a(t,e,29)^c(e,t,6);return n<0&&(n+=4294967296),n}function O(e,t){var n=s(e,t,19)^s(t,e,29)^u(e,t,6);return n<0&&(n+=4294967296),n}r.inherits(y,b),e.exports=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var i=P(n[r-4],n[r-3]),o=O(n[r-4],n[r-3]),a=n[r-14],s=n[r-13],c=C(n[r-30],n[r-29]),u=R(n[r-30],n[r-29]),f=n[r-32],l=n[r-31];n[r]=h(i,o,a,s,c,u,f,l),n[r+1]=p(i,o,a,s,c,u,f,l)}},y.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,r=this.h[0],i=this.h[1],a=this.h[2],s=this.h[3],c=this.h[4],u=this.h[5],h=this.h[6],p=this.h[7],b=this.h[8],v=this.h[9],y=this.h[10],C=this.h[11],R=this.h[12],P=this.h[13],O=this.h[14],j=this.h[15];o(this.k.length===n.length);for(var A=0;A<n.length;A+=2){var T=O,N=j,F=M(b,v),D=I(b,v),L=w(b,v,y,C,R),W=_(b,v,y,C,R,P),q=this.k[A],B=this.k[A+1],H=n[A],U=n[A+1],V=m(T,N,F,D,L,W,q,B,H,U),G=g(T,N,F,D,L,W,q,B,H,U);T=E(r,i),N=x(r,i),F=S(r,i,a,s,c),D=k(r,i,a,s,c,u);var z=l(T,N,F,D),X=d(T,N,F,D);O=R,j=P,R=y,P=C,y=b,C=v,b=l(h,p,V,G),v=d(p,p,V,G),h=c,p=u,c=a,u=s,a=r,s=i,r=l(V,G,z,X),i=d(V,G,z,X)}f(this.h,0,r,i),f(this.h,2,a,s),f(this.h,4,c,u),f(this.h,6,h,p),f(this.h,8,b,v),f(this.h,10,y,C),f(this.h,12,R,P),f(this.h,14,O,j)},y.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){var r=n(1),i=n(71).Reporter,o=n(9).Buffer;function a(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof s||(e=new s(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}r(a,i),t.DecoderBuffer=a,a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(e){var t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var n=new a(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=s,s.prototype.join=function(e,t){return e||(e=new o(this.length)),t||(t=0),0===this.length?e:(Array.isArray(this.value)?this.value.forEach(function(n){n.join(e,t),t+=n.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},function(e,t,n){var r=t;r._reverse=function(e){var t={};return Object.keys(e).forEach(function(n){(0|n)==n&&(n|=0);var r=e[n];t[r]=n}),t},r.der=n(447)},function(e,t,n){var r=n(1),i=n(70),o=i.base,a=i.bignum,s=i.constants.der;function c(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){o.Node.call(this,"der",e)}function f(e,t){var n=e.readUInt8(t);if(e.isError(n))return n;var r=s.tagClass[n>>6],i=0==(32&n);if(31==(31&n)){var o=n;for(n=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;n<<=7,n|=127&o}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:s.tag[n]}}function l(e,t,n){var r=e.readUInt8(n);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;var i=127&r;if(i>4)return e.error("length octect is too long");r=0;for(var o=0;o<i;o++){r<<=8;var a=e.readUInt8(n);if(e.isError(a))return a;r|=a}return r}e.exports=c,c.prototype.decode=function(e,t){return e instanceof o.DecoderBuffer||(e=new o.DecoderBuffer(e,t)),this.tree._decode(e,t)},r(u,o.Node),u.prototype._peekTag=function(e,t,n){if(e.isEmpty())return!1;var r=e.save(),i=f(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(r),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||n)},u.prototype._decodeTag=function(e,t,n){var r=f(e,'Failed to decode tag of "'+t+'"');if(e.isError(r))return r;var i=l(e,r.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!n&&r.tag!==t&&r.tagStr!==t&&r.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(r.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');var o=e.save(),a=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(a)?a:(i=e.offset-o.offset,e.restore(o),e.skip(i,'Failed to match body of: "'+t+'"'))},u.prototype._skipUntilEnd=function(e,t){for(;;){var n=f(e,t);if(e.isError(n))return n;var r,i=l(e,n.primitive,t);if(e.isError(i))return i;if(r=n.primitive||null!==i?e.skip(i):this._skipUntilEnd(e,t),e.isError(r))return r;if("end"===n.tagStr)break}},u.prototype._decodeList=function(e,t,n,r){for(var i=[];!e.isEmpty();){var o=this._peekTag(e,"end");if(e.isError(o))return o;var a=n.decode(e,"der",r);if(e.isError(a)&&o)break;i.push(a)}return i},u.prototype._decodeStr=function(e,t){if("bitstr"===t){var n=e.readUInt8();return e.isError(n)?n:{unused:n,data:e.raw()}}if("bmpstr"===t){var r=e.raw();if(r.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");for(var i="",o=0;o<r.length/2;o++)i+=String.fromCharCode(r.readUInt16BE(2*o));return i}if("numstr"===t){var a=e.raw().toString("ascii");return this._isNumstr(a)?a:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){var s=e.raw().toString("ascii");return this._isPrintstr(s)?s:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},u.prototype._decodeObjid=function(e,t,n){for(var r,i=[],o=0;!e.isEmpty();){var a=e.readUInt8();o<<=7,o|=127&a,0==(128&a)&&(i.push(o),o=0)}128&a&&i.push(o);var s=i[0]/40|0,c=i[0]%40;if(r=n?i:[s,c].concat(i.slice(1)),t){var u=t[r.join(" ")];void 0===u&&(u=t[r.join(".")]),void 0!==u&&(r=u)}return r},u.prototype._decodeTime=function(e,t){var n=e.raw().toString();if("gentime"===t)var r=0|n.slice(0,4),i=0|n.slice(4,6),o=0|n.slice(6,8),a=0|n.slice(8,10),s=0|n.slice(10,12),c=0|n.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");r=0|n.slice(0,2),i=0|n.slice(2,4),o=0|n.slice(4,6),a=0|n.slice(6,8),s=0|n.slice(8,10),c=0|n.slice(10,12);r=r<70?2e3+r:1900+r}return Date.UTC(r,i-1,o,a,s,c,0)},u.prototype._decodeNull=function(e){return null},u.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},u.prototype._decodeInt=function(e,t){var n=e.raw(),r=new a(n);return t&&(r=t[r.toString(10)]||r),r},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},function(e,t,n){var r=n(1),i=n(9).Buffer,o=n(70),a=o.base,s=o.constants.der;function c(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){a.Node.call(this,"der",e)}function f(e){return e<10?"0"+e:e}e.exports=c,c.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},r(u,a.Node),u.prototype._encodeComposite=function(e,t,n,r){var o,a=function(e,t,n,r){var i;"seqof"===e?e="seq":"setof"===e&&(e="set");if(s.tagByName.hasOwnProperty(e))i=s.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);i=e}if(i>=31)return r.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=s.tagClassByName[n||"universal"]<<6}(e,t,n,this.reporter);if(r.length<128)return(o=new i(2))[0]=a,o[1]=r.length,this._createEncoderBuffer([o,r]);for(var c=1,u=r.length;u>=256;u>>=8)c++;(o=new i(2+c))[0]=a,o[1]=128|c;u=1+c;for(var f=r.length;f>0;u--,f>>=8)o[u]=255&f;return this._createEncoderBuffer([o,r])},u.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var n=new i(2*e.length),r=0;r<e.length;r++)n.writeUInt16BE(e.charCodeAt(r),2*r);return this._createEncoderBuffer(n)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)?this._createEncoderBuffer(e):"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},u.prototype._encodeObjid=function(e,t,n){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var r=0;r<e.length;r++)e[r]|=0}else if(Array.isArray(e)){e=e.slice();for(r=0;r<e.length;r++)e[r]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!n){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var o=0;for(r=0;r<e.length;r++){var a=e[r];for(o++;a>=128;a>>=7)o++}var s=new i(o),c=s.length-1;for(r=e.length-1;r>=0;r--){a=e[r];for(s[c--]=127&a;(a>>=7)>0;)s[c--]=128|127&a}return this._createEncoderBuffer(s)},u.prototype._encodeTime=function(e,t){var n,r=new Date(e);return"gentime"===t?n=[f(r.getFullYear()),f(r.getUTCMonth()+1),f(r.getUTCDate()),f(r.getUTCHours()),f(r.getUTCMinutes()),f(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[f(r.getFullYear()%100),f(r.getUTCMonth()+1),f(r.getUTCDate()),f(r.getUTCHours()),f(r.getUTCMinutes()),f(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var n=e.toArray();!e.sign&&128&n[0]&&n.unshift(0),e=new i(n)}if(i.isBuffer(e)){var r=e.length;0===e.length&&r++;var o=new i(r);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);r=1;for(var a=e;a>=256;a>>=8)r++;for(a=(o=new Array(r)).length-1;a>=0;a--)o[a]=255&e,e>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},u.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},u.prototype._skipDefault=function(e,t,n){var r,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,n).join()),o.length!==i.defaultBuffer.length)return!1;for(r=0;r<o.length;r++)if(o[r]!==i.defaultBuffer[r])return!1;return!0}},function(e){e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},function(e,t,n){var r=n(66),i=n(2).Buffer;function o(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var n,a=i.alloc(0),s=0;a.length<t;)n=o(s++),a=i.concat([a,r("sha1").update(e).update(n).digest()]);return a.slice(0,t)}},function(e,t){e.exports=function(e,t){for(var n=e.length,r=-1;++r<n;)e[r]^=t[r];return e}},function(e,t,n){var r=n(12),i=n(2).Buffer;e.exports=function(e,t){return i.from(e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed().toArray())}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.setDebugConfig=t.getDebugConfig=t.debug=t.createDebugMethod=void 0;var o=n(462),a=n(465),s={serialize:!1,logDuration:!1};function c(e){if(s.logDuration){var t=(new Date).getTime()-e.getTime();return" (".concat(t,"ms)")}}t.createDebugMethod=function(e){return function(t,n,r,o){var u=(0,a.generateUniqueHash)(10),f=new Date;e.apply(void 0,i(["invoking ".concat(r," <").concat(u,">")],function(e){return e.map(function(e){return"object"==typeof e&&null!==e&&s.serialize?JSON.stringify(e):e})}(o),!1));try{var l=t.apply(n,o);return l instanceof Promise?l.then(function(t){return e("success ".concat(r," <").concat(u,">").concat(c(f)),t),t}).catch(function(t){throw e("fail ".concat(r," <").concat(u,">").concat(c(f)),t),t}):(e("success ".concat(r," <").concat(u,">").concat(c(f)),l),l)}catch(t){throw e("fail ".concat(r," <").concat(u,">").concat(c(f)),t),t}}},t.debug=function(e,n){void 0===n&&(n=o);var r=(0,t.createDebugMethod)(n(e));return function(e,t,n){var i=n.value;n.value=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return r(i,this,"".concat(this.constructor.name,":").concat(t),e)}}},t.getDebugConfig=function(){return s},t.setDebugConfig=function(e){s=r(r({},s),e)}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){var t="function"==typeof Map?new Map:void 0;return(o=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return a(e,arguments,c(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),s(r,e)})(e)}function a(e,t,n){return(a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&s(i,n.prototype),i}).apply(null,arguments)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0});var u=n(199),f=function(e){function t(e){var n,r=e.message,o=e.code,a=e.suggestion,s=e.pathToDocs,f=e.type;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=i(this,c(t).call(this,r))).name=f||"SosError",n.code=o,n.suggestion=a,n.pathToDocs=s,n.stack=u.getEnrichedStack({type:n.name,message:r,code:o,stackTrace:n.stack,suggestion:a,pathToDocs:s}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(t,o(Error)),t}();t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnrichedStack=t.createError=void 0;var r="Stack trace is not available for this type of error.";function i(e){var t=e.type,n=e.message,i=e.code,o=e.stackTrace,a=e.pathToDocs,s=e.origin,c=e.originStack,u="";return u+=t+": "+n+"\n",u+="Code: "+i+"\n",u+="Suggestion: "+function(e,t,n){var r;r=n?"".concat("https://docs.signageos.io").concat(n):"".concat("https://docs.signageos.io","/search?key=error%20").concat(e);var i=t?t+"\n":"";return i+="".concat("More information on"," ").concat(r)}(i,e.suggestion,a)+"\n",u+=s?"Origin: "+s+"\n":"",u+=c?"OriginStack: "+c+"\n":s&&!c?"OriginStack: "+r+"\n":"",u+=o?"Stack: "+o:"Stack: "+r}t.createError=function(e){var t=e.message,n=new Error(t);return n.stack=i(e),n.name=e.type,Object.keys(e).forEach(function(t){n[t]=e[t]}),n},t.getEnrichedStack=i},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(52),c=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,o(t).call(this,Object.assign(Object.assign({},e),{pathToDocs:t.PATH_TO_DOCS,kind:"appletError",type:e.type?e.type:"AppletResourcesError"})))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,s["default"]),t}();t.default=c,c.PATH_TO_DOCS="/api/js/js-applet-resources"},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,n){if(isNaN(t))throw Error("Coordination ".concat(e,'="').concat(n,'" is not valid number'));r(t)!==r(n)?console.warn("Coordination ".concat(e,'="').concat(n,'" is not a typeof number but is typeof ').concat(r(n),". ")+'Was automatically casted as "'.concat(t,'"')):t!==n&&console.warn("Coordination ".concat(e,'="').concat(n,'" is not an integer but is float. Was automatically floored to "').concat(t,'"'))}Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeCoordinations=void 0,t.sanitizeCoordinations=function(e){var t,n,r,o;return i("x",t=void 0===e.x||null===e.x?0:"number"!=typeof e.x?parseInt(e.x):Math.floor(e.x),e.x),i("y",n=void 0===e.y||null===e.y?0:"number"!=typeof e.y?parseInt(e.y):Math.floor(e.y),e.y),i("width",r=void 0===e.width||null===e.width?0:"number"!=typeof e.width?parseInt(e.width):Math.floor(e.width),e.width),i("height",o=void 0===e.height||null===e.height?0:"number"!=typeof e.height?parseInt(e.height):Math.floor(e.height),e.height),{x:t,y:n,width:r,height:o}}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.window=t,this.name="javascript"}var t,n,i;return t=e,(n=[{key:"load",value:function(e,t){var n=this;return new Promise(function(r,i){var o=n.window.document.createElement("script");o.setAttribute("type","text/javascript"),o.setAttribute("src",e),o.onerror=function(){i(new Error('File "'+e+'" cannot be loaded'))},o.onload=function(){console.info("File "+e.substring(0,100)+" was loaded"),r()},t.appendChild(o)})}}])&&r(t.prototype,n),i&&r(t,i),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseUpgradeArguments=void 0;var r=n(508);function i(e){return!!r.parse(e).hostname}t.parseUpgradeArguments=function(e,t){var n,r,o;if(i(e)&&t&&!i(t))n=e,r=t;else if(!i(e)&&t&&i(t))n=t,r=e;else if(i(e)&&!t)o=e;else{if(i(e)||t)throw new Error("Invalid arguments. See JSDoc for details");r=e}return{baseUrl:n,version:r,directUri:o}}},function(e,t,n){n(205),e.exports=n(378)},function(e,t,n){n(206)},function(e,t,n){"use strict";n(207),n(350),n(352),n(355),n(357),n(359),n(361),n(363),n(365),n(367),n(369),n(371),n(373),n(377)},function(e,t,n){n(208),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(289),n(290),n(292),n(293),n(294),n(295),n(296),n(297),n(298),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(108),n(313),n(150),n(314),n(151),n(315),n(316),n(317),n(318),n(152),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),n(335),n(336),n(337),n(338),n(339),n(340),n(341),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),e.exports=n(11)},function(e,t,n){"use strict";var r=n(3),i=n(19),o=n(13),a=n(0),s=n(17),c=n(37).KEY,u=n(4),f=n(72),l=n(53),d=n(42),h=n(8),p=n(89),m=n(131),g=n(210),b=n(75),v=n(5),y=n(6),w=n(16),_=n(21),S=n(36),k=n(41),E=n(46),x=n(134),M=n(28),I=n(74),C=n(14),R=n(44),P=M.f,O=C.f,j=x.f,A=r.Symbol,T=r.JSON,N=T&&T.stringify,F=h("_hidden"),D=h("toPrimitive"),L={}.propertyIsEnumerable,W=f("symbol-registry"),q=f("symbols"),B=f("op-symbols"),H=Object.prototype,U="function"==typeof A&&!!I.f,V=r.QObject,G=!V||!V.prototype||!V.prototype.findChild,z=o&&u(function(){return 7!=E(O({},"a",{get:function(){return O(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=P(H,t);r&&delete H[t],O(e,t,n),r&&e!==H&&O(H,t,r)}:O,X=function(e){var t=q[e]=E(A.prototype);return t._k=e,t},Y=U&&"symbol"==typeof A.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof A},K=function(e,t,n){return e===H&&K(B,t,n),v(e),t=S(t,!0),v(n),i(q,t)?(n.enumerable?(i(e,F)&&e[F][t]&&(e[F][t]=!1),n=E(n,{enumerable:k(0,!1)})):(i(e,F)||O(e,F,k(1,{})),e[F][t]=!0),z(e,t,n)):O(e,t,n)},J=function(e,t){v(e);for(var n,r=g(t=_(t)),i=0,o=r.length;o>i;)K(e,n=r[i++],t[n]);return e},$=function(e){var t=L.call(this,e=S(e,!0));return!(this===H&&i(q,e)&&!i(B,e))&&(!(t||!i(this,e)||!i(q,e)||i(this,F)&&this[F][e])||t)},Z=function(e,t){if(e=_(e),t=S(t,!0),e!==H||!i(q,t)||i(B,t)){var n=P(e,t);return!n||!i(q,t)||i(e,F)&&e[F][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=j(_(e)),r=[],o=0;n.length>o;)i(q,t=n[o++])||t==F||t==c||r.push(t);return r},ee=function(e){for(var t,n=e===H,r=j(n?B:_(e)),o=[],a=0;r.length>a;)!i(q,t=r[a++])||n&&!i(H,t)||o.push(q[t]);return o};U||(s((A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(n){this===H&&t.call(B,n),i(this,F)&&i(this[F],e)&&(this[F][e]=!1),z(this,e,k(1,n))};return o&&G&&z(H,e,{configurable:!0,set:t}),X(e)}).prototype,"toString",function(){return this._k}),M.f=Z,C.f=K,n(47).f=x.f=Q,n(63).f=$,I.f=ee,o&&!n(43)&&s(H,"propertyIsEnumerable",$,!0),p.f=function(e){return X(h(e))}),a(a.G+a.W+a.F*!U,{Symbol:A});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)h(te[ne++]);for(var re=R(h.store),ie=0;re.length>ie;)m(re[ie++]);a(a.S+a.F*!U,"Symbol",{for:function(e){return i(W,e+="")?W[e]:W[e]=A(e)},keyFor:function(e){if(!Y(e))throw TypeError(e+" is not a symbol!");for(var t in W)if(W[t]===e)return t},useSetter:function(){G=!0},useSimple:function(){G=!1}}),a(a.S+a.F*!U,"Object",{create:function(e,t){return void 0===t?E(e):J(E(e),t)},defineProperty:K,defineProperties:J,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:ee});var oe=u(function(){I.f(1)});a(a.S+a.F*oe,"Object",{getOwnPropertySymbols:function(e){return I.f(w(e))}}),T&&a(a.S+a.F*(!U||u(function(){var e=A();return"[null]"!=N([e])||"{}"!=N({a:e})||"{}"!=N(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(y(t)||void 0!==e)&&!Y(e))return b(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!Y(t))return t}),r[1]=t,N.apply(T,r)}}),A.prototype[D]||n(20)(A.prototype,D,A.prototype.valueOf),l(A,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(e,t,n){e.exports=n(72)("native-function-to-string",Function.toString)},function(e,t,n){var r=n(44),i=n(74),o=n(63);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var a,s=n(e),c=o.f,u=0;s.length>u;)c.call(e,a=s[u++])&&t.push(a);return t}},function(e,t,n){var r=n(0);r(r.S,"Object",{create:n(46)})},function(e,t,n){var r=n(0);r(r.S+r.F*!n(13),"Object",{defineProperty:n(14).f})},function(e,t,n){var r=n(0);r(r.S+r.F*!n(13),"Object",{defineProperties:n(133)})},function(e,t,n){var r=n(21),i=n(28).f;n(29)("getOwnPropertyDescriptor",function(){return function(e,t){return i(r(e),t)}})},function(e,t,n){var r=n(16),i=n(48);n(29)("getPrototypeOf",function(){return function(e){return i(r(e))}})},function(e,t,n){var r=n(16),i=n(44);n(29)("keys",function(){return function(e){return i(r(e))}})},function(e,t,n){n(29)("getOwnPropertyNames",function(){return n(134).f})},function(e,t,n){var r=n(6),i=n(37).onFreeze;n(29)("freeze",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(6),i=n(37).onFreeze;n(29)("seal",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(6),i=n(37).onFreeze;n(29)("preventExtensions",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(6);n(29)("isFrozen",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(6);n(29)("isSealed",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(6);n(29)("isExtensible",function(e){return function(t){return!!r(t)&&(!e||e(t))}})},function(e,t,n){var r=n(0);r(r.S+r.F,"Object",{assign:n(135)})},function(e,t,n){var r=n(0);r(r.S,"Object",{is:n(136)})},function(e,t,n){var r=n(0);r(r.S,"Object",{setPrototypeOf:n(93).set})},function(e,t,n){"use strict";var r=n(64),i={};i[n(8)("toStringTag")]="z",i+""!="[object z]"&&n(17)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(e,t,n){var r=n(0);r(r.P,"Function",{bind:n(137)})},function(e,t,n){var r=n(14).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||n(13)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(6),i=n(48),o=n(8)("hasInstance"),a=Function.prototype;o in a||n(14).f(a,o,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(0),i=n(139);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(e,t,n){var r=n(0),i=n(140);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(e,t,n){"use strict";var r=n(3),i=n(19),o=n(32),a=n(95),s=n(36),c=n(4),u=n(47).f,f=n(28).f,l=n(14).f,d=n(54).trim,h=r.Number,p=h,m=h.prototype,g="Number"==o(n(46)(m)),b="trim"in String.prototype,v=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){var n,r,i,o=(t=b?t.trim():d(t,3)).charCodeAt(0);if(43===o||45===o){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(t.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+t}for(var a,c=t.slice(2),u=0,f=c.length;u<f;u++)if((a=c.charCodeAt(u))<48||a>i)return NaN;return parseInt(c,r)}}return+t};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof h&&(g?c(function(){m.valueOf.call(n)}):"Number"!=o(n))?a(new p(v(t)),n,h):v(t)};for(var y,w=n(13)?u(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),_=0;w.length>_;_++)i(p,y=w[_])&&!i(h,y)&&l(h,y,f(p,y));h.prototype=m,m.constructor=h,n(17)(r,"Number",h)}},function(e,t,n){"use strict";var r=n(0),i=n(27),o=n(141),a=n(96),s=1..toFixed,c=Math.floor,u=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",l=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*u[n],u[n]=r%1e7,r=c(r/1e7)},d=function(e){for(var t=6,n=0;--t>=0;)n+=u[t],u[t]=c(n/e),n=n%e*1e7},h=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==u[e]){var n=String(u[e]);t=""===t?n:t+a.call("0",7-n.length)+n}return t},p=function(e,t,n){return 0===t?n:t%2==1?p(e,t-1,n*e):p(e*e,t/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(4)(function(){s.call({})})),"Number",{toFixed:function(e){var t,n,r,s,c=o(this,f),u=i(e),m="",g="0";if(u<0||u>20)throw RangeError(f);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(m="-",c=-c),c>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(c*p(2,69,1))-69)<0?c*p(2,-t,1):c/p(2,t,1),n*=4503599627370496,(t=52-t)>0){for(l(0,n),r=u;r>=7;)l(1e7,0),r-=7;for(l(p(10,r,1),0),r=t-1;r>=23;)d(1<<23),r-=23;d(1<<r),l(1,1),d(2),g=h()}else l(0,n),l(1<<-t,0),g=h()+a.call("0",u);return g=u>0?m+((s=g.length)<=u?"0."+a.call("0",u-s)+g:g.slice(0,s-u)+"."+g.slice(s-u)):m+g}})},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n(141),a=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==a.call(1,void 0)})||!i(function(){a.call({})})),"Number",{toPrecision:function(e){var t=o(this,"Number#toPrecision: incorrect invocation!");return void 0===e?a.call(t):a.call(t,e)}})},function(e,t,n){var r=n(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(0),i=n(3).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},function(e,t,n){var r=n(0);r(r.S,"Number",{isInteger:n(142)})},function(e,t,n){var r=n(0);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(0),i=n(142),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return i(e)&&o(e)<=9007199254740991}})},function(e,t,n){var r=n(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(0),i=n(140);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(e,t,n){var r=n(0),i=n(139);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(e,t,n){var r=n(0),i=n(143),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+o(e-1)*o(e+1))}})},function(e,t,n){var r=n(0),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},function(e,t,n){var r=n(0),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(0),i=n(97);r(r.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var r=n(0);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(0),i=Math.exp;r(r.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},function(e,t,n){var r=n(0),i=n(98);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(e,t,n){var r=n(0);r(r.S,"Math",{fround:n(253)})},function(e,t,n){var r=n(97),i=Math.pow,o=i(2,-52),a=i(2,-23),s=i(2,127)*(2-a),c=i(2,-126);e.exports=Math.fround||function(e){var t,n,i=Math.abs(e),u=r(e);return i<c?u*(i/c/a+1/o-1/o)*c*a:(n=(t=(1+a/o)*i)-(t-i))>s||n!=n?u*(1/0):u*n}},function(e,t,n){var r=n(0),i=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,o=0,a=0,s=arguments.length,c=0;a<s;)c<(n=i(arguments[a++]))?(o=o*(r=c/n)*r+1,c=n):o+=n>0?(r=n/c)*r:n;return c===1/0?1/0:c*Math.sqrt(o)}})},function(e,t,n){var r=n(0),i=Math.imul;r(r.S+r.F*n(4)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(e,t){var n=+e,r=+t,i=65535&n,o=65535&r;return 0|i*o+((65535&n>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},function(e,t,n){var r=n(0);r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var r=n(0);r(r.S,"Math",{log1p:n(143)})},function(e,t,n){var r=n(0);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(0);r(r.S,"Math",{sign:n(97)})},function(e,t,n){var r=n(0),i=n(98),o=Math.exp;r(r.S+r.F*n(4)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(o(e-1)-o(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(0),i=n(98),o=Math.exp;r(r.S,"Math",{tanh:function(e){var t=i(e=+e),n=i(-e);return t==1/0?1:n==1/0?-1:(t-n)/(o(e)+o(-e))}})},function(e,t,n){var r=n(0);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(0),i=n(45),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(0),i=n(21),o=n(10);r(r.S,"String",{raw:function(e){for(var t=i(e.raw),n=o(t.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},function(e,t,n){"use strict";n(54)("trim",function(e){return function(){return e(this,3)}})},function(e,t,n){"use strict";var r=n(99)(!0);n(100)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){"use strict";var r=n(0),i=n(99)(!1);r(r.P,"String",{codePointAt:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(0),i=n(10),o=n(101),a="".endsWith;r(r.P+r.F*n(103)("endsWith"),"String",{endsWith:function(e){var t=o(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=i(t.length),s=void 0===n?r:Math.min(i(n),r),c=String(e);return a?a.call(t,c,s):t.slice(s-c.length,s)===c}})},function(e,t,n){"use strict";var r=n(0),i=n(101);r(r.P+r.F*n(103)("includes"),"String",{includes:function(e){return!!~i(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(0);r(r.P,"String",{repeat:n(96)})},function(e,t,n){"use strict";var r=n(0),i=n(10),o=n(101),a="".startsWith;r(r.P+r.F*n(103)("startsWith"),"String",{startsWith:function(e){var t=o(this,e,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return a?a.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(18)("anchor",function(e){return function(t){return e(this,"a","name",t)}})},function(e,t,n){"use strict";n(18)("big",function(e){return function(){return e(this,"big","","")}})},function(e,t,n){"use strict";n(18)("blink",function(e){return function(){return e(this,"blink","","")}})},function(e,t,n){"use strict";n(18)("bold",function(e){return function(){return e(this,"b","","")}})},function(e,t,n){"use strict";n(18)("fixed",function(e){return function(){return e(this,"tt","","")}})},function(e,t,n){"use strict";n(18)("fontcolor",function(e){return function(t){return e(this,"font","color",t)}})},function(e,t,n){"use strict";n(18)("fontsize",function(e){return function(t){return e(this,"font","size",t)}})},function(e,t,n){"use strict";n(18)("italics",function(e){return function(){return e(this,"i","","")}})},function(e,t,n){"use strict";n(18)("link",function(e){return function(t){return e(this,"a","href",t)}})},function(e,t,n){"use strict";n(18)("small",function(e){return function(){return e(this,"small","","")}})},function(e,t,n){"use strict";n(18)("strike",function(e){return function(){return e(this,"strike","","")}})},function(e,t,n){"use strict";n(18)("sub",function(e){return function(){return e(this,"sub","","")}})},function(e,t,n){"use strict";n(18)("sup",function(e){return function(){return e(this,"sup","","")}})},function(e,t,n){var r=n(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(0),i=n(16),o=n(36);r(r.P+r.F*n(4)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(e){var t=i(this),n=o(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var r=n(0),i=n(288);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(e,t,n){"use strict";var r=n(4),i=Date.prototype.getTime,o=Date.prototype.toISOString,a=function(e){return e>9?e:"0"+e};e.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))})||!r(function(){o.call(new Date(NaN))})?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+a(e.getUTCMonth()+1)+"-"+a(e.getUTCDate())+"T"+a(e.getUTCHours())+":"+a(e.getUTCMinutes())+":"+a(e.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:o},function(e,t,n){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(17)(r,"toString",function(){var e=o.call(this);return e==e?i.call(this):"Invalid Date"})},function(e,t,n){var r=n(8)("toPrimitive"),i=Date.prototype;r in i||n(20)(i,r,n(291))},function(e,t,n){"use strict";var r=n(5),i=n(36);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return i(r(this),"number"!=e)}},function(e,t,n){var r=n(0);r(r.S,"Array",{isArray:n(75)})},function(e,t,n){"use strict";var r=n(25),i=n(0),o=n(16),a=n(145),s=n(104),c=n(10),u=n(105),f=n(106);i(i.S+i.F*!n(76)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,i,l,d=o(e),h="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,g=void 0!==m,b=0,v=f(d);if(g&&(m=r(m,p>2?arguments[2]:void 0,2)),null==v||h==Array&&s(v))for(n=new h(t=c(d.length));t>b;b++)u(n,b,g?m(d[b],b):d[b]);else for(l=v.call(d),n=new h;!(i=l.next()).done;b++)u(n,b,g?a(l,m,[i.value,b],!0):i.value);return n.length=b,n}})},function(e,t,n){"use strict";var r=n(0),i=n(105);r(r.S+r.F*n(4)(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(0),i=n(21),o=[].join;r(r.P+r.F*(n(62)!=Object||!n(24)(o)),"Array",{join:function(e){return o.call(i(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var r=n(0),i=n(92),o=n(32),a=n(45),s=n(10),c=[].slice;r(r.P+r.F*n(4)(function(){i&&c.call(i)}),"Array",{slice:function(e,t){var n=s(this.length),r=o(this);if(t=void 0===t?n:t,"Array"==r)return c.call(this,e,t);for(var i=a(e,n),u=a(t,n),f=s(u-i),l=new Array(f),d=0;d<f;d++)l[d]="String"==r?this.charAt(i+d):this[i+d];return l}})},function(e,t,n){"use strict";var r=n(0),i=n(26),o=n(16),a=n(4),s=[].sort,c=[1,2,3];r(r.P+r.F*(a(function(){c.sort(void 0)})||!a(function(){c.sort(null)})||!n(24)(s)),"Array",{sort:function(e){return void 0===e?s.call(o(this)):s.call(o(this),i(e))}})},function(e,t,n){"use strict";var r=n(0),i=n(30)(0),o=n(24)([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(e){return i(this,e,arguments[1])}})},function(e,t,n){var r=n(6),i=n(75),o=n(8)("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&null===(t=t[o])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){"use strict";var r=n(0),i=n(30)(1);r(r.P+r.F*!n(24)([].map,!0),"Array",{map:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),i=n(30)(2);r(r.P+r.F*!n(24)([].filter,!0),"Array",{filter:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),i=n(30)(3);r(r.P+r.F*!n(24)([].some,!0),"Array",{some:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),i=n(30)(4);r(r.P+r.F*!n(24)([].every,!0),"Array",{every:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),i=n(147);r(r.P+r.F*!n(24)([].reduce,!0),"Array",{reduce:function(e){return i(this,e,arguments.length,arguments[1],!1)}})},function(e,t,n){"use strict";var r=n(0),i=n(147);r(r.P+r.F*!n(24)([].reduceRight,!0),"Array",{reduceRight:function(e){return i(this,e,arguments.length,arguments[1],!0)}})},function(e,t,n){"use strict";var r=n(0),i=n(73)(!1),o=[].indexOf,a=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(24)(o)),"Array",{indexOf:function(e){return a?o.apply(this,arguments)||0:i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),i=n(21),o=n(27),a=n(10),s=[].lastIndexOf,c=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(c||!n(24)(s)),"Array",{lastIndexOf:function(e){if(c)return s.apply(this,arguments)||0;var t=i(this),n=a(t.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(0);r(r.P,"Array",{copyWithin:n(148)}),n(49)("copyWithin")},function(e,t,n){var r=n(0);r(r.P,"Array",{fill:n(107)}),n(49)("fill")},function(e,t,n){"use strict";var r=n(0),i=n(30)(5),o=!0;"find"in[]&&Array(1).find(function(){o=!1}),r(r.P+r.F*o,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(49)("find")},function(e,t,n){"use strict";var r=n(0),i=n(30)(6),o="findIndex",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(49)(o)},function(e,t,n){n(56)("Array")},function(e,t,n){var r=n(3),i=n(95),o=n(14).f,a=n(47).f,s=n(102),c=n(77),u=r.RegExp,f=u,l=u.prototype,d=/a/g,h=/a/g,p=new u(d)!==d;if(n(13)&&(!p||n(4)(function(){return h[n(8)("match")]=!1,u(d)!=d||u(h)==h||"/a/i"!=u(d,"i")}))){u=function(e,t){var n=this instanceof u,r=s(e),o=void 0===t;return!n&&r&&e.constructor===u&&o?e:i(p?new f(r&&!o?e.source:e,t):f((r=e instanceof u)?e.source:e,r&&o?c.call(e):t),n?this:l,u)};for(var m=function(e){e in u||o(u,e,{configurable:!0,get:function(){return f[e]},set:function(t){f[e]=t}})},g=a(f),b=0;g.length>b;)m(g[b++]);l.constructor=u,u.prototype=l,n(17)(r,"RegExp",u)}n(56)("RegExp")},function(e,t,n){"use strict";n(151);var r=n(5),i=n(77),o=n(13),a=/./.toString,s=function(e){n(17)(RegExp.prototype,"toString",e,!0)};n(4)(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?s(function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)}):"toString"!=a.name&&s(function(){return a.call(this)})},function(e,t,n){"use strict";var r=n(5),i=n(10),o=n(110),a=n(78);n(79)("match",1,function(e,t,n,s){return[function(n){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=s(n,e,this);if(t.done)return t.value;var c=r(e),u=String(this);if(!c.global)return a(c,u);var f=c.unicode;c.lastIndex=0;for(var l,d=[],h=0;null!==(l=a(c,u));){var p=String(l[0]);d[h]=p,""===p&&(c.lastIndex=o(u,i(c.lastIndex),f)),h++}return 0===h?null:d}]})},function(e,t,n){"use strict";var r=n(5),i=n(16),o=n(10),a=n(27),s=n(110),c=n(78),u=Math.max,f=Math.min,l=Math.floor,d=/\$([$&`']|\d\d?|<[^>]*>)/g,h=/\$([$&`']|\d\d?)/g;n(79)("replace",2,function(e,t,n,p){return[function(r,i){var o=e(this),a=null==r?void 0:r[t];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},function(e,t){var i=p(n,e,this,t);if(i.done)return i.value;var l=r(e),d=String(this),h="function"==typeof t;h||(t=String(t));var g=l.global;if(g){var b=l.unicode;l.lastIndex=0}for(var v=[];;){var y=c(l,d);if(null===y)break;if(v.push(y),!g)break;""===String(y[0])&&(l.lastIndex=s(d,o(l.lastIndex),b))}for(var w,_="",S=0,k=0;k<v.length;k++){y=v[k];for(var E=String(y[0]),x=u(f(a(y.index),d.length),0),M=[],I=1;I<y.length;I++)M.push(void 0===(w=y[I])?w:String(w));var C=y.groups;if(h){var R=[E].concat(M,x,d);void 0!==C&&R.push(C);var P=String(t.apply(void 0,R))}else P=m(E,d,x,M,C,t);x>=S&&(_+=d.slice(S,x)+P,S=x+E.length)}return _+d.slice(S)}];function m(e,t,r,o,a,s){var c=r+e.length,u=o.length,f=h;return void 0!==a&&(a=i(a),f=d),n.call(s,f,function(n,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(c);case"<":s=a[i.slice(1,-1)];break;default:var f=+i;if(0===f)return n;if(f>u){var d=l(f/10);return 0===d?n:d<=u?void 0===o[d-1]?i.charAt(1):o[d-1]+i.charAt(1):n}s=o[f-1]}return void 0===s?"":s})}})},function(e,t,n){"use strict";var r=n(5),i=n(136),o=n(78);n(79)("search",1,function(e,t,n,a){return[function(n){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=a(n,e,this);if(t.done)return t.value;var s=r(e),c=String(this),u=s.lastIndex;i(u,0)||(s.lastIndex=0);var f=o(s,c);return i(s.lastIndex,u)||(s.lastIndex=u),null===f?-1:f.index}]})},function(e,t,n){"use strict";var r=n(102),i=n(5),o=n(65),a=n(110),s=n(10),c=n(78),u=n(109),f=n(4),l=Math.min,d=[].push,h=!f(function(){RegExp(4294967295,"y")});n(79)("split",2,function(e,t,n,f){var p;return p="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,t){var i=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(i,e,t);for(var o,a,s,c=[],f=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,h=void 0===t?4294967295:t>>>0,p=new RegExp(e.source,f+"g");(o=u.call(p,i))&&!((a=p.lastIndex)>l&&(c.push(i.slice(l,o.index)),o.length>1&&o.index<i.length&&d.apply(c,o.slice(1)),s=o[0].length,l=a,c.length>=h));)p.lastIndex===o.index&&p.lastIndex++;return l===i.length?!s&&p.test("")||c.push(""):c.push(i.slice(l)),c.length>h?c.slice(0,h):c}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var i=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i,r):p.call(String(i),n,r)},function(e,t){var r=f(p,e,this,t,p!==n);if(r.done)return r.value;var u=i(e),d=String(this),m=o(u,RegExp),g=u.unicode,b=(u.ignoreCase?"i":"")+(u.multiline?"m":"")+(u.unicode?"u":"")+(h?"y":"g"),v=new m(h?u:"^(?:"+u.source+")",b),y=void 0===t?4294967295:t>>>0;if(0===y)return[];if(0===d.length)return null===c(v,d)?[d]:[];for(var w=0,_=0,S=[];_<d.length;){v.lastIndex=h?_:0;var k,E=c(v,h?d:d.slice(_));if(null===E||(k=l(s(v.lastIndex+(h?0:_)),d.length))===w)_=a(d,_,g);else{if(S.push(d.slice(w,_)),S.length===y)return S;for(var x=1;x<=E.length-1;x++)if(S.push(E[x]),S.length===y)return S;_=w=k}}return S.push(d.slice(w)),S}]})},function(e,t,n){var r=n(3),i=n(111).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==n(32)(a);e.exports=function(){var e,t,n,u=function(){var r,i;for(c&&(r=a.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(u)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var f=s.resolve(void 0);n=function(){f.then(u)}}else n=function(){i.call(r,u)};else{var l=!0,d=document.createTextNode("");new o(u).observe(d,{characterData:!0}),n=function(){d.data=l=!l}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){"use strict";var r=n(155),i=n(50);e.exports=n(82)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(i(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(i(this,"Map"),0===e?0:e,t)}},r,!0)},function(e,t,n){"use strict";var r=n(155),i=n(50);e.exports=n(82)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(i(this,"Set"),e=0===e?0:e,e)}},r)},function(e,t,n){"use strict";var r,i=n(3),o=n(30)(0),a=n(17),s=n(37),c=n(135),u=n(156),f=n(6),l=n(50),d=n(50),h=!i.ActiveXObject&&"ActiveXObject"in i,p=s.getWeak,m=Object.isExtensible,g=u.ufstore,b=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},v={get:function(e){if(f(e)){var t=p(e);return!0===t?g(l(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(l(this,"WeakMap"),e,t)}},y=e.exports=n(82)("WeakMap",b,v,u,!0,!0);d&&h&&(c((r=u.getConstructor(b,"WeakMap")).prototype,v),s.NEED=!0,o(["delete","has","get","set"],function(e){var t=y.prototype,n=t[e];a(t,e,function(t,i){if(f(t)&&!m(t)){this._f||(this._f=new r);var o=this._f[e](t,i);return"set"==e?this:o}return n.call(this,t,i)})}))},function(e,t,n){"use strict";var r=n(156),i=n(50);n(82)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(i(this,"WeakSet"),e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(0),i=n(83),o=n(112),a=n(5),s=n(45),c=n(10),u=n(6),f=n(3).ArrayBuffer,l=n(65),d=o.ArrayBuffer,h=o.DataView,p=i.ABV&&f.isView,m=d.prototype.slice,g=i.VIEW;r(r.G+r.W+r.F*(f!==d),{ArrayBuffer:d}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(e){return p&&p(e)||u(e)&&g in e}}),r(r.P+r.U+r.F*n(4)(function(){return!new d(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(e,t){if(void 0!==m&&void 0===t)return m.call(a(this),e);for(var n=a(this).byteLength,r=s(e,n),i=s(void 0===t?n:t,n),o=new(l(this,d))(c(i-r)),u=new h(this),f=new h(o),p=0;r<i;)f.setUint8(p++,u.getUint8(r++));return o}}),n(56)("ArrayBuffer")},function(e,t,n){var r=n(0);r(r.G+r.W+r.F*!n(83).ABV,{DataView:n(112).DataView})},function(e,t,n){n(34)("Int8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(34)("Uint8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(34)("Uint8",1,function(e){return function(t,n,r){return e(this,t,n,r)}},!0)},function(e,t,n){n(34)("Int16",2,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(34)("Uint16",2,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(34)("Int32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(34)("Uint32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(34)("Float32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(34)("Float64",8,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){var r=n(0),i=n(26),o=n(5),a=(n(3).Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!n(4)(function(){a(function(){})}),"Reflect",{apply:function(e,t,n){var r=i(e),c=o(n);return a?a(r,t,c):s.call(r,t,c)}})},function(e,t,n){var r=n(0),i=n(46),o=n(26),a=n(5),s=n(6),c=n(4),u=n(137),f=(n(3).Reflect||{}).construct,l=c(function(){function e(){}return!(f(function(){},[],e)instanceof e)}),d=!c(function(){f(function(){})});r(r.S+r.F*(l||d),"Reflect",{construct:function(e,t){o(e),a(t);var n=arguments.length<3?e:o(arguments[2]);if(d&&!l)return f(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(u.apply(e,r))}var c=n.prototype,h=i(s(c)?c:Object.prototype),p=Function.apply.call(e,h,t);return s(p)?p:h}})},function(e,t,n){var r=n(14),i=n(0),o=n(5),a=n(36);i(i.S+i.F*n(4)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(e,t,n){o(e),t=a(t,!0),o(n);try{return r.f(e,t,n),!0}catch(e){return!1}}})},function(e,t,n){var r=n(0),i=n(28).f,o=n(5);r(r.S,"Reflect",{deleteProperty:function(e,t){var n=i(o(e),t);return!(n&&!n.configurable)&&delete e[t]}})},function(e,t,n){"use strict";var r=n(0),i=n(5),o=function(e){this._t=i(e),this._i=0;var t,n=this._k=[];for(t in e)n.push(t)};n(144)(o,"Object",function(){var e,t=this._k;do{if(this._i>=t.length)return{value:void 0,done:!0}}while(!((e=t[this._i++])in this._t));return{value:e,done:!1}}),r(r.S,"Reflect",{enumerate:function(e){return new o(e)}})},function(e,t,n){var r=n(28),i=n(48),o=n(19),a=n(0),s=n(6),c=n(5);a(a.S,"Reflect",{get:function e(t,n){var a,u,f=arguments.length<3?t:arguments[2];return c(t)===f?t[n]:(a=r.f(t,n))?o(a,"value")?a.value:void 0!==a.get?a.get.call(f):void 0:s(u=i(t))?e(u,n,f):void 0}})},function(e,t,n){var r=n(28),i=n(0),o=n(5);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(o(e),t)}})},function(e,t,n){var r=n(0),i=n(48),o=n(5);r(r.S,"Reflect",{getPrototypeOf:function(e){return i(o(e))}})},function(e,t,n){var r=n(0);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(0),i=n(5),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return i(e),!o||o(e)}})},function(e,t,n){var r=n(0);r(r.S,"Reflect",{ownKeys:n(158)})},function(e,t,n){var r=n(0),i=n(5),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){i(e);try{return o&&o(e),!0}catch(e){return!1}}})},function(e,t,n){var r=n(14),i=n(28),o=n(48),a=n(19),s=n(0),c=n(41),u=n(5),f=n(6);s(s.S,"Reflect",{set:function e(t,n,s){var l,d,h=arguments.length<4?t:arguments[3],p=i.f(u(t),n);if(!p){if(f(d=o(t)))return e(d,n,s,h);p=c(0)}if(a(p,"value")){if(!1===p.writable||!f(h))return!1;if(l=i.f(h,n)){if(l.get||l.set||!1===l.writable)return!1;l.value=s,r.f(h,n,l)}else r.f(h,n,c(0,s));return!0}return void 0!==p.set&&(p.set.call(h,s),!0)}})},function(e,t,n){var r=n(0),i=n(93);i&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){i.check(e,t);try{return i.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){n(351),e.exports=n(11).Array.includes},function(e,t,n){"use strict";var r=n(0),i=n(73)(!0);r(r.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(49)("includes")},function(e,t,n){n(353),e.exports=n(11).Array.flatMap},function(e,t,n){"use strict";var r=n(0),i=n(354),o=n(16),a=n(10),s=n(26),c=n(146);r(r.P,"Array",{flatMap:function(e){var t,n,r=o(this);return s(e),t=a(r.length),n=c(r,0),i(n,r,r,t,0,1,e,arguments[1]),n}}),n(49)("flatMap")},function(e,t,n){"use strict";var r=n(75),i=n(6),o=n(10),a=n(25),s=n(8)("isConcatSpreadable");e.exports=function e(t,n,c,u,f,l,d,h){for(var p,m,g=f,b=0,v=!!d&&a(d,h,3);b<u;){if(b in c){if(p=v?v(c[b],b,n):c[b],m=!1,i(p)&&(m=void 0!==(m=p[s])?!!m:r(p)),m&&l>0)g=e(t,n,p,o(p.length),g,l-1)-1;else{if(g>=9007199254740991)throw TypeError();t[g]=p}g++}b++}return g}},function(e,t,n){n(356),e.exports=n(11).String.padStart},function(e,t,n){"use strict";var r=n(0),i=n(159),o=n(81),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*a,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){n(358),e.exports=n(11).String.padEnd},function(e,t,n){"use strict";var r=n(0),i=n(159),o=n(81),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*a,"String",{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){n(360),e.exports=n(11).String.trimLeft},function(e,t,n){"use strict";n(54)("trimLeft",function(e){return function(){return e(this,1)}},"trimStart")},function(e,t,n){n(362),e.exports=n(11).String.trimRight},function(e,t,n){"use strict";n(54)("trimRight",function(e){return function(){return e(this,2)}},"trimEnd")},function(e,t,n){n(364),e.exports=n(89).f("asyncIterator")},function(e,t,n){n(131)("asyncIterator")},function(e,t,n){n(366),e.exports=n(11).Object.getOwnPropertyDescriptors},function(e,t,n){var r=n(0),i=n(158),o=n(21),a=n(28),s=n(105);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,r=o(e),c=a.f,u=i(r),f={},l=0;u.length>l;)void 0!==(n=c(r,t=u[l++]))&&s(f,t,n);return f}})},function(e,t,n){n(368),e.exports=n(11).Object.values},function(e,t,n){var r=n(0),i=n(160)(!1);r(r.S,"Object",{values:function(e){return i(e)}})},function(e,t,n){n(370),e.exports=n(11).Object.entries},function(e,t,n){var r=n(0),i=n(160)(!0);r(r.S,"Object",{entries:function(e){return i(e)}})},function(e,t,n){"use strict";n(152),n(372),e.exports=n(11).Promise.finally},function(e,t,n){"use strict";var r=n(0),i=n(11),o=n(3),a=n(65),s=n(154);r(r.P+r.R,"Promise",{finally:function(e){var t=a(this,i.Promise||o.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then(function(){return n})}:e,n?function(n){return s(t,e()).then(function(){throw n})}:e)}})},function(e,t,n){n(374),n(375),n(376),e.exports=n(11)},function(e,t,n){var r=n(3),i=n(0),o=n(81),a=[].slice,s=/MSIE .\./.test(o),c=function(e){return function(t,n){var r=arguments.length>2,i=!!r&&a.call(arguments,2);return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,i)}:t,n)}};i(i.G+i.B+i.F*s,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(e,t,n){var r=n(0),i=n(111);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){for(var r=n(108),i=n(44),o=n(17),a=n(3),s=n(20),c=n(55),u=n(8),f=u("iterator"),l=u("toStringTag"),d=c.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(h),m=0;m<p.length;m++){var g,b=p[m],v=h[b],y=a[b],w=y&&y.prototype;if(w&&(w[f]||s(w,f,d),w[l]||s(w,l,b),c[b]=d,v))for(g in r)w[g]||o(w,g,r[g],!0)}},function(e,t,n){var r=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,n,r){var i=t&&t.prototype instanceof m?t:m,o=Object.create(i.prototype),a=new I(r||[]);return o._invoke=function(e,t,n){var r=f;return function(i,o){if(r===d)throw new Error("Generator is already running");if(r===h){if("throw"===i)throw o;return R()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var c=u(e,t,n);if("normal"===c.type){if(r=n.done?h:l,c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=h,n.method="throw",n.arg=c.arg)}}}(e,n,a),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f="suspendedStart",l="suspendedYield",d="executing",h="completed",p={};function m(){}function g(){}function b(){}var v={};v[o]=function(){return this};var y=Object.getPrototypeOf,w=y&&y(y(C([])));w&&w!==n&&r.call(w,o)&&(v=w);var _=b.prototype=m.prototype=Object.create(v);function S(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function k(e){var t;this._invoke=function(n,i){function o(){return new Promise(function(t,o){!function t(n,i,o,a){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?Promise.resolve(f.__await).then(function(e){t("next",e,o,a)},function(e){t("throw",e,o,a)}):Promise.resolve(f).then(function(e){c.value=e,o(c)},function(e){return t("throw",e,o,a)})}a(s.arg)}(n,i,t,o)})}return t=t?t.then(o,o):o()}}function E(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method))return p;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var i=u(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,p;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,p):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function C(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:R}}function R(){return{value:t,done:!0}}return g.prototype=_.constructor=b,b.constructor=g,b[s]=g.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(_),e},e.awrap=function(e){return{__await:e}},S(k.prototype),k.prototype[a]=function(){return this},e.AsyncIterator=k,e.async=function(t,n,r,i){var o=new k(c(t,n,r,i));return e.isGeneratorFunction(n)?o:o.next().then(function(e){return e.done?e.value:o.next()})},S(_),_[s]="Generator",_[o]=function(){return this},_.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=C,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;M(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:C(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),p}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.monitoring=t.sos=t.frontApplet=void 0;var r=n(379),i=n(547);t.frontApplet=r.default(window,"hug"),t.sos=t.frontApplet,t.monitoring=new i.default(t.frontApplet),window.sos=t.frontApplet,window.sosMonitoring=t.monitoring,t.default=t.frontApplet,e.exports=t.frontApplet,e.exports.default=t.frontApplet},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(380);t.default=function(e,t){return new r.default(e,t)}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var a=n(15),s=n(161),c=n(461),u=n(469),f=n(471),l=n(202),d=n(484),h=n(486),p=n(490),m=n(493),g=n(494),b=n(495),v=n(496),y=n(498),w=n(499),_=n(500),S=n(502),k=n(504),E=n(199),x=n(506),M=n(538),I=n(539),C=n(541),R=n(542),P=n(543),O=n(545),j=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.window=t,this.messagePrefix=n;var i=C.createExchange(n,this.postMessage.bind(this));this.readyEmitter=new a.EventEmitter,this.invocationResponseEmitter=new a.EventEmitter,this.debug=new v.default(this.window,n,this.postMessage.bind(this)),this.deviceInfo=new y.default(n,this.postMessage.bind(this)),this.display=new w.default(n,this.postMessage.bind(this)),this.stream=new u.default(n,this.postMessage.bind(this)),this.video=new c.default(n,this.postMessage.bind(this)),this.command=new d.default(this.messagePrefix,this.postMessage.bind(this)),this.hardware=new h.default(this.messagePrefix,this.postMessage.bind(this)),this.offline=new f.default(n,this.window,this.postMessage.bind(this)),this.browser=new p.default(i.createNamespaced("browser")),this.touch=new g.default(this.window,this.messagePrefix,this.postMessage.bind(this)),this.iframe=new m.default(this.window,this.messagePrefix,this,[this.touch.transformIframeData.bind(this.touch)]),this.input=new b.default(this.window,this.messagePrefix),this.timing=new _.default(this.messagePrefix,this.postMessage.bind(this)),this.sync=new S.default(this.messagePrefix,this.postMessage.bind(this)),this.fileSystem=new k.default(this.messagePrefix,this.postMessage.bind(this)),this.management=new x.default(n,this.postMessage.bind(this)),this.monitors=new M.default(n,this.postMessage.bind(this)),this.osd=new R.default(n,this.postMessage.bind(this)),this.proofOfPlay=new P.default(this.command),this.sensors=new I.default(n),this.native=new O.default(n,this.postMessage.bind(this)),this.javascriptLoadFileController=new l.default(this.window),this.window.addEventListener("message",function(e){return r.handleMessage(e)}),this.postMessage({type:n+"_api.ready"}),this.startPinging()}var t,n,j;return t=e,(n=[{key:"postMessage",value:function(e){var t=this,n=s.generateUniqueHash();return this.window.setTimeout(function(){var r;null===(r=t.window.parent)||void 0===r||r.postMessage(Object.assign({invocationUid:n},e),"*")}),new Promise(function(e,r){t.invocationResponseEmitter.once(n,function(t){t.error?t.error.error?r(E.createError(t.error.error)):r(t.error):e(t.success)})})}},{key:"onReady",value:function(e){var t=this;return new Promise(function(n){t.readyEmitter.once("ready",function(){n(),void 0!==e&&e()}),t.checkIfReady()})}},{key:"restore",value:function(){this.postMessage({type:this.getMessage("restore")}),this.removeMediaListeners(),this.forwardRestoreToFrontAppletWindows()}},{key:"refresh",value:function(){return o(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("applet_refresh")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"forwardRestoreToFrontAppletWindows",value:function(){var e={type:this.messagePrefix+"restore"};this.iframe.forwardToFrontAppletWindows(e)}},{key:"removeMediaListeners",value:function(){this.video.removeEventListeners(),this.stream.removeEventListeners(),this.sync.removeEventListeners(),this.input.removeEventListeners()}},{key:"checkIfReady",value:function(){void 0!==this.authHash&&void 0!==this.config&&null!==this.display.version&&this.readyEmitter.emit("ready")}},{key:"handleMessage",value:function(e){if("object"===r(e.data)){var t=e.source;if(t===this.window.parent){var n=e.data;switch(n.type){case this.getMessage("invocation.success"):this.invocationResponseEmitter.emit(n.invocationUid,{success:n});break;case this.getMessage("invocation.error"):this.invocationResponseEmitter.emit(n.invocationUid,{error:n});break;case this.getMessage("config.update"):this.config=n.config,this.checkIfReady();break;case this.getMessage("auth_hash.update"):this.authHash=n.authHash,this.checkIfReady();break;case this.getMessage("front_display_version.update"):this.display.version=n.version,this.checkIfReady();break;case this.getMessage("applet_version.update"):this.appletVersion=n.version;break;case this.getMessage("restore"):this.removeMediaListeners();break;case this.getMessage("assets.load_js"):this.javascriptLoadFileController.load(n.src,this.window.document.body);break;default:this.browser.handleMessageData(n),this.sync.handleMessageData(n),this.video.handleMessageData(n),this.stream.handleMessageData(n),this.input.handleMessageData(n),this.command.handleMessageData(n),this.fileSystem.handleMessageData(n),this.sensors.handleMessageData(n),this.management.wifi.handleMessageData(n),this.hardware.handleMessageData(n),this.touch.handleMessageData(n),this.debug.handleMessageData(n)}this.iframe.forwardToFrontAppletWindows(n)}else if(function(e){return Boolean(e)}(t)&&t!==this.window){var i=e.data;switch(i.type){case this.messagePrefix+"_loader.ready":this.iframe.registerFrontAppletLoaderWindow(t);break;case this.messagePrefix+"_api.ready":this.iframe.registerBundledFrontAppletWindow(t);break;default:this.iframe.forwardFromFrontAppletWindows(t,i)}}}}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}},{key:"startPinging",value:function(){var e=this,t=function(){return e.postMessage({type:e.getMessage("ping")})};this.window.setInterval(t,3e4),t()}}])&&i(t.prototype,n),j&&i(t,j),e}();t.default=j},function(e,t,n){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=u(e),a=r[0],s=r[1],c=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),f=0,l=s>0?a-4:a;for(n=0;n<l;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[f++]=t>>16&255,c[f++]=t>>8&255,c[f++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,c[f++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,c[f++]=t>>8&255,c[f++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(f(e,a,a+16383>s?s:a+16383));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,c=a.length;s<c;++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 f(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},function(e,t){t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,c=(1<<s)-1,u=c>>1,f=-7,l=n?i-1:0,d=n?-1:1,h=e[t+l];for(l+=d,o=h&(1<<-f)-1,h>>=-f,f+=s;f>0;o=256*o+e[t+l],l+=d,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=r;f>0;a=256*a+e[t+l],l+=d,f-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=u}return(h?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,c,u=8*o-i-1,f=(1<<u)-1,l=f>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+l>=1?d/c:d*Math.pow(2,1-l))*c>=2&&(a++,c/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(t*c-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=p,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[n+h]=255&a,h+=p,a/=256,u-=8);e[n+h-p]|=128*m}},function(e,t,n){var r=function(){try{return n(60)}catch(e){}}();(t=e.exports=n(165)).Stream=r||t,t.Readable=t,t.Writable=n(115),t.Duplex=n(51),t.Transform=n(117),t.PassThrough=n(166)},function(e,t){},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(386),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(38))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,o,a,s,c=1,u={},f=!1,l=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){p(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){p(e.data)},r=function(e){o.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(i=l.documentElement,r=function(e){var t=l.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(p,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&p(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return u[c]=i,r(c),c++},d.clearImmediate=h}function h(e){delete u[e]}function p(e){if(f)setTimeout(p,0,e);else{var t=u[e];if(t){f=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{h(e),f=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(38),n(35))},function(e,t,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.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,n(38))},function(e,t,n){var r=n(9),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?e.exports=r:(o(r,t),t.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)}},function(e,t,n){e.exports=n(115)},function(e,t,n){e.exports=n(51)},function(e,t,n){e.exports=n(117)},function(e,t,n){e.exports=n(166)},function(e,t,n){var r=n(1),i=n(61),o=n(2).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function f(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}r(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,l=0;l<16;++l)n[l]=e.readInt32BE(4*l);for(;l<80;++l)n[l]=n[l-3]^n[l-8]^n[l-14]^n[l-16];for(var d=0;d<80;++d){var h=~~(d/20),p=0|((t=r)<<5|t>>>27)+f(h,i,o,s)+c+n[d]+a[h];c=s,s=o,o=u(i),i=r,r=p}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},function(e,t,n){var r=n(1),i=n(61),o=n(2).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function f(e){return e<<30|e>>>2}function l(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}r(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,d=0;d<16;++d)n[d]=e.readInt32BE(4*d);for(;d<80;++d)n[d]=(t=n[d-3]^n[d-8]^n[d-14]^n[d-16])<<1|t>>>31;for(var h=0;h<80;++h){var p=~~(h/20),m=u(r)+l(p,i,o,s)+c+n[h]+a[p]|0;c=s,s=o,o=f(i),i=r,r=m}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},function(e,t,n){var r=n(1),i=n(167),o=n(61),a=n(2).Buffer,s=new Array(64);function c(){this.init(),this._w=s,o.call(this,64,56)}r(c,i),c.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},c.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=c},function(e,t,n){var r=n(1),i=n(168),o=n(61),a=n(2).Buffer,s=new Array(160);function c(){this.init(),this._w=s,o.call(this,128,112)}r(c,i),c.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},c.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=c},function(e,t,n){"use strict";var r=n(1),i=n(2).Buffer,o=n(39),a=i.alloc(128),s=64;function c(e,t){o.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>s?t=e(t):t.length<s&&(t=i.concat([t,a],s));for(var n=this._ipad=i.allocUnsafe(s),r=this._opad=i.allocUnsafe(s),c=0;c<s;c++)n[c]=54^t[c],r[c]=92^t[c];this._hash=[n]}r(c,o),c.prototype._update=function(e){this._hash.push(e)},c.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=c},function(e,t,n){e.exports=n(171)},function(e,t,n){(function(t,r){var i,o=n(173),a=n(174),s=n(175),c=n(2).Buffer,u=t.crypto&&t.crypto.subtle,f={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},l=[];function d(e,t,n,r,i){return u.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(e){return u.deriveBits({name:"PBKDF2",salt:t,iterations:n,hash:{name:i}},e,r<<3)}).then(function(e){return c.from(e)})}e.exports=function(e,n,h,p,m,g){"function"==typeof m&&(g=m,m=void 0);var b=f[(m=m||"sha1").toLowerCase()];if(!b||"function"!=typeof t.Promise)return r.nextTick(function(){var t;try{t=s(e,n,h,p,m)}catch(e){return g(e)}g(null,t)});if(o(e,n,h,p),"function"!=typeof g)throw new Error("No callback provided to pbkdf2");c.isBuffer(e)||(e=c.from(e,a)),c.isBuffer(n)||(n=c.from(n,a)),function(e,t){e.then(function(e){r.nextTick(function(){t(null,e)})},function(e){r.nextTick(function(){t(e)})})}(function(e){if(t.process&&!t.process.browser)return Promise.resolve(!1);if(!u||!u.importKey||!u.deriveBits)return Promise.resolve(!1);if(void 0!==l[e])return l[e];var n=d(i=i||c.alloc(8),i,10,128,e).then(function(){return!0}).catch(function(){return!1});return l[e]=n,n}(b).then(function(t){return t?d(e,n,h,p,b):s(e,n,h,p,m)}),g)}}).call(this,n(38),n(35))},function(e,t,n){var r=n(401),i=n(121),o=n(122),a=n(416),s=n(85);function c(e,t,n){if(e=e.toLowerCase(),o[e])return i.createCipheriv(e,t,n);if(a[e])return new r({key:t,iv:n,mode:e});throw new TypeError("invalid suite type")}function u(e,t,n){if(e=e.toLowerCase(),o[e])return i.createDecipheriv(e,t,n);if(a[e])return new r({key:t,iv:n,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var n,r;if(e=e.toLowerCase(),o[e])n=o[e].key,r=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");n=8*a[e].key,r=a[e].iv}var i=s(t,!1,n,r);return c(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=c,t.createDecipher=t.Decipher=function(e,t){var n,r;if(e=e.toLowerCase(),o[e])n=o[e].key,r=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");n=8*a[e].key,r=a[e].iv}var i=s(t,!1,n,r);return u(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=u,t.listCiphers=t.getCiphers=function(){return Object.keys(a).concat(i.getCiphers())}},function(e,t,n){var r=n(39),i=n(120),o=n(1),a=n(2).Buffer,s={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function c(e){r.call(this);var t,n=e.mode.toLowerCase(),i=s[n];t=e.decrypt?"decrypt":"encrypt";var o=e.key;a.isBuffer(o)||(o=a.from(o)),"des-ede"!==n&&"des-ede-cbc"!==n||(o=a.concat([o,o.slice(0,8)]));var c=e.iv;a.isBuffer(c)||(c=a.from(c)),this._des=i.create({key:o,iv:c,type:t})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],e.exports=c,o(c,r),c.prototype._update=function(e){return a.from(this._des.update(e))},c.prototype._final=function(){return a.from(this._des.final())}},function(e,t,n){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},t.ip=function(e,t,n,r){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}n[r+0]=i>>>0,n[r+1]=o>>>0},t.rip=function(e,t,n,r){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;n[r+0]=i>>>0,n[r+1]=o>>>0},t.pc1=function(e,t,n,r){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;n[r+0]=i>>>0,n[r+1]=o>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,i){for(var o=0,a=0,s=r.length>>>1,c=0;c<s;c++)o<<=1,o|=e>>>r[c]&1;for(c=s;c<r.length;c++)a<<=1,a|=t>>>r[c]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},t.expand=function(e,t,n){var r=0,i=0;r=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)r<<=6,r|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[n+0]=r>>>0,t[n+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var n=0,r=0;r<4;r++){n<<=4,n|=i[64*r+(e>>>18-6*r&63)]}for(r=0;r<4;r++){n<<=4,n|=i[256+64*r+(t>>>18-6*r&63)]}return n>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,n=0;n<o.length;n++)t<<=1,t|=e>>>o[n]&1;return t>>>0},t.padSplit=function(e,t,n){for(var r=e.toString(2);r.length<t;)r="0"+r;for(var i=[],o=0;o<t;o+=n)i.push(r.slice(o,o+n));return i.join(" ")}},function(e,t,n){"use strict";var r=n(22);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),r=0;r<n;r++)this.buffer[this.bufferOff+r]=e[t+r];return this.bufferOff+=n,n},i.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(e){var t=0,n=0,r=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(r*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(i,n)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,i,n),n+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},i.prototype._updateDecrypt=function(e){for(var t=0,n=0,r=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(r*this.blockSize);r>0;r--)t+=this._buffer(e,t),n+=this._flushBuffer(i,n);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,n;return e&&(t=this.update(e)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},i.prototype._unpad=function(e){return e},i.prototype._finalDecrypt=function(){r.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},function(e,t,n){"use strict";var r=n(22),i=n(1),o=n(120),a=o.utils,s=o.Cipher;function c(){this.tmp=new Array(2),this.keys=null}function u(e){s.call(this,e);var t=new c;this._desState=t,this.deriveKeys(t,e.key)}i(u,s),e.exports=u,u.create=function(e){return new u(e)};var f=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(e,t){e.keys=new Array(32),r.equal(t.length,this.blockSize,"Invalid key length");var n=a.readUInt32BE(t,0),i=a.readUInt32BE(t,4);a.pc1(n,i,e.tmp,0),n=e.tmp[0],i=e.tmp[1];for(var o=0;o<e.keys.length;o+=2){var s=f[o>>>1];n=a.r28shl(n,s),i=a.r28shl(i,s),a.pc2(n,i,e.keys,o)}},u.prototype._update=function(e,t,n,r){var i=this._desState,o=a.readUInt32BE(e,t),s=a.readUInt32BE(e,t+4);a.ip(o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,s,i.tmp,0):this._decrypt(i,o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],a.writeUInt32BE(n,o,r),a.writeUInt32BE(n,s,r+4)},u.prototype._pad=function(e,t){for(var n=e.length-t,r=t;r<e.length;r++)e[r]=n;return!0},u.prototype._unpad=function(e){for(var t=e[e.length-1],n=e.length-t;n<e.length;n++)r.equal(e[n],t);return e.slice(0,e.length-t)},u.prototype._encrypt=function(e,t,n,r,i){for(var o=t,s=n,c=0;c<e.keys.length;c+=2){var u=e.keys[c],f=e.keys[c+1];a.expand(s,e.tmp,0),u^=e.tmp[0],f^=e.tmp[1];var l=a.substitute(u,f),d=s;s=(o^a.permute(l))>>>0,o=d}a.rip(s,o,r,i)},u.prototype._decrypt=function(e,t,n,r,i){for(var o=n,s=t,c=e.keys.length-2;c>=0;c-=2){var u=e.keys[c],f=e.keys[c+1];a.expand(o,e.tmp,0),u^=e.tmp[0],f^=e.tmp[1];var l=a.substitute(u,f),d=o;o=(s^a.permute(l))>>>0,s=d}a.rip(o,s,r,i)}},function(e,t,n){"use strict";var r=n(22),i=n(1),o={};function a(e){r.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}t.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}i(t,e);for(var n=Object.keys(o),r=0;r<n.length;r++){var a=n[r];t.prototype[a]=o[a]}return t.create=function(e){return new t(e)},t},o._cbcInit=function(){var e=new a(this.options.iv);this._cbcState=e},o._update=function(e,t,n,r){var i=this._cbcState,o=this.constructor.super_.prototype,a=i.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)a[s]^=e[t+s];o._update.call(this,a,0,n,r);for(s=0;s<this.blockSize;s++)a[s]=n[r+s]}else{o._update.call(this,e,t,n,r);for(s=0;s<this.blockSize;s++)n[r+s]^=a[s];for(s=0;s<this.blockSize;s++)a[s]=e[t+s]}}},function(e,t,n){"use strict";var r=n(22),i=n(1),o=n(120),a=o.Cipher,s=o.DES;function c(e,t){r.equal(t.length,24,"Invalid key length");var n=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:n}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:o})]:[s.create({type:"decrypt",key:o}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:n})]}function u(e){a.call(this,e);var t=new c(this.type,this.options.key);this._edeState=t}i(u,a),e.exports=u,u.create=function(e){return new u(e)},u.prototype._update=function(e,t,n,r){var i=this._edeState;i.ciphers[0]._update(e,t,n,r),i.ciphers[1]._update(n,r,n,r),i.ciphers[2]._update(n,r,n,r)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},function(e,t,n){var r=n(122),i=n(179),o=n(2).Buffer,a=n(180),s=n(39),c=n(84),u=n(85);function f(e,t,n){s.call(this),this._cache=new d,this._cipher=new c.AES(t),this._prev=o.from(n),this._mode=e,this._autopadding=!0}n(1)(f,s),f.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get();)n=this._mode.encrypt(this,t),r.push(n);return o.concat(r)};var l=o.alloc(16,16);function d(){this.cache=o.allocUnsafe(0)}function h(e,t,n){var s=r[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof n&&(n=o.from(n)),"GCM"!==s.mode&&n.length!==s.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===s.type?new a(s.module,t,n):"auth"===s.type?new i(s.module,t,n):new f(s.module,t,n)}f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=o.concat([this.cache,e])},d.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),n=-1;++n<e;)t.writeUInt8(e,n);return o.concat([this.cache,t])},t.createCipheriv=h,t.createCipher=function(e,t){var n=r[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var i=u(t,!1,n.key,n.iv);return h(e,i.key,i.iv)}},function(e,t){t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},function(e,t,n){var r=n(68);t.encrypt=function(e,t){var n=r(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},t.decrypt=function(e,t){var n=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return r(i,n)}},function(e,t,n){var r=n(2).Buffer,i=n(68);function o(e,t,n){var o=t.length,a=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=r.concat([e._prev,n?t:a]),a}t.encrypt=function(e,t,n){for(var i,a=r.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=r.allocUnsafe(0)),!(e._cache.length<=t.length)){a=r.concat([a,o(e,t,n)]);break}i=e._cache.length,a=r.concat([a,o(e,t.slice(0,i),n)]),t=t.slice(i)}return a}},function(e,t,n){var r=n(2).Buffer;function i(e,t,n){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=r.concat([e._prev.slice(1),r.from([n?t:i])]),i}t.encrypt=function(e,t,n){for(var o=t.length,a=r.allocUnsafe(o),s=-1;++s<o;)a[s]=i(e,t[s],n);return a}},function(e,t,n){var r=n(2).Buffer;function i(e,t,n){for(var r,i,a=-1,s=0;++a<8;)r=t&1<<7-a?128:0,s+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^r))>>a%8,e._prev=o(e._prev,n?r:i);return s}function o(e,t){var n=e.length,i=-1,o=r.allocUnsafe(e.length);for(e=r.concat([e,r.from([t])]);++i<n;)o[i]=e[i]<<1|e[i+1]>>7;return o}t.encrypt=function(e,t,n){for(var o=t.length,a=r.allocUnsafe(o),s=-1;++s<o;)a[s]=i(e,t[s],n);return a}},function(e,t,n){(function(e){var r=n(68);function i(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(t,n){for(;t._cache.length<n.length;)t._cache=e.concat([t._cache,i(t)]);var o=t._cache.slice(0,n.length);return t._cache=t._cache.slice(n.length),r(n,o)}}).call(this,n(9).Buffer)},function(e,t,n){var r=n(2).Buffer,i=r.alloc(16,0);function o(e){var t=r.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},a.prototype._multiply=function(){for(var e,t,n,r=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],a=-1;++a<128;){for(0!=(this.state[~~(a/8)]&1<<7-a%8)&&(i[0]^=r[0],i[1]^=r[1],i[2]^=r[2],i[3]^=r[3]),n=0!=(1&r[3]),t=3;t>0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,n&&(r[0]=r[0]^225<<24)}this.state=o(i)},a.prototype.update=function(e){var t;for(this.cache=r.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(r.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=a},function(e,t,n){var r=n(179),i=n(2).Buffer,o=n(122),a=n(180),s=n(39),c=n(84),u=n(85);function f(e,t,n){s.call(this),this._cache=new l,this._last=void 0,this._cipher=new c.AES(t),this._prev=i.from(n),this._mode=e,this._autopadding=!0}function l(){this.cache=i.allocUnsafe(0)}function d(e,t,n){var s=o[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=i.from(n)),"GCM"!==s.mode&&n.length!==s.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof t&&(t=i.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===s.type?new a(s.module,t,n,!0):"auth"===s.type?new r(s.module,t,n,!0):new f(s.module,t,n)}n(1)(f,s),f.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,t),r.push(n);return i.concat(r)},f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var n=-1;for(;++n<t;)if(e[n+(16-t)]!==t)throw new Error("unable to decrypt data");if(16===t)return;return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},l.prototype.add=function(e){this.cache=i.concat([this.cache,e])},l.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},l.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var n=o[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=u(t,!1,n.key,n.iv);return d(e,r.key,r.iv)},t.createDecipheriv=d},function(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},function(e,t,n){(function(e){var r=n(181),i=n(420),o=n(421);var a={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(t){var n=new e(i[t].prime,"hex"),r=new e(i[t].gen,"hex");return new o(n,r)},t.createDiffieHellman=t.DiffieHellman=function t(n,i,s,c){return e.isBuffer(i)||void 0===a[i]?t(n,"binary",i,s):(i=i||"binary",c=c||"binary",s=s||new e([2]),e.isBuffer(s)||(s=new e(s,c)),"number"==typeof n?new o(r(n,s),s,!0):(e.isBuffer(n)||(n=new e(n,i)),new o(n,s,!0)))}}).call(this,n(9).Buffer)},function(e,t){},function(e,t){},function(e){e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(e,t,n){(function(t){var r=n(12),i=new(n(183)),o=new r(24),a=new r(11),s=new r(10),c=new r(3),u=new r(7),f=n(181),l=n(59);function d(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this._pub=new r(e),this}function h(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this._priv=new r(e),this}e.exports=m;var p={};function m(e,t,n){this.setGenerator(t),this.__prime=new r(e),this._prime=r.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=d,this.setPrivateKey=h):this._primeCode=8}function g(e,n){var r=new t(e.toArray());return n?r.toString(n):r}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var n=t.toString("hex"),r=[n,e.toString(16)].join("_");if(r in p)return p[r];var l,d=0;if(e.isEven()||!f.simpleSieve||!f.fermatTest(e)||!i.test(e))return d+=1,d+="02"===n||"05"===n?8:4,p[r]=d,d;switch(i.test(e.shrn(1))||(d+=2),n){case"02":e.mod(o).cmp(a)&&(d+=8);break;case"05":(l=e.mod(s)).cmp(c)&&l.cmp(u)&&(d+=8);break;default:d+=4}return p[r]=d,d}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new r(l(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(e){var n=(e=(e=new r(e)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new t(n.toArray()),o=this.getPrime();if(i.length<o.length){var a=new t(o.length-i.length);a.fill(0),i=t.concat([a,i])}return i},m.prototype.getPublicKey=function(e){return g(this._pub,e)},m.prototype.getPrivateKey=function(e){return g(this._priv,e)},m.prototype.getPrime=function(e){return g(this.__prime,e)},m.prototype.getGenerator=function(e){return g(this._gen,e)},m.prototype.setGenerator=function(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this.__gen=e,this._gen=new r(e),this}}).call(this,n(9).Buffer)},function(e,t,n){(function(t){var r=n(66),i=n(60),o=n(1),a=n(423),s=n(455),c=n(171);function u(e){i.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=r(t.hash),this._tag=t.id,this._signType=t.sign}function f(e){i.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=r(t.hash),this._tag=t.id,this._signType=t.sign}function l(e){return new u(e)}function d(e){return new f(e)}Object.keys(c).forEach(function(e){c[e].id=new t(c[e].id,"hex"),c[e.toLowerCase()]=c[e]}),o(u,i.Writable),u.prototype._write=function(e,t,n){this._hash.update(e),n()},u.prototype.update=function(e,n){return"string"==typeof e&&(e=new t(e,n)),this._hash.update(e),this},u.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),r=a(n,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},o(f,i.Writable),f.prototype._write=function(e,t,n){this._hash.update(e),n()},f.prototype.update=function(e,n){return"string"==typeof e&&(e=new t(e,n)),this._hash.update(e),this},f.prototype.verify=function(e,n,r){"string"==typeof n&&(n=new t(n,r)),this.end();var i=this._hash.digest();return s(n,i,e,this._signType,this._tag)},e.exports={Sign:l,Verify:d,createSign:l,createVerify:d}}).call(this,n(9).Buffer)},function(e,t,n){(function(t){var r=n(169),i=n(124),o=n(125).ec,a=n(12),s=n(87),c=n(193);function u(e,n,i,o){if((e=new t(e.toArray())).length<n.byteLength()){var a=new t(n.byteLength()-e.length);a.fill(0),e=t.concat([a,e])}var s=i.length,c=function(e,n){e=(e=f(e,n)).mod(n);var r=new t(e.toArray());if(r.length<n.byteLength()){var i=new t(n.byteLength()-r.length);i.fill(0),r=t.concat([i,r])}return r}(i,n),u=new t(s);u.fill(1);var l=new t(s);return l.fill(0),l=r(o,l).update(u).update(new t([0])).update(e).update(c).digest(),u=r(o,l).update(u).digest(),{k:l=r(o,l).update(u).update(new t([1])).update(e).update(c).digest(),v:u=r(o,l).update(u).digest()}}function f(e,t){var n=new a(e),r=(e.length<<3)-t.bitLength();return r>0&&n.ishrn(r),n}function l(e,n,i){var o,a;do{for(o=new t(0);8*o.length<e.bitLength();)n.v=r(i,n.k).update(n.v).digest(),o=t.concat([o,n.v]);a=f(o,e),n.k=r(i,n.k).update(n.v).update(new t([0])).digest(),n.v=r(i,n.k).update(n.v).digest()}while(-1!==a.cmp(e));return a}function d(e,t,n,r){return e.toRed(a.mont(n)).redPow(t).fromRed().mod(r)}e.exports=function(e,n,r,h,p){var m=s(n);if(m.curve){if("ecdsa"!==h&&"ecdsa/rsa"!==h)throw new Error("wrong private key type");return function(e,n){var r=c[n.curve.join(".")];if(!r)throw new Error("unknown curve "+n.curve.join("."));var i=new o(r).keyFromPrivate(n.privateKey).sign(e);return new t(i.toDER())}(e,m)}if("dsa"===m.type){if("dsa"!==h)throw new Error("wrong private key type");return function(e,n,r){var i,o=n.params.priv_key,s=n.params.p,c=n.params.q,h=n.params.g,p=new a(0),m=f(e,c).mod(c),g=!1,b=u(o,c,e,r);for(;!1===g;)i=l(c,b,r),p=d(h,i,s,c),0===(g=i.invm(c).imul(m.add(o.mul(p))).mod(c)).cmpn(0)&&(g=!1,p=new a(0));return function(e,n){e=e.toArray(),n=n.toArray(),128&e[0]&&(e=[0].concat(e));128&n[0]&&(n=[0].concat(n));var r=[48,e.length+n.length+4,2,e.length];return r=r.concat(e,[2,n.length],n),new t(r)}(p,g)}(e,m,r)}if("rsa"!==h&&"ecdsa/rsa"!==h)throw new Error("wrong private key type");e=t.concat([p,e]);for(var g=m.modulus.byteLength(),b=[0,1];e.length+b.length+1<g;)b.push(255);b.push(0);for(var v=-1;++v<e.length;)b.push(e[v]);return i(b,m)},e.exports.getKey=u,e.exports.makeKey=l}).call(this,n(9).Buffer)},function(e){e.exports=JSON.parse('{"_args":[["elliptic@6.5.0","/builds/signageos/display/front-applet"]],"_development":true,"_from":"elliptic@6.5.0","_id":"elliptic@6.5.0","_inBundle":false,"_integrity":"sha512-eFOJTMyCYb7xtE/caJ6JJu+bhi67WCYNbkGSknu20pmM8Ke/bqOfdnZWxyoGN26JgfxTbXrsCkEw4KheCT/KGg==","_location":"/elliptic","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"elliptic@6.5.0","name":"elliptic","escapedName":"elliptic","rawSpec":"6.5.0","saveSpec":null,"fetchSpec":"6.5.0"},"_requiredBy":["/browserify-sign","/create-ecdh"],"_resolved":"https://signageos-524256255273.d.codeartifact.eu-central-1.amazonaws.com/npm/private/elliptic/-/elliptic-6.5.0.tgz","_spec":"6.5.0","_where":"/builds/signageos/display/front-applet","author":{"name":"Fedor Indutny","email":"fedor@indutny.com"},"bugs":{"url":"https://github.com/indutny/elliptic/issues"},"dependencies":{"bn.js":"^4.4.0","brorand":"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0","inherits":"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},"description":"EC cryptography","devDependencies":{"brfs":"^1.4.3","coveralls":"^2.11.3","grunt":"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2","istanbul":"^0.4.2","jscs":"^2.9.0","jshint":"^2.6.0","mocha":"^2.1.0"},"files":["lib"],"homepage":"https://github.com/indutny/elliptic","keywords":["EC","Elliptic","curve","Cryptography"],"license":"MIT","main":"lib/elliptic.js","name":"elliptic","repository":{"type":"git","url":"git+ssh://git@github.com/indutny/elliptic.git"},"scripts":{"jscs":"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js","jshint":"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js","lint":"npm run jscs && npm run jshint","test":"npm run lint && npm run unit","unit":"istanbul test _mocha --reporter=spec test/index.js","version":"grunt dist && git add dist/"},"version":"6.5.0"}')},function(e,t,n){"use strict";var r=n(23),i=n(12),o=n(1),a=n(86),s=r.assert;function c(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(e,t,n,r){a.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(e,t,n,r){a.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(n,16),this.z=new i(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(c,a),e.exports=c,c.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)n=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?n=o[0]:(n=o[1],s(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:n,basis:e.basis?e.basis.map(function(e){return{a:new i(e.a,16),b:new i(e.b,16)}}):this._getEndoBasis(n)}}},c.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),n=new i(2).toRed(t).redInvm(),r=n.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(n);return[r.redAdd(o).fromRed(),r.redSub(o).fromRed()]},c.prototype._getEndoBasis=function(e){for(var t,n,r,o,a,s,c,u,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,h=this.n.clone(),p=new i(1),m=new i(0),g=new i(0),b=new i(1),v=0;0!==d.cmpn(0);){var y=h.div(d);u=h.sub(y.mul(d)),f=g.sub(y.mul(p));var w=b.sub(y.mul(m));if(!r&&u.cmp(l)<0)t=c.neg(),n=p,r=u.neg(),o=f;else if(r&&2==++v)break;c=u,h=d,d=u,g=p,p=f,b=m,m=w}a=u.neg(),s=f;var _=r.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(_)>=0&&(a=t,s=n),r.negative&&(r=r.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:r,b:o},{a:a,b:s}]},c.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],i=r.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=i.mul(n.a),s=o.mul(r.a),c=i.mul(n.b),u=o.mul(r.b);return{k1:e.sub(a).sub(s),k2:c.add(u).neg()}},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var o=r.fromRed().isOdd();return(t&&!o||!t&&o)&&(r=r.redNeg()),this.point(e,r)},c.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),s=e[o],c=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),c=c.neg(!0)),r[2*o]=s,r[2*o+1]=c,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var u=this._wnafMulAdd(1,r,i,2*o,n),f=0;f<2*o;f++)r[f]=null,i[f]=null;return u},o(u,a.BasePoint),c.prototype.point=function(e,t,n){return new u(this,e,t,n)},c.prototype.pointFromJSON=function(e,t){return u.fromJSON(this,e,t)},u.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},u.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},u.fromJSON=function(e,t,n){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);if(!t[2])return r;function i(t){return e.point(t[0],t[1],n)}var o=t[2];return r.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[r].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[r].concat(o.naf.points.map(i))}},r},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},u.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return e=new i(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},u.prototype.jmulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},u.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},u.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(f,a.BasePoint),c.prototype.jpoint=function(e,t,n){return new f(this,e,t,n)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),i=e.x.redMul(n),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),s=r.redSub(i),c=o.redSub(a);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),f=u.redMul(s),l=r.redMul(u),d=c.redSqr().redIAdd(f).redISub(l).redISub(l),h=c.redMul(l.redISub(d)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,h,p)},f.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=n.redSub(r),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),f=n.redMul(c),l=s.redSqr().redIAdd(u).redISub(f).redISub(f),d=s.redMul(f.redISub(l)).redISub(i.redMul(u)),h=this.z.redMul(a);return this.curve.jpoint(l,d,h)},f.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,n=0;n<e;n++)t=t.dbl();return t}var r=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,c=s.redSqr().redSqr(),u=a.redAdd(a);for(n=0;n<e;n++){var f=o.redSqr(),l=u.redSqr(),d=l.redSqr(),h=f.redAdd(f).redIAdd(f).redIAdd(r.redMul(c)),p=o.redMul(l),m=h.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),b=h.redMul(g);b=b.redIAdd(b).redISub(d);var v=u.redMul(s);n+1<e&&(c=c.redMul(d)),o=m,s=v,u=b}return this.curve.jpoint(o,u.redMul(i),s)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(r).redISub(o);a=a.redIAdd(a);var s=r.redAdd(r).redIAdd(r),c=s.redSqr().redISub(a).redISub(a),u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),e=c,t=s.redMul(a.redISub(c)).redISub(u),n=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),l=this.y.redSqr(),d=l.redSqr(),h=this.x.redAdd(l).redSqr().redISub(f).redISub(d);h=h.redIAdd(h);var p=f.redAdd(f).redIAdd(f),m=p.redSqr(),g=d.redIAdd(d);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(h).redISub(h),t=p.redMul(h.redISub(e)).redISub(g),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(e,t,n)},f.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(r).redISub(o);a=a.redIAdd(a);var s=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),c=s.redSqr().redISub(a).redISub(a);e=c;var u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),t=s.redMul(a.redISub(c)).redISub(u),n=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),l=this.y.redSqr(),d=this.x.redMul(l),h=this.x.redSub(f).redMul(this.x.redAdd(f));h=h.redAdd(h).redIAdd(h);var p=d.redIAdd(d),m=(p=p.redIAdd(p)).redAdd(p);e=h.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(l).redISub(f);var g=l.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=h.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,n)},f.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),o=t.redSqr(),a=n.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),c=t.redAdd(t),u=(c=c.redIAdd(c)).redMul(a),f=s.redSqr().redISub(u.redAdd(u)),l=u.redISub(f),d=a.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=s.redMul(l).redISub(d),p=n.redAdd(n).redMul(r);return this.curve.jpoint(f,h,p)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(r),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),c=r.redIAdd(r);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var u=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(c),f=t.redMul(u);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.x.redMul(s).redISub(f);l=(l=l.redIAdd(l)).redIAdd(l);var d=this.y.redMul(u.redMul(c.redISub(u)).redISub(a.redMul(s)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=this.z.redAdd(a).redSqr().redISub(n).redISub(s);return this.curve.jpoint(l,d,h)},f.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},f.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),n=e.z.redSqr();if(0!==this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),i=n.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(r)).cmpn(0)},f.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(n))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,n){"use strict";var r=n(12),i=n(1),o=n(86),a=n(23);function s(e){o.call(this,"mont",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(e.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,n){o.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(t,16),this.z=new r(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),r=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},i(c,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new c(this,e,t)},s.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(e,t){return new c(e,t[0],t[1]||e.one)},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),r=e.redMul(t),i=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(n),a=i.redMul(r),s=t.z.redMul(o.redAdd(a).redSqr()),c=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,c)},c.prototype.mul=function(e){for(var t=e.clone(),n=this,r=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,n){"use strict";var r=n(23),i=n(12),o=n(1),a=n(86),s=r.assert;function c(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function u(e,t,n,r,o){a.BasePoint.call(this,e,"projective"),null===t&&null===n&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(n,16),this.z=r?new i(r,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(c,a),e.exports=c,c.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},c.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},c.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=this.c2.redSub(this.a.redMul(n)),o=this.one.redSub(this.c2.redMul(this.d).redMul(n)),a=r.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var c=s.fromRed().isOdd();return(t&&!c||!t&&c)&&(s=s.redNeg()),this.point(e,s)},c.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=n.redSub(this.c2),o=n.redMul(this.d).redMul(this.c2).redSub(this.a),a=r.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},c.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),r=t.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return 0===r.cmp(i)},o(u,a.BasePoint),c.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},c.prototype.point=function(e,t,n,r){return new u(this,e,t,n,r)},u.fromJSON=function(e,t){return new u(e,t[0],t[1],t[2])},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=r.redAdd(t),a=o.redSub(n),s=r.redSub(t),c=i.redMul(a),u=o.redMul(s),f=i.redMul(s),l=a.redMul(o);return this.curve.point(c,u,l,f)},u.prototype._projDbl=function(){var e,t,n,r=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var a=(u=this.curve._mulA(i)).redAdd(o);if(this.zOne)e=r.redSub(i).redSub(o).redMul(a.redSub(this.curve.two)),t=a.redMul(u.redSub(o)),n=a.redSqr().redSub(a).redSub(a);else{var s=this.z.redSqr(),c=a.redSub(s).redISub(s);e=r.redSub(i).redISub(o).redMul(c),t=a.redMul(u.redSub(o)),n=a.redMul(c)}}else{var u=i.redAdd(o);s=this.curve._mulC(this.z).redSqr(),c=u.redSub(s).redSub(s);e=this.curve._mulC(r.redISub(u)).redMul(c),t=this.curve._mulC(u).redMul(i.redISub(o)),n=u.redMul(c)}return this.curve.point(e,t,n)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=n.redSub(t),a=i.redSub(r),s=i.redAdd(r),c=n.redAdd(t),u=o.redMul(a),f=s.redMul(c),l=o.redMul(c),d=a.redMul(s);return this.curve.point(u,f,d,l)},u.prototype._projAdd=function(e){var t,n,r=this.z.redMul(e.z),i=r.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),c=i.redSub(s),u=i.redAdd(s),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),l=r.redMul(c).redMul(f);return this.curve.twisted?(t=r.redMul(u).redMul(a.redSub(this.curve._mulA(o))),n=c.redMul(u)):(t=r.redMul(u).redMul(a.redSub(o)),n=this.curve._mulC(c).redMul(u)),this.curve.point(l,t,n)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},u.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},function(e,t,n){"use strict";t.sha1=n(429),t.sha224=n(430),t.sha256=n(187),t.sha384=n(431),t.sha512=n(188)},function(e,t,n){"use strict";var r=n(31),i=n(69),o=n(186),a=r.rotl32,s=r.sum32,c=r.sum32_5,u=o.ft_1,f=i.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(d,f),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=a(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],o=this.h[1],f=this.h[2],d=this.h[3],h=this.h[4];for(r=0;r<n.length;r++){var p=~~(r/20),m=c(a(i,5),u(p,o,f,d),h,n[r],l[p]);h=d,d=f,f=a(o,30),o=i,i=m}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],f),this.h[3]=s(this.h[3],d),this.h[4]=s(this.h[4],h)},d.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){"use strict";var r=n(31),i=n(187);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},function(e,t,n){"use strict";var r=n(31),i=n(188);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},function(e,t,n){"use strict";var r=n(31),i=n(69),o=r.rotl32,a=r.sum32,s=r.sum32_3,c=r.sum32_4,u=i.BlockHash;function f(){if(!(this instanceof f))return new f;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}r.inherits(f,u),t.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],i=this.h[2],u=this.h[3],f=this.h[4],v=n,y=r,w=i,_=u,S=f,k=0;k<80;k++){var E=a(o(c(n,l(k,r,i,u),e[p[k]+t],d(k)),g[k]),f);n=f,f=u,u=o(i,10),i=r,r=E,E=a(o(c(v,l(79-k,y,w,_),e[m[k]+t],h(k)),b[k]),S),v=S,S=_,_=o(w,10),w=y,y=E}E=s(this.h[1],i,_),this.h[1]=s(this.h[2],u,S),this.h[2]=s(this.h[3],f,v),this.h[3]=s(this.h[4],n,y),this.h[4]=s(this.h[0],r,w),this.h[0]=E},f.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],b=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(e,t,n){"use strict";var r=n(31),i=n(22);function o(e,t,n){if(!(this instanceof o))return new o(e,t,n);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(t,n))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},function(e,t){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(e,t,n){"use strict";var r=n(12),i=n(436),o=n(23),a=n(126),s=n(123),c=o.assert,u=n(437),f=n(438);function l(e){if(!(this instanceof l))return new l(e);"string"==typeof e&&(c(a.hasOwnProperty(e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=l,l.prototype.keyPair=function(e){return new u(this,e)},l.prototype.keyFromPrivate=function(e,t){return u.fromPrivate(this,e,t)},l.prototype.keyFromPublic=function(e,t){return u.fromPublic(this,e,t)},l.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),o=this.n.sub(new r(2));;){var a=new r(t.generate(n));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},l.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},l.prototype.sign=function(e,t,n,o){"object"==typeof n&&(o=n,n=null),o||(o={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new r(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),c=e.toArray("be",a),u=new i({hash:this.hash,entropy:s,nonce:c,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new r(1)),d=0;;d++){var h=o.k?o.k(d):new r(u.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(l)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var b=h.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(b=b.umod(this.n)).cmpn(0)){var v=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),v^=1),new f({r:g,s:b,recoveryParam:v})}}}}}},l.prototype.verify=function(e,t,n,i){e=this._truncateToN(new r(e,16)),n=this.keyFromPublic(n,i);var o=(t=new f(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,c=a.invm(this.n),u=c.mul(e).umod(this.n),l=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,n.getPublic(),l)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(u,n.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},l.prototype.recoverPubKey=function(e,t,n,i){c((3&n)===n,"The recovery param is more than two bits"),t=new f(t,i);var o=this.n,a=new r(e),s=t.r,u=t.s,l=1&n,d=n>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");s=d?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var h=t.r.invm(o),p=o.sub(a).mul(h).umod(o),m=u.mul(h).umod(o);return this.g.mulAdd(p,s,m)},l.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new f(t,r)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(n))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t,n){"use strict";var r=n(127),i=n(184),o=n(22);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),n=i.toArray(e.nonce,e.nonceEnc||"hex"),r=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}e.exports=a,a.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new r.hmac(this.hash,this.K)},a.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(e,t,n,r){"string"!=typeof t&&(r=n,n=t,t=null),e=i.toArray(e,t),n=i.toArray(n,r),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},a.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=n,n=t,t=null),n&&(n=i.toArray(n,r||"hex"),this._update(n));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var a=o.slice(0,e);return this._update(n),this._reseed++,i.encode(a,t)}},function(e,t,n){"use strict";var r=n(12),i=n(23).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,n){return t instanceof o?t:new o(e,{pub:t,pubEnc:n})},o.fromPrivate=function(e,t,n){return t instanceof o?t:new o(e,{priv:t,privEnc:n})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.mul(this.priv).getX()},o.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(e,t,n){"use strict";var r=n(12),i=n(23),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new r(e.r,16),this.s=new r(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function c(e,t){var n=e[t.place++];if(!(128&n))return n;for(var r=15&n,i=0,o=0,a=t.place;o<r;o++,a++)i<<=8,i|=e[a];return t.place=a,i}function u(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function f(e,t){if(t<128)e.push(t);else{var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var n=new s;if(48!==e[n.place++])return!1;if(c(e,n)+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var o=c(e,n),a=e.slice(n.place,o+n.place);if(n.place+=o,2!==e[n.place++])return!1;var u=c(e,n);if(e.length!==u+n.place)return!1;var f=e.slice(n.place,u+n.place);return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===f[0]&&128&f[1]&&(f=f.slice(1)),this.r=new r(a),this.s=new r(f),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=u(t),n=u(n);!(n[0]||128&n[1]);)n=n.slice(1);var r=[2];f(r,t.length),(r=r.concat(t)).push(2),f(r,n.length);var o=r.concat(n),a=[48];return f(a,o.length),a=a.concat(o),i.encode(a,e)}},function(e,t,n){"use strict";var r=n(127),i=n(126),o=n(23),a=o.assert,s=o.parseBytes,c=n(440),u=n(441);function f(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof f))return new f(e);e=i[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512}e.exports=f,f.prototype.sign=function(e,t){e=s(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),i=this.g.mul(r),o=this.encodePoint(i),a=this.hashInt(o,n.pubBytes(),e).mul(n.priv()),c=r.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:c,Rencoded:o})},f.prototype.verify=function(e,t,n){e=s(e),t=this.makeSignature(t);var r=this.keyFromPublic(n),i=this.hashInt(t.Rencoded(),r.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(r.pub().mul(i)).eq(o)},f.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(e){return c.fromPublic(this,e)},f.prototype.keyFromSecret=function(e){return c.fromSecret(this,e)},f.prototype.makeSignature=function(e){return e instanceof u?e:new u(this,e)},f.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},f.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,n=e.slice(0,t).concat(-129&e[t]),r=0!=(128&e[t]),i=o.intFromLE(n);return this.curve.pointFromY(i,r)},f.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(e){return o.intFromLE(e)},f.prototype.isPoint=function(e){return e instanceof this.pointClass}},function(e,t,n){"use strict";var r=n(23),i=r.assert,o=r.parseBytes,a=r.cachedProperty;function s(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),a(s,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),a(s,"privBytes",function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r}),a(s,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),a(s,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),a(s,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),r.encode(this.secret(),e)},s.prototype.getPublic=function(e){return r.encode(this.pubBytes(),e)},e.exports=s},function(e,t,n){"use strict";var r=n(12),i=n(23),o=i.assert,a=i.cachedProperty,s=i.parseBytes;function c(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof r&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}a(c,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),a(c,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),a(c,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),a(c,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),c.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},c.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=c},function(e,t,n){"use strict";var r=n(70);t.certificate=n(452);var i=r.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});t.RSAPrivateKey=i;var o=r.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});t.RSAPublicKey=o;var a=r.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())});t.PublicKey=a;var s=r.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),c=r.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())});t.PrivateKey=c;var u=r.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});t.EncryptedPrivateKey=u;var f=r.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});t.DSAPrivateKey=f,t.DSAparam=r.define("DSAparam",function(){this.int()});var l=r.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())});t.ECPrivateKey=l;var d=r.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});t.signature=r.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},function(e,t,n){var r=n(70),i=n(1);function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(e){var t;try{t=n(444).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return i(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(r.decoders[e])),this.decoders[e]},o.prototype.decode=function(e,t,n){return this._getDecoder(t).decode(e,n)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(r.encoders[e])),this.encoders[e]},o.prototype.encode=function(e,t,n){return this._getEncoder(t).encode(e,n)}},function(module,exports){var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1},Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var n in e)t.push(n);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(e,t,n){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:n})}}catch(e){return function(e,t,n){e[t]=n}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw new TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var n=t.contentWindow,r=n.eval,i=n.execScript;!r&&i&&(i.call(n,"null"),r=n.eval),forEach(Object_keys(e),function(t){n[t]=e[t]}),forEach(globals,function(t){e[t]&&(n[t]=e[t])});var o=Object_keys(n),a=r.call(n,this.code);return forEach(Object_keys(n),function(t){(t in e||-1===indexOf(o,t))&&(e[t]=n[t])}),forEach(globals,function(t){t in e||defineProp(e,t,n[t])}),document.body.removeChild(t),a},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),n=this.runInContext(t);return e&&forEach(Object_keys(t),function(n){e[n]=t[n]}),n},forEach(Object_keys(Script.prototype),function(e){exports[e]=Script[e]=function(t){var n=Script(t);return n[e].apply(n,[].slice.call(arguments,1))}}),exports.isContext=function(e){return e instanceof Context},exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(e){var t=new Context;return"object"==typeof e&&forEach(Object_keys(e),function(n){t[n]=e[n]}),t}},function(e,t,n){var r=n(1);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.Reporter=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,n){var r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=n)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,n=t.obj;return t.obj=e,n},i.prototype.error=function(e){var t,n=this._reporterState,r=e instanceof o;if(t=r?e:new o(n.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!n.options.partial)throw t;return r||n.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},r(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},function(e,t,n){var r=n(71).Reporter,i=n(71).EncoderBuffer,o=n(71).DecoderBuffer,a=n(22),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function u(e,t){var n={};this._baseState=n,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.exports=u;var f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];u.prototype.clone=function(){var e=this._baseState,t={};f.forEach(function(n){t[n]=e[n]});var n=new this.constructor(t.parent);return n._baseState=t,n},u.prototype._wrap=function(){var e=this._baseState;c.forEach(function(t){this[t]=function(){var n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}},this)},u.prototype._init=function(e){var t=this._baseState;a(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),a.equal(t.children.length,1,"Root node can have only one child")},u.prototype._useArgs=function(e){var t=this._baseState,n=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==n.length&&(a(null===t.children),t.children=n,n.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(a(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach(function(n){n==(0|n)&&(n|=0);var r=e[n];t[r]=n}),t}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(e){u.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),s.forEach(function(e){u.prototype[e]=function(){var t=this._baseState,n=Array.prototype.slice.call(arguments);return a(null===t.tag),t.tag=e,this._useArgs(n),this}}),u.prototype.use=function(e){a(e);var t=this._baseState;return a(null===t.use),t.use=e,this},u.prototype.optional=function(){return this._baseState.optional=!0,this},u.prototype.def=function(e){var t=this._baseState;return a(null===t.default),t.default=e,t.optional=!0,this},u.prototype.explicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.explicit=e,this},u.prototype.implicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.implicit=e,this},u.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},u.prototype.key=function(e){var t=this._baseState;return a(null===t.key),t.key=e,this},u.prototype.any=function(){return this._baseState.any=!0,this},u.prototype.choice=function(e){var t=this._baseState;return a(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},u.prototype.contains=function(e){var t=this._baseState;return a(null===t.use),t.contains=e,this},u.prototype._decode=function(e,t){var n=this._baseState;if(null===n.parent)return e.wrapResult(n.children[0]._decode(e,t));var r,i=n.default,a=!0,s=null;if(null!==n.key&&(s=e.enterKey(n.key)),n.optional){var c=null;if(null!==n.explicit?c=n.explicit:null!==n.implicit?c=n.implicit:null!==n.tag&&(c=n.tag),null!==c||n.any){if(a=this._peekTag(e,c,n.any),e.isError(a))return a}else{var u=e.save();try{null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),a=!0}catch(e){a=!1}e.restore(u)}}if(n.obj&&a&&(r=e.enterObject()),a){if(null!==n.explicit){var f=this._decodeTag(e,n.explicit);if(e.isError(f))return f;e=f}var l=e.offset;if(null===n.use&&null===n.choice){if(n.any)u=e.save();var d=this._decodeTag(e,null!==n.implicit?n.implicit:n.tag,n.any);if(e.isError(d))return d;n.any?i=e.raw(u):e=d}if(t&&t.track&&null!==n.tag&&t.track(e.path(),l,e.length,"tagged"),t&&t.track&&null!==n.tag&&t.track(e.path(),e.offset,e.length,"content"),i=n.any?i:null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),e.isError(i))return i;if(n.any||null!==n.choice||null===n.children||n.children.forEach(function(n){n._decode(e,t)}),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){var h=new o(i);i=this._getUse(n.contains,e._reporterState.obj)._decode(h,t)}}return n.obj&&a&&(i=e.leaveObject(r)),null===n.key||null===i&&!0!==a?null!==s&&e.exitKey(s):e.leaveKey(s,n.key,i),i},u.prototype._decodeGeneric=function(e,t,n){var r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],n):/str$/.test(e)?this._decodeStr(t,e,n):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],n):"objid"===e?this._decodeObjid(t,null,null,n):"gentime"===e||"utctime"===e?this._decodeTime(t,e,n):"null_"===e?this._decodeNull(t,n):"bool"===e?this._decodeBool(t,n):"objDesc"===e?this._decodeStr(t,e,n):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,n):t.error("unknown tag: "+e)},u.prototype._getUse=function(e,t){var n=this._baseState;return n.useDecoder=this._use(e,t),a(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},u.prototype._decodeChoice=function(e,t){var n=this._baseState,r=null,i=!1;return Object.keys(n.choice).some(function(o){var a=e.save(),s=n.choice[o];try{var c=s._decode(e,t);if(e.isError(c))return!1;r={type:o,value:c},i=!0}catch(t){return e.restore(a),!1}return!0},this),i?r:e.error("Choice not matched")},u.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},u.prototype._encode=function(e,t,n){var r=this._baseState;if(null===r.default||r.default!==e){var i=this._encodeValue(e,t,n);if(void 0!==i&&!this._skipDefault(i,t,n))return i}},u.prototype._encodeValue=function(e,t,n){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new r);var o=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}var a=null,s=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,t);else if(i.contains)a=this._getUse(i.contains,n)._encode(e,t),s=!0;else if(i.children)a=i.children.map(function(n){if("null_"===n._baseState.tag)return n._encode(null,t,e);if(null===n._baseState.key)return t.error("Child should have a key");var r=t.enterKey(n._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var i=n._encode(e[n._baseState.key],t,e);return t.leaveKey(r),i},this).filter(function(e){return e}),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var c=this.clone();c._baseState.implicit=null,a=this._createEncoderBuffer(e.map(function(n){var r=this._baseState;return this._getUse(r.args[0],e)._encode(n,t)},c))}else null!==i.use?o=this._getUse(i.use,n)._encode(e,t):(a=this._encodePrimitive(i.tag,e),s=!0);if(!i.any&&null===i.choice){var u=null!==i.implicit?i.implicit:i.tag,f=null===i.implicit?"universal":"context";null===u?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(u,s,f,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},u.prototype._encodeChoice=function(e,t){var n=this._baseState,r=n.choice[e.type];return r||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(e.value,t)},u.prototype._encodePrimitive=function(e,t){var n=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&n.args)return this._encodeObjid(t,n.reverseArgs[0],n.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,n.args&&n.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},u.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},u.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},function(e,t,n){var r=n(190);t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r._reverse(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=r._reverse(t.tag)},function(e,t,n){var r=t;r.der=n(191),r.pem=n(449)},function(e,t,n){var r=n(1),i=n(9).Buffer,o=n(191);function a(e){o.call(this,e),this.enc="pem"}r(a,o),e.exports=a,a.prototype.decode=function(e,t){for(var n=e.toString().split(/[\r\n]+/g),r=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,c=-1,u=0;u<n.length;u++){var f=n[u].match(a);if(null!==f&&f[2]===r){if(-1!==s){if("END"!==f[1])break;c=u;break}if("BEGIN"!==f[1])break;s=u}}if(-1===s||-1===c)throw new Error("PEM section not found for: "+r);var l=n.slice(s+1,c).join("");l.replace(/[^a-z0-9\+\/=]+/gi,"");var d=new i(l,"base64");return o.prototype.decode.call(this,d,t)}},function(e,t,n){var r=t;r.der=n(192),r.pem=n(451)},function(e,t,n){var r=n(1),i=n(192);function o(e){i.call(this,e),this.enc="pem"}r(o,i),e.exports=o,o.prototype.encode=function(e,t){for(var n=i.prototype.encode.call(this,e).toString("base64"),r=["-----BEGIN "+t.label+"-----"],o=0;o<n.length;o+=64)r.push(n.slice(o,o+64));return r.push("-----END "+t.label+"-----"),r.join("\n")}},function(e,t,n){"use strict";var r=n(70),i=r.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),o=r.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),a=r.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),s=r.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}),c=r.define("RelativeDistinguishedName",function(){this.setof(o)}),u=r.define("RDNSequence",function(){this.seqof(c)}),f=r.define("Name",function(){this.choice({rdnSequence:this.use(u)})}),l=r.define("Validity",function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))}),d=r.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),h=r.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(f),this.key("validity").use(l),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())}),p=r.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(h),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())});e.exports=p},function(e){e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},function(e,t,n){var r=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r\+\/\=]+)-----END \1-----$/m,a=n(85),s=n(121),c=n(2).Buffer;e.exports=function(e,t){var n,u=e.toString(),f=u.match(r);if(f){var l="aes"+f[1],d=c.from(f[2],"hex"),h=c.from(f[3].replace(/[\r\n]/g,""),"base64"),p=a(t,d.slice(0,8),parseInt(f[1],10)).key,m=[],g=s.createDecipheriv(l,p,d);m.push(g.update(h)),m.push(g.final()),n=c.concat(m)}else{var b=u.match(o);n=new c(b[2].replace(/[\r\n]/g,""),"base64")}return{tag:u.match(i)[1],data:n}}},function(e,t,n){(function(t){var r=n(12),i=n(125).ec,o=n(87),a=n(193);function s(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}e.exports=function(e,n,c,u,f){var l=o(c);if("ec"===l.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(e,t,n){var r=a[n.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var o=new i(r),s=n.data.subjectPrivateKey.data;return o.verify(t,e,s)}(e,n,l)}if("dsa"===l.type){if("dsa"!==u)throw new Error("wrong public key type");return function(e,t,n){var i=n.data.p,a=n.data.q,c=n.data.g,u=n.data.pub_key,f=o.signature.decode(e,"der"),l=f.s,d=f.r;s(l,a),s(d,a);var h=r.mont(i),p=l.invm(a);return 0===c.toRed(h).redPow(new r(t).mul(p).mod(a)).fromRed().mul(u.toRed(h).redPow(d.mul(p).mod(a)).fromRed()).mod(i).mod(a).cmp(d)}(e,n,l)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");n=t.concat([f,n]);for(var d=l.modulus.byteLength(),h=[1],p=0;n.length+h.length+2<d;)h.push(255),p++;h.push(0);for(var m=-1;++m<n.length;)h.push(n[m]);h=new t(h);var g=r.mont(l.modulus);e=(e=new r(e).toRed(g)).redPow(new r(l.publicExponent)),e=new t(e.fromRed().toArray());var b=p<8?1:0;for(d=Math.min(e.length,h.length),e.length!==h.length&&(b=1),m=-1;++m<d;)b|=e[m]^h[m];return 0===b}}).call(this,n(9).Buffer)},function(e,t,n){(function(t){var r=n(125),i=n(12);e.exports=function(e){return new a(e)};var o={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function a(e){this.curveType=o[e],this.curveType||(this.curveType={name:e}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function s(e,n,r){Array.isArray(e)||(e=e.toArray());var i=new t(e);if(r&&i.length<r){var o=new t(r-i.length);o.fill(0),i=t.concat([o,i])}return n?i.toString(n):i}o.p224=o.secp224r1,o.p256=o.secp256r1=o.prime256v1,o.p192=o.secp192r1=o.prime192v1,o.p384=o.secp384r1,o.p521=o.secp521r1,a.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},a.prototype.computeSecret=function(e,n,r){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),s(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},a.prototype.getPublicKey=function(e,t){var n=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(n[n.length-1]%2?n[0]=7:n[0]=6),s(n,e)},a.prototype.getPrivateKey=function(e){return s(this.keys.getPrivate(),e)},a.prototype.setPublicKey=function(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this.keys._importPublic(e),this},a.prototype.setPrivateKey=function(e,n){n=n||"utf8",t.isBuffer(e)||(e=new t(e,n));var r=new i(e);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}}).call(this,n(9).Buffer)},function(e,t,n){t.publicEncrypt=n(458),t.privateDecrypt=n(459),t.privateEncrypt=function(e,n){return t.publicEncrypt(e,n,!0)},t.publicDecrypt=function(e,n){return t.privateDecrypt(e,n,!0)}},function(e,t,n){var r=n(87),i=n(59),o=n(66),a=n(194),s=n(195),c=n(12),u=n(196),f=n(124),l=n(2).Buffer;e.exports=function(e,t,n){var d;d=e.padding?e.padding:n?1:4;var h,p=r(e);if(4===d)h=function(e,t){var n=e.modulus.byteLength(),r=t.length,u=o("sha1").update(l.alloc(0)).digest(),f=u.length,d=2*f;if(r>n-d-2)throw new Error("message too long");var h=l.alloc(n-r-d-2),p=n-f-1,m=i(f),g=s(l.concat([u,h,l.alloc(1,1),t],p),a(m,p)),b=s(m,a(g,f));return new c(l.concat([l.alloc(1),b,g],n))}(p,t);else if(1===d)h=function(e,t,n){var r,o=t.length,a=e.modulus.byteLength();if(o>a-11)throw new Error("message too long");r=n?l.alloc(a-o-3,255):function(e){var t,n=l.allocUnsafe(e),r=0,o=i(2*e),a=0;for(;r<e;)a===o.length&&(o=i(2*e),a=0),(t=o[a++])&&(n[r++]=t);return n}(a-o-3);return new c(l.concat([l.from([0,n?1:2]),r,l.alloc(1),t],a))}(p,t,n);else{if(3!==d)throw new Error("unknown padding");if((h=new c(t)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return n?f(h,p):u(h,p)}},function(e,t,n){var r=n(87),i=n(194),o=n(195),a=n(12),s=n(124),c=n(66),u=n(196),f=n(2).Buffer;e.exports=function(e,t,n){var l;l=e.padding?e.padding:n?1:4;var d,h=r(e),p=h.modulus.byteLength();if(t.length>p||new a(t).cmp(h.modulus)>=0)throw new Error("decryption error");d=n?u(new a(t),h):s(t,h);var m=f.alloc(p-d.length);if(d=f.concat([m,d],p),4===l)return function(e,t){var n=e.modulus.byteLength(),r=c("sha1").update(f.alloc(0)).digest(),a=r.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,a+1),u=t.slice(a+1),l=o(s,i(u,a)),d=o(u,i(l,n-a-1));if(function(e,t){e=f.from(e),t=f.from(t);var n=0,r=e.length;e.length!==t.length&&(n++,r=Math.min(e.length,t.length));var i=-1;for(;++i<r;)n+=e[i]^t[i];return n}(r,d.slice(0,a)))throw new Error("decryption error");var h=a;for(;0===d[h];)h++;if(1!==d[h++])throw new Error("decryption error");return d.slice(h)}(h,d);if(1===l)return function(e,t,n){var r=t.slice(0,2),i=2,o=0;for(;0!==t[i++];)if(i>=t.length){o++;break}var a=t.slice(2,i-1);("0002"!==r.toString("hex")&&!n||"0001"!==r.toString("hex")&&n)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(i)}(0,d,n);if(3===l)return d;throw new Error("unknown padding")}},function(e,t,n){"use strict";(function(e,r){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=n(2),a=n(59),s=o.Buffer,c=o.kMaxLength,u=e.crypto||e.msCrypto,f=Math.pow(2,32)-1;function l(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>f||e<0)throw new TypeError("offset must be a uint32");if(e>c||e>t)throw new RangeError("offset out of range")}function d(e,t,n){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>f||e<0)throw new TypeError("size must be a uint32");if(e+t>n||e>c)throw new RangeError("buffer too small")}function h(e,t,n,i){if(r.browser){var o=e.buffer,s=new Uint8Array(o,t,n);return u.getRandomValues(s),i?void r.nextTick(function(){i(null,e)}):e}if(!i)return a(n).copy(e,t),e;a(n,function(n,r){if(n)return i(n);r.copy(e,t),i(null,e)})}u&&u.getRandomValues||!r.browser?(t.randomFill=function(t,n,r,i){if(!(s.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof n)i=n,n=0,r=t.length;else if("function"==typeof r)i=r,r=t.length-n;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return l(n,t.length),d(r,n,t.length),h(t,n,r,i)},t.randomFillSync=function(t,n,r){void 0===n&&(n=0);if(!(s.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');l(n,t.length),void 0===r&&(r=t.length-n);return d(r,n,t.length),h(t,n,r)}):(t.randomFill=i,t.randomFillSync=i)}).call(this,n(38),n(35))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=this&&this.__decorate||function(e,t,n,r){var o,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===("undefined"==typeof Reflect?"undefined":i(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":i(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var c=n(15),u=n(197),f=n(466),l=n(467),d=n(40),h=n(128),p=n(198),m=n(7),g=n(201),b="@signageos/front-applet:FrontApplet:Video",v=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.onceDeferredIndex={},this.eventEmitter=new c.EventEmitter}var t,n,i;return t=e,(n=[{key:"play",value:function(e,t,n,r,i){return s(this,void 0,void 0,regeneratorRuntime.mark(function o(){var a,s,c,u;return regeneratorRuntime.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return this.checkParamsValidity(e,t,n,r,i),a=g.sanitizeCoordinations({x:t,y:n,width:r,height:i}),t=a.x,n=a.y,r=a.width,i=a.height,this.removeAllVideoListeners(e,t,n,r,i),s=this.createOncePromise("ended",e,t,n,r,i),c=this.createOncePromise("stop",e,t,n,r,i),o.next=11,this.postMessage({type:this.getMessage("play"),uri:e,x:t,y:n,width:r,height:i});case 11:u=f.stringifySrcArguments(e,t,n,r,i),this.onceDeferredIndex[u]={ended:s,stop:c},this.createAndEmitEvent("play",e,t,n,r,i);case 14:case"end":return o.stop()}},o,this)}))}},{key:"prepare",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return s(this,void 0,void 0,regeneratorRuntime.mark(function a(){var s;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return this.checkParamsValidity(e,t,n,r,i),s=g.sanitizeCoordinations({x:t,y:n,width:r,height:i}),t=s.x,n=s.y,r=s.width,i=s.height,a.next=8,this.postMessage({type:this.getMessage("prepare"),uri:e,x:t,y:n,width:r,height:i,options:o});case 8:this.createAndEmitEvent("prepare",e,t,n,r,i);case 9:case"end":return a.stop()}},a,this)}))}},{key:"stop",value:function(e,t,n,r,i){var o,a,c;return s(this,void 0,void 0,regeneratorRuntime.mark(function s(){var u,p;return regeneratorRuntime.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return this.checkParamsValidity(e,t,n,r,i),u=g.sanitizeCoordinations({x:t,y:n,width:r,height:i}),t=u.x,n=u.y,r=u.width,i=u.height,s.next=8,this.postMessage({type:this.getMessage("stop"),uri:e,x:t,y:n,width:r,height:i});case 8:this.createAndEmitEvent("stop",e,t,n,r,i),p=f.stringifySrcArguments(e,t,n,r,i),null===(c=null===(o=this.onceDeferredIndex[p])||void 0===o?void 0:(a=o.ended).reject)||void 0===c||c.call(a,new l.default({kind:"appletVideoError",message:"This video was stopped already. The arguments: ".concat(p),code:d.default.VIDEO_WAS_STOPPED_ALREADY,suggestion:h.default.VIDEO_WAS_STOPPED_ALREADY})),delete this.onceDeferredIndex[p];case 12:case"end":return s.stop()}},s,this)}))}},{key:"pause",value:function(e,t,n,r,i){return s(this,void 0,void 0,regeneratorRuntime.mark(function o(){var a;return regeneratorRuntime.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return this.checkParamsValidity(e,t,n,r,i),a=g.sanitizeCoordinations({x:t,y:n,width:r,height:i}),t=a.x,n=a.y,r=a.width,i=a.height,o.next=8,this.postMessage({type:this.getMessage("pause"),uri:e,x:t,y:n,width:r,height:i});case 8:this.createAndEmitEvent("pause",e,t,n,r,i);case 9:case"end":return o.stop()}},o,this)}))}},{key:"resume",value:function(e,t,n,r,i){return s(this,void 0,void 0,regeneratorRuntime.mark(function o(){var a;return regeneratorRuntime.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return this.checkParamsValidity(e,t,n,r,i),a=g.sanitizeCoordinations({x:t,y:n,width:r,height:i}),t=a.x,n=a.y,r=a.width,i=a.height,o.next=8,this.postMessage({type:this.getMessage("resume"),uri:e,x:t,y:n,width:r,height:i});case 8:this.createAndEmitEvent("resume",e,t,n,r,i);case 9:case"end":return o.stop()}},o,this)}))}},{key:"onceEnded",value:function(e,t,n,r,i){this.checkParamsValidity(e,t,n,r,i);var o=g.sanitizeCoordinations({x:t,y:n,width:r,height:i});t=o.x,n=o.y,r=o.width,i=o.height;var a=f.stringifySrcArguments(e,t,n,r,i),s=this.onceDeferredIndex[a];if(void 0===s)throw new l.default({kind:"appletVideoError",message:"This video was not played yet. The arguments: ".concat(a),code:d.default.VIDEO_WAS_NOT_PLAYED_YET,suggestion:h.default.VIDEO_WAS_NOT_PLAYED});return s.ended.oncePromise}},{key:"onceStop",value:function(e,t,n,r,i){this.checkParamsValidity(e,t,n,r,i);var o=g.sanitizeCoordinations({x:t,y:n,width:r,height:i});t=o.x,n=o.y,r=o.width,i=o.height;var a=f.stringifySrcArguments(e,t,n,r,i),s=this.onceDeferredIndex[a];if(void 0===s)throw new l.default({kind:"appletVideoError",message:"This video was not played yet. The arguments: ".concat(a),code:d.default.VIDEO_WAS_NOT_PLAYED_YET,suggestion:h.default.VIDEO_WAS_NOT_PLAYED});return s.stop.oncePromise}},{key:"onPlay",value:function(e){m.default({listener:e}).required().function(),this.eventEmitter.addListener("play",e)}},{key:"onPrepare",value:function(e){m.default({listener:e}).required().function(),this.eventEmitter.addListener("prepare",e)}},{key:"onStop",value:function(e){m.default({listener:e}).required().function(),this.eventEmitter.addListener("stop",e)}},{key:"onPause",value:function(e){m.default({listener:e}).required().function(),this.eventEmitter.addListener("pause",e)}},{key:"onResume",value:function(e){m.default({listener:e}).required().function(),this.eventEmitter.addListener("resume",e)}},{key:"onEnded",value:function(e){m.default({listener:e}).required().function(),this.eventEmitter.addListener("ended",e)}},{key:"onError",value:function(e){m.default({listener:e}).required().function(),this.eventEmitter.addListener("error",e)}},{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage("ended"):case this.getMessage("error"):var t=e.type.substring(this.getMessage("").length);this.createAndEmitEvent(t,e.uri,e.x,e.y,e.width,e.height)}}},{key:"removeEventListeners",value:function(){this.eventEmitter.removeAllListeners()}},{key:"createOncePromise",value:function(e,t,n,r,i,o){var a=this,s={};return s.oncePromise=new Promise(function(c,u){s.reject=u;var l={uri:t,x:n,y:r,width:i,height:o},h=f.getEventName({type:e,srcArguments:l}),m=f.getEventName({type:"error",srcArguments:l}),g=function s(f){JSON.stringify(f.srcArguments)===JSON.stringify({uri:t,x:n,y:r,width:i,height:o})&&(a.eventEmitter.removeListener(h,s),a.eventEmitter.removeListener(m,s),f.type===e?c():"error"===f.type&&u(new p.default({kind:"sosError",message:JSON.stringify(f.srcArguments),code:d.default.UNEXPECTED_EXCEPTION})))};a.eventEmitter.addListener(h,g),a.eventEmitter.addListener(m,g)}),s}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}},{key:"removeAllVideoListeners",value:function(e,t,n,r,i){var o=!0,a=!1,s=void 0;try{for(var c,u=f.VIDEO_EVENT_TYPES[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var l=c.value,d=f.getEventName({type:l,srcArguments:{uri:e,x:t,y:n,width:r,height:i}});this.eventEmitter.removeAllListeners(d)}}catch(e){a=!0,s=e}finally{try{o||null==u.return||u.return()}finally{if(a)throw s}}}},{key:"createAndEmitEvent",value:function(e,t,n,r,i,o){var a={type:e,srcArguments:{uri:t,x:n,y:r,width:i,height:o}},s=f.getEventName(a);this.eventEmitter.emit(s,a),this.eventEmitter.emit(a.type,a)}},{key:"checkParamsValidity",value:function(e,t,n,r,i){m.default({uri:e}).required().uri(),m.default({x:t}).required().number(),m.default({y:n}).required().number(),m.default({width:r}).required().number(),m.default({height:i}).required().number()}}])&&r(t.prototype,n),i&&r(t,i),e}();v.MESSAGE_PREFIX="video",o([u.debug(b),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number]),a("design:returntype",Promise)],v.prototype,"play",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number,Object]),a("design:returntype",Promise)],v.prototype,"prepare",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number]),a("design:returntype",Promise)],v.prototype,"stop",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number]),a("design:returntype",Promise)],v.prototype,"pause",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number]),a("design:returntype",Promise)],v.prototype,"resume",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number]),a("design:returntype",void 0)],v.prototype,"onceEnded",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number]),a("design:returntype",void 0)],v.prototype,"onceStop",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],v.prototype,"onPlay",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],v.prototype,"onPrepare",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],v.prototype,"onStop",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],v.prototype,"onPause",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],v.prototype,"onResume",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],v.prototype,"onEnded",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],v.prototype,"onError",null),o([u.debug(b),a("design:type",Function),a("design:paramtypes",[]),a("design:returntype",void 0)],v.prototype,"removeEventListeners",null),t.default=v},function(e,t,n){(function(r){var i;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(i=!1,function(){i||(i=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=n(463)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(35))},function(e,t,n){function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}e.exports=function(e){function t(e){var n,r,o,a=null;function s(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];if(s.enabled){var o=s,a=Number(new Date),c=a-(n||a);o.diff=c,o.prev=n,o.curr=a,n=a,r[0]=t.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");var u=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,function(e,n){if("%%"===e)return"%";u++;var i=t.formatters[n];if("function"==typeof i){var a=r[u];e=i.call(o,a),r.splice(u,1),u--}return e}),t.formatArgs.call(o,r),(o.log||t.log).apply(o,r)}}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=i,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==a?a:(r!==t.namespaces&&(r=t.namespaces,o=t.enabled(e)),o)},set:function(e){a=e}}),"function"==typeof t.init&&t.init(s),s}function i(e,n){var r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){var e=[].concat(r(t.names.map(o)),r(t.skips.map(o).map(function(e){return"-"+e}))).join(",");return t.enable(""),e},t.enable=function(e){var n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(464),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(function(n){t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},function(e,t){var n=1e3,r=60*n,i=60*r,o=24*i,a=7*o,s=365.25*o;function c(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,t){t=t||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var c=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"weeks":case"week":case"w":return c*a;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*i;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===u&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return c(e,t,o,"day");if(t>=i)return c(e,t,i,"hour");if(t>=r)return c(e,t,r,"minute");if(t>=n)return c(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=o)return Math.round(e/o)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateSalt=t.generateUniqueHash=void 0;var r=n(162);t.generateUniqueHash=function(e){void 0===e&&(e=50);var t=(0,r.createHash)("sha256");return t.update(""+(new Date).valueOf()+Math.random()),t.digest("hex").substring(0,e)},t.generateSalt=function(e){return(0,r.randomBytes)(e).toString("hex").substring(0,e)}},function(e,t,n){"use strict";function r(e,t,n,r,i){return"".concat(e,"$").concat(t,"_").concat(n,"_").concat(r,"_").concat(i)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringifySrcArguments=t.getEventName=t.VIDEO_EVENT_TYPES=void 0,t.VIDEO_EVENT_TYPES=["prepare","play","stop","pause","resume","ended","error"],t.getEventName=function(e){var t=r(e.srcArguments.uri,e.srcArguments.x,e.srcArguments.y,e.srcArguments.width,e.srcArguments.height);return"".concat(e.type,"_").concat(t)},t.stringifySrcArguments=r},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(52),c=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,o(t).call(this,Object.assign(Object.assign({},e),{pathToDocs:t.PATH_TO_DOCS,kind:"appletError",type:e.type?e.type:"AppletVideoError"})))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,s["default"]),t}();t.default=c,c.PATH_TO_DOCS="/api/js/js-video"},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a=n(200),s=n(129),c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,c;return t=e,(n=[{key:"validate",value:function(e,t,n){if("object"!==r(e))throw new Error("invalid object interface, needs to be object");var i=!0;for(var o in e)if(e.hasOwnProperty(o)){var a=e[o];if("object"===r(a)){var s=this.validateTypingObject(a,o,t);!0!==s&&(i=!0===i?s:i+"\n"+s)}else{var c=this.validateType(a,o,t);!0!==c&&(i=!0===i?c:i+"\n"+c)}}return void 0===n&&void 0!==this.error&&!0!==i&&this.throwError(this.error,i),!0===i||"".concat(void 0!==n?"".concat(n,":\n"):""," {\n").concat(i,"\n}")}},{key:"validateType",value:function(e,t,n){var i=!e.startsWith("?");return e=i?e:e.substring(1),!i&&!n.hasOwnProperty(t)||(i&&!n.hasOwnProperty(t)?"".concat(t,": is required"):r(n[t])===e||"".concat(t,": needs to be type ").concat(e,". Got ").concat(r(n[t])))}},{key:"validateTypingObject",value:function(e,t,n){var i=void 0!==e.error?e.error:void 0;for(var a in e)if(e.hasOwnProperty(a)&&"error"!==a&&(o.validatableType.includes(a)||o.validatableType.includes(a.substr(1)))){var s=e[a],c=!a.startsWith("?");if(a=c?a:a.substring(1),!n.hasOwnProperty(t)){if(c){var u="".concat(t,": is required");return void 0===this.error&&void 0!==i&&(this.error=i),u}return!0}var f=n[t];if(r(f)!==("array"===a?"object":a)){var l="".concat(t,": needs to be type ").concat(a,". Got ").concat(r(f));return void 0===this.error&&void 0!==i&&(this.error=i),l}if(("string"===a||"number"===a)&&Array.isArray(s)&&!s.includes(f)){var d="".concat(t,": has to be one of ").concat(JSON.stringify(s));return void 0===this.error&&void 0!==i&&(this.error=i),d}if("array"===a){var h=this.validateArray(s,t,f);if(!0!==h)return void 0===this.error&&void 0!==i&&(this.error=i),h}if("object"===a)return this.validate(s,f,t)}return!0}},{key:"validateArray",value:function(e,t,n){var i;i="string"==typeof e?[e]:Array.isArray(e)?e:Object.keys(e).filter(function(e){return"error"!==e});var a=!0,s=!1,c=void 0;try{for(var u,f=n[Symbol.iterator]();!(a=(u=f.next()).done);a=!0){var l=u.value,d=o.Validate.validateType(i,l);if(!0!==d)return"has to be array of types: ".concat(JSON.stringify(i),". ").concat(JSON.stringify(l)," is ").concat(d," instead");if("object"===r(l)&&void 0!==e.object){var h=this.validate(e.object,l,t);if(!0!==h)return h}}}catch(e){s=!0,c=e}finally{try{a||null==f.return||f.return()}finally{if(s)throw c}}return!0}},{key:"throwError",value:function(e,t){throw new a.default({kind:"appletResourcesError",message:"".concat(s.default[e.code],"\n\nValidation info:\n").concat(t,"\n"),code:e.code})}}])&&i(t.prototype,n),c&&i(t,c),e}();t.default=c},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=this&&this.__decorate||function(e,t,n,r){var o,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===("undefined"==typeof Reflect?"undefined":i(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":i(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var c=n(15),u=n(197),f=n(470),l=n(40),d=n(7),h=n(201),p="@signageos/front-applet:FrontApplet:Stream",m=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.eventEmitter=new c.EventEmitter}var t,n,i;return t=e,(n=[{key:"prepare",value:function(e,t,n,r,i,o){return s(this,void 0,void 0,regeneratorRuntime.mark(function a(){var s,c;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(c=void 0,(null==(s="string"==typeof o?{protocol:o}:o)?void 0:s.protocol)&&(c=s.protocol),!c||"string"==typeof c){a.next=5;break}throw new f.default({kind:"appletStreamError",message:"Invalid format of protocol, must be string.",code:l.default.STREAM_INVALID_PROTOCOL_TYPE});case 5:return this.checkParamsValidity(e,t,n,r,i),this.createAndEmitEvent("prepare",{type:"prepare",srcArguments:{uri:e,x:t,y:n,width:r,height:i,protocol:c}}),a.abrupt("return",this.postMessage({type:this.getMessage("prepare"),uri:e,x:t,y:n,width:r,height:i,protocol:c,options:s}));case 8:case"end":return a.stop()}},a,this)}))}},{key:"play",value:function(e,t,n,r,i,o){return s(this,void 0,void 0,regeneratorRuntime.mark(function a(){var s,c,u;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(c=void 0,(null==(s="string"==typeof o?{protocol:o}:o)?void 0:s.protocol)&&(c=s.protocol),this.checkParamsValidity(e,t,n,r,i),u=h.sanitizeCoordinations({x:t,y:n,width:r,height:i}),t=u.x,n=u.y,r=u.width,i=u.height,!c||"string"==typeof c){a.next=11;break}throw new f.default({kind:"appletStreamError",message:"Invalid format of protocol, must be string.",code:l.default.STREAM_INVALID_PROTOCOL_TYPE});case 11:return this.createAndEmitEvent("play",{type:"play",srcArguments:{uri:e,x:t,y:n,width:r,height:i,protocol:c}}),a.abrupt("return",this.postMessage({type:this.getMessage("play"),uri:e,x:t,y:n,width:r,height:i,protocol:c,options:s}));case 13:case"end":return a.stop()}},a,this)}))}},{key:"stop",value:function(e,t,n,r,i){return s(this,void 0,void 0,regeneratorRuntime.mark(function o(){var a;return regeneratorRuntime.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return this.checkParamsValidity(e,t,n,r,i),a=h.sanitizeCoordinations({x:t,y:n,width:r,height:i}),t=a.x,n=a.y,r=a.width,i=a.height,this.createAndEmitEvent("stop",{type:"stop",srcArguments:{uri:e,x:t,y:n,width:r,height:i}}),o.abrupt("return",this.postMessage({type:this.getMessage("stop"),uri:e,x:t,y:n,width:r,height:i}));case 8:case"end":return o.stop()}},o,this)}))}},{key:"pause",value:function(e,t,n,r,i){this.checkParamsValidity(e,t,n,r,i);var o=h.sanitizeCoordinations({x:t,y:n,width:r,height:i});return t=o.x,n=o.y,r=o.width,i=o.height,this.createAndEmitEvent("pause",{type:"pause",srcArguments:{uri:e,x:t,y:n,width:r,height:i}}),this.postMessage({type:this.getMessage("pause"),uri:e,x:t,y:n,width:r,height:i})}},{key:"resume",value:function(e,t,n,r,i){this.checkParamsValidity(e,t,n,r,i);var o=h.sanitizeCoordinations({x:t,y:n,width:r,height:i});return t=o.x,n=o.y,r=o.width,i=o.height,this.createAndEmitEvent("resume",{type:"resume",srcArguments:{uri:e,x:t,y:n,width:r,height:i}}),this.postMessage({type:this.getMessage("resume"),uri:e,x:t,y:n,width:r,height:i})}},{key:"getTracks",value:function(e){return s(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return d.default({videoId:e}).required().object(),t.next=3,this.postMessage({type:this.getMessage("get_tracks"),videoId:e});case 3:return n=t.sent,r=n.tracks,t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}))}},{key:"selectTrack",value:function(e,t,n,r){return s(this,void 0,void 0,regeneratorRuntime.mark(function i(){return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return d.default({videoId:e}).required().object(),d.default({trackType:t}).required().string(),d.default({groupId:n}).required().string(),d.default({trackIndex:r}).required().number(),i.abrupt("return",this.postMessage({type:this.getMessage("select_track"),videoId:e,trackType:t,groupId:n,trackIndex:r}));case 5:case"end":return i.stop()}},i,this)}))}},{key:"resetTrack",value:function(e,t,n){return s(this,void 0,void 0,regeneratorRuntime.mark(function r(){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return d.default({videoId:e}).required().object(),d.default({trackType:t}).required().string(),n&&d.default({groupId:n}).string(),r.abrupt("return",this.postMessage({type:this.getMessage("reset_track"),videoId:e,trackType:t,groupId:n}));case 4:case"end":return r.stop()}},r,this)}))}},{key:"onTracksChanged",value:function(e){d.default({listener:e}).required().function(),this.eventEmitter.on("tracks_changed",e)}},{key:"onError",value:function(e){d.default({listener:e}).required().function(),this.eventEmitter.on("error",e)}},{key:"onConnected",value:function(e){d.default({listener:e}).required().function(),this.eventEmitter.on("connected",e)}},{key:"onDisconnected",value:function(e){d.default({listener:e}).required().function(),this.eventEmitter.on("disconnected",e)}},{key:"onPrepare",value:function(e){d.default({listener:e}).required().function(),this.eventEmitter.on("prepare",e)}},{key:"onPlay",value:function(e){d.default({listener:e}).required().function(),this.eventEmitter.on("play",e)}},{key:"onStop",value:function(e){d.default({listener:e}).required().function(),this.eventEmitter.on("stop",e)}},{key:"onPause",value:function(e){d.default({listener:e}).required().function(),this.eventEmitter.on("pause",e)}},{key:"onResume",value:function(e){d.default({listener:e}).required().function(),this.eventEmitter.on("resume",e)}},{key:"handleMessageData",value:function(e){var t,n,r,i,o,a;switch(e.type){case this.getMessage("error"):this.createAndEmitEvent("error",{type:"error",srcArguments:{uri:e.uri,x:e.x,y:e.y,width:e.width,height:e.height,protocol:null!==(n=null===(t=e.options)||void 0===t?void 0:t.protocol)&&void 0!==n?n:e.protocol},errorMessage:e.errorMessage});break;case this.getMessage("connected"):this.createAndEmitEvent("connected",{type:"connected",srcArguments:{uri:e.uri,x:e.x,y:e.y,width:e.width,height:e.height,protocol:null!==(i=null===(r=e.options)||void 0===r?void 0:r.protocol)&&void 0!==i?i:e.protocol}});break;case this.getMessage("disconnected"):this.createAndEmitEvent("disconnected",{type:"disconnected",srcArguments:{uri:e.uri,x:e.x,y:e.y,width:e.width,height:e.height,protocol:null!==(a=null===(o=e.options)||void 0===o?void 0:o.protocol)&&void 0!==a?a:e.protocol}});break;case this.getMessage("tracks_changed"):this.createAndEmitEvent("tracks_changed",{type:"tracks_changed",srcArguments:{uri:e.uri,x:e.x,y:e.y,width:e.width,height:e.height},tracks:e.tracks})}}},{key:"removeEventListeners",value:function(){this.eventEmitter.removeAllListeners()}},{key:"createAndEmitEvent",value:function(e,t){this.eventEmitter.emit(e,t)}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}},{key:"checkParamsValidity",value:function(e,t,n,r,i){d.default({uri:e}).required().uri(),d.default({x:t}).required().number(),d.default({y:n}).required().number(),d.default({width:r}).required().number(),d.default({height:i}).required().number()}}])&&r(t.prototype,n),i&&r(t,i),e}();m.MESSAGE_PREFIX="stream",o([u.debug(p),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number,Object]),a("design:returntype",Promise)],m.prototype,"prepare",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number,Object]),a("design:returntype",Promise)],m.prototype,"play",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number]),a("design:returntype",Promise)],m.prototype,"stop",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number]),a("design:returntype",Promise)],m.prototype,"pause",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[String,Number,Number,Number,Number]),a("design:returntype",Promise)],m.prototype,"resume",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",Promise)],m.prototype,"getTracks",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Object,String,String,Number]),a("design:returntype",Promise)],m.prototype,"selectTrack",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Object,String,String]),a("design:returntype",Promise)],m.prototype,"resetTrack",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],m.prototype,"onTracksChanged",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],m.prototype,"onError",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],m.prototype,"onConnected",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],m.prototype,"onDisconnected",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],m.prototype,"onPrepare",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],m.prototype,"onPlay",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],m.prototype,"onStop",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],m.prototype,"onPause",null),o([u.debug(p),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],m.prototype,"onResume",null),t.default=m},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(52),c=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,o(t).call(this,Object.assign(Object.assign({},e),{kind:"appletError",type:e.type?e.type:"AppletStreamError"})))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,s["default"]),t}();t.default=c},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(472),a=n(475),s=n(476),c=n(477),u=n(202),f=n(481),l=n(482),d=n(483),h=n(7),p=function(){function e(t,n,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.window=n,this.postMessage=r,this.FlagControllers=[s.default],this.LoadFileControllers=[u.default,f.default],this.cache=new o.default(this.getMessagePrefix(),this.postMessage),this.types=a.default,this.loadFile=this.LoadFileControllers.reduce(function(e,t){var n=new t(i.window);return e[n.name]=n,e},{}),this.flagControllers=this.FlagControllers.reduce(function(e,t){var n=new t(i.loadFile);return e[n.name]=n,e},{}),this.flags=Object.keys(this.flagControllers).reduce(function(e,t){var n=i.flagControllers[t];return e[n.name]=function(){return n.create.apply(n,arguments)},e},{append:null})}var t,n,p;return t=e,(n=[{key:"addFiles",value:function(e){var t=this;h.default({addFiles:e}).required().array("object");var n=e.map(function(e){return t.addFile(e)});return Promise.all(n)}},{key:"addFilesSync",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r,i,o,a,s;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:h.default({addFiles:e}).required().array("object"),n=!0,r=!1,i=void 0,t.prev=4,o=e[Symbol.iterator]();case 6:if(n=(a=o.next()).done){t.next=13;break}return s=a.value,t.next=10,this.addFile(s);case 10:n=!0,t.next=6;break;case 13:t.next=19;break;case 15:t.prev=15,t.t0=t.catch(4),r=!0,i=t.t0;case 19:t.prev=19,t.prev=20,n||null==o.return||o.return();case 22:if(t.prev=22,!r){t.next=25;break}throw i;case 25:return t.finish(22);case 26:return t.finish(19);case 27:case"end":return t.stop()}},t,this,[[4,15,19,27],[20,,22,26]])}))}},{key:"addFile",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r,i,o,a,s,u,f;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return h.default({addFile:e}).required().object(c.VISaveFile),t.next=3,this.cache.loadOrSaveFile(e.uid,e.uri,e.headers);case 3:n=t.sent,r=e.flags||[],i=!0,o=!1,a=void 0,t.prev=8,s=r[Symbol.iterator]();case 10:if(i=(u=s.next()).done){t.next=17;break}return f=u.value,t.next=14,this.handleFileFlag(f,n,e.type);case 14:i=!0,t.next=10;break;case 17:t.next=23;break;case 19:t.prev=19,t.t0=t.catch(8),o=!0,a=t.t0;case 23:t.prev=23,t.prev=24,i||null==s.return||s.return();case 26:if(t.prev=26,!o){t.next=29;break}throw a;case 29:return t.finish(26);case 30:return t.finish(23);case 31:case"end":return t.stop()}},t,this,[[8,19,23,31],[24,,26,30]])}))}},{key:"addFont",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r,o,a=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return h.default({addFont:e}).required().object(l.VIAddFont),n=d.fontFaceGenerator(this.window,e),r=Object.keys(e.formats).map(function(t){return i(a,void 0,void 0,regeneratorRuntime.mark(function r(){var i;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.cache.loadOrSaveFile(d.generateFontUid(e.uid,t),e.formats[t]);case 2:i=r.sent,n.setFormat(t,i.filePath);case 4:case"end":return r.stop()}},r,this)}))}),t.next=5,Promise.all(r);case 5:o=n.generateStyleElement(),e.append.appendChild(o);case 7:case"end":return t.stop()}},t,this)}))}},{key:"handleFileFlag",value:function(e,t,n){return i(this,void 0,void 0,regeneratorRuntime.mark(function r(){var i,o;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(void 0!==(i=this.flagControllers[e.type])){r.next=3;break}throw new Error("Not implemented apply flag "+e.type);case 3:return o=t.filePath,r.next=6,i.applyFlag(e,n,o);case 6:case"end":return r.stop()}},r,this)}))}},{key:"getMessagePrefix",value:function(){return this.messagePrefix+"."+e.MESSAGE_PREFIX}}])&&r(t.prototype,n),p&&r(t,p),e}();t.default=p,p.MESSAGE_PREFIX="offline"},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var a=n(473),s=n(40),c=n(474),u=n(7),f=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.savedFiles={},this.savedContents={}}var t,n,f;return t=e,(n=[{key:"listFiles",value:function(){return o(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("list_files")});case 2:return t=e.sent,e.abrupt("return",t.fileUids);case 4:case"end":return e.stop()}},e,this)}))}},{key:"loadFile",value:function(e){return o(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return u.default({uid:e}).required().string(),t.next=3,this.postMessage({type:this.getMessage("load_file"),uid:e});case 3:return n=t.sent,this.savedFiles[e]=n.loadedFile,t.abrupt("return",n.loadedFile);case 6:case"end":return t.stop()}},t,this)}))}},{key:"saveFile",value:function(e,t,n){return o(this,void 0,void 0,regeneratorRuntime.mark(function r(){var i;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(this.checkUidValidity(e),!n||this.isHeaders(n)){r.next=3;break}throw new c.default({kind:"appletOfflineCacheError",message:"Invalid headers ".concat(n),code:s.default.OFFLINE_CACHE_HEADERS_NOT_VALID});case 3:return r.next=5,this.postMessage({type:this.getMessage("save_file"),uid:e,uri:t,headers:n});case 5:i=r.sent,this.savedFiles[e]=i.savedFile;case 7:case"end":return r.stop()}},r,this)}))}},{key:"loadOrSaveFile",value:function(e,t,n){return o(this,void 0,void 0,regeneratorRuntime.mark(function r(){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return u.default({uid:e}).required().string(),u.default({uri:t}).required().uri(),r.prev=2,r.abrupt("return",this.getCachedFile(e));case 6:return r.prev=6,r.t0=r.catch(2),r.prev=8,r.next=11,this.loadFile(e);case 11:return r.abrupt("return",r.sent);case 14:return r.prev=14,r.t1=r.catch(8),r.next=18,this.saveFile(e,t,n);case 18:return r.abrupt("return",this.getCachedFile(e));case 19:case"end":return r.stop()}},r,this,[[2,6],[8,14]])}))}},{key:"deleteFile",value:function(e){return o(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.checkUidValidity(e),t.next=3,this.postMessage({type:this.getMessage("delete_file"),uid:e});case 3:delete this.savedFiles[e];case 4:case"end":return t.stop()}},t,this)}))}},{key:"listContents",value:function(){return o(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("list_contents")});case 2:return t=e.sent,e.abrupt("return",t.contentUids);case 4:case"end":return e.stop()}},e,this)}))}},{key:"loadContent",value:function(e){return o(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.postMessage({type:this.getMessage("load_content"),uid:e});case 2:return n=t.sent,this.savedContents[e]=n.loadedContent,t.abrupt("return",n.loadedContent);case 5:case"end":return t.stop()}},t,this)}))}},{key:"saveContent",value:function(e,t){return o(this,void 0,void 0,regeneratorRuntime.mark(function n(){var r;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return this.checkUidValidity(e),u.default({content:t}).required().string(),n.next=4,this.postMessage({type:this.getMessage("save_content"),uid:e,content:""+t});case 4:r=n.sent,this.savedContents[e]=r.savedContent;case 6:case"end":return n.stop()}},n,this)}))}},{key:"deleteContent",value:function(e){return o(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.checkUidValidity(e),t.next=3,this.postMessage({type:this.getMessage("delete_content"),uid:e});case 3:delete this.savedContents[e];case 4:case"end":return t.stop()}},t,this)}))}},{key:"validateChecksumFile",value:function(e,t,n){return o(this,void 0,void 0,regeneratorRuntime.mark(function r(){var i;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return this.checkUidValidity(e),u.default({hash:t}).required().string(),u.default({hashType:n}).required().string(),r.next=5,this.postMessage({type:this.getMessage("validate_checksum"),uid:e,hash:t,hashType:n});case 5:return i=r.sent,r.abrupt("return",i.validatedChecksum);case 7:case"end":return r.stop()}},r,this)}))}},{key:"getChecksumFile",value:function(e,t){return o(this,void 0,void 0,regeneratorRuntime.mark(function n(){var r;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return this.checkUidValidity(e),u.default({hashType:t}).required().string(),n.next=4,this.postMessage({type:this.getMessage("get_checksum"),uid:e,hashType:t});case 4:return r=n.sent,n.abrupt("return",r.checksum);case 6:case"end":return n.stop()}},n,this)}))}},{key:"decompressFile",value:function(e,t,n){return o(this,void 0,void 0,regeneratorRuntime.mark(function r(){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return this.checkUidValidity(e),u.default({destinationUid:t}).required().string(),r.next=4,this.postMessage({type:this.getMessage("decompress_file"),uid:e,destinationUid:t,method:n});case 4:case"end":return r.stop()}},r,this)}))}},{key:"getCachedFile",value:function(e){if(void 0===this.savedFiles[e])throw new a.default({kind:"fileNotFoundError",message:"File was not found "+e,code:s.default.FILE_NOT_FOUND_IN_CACHE});return this.savedFiles[e]}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}},{key:"checkUidValidity",value:function(e){return u.default({uid:e}).required().string().matchRegExp(/^[^\\:*"<>|]+$/g,s.default.OFFLINE_CACHE_UID_NOT_VALID),!0}},{key:"isHeaders",value:function(e){return"object"===r(e)&&(Object.getOwnPropertyNames(e).forEach(function(t){if("string"!=typeof t||"string"!=typeof e[t])return!1}),!0)}}])&&i(t.prototype,n),f&&i(t,f),e}();t.default=f,f.MESSAGE_PREFIX="cache"},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(52),c=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,o(t).call(this,Object.assign(Object.assign({},e),{kind:"appletError",type:e.type?e.type:"FileNotFoundError"})))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,s["default"]),t}();t.default=c},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(52),c=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,o(t).call(this,Object.assign(Object.assign({},e),{kind:"appletError",type:e.type?e.type:"AppletOfflineCacheError"})))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,s["default"]),t}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={javascript:"javascript",css:"css",video:"video"}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var a=n(161),s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.loadFile=t,this.name="append",this.elementCache={}}var t,n,s;return t=e,(n=[{key:"create",value:function(e){var t=a.generateUniqueHash();return this.elementCache[t]=e,{type:"append",element:{uid:t}}}},{key:"applyFlag",value:function(e,t,n){return o(this,void 0,void 0,regeneratorRuntime.mark(function i(){var o,a;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if("object"===r(e.element)){i.next=2;break}throw new Error('File flag of type "append" needs to be object');case 2:if(void 0!==(o=this.elementCache[e.element.uid])){i.next=5;break}throw new Error('File flag element for "append" not found');case 5:if(void 0!==(a=this.loadFile[t])){i.next=8;break}throw new Error('File of type "'+t+'" cannot be appent');case 8:return i.next=10,a.load(n,o);case 10:case"end":return i.stop()}},i,this)}))}}])&&i(t.prototype,n),s&&i(t,s),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VISaveFile=void 0;var r=n(478),i=n(479),o=n(40),a=n(129);t.VISaveFile={uid:{string:null,error:{code:o.default.FILE_DOES_NOT_HAVE_UID,message:a.default[o.default.FILE_DOES_NOT_HAVE_UID]}},uri:"string",type:{string:r.VIFileType,error:{code:o.default.FILE_FLAGS_ARE_NOT_IN_ARRAY,message:a.default[o.default.FILE_FLAGS_ARE_NOT_IN_ARRAY]}},headers:"?object",flags:{"?array":{object:i.VIFlag,error:{code:o.default.FILE_FLAG_IS_NOT_OBJECT,message:a.default[o.default.FILE_FLAG_IS_NOT_OBJECT]}}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIFileType=void 0,t.VIFileType=["javascript","css","video"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIFlag=void 0;var r=n(480);t.VIFlag={type:{string:["append"]},element:{object:r.VIElement}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIElement=void 0,t.VIElement={uid:"string"}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.window=t,this.name="css"}var t,n,i;return t=e,(n=[{key:"load",value:function(e,t){var n=this;return new Promise(function(r,i){var o=n.window.document.createElement("link");o.setAttribute("type","text/css"),o.setAttribute("rel","stylesheet"),o.setAttribute("href",e),o.onerror=function(){i(new Error('File "'+e+'" cannot be loaded'))},o.onload=function(){console.info("File "+e.substring(0,100)+" was loaded"),r()},t.appendChild(o)})}}])&&r(t.prototype,n),i&&r(t,i),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIAddFont=t.VIFontFaceProperties=t.VIFontFormats=void 0,t.VIFontFormats={woff2:"string",eot:"?string",woff:"?string",ttf:"?string",svg:"?string"},t.VIFontFaceProperties={fontFamily:"string",fontStretch:"?string",fontStyle:"?string",fontWeight:"?string",unicodeRange:"?string"},t.VIAddFont=Object.assign(t.VIFontFaceProperties,{uid:"string",append:"object",formats:t.VIFontFormats})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fontFaceGenerator=t.generateFontUid=void 0;t.generateFontUid=function(e,t){return e+"."+t};t.fontFaceGenerator=function(e,t){var n="font-family: '".concat(t.fontFamily,"';"),r=t.fontStretch?"font-stretch: ".concat(t.fontStretch,";"):"",i=t.fontStyle?"font-style: ".concat(t.fontStyle,";"):"",o=t.fontWeight?"font-weight: ".concat(t.fontWeight,";"):"",a=t.unicodeRange?"unicode-range: ".concat(t.unicodeRange,";"):"",s=[],c="";return{setFormat:function(e,t){switch(e){case"woff":s.push("url('".concat(t,"') format('woff')"));break;case"woff2":s.push("url('".concat(t,"') format('woff2')"));break;case"ttf":s.push("url('".concat(t,"') format('truetype')"));break;case"svg":s.push("url('".concat(t,"#svgFontName') format('svg')"));break;case"eot":c="src: url('".concat(t,"');"),s.push("url('".concat(t,"?#iefix') format('embedded-opentype')"));break;default:console.warn("Not supported font format: ".concat(e))}},generateStyleElement:function(){var t="src: "+s.join(", "),u="@font-face {".concat(n).concat(r).concat(i).concat(o).concat(a).concat(c).concat(t," }"),f=e.document.createElement("style");return f.innerHTML=u,f}}}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(15),a=n(485),s=n(40),c=n(128),u=n(7),f=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.eventEmitter=new o.EventEmitter}var t,n,f;return t=e,(n=[{key:"dispatch",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.checkTypeValidity(e.type),t.next=3,this.postMessage({type:this.getMessage("dispatch"),command:e});case 3:case"end":return t.stop()}},t,this)}))}},{key:"onCommand",value:function(e){u.default({listener:e}).required().function(),this.eventEmitter.addListener("command",e)}},{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage("dispatch_to_applet"):var t={type:"command",command:e.command};this.eventEmitter.emit("command",t)}}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}},{key:"checkTypeValidity",value:function(e){u.default({type:e}).setError(new a.default({kind:"appletCommandError",message:"Type contains invalid characters.",code:s.default.COMMAND_TYPE_NOT_VALID,suggestion:c.default.COMMAND_TYPE_NOT_VALID})).required().string().matchRegExp(/^[a-zA-Z0-9\.\-_]+$/g),u.default({type:e}).setError(new a.default({kind:"appletCommandError",message:"Type is longer then 100 characters.",code:s.default.COMMAND_TYPE_IS_TOO_LONG})).lengthMax(100)}}])&&r(t.prototype,n),f&&r(t,f),e}();t.default=f,f.MESSAGE_PREFIX="command"},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(52),c=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,o(t).call(this,Object.assign(Object.assign({},e),{type:e.type?e.type:"AppletCommandError",pathToDocs:t.PATH_TO_DOCS,kind:"appletError"})))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,s["default"]),t}();t.default=c,c.PATH_TO_DOCS="/api/js/js-command"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(15),a=n(487),s=n(488),c=n(489),u=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.eventEmitter=new o.EventEmitter,this.led=new a.default(this.getMessagePrefix(),this.postMessage),this.barcodeScanner=new c.default(this.getMessagePrefix(),this.postMessage)}var t,n,u;return t=e,(n=[{key:"openSerialPort",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.postMessage({type:this.getMessage("serial_port.open"),options:e});case 2:return n=t.sent,r=n.refid,t.abrupt("return",new s.default(r,this.eventEmitter,this.getMessagePrefix(),this.postMessage));case 5:case"end":return t.stop()}},t,this)}))}},{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage("serial_port.data"):this.eventEmitter.emit("serial_port.data."+e.refid,e.data);break;default:this.barcodeScanner.handleMessageData(e)}}},{key:"getMessage",value:function(e){return this.getMessagePrefix()+"."+e}},{key:"getMessagePrefix",value:function(){return this.messagePrefix+"."+e.MESSAGE_PREFIX}}])&&r(t.prototype,n),u&&r(t,u),e}();t.default=u,u.MESSAGE_PREFIX="hardware"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(40),a=n(7),s=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,s;return t=e,(n=[{key:"setColor",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.checkColorValidity(e),t.next=3,this.postMessage({type:this.getMessage("set_color"),color:e?e.toUpperCase():null});case 3:case"end":return t.stop()}},t,this)}))}},{key:"checkColorValidity",value:function(e){a.default({color:e}).canBeNull().string(null,o.default.HARDWARE_LED_COLOR_IS_NOT_STRING),a.default({color:e}).canBeNull().matchRegExp(/^#[0-9A-Fa-f]{6,6}$/,o.default.HARDWARE_LED_COLOR_IS_NOT_VALID)}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}}])&&r(t.prototype,n),s&&r(t,s),e}();t.default=s,s.MESSAGE_PREFIX="led"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.refid=t,this.eventEmitter=n,this.messagePrefix=r,this.postMessage=i}var t,n,o;return t=e,(n=[{key:"onData",value:function(e){this.eventEmitter.addListener("serial_port.data."+this.refid,e)}},{key:"write",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.postMessage({type:this.getMessage("serial_port.write"),refid:this.refid,data:e});case 2:case"end":return t.stop()}},t,this)}))}},{key:"close",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("serial_port.close"),refid:this.refid});case 2:this.eventEmitter.removeAllListeners("serial_port.data."+this.refid);case 3:case"end":return e.stop()}},e,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_SCANNER_ID=void 0;var a=n(15);t.DEFAULT_SCANNER_ID=0;var s=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.eventEmitter=new a.EventEmitter}var n,s,c;return n=e,(s=[{key:"getVersion",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_version")});case 2:return t=e.sent,n=t.version,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"start",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){var r,a,s,c,u,f,l,d=this;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r={scannerId:t.DEFAULT_SCANNER_ID,timeout:1e4,cancelPrevious:!1},a=Object.assign(Object.assign({},r),e),s=a.scannerId,(c=o(a,["scannerId"])).cancelPrevious&&(this.eventEmitter.removeAllListeners("scanner_id_".concat(s,".data")),this.eventEmitter.removeAllListeners("scanner_id_".concat(s,".error"))),n.next=5,this.postMessage({type:this.getMessage("start"),scannerId:s,options:c});case 5:return u=function(e){d.eventEmitter.addListener("scanner_id_".concat(s,".data"),e)},f=function(e){d.eventEmitter.addListener("scanner_id_".concat(s,".error"),e)},l=function(){return i(d,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("stop"),scannerId:s});case 2:this.eventEmitter.removeAllListeners("scanner_id_".concat(s,".data")),this.eventEmitter.removeAllListeners("scanner_id_".concat(s,".error"));case 4:case"end":return e.stop()}},e,this)}))},n.abrupt("return",{stop:l,onData:u,onError:f});case 9:case"end":return n.stop()}},n,this)}))}},{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage("data"):this.eventEmitter.emit("scanner_id_".concat(e.scannerId,".data"),e.data);break;case this.getMessage("error"):this.eventEmitter.emit("scanner_id_".concat(e.scannerId,".error"),e.data)}}},{key:"getMessage",value:function(t){return[this.messagePrefix,e.MESSAGE_PREFIX,t].join(".")}}])&&r(n.prototype,s),c&&r(n,c),e}();t.default=s,s.MESSAGE_PREFIX="barcode_scanner"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(491),a=n(7),s=n(492),c=n(15),u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.exchange=t,this.events=new c.EventEmitter}var t,n,u;return t=e,(n=[{key:"open",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,void 0,void 0,regeneratorRuntime.mark(function r(){var i;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return a.default({uri:e}).required().uri(),a.default({options:n}).required().object(o.VIOpenLinkOptions),i=null===(t=n.headlessMode)||void 0===t||t,r.next=5,this.exchange.postMessage(Object.assign(Object.assign({uri:e},n),{headlessMode:i,type:"open"}));case 5:case"end":return r.stop()}},r,this)}))}},{key:"close",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.exchange.postMessage({type:"close"});case 2:case"end":return e.stop()}},e,this)}))}},{key:"onClose",value:function(e){var t=this;return a.default({listener:e}).required().function(),this.events.addListener(s.EventType.CLOSE,e),function(){t.events.removeListener(s.EventType.CLOSE,e)}}},{key:"handleMessageData",value:function(e){switch(e.type){case this.exchange.messageNameToType("closed"):var t={type:s.EventType.CLOSE,reason:e.reason};this.events.emit(s.EventType.CLOSE,t)}}},{key:"openLink",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.warn("sos.browser.openLink() is deprecated and will be removed in the future versions. Use sos.browser.open() instead."),a.default({uri:e}).required().uri(),a.default({options:t}).required().object(),n.next=5,this.exchange.postMessage(Object.assign(Object.assign({uri:e},t),{headlessMode:!1,type:"open_link"}));case 5:case"end":return n.stop()}},n,this)}))}}])&&r(t.prototype,n),u&&r(t,u),e}();t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIOpenLinkOptions=t.VITheme=void 0,t.VITheme={base:{"?string":["light","dark"]},shape:{"?object":{cornerSize:"?number"}},colors:{"?object":{primary:"?string",background:"?string",control:"?string"}},widgets:{"?object":{editAddress:{"?object":{colors:{"?object":{background:"?string",text:"?string"}}}},buttonClose:{"?object":{colors:{"?object":{background:"?string",text:"?string",icon:"?string"}},icon:{"?string":["none","exit_to_app","close","cancel"]},text:"?string"}},progress:{"?object":{color:"?string"}}}}},t.VIOpenLinkOptions={aclDomains:{"?array":"string"},aclMode:{"?string":["blacklist","whitelist"]},readOnlyAddressBar:"?boolean",idleTimeout:"?number",coordinates:{"?object":{x:"number",y:"number",width:"number",height:"number"}},theme:{"?object":t.VITheme},headlessMode:"?boolean",clearData:"?boolean",canUserClose:"?boolean",method:{"?string":["native","iframe"]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CloseReason=t.VIEventType=t.EventType=void 0,function(e){e.CLOSE="close"}(t.EventType||(t.EventType={})),t.VIEventType=["close"],function(e){e.API="API",e.USER="USER",e.TIMEOUT="TIMEOUT"}(t.CloseReason||(t.CloseReason={}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.window=t,this.messagePrefix=n,this.base=r,this.transformers=i,this.frontAppletWindows=[]}var t,n,i;return t=e,(n=[{key:"registerFrontAppletLoaderWindow",value:function(e){e.postMessage({type:this.getMessage("api_js_uri"),uri:this.base.apiJsUri},"*")}},{key:"registerBundledFrontAppletWindow",value:function(e){this.frontAppletWindows.push(e),e.postMessage({type:this.getMessage("config.update"),config:this.base.config},"*"),e.postMessage({type:this.getMessage("auth_hash.update"),authHash:this.base.authHash},"*"),e.postMessage({type:this.getMessage("front_display_version.update"),version:this.base.display.version},"*")}},{key:"forwardToFrontAppletWindows",value:function(e){var t=this,n=!0,r=!1,i=void 0;try{for(var o,a=function(){var n=o.value,r=t.transformers.reduce(function(e,t){return e?t(e,n):e},e);if(void 0===r)return"continue";n.postMessage(r,"*")},s=this.frontAppletWindows[Symbol.iterator]();!(n=(o=s.next()).done);n=!0)a()}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}}},{key:"forwardFromFrontAppletWindows",value:function(e,t){-1!==this.frontAppletWindows.indexOf(e)&&this.window.parent.postMessage(t,"*")}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),i&&r(t,i),e}();t.default=i},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(t,n,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.window=t,this.messagePrefix=n,this.postMessageToParent=r;var o=function(e){return i.handleTouch(e)};this.window.addEventListener("touchstart",o,!0),this.window.addEventListener("touchend",o,!0),this.window.addEventListener("touchcancel",o,!0),this.window.addEventListener("touchmove",o,!0)}var t,n,i;return t=e,(n=[{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage("propagate"):var t=this.window.document.elementFromPoint(e.x,e.y);t&&"click"in t&&t.click()}}},{key:"transformIframeData",value:function(e,t){if(e.type!==this.getMessage("propagate"))return e;var n=Array.from(this.window.document.getElementsByTagName("iframe")).find(function(e){return e.contentWindow===t});return void 0===n||e.x<n.offsetLeft||e.x>n.offsetLeft+n.offsetWidth||e.y<n.offsetTop||e.y>n.offsetTop+n.offsetHeight?void 0:Object.assign(Object.assign({},e),{x:e.x-n.offsetLeft,y:e.y-n.offsetTop})}},{key:"handleTouch",value:function(e){this.postMessageToParent({type:this.getMessage("event"),eventType:e.type})}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}}])&&r(t.prototype,n),i&&r(t,i),e}();t.default=i,i.MESSAGE_PREFIX="touch"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(15),o=n(7),a=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.window=t,this.messagePrefix=n,this.eventEmitter=new i.EventEmitter,this.hasWindowEventListener=!1,this.alive=!0,this.dispatchEventToParent=function(e){try{r.window.parent.document.dispatchEvent(new KeyboardEvent("keyup",e))}catch(t){if(!(t instanceof ReferenceError))throw t;r.window.parent.document.dispatchEvent(e)}},!this.isTopLevelFrame()&&this.canAccessParentOrigin()&&(this.hasWindowEventListener=!0,this.window.addEventListener("keyup",this.dispatchEventToParent))}var t,n,a;return t=e,(n=[{key:"destroy",value:function(){this.alive&&(this.alive=!1,this.removeEventListeners(),this.hasWindowEventListener&&this.window.removeEventListener("keyup",this.dispatchEventToParent))}},{key:"onKeyUp",value:function(e){this.checkAlive(),o.default({listener:e}).required().function(),this.eventEmitter.addListener("keyup",e)}},{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage("keyup"):var t={type:"keyup",keyCode:e.keyCode,keyName:e.keyName};this.emitKeyUpEvent(t)}}},{key:"removeEventListeners",value:function(){this.eventEmitter.removeAllListeners()}},{key:"removeEventListener",value:function(e,t){this.eventEmitter.removeListener(e,t)}},{key:"emitKeyUpEvent",value:function(e){this.checkAlive(),this.eventEmitter.emit("keyup",e)}},{key:"isTopLevelFrame",value:function(){return this.window===this.window.parent}},{key:"canAccessParentOrigin",value:function(){var e,t;try{var n=!!(null===(t=null===(e=this.window)||void 0===e?void 0:e.parent)||void 0===t?void 0:t.document);return n||console.warn("Parent window or document is not defined"),n}catch(e){if(e instanceof DOMException)return console.warn("Parent document is not accessible"),!1;throw e}}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}},{key:"checkAlive",value:function(){if(!this.alive)throw new Error("destroyed")}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a,a.MESSAGE_PREFIX="input"},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var u=n(15),f=n(7),l=function(e){function t(e,n,r){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(i=o(this,a(t).call(this))).window=e,i.messagePrefix=n,i.postMessage=r,i}var r,l,d;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(t,u.EventEmitter),r=t,(l=[{key:"isRemoteDebugEnabled",value:function(){return c(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("is_remote_enabled")});case 2:return t=e.sent,n=t.isEnabled,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"onRemoteDebugChanged",value:function(e){f.default({listener:e}).required().function(),this.addListener(t.DEBUG_CHANGED,function(t){return e({enabled:t.enabled})})}},{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage("configure"):this.emit(t.DEBUG_CHANGED,{enabled:e.enabled}),e.enabled?(this.window.WeinreServerURL=e.url,this.window.WeinreServerId=e.id,this.window.__weinreLoaded||(n(497),this.window.__weinreLoaded=!0)):(this.window.WeinreServerURL=void 0,this.window.WeinreServerId=void 0)}}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+t.MESSAGE_PREFIX+"."+e}}])&&i(r.prototype,l),d&&i(r,d),t}();t.default=l,l.MESSAGE_PREFIX="debug",l.DEBUG_CHANGED="debug.changed"},function(module,exports){!function(){eval('/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * "License"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n//----------------------------------------------------------------------------\n// an implementation of the require() function as specified for use with\n// CommonJS Modules - see http://commonjs.org/specs/modules/1.0.html\n//----------------------------------------------------------------------------\n\n//----------------------------------------------------------------------------\n// inspired from David Flanagan\'s require() function documented here:\n// http://www.davidflanagan.com/2009/11/a-module-loader.html\n//----------------------------------------------------------------------------\n\n//----------------------------------------------------------------------------\n// only supports "preloaded" modules ala define() (AMD)\n// http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition\n// but the id parameter is required\n//----------------------------------------------------------------------------\n\n//----------------------------------------------------------------------------\n// function wrapper\n//----------------------------------------------------------------------------\n(function(){\n\n//----------------------------------------------------------------------------\n// some constants\n//----------------------------------------------------------------------------\nvar PROGRAM = "modjewel"\nvar VERSION = "2.0.0"\nvar global = this\n\n//----------------------------------------------------------------------------\n// if require() is already defined, leave\n//----------------------------------------------------------------------------\nif (global.modjewel) {\n log("modjewel global variable already defined")\n return\n}\n\nglobal.modjewel = null\n\n//----------------------------------------------------------------------------\n// "globals" (local to this function scope though)\n//----------------------------------------------------------------------------\nvar ModuleStore\nvar ModulePreloadStore\nvar MainModule\nvar WarnOnRecursiveRequire = false\n\n//----------------------------------------------------------------------------\n// the require function\n//----------------------------------------------------------------------------\nfunction get_require(currentModule) {\n var result = function require(moduleId) {\n\n if (moduleId.match(/^\\.{1,2}\\//)) {\n moduleId = normalize(currentModule, moduleId)\n }\n\n if (hop(ModuleStore, moduleId)) {\n var module = ModuleStore[moduleId]\n if (module.__isLoading) {\n if (WarnOnRecursiveRequire) {\n var fromModule = currentModule ? currentModule.id : "<root>"\n console.log("module \'" + moduleId + "\' recursively require()d from \'" + fromModule + "\', problem?")\n }\n }\n\n currentModule.moduleIdsRequired.push(moduleId)\n\n return module.exports\n }\n\n if (!hop(ModulePreloadStore, moduleId)) {\n var fromModule = currentModule ? currentModule.id : "<root>"\n error("module \'" + moduleId + "\' not found from \'" + fromModule + "\', must be define()\'d first")\n }\n\n var factory = ModulePreloadStore[moduleId][0]\n var prereqs = ModulePreloadStore[moduleId][1]\n\n var module = create_module(moduleId)\n\n var newRequire = get_require(module)\n\n ModuleStore[moduleId] = module\n\n module.__isLoading = true\n try {\n currentModule.moduleIdsRequired.push(moduleId)\n\n var prereqModules = []\n for (var i=0; i<prereqs.length; i++) {\n var prereqId = prereqs[i]\n var prereqModule\n\n if (prereqId == "require") prereqModule = newRequire\n else if (prereqId == "exports") prereqModule = module.exports\n else if (prereqId == "module") prereqModule = module\n else prereqModule = newRequire(prereqId)\n\n prereqModules.push(prereqModule)\n }\n\n if (typeof factory == "function") {\n var result = factory.apply(null, prereqModules)\n if (result) {\n module.exports = result\n }\n }\n else {\n module.exports = factory\n }\n }\n finally {\n module.__isLoading = false\n }\n\n return module.exports\n }\n\n result.define = require_define\n result.implementation = PROGRAM\n result.version = VERSION\n\n return result\n}\n\n//----------------------------------------------------------------------------\n// shorter version of hasOwnProperty\n//----------------------------------------------------------------------------\nfunction hop(object, name) {\n return Object.prototype.hasOwnProperty.call(object, name)\n}\n\n//----------------------------------------------------------------------------\n// create a new module\n//----------------------------------------------------------------------------\nfunction create_module(id) {\n return {\n id: id,\n uri: id,\n exports: {},\n prereqIds: [],\n moduleIdsRequired: []\n }\n}\n\n//----------------------------------------------------------------------------\n// reset the stores\n//----------------------------------------------------------------------------\nfunction require_reset() {\n ModuleStore = {}\n ModulePreloadStore = {}\n MainModule = create_module(null)\n\n var require = get_require(MainModule)\n var define = require_define\n \n define("modjewel", modjewel_module)\n\n global.modjewel = require("modjewel")\n global.modjewel.require = require\n global.modjewel.define = define\n global.modjewel.define.amd = {implementation: PROGRAM, version: VERSION}\n}\n\n//----------------------------------------------------------------------------\n// used by pre-built modules that can be included via <script src=>\n// a simplification of\n// http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition\n// where id is required\n//----------------------------------------------------------------------------\nfunction require_define(moduleId, prereqs, factory) {\n var rem = ["require", "exports", "module"]\n\n if (typeof moduleId != "string") {\n console.log("modjewel.define(): first parameter must be a string; was: " + moduleId)\n return\n }\n\n if (arguments.length == 2) {\n factory = prereqs\n prereqs = null\n }\n\n if (!prereqs || prereqs.length == 0) {\n prereqs = rem\n }\n\n if (typeof factory != "function") {\n if (factory) {\n ModulePreloadStore[moduleId] = [factory, prereqs]\n return\n }\n\n console.log("modjewel.define(): factory was falsy: " + factory)\n return\n }\n\n if (moduleId.match(/^\\./)) {\n console.log("modjewel.define(): moduleId must not start with \'.\': \'" + moduleName + "\'")\n return\n }\n\n if (hop(ModulePreloadStore, moduleId)) {\n console.log("modjewel.define(): module \'" + moduleId + "\' has already been defined")\n return\n }\n\n ModulePreloadStore[moduleId] = [factory, prereqs]\n}\n\n//----------------------------------------------------------------------------\n// get the path of a module\n//----------------------------------------------------------------------------\nfunction getModulePath(module) {\n if (!module || !module.id) return ""\n\n var parts = module.id.split("/")\n\n return parts.slice(0, parts.length-1).join("/")\n}\n\n//----------------------------------------------------------------------------\n// normalize a \'file name\' with . and .. with a \'directory name\'\n//----------------------------------------------------------------------------\nfunction normalize(module, file) {\n var modulePath = getModulePath(module)\n var dirParts = ("" == modulePath) ? [] : modulePath.split("/")\n var fileParts = file.split("/")\n\n for (var i=0; i<fileParts.length; i++) {\n var filePart = fileParts[i]\n\n if (filePart == ".") {\n }\n\n else if (filePart == "..") {\n if (dirParts.length > 0) {\n dirParts.pop()\n }\n else {\n // error("error normalizing \'" + module + "\' and \'" + file + "\'")\n // eat non-valid .. paths\n }\n }\n\n else {\n dirParts.push(filePart)\n }\n }\n\n return dirParts.join("/")\n}\n\n//----------------------------------------------------------------------------\n// throw an error\n//----------------------------------------------------------------------------\nfunction error(message) {\n throw new Error(PROGRAM + ": " + message)\n}\n\n//----------------------------------------------------------------------------\n// get a list of loaded modules\n//----------------------------------------------------------------------------\nfunction modjewel_getLoadedModuleIds() {\n var result = []\n\n for (moduleId in ModuleStore) {\n result.push(moduleId)\n }\n\n return result\n}\n\n//----------------------------------------------------------------------------\n// get a list of the preloaded module ids\n//----------------------------------------------------------------------------\nfunction modjewel_getPreloadedModuleIds() {\n var result = []\n\n for (moduleId in ModulePreloadStore) {\n result.push(moduleId)\n }\n\n return result\n}\n\n//----------------------------------------------------------------------------\n// get a module by module id\n//----------------------------------------------------------------------------\nfunction modjewel_getModule(moduleId) {\n if (null == moduleId) return MainModule\n\n return ModuleStore[moduleId]\n}\n\n//----------------------------------------------------------------------------\n// get a list of module ids which have been required by the specified module id\n//----------------------------------------------------------------------------\nfunction modjewel_getModuleIdsRequired(moduleId) {\n var module = modjewel_getModule(moduleId)\n if (null == module) return null\n\n return module.moduleIdsRequired.slice()\n}\n\n//----------------------------------------------------------------------------\n// set the WarnOnRecursiveRequireFlag\n// - if you make use of "module.exports =" in your code, you will want this on\n//----------------------------------------------------------------------------\nfunction modjewel_warnOnRecursiveRequire(value) {\n if (arguments.length == 0) return WarnOnRecursiveRequire\n WarnOnRecursiveRequire = !!value\n}\n\n//----------------------------------------------------------------------------\n// the modjewel module\n//----------------------------------------------------------------------------\nfunction modjewel_module(require, exports, module) {\n exports.VERSION = VERSION\n exports.require = null // filled in later\n exports.define = null // filled in later\n exports.getLoadedModuleIds = modjewel_getLoadedModuleIds\n exports.getPreloadedModuleIds = modjewel_getPreloadedModuleIds\n exports.getModule = modjewel_getModule\n exports.getModuleIdsRequired = modjewel_getModuleIdsRequired\n exports.warnOnRecursiveRequire = modjewel_warnOnRecursiveRequire\n}\n\n//----------------------------------------------------------------------------\n// log a message\n//----------------------------------------------------------------------------\nfunction log(message) {\n console.log("modjewel: " + message)\n}\n\n//----------------------------------------------------------------------------\n// make the require function a global\n//----------------------------------------------------------------------------\nrequire_reset()\n\n//----------------------------------------------------------------------------\n})();\n\n//@ sourceURL=modjewel.js'),modjewel.require("modjewel").warnOnRecursiveRequire(!0),eval(';modjewel.define("weinre/common/Binding", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Binding, Ex;\n\nEx = require(\'./Ex\');\n\nmodule.exports = Binding = (function() {\n function Binding(receiver, method) {\n if (!receiver) {\n throw new Ex(arguments, "receiver argument for Binding constructor was null");\n }\n if (typeof method === "string") {\n method = receiver[method];\n }\n if (typeof method === !"function") {\n throw new Ex(arguments, "method argument didn\'t specify a function");\n }\n return function() {\n return method.apply(receiver, [].slice.call(arguments));\n };\n }\n\n return Binding;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/Binding.amd.js'),eval(';modjewel.define("weinre/common/Callback", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Callback, CallbackIndex, CallbackTable, ConnectorChannel, Ex;\n\nEx = require(\'./Ex\');\n\nCallbackTable = {};\n\nCallbackIndex = 1;\n\nConnectorChannel = "???";\n\nmodule.exports = Callback = (function() {\n function Callback() {\n throw new Ex(arguments, "this class is not intended to be instantiated");\n }\n\n Callback.setConnectorChannel = function(connectorChannel) {\n return ConnectorChannel = "" + connectorChannel;\n };\n\n Callback.register = function(callback) {\n var data, func, index, receiver;\n if (typeof callback === "function") {\n callback = [null, callback];\n }\n if (typeof callback.slice !== "function") {\n throw new Ex(arguments, "callback must be an array or function");\n }\n receiver = callback[0];\n func = callback[1];\n data = callback.slice(2);\n if (typeof func === "string") {\n func = receiver[func];\n }\n if (typeof func !== "function") {\n throw new Ex(arguments, "callback function was null or not found");\n }\n index = ConnectorChannel + "::" + CallbackIndex;\n CallbackIndex++;\n if (CallbackIndex >= 65536 * 65536) {\n CallbackIndex = 1;\n }\n CallbackTable[index] = [receiver, func, data];\n return index;\n };\n\n Callback.deregister = function(index) {\n return delete CallbackTable[index];\n };\n\n Callback.invoke = function(index, args) {\n var callback, e, func, funcName, receiver;\n callback = CallbackTable[index];\n if (!callback) {\n throw new Ex(arguments, "callback " + index + " not registered or already invoked");\n }\n receiver = callback[0];\n func = callback[1];\n args = callback[2].concat(args);\n try {\n return func.apply(receiver, args);\n } catch (_error) {\n e = _error;\n funcName = func.name || func.signature;\n if (!funcName) {\n funcName = "<unnamed>";\n }\n return require("./Weinre").logError(arguments.callee.signature + (" exception invoking callback: " + funcName + "(" + (args.join(\',\')) + "): ") + e);\n } finally {\n Callback.deregister(index);\n }\n };\n\n return Callback;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/Callback.amd.js'),eval(';modjewel.define("weinre/common/Debug", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Debug;\n\nmodule.exports = new (Debug = (function() {\n function Debug() {\n this._printCalledArgs = {};\n }\n\n Debug.prototype.log = function(message) {\n var console;\n console = window.console.__original || window.console;\n return console.log("" + (this.timeStamp()) + ": " + message);\n };\n\n Debug.prototype.logCall = function(context, intf, method, args, message) {\n var printArgs, signature;\n if (message) {\n message = ": " + message;\n } else {\n message = "";\n }\n signature = this.signature(intf, method);\n printArgs = this._printCalledArgs[signature];\n if (printArgs) {\n args = JSON.stringify(args, null, 4);\n } else {\n args = "";\n }\n return this.log("" + context + " " + signature + "(" + args + ")" + message);\n };\n\n Debug.prototype.logCallArgs = function(intf, method) {\n return this._printCalledArgs[this.signature(intf, method)] = true;\n };\n\n Debug.prototype.signature = function(intf, method) {\n return "" + intf + "." + method;\n };\n\n Debug.prototype.timeStamp = function() {\n var date, mins, secs;\n date = new Date();\n mins = "" + (date.getMinutes());\n secs = "" + (date.getSeconds());\n if (mins.length === 1) {\n mins = "0" + mins;\n }\n if (secs.length === 1) {\n secs = "0" + secs;\n }\n return "" + mins + ":" + secs;\n };\n\n return Debug;\n\n})());\n\n});\n\n//@ sourceURL=weinre/common/Debug.amd.js'),eval(';modjewel.define("weinre/common/EventListeners", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar EventListeners, Ex, Weinre;\n\nEx = require(\'./Ex\');\n\nWeinre = require(\'./Weinre\');\n\nmodule.exports = EventListeners = (function() {\n function EventListeners() {\n this.listeners = [];\n }\n\n EventListeners.prototype.add = function(listener, useCapture) {\n return this.listeners.push([listener, useCapture]);\n };\n\n EventListeners.prototype.remove = function(listener, useCapture) {\n var listeners, _i, _len, _listener;\n listeners = this.listeners.slice();\n for (_i = 0, _len = listeners.length; _i < _len; _i++) {\n _listener = listeners[_i];\n if (_listener[0] !== listener) {\n continue;\n }\n if (_listener[1] !== useCapture) {\n continue;\n }\n this._listeners.splice(i, 1);\n return;\n }\n };\n\n EventListeners.prototype.fire = function(event) {\n var e, listener, listeners, _i, _len, _results;\n listeners = this.listeners.slice();\n _results = [];\n for (_i = 0, _len = listeners.length; _i < _len; _i++) {\n listener = listeners[_i];\n listener = listener[0];\n if (typeof listener === "function") {\n try {\n listener.call(null, event);\n } catch (_error) {\n e = _error;\n Weinre.logError("" + arguments.callee.name + " invocation exception: " + e);\n }\n continue;\n }\n if (typeof (listener != null ? listener.handleEvent : void 0) !== "function") {\n throw new Ex(arguments, "listener does not implement the handleEvent() method");\n }\n try {\n _results.push(listener.handleEvent.call(listener, event));\n } catch (_error) {\n e = _error;\n _results.push(Weinre.logError("" + arguments.callee.name + " invocation exception: " + e));\n }\n }\n return _results;\n };\n\n return EventListeners;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/EventListeners.amd.js'),eval(';modjewel.define("weinre/common/Ex", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Ex, StackTrace, prefix;\n\nStackTrace = require(\'./StackTrace\');\n\nmodule.exports = Ex = (function() {\n Ex.catching = function(func) {\n var e;\n try {\n return func.call(this);\n } catch (_error) {\n e = _error;\n console.log("runtime error: " + e);\n return StackTrace.dump(arguments);\n }\n };\n\n function Ex(args, message) {\n if (!args || !args.callee) {\n throw Ex(arguments, "first parameter must be an Arguments object");\n }\n StackTrace.dump(args);\n if (message instanceof Error) {\n message = "threw error: " + message;\n }\n message = prefix(args, message);\n message;\n }\n\n return Ex;\n\n})();\n\nprefix = function(args, string) {\n if (args.callee.signature) {\n return args.callee.signature + ": " + string;\n }\n if (args.callee.displayName) {\n return args.callee.displayName + ": " + string;\n }\n if (args.callee.name) {\n return args.callee.name + ": " + string;\n }\n return "<anonymous>" + ": " + string;\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/Ex.amd.js'),eval(';modjewel.define("weinre/common/HookLib", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar HookLib, HookSite, HookSites, IgnoreHooks, callAfterHooks, callBeforeHooks, callExceptHooks, getHookSite, getHookedFunction;\n\nHookLib = exports;\n\nHookSites = [];\n\nIgnoreHooks = 0;\n\nmodule.exports = HookLib = (function() {\n function HookLib() {}\n\n HookLib.addHookSite = function(object, property) {\n return getHookSite(object, property, true);\n };\n\n HookLib.getHookSite = function(object, property) {\n return getHookSite(object, property, false);\n };\n\n HookLib.ignoreHooks = function(func) {\n var result;\n try {\n IgnoreHooks++;\n result = func.call();\n } finally {\n IgnoreHooks--;\n }\n return result;\n };\n\n return HookLib;\n\n})();\n\ngetHookSite = function(object, property, addIfNotFound) {\n var hookSite, i, _i, _len;\n i = 0;\n for (_i = 0, _len = HookSites.length; _i < _len; _i++) {\n hookSite = HookSites[_i];\n if (hookSite.object !== object) {\n continue;\n }\n if (hookSite.property !== property) {\n continue;\n }\n return hookSite;\n }\n if (!addIfNotFound) {\n return null;\n }\n hookSite = new HookSite(object, property);\n HookSites.push(hookSite);\n return hookSite;\n};\n\nHookSite = (function() {\n function HookSite(object, property) {\n var hookedFunction;\n this.object = object;\n this.property = property;\n this.target = object[property];\n this.hookss = [];\n if (typeof this.target === \'undefined\') {\n return;\n } else {\n hookedFunction = getHookedFunction(this.target, this);\n if (!(navigator.userAgent.match(/MSIE/i) && (object === localStorage || object === sessionStorage))) {\n object[property] = hookedFunction;\n }\n }\n }\n\n HookSite.prototype.addHooks = function(hooks) {\n return this.hookss.push(hooks);\n };\n\n HookSite.prototype.removeHooks = function(hooks) {\n var i, _i, _ref;\n for (i = _i = 0, _ref = this.hookss.length; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (this.hookss[i] === hooks) {\n this.hookss.splice(i, 1);\n return;\n }\n }\n };\n\n return HookSite;\n\n})();\n\ngetHookedFunction = function(func, hookSite) {\n var hookedFunction;\n hookedFunction = function() {\n var e, result;\n callBeforeHooks(hookSite, this, arguments);\n try {\n result = func.apply(this, arguments);\n } catch (_error) {\n e = _error;\n callExceptHooks(hookSite, this, arguments, e);\n throw e;\n } finally {\n callAfterHooks(hookSite, this, arguments, result);\n }\n return result;\n };\n hookedFunction.displayName = func.displayName || func.name;\n return hookedFunction;\n};\n\ncallBeforeHooks = function(hookSite, receiver, args) {\n var hooks, _i, _len, _ref, _results;\n if (IgnoreHooks > 0) {\n return;\n }\n _ref = hookSite.hookss;\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n hooks = _ref[_i];\n if (hooks.before) {\n _results.push(hooks.before.call(hooks, receiver, args));\n } else {\n _results.push(void 0);\n }\n }\n return _results;\n};\n\ncallAfterHooks = function(hookSite, receiver, args, result) {\n var hooks, _i, _len, _ref, _results;\n if (IgnoreHooks > 0) {\n return;\n }\n _ref = hookSite.hookss;\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n hooks = _ref[_i];\n if (hooks.after) {\n _results.push(hooks.after.call(hooks, receiver, args, result));\n } else {\n _results.push(void 0);\n }\n }\n return _results;\n};\n\ncallExceptHooks = function(hookSite, receiver, args, e) {\n var hooks, _i, _len, _ref, _results;\n if (IgnoreHooks > 0) {\n return;\n }\n _ref = hookSite.hookss;\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n hooks = _ref[_i];\n if (hooks.except) {\n _results.push(hooks.except.call(hooks, receiver, args, e));\n } else {\n _results.push(void 0);\n }\n }\n return _results;\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/HookLib.amd.js'),eval(';modjewel.define("weinre/common/IDGenerator", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar IDGenerator, idName, nextId, nextIdValue;\n\nnextIdValue = 1;\n\nidName = "__weinre__id";\n\nmodule.exports = IDGenerator = (function() {\n function IDGenerator() {}\n\n IDGenerator.checkId = function(object) {\n return object[idName];\n };\n\n IDGenerator.getId = function(object, map) {\n var id;\n id = IDGenerator.checkId(object);\n if (!id) {\n id = nextId();\n object[idName] = id;\n }\n if (map) {\n map[id] = object;\n }\n return id;\n };\n\n IDGenerator.next = function() {\n return nextId();\n };\n\n return IDGenerator;\n\n})();\n\nnextId = function() {\n var result;\n result = nextIdValue;\n nextIdValue += 1;\n return result;\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/IDGenerator.amd.js'),eval(';modjewel.define("weinre/common/IDLTools", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Callback, Ex, IDLTools, IDLs, getProxyMethod;\n\nEx = require(\'./Ex\');\n\nCallback = require(\'./Callback\');\n\nIDLs = {};\n\nmodule.exports = IDLTools = (function() {\n function IDLTools() {\n throw new Ex(arguments, "this class is not intended to be instantiated");\n }\n\n IDLTools.addIDLs = function(idls) {\n var idl, intf, _i, _len, _results;\n _results = [];\n for (_i = 0, _len = idls.length; _i < _len; _i++) {\n idl = idls[_i];\n _results.push((function() {\n var _j, _len1, _ref, _results1;\n _ref = idl.interfaces;\n _results1 = [];\n for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {\n intf = _ref[_j];\n IDLs[intf.name] = intf;\n _results1.push(intf.module = idl.name);\n }\n return _results1;\n })());\n }\n return _results;\n };\n\n IDLTools.getIDL = function(name) {\n return IDLs[name];\n };\n\n IDLTools.getIDLsMatching = function(regex) {\n var intf, intfName, results;\n results = [];\n for (intfName in IDLs) {\n intf = IDLs[intfName];\n if (intfName.match(regex)) {\n results.push(intf);\n }\n }\n return results;\n };\n\n IDLTools.validateAgainstIDL = function(klass, interfaceName) {\n var classMethod, error, errors, intf, intfMethod, messagePrefix, printName, propertyName, _i, _j, _len, _len1, _ref, _results;\n intf = IDLTools.getIDL(interfaceName);\n messagePrefix = "IDL validation for " + interfaceName + ": ";\n if (null === intf) {\n throw new Ex(arguments, messagePrefix + ("idl not found: \'" + interfaceName + "\'"));\n }\n errors = [];\n _ref = intf.methods;\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n intfMethod = _ref[_i];\n classMethod = klass.prototype[intfMethod.name];\n printName = klass.name + "::" + intfMethod.name;\n if (null === classMethod) {\n errors.push(messagePrefix + ("method not implemented: \'" + printName + "\'"));\n continue;\n }\n if (classMethod.length !== intfMethod.parameters.length) {\n if (classMethod.length !== intfMethod.parameters.length + 1) {\n errors.push(messagePrefix + ("wrong number of parameters: \'" + printName + "\'"));\n continue;\n }\n }\n }\n for (propertyName in klass.prototype) {\n if (klass.prototype.hasOwnProperty(propertyName)) {\n continue;\n }\n if (propertyName.match(/^_.*/)) {\n continue;\n }\n printName = klass.name + "::" + propertyName;\n if (!intf.methods[propertyName]) {\n errors.push(messagePrefix + ("method should not be implemented: \'" + printName + "\'"));\n continue;\n }\n }\n if (!errors.length) {\n return;\n }\n _results = [];\n for (_j = 0, _len1 = errors.length; _j < _len1; _j++) {\n error = errors[_j];\n _results.push(require("./Weinre").logError(error));\n }\n return _results;\n };\n\n IDLTools.buildProxyForIDL = function(proxyObject, interfaceName) {\n var intf, intfMethod, messagePrefix, _i, _len, _ref, _results;\n intf = IDLTools.getIDL(interfaceName);\n messagePrefix = "building proxy for IDL " + interfaceName + ": ";\n if (null === intf) {\n throw new Ex(arguments, messagePrefix + ("idl not found: \'" + interfaceName + "\'"));\n }\n _ref = intf.methods;\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n intfMethod = _ref[_i];\n _results.push(proxyObject[intfMethod.name] = getProxyMethod(intf, intfMethod));\n }\n return _results;\n };\n\n return IDLTools;\n\n})();\n\ngetProxyMethod = function(intf, method) {\n var proxyMethod, result;\n result = proxyMethod = function() {\n var args, callbackId;\n callbackId = null;\n args = [].slice.call(arguments);\n if (args.length > 0) {\n if (typeof args[args.length - 1] === "function") {\n callbackId = Callback.register(args[args.length - 1]);\n args = args.slice(0, args.length - 1);\n }\n }\n while (args.length < method.parameters.length) {\n args.push(null);\n }\n args.push(callbackId);\n return this.__invoke(intf.name, method.name, args);\n };\n result.displayName = intf.name + "__" + method.name;\n return result;\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/IDLTools.amd.js'),eval(';modjewel.define("weinre/common/MessageDispatcher", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Binding, Callback, Ex, IDLTools, InspectorBackend, MessageDispatcher, Verbose, WebSocketXhr, Weinre,\n __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };\n\nWeinre = require(\'./Weinre\');\n\nWebSocketXhr = require(\'./WebSocketXhr\');\n\nIDLTools = require(\'./IDLTools\');\n\nBinding = require(\'./Binding\');\n\nEx = require(\'./Ex\');\n\nCallback = require(\'./Callback\');\n\nVerbose = false;\n\nInspectorBackend = null;\n\nmodule.exports = MessageDispatcher = (function() {\n function MessageDispatcher(url, id) {\n if (!id) {\n id = "anonymous";\n }\n this._url = url;\n this._id = id;\n this.error = null;\n this._opening = false;\n this._opened = false;\n this._closed = false;\n this._interfaces = {};\n this._open();\n }\n\n MessageDispatcher.setInspectorBackend = function(inspectorBackend) {\n return InspectorBackend = inspectorBackend;\n };\n\n MessageDispatcher.verbose = function(value) {\n if (arguments.length >= 1) {\n Verbose = !!value;\n }\n return Verbose;\n };\n\n MessageDispatcher.prototype._open = function() {\n if (this._opened || this._opening) {\n return;\n }\n if (this._closed) {\n throw new Ex(arguments, "socket has already been closed");\n }\n this._opening = true;\n this._socket = new WebSocketXhr(this._url, this._id);\n this._socket.addEventListener("open", Binding(this, "_handleOpen"));\n this._socket.addEventListener("error", Binding(this, "_handleError"));\n this._socket.addEventListener("message", Binding(this, "_handleMessage"));\n return this._socket.addEventListener("close", Binding(this, "_handleClose"));\n };\n\n MessageDispatcher.prototype.close = function() {\n if (this._closed) {\n return;\n }\n this._opened = false;\n this._closed = true;\n return this._socket.close();\n };\n\n MessageDispatcher.prototype.send = function(data) {\n return this._socket.send(data);\n };\n\n MessageDispatcher.prototype.getWebSocket = function() {\n return this._socket;\n };\n\n MessageDispatcher.prototype.registerInterface = function(intfName, intf, validate) {\n if (validate) {\n IDLTools.validateAgainstIDL(intf.constructor, intfName);\n }\n if (this._interfaces[intfName]) {\n throw new Ex(arguments, "interface " + intfName + " has already been registered");\n }\n return this._interfaces[intfName] = intf;\n };\n\n MessageDispatcher.prototype.createProxy = function(intfName) {\n var proxy, self, __invoke;\n proxy = {};\n IDLTools.buildProxyForIDL(proxy, intfName);\n self = this;\n proxy.__invoke = __invoke = function(intfName, methodName, args) {\n return self._sendMethodInvocation(intfName, methodName, args);\n };\n return proxy;\n };\n\n MessageDispatcher.prototype._sendMethodInvocation = function(intfName, methodName, args) {\n var data;\n if (typeof intfName !== "string") {\n throw new Ex(arguments, "expecting intf parameter to be a string");\n }\n if (typeof methodName !== "string") {\n throw new Ex(arguments, "expecting method parameter to be a string");\n }\n data = {\n "interface": intfName,\n method: methodName,\n args: args\n };\n data = JSON.stringify(data);\n this._socket.send(data);\n if (Verbose) {\n return Weinre.logDebug(this.constructor.name + ("[" + this._url + "]: send " + intfName + "." + methodName + "(" + (JSON.stringify(args)) + ")"));\n }\n };\n\n MessageDispatcher.prototype.getState = function() {\n if (this._opening) {\n return "opening";\n }\n if (this._opened) {\n return "opened";\n }\n if (this._closed) {\n return "closed";\n }\n return "unknown";\n };\n\n MessageDispatcher.prototype.isOpen = function() {\n return this._opened === true;\n };\n\n MessageDispatcher.prototype._handleOpen = function(event) {\n this._opening = false;\n this._opened = true;\n this.channel = event.channel;\n Callback.setConnectorChannel(this.channel);\n if (Verbose) {\n return Weinre.logDebug(this.constructor.name + ("[" + this._url + "]: opened"));\n }\n };\n\n MessageDispatcher.prototype._handleError = function(message) {\n this.error = message;\n this.close();\n if (Verbose) {\n return Weinre.logDebug(this.constructor.name + ("[" + this._url + "]: error: ") + message);\n }\n };\n\n MessageDispatcher.prototype._handleMessage = function(message) {\n var args, data, e, intf, intfName, method, methodName, methodSignature, skipErrorForMethods;\n skipErrorForMethods = [\'domContentEventFired\', \'loadEventFired\', \'childNodeRemoved\'];\n try {\n data = JSON.parse(message.data);\n } catch (_error) {\n e = _error;\n throw new Ex(arguments, "invalid JSON data received: " + e + ": \'" + message.data + "\'");\n }\n intfName = data["interface"];\n methodName = data.method;\n args = data.args;\n methodSignature = "" + intfName + "." + methodName + "()";\n intf = this._interfaces.hasOwnProperty(intfName) && this._interfaces[intfName];\n if (!intf && InspectorBackend && intfName.match(/.*Notify/)) {\n intf = InspectorBackend.getRegisteredDomainDispatcher(intfName.substr(0, intfName.length - 6));\n }\n if (!intf) {\n Weinre.notImplemented("weinre: request for non-registered interface: " + methodSignature);\n return;\n }\n methodSignature = intf.constructor.name + ("." + methodName + "()");\n method = intf[methodName];\n if (typeof method !== "function") {\n Weinre.notImplemented(methodSignature);\n return;\n }\n try {\n method.apply(intf, args);\n } catch (_error) {\n e = _error;\n if (__indexOf.call(skipErrorForMethods, methodName) < 0) {\n Weinre.logError(("weinre: invocation exception on " + methodSignature + ": ") + e);\n }\n }\n if (Verbose) {\n return Weinre.logDebug(this.constructor.name + ("[" + this._url + "]: recv " + intfName + "." + methodName + "(" + (JSON.stringify(args)) + ")"));\n }\n };\n\n MessageDispatcher.prototype._handleClose = function() {\n this._reallyClosed = true;\n if (Verbose) {\n return Weinre.logDebug(this.constructor.name + ("[" + this._url + "]: closed"));\n }\n };\n\n return MessageDispatcher;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/MessageDispatcher.amd.js'),eval(';modjewel.define("weinre/common/MethodNamer", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar MethodNamer,\n __hasProp = {}.hasOwnProperty;\n\nmodule.exports = MethodNamer = (function() {\n function MethodNamer() {}\n\n MethodNamer.setNamesForClass = function(aClass) {\n var key, val, _ref, _results;\n for (key in aClass) {\n if (!__hasProp.call(aClass, key)) continue;\n val = aClass[key];\n if (typeof val === "function") {\n val.signature = "" + aClass.name + "::" + key;\n val.displayName = key;\n val.name = key;\n }\n }\n _ref = aClass.prototype;\n _results = [];\n for (key in _ref) {\n if (!__hasProp.call(_ref, key)) continue;\n val = _ref[key];\n if (typeof val === "function") {\n val.signature = "" + aClass.name + "." + key;\n val.displayName = key;\n _results.push(val.name = key);\n } else {\n _results.push(void 0);\n }\n }\n return _results;\n };\n\n return MethodNamer;\n\n})();\n\nMethodNamer.setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/MethodNamer.amd.js'),eval(';modjewel.define("weinre/common/StackTrace", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar StackTrace, getTrace;\n\nmodule.exports = StackTrace = (function() {\n function StackTrace(args) {\n if (!args || !args.callee) {\n throw Error("first parameter to " + arguments.callee.signature + " must be an Arguments object");\n }\n this.trace = getTrace(args);\n }\n\n StackTrace.dump = function(args) {\n var stackTrace;\n args = args || arguments;\n stackTrace = new StackTrace(args);\n return stackTrace.dump();\n };\n\n StackTrace.prototype.dump = function() {\n var frame, _i, _len, _ref, _results;\n console.log("StackTrace:");\n _ref = this.trace;\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n frame = _ref[_i];\n _results.push(console.log(" " + frame));\n }\n return _results;\n };\n\n return StackTrace;\n\n})();\n\ngetTrace = function(args) {\n var err, func, result, visitedFuncs;\n result = [];\n visitedFuncs = [];\n func = args.callee;\n while (func) {\n if (func.signature) {\n result.push(func.signature);\n } else if (func.displayName) {\n result.push(func.displayName);\n } else if (func.name) {\n result.push(func.name);\n } else {\n result.push("<anonymous>");\n }\n if (-1 !== visitedFuncs.indexOf(func)) {\n result.push("... recursion");\n return result;\n }\n visitedFuncs.push(func);\n try {\n func = func.caller;\n } catch (_error) {\n err = _error;\n func = null;\n }\n }\n return result;\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/StackTrace.amd.js'),eval(';modjewel.define("weinre/common/WebSocketXhr", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar EventListeners, Ex, HookLib, WebSocketXhr, Weinre, _xhrEventHandler;\n\nEx = require(\'./Ex\');\n\nWeinre = require(\'./Weinre\');\n\nHookLib = require(\'./HookLib\');\n\nEventListeners = require(\'./EventListeners\');\n\nmodule.exports = WebSocketXhr = (function() {\n WebSocketXhr.CONNECTING = 0;\n\n WebSocketXhr.OPEN = 1;\n\n WebSocketXhr.CLOSING = 2;\n\n WebSocketXhr.CLOSED = 3;\n\n function WebSocketXhr(url, id) {\n this.initialize(url, id);\n }\n\n WebSocketXhr.prototype.initialize = function(url, id) {\n if (!id) {\n id = "anonymous";\n }\n this.readyState = WebSocketXhr.CONNECTING;\n this._url = url;\n this._id = id;\n this._urlChannel = null;\n this._queuedSends = [];\n this._sendInProgress = true;\n this._listeners = {\n open: new EventListeners(),\n message: new EventListeners(),\n error: new EventListeners(),\n close: new EventListeners()\n };\n return this._getChannel();\n };\n\n WebSocketXhr.prototype._getChannel = function() {\n var body;\n body = JSON.stringify({\n id: this._id\n });\n return this._xhr(this._url, "POST", body, this._handleXhrResponseGetChannel);\n };\n\n WebSocketXhr.prototype._handleXhrResponseGetChannel = function(xhr) {\n var e, object;\n if (xhr.status !== 200) {\n return this._handleXhrResponseError(xhr);\n }\n try {\n object = JSON.parse(xhr.responseText);\n } catch (_error) {\n e = _error;\n this._fireEventListeners("error", {\n message: "non-JSON response from channel open request"\n });\n this.close();\n return;\n }\n if (!object.channel) {\n this._fireEventListeners("error", {\n message: "channel open request did not include a channel"\n });\n this.close();\n return;\n }\n this._urlChannel = this._url + "/" + object.channel;\n this.readyState = WebSocketXhr.OPEN;\n this._fireEventListeners("open", {\n message: "open",\n channel: object.channel\n });\n this._sendInProgress = false;\n this._sendQueued();\n return this._readLoop();\n };\n\n WebSocketXhr.prototype._readLoop = function() {\n if (this.readyState === WebSocketXhr.CLOSED) {\n return;\n }\n if (this.readyState === WebSocketXhr.CLOSING) {\n return;\n }\n return this._xhr(this._urlChannel, "GET", "", this._handleXhrResponseGet);\n };\n\n WebSocketXhr.prototype._handleXhrResponseGet = function(xhr) {\n var data, datum, e, self, _i, _len, _results;\n self = this;\n if (xhr.status !== 200) {\n return this._handleXhrResponseError(xhr);\n }\n try {\n datum = JSON.parse(xhr.responseText);\n } catch (_error) {\n e = _error;\n this.readyState = WebSocketXhr.CLOSED;\n this._fireEventListeners("error", {\n message: "non-JSON response from read request"\n });\n return;\n }\n HookLib.ignoreHooks(function() {\n return setTimeout((function() {\n return self._readLoop();\n }), 0);\n });\n _results = [];\n for (_i = 0, _len = datum.length; _i < _len; _i++) {\n data = datum[_i];\n _results.push(self._fireEventListeners("message", {\n data: data\n }));\n }\n return _results;\n };\n\n WebSocketXhr.prototype.send = function(data) {\n if (typeof data !== "string") {\n throw new Ex(arguments, this.constructor.name + ".send");\n }\n this._queuedSends.push(data);\n if (this._sendInProgress) {\n return;\n }\n return this._sendQueued();\n };\n\n WebSocketXhr.prototype._sendQueued = function() {\n var datum;\n if (this._queuedSends.length === 0) {\n return;\n }\n if (this.readyState === WebSocketXhr.CLOSED) {\n return;\n }\n if (this.readyState === WebSocketXhr.CLOSING) {\n return;\n }\n datum = JSON.stringify(this._queuedSends);\n this._queuedSends = [];\n this._sendInProgress = true;\n return this._xhr(this._urlChannel, "POST", datum, this._handleXhrResponseSend);\n };\n\n WebSocketXhr.prototype._handleXhrResponseSend = function(xhr) {\n var httpSocket;\n httpSocket = this;\n if (xhr.status !== 200) {\n return this._handleXhrResponseError(xhr);\n }\n this._sendInProgress = false;\n return HookLib.ignoreHooks(function() {\n return setTimeout((function() {\n return httpSocket._sendQueued();\n }), 0);\n });\n };\n\n WebSocketXhr.prototype.close = function() {\n this._sendInProgress = true;\n this.readyState = WebSocketXhr.CLOSING;\n this._fireEventListeners("close", {\n message: "closing",\n wasClean: true\n });\n return this.readyState = WebSocketXhr.CLOSED;\n };\n\n WebSocketXhr.prototype.addEventListener = function(type, listener, useCapture) {\n return this._getListeners(type).add(listener, useCapture);\n };\n\n WebSocketXhr.prototype.removeEventListener = function(type, listener, useCapture) {\n return this._getListeners(type).remove(listener, useCapture);\n };\n\n WebSocketXhr.prototype._fireEventListeners = function(type, event) {\n if (this.readyState === WebSocketXhr.CLOSED) {\n return;\n }\n event.target = this;\n return this._getListeners(type).fire(event);\n };\n\n WebSocketXhr.prototype._getListeners = function(type) {\n var listeners;\n listeners = this._listeners[type];\n if (null === listeners) {\n throw new Ex(arguments, "invalid event listener type: \'" + type + "\'");\n }\n return listeners;\n };\n\n WebSocketXhr.prototype._handleXhrResponseError = function(xhr) {\n if (xhr.status === 404) {\n this.close();\n return;\n }\n this._fireEventListeners("error", {\n target: this,\n status: xhr.status,\n message: "error from XHR invocation: " + xhr.statusText\n });\n return Weinre.logError(("error from XHR invocation: " + xhr.status + ": ") + xhr.statusText);\n };\n\n WebSocketXhr.prototype._xhr = function(url, method, data, handler) {\n var xhr;\n if (null === handler) {\n throw new Ex(arguments, "handler must not be null");\n }\n xhr = (XMLHttpRequest.noConflict ? new XMLHttpRequest.noConflict() : new XMLHttpRequest());\n xhr.httpSocket = this;\n xhr.httpSocketHandler = handler;\n xhr.onreadystatechange = function() {\n return _xhrEventHandler(xhr);\n };\n HookLib.ignoreHooks(function() {\n return xhr.open(method, url, true);\n });\n xhr.setRequestHeader("Content-Type", "text/plain");\n return HookLib.ignoreHooks(function() {\n return xhr.send(data);\n });\n };\n\n return WebSocketXhr;\n\n})();\n\n_xhrEventHandler = function(xhr) {\n if (xhr.readyState !== 4) {\n return;\n }\n return xhr.httpSocketHandler.call(xhr.httpSocket, xhr);\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/WebSocketXhr.amd.js'),eval(';modjewel.define("weinre/common/Weinre", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar ConsoleLogger, Ex, IDLTools, StackTrace, Weinre, consoleLogger, getLogger, logger, _notImplemented, _showNotImplemented;\n\nEx = require(\'./Ex\');\n\nIDLTools = require(\'./IDLTools\');\n\nStackTrace = require(\'./StackTrace\');\n\n_notImplemented = {};\n\n_showNotImplemented = false;\n\nlogger = null;\n\nmodule.exports = Weinre = (function() {\n function Weinre() {\n throw new Ex(arguments, "this class is not intended to be instantiated");\n }\n\n Weinre.addIDLs = function(idls) {\n return IDLTools.addIDLs(idls);\n };\n\n Weinre.deprecated = function() {\n return StackTrace.dump(arguments);\n };\n\n Weinre.notImplemented = function(thing) {\n if (_notImplemented[thing]) {\n return;\n }\n _notImplemented[thing] = true;\n if (!_showNotImplemented) {\n return;\n }\n return Weinre.logWarning(thing + " not implemented");\n };\n\n Weinre.showNotImplemented = function() {\n var key, _results;\n _showNotImplemented = true;\n _results = [];\n for (key in _notImplemented) {\n _results.push(Weinre.logWarning(key + " not implemented"));\n }\n return _results;\n };\n\n Weinre.logError = function(message) {\n return getLogger().logError(message);\n };\n\n Weinre.logWarning = function(message) {\n return getLogger().logWarning(message);\n };\n\n Weinre.logInfo = function(message) {\n return getLogger().logInfo(message);\n };\n\n Weinre.logDebug = function(message) {\n return getLogger().logDebug(message);\n };\n\n return Weinre;\n\n})();\n\nConsoleLogger = (function() {\n function ConsoleLogger() {}\n\n ConsoleLogger.prototype.logError = function(message) {\n return console.log("error: " + message);\n };\n\n ConsoleLogger.prototype.logWarning = function(message) {\n return console.log("warning: " + message);\n };\n\n ConsoleLogger.prototype.logInfo = function(message) {\n return console.log("info: " + message);\n };\n\n ConsoleLogger.prototype.logDebug = function(message) {\n return console.log("debug: " + message);\n };\n\n return ConsoleLogger;\n\n})();\n\nconsoleLogger = new ConsoleLogger();\n\ngetLogger = function() {\n if (logger) {\n return logger;\n }\n if (Weinre.client) {\n logger = Weinre.WeinreClientCommands;\n return logger;\n }\n if (Weinre.target) {\n logger = Weinre.WeinreTargetCommands;\n return logger;\n }\n return consoleLogger;\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/common/Weinre.amd.js'),eval(';modjewel.define("weinre/target/BrowserHacks", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar BrowserHacks;\n\nBrowserHacks = function() {\n if (typeof document.addEventListener === "undefined") {\n alert("Oops. It seems the page runs in compatibility mode. Please fix it and try again.");\n return;\n }\n if (typeof window.Element === "undefined") {\n window.Element = function() {};\n }\n if (typeof window.Node === "undefined") {\n window.Node = function() {};\n }\n if (!Object.getPrototypeOf) {\n Object.getPrototypeOf = function(object) {\n if (!object.__proto__) {\n throw new Error("This vm does not support __proto__ and getPrototypeOf. Script requires any of them to operate correctly.");\n }\n return object.__proto__;\n };\n }\n};\n\nBrowserHacks();\n\n});\n\n//@ sourceURL=weinre/target/BrowserHacks.amd.js'),eval(';modjewel.define("weinre/target/CheckForProblems", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar CheckForProblems, checkForOldPrototypeVersion;\n\nmodule.exports = CheckForProblems = (function() {\n function CheckForProblems() {}\n\n CheckForProblems.check = function() {\n return checkForOldPrototypeVersion();\n };\n\n return CheckForProblems;\n\n})();\n\ncheckForOldPrototypeVersion = function() {\n var badVersion;\n badVersion = false;\n if (typeof Prototype === "undefined") {\n return;\n }\n if (!Prototype.Version) {\n return;\n }\n if (Prototype.Version.match(/^1\\.5.*/)) {\n badVersion = true;\n }\n if (Prototype.Version.match(/^1\\.6.*/)) {\n badVersion = true;\n }\n if (badVersion) {\n return alert("Sorry, weinre is not support in versions of Prototype earlier than 1.7");\n }\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/CheckForProblems.amd.js'),eval(";modjewel.define(\"weinre/target/Console\", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Console, MessageLevel, MessageSource, MessageType, OriginalConsole, RemoteConsole, Timeline, UsingRemote, Weinre;\n\nWeinre = require('../common/Weinre');\n\nTimeline = require('../target/Timeline');\n\nUsingRemote = false;\n\nRemoteConsole = null;\n\nOriginalConsole = null;\n\nMessageSource = {\n HTML: 0,\n WML: 1,\n XML: 2,\n JS: 3,\n CSS: 4,\n Other: 5\n};\n\nMessageType = {\n Log: 0,\n Object: 1,\n Trace: 2,\n StartGroup: 3,\n StartGroupCollapsed: 4,\n EndGroup: 5,\n Assert: 6,\n UncaughtException: 7,\n Result: 8\n};\n\nMessageLevel = {\n Tip: 0,\n Log: 1,\n Warning: 2,\n Error: 3,\n Debug: 4\n};\n\nmodule.exports = Console = (function() {\n function Console() {}\n\n Object.defineProperty(Console, 'original', {\n get: function() {\n return OriginalConsole;\n }\n });\n\n Console.useRemote = function(value) {\n var oldValue;\n if (arguments.length === 0) {\n return UsingRemote;\n }\n oldValue = UsingRemote;\n UsingRemote = !!value;\n if (UsingRemote) {\n window.console = RemoteConsole;\n } else {\n window.console = OriginalConsole;\n }\n return oldValue;\n };\n\n Console.prototype._generic = function(level, messageParts) {\n var message, messagePart, parameters, payload, _i, _len;\n message = messageParts[0].toString();\n parameters = [];\n for (_i = 0, _len = messageParts.length; _i < _len; _i++) {\n messagePart = messageParts[_i];\n parameters.push(Weinre.injectedScript.wrapObjectForConsole(messagePart, true));\n }\n payload = {\n source: MessageSource.JS,\n type: MessageType.Log,\n level: level,\n message: message,\n parameters: parameters\n };\n return Weinre.wi.ConsoleNotify.addConsoleMessage(payload);\n };\n\n Console.prototype.log = function() {\n return this._generic(MessageLevel.Log, [].slice.call(arguments));\n };\n\n Console.prototype.debug = function() {\n return this._generic(MessageLevel.Debug, [].slice.call(arguments));\n };\n\n Console.prototype.error = function() {\n return this._generic(MessageLevel.Error, [].slice.call(arguments));\n };\n\n Console.prototype.info = function() {\n return this._generic(MessageLevel.Log, [].slice.call(arguments));\n };\n\n Console.prototype.warn = function() {\n return this._generic(MessageLevel.Warning, [].slice.call(arguments));\n };\n\n Console.prototype.dir = function() {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.dirxml = function() {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.trace = function() {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.assert = function(condition) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.count = function() {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.markTimeline = function(message) {\n return Timeline.addRecord_Mark(message);\n };\n\n Console.prototype.lastWMLErrorMessage = function() {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.profile = function(title) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.profileEnd = function(title) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.time = function(title) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.timeEnd = function(title) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.group = function() {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.groupCollapsed = function() {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n Console.prototype.groupEnd = function() {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n return Console;\n\n})();\n\nRemoteConsole = new Console();\n\nOriginalConsole = window.console || {};\n\nRemoteConsole.__original = OriginalConsole;\n\nOriginalConsole.__original = OriginalConsole;\n\nrequire(\"../common/MethodNamer\").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/Console.amd.js"),eval(';modjewel.define("weinre/target/CSSStore", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar CSSStore, IDGenerator, Weinre, _elementMatchesSelector, _fallbackMatchesSelector, _getMappableId, _getMappableObject, _mozMatchesSelector, _msMatchesSelector, _webkitMatchesSelector;\n\nIDGenerator = require(\'../common/IDGenerator\');\n\nWeinre = require(\'../common/Weinre\');\n\n_elementMatchesSelector = null;\n\nmodule.exports = CSSStore = (function() {\n function CSSStore() {\n this.styleSheetMap = {};\n this.styleRuleMap = {};\n this.styleDeclMap = {};\n this.testElement = document.createElement("div");\n }\n\n CSSStore.prototype.getInlineStyle = function(node) {\n var cssProperty, styleObject, _i, _len, _ref;\n styleObject = this._buildMirrorForStyle(node.style, true);\n _ref = styleObject.cssProperties;\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n cssProperty = _ref[_i];\n cssProperty.status = "style";\n }\n return styleObject;\n };\n\n CSSStore.prototype.getComputedStyle = function(node) {\n var styleObject;\n if (!node) {\n return {};\n }\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return {};\n }\n styleObject = this._buildMirrorForStyle(window.getComputedStyle(node), false);\n return styleObject;\n };\n\n CSSStore.prototype.getMatchedCSSRules = function(node) {\n var cssRule, err, object, result, styleSheet, _i, _j, _len, _len1, _ref, _ref1;\n result = [];\n try {\n _ref = document.styleSheets;\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n styleSheet = _ref[_i];\n if (!styleSheet.cssRules) {\n continue;\n }\n _ref1 = styleSheet.cssRules;\n for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {\n cssRule = _ref1[_j];\n if (!_elementMatchesSelector(node, cssRule.selectorText)) {\n continue;\n }\n object = {};\n object.ruleId = this._getStyleRuleId(cssRule);\n object.selectorText = cssRule.selectorText;\n object.style = this._buildMirrorForStyle(cssRule.style, true);\n result.push(object);\n }\n }\n } catch (_error) {\n err = _error;\n return result;\n }\n return result;\n };\n\n CSSStore.prototype.getStyleAttributes = function(node) {\n var result;\n result = {};\n return result;\n };\n\n CSSStore.prototype.getPseudoElements = function(node) {\n var result;\n result = [];\n return result;\n };\n\n CSSStore.prototype.setPropertyText = function(styleId, propertyIndex, text, overwrite) {\n var compare, i, key, mirror, properties, propertyIndices, propertyMirror, styleDecl;\n styleDecl = Weinre.cssStore._getStyleDecl(styleId);\n if (!styleDecl) {\n Weinre.logWarning("requested style not available: " + styleId);\n return null;\n }\n mirror = styleDecl.__weinre__mirror;\n if (!mirror) {\n Weinre.logWarning("requested mirror not available: " + styleId);\n return null;\n }\n properties = mirror.cssProperties;\n propertyMirror = this._parseProperty(text);\n if (null === propertyMirror) {\n this._removePropertyFromMirror(mirror, propertyIndex);\n properties = mirror.cssProperties;\n } else {\n this._removePropertyFromMirror(mirror, propertyIndex);\n properties = mirror.cssProperties;\n propertyIndices = {};\n i = 0;\n while (i < properties.length) {\n propertyIndices[properties[i].name] = i;\n i++;\n }\n i = 0;\n while (i < propertyMirror.cssProperties.length) {\n if (propertyIndices[propertyMirror.cssProperties[i].name] != null) {\n properties[propertyIndices[propertyMirror.cssProperties[i].name]] = propertyMirror.cssProperties[i];\n } else {\n properties.push(propertyMirror.cssProperties[i]);\n }\n i++;\n }\n for (key in propertyMirror.shorthandValues) {\n mirror.shorthandValues[key] = propertyMirror.shorthandValues[key];\n }\n }\n properties.sort(compare = function(p1, p2) {\n if (p1.name < p2.name) {\n return -1;\n } else if (p1.name > p2.name) {\n return 1;\n } else {\n return 0;\n }\n });\n this._setStyleFromMirror(styleDecl);\n return mirror;\n };\n\n CSSStore.prototype._removePropertyFromMirror = function(mirror, index) {\n var i, newProperties, properties, property;\n properties = mirror.cssProperties;\n if (index >= properties.length) {\n return;\n }\n property = properties[index];\n properties[index] = null;\n if (mirror.shorthandValues[property.name]) {\n delete mirror.shorthandValues[property.name];\n i = 0;\n while (i < properties.length) {\n if (properties[i]) {\n if (properties[i].shorthandName === property.name) {\n properties[i] = null;\n }\n }\n i++;\n }\n }\n newProperties = [];\n i = 0;\n while (i < properties.length) {\n if (properties[i]) {\n newProperties.push(properties[i]);\n }\n i++;\n }\n return mirror.cssProperties = newProperties;\n };\n\n CSSStore.prototype.toggleProperty = function(styleId, propertyIndex, disable) {\n var cssProperty, mirror, styleDecl;\n styleDecl = Weinre.cssStore._getStyleDecl(styleId);\n if (!styleDecl) {\n Weinre.logWarning("requested style not available: " + styleId);\n return null;\n }\n mirror = styleDecl.__weinre__mirror;\n if (!mirror) {\n Weinre.logWarning("requested mirror not available: " + styleId);\n return null;\n }\n cssProperty = mirror.cssProperties[propertyIndex];\n if (!cssProperty) {\n Weinre.logWarning(("requested property not available: " + styleId + ": ") + propertyIndex);\n return null;\n }\n if (disable) {\n cssProperty.status = "disabled";\n } else {\n cssProperty.status = "active";\n }\n this._setStyleFromMirror(styleDecl);\n return mirror;\n };\n\n CSSStore.prototype._setStyleFromMirror = function(styleDecl) {\n var cssProperties, cssText, property, _i, _len;\n cssText = [];\n cssProperties = styleDecl.__weinre__mirror.cssProperties;\n cssText = "";\n for (_i = 0, _len = cssProperties.length; _i < _len; _i++) {\n property = cssProperties[_i];\n if (!property.parsedOk) {\n continue;\n }\n if (property.status === "disabled") {\n continue;\n }\n if (property.shorthandName) {\n continue;\n }\n cssText += property.name + ": " + property.value;\n if (property.priority === "important") {\n cssText += " !important; ";\n } else {\n cssText += "; ";\n }\n }\n return styleDecl.cssText = cssText;\n };\n\n CSSStore.prototype._buildMirrorForStyle = function(styleDecl, bind) {\n var i, name, properties, property, result, shorthandName;\n result = {\n properties: {},\n cssProperties: []\n };\n if (!styleDecl) {\n return result;\n }\n if (bind) {\n result.styleId = this._getStyleDeclId(styleDecl);\n styleDecl.__weinre__mirror = result;\n }\n result.properties.width = styleDecl.getPropertyValue("width") || "";\n result.properties.height = styleDecl.getPropertyValue("height") || "";\n result.cssText = styleDecl.cssText;\n result.shorthandValues = {};\n properties = [];\n if (styleDecl) {\n i = 0;\n while (i < styleDecl.length) {\n property = {};\n name = styleDecl.item(i);\n property.name = name;\n property.priority = styleDecl.getPropertyPriority(name);\n property.implicit = typeof styleDecl.isPropertyImplicit !== "undefined" ? styleDecl.isPropertyImplicit(name) : true;\n property.shorthandName = typeof styleDecl.getPropertyShorthand !== "undefined" ? styleDecl.getPropertyShorthand(name) || "" : "";\n property.status = (property.shorthandName ? "style" : "active");\n property.parsedOk = true;\n property.value = styleDecl.getPropertyValue(name);\n properties.push(property);\n if (property.shorthandName) {\n shorthandName = property.shorthandName;\n if (!result.shorthandValues[shorthandName]) {\n result.shorthandValues[shorthandName] = styleDecl.getPropertyValue(shorthandName);\n property = {};\n property.name = shorthandName;\n property.priority = styleDecl.getPropertyPriority(shorthandName);\n property.implicit = styleDecl.isPropertyImplicit(shorthandName);\n property.shorthandName = "";\n property.status = "active";\n property.parsedOk = true;\n property.value = styleDecl.getPropertyValue(name);\n properties.push(property);\n }\n }\n i++;\n }\n }\n properties.sort(function(p1, p2) {\n if (p1.name < p2.name) {\n return -1;\n } else if (p1.name > p2.name) {\n return 1;\n } else {\n return 0;\n }\n });\n result.cssProperties = properties;\n return result;\n };\n\n CSSStore.prototype._parseProperty = function(string) {\n var match, property, propertyPattern, result, testStyleDecl;\n testStyleDecl = this.testElement.style;\n try {\n testStyleDecl.cssText = string;\n if (testStyleDecl.cssText !== "") {\n return this._buildMirrorForStyle(testStyleDecl, false);\n }\n } catch (_error) {}\n propertyPattern = /\\s*(.+)\\s*:\\s*(.+)\\s*(!important)?\\s*;/;\n match = propertyPattern.exec(string);\n if (!match) {\n return null;\n }\n match[3] = (match[3] === "!important" ? "important" : "");\n property = {};\n property.name = match[1];\n property.priority = match[3];\n property.implicit = true;\n property.shorthandName = "";\n property.status = "inactive";\n property.parsedOk = false;\n property.value = match[2];\n result = {};\n result.width = 0;\n result.height = 0;\n result.shorthandValues = 0;\n result.cssProperties = [property];\n return result;\n };\n\n CSSStore.prototype._getStyleSheet = function(id) {\n return _getMappableObject(id, this.styleSheetMap);\n };\n\n CSSStore.prototype._getStyleSheetId = function(styleSheet) {\n return _getMappableId(styleSheet, this.styleSheetMap);\n };\n\n CSSStore.prototype._getStyleRule = function(id) {\n return _getMappableObject(id, this.styleRuleMap);\n };\n\n CSSStore.prototype._getStyleRuleId = function(styleRule) {\n return _getMappableId(styleRule, this.styleRuleMap);\n };\n\n CSSStore.prototype._getStyleDecl = function(id) {\n return _getMappableObject(id, this.styleDeclMap);\n };\n\n CSSStore.prototype._getStyleDeclId = function(styleDecl) {\n return _getMappableId(styleDecl, this.styleDeclMap);\n };\n\n return CSSStore;\n\n})();\n\n_getMappableObject = function(id, map) {\n return map[id];\n};\n\n_getMappableId = function(object, map) {\n return IDGenerator.getId(object, map);\n};\n\n_mozMatchesSelector = function(element, selector) {\n if (!element.mozMatchesSelector) {\n return false;\n }\n return element.mozMatchesSelector(selector);\n};\n\n_webkitMatchesSelector = function(element, selector) {\n if (!element.webkitMatchesSelector) {\n return false;\n }\n return element.webkitMatchesSelector(selector);\n};\n\n_msMatchesSelector = function(element, selector) {\n if (!element.msMatchesSelector) {\n return false;\n }\n return element.msMatchesSelector(selector);\n};\n\n_fallbackMatchesSelector = function(element, selector) {\n return false;\n};\n\nif (Element.prototype.webkitMatchesSelector) {\n _elementMatchesSelector = _webkitMatchesSelector;\n} else if (Element.prototype.mozMatchesSelector) {\n _elementMatchesSelector = _mozMatchesSelector;\n} else if (Element.prototype.msMatchesSelector) {\n _elementMatchesSelector = _msMatchesSelector;\n} else {\n _elementMatchesSelector = _fallbackMatchesSelector;\n}\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/CSSStore.amd.js'),eval(';modjewel.define("weinre/target/ElementHighlighter", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar ElementHighlighter, canvasAvailable, currentHighlighterElement, fromPx, getMetricsForElement, highlighterClass, supportsCanvas;\n\ncanvasAvailable = null;\n\nhighlighterClass = null;\n\ncurrentHighlighterElement = null;\n\nmodule.exports = ElementHighlighter = (function() {\n ElementHighlighter.create = function() {\n if (highlighterClass == null) {\n highlighterClass = require(\'./ElementHighlighterDivs2\');\n }\n return new highlighterClass();\n };\n\n function ElementHighlighter() {\n this.hElement = this.createHighlighterElement();\n this.hElement.__weinreHighlighter = true;\n this.hElement.style.display = "none";\n this.hElement.style.zIndex = 10 * 1000 * 1000;\n if (currentHighlighterElement) {\n document.body.removeChild(currentHighlighterElement);\n }\n currentHighlighterElement = this.hElement;\n document.body.appendChild(this.hElement);\n }\n\n ElementHighlighter.prototype.on = function(element) {\n if (null === element) {\n return;\n }\n if (element.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n this.redraw(getMetricsForElement(element));\n return this.hElement.style.display = "block";\n };\n\n ElementHighlighter.prototype.off = function() {\n return this.hElement.style.display = "none";\n };\n\n return ElementHighlighter;\n\n})();\n\ngetMetricsForElement = function(element) {\n var cStyle, el, left, metrics, top;\n metrics = {};\n left = 0;\n top = 0;\n el = element;\n while (true) {\n left += el.offsetLeft;\n top += el.offsetTop;\n if (!(el = el.offsetParent)) {\n break;\n }\n }\n metrics.x = left;\n metrics.y = top;\n cStyle = document.defaultView.getComputedStyle(element);\n metrics.width = element.offsetWidth;\n metrics.height = element.offsetHeight;\n metrics.marginLeft = fromPx(cStyle["margin-left"] || cStyle["marginLeft"]);\n metrics.marginRight = fromPx(cStyle["margin-right"] || cStyle["marginRight"]);\n metrics.marginTop = fromPx(cStyle["margin-top"] || cStyle["marginTop"]);\n metrics.marginBottom = fromPx(cStyle["margin-bottom"] || cStyle["marginBottom"]);\n metrics.borderLeft = fromPx(cStyle["border-left-width"] || cStyle["borderLeftWidth"]);\n metrics.borderRight = fromPx(cStyle["border-right-width"] || cStyle["borderRightWidth"]);\n metrics.borderTop = fromPx(cStyle["border-top-width"] || cStyle["borderTopWidth"]);\n metrics.borderBottom = fromPx(cStyle["border-bottom-width"] || cStyle["borderBottomWidth"]);\n metrics.paddingLeft = fromPx(cStyle["padding-left"] || cStyle["paddingLeft"]);\n metrics.paddingRight = fromPx(cStyle["padding-right"] || cStyle["paddingRight"]);\n metrics.paddingTop = fromPx(cStyle["padding-top"] || cStyle["paddingTop"]);\n metrics.paddingBottom = fromPx(cStyle["padding-bottom"] || cStyle["paddingBottom"]);\n metrics.x -= metrics.marginLeft;\n metrics.y -= metrics.marginTop;\n return metrics;\n};\n\nfromPx = function(string) {\n return parseInt(string.replace(/px$/, ""));\n};\n\nsupportsCanvas = function() {\n var element;\n element = document.createElement(\'canvas\');\n if (!element.getContext) {\n return false;\n }\n if (element.getContext(\'2d\')) {\n return true;\n }\n return false;\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/ElementHighlighter.amd.js'),eval(";modjewel.define(\"weinre/target/ElementHighlighterDivs2\", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar ColorBorder, ColorContent, ColorMargin, ColorPadding, ElementHighlighter, ElementHighlighterDivs2, px,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\nElementHighlighter = require('./ElementHighlighter');\n\nColorMargin = 'rgba(246, 178, 107, 0.66)';\n\nColorBorder = 'rgba(255, 229, 153, 0.66)';\n\nColorPadding = 'rgba(147, 196, 125, 0.55)';\n\nColorContent = 'rgba(111, 168, 220, 0.66)';\n\nColorBorder = 'rgba(255, 255, 153, 0.40)';\n\nColorPadding = 'rgba( 0, 255, 0, 0.20)';\n\nColorContent = 'rgba( 0, 0, 255, 0.30)';\n\nmodule.exports = ElementHighlighterDivs2 = (function(_super) {\n __extends(ElementHighlighterDivs2, _super);\n\n function ElementHighlighterDivs2() {\n return ElementHighlighterDivs2.__super__.constructor.apply(this, arguments);\n }\n\n ElementHighlighterDivs2.prototype.createHighlighterElement = function() {\n this.hElement1 = document.createElement(\"weinreHighlighter\");\n this.hElement1.style.position = 'absolute';\n this.hElement1.style.overflow = 'hidden';\n this.hElement2 = document.createElement(\"weinreHighlighter\");\n this.hElement2.style.position = 'absolute';\n this.hElement2.style.display = 'block';\n this.hElement2.style.overflow = 'hidden';\n this.hElement1.appendChild(this.hElement2);\n this.hElement1.style.borderTopStyle = 'solid';\n this.hElement1.style.borderLeftStyle = 'solid';\n this.hElement1.style.borderBottomStyle = 'solid';\n this.hElement1.style.borderRightStyle = 'solid';\n this.hElement1.style.borderTopColor = ColorMargin;\n this.hElement1.style.borderLeftColor = ColorMargin;\n this.hElement1.style.borderBottomColor = ColorMargin;\n this.hElement1.style.borderRightColor = ColorMargin;\n this.hElement1.style.backgroundColor = ColorBorder;\n this.hElement2.style.borderTopStyle = 'solid';\n this.hElement2.style.borderLeftStyle = 'solid';\n this.hElement2.style.borderBottomStyle = 'solid';\n this.hElement2.style.borderRightStyle = 'solid';\n this.hElement2.style.borderTopColor = ColorPadding;\n this.hElement2.style.borderLeftColor = ColorPadding;\n this.hElement2.style.borderBottomColor = ColorPadding;\n this.hElement2.style.borderRightColor = ColorPadding;\n this.hElement2.style.backgroundColor = ColorContent;\n this.hElement1.style.outline = 'black solid thin';\n return this.hElement1;\n };\n\n ElementHighlighterDivs2.prototype.redraw = function(metrics) {\n this.hElement1.style.top = px(metrics.y);\n this.hElement1.style.left = px(metrics.x);\n this.hElement1.style.height = px(metrics.height);\n this.hElement1.style.width = px(metrics.width);\n this.hElement1.style.borderTopWidth = px(metrics.marginTop);\n this.hElement1.style.borderLeftWidth = px(metrics.marginLeft);\n this.hElement1.style.borderBottomWidth = px(metrics.marginBottom);\n this.hElement1.style.borderRightWidth = px(metrics.marginRight);\n this.hElement2.style.top = px(metrics.borderTop);\n this.hElement2.style.left = px(metrics.borderLeft);\n this.hElement2.style.bottom = px(metrics.borderBottom);\n this.hElement2.style.right = px(metrics.borderRight);\n this.hElement2.style.borderTopWidth = px(metrics.paddingTop);\n this.hElement2.style.borderLeftWidth = px(metrics.paddingLeft);\n this.hElement2.style.borderBottomWidth = px(metrics.paddingBottom);\n return this.hElement2.style.borderRightWidth = px(metrics.paddingRight);\n };\n\n return ElementHighlighterDivs2;\n\n})(ElementHighlighter);\n\npx = function(value) {\n return \"\" + value + \"px\";\n};\n\nrequire(\"../common/MethodNamer\").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/ElementHighlighterDivs2.amd.js"),eval(';modjewel.define("weinre/target/HookSites", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar HookLib, HookSites;\n\nHookLib = require(\'../common/HookLib\');\n\nmodule.exports = HookSites = (function() {\n function HookSites() {}\n\n return HookSites;\n\n})();\n\nHookSites.window_clearInterval = HookLib.addHookSite(window, "clearInterval");\n\nHookSites.window_clearTimeout = HookLib.addHookSite(window, "clearTimeout");\n\nHookSites.window_setInterval = HookLib.addHookSite(window, "setInterval");\n\nHookSites.window_setTimeout = HookLib.addHookSite(window, "setTimeout");\n\nHookSites.window_addEventListener = HookLib.addHookSite(window, "addEventListener");\n\nHookSites.Node_addEventListener = HookLib.addHookSite(Node.prototype, "addEventListener");\n\nHookSites.XMLHttpRequest_open = HookLib.addHookSite(XMLHttpRequest.prototype, "open");\n\nHookSites.XMLHttpRequest_send = HookLib.addHookSite(XMLHttpRequest.prototype, "send");\n\nHookSites.XMLHttpRequest_addEventListener = HookLib.addHookSite(XMLHttpRequest.prototype, "addEventListener");\n\nif (window.openDatabase) {\n HookSites.window_openDatabase = HookLib.addHookSite(window, "openDatabase");\n}\n\nif (window.localStorage) {\n HookSites.LocalStorage_setItem = HookLib.addHookSite(window.localStorage, "setItem");\n HookSites.LocalStorage_removeItem = HookLib.addHookSite(window.localStorage, "removeItem");\n HookSites.LocalStorage_clear = HookLib.addHookSite(window.localStorage, "clear");\n}\n\nif (window.sessionStorage) {\n HookSites.SessionStorage_setItem = HookLib.addHookSite(window.sessionStorage, "setItem");\n HookSites.SessionStorage_removeItem = HookLib.addHookSite(window.sessionStorage, "removeItem");\n HookSites.SessionStorage_clear = HookLib.addHookSite(window.sessionStorage, "clear");\n}\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/HookSites.amd.js'),eval('var injectedScriptConstructor = \n/*\n * Copyright (C) 2007 Apple Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of\n * its contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n(function (InjectedScriptHost, inspectedWindow, injectedScriptId) {\n\nfunction bind(thisObject, memberFunction)\n{\n var func = memberFunction;\n var args = Array.prototype.slice.call(arguments, 2);\n function bound()\n {\n return func.apply(thisObject, args.concat(Array.prototype.slice.call(arguments, 0)));\n }\n bound.toString = function() {\n return "bound: " + func;\n };\n return bound;\n}\n\nvar InjectedScript = function()\n{\n this._lastBoundObjectId = 1;\n this._idToWrappedObject = {};\n this._objectGroups = {};\n}\n\nInjectedScript.prototype = {\n wrapObjectForConsole: function(object, canAccessInspectedWindow)\n {\n if (canAccessInspectedWindow)\n return this._wrapObject(object, "console");\n var result = {};\n result.type = typeof object;\n result.description = this._toString(object);\n return result;\n },\n\n _wrapObject: function(object, objectGroupName, abbreviate)\n {\n try {\n var objectId;\n if (typeof object === "object" || typeof object === "function" || this._isHTMLAllCollection(object)) {\n var id = this._lastBoundObjectId++;\n this._idToWrappedObject[id] = object;\n \n var group = this._objectGroups[objectGroupName];\n if (!group) {\n group = [];\n this._objectGroups[objectGroupName] = group;\n }\n group.push(id);\n objectId = { injectedScriptId: injectedScriptId,\n id: id,\n groupName: objectGroupName };\n }\n return InjectedScript.RemoteObject.fromObject(object, objectId, abbreviate);\n } catch (e) {\n return InjectedScript.RemoteObject.fromObject("[ Exception: " + e.toString() + " ]");\n }\n },\n\n _parseObjectId: function(objectId)\n {\n return eval("(" + objectId + ")");\n },\n\n releaseWrapperObjectGroup: function(objectGroupName)\n {\n var group = this._objectGroups[objectGroupName];\n if (!group)\n return;\n for (var i = 0; i < group.length; i++)\n delete this._idToWrappedObject[group[i]];\n delete this._objectGroups[objectGroupName];\n },\n\n dispatch: function(methodName, args)\n {\n var argsArray = eval("(" + args + ")");\n var result = this[methodName].apply(this, argsArray);\n if (typeof result === "undefined") {\n inspectedWindow.console.error("Web Inspector error: InjectedScript.%s returns undefined", methodName);\n result = null;\n }\n return result;\n },\n\n getProperties: function(objectId, ignoreHasOwnProperty, abbreviate)\n {\n var parsedObjectId = this._parseObjectId(objectId);\n var object = this._objectForId(parsedObjectId);\n\n if (!this._isDefined(object))\n return false;\n var properties = [];\n var propertyNames;\n\n // IE returns \'Invalid calling object\' for some of the prototypes, so return the object itself\n if (window.navigator.userAgent.indexOf("MSIE") != -1 ) {\n propertyNames = this._getPropertyNames(object);\n } else\n propertyNames = ignoreHasOwnProperty ? this._getPropertyNames(object) : Object.getOwnPropertyNames(object);\n\n\n if (!ignoreHasOwnProperty && object.__proto__)\n propertyNames.push("__proto__");\n \n // Go over properties, prepare results.\n for (var i = 0; i < propertyNames.length; ++i) {\n var propertyName = propertyNames[i];\n \n var property = {};\n property.name = propertyName + "";\n var isGetter = object["__lookupGetter__"] && object.__lookupGetter__(propertyName);\n if (!isGetter) {\n try {\n property.value = this._wrapObject(object[propertyName], parsedObjectId.groupName, abbreviate);\n } catch(e) {\n property.value = new InjectedScript.RemoteObject.fromException(e);\n }\n } else {\n // FIXME: this should show something like "getter" (bug 16734).\n property.value = new InjectedScript.RemoteObject.fromObject("\\u2014"); // em dash\n property.isGetter = true;\n }\n properties.push(property);\n }\n return properties;\n },\n\n setPropertyValue: function(objectId, propertyName, expression)\n {\n var parsedObjectId = this._parseObjectId(objectId);\n var object = this._objectForId(parsedObjectId);\n if (!this._isDefined(object))\n return false;\n \n var expressionLength = expression.length;\n if (!expressionLength) {\n delete object[propertyName];\n return !(propertyName in object);\n }\n \n try {\n // Surround the expression in parenthesis so the result of the eval is the result\n // of the whole expression not the last potential sub-expression.\n \n // There is a regression introduced here: eval is now happening against global object,\n // not call frame while on a breakpoint.\n // TODO: bring evaluation against call frame back.\n var result = inspectedWindow.eval("(" + expression + ")");\n // Store the result in the property.\n object[propertyName] = result;\n return true;\n } catch(e) {\n try {\n var result = inspectedWindow.eval("\\"" + expression.replace(/"/g, "\\\\\\"") + "\\"");\n object[propertyName] = result;\n return true;\n } catch(e) {\n return false;\n }\n }\n },\n\n _populatePropertyNames: function(object, resultSet)\n {\n for (var o = object; o; o = Object.getPrototypeOf(o)) {\n try {\n var names = Object.getOwnPropertyNames(o);\n for (var i = 0; i < names.length; ++i)\n resultSet[names[i]] = true;\n } catch (e) {\n }\n }\n },\n\n _getPropertyNames: function(object, resultSet)\n {\n var propertyNameSet = {};\n this._populatePropertyNames(object, propertyNameSet);\n return Object.keys(propertyNameSet);\n },\n\n getCompletions: function(expression, includeCommandLineAPI)\n {\n var props = {};\n try {\n if (!expression)\n expression = "this";\n var expressionResult = this._evaluateOn(inspectedWindow.eval, inspectedWindow, expression, false, false);\n\n if (typeof expressionResult === "object")\n this._populatePropertyNames(expressionResult, props);\n\n if (includeCommandLineAPI) {\n for (var prop in CommandLineAPI.members_)\n props[CommandLineAPI.members_[prop]] = true;\n }\n } catch(e) {\n }\n return props;\n },\n\n getCompletionsOnCallFrame: function(callFrameId, expression, includeCommandLineAPI)\n {\n var props = {};\n try {\n var callFrame = this._callFrameForId(callFrameId);\n if (!callFrame)\n return props;\n\n if (expression) {\n var expressionResult = this._evaluateOn(callFrame.evaluate, callFrame, expression, true, false);\n if (typeof expressionResult === "object")\n this._populatePropertyNames(expressionResult, props);\n } else {\n // Evaluate into properties in scope of the selected call frame.\n var scopeChain = callFrame.scopeChain;\n for (var i = 0; i < scopeChain.length; ++i)\n this._populatePropertyNames(scopeChain[i], props);\n }\n \n if (includeCommandLineAPI) {\n for (var prop in CommandLineAPI.members_)\n props[CommandLineAPI.members_[prop]] = true;\n }\n } catch(e) {\n }\n return props;\n },\n\n evaluate: function(expression, objectGroup, injectCommandLineAPI)\n {\n return this._evaluateAndWrap(inspectedWindow.eval, inspectedWindow, expression, objectGroup, false, injectCommandLineAPI);\n },\n\n _evaluateAndWrap: function(evalFunction, object, expression, objectGroup, isEvalOnCallFrame, injectCommandLineAPI)\n {\n try {\n return this._wrapObject(this._evaluateOn(evalFunction, object, expression, isEvalOnCallFrame, injectCommandLineAPI), objectGroup);\n } catch (e) {\n return InjectedScript.RemoteObject.fromException(e);\n }\n },\n\n _evaluateOn: function(evalFunction, object, expression, isEvalOnCallFrame, injectCommandLineAPI)\n {\n // Only install command line api object for the time of evaluation.\n // Surround the expression in with statements to inject our command line API so that\n // the window object properties still take more precedent than our API functions.\n\n try {\n if (injectCommandLineAPI && inspectedWindow.console) {\n inspectedWindow.console._commandLineAPI = new CommandLineAPI(this._commandLineAPIImpl, isEvalOnCallFrame ? object : null);\n expression = "with ((window && window.console && window.console._commandLineAPI) || {}) {\\n" + expression + "\\n}";\n }\n\n var value = evalFunction.call(object, expression);\n\n // When evaluating on call frame error is not thrown, but returned as a value.\n if (this._type(value) === "error")\n throw value.toString();\n\n return value;\n } finally {\n if (injectCommandLineAPI && inspectedWindow.console)\n delete inspectedWindow.console._commandLineAPI;\n }\n },\n\n getNodeId: function(node)\n {\n return InjectedScriptHost.pushNodePathToFrontend(node, false, false);\n },\n\n callFrames: function()\n {\n var callFrame = InjectedScriptHost.currentCallFrame();\n if (!callFrame)\n return false;\n \n injectedScript.releaseWrapperObjectGroup("backtrace");\n var result = [];\n var depth = 0;\n do {\n result.push(new InjectedScript.CallFrameProxy(depth++, callFrame));\n callFrame = callFrame.caller;\n } while (callFrame);\n return result;\n },\n\n evaluateOnCallFrame: function(callFrameId, expression, objectGroup, injectCommandLineAPI)\n {\n var callFrame = this._callFrameForId(callFrameId);\n if (!callFrame)\n return false;\n return this._evaluateAndWrap(callFrame.evaluate, callFrame, expression, objectGroup, true, injectCommandLineAPI);\n },\n\n _callFrameForId: function(callFrameId)\n {\n var parsedCallFrameId = eval("(" + callFrameId + ")");\n var ordinal = parsedCallFrameId.ordinal;\n var callFrame = InjectedScriptHost.currentCallFrame();\n while (--ordinal >= 0 && callFrame)\n callFrame = callFrame.caller;\n return callFrame;\n },\n\n _nodeForId: function(nodeId)\n {\n if (!nodeId)\n return null;\n return InjectedScriptHost.nodeForId(nodeId);\n },\n\n _objectForId: function(objectId)\n {\n return this._idToWrappedObject[objectId.id];\n },\n\n resolveNode: function(nodeId)\n {\n var node = this._nodeForId(nodeId);\n if (!node)\n return false;\n // FIXME: receive the object group from client.\n return this._wrapObject(node, "prototype");\n },\n\n getNodeProperties: function(nodeId, properties)\n {\n var node = this._nodeForId(nodeId);\n if (!node)\n return false;\n properties = eval("(" + properties + ")");\n var result = {};\n for (var i = 0; i < properties.length; ++i)\n result[properties[i]] = node[properties[i]];\n return result;\n },\n\n getNodePrototypes: function(nodeId)\n {\n this.releaseWrapperObjectGroup("prototypes");\n var node = this._nodeForId(nodeId);\n if (!node)\n return false;\n\n var result = [];\n var prototype = node;\n\n// if (window.navigator.userAgent.indexOf("MSIE") != -1 )\n// {\n// result.push(this._wrapObject(prototype, "prototypes"));\n// return result;\n// }\n\n do {\n result.push(this._wrapObject(prototype, "prototypes"));\n prototype = Object.getPrototypeOf(prototype);\n } while (prototype)\n return result;\n },\n\n pushNodeToFrontend: function(objectId)\n {\n var parsedObjectId = this._parseObjectId(objectId);\n var object = this._objectForId(parsedObjectId);\n if (!object || this._type(object) !== "node")\n return false;\n return InjectedScriptHost.pushNodePathToFrontend(object, false, false);\n },\n\n evaluateOnSelf: function(funcBody, args)\n {\n var func = eval("(" + funcBody + ")");\n return func.apply(this, eval("(" + args + ")") || []);\n },\n\n _isDefined: function(object)\n {\n return object || this._isHTMLAllCollection(object);\n },\n\n _isHTMLAllCollection: function(object)\n {\n // document.all is reported as undefined, but we still want to process it.\n return (typeof object === "undefined") && inspectedWindow.HTMLAllCollection && object instanceof inspectedWindow.HTMLAllCollection;\n },\n\n _type: function(obj)\n {\n if (obj === null)\n return "null";\n\n var type = typeof obj;\n if (type !== "object" && type !== "function") {\n // FIXME(33716): typeof document.all is always \'undefined\'.\n if (this._isHTMLAllCollection(obj))\n return "array";\n return type;\n }\n\n // If owning frame has navigated to somewhere else window properties will be undefined.\n // In this case just return result of the typeof.\n if (!inspectedWindow.document)\n return type;\n\n if (obj instanceof inspectedWindow.Node) {\n\n try {\n return (obj.nodeType === undefined ? type : "node");\n } catch (ex) {} // for IE there could be \'Invalid calling object\' exception\n\n return obj.toString();\n }\n\n if (obj instanceof inspectedWindow.String)\n return "string";\n if (obj instanceof inspectedWindow.Array)\n return "array";\n if (obj instanceof inspectedWindow.Boolean)\n return "boolean";\n if (obj instanceof inspectedWindow.Number)\n return "number";\n if (obj instanceof inspectedWindow.Date)\n return "date";\n if (obj instanceof inspectedWindow.RegExp)\n return "regexp";\n // FireBug\'s array detection.\n if (isFinite(obj.length) && typeof obj.splice === "function")\n return "array";\n if (isFinite(obj.length) && typeof obj.callee === "function") // arguments.\n return "array";\n if (obj instanceof inspectedWindow.NodeList)\n return "array";\n if (obj instanceof inspectedWindow.HTMLCollection)\n return "array";\n if (obj instanceof inspectedWindow.Error)\n return "error";\n return type;\n },\n\n _describe: function(obj, abbreviated)\n {\n var type = this._type(obj);\n\n switch (type) {\n case "object":\n case "node":\n var result = InjectedScriptHost.internalConstructorName(obj);\n if (result === "Object") {\n // In Chromium DOM wrapper prototypes will have Object as their constructor name,\n // get the real DOM wrapper name from the constructor property.\n var constructorName = obj.constructor && obj.constructor.name;\n if (constructorName)\n return constructorName;\n }\n return result;\n case "array":\n var className = InjectedScriptHost.internalConstructorName(obj);\n if (typeof obj.length === "number")\n className += "[" + obj.length + "]";\n return className;\n case "string":\n if (!abbreviated)\n return obj;\n if (obj.length > 100)\n return "\\"" + obj.substring(0, 100) + "\\u2026\\"";\n return "\\"" + obj + "\\"";\n case "function":\n var objectText = this._toString(obj);\n if (abbreviated)\n objectText = /.*/.exec(objectText)[0].replace(/ +$/g, "");\n return objectText;\n default:\n return this._toString(obj);\n }\n },\n\n _toString: function(obj)\n {\n // We don\'t use String(obj) because inspectedWindow.String is undefined if owning frame navigated to another page.\n return "" + obj;\n }\n}\n\nvar injectedScript = new InjectedScript();\n\nInjectedScript.RemoteObject = function(objectId, type, description, hasChildren)\n{\n this.objectId = objectId;\n this.type = type;\n this.description = description;\n this.hasChildren = hasChildren;\n}\n\nInjectedScript.RemoteObject.fromException = function(e)\n{\n return new InjectedScript.RemoteObject(null, "error", e.toString());\n}\n\nInjectedScript.RemoteObject.fromObject = function(object, objectId, abbreviate)\n{\n var type = injectedScript._type(object);\n var rawType = typeof object;\n var hasChildren = (rawType === "object" && object !== null && (Object.getOwnPropertyNames(object).length || !!Object.getPrototypeOf(object))) || rawType === "function";\n var description = "";\n try {\n var description = injectedScript._describe(object, abbreviate);\n return new InjectedScript.RemoteObject(objectId, type, description, hasChildren);\n } catch (e) {\n return InjectedScript.RemoteObject.fromException(e);\n }\n}\n\nInjectedScript.CallFrameProxy = function(ordinal, callFrame)\n{\n this.id = { ordinal: ordinal, injectedScriptId: injectedScriptId };\n this.type = callFrame.type;\n this.functionName = (this.type === "function" ? callFrame.functionName : "");\n this.sourceID = callFrame.sourceID;\n this.line = callFrame.line;\n this.column = callFrame.column;\n this.scopeChain = this._wrapScopeChain(callFrame);\n}\n\nInjectedScript.CallFrameProxy.prototype = {\n _wrapScopeChain: function(callFrame)\n {\n var GLOBAL_SCOPE = 0;\n var LOCAL_SCOPE = 1;\n var WITH_SCOPE = 2;\n var CLOSURE_SCOPE = 3;\n var CATCH_SCOPE = 4;\n \n var scopeChain = callFrame.scopeChain;\n var scopeChainProxy = [];\n var foundLocalScope = false;\n for (var i = 0; i < scopeChain.length; i++) {\n var scopeType = callFrame.scopeType(i);\n var scopeObject = scopeChain[i];\n var scopeObjectProxy = injectedScript._wrapObject(scopeObject, "backtrace", true);\n\n switch(scopeType) {\n case LOCAL_SCOPE: {\n foundLocalScope = true;\n scopeObjectProxy.isLocal = true;\n scopeObjectProxy.thisObject = injectedScript._wrapObject(callFrame.thisObject, "backtrace", true);\n break;\n }\n case CLOSURE_SCOPE: {\n scopeObjectProxy.isClosure = true;\n break;\n }\n case WITH_SCOPE:\n case CATCH_SCOPE: {\n if (foundLocalScope && scopeObject instanceof inspectedWindow.Element)\n scopeObjectProxy.isElement = true;\n else if (foundLocalScope && scopeObject instanceof inspectedWindow.Document)\n scopeObjectProxy.isDocument = true;\n else\n scopeObjectProxy.isWithBlock = true;\n break;\n }\n }\n scopeChainProxy.push(scopeObjectProxy);\n }\n return scopeChainProxy;\n }\n}\n\nfunction CommandLineAPI(commandLineAPIImpl, callFrame)\n{\n function inScopeVariables(member)\n {\n if (!callFrame)\n return false;\n\n var scopeChain = callFrame.scopeChain;\n for (var i = 0; i < scopeChain.length; ++i) {\n if (member in scopeChain[i])\n return true;\n }\n return false;\n }\n\n for (var i = 0; i < CommandLineAPI.members_.length; ++i) {\n var member = CommandLineAPI.members_[i];\n if (member in inspectedWindow || inScopeVariables(member))\n continue;\n\n this[member] = bind(commandLineAPIImpl, commandLineAPIImpl[member]);\n }\n\n for (var i = 0; i < 5; ++i) {\n var member = "$" + i;\n if (member in inspectedWindow || inScopeVariables(member))\n continue;\n\n // fix for non-webkit browsers\n //this.__defineGetter__("$" + i, bind(commandLineAPIImpl, commandLineAPIImpl._inspectedNode, i));\n Object.defineProperty(this, "$" + i, {\n get: bind(commandLineAPIImpl, commandLineAPIImpl._inspectedNode, i)\n });\n }\n}\n\nCommandLineAPI.members_ = [\n "$", "$$", "$x", "dir", "dirxml", "keys", "values", "profile", "profileEnd",\n "monitorEvents", "unmonitorEvents", "inspect", "copy", "clear"\n];\n\nfunction CommandLineAPIImpl()\n{\n}\n\nCommandLineAPIImpl.prototype = {\n $: function()\n {\n return document.getElementById.apply(document, arguments)\n },\n\n $$: function()\n {\n return document.querySelectorAll.apply(document, arguments)\n },\n\n $x: function(xpath, context)\n {\n var nodes = [];\n try {\n var doc = (context && context.ownerDocument) || inspectedWindow.document;\n var results = doc.evaluate(xpath, context || doc, null, XPathResult.ANY_TYPE, null);\n var node;\n while (node = results.iterateNext())\n nodes.push(node);\n } catch (e) {\n }\n return nodes;\n },\n\n dir: function()\n {\n return console.dir.apply(console, arguments)\n },\n\n dirxml: function()\n {\n return console.dirxml.apply(console, arguments)\n },\n\n keys: function(object)\n {\n return Object.keys(object);\n },\n\n values: function(object)\n {\n var result = [];\n for (var key in object)\n result.push(object[key]);\n return result;\n },\n\n profile: function()\n {\n return console.profile.apply(console, arguments)\n },\n\n profileEnd: function()\n {\n return console.profileEnd.apply(console, arguments)\n },\n\n monitorEvents: function(object, types)\n {\n if (!object || !object.addEventListener || !object.removeEventListener)\n return;\n types = this._normalizeEventTypes(types);\n for (var i = 0; i < types.length; ++i) {\n object.removeEventListener(types[i], this._logEvent, false);\n object.addEventListener(types[i], this._logEvent, false);\n }\n },\n\n unmonitorEvents: function(object, types)\n {\n if (!object || !object.addEventListener || !object.removeEventListener)\n return;\n types = this._normalizeEventTypes(types);\n for (var i = 0; i < types.length; ++i)\n object.removeEventListener(types[i], this._logEvent, false);\n },\n\n inspect: function(object)\n {\n if (arguments.length === 0)\n return;\n\n inspectedWindow.console.log(object);\n if (injectedScript._type(object) === "node")\n InjectedScriptHost.pushNodePathToFrontend(object, false, true);\n else {\n switch (injectedScript._describe(object)) {\n case "Database":\n InjectedScriptHost.selectDatabase(object);\n break;\n case "Storage":\n InjectedScriptHost.selectDOMStorage(object);\n break;\n }\n }\n },\n\n copy: function(object)\n {\n if (injectedScript._type(object) === "node")\n object = object.outerHTML;\n InjectedScriptHost.copyText(object);\n },\n\n clear: function()\n {\n InjectedScriptHost.clearConsoleMessages();\n },\n\n _inspectedNode: function(num)\n {\n var nodeId = InjectedScriptHost.inspectedNode(num);\n return injectedScript._nodeForId(nodeId);\n },\n\n _normalizeEventTypes: function(types)\n {\n if (typeof types === "undefined")\n types = [ "mouse", "key", "load", "unload", "abort", "error", "select", "change", "submit", "reset", "focus", "blur", "resize", "scroll" ];\n else if (typeof types === "string")\n types = [ types ];\n\n var result = [];\n for (var i = 0; i < types.length; i++) {\n if (types[i] === "mouse")\n result.splice(0, 0, "mousedown", "mouseup", "click", "dblclick", "mousemove", "mouseover", "mouseout");\n else if (types[i] === "key")\n result.splice(0, 0, "keydown", "keyup", "keypress");\n else\n result.push(types[i]);\n }\n return result;\n },\n\n _logEvent: function(event)\n {\n console.log(event.type, event);\n }\n}\n\ninjectedScript._commandLineAPIImpl = new CommandLineAPIImpl();\nreturn injectedScript;\n})\n//@ sourceURL=weinre/target/InjectedScript.js'),eval(';modjewel.define("weinre/target/InjectedScriptHostImpl", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar InjectedScriptHostImpl, Weinre;\n\nWeinre = require(\'../common/Weinre\');\n\nmodule.exports = InjectedScriptHostImpl = (function() {\n function InjectedScriptHostImpl() {}\n\n InjectedScriptHostImpl.prototype.clearConsoleMessages = function(callback) {\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n InjectedScriptHostImpl.prototype.nodeForId = function(nodeId, callback) {\n return Weinre.nodeStore.getNode(nodeId);\n };\n\n InjectedScriptHostImpl.prototype.pushNodePathToFrontend = function(node, withChildren, selectInUI, callback) {\n var children, nodeId;\n nodeId = Weinre.nodeStore.getNodeId(node);\n children = Weinre.nodeStore.serializeNode(node, 1);\n Weinre.wi.DOMNotify.setChildNodes(nodeId, children);\n if (callback) {\n Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n if (selectInUI) {\n return Weinre.wi.InspectorNotify.updateFocusedNode(nodeId);\n }\n };\n\n InjectedScriptHostImpl.prototype.inspectedNode = function(num, callback) {\n var nodeId;\n nodeId = Weinre.nodeStore.getInspectedNode(num);\n return nodeId;\n };\n\n InjectedScriptHostImpl.prototype.internalConstructorName = function(object) {\n var ctor, ctorName, match, pattern;\n ctor = object.constructor;\n ctorName = ctor.fullClassName || ctor.displayName || ctor.name;\n if (ctorName && (ctorName !== "Object")) {\n return ctorName;\n }\n pattern = /\\[object (.*)\\]/;\n match = pattern.exec(object.toString());\n if (match) {\n return match[1];\n }\n return "Object";\n };\n\n return InjectedScriptHostImpl;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/InjectedScriptHostImpl.amd.js'),eval(';modjewel.define("weinre/target/NetworkRequest", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Ex, HookLib, HookSites, IDGenerator, Loader, NetworkRequest, StackTrace, Weinre, getFormData, getHeaders, getRequest, getResponse, getXhrEventHandler, splitContentType, trim;\n\nStackTrace = require(\'../common/StackTrace\');\n\nIDGenerator = require(\'../common/IDGenerator\');\n\nHookLib = require(\'../common/HookLib\');\n\nWeinre = require(\'../common/Weinre\');\n\nEx = require(\'../common/Ex\');\n\nHookSites = require(\'./HookSites\');\n\nLoader = {\n url: window.location.href,\n frameId: 0,\n loaderId: 0\n};\n\nmodule.exports = NetworkRequest = (function() {\n function NetworkRequest(xhr, id, method, url, stackTrace) {\n this.xhr = xhr;\n this.id = id;\n this.method = method;\n this.url = url;\n this.stackTrace = stackTrace;\n }\n\n NetworkRequest.prototype.handleSend = function(data) {\n var redirectResponse, request, time;\n Weinre.wi.NetworkNotify.identifierForInitialRequest(this.id, this.url, Loader, this.stackTrace);\n time = Date.now() / 1000.0;\n request = getRequest(this.url, this.method, this.xhr, data);\n redirectResponse = {\n isNull: true\n };\n return Weinre.wi.NetworkNotify.willSendRequest(this.id, time, request, redirectResponse);\n };\n\n NetworkRequest.prototype.handleHeadersReceived = function() {\n var response, time;\n time = Date.now() / 1000.0;\n response = getResponse(this.xhr);\n return Weinre.wi.NetworkNotify.didReceiveResponse(this.id, time, "XHR", response);\n };\n\n NetworkRequest.prototype.handleLoading = function() {};\n\n NetworkRequest.prototype.handleDone = function() {\n var description, e, sourceString, status, statusText, success, time;\n sourceString = "";\n try {\n sourceString = this.xhr.responseText;\n } catch (_error) {\n e = _error;\n }\n Weinre.wi.NetworkNotify.setInitialContent(this.id, sourceString, "XHR");\n time = Date.now() / 1000.0;\n status = this.xhr.status;\n if (status === 0) {\n status = 200;\n }\n statusText = this.xhr.statusText;\n success = status >= 200 && status < 300;\n if (success) {\n return Weinre.wi.NetworkNotify.didFinishLoading(this.id, time);\n } else {\n description = "" + status + " - " + statusText;\n return Weinre.wi.NetworkNotify.didFailLoading(this.id, time, description);\n }\n };\n\n NetworkRequest.installNativeHooks = function() {\n HookSites.XMLHttpRequest_open.addHooks({\n before: function(receiver, args) {\n var frame, id, method, rawStackTrace, stackTrace, url, xhr, _i, _len;\n xhr = receiver;\n method = args[0];\n url = args[1];\n id = IDGenerator.next();\n rawStackTrace = new StackTrace(args).trace.slice(1);\n stackTrace = [];\n for (_i = 0, _len = rawStackTrace.length; _i < _len; _i++) {\n frame = rawStackTrace[_i];\n stackTrace.push({\n functionName: frame\n });\n }\n xhr.__weinreNetworkRequest__ = new NetworkRequest(xhr, id, method, url, stackTrace);\n return HookLib.ignoreHooks(function() {\n return xhr.addEventListener("readystatechange", getXhrEventHandler(xhr), false);\n });\n }\n });\n return HookSites.XMLHttpRequest_send.addHooks({\n before: function(receiver, args) {\n var data, nr, xhr;\n xhr = receiver;\n data = args[0];\n nr = xhr.__weinreNetworkRequest__;\n if (!nr) {\n return;\n }\n return nr.handleSend(data);\n }\n });\n };\n\n return NetworkRequest;\n\n})();\n\ngetRequest = function(url, method, xhr, data) {\n return {\n url: url,\n httpMethod: method,\n httpHeaderFields: {},\n requestFormData: getFormData(url, data)\n };\n};\n\ngetResponse = function(xhr) {\n var contentLength, contentType, encoding, headers, result, _ref;\n contentType = xhr.getResponseHeader("Content-Type");\n contentType || (contentType = \'application/octet-stream\');\n _ref = splitContentType(contentType), contentType = _ref[0], encoding = _ref[1];\n headers = getHeaders(xhr);\n result = {\n mimeType: contentType,\n textEncodingName: encoding,\n httpStatusCode: xhr.status,\n httpStatusText: xhr.statusText,\n httpHeaderFields: headers,\n connectionReused: false,\n connectionID: 0,\n wasCached: false\n };\n contentLength = xhr.getResponseHeader("Content-Length");\n contentLength = parseInt(contentLength);\n if (!isNaN(contentLength)) {\n result.expectedContentLength = contentLength;\n }\n return result;\n};\n\ngetHeaders = function(xhr) {\n var key, line, lines, result, string, val, _i, _len, _ref;\n string = xhr.getAllResponseHeaders();\n lines = string.split(\'\\r\\n\');\n result = {};\n for (_i = 0, _len = lines.length; _i < _len; _i++) {\n line = lines[_i];\n line = trim(line);\n if (line === "") {\n break;\n }\n _ref = line.split(\':\', 2), key = _ref[0], val = _ref[1];\n result[trim(key)] = trim(val);\n }\n return result;\n};\n\ntrim = function(string) {\n return string.replace(/^\\s+|\\s+$/g, \'\');\n};\n\ngetFormData = function(url, data) {\n var match, pattern;\n if (data) {\n return data;\n }\n pattern = /.*?\\?(.*?)(#.*)?$/;\n match = url.match(pattern);\n if (match) {\n return match[1];\n }\n return "";\n};\n\nsplitContentType = function(contentType) {\n var match, pattern;\n pattern = /\\s*(.*?)\\s*(;\\s*(.*))?\\s*$/;\n match = contentType.match(pattern);\n if (!match) {\n return [contentType, ""];\n }\n return [match[1], match[3]];\n};\n\ngetXhrEventHandler = function(xhr) {\n return function() {\n var e, nr;\n nr = xhr.__weinreNetworkRequest__;\n if (!nr) {\n return;\n }\n try {\n switch (xhr.readyState) {\n case 2:\n return nr.handleHeadersReceived();\n case 3:\n return nr.handleLoading();\n case 4:\n return nr.handleDone();\n }\n } catch (_error) {\n e = _error;\n }\n };\n};\n\n});\n\n//@ sourceURL=weinre/target/NetworkRequest.amd.js'),eval(';modjewel.define("weinre/target/NodeStore", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Debug, IDGenerator, NodeStore, Weinre, handleDOMAttrModified, handleDOMCharacterDataModified, handleDOMNodeInserted, handleDOMNodeRemoved, handleDOMSubtreeModified;\n\nWeinre = require(\'../common/Weinre\');\n\nIDGenerator = require(\'../common/IDGenerator\');\n\nDebug = require(\'../common/Debug\');\n\nmodule.exports = NodeStore = (function() {\n function NodeStore() {\n this._nodeMap = {};\n this._childrenSent = {};\n this._inspectedNodes = [];\n document.addEventListener("DOMSubtreeModified", handleDOMSubtreeModified, false);\n document.addEventListener("DOMNodeInserted", handleDOMNodeInserted, false);\n document.addEventListener("DOMNodeRemoved", handleDOMNodeRemoved, false);\n document.addEventListener("DOMAttrModified", handleDOMAttrModified, false);\n document.addEventListener("DOMCharacterDataModified", handleDOMCharacterDataModified, false);\n }\n\n NodeStore.prototype.addInspectedNode = function(nodeId) {\n this._inspectedNodes.unshift(nodeId);\n if (this._inspectedNodes.length > 5) {\n return this._inspectedNodes = this._inspectedNodes.slice(0, 5);\n }\n };\n\n NodeStore.prototype.getInspectedNode = function(index) {\n return this._inspectedNodes[index];\n };\n\n NodeStore.prototype.getNode = function(nodeId) {\n return this._nodeMap[nodeId];\n };\n\n NodeStore.prototype.checkNodeId = function(node) {\n return IDGenerator.checkId(node);\n };\n\n NodeStore.prototype.getNodeId = function(node) {\n var id;\n id = this.checkNodeId(node);\n if (id) {\n return id;\n }\n return IDGenerator.getId(node, this._nodeMap);\n };\n\n NodeStore.prototype.getNodeData = function(nodeId, depth) {\n return this.serializeNode(this.getNode(nodeId), depth);\n };\n\n NodeStore.prototype.getPreviousSiblingId = function(node) {\n var id, sib;\n while (true) {\n sib = node.previousSibling;\n if (!sib) {\n return 0;\n }\n id = this.checkNodeId(sib);\n if (id) {\n return id;\n }\n node = sib;\n }\n };\n\n NodeStore.prototype.nextNodeId = function() {\n return "" + IDGenerator.next();\n };\n\n NodeStore.prototype.serializeNode = function(node, depth) {\n var children, i, id, localName, nodeData, nodeName, nodeValue;\n nodeName = "";\n nodeValue = null;\n localName = null;\n id = this.getNodeId(node);\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n case Node.COMMENT_NODE:\n case Node.CDATA_SECTION_NODE:\n nodeValue = node.nodeValue;\n break;\n case Node.ATTRIBUTE_NODE:\n localName = node.localName;\n break;\n case Node.DOCUMENT_FRAGMENT_NODE:\n break;\n default:\n nodeName = node.nodeName;\n localName = node.localName;\n }\n nodeData = {\n id: id,\n nodeType: node.nodeType,\n nodeName: nodeName,\n localName: localName,\n nodeValue: nodeValue\n };\n if (node.nodeType === Node.ELEMENT_NODE || node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n nodeData.childNodeCount = this.childNodeCount(node);\n children = this.serializeNodeChildren(node, depth);\n if (children.length) {\n nodeData.children = children;\n }\n if (node.nodeType === Node.ELEMENT_NODE) {\n nodeData.attributes = [];\n i = 0;\n while (i < node.attributes.length) {\n nodeData.attributes.push(node.attributes[i].nodeName);\n nodeData.attributes.push(node.attributes[i].nodeValue);\n i++;\n }\n } else {\n if (node.nodeType === Node.DOCUMENT_NODE) {\n nodeData.documentURL = window.location.href;\n }\n }\n } else if (node.nodeType === Node.DOCUMENT_TYPE_NODE) {\n nodeData.publicId = node.publicId;\n nodeData.systemId = node.systemId;\n nodeData.internalSubset = node.internalSubset;\n } else if (node.nodeType === Node.ATTRIBUTE_NODE) {\n nodeData.name = node.nodeName;\n nodeData.value = node.nodeValue;\n }\n return nodeData;\n };\n\n NodeStore.prototype.serializeNodeChildren = function(node, depth) {\n var childIds, childNode, i, result;\n result = [];\n childIds = this.childNodeIds(node);\n if (depth === 0) {\n if (childIds.length === 1) {\n childNode = this.getNode(childIds[0]);\n if (childNode.nodeType === Node.TEXT_NODE) {\n result.push(this.serializeNode(childNode));\n }\n }\n return result;\n }\n depth--;\n i = 0;\n while (i < childIds.length) {\n result.push(this.serializeNode(this.getNode(childIds[i]), depth));\n i++;\n }\n return result;\n };\n\n NodeStore.prototype.childNodeCount = function(node) {\n return this.childNodeIds(node).length;\n };\n\n NodeStore.prototype.childNodeIds = function(node) {\n var childNode, i, ids, _i, _len, _ref;\n ids = [];\n i = 0;\n _ref = node.childNodes;\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n childNode = _ref[_i];\n if (this.isToBeSkipped(childNode)) {\n continue;\n }\n ids.push(this.getNodeId(childNode));\n }\n return ids;\n };\n\n NodeStore.prototype.isToBeSkipped = function(node) {\n if (!node) {\n return true;\n }\n if (node.__weinreHighlighter) {\n return true;\n }\n if (node.nodeType !== Node.TEXT_NODE) {\n return false;\n }\n return !!node.nodeValue.match(/^\\s*$/);\n };\n\n return NodeStore;\n\n})();\n\nhandleDOMSubtreeModified = function(event) {\n if (!event.attrChange) {\n return;\n }\n return NodeStore.handleDOMAttrModified(event);\n};\n\nhandleDOMNodeInserted = function(event) {\n var child, parentId, previous, targetId;\n targetId = Weinre.nodeStore.checkNodeId(event.target);\n parentId = Weinre.nodeStore.checkNodeId(event.relatedNode);\n if (!parentId) {\n return;\n }\n child = Weinre.nodeStore.serializeNode(event.target, 0);\n previous = Weinre.nodeStore.getPreviousSiblingId(event.target);\n return Weinre.wi.DOMNotify.childNodeInserted(parentId, previous, child);\n};\n\nhandleDOMNodeRemoved = function(event) {\n var childCount, parentId, targetId;\n targetId = Weinre.nodeStore.checkNodeId(event.target);\n parentId = Weinre.nodeStore.checkNodeId(event.relatedNode);\n if (!parentId) {\n return;\n }\n if (targetId) {\n if (parentId) {\n return Weinre.wi.DOMNotify.childNodeRemoved(parentId, targetId);\n }\n } else {\n childCount = Weinre.nodeStore.childNodeCount(event.relatedNode);\n return Weinre.wi.DOMNotify.childNodeCountUpdated(parentId, childCount);\n }\n};\n\nhandleDOMAttrModified = function(event) {\n var attrs, i, targetId;\n targetId = Weinre.nodeStore.checkNodeId(event.target);\n if (!targetId) {\n return;\n }\n attrs = [];\n i = 0;\n while (i < event.target.attributes.length) {\n attrs.push(event.target.attributes[i].name);\n attrs.push(event.target.attributes[i].value);\n i++;\n }\n return Weinre.wi.DOMNotify.attributesUpdated(targetId, attrs);\n};\n\nhandleDOMCharacterDataModified = function(event) {\n var targetId;\n targetId = Weinre.nodeStore.checkNodeId(event.target);\n if (!targetId) {\n return;\n }\n return Weinre.wi.DOMNotify.characterDataModified(targetId, event.newValue);\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/NodeStore.amd.js'),eval(';modjewel.define("weinre/target/SqlStepper", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Binding, SqlStepper, executeSql, ourErrorCallback, runStep;\n\nBinding = require(\'../common/Binding\');\n\nmodule.exports = SqlStepper = (function() {\n function SqlStepper(steps) {\n var context;\n if (!(this instanceof SqlStepper)) {\n return new SqlStepper(steps);\n }\n this.__context = {};\n context = this.__context;\n context.steps = steps;\n }\n\n SqlStepper.prototype.run = function(db, errorCallback) {\n var context;\n context = this.__context;\n if (context.hasBeenRun) {\n throw new Ex(arguments, "stepper has already been run");\n }\n context.hasBeenRun = true;\n context.db = db;\n context.errorCallback = errorCallback;\n context.nextStep = 0;\n context.ourErrorCallback = new Binding(this, ourErrorCallback);\n context.runStep = new Binding(this, runStep);\n this.executeSql = new Binding(this, executeSql);\n return db.transaction(context.runStep);\n };\n\n SqlStepper.example = function(db, id) {\n var errorCb, step1, step2, stepper;\n step1 = function() {\n return this.executeSql("SELECT name FROM sqlite_master WHERE type=\'table\'");\n };\n step2 = function(resultSet) {\n var i, name, result, rows;\n rows = resultSet.rows;\n result = [];\n i = 0;\n while (i < rows.length) {\n name = rows.item(i).name;\n if (name === "__WebKitDatabaseInfoTable__") {\n i++;\n continue;\n }\n result.push(name);\n i++;\n }\n return console.log(("[" + this.id + "] table names: ") + result.join(", "));\n };\n errorCb = function(sqlError) {\n return console.log(("[" + this.id + "] sql error:" + sqlError.code + ": ") + sqlError.message);\n };\n stepper = new SqlStepper([step1, step2]);\n stepper.id = id;\n return stepper.run(db, errorCb);\n };\n\n return SqlStepper;\n\n})();\n\nexecuteSql = function(statement, data) {\n var context;\n context = this.__context;\n return context.tx.executeSql(statement, data, context.runStep, context.ourErrorCallback);\n};\n\nourErrorCallback = function(tx, sqlError) {\n var context;\n context = this.__context;\n return context.errorCallback.call(this, sqlError);\n};\n\nrunStep = function(tx, resultSet) {\n var context, step;\n context = this.__context;\n if (context.nextStep >= context.steps.length) {\n return;\n }\n context.tx = tx;\n context.currentStep = context.nextStep;\n context.nextStep++;\n step = context.steps[context.currentStep];\n return step.call(this, resultSet);\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/SqlStepper.amd.js'),eval(';modjewel.define("weinre/target/Target", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Binding, CSSStore, Callback, CheckForProblems, ElementHighlighter, Ex, HookLib, InjectedScriptHostImpl, MessageDispatcher, NetworkRequest, NodeStore, Target, Weinre, WeinreExtraClientCommandsImpl, WeinreTargetEventsImpl, WiCSSImpl, WiConsoleImpl, WiDOMImpl, WiDOMStorageImpl, WiDatabaseImpl, WiInspectorImpl, WiRuntimeImpl, currentTime;\n\nrequire(\'./BrowserHacks\');\n\nEx = require(\'../common/Ex\');\n\nBinding = require(\'../common/Binding\');\n\nCallback = require(\'../common/Callback\');\n\nMessageDispatcher = require(\'../common/MessageDispatcher\');\n\nWeinre = require(\'../common/Weinre\');\n\nHookLib = require(\'../common/HookLib\');\n\nCheckForProblems = require(\'./CheckForProblems\');\n\nNodeStore = require(\'./NodeStore\');\n\nCSSStore = require(\'./CSSStore\');\n\nElementHighlighter = require(\'./ElementHighlighter\');\n\nInjectedScriptHostImpl = require(\'./InjectedScriptHostImpl\');\n\nNetworkRequest = require(\'./NetworkRequest\');\n\nWeinreTargetEventsImpl = require(\'./WeinreTargetEventsImpl\');\n\nWeinreExtraClientCommandsImpl = require(\'./WeinreExtraClientCommandsImpl\');\n\nWiConsoleImpl = require(\'./WiConsoleImpl\');\n\nWiCSSImpl = require(\'./WiCSSImpl\');\n\nWiDatabaseImpl = require(\'./WiDatabaseImpl\');\n\nWiDOMImpl = require(\'./WiDOMImpl\');\n\nWiDOMStorageImpl = require(\'./WiDOMStorageImpl\');\n\nWiInspectorImpl = require(\'./WiInspectorImpl\');\n\nWiRuntimeImpl = require(\'./WiRuntimeImpl\');\n\nmodule.exports = Target = (function() {\n function Target() {}\n\n Target.main = function() {\n CheckForProblems.check();\n Weinre.target = new Target();\n return Weinre.target.initialize();\n };\n\n Target.prototype.setWeinreServerURLFromScriptSrc = function(element) {\n var match, message, pattern;\n if (window.WeinreServerURL) {\n return;\n }\n if (element) {\n pattern = /((https?:)?\\/\\/(.*?)\\/)/;\n match = pattern.exec(element.src);\n if (match) {\n window.WeinreServerURL = match[1];\n return;\n }\n }\n message = "unable to calculate the weinre server url; explicity set the variable window.WeinreServerURL instead";\n alert(message);\n throw new Ex(arguments, message);\n };\n\n Target.prototype.setWeinreServerIdFromScriptSrc = function(element) {\n var attempt, hash;\n if (window.WeinreServerId) {\n return;\n }\n element = this.getTargetScriptElement();\n hash = "anonymous";\n if (element) {\n attempt = element.src.split("#")[1];\n if (attempt) {\n hash = attempt;\n } else {\n attempt = location.hash.split("#")[1];\n if (attempt) {\n hash = attempt;\n }\n }\n }\n return window.WeinreServerId = hash;\n };\n\n Target.prototype.getTargetScriptElement = function() {\n var element, elements, i, j, scripts;\n elements = document.getElementsByTagName("script");\n scripts = ["target-script.js", "target-script-min.js"];\n i = 0;\n while (i < elements.length) {\n element = elements[i];\n j = 0;\n while (j < scripts.length) {\n if (-1 !== element.src.indexOf("/" + scripts[j])) {\n return element;\n }\n j++;\n }\n i++;\n }\n };\n\n Target.prototype.initialize = function() {\n var element, injectedScriptHost, messageDispatcher;\n element = this.getTargetScriptElement();\n this.setWeinreServerURLFromScriptSrc(element);\n this.setWeinreServerIdFromScriptSrc(element);\n if (window.WeinreServerURL[window.WeinreServerURL.length - 1] !== "/") {\n window.WeinreServerURL += "/";\n }\n injectedScriptHost = new InjectedScriptHostImpl();\n Weinre.injectedScript = injectedScriptConstructor(injectedScriptHost, window, 0, "?");\n window.addEventListener("load", Binding(this, "onLoaded"), false);\n document.addEventListener("DOMContentLoaded", Binding(this, "onDOMContent"), false);\n this._startTime = currentTime();\n if (document.readyState === "loaded") {\n HookLib.ignoreHooks((function(_this) {\n return function() {\n return setTimeout((function() {\n return _this.onDOMContent();\n }), 10);\n };\n })(this));\n }\n if (document.readyState === "complete") {\n HookLib.ignoreHooks((function(_this) {\n return function() {\n setTimeout((function() {\n return _this.onDOMContent();\n }), 10);\n return setTimeout((function() {\n return _this.onLoaded();\n }), 20);\n };\n })(this));\n }\n messageDispatcher = new MessageDispatcher(window.WeinreServerURL + "ws/target", window.WeinreServerId);\n Weinre.messageDispatcher = messageDispatcher;\n Weinre.wi = {};\n Weinre.wi.Console = new WiConsoleImpl();\n Weinre.wi.CSS = new WiCSSImpl();\n Weinre.wi.Database = new WiDatabaseImpl();\n Weinre.wi.DOM = new WiDOMImpl();\n Weinre.wi.DOMStorage = new WiDOMStorageImpl();\n Weinre.wi.Inspector = new WiInspectorImpl();\n Weinre.wi.Runtime = new WiRuntimeImpl();\n messageDispatcher.registerInterface("Console", Weinre.wi.Console, false);\n messageDispatcher.registerInterface("CSS", Weinre.wi.CSS, false);\n messageDispatcher.registerInterface("Database", Weinre.wi.Database, false);\n messageDispatcher.registerInterface("DOM", Weinre.wi.DOM, false);\n messageDispatcher.registerInterface("DOMStorage", Weinre.wi.DOMStorage, false);\n messageDispatcher.registerInterface("Inspector", Weinre.wi.Inspector, false);\n messageDispatcher.registerInterface("Runtime", Weinre.wi.Runtime, false);\n messageDispatcher.registerInterface("WeinreExtraClientCommands", new WeinreExtraClientCommandsImpl(), true);\n messageDispatcher.registerInterface("WeinreTargetEvents", new WeinreTargetEventsImpl(), true);\n Weinre.wi.ApplicationCacheNotify = messageDispatcher.createProxy("ApplicationCacheNotify");\n Weinre.wi.ConsoleNotify = messageDispatcher.createProxy("ConsoleNotify");\n Weinre.wi.DOMNotify = messageDispatcher.createProxy("DOMNotify");\n Weinre.wi.DOMStorageNotify = messageDispatcher.createProxy("DOMStorageNotify");\n Weinre.wi.DatabaseNotify = messageDispatcher.createProxy("DatabaseNotify");\n Weinre.wi.InspectorNotify = messageDispatcher.createProxy("InspectorNotify");\n Weinre.wi.TimelineNotify = messageDispatcher.createProxy("TimelineNotify");\n Weinre.wi.NetworkNotify = messageDispatcher.createProxy("NetworkNotify");\n Weinre.WeinreTargetCommands = messageDispatcher.createProxy("WeinreTargetCommands");\n Weinre.WeinreExtraTargetEvents = messageDispatcher.createProxy("WeinreExtraTargetEvents");\n messageDispatcher.getWebSocket().addEventListener("open", Binding(this, this.cb_webSocketOpened));\n Weinre.nodeStore = new NodeStore();\n Weinre.cssStore = new CSSStore();\n return NetworkRequest.installNativeHooks();\n };\n\n Target.prototype.cb_webSocketOpened = function() {\n return Weinre.WeinreTargetCommands.registerTarget(window.location.href, Binding(this, this.cb_registerTarget));\n };\n\n Target.prototype.cb_registerTarget = function(targetDescription) {\n return Weinre.targetDescription = targetDescription;\n };\n\n Target.prototype.onLoaded = function() {\n if (!Weinre.wi.InspectorNotify) {\n HookLib.ignoreHooks((function(_this) {\n return function() {\n return setTimeout((function() {\n return _this.onLoaded();\n }), 10);\n };\n })(this));\n return;\n }\n return Weinre.wi.InspectorNotify.loadEventFired(currentTime() - this._startTime);\n };\n\n Target.prototype.onDOMContent = function() {\n if (!Weinre.wi.InspectorNotify) {\n HookLib.ignoreHooks((function(_this) {\n return function() {\n return setTimeout((function() {\n return _this.onDOMContent();\n }), 10);\n };\n })(this));\n return;\n }\n return Weinre.wi.InspectorNotify.domContentEventFired(currentTime() - this._startTime);\n };\n\n Target.prototype.setDocument = function() {\n var nodeData, nodeId;\n if (!Weinre.elementHighlighter) {\n Weinre.elementHighlighter = ElementHighlighter.create();\n }\n nodeId = Weinre.nodeStore.getNodeId(document);\n nodeData = Weinre.nodeStore.getNodeData(nodeId, 2);\n return Weinre.wi.DOMNotify.setDocument(nodeData);\n };\n\n Target.prototype.whenBodyReady = function(receiver, args, func) {\n if (document.body) {\n func.apply(receiver, args);\n return;\n }\n return document.addEventListener("DOMContentLoaded", function() {\n return func.apply(receiver, args);\n }, false);\n };\n\n return Target;\n\n})();\n\ncurrentTime = function() {\n return (new Date().getMilliseconds()) / 1000.0;\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/Target.amd.js'),eval(';modjewel.define("weinre/target/Timeline", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Ex, HookLib, HookSites, IDGenerator, Running, StackTrace, Timeline, TimelineRecordType, TimerIntervals, TimerTimeouts, Weinre, addStackTrace, addTimer, getXhrEventHandler, instrumentedTimerCode, removeTimer;\n\nEx = require(\'../common/Ex\');\n\nWeinre = require(\'../common/Weinre\');\n\nIDGenerator = require(\'../common/IDGenerator\');\n\nStackTrace = require(\'../common/StackTrace\');\n\nHookLib = require(\'../common/HookLib\');\n\nHookSites = require(\'./HookSites\');\n\nRunning = false;\n\nTimerTimeouts = {};\n\nTimerIntervals = {};\n\nTimelineRecordType = {\n EventDispatch: 0,\n Layout: 1,\n RecalculateStyles: 2,\n Paint: 3,\n ParseHTML: 4,\n TimerInstall: 5,\n TimerRemove: 6,\n TimerFire: 7,\n XHRReadyStateChange: 8,\n XHRLoad: 9,\n EvaluateScript: 10,\n Mark: 11,\n ResourceSendRequest: 12,\n ResourceReceiveResponse: 13,\n ResourceFinish: 14,\n FunctionCall: 15,\n ReceiveResourceData: 16,\n GCEvent: 17,\n MarkDOMContent: 18,\n MarkLoad: 19,\n ScheduleResourceRequest: 20\n};\n\nmodule.exports = Timeline = (function() {\n function Timeline() {}\n\n Timeline.start = function() {\n return Running = true;\n };\n\n Timeline.stop = function() {\n return Running = false;\n };\n\n Timeline.isRunning = function() {\n return Running;\n };\n\n Timeline.addRecord_Mark = function(message) {\n var record;\n if (!Timeline.isRunning()) {\n return;\n }\n record = {};\n record.type = TimelineRecordType.Mark;\n record.category = {\n name: "scripting"\n };\n record.startTime = Date.now();\n record.data = {\n message: message\n };\n addStackTrace(record, 3);\n return Weinre.wi.TimelineNotify.addRecordToTimeline(record);\n };\n\n Timeline.addRecord_EventDispatch = function(event, name, category) {\n var record;\n if (!Timeline.isRunning()) {\n return;\n }\n if (!category) {\n category = "scripting";\n }\n record = {};\n record.type = TimelineRecordType.EventDispatch;\n record.category = {\n name: category\n };\n record.startTime = Date.now();\n record.data = {\n type: event.type\n };\n return Weinre.wi.TimelineNotify.addRecordToTimeline(record);\n };\n\n Timeline.addRecord_TimerInstall = function(id, timeout, singleShot) {\n var record;\n if (!Timeline.isRunning()) {\n return;\n }\n record = {};\n record.type = TimelineRecordType.TimerInstall;\n record.category = {\n name: "scripting"\n };\n record.startTime = Date.now();\n record.data = {\n timerId: id,\n timeout: timeout,\n singleShot: singleShot\n };\n addStackTrace(record, 4);\n return Weinre.wi.TimelineNotify.addRecordToTimeline(record);\n };\n\n Timeline.addRecord_TimerRemove = function(id, timeout, singleShot) {\n var record;\n if (!Timeline.isRunning()) {\n return;\n }\n record = {};\n record.type = TimelineRecordType.TimerRemove;\n record.category = {\n name: "scripting"\n };\n record.startTime = Date.now();\n record.data = {\n timerId: id,\n timeout: timeout,\n singleShot: singleShot\n };\n addStackTrace(record, 4);\n return Weinre.wi.TimelineNotify.addRecordToTimeline(record);\n };\n\n Timeline.addRecord_TimerFire = function(id, timeout, singleShot) {\n var record;\n if (!Timeline.isRunning()) {\n return;\n }\n record = {};\n record.type = TimelineRecordType.TimerFire;\n record.category = {\n name: "scripting"\n };\n record.startTime = Date.now();\n record.data = {\n timerId: id,\n timeout: timeout,\n singleShot: singleShot\n };\n return Weinre.wi.TimelineNotify.addRecordToTimeline(record);\n };\n\n Timeline.addRecord_XHRReadyStateChange = function(method, url, id, xhr) {\n var contentLength, contentType, e, record;\n if (!Timeline.isRunning()) {\n return;\n }\n try {\n contentLength = xhr.getResponseHeader("Content-Length");\n contentLength = parseInt(contentLength);\n contentType = xhr.getResponseHeader("Content-Type");\n } catch (_error) {\n e = _error;\n contentLength = 0;\n contentType = "unknown";\n }\n record = {};\n record.startTime = Date.now();\n record.category = {\n name: "loading"\n };\n if (xhr.readyState === XMLHttpRequest.OPENED) {\n record.type = TimelineRecordType.ResourceSendRequest;\n record.data = {\n identifier: id,\n url: url,\n requestMethod: method\n };\n } else if (xhr.readyState === XMLHttpRequest.DONE) {\n record.type = TimelineRecordType.ResourceReceiveResponse;\n record.data = {\n identifier: id,\n statusCode: xhr.status,\n mimeType: contentType,\n url: url\n };\n if (!isNaN(contentLength)) {\n record.data.expectedContentLength = contentLength;\n }\n } else {\n return;\n }\n return Weinre.wi.TimelineNotify.addRecordToTimeline(record);\n };\n\n Timeline.installGlobalListeners = function() {\n if (window.applicationCache) {\n applicationCache.addEventListener("checking", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "applicationCache.checking", "loading");\n }), false);\n applicationCache.addEventListener("error", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "applicationCache.error", "loading");\n }), false);\n applicationCache.addEventListener("noupdate", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "applicationCache.noupdate", "loading");\n }), false);\n applicationCache.addEventListener("downloading", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "applicationCache.downloading", "loading");\n }), false);\n applicationCache.addEventListener("progress", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "applicationCache.progress", "loading");\n }), false);\n applicationCache.addEventListener("updateready", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "applicationCache.updateready", "loading");\n }), false);\n applicationCache.addEventListener("cached", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "applicationCache.cached", "loading");\n }), false);\n applicationCache.addEventListener("obsolete", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "applicationCache.obsolete", "loading");\n }), false);\n }\n window.addEventListener("error", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "window.error");\n }), false);\n window.addEventListener("hashchange", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "window.hashchange");\n }), false);\n window.addEventListener("message", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "window.message");\n }), false);\n window.addEventListener("offline", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "window.offline");\n }), false);\n window.addEventListener("online", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "window.online");\n }), false);\n return window.addEventListener("scroll", (function(e) {\n return Timeline.addRecord_EventDispatch(e, "window.scroll");\n }), false);\n };\n\n Timeline.installNativeHooks = function() {\n HookSites.window_setInterval.addHooks({\n before: function(receiver, args) {\n var code, interval;\n code = args[0];\n if (typeof code !== "function") {\n return;\n }\n interval = args[1];\n code = instrumentedTimerCode(code, interval, false);\n args[0] = code;\n this.userData = {};\n this.userData.code = code;\n return this.userData.interval = interval;\n },\n after: function(receiver, args, result) {\n var code, id;\n if (!this.userData) {\n return;\n }\n code = this.userData.code;\n if (typeof code !== "function") {\n return;\n }\n id = result;\n code.__timerId = id;\n return addTimer(id, this.userData.interval, false);\n }\n });\n HookSites.window_clearInterval.addHooks({\n before: function(receiver, args) {\n var id;\n id = args[0];\n return removeTimer(id, false);\n }\n });\n HookSites.window_setTimeout.addHooks({\n before: function(receiver, args) {\n var code, interval;\n code = args[0];\n if (typeof code !== "function") {\n return;\n }\n interval = args[1];\n code = instrumentedTimerCode(code, interval, true);\n args[0] = code;\n this.userData = {};\n this.userData.code = code;\n return this.userData.interval = interval;\n },\n after: function(receiver, args, result) {\n var code, id;\n if (!this.userData) {\n return;\n }\n code = this.userData.code;\n if (typeof code !== "function") {\n return;\n }\n id = result;\n code.__timerId = id;\n return addTimer(id, this.userData.interval, true);\n }\n });\n HookSites.window_clearTimeout.addHooks({\n before: function(receiver, args) {\n var id;\n id = args[0];\n return removeTimer(id, true);\n }\n });\n return HookSites.XMLHttpRequest_open.addHooks({\n before: function(receiver, args) {\n var xhr;\n xhr = receiver;\n IDGenerator.getId(xhr);\n xhr.__weinre_method = args[0];\n xhr.__weinre_url = args[1];\n return xhr.addEventListener("readystatechange", getXhrEventHandler(xhr), false);\n }\n });\n };\n\n return Timeline;\n\n})();\n\ngetXhrEventHandler = function(xhr) {\n return function(event) {\n return Timeline.addRecord_XHRReadyStateChange(xhr.__weinre_method, xhr.__weinre_url, IDGenerator.getId(xhr), xhr);\n };\n};\n\naddTimer = function(id, timeout, singleShot) {\n var timerSet;\n timerSet = (singleShot ? TimerTimeouts : TimerIntervals);\n timerSet[id] = {\n id: id,\n timeout: timeout,\n singleShot: singleShot\n };\n return Timeline.addRecord_TimerInstall(id, timeout, singleShot);\n};\n\nremoveTimer = function(id, singleShot) {\n var timer, timerSet;\n timerSet = (singleShot ? TimerTimeouts : TimerIntervals);\n timer = timerSet[id];\n if (!timer) {\n return;\n }\n Timeline.addRecord_TimerRemove(id, timer.timeout, singleShot);\n return delete timerSet[id];\n};\n\ninstrumentedTimerCode = function(code, timeout, singleShot) {\n var instrumentedCode;\n if (typeof code !== "function") {\n return code;\n }\n instrumentedCode = function() {\n var id, result;\n result = code.apply(this, arguments);\n id = arguments.callee.__timerId;\n Timeline.addRecord_TimerFire(id, timeout, singleShot);\n return result;\n };\n instrumentedCode.displayName = code.name || code.displayName;\n return instrumentedCode;\n};\n\naddStackTrace = function(record, skip) {\n var i, trace, _results;\n if (!skip) {\n skip = 1;\n }\n trace = new StackTrace(arguments).trace;\n record.stackTrace = [];\n i = skip;\n _results = [];\n while (i < trace.length) {\n record.stackTrace.push({\n functionName: trace[i],\n scriptName: "",\n lineNumber: ""\n });\n _results.push(i++);\n }\n return _results;\n};\n\nTimeline.installGlobalListeners();\n\nTimeline.installNativeHooks();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/Timeline.amd.js'),eval(";modjewel.define(\"weinre/target/WeinreExtraClientCommandsImpl\", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Console, Weinre, WeinreExtraClientCommandsImpl, WiDatabaseImpl;\n\nWeinre = require('../common/Weinre');\n\nWiDatabaseImpl = require('./WiDatabaseImpl');\n\nConsole = require('./Console');\n\nmodule.exports = WeinreExtraClientCommandsImpl = (function() {\n function WeinreExtraClientCommandsImpl() {}\n\n WeinreExtraClientCommandsImpl.prototype.getDatabases = function(callback) {\n var result;\n if (!callback) {\n return;\n }\n result = WiDatabaseImpl.getDatabases();\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n };\n\n return WeinreExtraClientCommandsImpl;\n\n})();\n\nrequire(\"../common/MethodNamer\").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/WeinreExtraClientCommandsImpl.amd.js"),eval(';modjewel.define("weinre/target/WeinreTargetEventsImpl", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Callback, Console, Weinre, WeinreTargetEventsImpl;\n\nWeinre = require(\'../common/Weinre\');\n\nCallback = require(\'../common/Callback\');\n\nConsole = require(\'./Console\');\n\nmodule.exports = WeinreTargetEventsImpl = (function() {\n function WeinreTargetEventsImpl() {}\n\n WeinreTargetEventsImpl.prototype.connectionCreated = function(clientChannel, targetChannel) {\n var message;\n message = ("weinre: target " + targetChannel + " connected to client ") + clientChannel;\n Weinre.logInfo(message);\n return Weinre.target.whenBodyReady(this, [], function() {\n var oldValue;\n oldValue = Console.useRemote(true);\n Weinre.target.setDocument();\n Weinre.wi.TimelineNotify.timelineProfilerWasStopped();\n return Weinre.wi.DOMStorage.initialize();\n });\n };\n\n WeinreTargetEventsImpl.prototype.connectionDestroyed = function(clientChannel, targetChannel) {\n var message, oldValue;\n message = ("weinre: target " + targetChannel + " disconnected from client ") + clientChannel;\n Weinre.logInfo(message);\n return oldValue = Console.useRemote(false);\n };\n\n WeinreTargetEventsImpl.prototype.sendCallback = function(callbackId, result) {\n return Callback.invoke(callbackId, result);\n };\n\n return WeinreTargetEventsImpl;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/WeinreTargetEventsImpl.amd.js'),eval(';modjewel.define("weinre/target/WiConsoleImpl", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Weinre, WiConsoleImpl;\n\nWeinre = require(\'../common/Weinre\');\n\nmodule.exports = WiConsoleImpl = (function() {\n function WiConsoleImpl() {\n this.messagesEnabled = true;\n }\n\n WiConsoleImpl.prototype.setConsoleMessagesEnabled = function(enabled, callback) {\n var oldValue;\n oldValue = this.messagesEnabled;\n this.messagesEnabled = enabled;\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [oldValue]);\n }\n };\n\n WiConsoleImpl.prototype.clearConsoleMessages = function(callback) {\n Weinre.wi.ConsoleNotify.consoleMessagesCleared();\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, []);\n }\n };\n\n WiConsoleImpl.prototype.setMonitoringXHREnabled = function(enabled, callback) {\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, []);\n }\n };\n\n return WiConsoleImpl;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/WiConsoleImpl.amd.js'),eval(';modjewel.define("weinre/target/WiCSSImpl", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Weinre, WiCSSImpl;\n\nWeinre = require(\'../common/Weinre\');\n\nmodule.exports = WiCSSImpl = (function() {\n function WiCSSImpl() {\n this.dummyComputedStyle = false;\n }\n\n WiCSSImpl.prototype.getStylesForNode = function(nodeId, callback) {\n var computedStyle, node, parentNode, parentStyle, result;\n result = {};\n node = Weinre.nodeStore.getNode(nodeId);\n if (!node) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid nodeId: " + nodeId);\n return;\n }\n if (this.dummyComputedStyle) {\n computedStyle = {\n styleId: null,\n properties: [],\n shorthandValues: [],\n cssProperties: []\n };\n } else {\n computedStyle = Weinre.cssStore.getComputedStyle(node);\n }\n result = {\n inlineStyle: Weinre.cssStore.getInlineStyle(node),\n computedStyle: computedStyle,\n matchedCSSRules: Weinre.cssStore.getMatchedCSSRules(node),\n styleAttributes: Weinre.cssStore.getStyleAttributes(node),\n pseudoElements: Weinre.cssStore.getPseudoElements(node),\n inherited: []\n };\n parentNode = node.parentNode;\n while (parentNode) {\n parentStyle = {\n inlineStyle: Weinre.cssStore.getInlineStyle(parentNode),\n matchedCSSRules: Weinre.cssStore.getMatchedCSSRules(parentNode)\n };\n result.inherited.push(parentStyle);\n parentNode = parentNode.parentNode;\n }\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiCSSImpl.prototype.getComputedStyleForNode = function(nodeId, callback) {\n var node, result;\n node = Weinre.nodeStore.getNode(nodeId);\n if (!node) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid nodeId: " + nodeId);\n return;\n }\n result = Weinre.cssStore.getComputedStyle(node);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiCSSImpl.prototype.getInlineStyleForNode = function(nodeId, callback) {\n var node, result;\n node = Weinre.nodeStore.getNode(nodeId);\n if (!node) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid nodeId: " + nodeId);\n return;\n }\n result = Weinre.cssStore.getInlineStyle(node);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiCSSImpl.prototype.getAllStyles = function(callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiCSSImpl.prototype.getStyleSheet = function(styleSheetId, callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiCSSImpl.prototype.getStyleSheetText = function(styleSheetId, callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiCSSImpl.prototype.setStyleSheetText = function(styleSheetId, text, callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiCSSImpl.prototype.setPropertyText = function(styleId, propertyIndex, text, overwrite, callback) {\n var result;\n result = Weinre.cssStore.setPropertyText(styleId, propertyIndex, text, overwrite);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiCSSImpl.prototype.toggleProperty = function(styleId, propertyIndex, disable, callback) {\n var result;\n result = Weinre.cssStore.toggleProperty(styleId, propertyIndex, disable);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiCSSImpl.prototype.setRuleSelector = function(ruleId, selector, callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiCSSImpl.prototype.addRule = function(contextNodeId, selector, callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiCSSImpl.prototype.querySelectorAll = function(documentId, selector, callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n return WiCSSImpl;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/WiCSSImpl.amd.js'),eval(';modjewel.define("weinre/target/WiDatabaseImpl", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar HookSites, IDGenerator, SqlStepper, Weinre, WiDatabaseImpl, dbAdd, dbById, dbRecordById, dbRecordByName, executeSQL_error, executeSQL_step_1, executeSQL_step_2, getTableNames_step_1, getTableNames_step_2, id2db, logSqlError, name2db;\n\nWeinre = require(\'../common/Weinre\');\n\nIDGenerator = require(\'../common/IDGenerator\');\n\nHookSites = require(\'./HookSites\');\n\nSqlStepper = require(\'./SqlStepper\');\n\nid2db = {};\n\nname2db = {};\n\nmodule.exports = WiDatabaseImpl = (function() {\n function WiDatabaseImpl() {\n if (!window.openDatabase) {\n return;\n }\n HookSites.window_openDatabase.addHooks({\n after: function(receiver, args, db) {\n var name, version;\n if (!db) {\n return;\n }\n name = args[0];\n version = args[1];\n return dbAdd(db, name, version);\n }\n });\n }\n\n WiDatabaseImpl.getDatabases = function() {\n var id, result;\n result = [];\n for (id in id2db) {\n result.push(id2db[id]);\n }\n return result;\n };\n\n WiDatabaseImpl.prototype.getDatabaseTableNames = function(databaseId, callback) {\n var db, stepper;\n db = dbById(databaseId);\n if (!db) {\n return;\n }\n stepper = SqlStepper([getTableNames_step_1, getTableNames_step_2]);\n stepper.callback = callback;\n return stepper.run(db, logSqlError);\n };\n\n WiDatabaseImpl.prototype.executeSQL = function(databaseId, query, callback) {\n var db, stepper, txid;\n db = dbById(databaseId);\n if (!db) {\n return;\n }\n txid = Weinre.targetDescription.channel + "-" + IDGenerator.next();\n stepper = SqlStepper([executeSQL_step_1, executeSQL_step_2]);\n stepper.txid = txid;\n stepper.query = query;\n stepper.callback = callback;\n stepper.run(db, executeSQL_error);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [true, txid]);\n }\n };\n\n return WiDatabaseImpl;\n\n})();\n\nlogSqlError = function(sqlError) {\n return console.log(("SQL Error " + sqlError.code + ": ") + sqlError.message);\n};\n\ngetTableNames_step_1 = function() {\n return this.executeSql("SELECT name FROM sqlite_master WHERE type=\'table\'");\n};\n\ngetTableNames_step_2 = function(resultSet) {\n var i, name, result, rows;\n rows = resultSet.rows;\n result = [];\n i = 0;\n while (i < rows.length) {\n name = rows.item(i).name;\n if (name === "__WebKitDatabaseInfoTable__") {\n i++;\n continue;\n }\n result.push(name);\n i++;\n }\n return Weinre.WeinreTargetCommands.sendClientCallback(this.callback, [result]);\n};\n\nexecuteSQL_step_1 = function() {\n return this.executeSql(this.query);\n};\n\nexecuteSQL_step_2 = function(resultSet) {\n var columnNames, i, j, propName, row, rows, values;\n columnNames = [];\n values = [];\n rows = resultSet.rows;\n i = 0;\n while (i < rows.length) {\n row = rows.item(i);\n if (i === 0) {\n for (propName in row) {\n columnNames.push(propName);\n }\n }\n j = 0;\n while (j < columnNames.length) {\n values.push(row[columnNames[j]]);\n j++;\n }\n i++;\n }\n return Weinre.wi.DatabaseNotify.sqlTransactionSucceeded(this.txid, columnNames, values);\n};\n\nexecuteSQL_error = function(sqlError) {\n var error;\n error = {\n code: sqlError.code,\n message: sqlError.message\n };\n return Weinre.wi.DatabaseNotify.sqlTransactionFailed(this.txid, error);\n};\n\ndbById = function(id) {\n var record;\n record = id2db[id];\n if (!record) {\n return null;\n }\n return record.db;\n};\n\ndbRecordById = function(id) {\n return id2db[id];\n};\n\ndbRecordByName = function(name) {\n return name2db[name];\n};\n\ndbAdd = function(db, name, version) {\n var payload, record;\n record = dbRecordByName(name);\n if (record) {\n return record;\n }\n record = {};\n record.id = IDGenerator.next();\n record.domain = window.location.origin;\n record.name = name;\n record.version = version;\n record.db = db;\n id2db[record.id] = record;\n name2db[name] = record;\n payload = {};\n payload.id = record.id;\n payload.domain = record.domain;\n payload.name = name;\n payload.version = version;\n return Weinre.WeinreExtraTargetEvents.databaseOpened(payload);\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/WiDatabaseImpl.amd.js'),eval(';modjewel.define("weinre/target/WiDOMImpl", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Weinre, WiDOMImpl;\n\nWeinre = require(\'../common/Weinre\');\n\nmodule.exports = WiDOMImpl = (function() {\n function WiDOMImpl() {}\n\n WiDOMImpl.prototype.getChildNodes = function(nodeId, callback) {\n var children, node;\n node = Weinre.nodeStore.getNode(nodeId);\n if (!node) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid nodeId: " + nodeId);\n return;\n }\n children = Weinre.nodeStore.serializeNodeChildren(node, 1);\n Weinre.wi.DOMNotify.setChildNodes(nodeId, children);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n WiDOMImpl.prototype.setAttribute = function(elementId, name, value, callback) {\n var element;\n element = Weinre.nodeStore.getNode(elementId);\n if (!element) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid elementId: " + elementId);\n return;\n }\n element.setAttribute(name, value);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n WiDOMImpl.prototype.removeAttribute = function(elementId, name, callback) {\n var element;\n element = Weinre.nodeStore.getNode(elementId);\n if (!element) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid elementId: " + elementId);\n return;\n }\n element.removeAttribute(name);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n WiDOMImpl.prototype.setTextNodeValue = function(nodeId, value, callback) {\n var node;\n node = Weinre.nodeStore.getNode(nodeId);\n if (!node) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid nodeId: " + nodeId);\n return;\n }\n node.nodeValue = value;\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n WiDOMImpl.prototype.getEventListenersForNode = function(nodeId, callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiDOMImpl.prototype.copyNode = function(nodeId, callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiDOMImpl.prototype.removeNode = function(nodeId, callback) {\n var node;\n node = Weinre.nodeStore.getNode(nodeId);\n if (!node) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid nodeId: " + nodeId);\n return;\n }\n if (!node.parentNode) {\n Weinre.logWarning(arguments.callee.signature + " passed a parentless node: " + node);\n return;\n }\n node.parentNode.removeChild(node);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n WiDOMImpl.prototype.changeTagName = function(nodeId, newTagName, callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiDOMImpl.prototype.getOuterHTML = function(nodeId, callback) {\n var node, value;\n node = Weinre.nodeStore.getNode(nodeId);\n if (!node) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid nodeId: " + nodeId);\n return;\n }\n value = node.outerHTML;\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [value]);\n }\n };\n\n WiDOMImpl.prototype.setOuterHTML = function(nodeId, outerHTML, callback) {\n var node;\n node = Weinre.nodeStore.getNode(nodeId);\n if (!node) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid nodeId: " + nodeId);\n return;\n }\n node.outerHTML = outerHTML;\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n WiDOMImpl.prototype.addInspectedNode = function(nodeId, callback) {\n Weinre.nodeStore.addInspectedNode(nodeId);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n WiDOMImpl.prototype.performSearch = function(query, runSynchronously, callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiDOMImpl.prototype.searchCanceled = function(callback) {\n return Weinre.notImplemented(arguments.callee.signature);\n };\n\n WiDOMImpl.prototype.pushNodeByPathToFrontend = function(path, callback) {\n var childNodeIds, curr, currId, i, index, nodeId, nodeName, parts, _i, _ref;\n parts = path.split(",");\n curr = document;\n currId = null;\n nodeId = Weinre.nodeStore.getNodeId(curr);\n this.getChildNodes(nodeId);\n for (i = _i = 0, _ref = parts.length; _i < _ref; i = _i += 2) {\n index = parseInt(parts[i]);\n nodeName = parts[i + 1];\n if (isNaN(index)) {\n return;\n }\n childNodeIds = Weinre.nodeStore.childNodeIds(curr);\n currId = childNodeIds[index];\n if (!currId) {\n return;\n }\n this.getChildNodes(currId);\n curr = Weinre.nodeStore.getNode(currId);\n if (curr.nodeName !== nodeName) {\n return;\n }\n }\n if (callback && currId) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [currId]);\n }\n };\n\n WiDOMImpl.prototype.resolveNode = function(nodeId, callback) {\n var result;\n result = Weinre.injectedScript.resolveNode(nodeId);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiDOMImpl.prototype.getNodeProperties = function(nodeId, propertiesArray, callback) {\n var result;\n propertiesArray = JSON.stringify(propertiesArray);\n result = Weinre.injectedScript.getNodeProperties(nodeId, propertiesArray);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiDOMImpl.prototype.getNodePrototypes = function(nodeId, callback) {\n var result;\n result = Weinre.injectedScript.getNodePrototypes(nodeId);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiDOMImpl.prototype.pushNodeToFrontend = function(objectId, callback) {\n var result;\n objectId = JSON.stringify(objectId);\n result = Weinre.injectedScript.pushNodeToFrontend(objectId);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n return WiDOMImpl;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/WiDOMImpl.amd.js'),eval(';modjewel.define("weinre/target/WiDOMStorageImpl", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar HookSites, Weinre, WiDOMStorageImpl, _getStorageArea, _storageEventHandler;\n\nWeinre = require(\'../common/Weinre\');\n\nHookSites = require(\'./HookSites\');\n\nmodule.exports = WiDOMStorageImpl = (function() {\n function WiDOMStorageImpl() {}\n\n WiDOMStorageImpl.prototype.getDOMStorageEntries = function(storageId, callback) {\n var i, key, length, result, storageArea, val;\n storageArea = _getStorageArea(storageId);\n if (!storageArea) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid storageId: " + storageId);\n return;\n }\n result = [];\n length = storageArea.length;\n i = 0;\n while (i < length) {\n key = storageArea.key(i);\n val = storageArea.getItem(key);\n result.push([key, val]);\n i++;\n }\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiDOMStorageImpl.prototype.setDOMStorageItem = function(storageId, key, value, callback) {\n var e, result, storageArea;\n storageArea = _getStorageArea(storageId);\n if (!storageArea) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid storageId: " + storageId);\n return;\n }\n result = true;\n try {\n HookLib.ignoreHooks(function() {\n if (storageArea === window.localStorage) {\n return localStorage.setItem(key, value);\n } else if (storageArea === window.sessionStorage) {\n return sessionStorage.setItem(key, value);\n }\n });\n } catch (_error) {\n e = _error;\n result = false;\n }\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiDOMStorageImpl.prototype.removeDOMStorageItem = function(storageId, key, callback) {\n var e, result, storageArea;\n storageArea = _getStorageArea(storageId);\n if (!storageArea) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid storageId: " + storageId);\n return;\n }\n result = true;\n try {\n HookLib.ignoreHooks(function() {\n if (storageArea === window.localStorage) {\n return localStorage.removeItem(key);\n } else if (storageArea === window.sessionStorage) {\n return sessionStorage.removeItem(key);\n }\n });\n } catch (_error) {\n e = _error;\n result = false;\n }\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiDOMStorageImpl.prototype.initialize = function() {\n if (window.localStorage) {\n Weinre.wi.DOMStorageNotify.addDOMStorage({\n id: 1,\n host: window.location.host,\n isLocalStorage: true\n });\n HookSites.LocalStorage_setItem.addHooks({\n after: function() {\n return _storageEventHandler({\n storageArea: window.localStorage\n });\n }\n });\n HookSites.LocalStorage_removeItem.addHooks({\n after: function() {\n return _storageEventHandler({\n storageArea: window.localStorage\n });\n }\n });\n HookSites.LocalStorage_clear.addHooks({\n after: function() {\n return _storageEventHandler({\n storageArea: window.localStorage\n });\n }\n });\n }\n if (window.sessionStorage) {\n Weinre.wi.DOMStorageNotify.addDOMStorage({\n id: 2,\n host: window.location.host,\n isLocalStorage: false\n });\n HookSites.SessionStorage_setItem.addHooks({\n after: function() {\n return _storageEventHandler({\n storageArea: window.sessionStorage\n });\n }\n });\n HookSites.SessionStorage_removeItem.addHooks({\n after: function() {\n return _storageEventHandler({\n storageArea: window.sessionStorage\n });\n }\n });\n HookSites.SessionStorage_clear.addHooks({\n after: function() {\n return _storageEventHandler({\n storageArea: window.sessionStorage\n });\n }\n });\n }\n return document.addEventListener("storage", _storageEventHandler, false);\n };\n\n return WiDOMStorageImpl;\n\n})();\n\n_getStorageArea = function(storageId) {\n if (storageId === 1) {\n return window.localStorage;\n } else if (storageId === 2) {\n return window.sessionStorage;\n }\n return null;\n};\n\n_storageEventHandler = function(event) {\n var storageId;\n if (event.storageArea === window.localStorage) {\n storageId = 1;\n } else if (event.storageArea === window.sessionStorage) {\n storageId = 2;\n } else {\n return;\n }\n return Weinre.wi.DOMStorageNotify.updateDOMStorage(storageId);\n};\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/WiDOMStorageImpl.amd.js'),eval(';modjewel.define("weinre/target/WiInspectorImpl", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Timeline, Weinre, WiInspectorImpl;\n\nWeinre = require(\'../common/Weinre\');\n\nTimeline = require(\'../target/Timeline\');\n\nmodule.exports = WiInspectorImpl = (function() {\n function WiInspectorImpl() {}\n\n WiInspectorImpl.prototype.reloadPage = function(callback) {\n if (callback) {\n Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n return window.location.reload();\n };\n\n WiInspectorImpl.prototype.highlightDOMNode = function(nodeId, callback) {\n var node;\n node = Weinre.nodeStore.getNode(nodeId);\n if (!node) {\n Weinre.logWarning(arguments.callee.signature + " passed an invalid nodeId: " + nodeId);\n return;\n }\n Weinre.elementHighlighter.on(node);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n WiInspectorImpl.prototype.hideDOMNodeHighlight = function(callback) {\n Weinre.elementHighlighter.off();\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n WiInspectorImpl.prototype.startTimelineProfiler = function(callback) {\n Timeline.start();\n Weinre.wi.TimelineNotify.timelineProfilerWasStarted();\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n WiInspectorImpl.prototype.stopTimelineProfiler = function(callback) {\n Timeline.stop();\n Weinre.wi.TimelineNotify.timelineProfilerWasStopped();\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback);\n }\n };\n\n return WiInspectorImpl;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/WiInspectorImpl.amd.js'),eval(';modjewel.define("weinre/target/WiRuntimeImpl", function(require, exports, module) { // Generated by CoffeeScript 1.8.0\nvar Weinre, WiRuntimeImpl;\n\nWeinre = require(\'../common/Weinre\');\n\nmodule.exports = WiRuntimeImpl = (function() {\n function WiRuntimeImpl() {}\n\n WiRuntimeImpl.prototype.evaluate = function(expression, objectGroup, includeCommandLineAPI, callback) {\n var result;\n result = Weinre.injectedScript.evaluate(expression, objectGroup, includeCommandLineAPI);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiRuntimeImpl.prototype.getCompletions = function(expression, includeCommandLineAPI, callback) {\n var result;\n result = Weinre.injectedScript.getCompletions(expression, includeCommandLineAPI);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiRuntimeImpl.prototype.getProperties = function(objectId, ignoreHasOwnProperty, abbreviate, callback) {\n var result;\n objectId = JSON.stringify(objectId);\n result = Weinre.injectedScript.getProperties(objectId, ignoreHasOwnProperty, abbreviate);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiRuntimeImpl.prototype.setPropertyValue = function(objectId, propertyName, expression, callback) {\n var result;\n objectId = JSON.stringify(objectId);\n result = Weinre.injectedScript.setPropertyValue(objectId, propertyName, expression);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n WiRuntimeImpl.prototype.releaseWrapperObjectGroup = function(injectedScriptId, objectGroup, callback) {\n var result;\n result = Weinre.injectedScript.releaseWrapperObjectGroup(objectGroup);\n if (callback) {\n return Weinre.WeinreTargetCommands.sendClientCallback(callback, [result]);\n }\n };\n\n return WiRuntimeImpl;\n\n})();\n\nrequire("../common/MethodNamer").setNamesForClass(module.exports);\n\n});\n\n//@ sourceURL=weinre/target/WiRuntimeImpl.amd.js'),eval('modjewel.require(\'weinre/common/Weinre\').addIDLs([{"interfaces": [{"name": "InjectedScriptHost", "methods": [{"name": "clearConsoleMessages", "parameters": []}, {"name": "copyText", "parameters": [{"name": "text"}]}, {"parameters": [{"name": "nodeId"}], "name": "nodeForId"}, {"parameters": [{"name": "node"}, {"name": "withChildren"}, {"name": "selectInUI"}], "name": "pushNodePathToFrontend"}, {"name": "inspectedNode", "parameters": [{"name": "num"}]}, {"parameters": [{"name": "object"}], "name": "internalConstructorName"}, {"parameters": [], "name": "currentCallFrame"}, {"parameters": [{"name": "database"}], "name": "selectDatabase"}, {"parameters": [{"name": "storage"}], "name": "selectDOMStorage"}, {"name": "didCreateWorker", "parameters": [{"name": "id"}, {"name": "url"}, {"name": "isFakeWorker"}]}, {"name": "didDestroyWorker", "parameters": [{"name": "id"}]}, {"name": "nextWorkerId", "parameters": []}]}], "name": "core"}, {"interfaces": [{"name": "Inspector", "methods": [{"name": "addScriptToEvaluateOnLoad", "parameters": [{"name": "scriptSource"}]}, {"name": "removeAllScriptsToEvaluateOnLoad", "parameters": []}, {"name": "reloadPage", "parameters": [{"name": "ignoreCache"}]}, {"name": "populateScriptObjects", "parameters": []}, {"name": "openInInspectedWindow", "parameters": [{"name": "url"}]}, {"name": "setSearchingForNode", "parameters": [{"name": "enabled"}]}, {"name": "didEvaluateForTestInFrontend", "parameters": [{"name": "testCallId"}, {"name": "jsonResult"}]}, {"name": "highlightDOMNode", "parameters": [{"name": "nodeId"}]}, {"name": "hideDOMNodeHighlight", "parameters": []}, {"name": "highlightFrame", "parameters": [{"name": "frameId"}]}, {"name": "hideFrameHighlight", "parameters": []}, {"name": "setUserAgentOverride", "parameters": [{"name": "userAgent"}]}, {"name": "getCookies", "parameters": []}, {"name": "deleteCookie", "parameters": [{"name": "cookieName"}, {"name": "domain"}]}, {"name": "startTimelineProfiler", "parameters": []}, {"name": "stopTimelineProfiler", "parameters": []}, {"name": "enableDebugger", "parameters": []}, {"name": "disableDebugger", "parameters": []}, {"name": "enableProfiler", "parameters": []}, {"name": "disableProfiler", "parameters": []}, {"name": "startProfiling", "parameters": []}, {"name": "stopProfiling", "parameters": []}]}, {"name": "Runtime", "methods": [{"name": "evaluate", "parameters": [{"name": "expression"}, {"name": "objectGroup"}, {"name": "includeCommandLineAPI"}]}, {"name": "getCompletions", "parameters": [{"name": "expression"}, {"name": "includeCommandLineAPI"}]}, {"name": "getProperties", "parameters": [{"name": "objectId"}, {"name": "ignoreHasOwnProperty"}, {"name": "abbreviate"}]}, {"name": "setPropertyValue", "parameters": [{"name": "objectId"}, {"name": "propertyName"}, {"name": "expression"}]}, {"name": "releaseWrapperObjectGroup", "parameters": [{"name": "injectedScriptId"}, {"name": "objectGroup"}]}]}, {"name": "InjectedScript", "methods": [{"name": "evaluateOnSelf", "parameters": [{"name": "functionBody"}, {"name": "argumentsArray"}]}]}, {"name": "Console", "methods": [{"name": "setConsoleMessagesEnabled", "parameters": [{"name": "enabled"}]}, {"name": "clearConsoleMessages", "parameters": []}, {"name": "setMonitoringXHREnabled", "parameters": [{"name": "enabled"}]}]}, {"name": "Network", "methods": [{"name": "cachedResources", "parameters": []}, {"name": "resourceContent", "parameters": [{"name": "frameId"}, {"name": "url"}, {"name": "base64Encode"}]}, {"name": "setExtraHeaders", "parameters": [{"name": "headers"}]}]}, {"name": "Database", "methods": [{"name": "getDatabaseTableNames", "parameters": [{"name": "databaseId"}]}, {"name": "executeSQL", "parameters": [{"name": "databaseId"}, {"name": "query"}]}]}, {"name": "DOMStorage", "methods": [{"name": "getDOMStorageEntries", "parameters": [{"name": "storageId"}]}, {"name": "setDOMStorageItem", "parameters": [{"name": "storageId"}, {"name": "key"}, {"name": "value"}]}, {"name": "removeDOMStorageItem", "parameters": [{"name": "storageId"}, {"name": "key"}]}]}, {"name": "ApplicationCache", "methods": [{"name": "getApplicationCaches", "parameters": []}]}, {"name": "DOM", "methods": [{"name": "getChildNodes", "parameters": [{"name": "nodeId"}]}, {"name": "setAttribute", "parameters": [{"name": "elementId"}, {"name": "name"}, {"name": "value"}]}, {"name": "removeAttribute", "parameters": [{"name": "elementId"}, {"name": "name"}]}, {"name": "setTextNodeValue", "parameters": [{"name": "nodeId"}, {"name": "value"}]}, {"name": "getEventListenersForNode", "parameters": [{"name": "nodeId"}]}, {"name": "copyNode", "parameters": [{"name": "nodeId"}]}, {"name": "removeNode", "parameters": [{"name": "nodeId"}]}, {"name": "changeTagName", "parameters": [{"name": "nodeId"}, {"name": "newTagName"}]}, {"name": "getOuterHTML", "parameters": [{"name": "nodeId"}]}, {"name": "setOuterHTML", "parameters": [{"name": "nodeId"}, {"name": "outerHTML"}]}, {"name": "addInspectedNode", "parameters": [{"name": "nodeId"}]}, {"name": "performSearch", "parameters": [{"name": "query"}, {"name": "runSynchronously"}]}, {"name": "searchCanceled", "parameters": []}, {"name": "pushNodeByPathToFrontend", "parameters": [{"name": "path"}]}, {"name": "resolveNode", "parameters": [{"name": "nodeId"}]}, {"name": "getNodeProperties", "parameters": [{"name": "nodeId"}, {"name": "propertiesArray"}]}, {"name": "getNodePrototypes", "parameters": [{"name": "nodeId"}]}, {"name": "pushNodeToFrontend", "parameters": [{"name": "objectId"}]}]}, {"name": "CSS", "methods": [{"name": "getStylesForNode", "parameters": [{"name": "nodeId"}]}, {"name": "getComputedStyleForNode", "parameters": [{"name": "nodeId"}]}, {"name": "getInlineStyleForNode", "parameters": [{"name": "nodeId"}]}, {"name": "getAllStyles", "parameters": []}, {"name": "getStyleSheet", "parameters": [{"name": "styleSheetId"}]}, {"name": "getStyleSheetText", "parameters": [{"name": "styleSheetId"}]}, {"name": "setStyleSheetText", "parameters": [{"name": "styleSheetId"}, {"name": "text"}]}, {"name": "setPropertyText", "parameters": [{"name": "styleId"}, {"name": "propertyIndex"}, {"name": "text"}, {"name": "overwrite"}]}, {"name": "toggleProperty", "parameters": [{"name": "styleId"}, {"name": "propertyIndex"}, {"name": "disable"}]}, {"name": "setRuleSelector", "parameters": [{"name": "ruleId"}, {"name": "selector"}]}, {"name": "addRule", "parameters": [{"name": "contextNodeId"}, {"name": "selector"}]}, {"name": "getSupportedCSSProperties", "parameters": []}, {"name": "querySelectorAll", "parameters": [{"name": "documentId"}, {"name": "selector"}]}]}, {"name": "Timeline", "methods": []}, {"name": "Debugger", "methods": [{"name": "activateBreakpoints", "parameters": []}, {"name": "deactivateBreakpoints", "parameters": []}, {"name": "setJavaScriptBreakpoint", "parameters": [{"name": "url"}, {"name": "lineNumber"}, {"name": "columnNumber"}, {"name": "condition"}, {"name": "enabled"}]}, {"name": "setJavaScriptBreakpointBySourceId", "parameters": [{"name": "sourceId"}, {"name": "lineNumber"}, {"name": "columnNumber"}, {"name": "condition"}, {"name": "enabled"}]}, {"name": "removeJavaScriptBreakpoint", "parameters": [{"name": "breakpointId"}]}, {"name": "continueToLocation", "parameters": [{"name": "sourceId"}, {"name": "lineNumber"}, {"name": "columnNumber"}]}, {"name": "stepOver", "parameters": []}, {"name": "stepInto", "parameters": []}, {"name": "stepOut", "parameters": []}, {"name": "pause", "parameters": []}, {"name": "resume", "parameters": []}, {"name": "editScriptSource", "parameters": [{"name": "sourceID"}, {"name": "newContent"}]}, {"name": "getScriptSource", "parameters": [{"name": "sourceID"}]}, {"name": "setPauseOnExceptionsState", "parameters": [{"name": "pauseOnExceptionsState"}]}, {"name": "evaluateOnCallFrame", "parameters": [{"name": "callFrameId"}, {"name": "expression"}, {"name": "objectGroup"}, {"name": "includeCommandLineAPI"}]}, {"name": "getCompletionsOnCallFrame", "parameters": [{"name": "callFrameId"}, {"name": "expression"}, {"name": "includeCommandLineAPI"}]}]}, {"name": "BrowserDebugger", "methods": [{"name": "setAllBrowserBreakpoints", "parameters": [{"name": "breakpoints"}]}, {"name": "setDOMBreakpoint", "parameters": [{"name": "nodeId"}, {"name": "type"}]}, {"name": "removeDOMBreakpoint", "parameters": [{"name": "nodeId"}, {"name": "type"}]}, {"name": "setEventListenerBreakpoint", "parameters": [{"name": "eventName"}]}, {"name": "removeEventListenerBreakpoint", "parameters": [{"name": "eventName"}]}, {"name": "setXHRBreakpoint", "parameters": [{"name": "url"}]}, {"name": "removeXHRBreakpoint", "parameters": [{"name": "url"}]}]}, {"name": "Profiler", "methods": [{"name": "getProfileHeaders", "parameters": []}, {"name": "getProfile", "parameters": [{"name": "type"}, {"name": "uid"}]}, {"name": "removeProfile", "parameters": [{"name": "type"}, {"name": "uid"}]}, {"name": "clearProfiles", "parameters": []}, {"name": "takeHeapSnapshot", "parameters": [{"name": "detailed"}]}]}, {"name": "InspectorNotify", "methods": [{"parameters": [], "name": "frontendReused"}, {"parameters": [{"name": "nodeIds"}], "name": "addNodesToSearchResult"}, {"parameters": [], "name": "bringToFront"}, {"parameters": [], "name": "disconnectFromBackend"}, {"parameters": [{"name": "url"}], "name": "inspectedURLChanged"}, {"parameters": [{"name": "time"}], "name": "domContentEventFired"}, {"parameters": [{"name": "time"}], "name": "loadEventFired"}, {"parameters": [], "name": "reset"}, {"parameters": [{"name": "panel"}], "name": "showPanel"}, {"parameters": [{"name": "testCallId"}, {"name": "script"}], "name": "evaluateForTestInFrontend"}, {"parameters": [{"name": "nodeId"}], "name": "updateFocusedNode"}]}, {"name": "ConsoleNotify", "methods": [{"parameters": [{"name": "messageObj"}], "name": "addConsoleMessage"}, {"parameters": [{"name": "count"}], "name": "updateConsoleMessageExpiredCount"}, {"parameters": [{"name": "count"}], "name": "updateConsoleMessageRepeatCount"}, {"parameters": [], "name": "consoleMessagesCleared"}]}, {"name": "NetworkNotify", "methods": [{"parameters": [{"name": "frameId"}], "name": "frameDetachedFromParent"}, {"parameters": [{"name": "identifier"}, {"name": "url"}, {"name": "loader"}, {"name": "callStack"}], "name": "identifierForInitialRequest"}, {"parameters": [{"name": "identifier"}, {"name": "time"}, {"name": "request"}, {"name": "redirectResponse"}], "name": "willSendRequest"}, {"parameters": [{"name": "identifier"}], "name": "markResourceAsCached"}, {"parameters": [{"name": "identifier"}, {"name": "time"}, {"name": "resourceType"}, {"name": "response"}], "name": "didReceiveResponse"}, {"parameters": [{"name": "identifier"}, {"name": "time"}, {"name": "lengthReceived"}], "name": "didReceiveContentLength"}, {"parameters": [{"name": "identifier"}, {"name": "finishTime"}], "name": "didFinishLoading"}, {"parameters": [{"name": "identifier"}, {"name": "time"}, {"name": "localizedDescription"}], "name": "didFailLoading"}, {"parameters": [{"name": "time"}, {"name": "resource"}], "name": "didLoadResourceFromMemoryCache"}, {"parameters": [{"name": "identifier"}, {"name": "sourceString"}, {"name": "type"}], "name": "setInitialContent"}, {"parameters": [{"name": "frame"}, {"name": "loader"}], "name": "didCommitLoadForFrame"}, {"parameters": [{"name": "identifier"}, {"name": "requestURL"}], "name": "didCreateWebSocket"}, {"parameters": [{"name": "identifier"}, {"name": "time"}, {"name": "request"}], "name": "willSendWebSocketHandshakeRequest"}, {"parameters": [{"name": "identifier"}, {"name": "time"}, {"name": "response"}], "name": "didReceiveWebSocketHandshakeResponse"}, {"parameters": [{"name": "identifier"}, {"name": "time"}], "name": "didCloseWebSocket"}]}, {"name": "DatabaseNotify", "methods": [{"parameters": [{"name": "database"}], "name": "addDatabase"}, {"parameters": [{"name": "databaseId"}], "name": "selectDatabase"}, {"parameters": [{"name": "transactionId"}, {"name": "columnNames"}, {"name": "values"}], "name": "sqlTransactionSucceeded"}, {"parameters": [{"name": "transactionId"}, {"name": "sqlError"}], "name": "sqlTransactionFailed"}]}, {"name": "DOMStorageNotify", "methods": [{"parameters": [{"name": "storage"}], "name": "addDOMStorage"}, {"parameters": [{"name": "storageId"}], "name": "updateDOMStorage"}, {"parameters": [{"name": "storageId"}], "name": "selectDOMStorage"}]}, {"name": "ApplicationCacheNotify", "methods": [{"parameters": [{"name": "status"}], "name": "updateApplicationCacheStatus"}, {"parameters": [{"name": "isNowOnline"}], "name": "updateNetworkState"}]}, {"name": "DOMNotify", "methods": [{"parameters": [{"name": "root"}], "name": "setDocument"}, {"parameters": [{"name": "id"}, {"name": "attributes"}], "name": "attributesUpdated"}, {"parameters": [{"name": "id"}, {"name": "newValue"}], "name": "characterDataModified"}, {"parameters": [{"name": "parentId"}, {"name": "nodes"}], "name": "setChildNodes"}, {"parameters": [{"name": "root"}], "name": "setDetachedRoot"}, {"parameters": [{"name": "id"}, {"name": "newValue"}], "name": "childNodeCountUpdated"}, {"parameters": [{"name": "parentId"}, {"name": "prevId"}, {"name": "node"}], "name": "childNodeInserted"}, {"parameters": [{"name": "parentId"}, {"name": "id"}], "name": "childNodeRemoved"}]}, {"name": "TimelineNotify", "methods": [{"parameters": [], "name": "timelineProfilerWasStarted"}, {"parameters": [], "name": "timelineProfilerWasStopped"}, {"parameters": [{"name": "record"}], "name": "addRecordToTimeline"}]}, {"name": "DebuggerNotify", "methods": [{"parameters": [], "name": "debuggerWasEnabled"}, {"parameters": [], "name": "debuggerWasDisabled"}, {"parameters": [{"name": "sourceID"}, {"name": "url"}, {"name": "lineOffset"}, {"name": "columnOffset"}, {"name": "length"}, {"name": "scriptWorldType"}], "name": "parsedScriptSource"}, {"parameters": [{"name": "url"}, {"name": "data"}, {"name": "firstLine"}, {"name": "errorLine"}, {"name": "errorMessage"}], "name": "failedToParseScriptSource"}, {"parameters": [{"name": "breakpointId"}, {"name": "sourceId"}, {"name": "lineNumber"}, {"name": "columnNumber"}], "name": "breakpointResolved"}, {"parameters": [{"name": "details"}], "name": "pausedScript"}, {"parameters": [], "name": "resumedScript"}, {"parameters": [{"name": "id"}, {"name": "url"}, {"name": "isShared"}], "name": "didCreateWorker"}, {"parameters": [{"name": "id"}], "name": "didDestroyWorker"}]}, {"name": "ProfilerNotify", "methods": [{"parameters": [], "name": "profilerWasEnabled"}, {"parameters": [], "name": "profilerWasDisabled"}, {"parameters": [{"name": "header"}], "name": "addProfileHeader"}, {"parameters": [{"name": "uid"}, {"name": "chunk"}], "name": "addHeapSnapshotChunk"}, {"parameters": [{"name": "uid"}], "name": "finishHeapSnapshot"}, {"parameters": [{"name": "isProfiling"}], "name": "setRecordingProfile"}, {"parameters": [], "name": "resetProfiles"}, {"parameters": [{"name": "done"}, {"name": "total"}], "name": "reportHeapSnapshotProgress"}]}], "name": "core"}, {"interfaces": [{"name": "InspectorFrontendHost", "methods": [{"name": "loaded", "parameters": []}, {"name": "closeWindow", "parameters": []}, {"name": "disconnectFromBackend", "parameters": []}, {"name": "bringToFront", "parameters": []}, {"name": "inspectedURLChanged", "parameters": [{"name": "newURL"}]}, {"name": "requestAttachWindow", "parameters": []}, {"name": "requestDetachWindow", "parameters": []}, {"name": "setAttachedWindowHeight", "parameters": [{"name": "height"}]}, {"name": "moveWindowBy", "parameters": [{"name": "x"}, {"name": "y"}]}, {"name": "setExtensionAPI", "parameters": [{"name": "script"}]}, {"name": "localizedStringsURL", "parameters": []}, {"name": "hiddenPanels", "parameters": []}, {"name": "copyText", "parameters": [{"name": "text"}]}, {"parameters": [], "name": "platform"}, {"parameters": [], "name": "port"}, {"parameters": [{"name": "event"}, {"name": "items"}], "name": "showContextMenu"}, {"name": "sendMessageToBackend", "parameters": [{"name": "message"}]}]}], "name": "core"}, {"interfaces": [{"name": "WeinreClientCommands", "methods": [{"name": "registerClient", "parameters": []}, {"name": "getTargets", "parameters": []}, {"name": "getClients", "parameters": []}, {"name": "connectTarget", "parameters": [{"name": "clientId"}, {"name": "targetId"}]}, {"name": "disconnectTarget", "parameters": [{"name": "clientId"}]}, {"name": "getExtensions", "parameters": []}, {"name": "logDebug", "parameters": [{"name": "message"}]}, {"name": "logInfo", "parameters": [{"name": "message"}]}, {"name": "logWarning", "parameters": [{"name": "message"}]}, {"name": "logError", "parameters": [{"name": "message"}]}]}], "name": "weinre"}, {"interfaces": [{"name": "WeinreClientEvents", "methods": [{"name": "clientRegistered", "parameters": [{"name": "client"}]}, {"name": "targetRegistered", "parameters": [{"name": "target"}]}, {"name": "clientUnregistered", "parameters": [{"name": "clientId"}]}, {"name": "targetUnregistered", "parameters": [{"name": "targetId"}]}, {"name": "connectionCreated", "parameters": [{"name": "clientId"}, {"name": "targetId"}]}, {"name": "connectionDestroyed", "parameters": [{"name": "clientId"}, {"name": "targetId"}]}, {"name": "sendCallback", "parameters": [{"name": "callbackId"}, {"name": "result"}]}, {"name": "serverProperties", "parameters": [{"name": "properties"}]}]}], "name": "weinre"}, {"interfaces": [{"name": "WeinreExtraClientCommands", "methods": [{"name": "getDatabases", "parameters": []}]}], "name": "weinre"}, {"interfaces": [{"name": "WeinreExtraTargetEvents", "methods": [{"name": "databaseOpened", "parameters": [{"name": "databaseRecord"}]}]}], "name": "weinre"}, {"interfaces": [{"name": "WeinreTargetCommands", "methods": [{"name": "registerTarget", "parameters": [{"name": "url"}]}, {"name": "sendClientCallback", "parameters": [{"name": "callbackId"}, {"name": "args"}]}, {"name": "logDebug", "parameters": [{"name": "message"}]}, {"name": "logInfo", "parameters": [{"name": "message"}]}, {"name": "logWarning", "parameters": [{"name": "message"}]}, {"name": "logError", "parameters": [{"name": "message"}]}]}], "name": "weinre"}, {"interfaces": [{"name": "WeinreTargetEvents", "methods": [{"name": "connectionCreated", "parameters": [{"name": "clientId"}, {"name": "targetId"}]}, {"name": "connectionDestroyed", "parameters": [{"name": "clientId"}, {"name": "targetId"}]}, {"name": "sendCallback", "parameters": [{"name": "callbackId"}, {"name": "result"}]}]}], "name": "weinre"}])\n//@ sourceURL=interfaces/all-json-idls-min.js'),modjewel.require("weinre/target/Target").main()}()},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,o;return t=e,(n=[{key:"getLocation",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_location")});case 2:return t=e.sent,n=t.location,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getOrganizationTags",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_organization_tags")});case 2:return t=e.sent,n=t.tags,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getDeviceName",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.geDeviceNameFromTittle(),e.abrupt("return",t);case 2:case"end":return e.stop()}},e,this)}))}},{key:"getMessage",value:function(t){return[this.messagePrefix,e.MESSAGE_PREFIX,t].join(".")}},{key:"geDeviceNameFromTittle",value:function(){var e;return null!==(e=window.parent.document.head.getElementsByTagName("title")[0].parentElement.getElementsByTagName("title")[0].innerHTML)&&void 0!==e?e:""}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o,o.MESSAGE_PREFIX="device_info"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.version=null}var t,n,a;return t=e,(n=[{key:"supports",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o.default({capability:e}).string(),t.next=3,this.postMessage({type:this.getMessage("supports"),capability:e});case 3:return n=t.sent,r=n.supports,t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}))}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}}])&&r(t.prototype,n),a&&r(t,a),e}();a.MESSAGE_PREFIX="display",t.default=a},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(501),o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.triggers=new i.default(this.getMessagePrefix(),this.postMessage)}var t,n,o;return t=e,(n=[{key:"getMessagePrefix",value:function(){return this.messagePrefix+"."+e.MESSAGE_PREFIX}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o,o.MESSAGE_PREFIX="timing"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,o;return t=e,(n=[{key:"pause",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("pause")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"resume",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("resume")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o,o.MESSAGE_PREFIX="triggers"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.SyncEngine=void 0;var o,a,s=n(15),c=n(503),u=n(7);!function(e){e.SyncServer="sync-server",e.P2PLocal="p2p-local",e.Udp="udp"}(o=t.SyncEngine||(t.SyncEngine={})),function(e){e.Status="status",e.BroadcastedValue="broadcasted_value",e.Closed="closed"}(a||(a={}));var f=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.eventEmitter=new s.EventEmitter}var t,n,f;return t=e,(n=[{key:"connect",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n={engine:o.SyncServer},(r="string"==typeof e?{engine:o.SyncServer,uri:e}:void 0===e?n:e).engine===o.SyncServer&&u.default({uri:r.uri}).uri(),t.next=5,this.postMessage({type:this.getMessage("connect"),engine:r.engine,serverUri:r.uri});case 5:case"end":return t.stop()}},t,this)}))}},{key:"close",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("close")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.DEFAULT_GROUP_NAME,n=arguments.length>1?arguments[1]:void 0;return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.joinGroup({groupName:t,deviceIdentification:n});case 2:case"end":return e.stop()}},e,this)}))}},{key:"joinGroup",value:function(t){var n=t.groupName,r=t.deviceIdentification;return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=null!=n?n:e.DEFAULT_GROUP_NAME,u.default({groupName:n}).required().string(),u.default({deviceIdentification:r}).string(),t.next=5,this.postMessage({type:this.getMessage("init"),groupName:n,deviceIdentification:r});case 5:case"end":return t.stop()}},t,this)}))}},{key:"leaveGroup",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.DEFAULT_GROUP_NAME;return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u.default({groupName:t}).required().string(),e.next=3,this.postMessage({type:this.getMessage("leave_group"),groupName:t});case 3:case"end":return e.stop()}},e,this)}))}},{key:"wait",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.DEFAULT_GROUP_NAME,r=arguments.length>2?arguments[2]:void 0;return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u.default({groupName:n}).required().string(),u.default({timeout:r}).number(),e.next=4,this.postMessage({type:this.getMessage("wait"),groupName:n,data:t,timeout:r});case 4:return i=e.sent,e.abrupt("return",i.responseData);case 6:case"end":return e.stop()}},e,this)}))}},{key:"cancelWait",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.DEFAULT_GROUP_NAME;return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u.default({groupName:t}).required().string(),e.next=3,this.postMessage({type:this.getMessage("cancel_wait"),groupName:t});case 3:case"end":return e.stop()}},e,this)}))}},{key:"setValue",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.DEFAULT_GROUP_NAME;return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.broadcastValue({key:t,value:n,groupName:r});case 2:case"end":return e.stop()}},e,this)}))}},{key:"broadcastValue",value:function(t){var n=t.groupName,r=t.key,o=t.value;return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=null!=n?n:e.DEFAULT_GROUP_NAME,u.default({key:r}).required().string(),u.default({groupName:n}).required().string(),t.next=5,this.postMessage({type:this.getMessage("request_set_value"),groupName:n,key:r,value:o});case 5:case"end":return t.stop()}},t,this)}))}},{key:"onValue",value:function(t){u.default({listener:t}).required().function(),this.eventEmitter.addListener(a.BroadcastedValue,function(n){t(n.key,n.value,n.groupName===e.DEFAULT_GROUP_NAME?void 0:n.groupName)})}},{key:"onStatus",value:function(t){u.default({listener:t}).required().function(),this.eventEmitter.addListener(a.Status,function(n){t({connectedPeers:n.connectedPeers,groupName:n.groupName===e.DEFAULT_GROUP_NAME?void 0:n.groupName})})}},{key:"onClosed",value:function(e){u.default({listener:e}).required().function(),this.eventEmitter.addListener(a.Closed,e)}},{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage(c.SyncMessageType.BroadcastedValue):var t=e,n={groupName:t.groupName,key:t.key,value:t.value};this.eventEmitter.emit(a.BroadcastedValue,n);break;case this.getMessage(c.SyncMessageType.Status):var r=e,i={connectedPeers:r.connectedPeers,groupName:r.groupName};this.eventEmitter.emit(a.Status,i);break;case this.getMessage(c.SyncMessageType.Closed):var o=e,s=o.error?new Error(o.error):void 0;this.eventEmitter.emit(a.Closed,s)}}},{key:"removeEventListeners",value:function(){this.eventEmitter.removeAllListeners()}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}}])&&r(t.prototype,n),f&&r(t,f),e}();t.default=f,f.MESSAGE_PREFIX="sync",f.DEFAULT_GROUP_NAME="____default____"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncMessageType=void 0,function(e){e.BroadcastedValue="set_value",e.Status="device_status",e.Closed="closed"}(t.SyncMessageType||(t.SyncMessageType={}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(15),a=n(505),s=n(7),c=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.eventEmitter=new o.EventEmitter}var t,n,c;return t=e,(n=[{key:"listStorageUnits",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("list_storage_units")});case 2:return t=e.sent,n=t.storageUnits,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"onStorageUnitsChanged",value:function(e){s.default({listener:e}).required().function(),this.eventEmitter.addListener("storage_units_changed",e)}},{key:"removeStorageUnitsChangedListener",value:function(e){s.default({listener:e}).required().function(),this.eventEmitter.removeListener("storage_units_changed",e)}},{key:"removeAllListeners",value:function(){this.eventEmitter.removeAllListeners("storage_units_changed")}},{key:"listFiles",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s.default({directoryPath:e}).required().object(a.VIFilePath),t.next=3,this.postMessage({type:this.getMessage("list_files"),directoryPath:e});case 3:return n=t.sent,r=n.files,t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}))}},{key:"exists",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s.default({filePath:e}).required().object(a.VIFilePath),t.next=3,this.postMessage({type:this.getMessage("exists"),filePath:e});case 3:return n=t.sent,r=n.exists,t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}))}},{key:"getFile",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s.default({filePath:e}).required().object(a.VIFilePath),t.next=3,this.postMessage({type:this.getMessage("get_file"),filePath:e});case 3:return n=t.sent,r=n.file,t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}))}},{key:"writeFile",value:function(e,t){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return s.default({filePath:e}).required().object(a.VIFilePath),n.next=3,this.postMessage({type:this.getMessage("write_file"),filePath:e,contents:t});case 3:case"end":return n.stop()}},n,this)}))}},{key:"appendFile",value:function(e,t){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return s.default({filePath:e}).required().object(a.VIFilePath),n.next=3,this.postMessage({type:this.getMessage("append_file"),filePath:e,contents:t});case 3:case"end":return n.stop()}},n,this)}))}},{key:"readFile",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s.default({filePath:e}).required().object(a.VIFilePath),t.next=3,this.postMessage({type:this.getMessage("read_file"),filePath:e});case 3:return n=t.sent,r=n.contents,t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}))}},{key:"copyFile",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i(this,void 0,void 0,regeneratorRuntime.mark(function r(){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return s.default({sourceFilePath:e}).required().object(a.VIFilePath),s.default({destinationFilePath:t}).required().object(a.VIFilePath),s.default({options:n}).required().object(a.VICopyFileOptions),r.next=5,this.postMessage({type:this.getMessage("copy_file"),sourceFilePath:e,destinationFilePath:t,options:n});case 5:case"end":return r.stop()}},r,this)}))}},{key:"moveFile",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i(this,void 0,void 0,regeneratorRuntime.mark(function r(){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return s.default({sourceFilePath:e}).required().object(a.VIFilePath),s.default({destinationFilePath:t}).required().object(a.VIFilePath),s.default({options:n}).required().object(a.VIMoveFileOptions),r.next=5,this.postMessage({type:this.getMessage("move_file"),sourceFilePath:e,destinationFilePath:t,options:n});case 5:case"end":return r.stop()}},r,this)}))}},{key:"deleteFile",value:function(e,t){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return s.default({filePath:e}).required().object(a.VIFilePath),s.default({recursive:t}).required().boolean(),n.next=4,this.postMessage({type:this.getMessage("delete_file"),filePath:e,recursive:t});case 4:case"end":return n.stop()}},n,this)}))}},{key:"downloadFile",value:function(e,t,n){return i(this,void 0,void 0,regeneratorRuntime.mark(function r(){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return s.default({filePath:e}).required().object(a.VIFilePath),s.default({sourceUri:t}).required().uri(),s.default({headers:n}).object(),r.next=5,this.postMessage({type:this.getMessage("download_file"),filePath:e,sourceUri:t,headers:n});case 5:case"end":return r.stop()}},r,this)}))}},{key:"extractFile",value:function(e,t,n){return i(this,void 0,void 0,regeneratorRuntime.mark(function r(){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return s.default({archiveFilePath:e}).required().object(a.VIFilePath),s.default({destinationDirectoryPath:t}).object(a.VIFilePath),s.default({method:n}).required().string(),r.next=5,this.postMessage({type:this.getMessage("extract_file"),archiveFilePath:e,destinationDirectoryPath:t,method:n});case 5:case"end":return r.stop()}},r,this)}))}},{key:"createArchive",value:function(e,t){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return s.default({archiveFilePath:e}).required().object(a.VIFilePath),s.default({archiveEntries:t}).required().array("object"),n.next=4,this.postMessage({type:this.getMessage("create_archive_file"),archiveFilePath:e,archiveEntries:t});case 4:case"end":return n.stop()}},n,this)}))}},{key:"getFileChecksum",value:function(e,t){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){var r,i;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return s.default({filePath:e}).required().object(a.VIFilePath),s.default({hashType:t}).required().string(),n.next=4,this.postMessage({type:this.getMessage("get_file_checksum"),filePath:e,hashType:t});case 4:return r=n.sent,i=r.checksum,n.abrupt("return",i);case 7:case"end":return n.stop()}},n,this)}))}},{key:"createDirectory",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s.default({directoryPath:e}).required().object(a.VIFilePath),t.next=3,this.postMessage({type:this.getMessage("create_directory"),directoryPath:e});case 3:case"end":return t.stop()}},t,this)}))}},{key:"isDirectory",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s.default({filePath:e}).required().object(a.VIFilePath),t.next=3,this.postMessage({type:this.getMessage("is_directory"),filePath:e});case 3:return n=t.sent,r=n.isDirectory,t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}))}},{key:"link",value:function(e,t){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return s.default({sourceFilePath:e}).required().object(a.VIFilePath),s.default({destinationFilePath:t}).required().object(a.VIFilePath),n.next=4,this.postMessage({type:this.getMessage("link"),sourceFilePath:e,destinationFilePath:t});case 4:case"end":return n.stop()}},n,this)}))}},{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage("storage_units_changed"):this.eventEmitter.emit("storage_units_changed")}}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}}])&&r(t.prototype,n),c&&r(t,c),e}();t.default=c,c.MESSAGE_PREFIX="file_system"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIMoveFileOptions=t.VICopyFileOptions=t.VIFilePath=t.VIStorageUnit=void 0,t.VIStorageUnit={type:"string",capacity:"number",freeSpace:"number",usableSpace:"number",removable:"boolean"},t.VIFilePath={storageUnit:{object:t.VIStorageUnit},filePath:"string"},t.VICopyFileOptions={overwrite:"?boolean"},t.VIMoveFileOptions={overwrite:"?boolean"}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(507),a=n(514),s=n(515),c=n(518),u=n(519),f=n(520),l=n(521),d=n(522),h=n(523),p=n(524),m=n(526),g=n(528),b=n(530),v=n(7),y=n(533),w=n(534),_=n(536),S=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.app=new f.default(this.getMessagePrefix(),this.postMessage),this.os=new l.default(this.getMessagePrefix(),this.postMessage),this.audio=new a.default(this.getMessagePrefix(),this.postMessage),this.debug=new d.default(this.getMessagePrefix(),this.postMessage),this.firmware=new o.default(this.getMessagePrefix(),this.postMessage),this.package=new h.default(this.getMessagePrefix(),this.postMessage),this.power=new p.default(this.getMessagePrefix(),this.postMessage),this.remoteControl=new c.default(this.getMessagePrefix(),this.postMessage),this.screen=new s.default(this.getMessagePrefix(),this.postMessage),this.time=new u.default(this.getMessagePrefix(),this.postMessage),this.network=new m.default(this.getMessagePrefix(),this.postMessage),this.wifi=new g.default(this.getMessagePrefix(),this.postMessage),this.security=new b.default(this.getMessagePrefix(),this.postMessage),this.proxy=new y.default(this.getMessagePrefix(),this.postMessage),this.autoRecovery=new _.default(this.getMessagePrefix(),this.postMessage),this.peerRecovery=new w.default(this.getMessagePrefix(),this.postMessage)}var t,n,S;return t=e,(n=[{key:"supports",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return v.default({capability:e}).required().string(),t.next=3,this.postMessage({type:this.getMessage("supports"),capability:e});case 3:return n=t.sent,r=n.supports,t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}))}},{key:"getModel",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_model")});case 2:return t=e.sent,n=t.model,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getSerialNumber",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_serial_number")});case 2:return t=e.sent,n=t.serialNumber,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getNetworkInfo",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.network.getActiveInfo();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}))}},{key:"getBatteryStatus",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_battery_status")});case 2:return t=e.sent,n=t.batteryStatus,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getTemperature",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_current_temperature")});case 2:return t=e.sent,n=t.currentTemperature,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getBrand",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_brand")});case 2:return t=e.sent,n=t.brand,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"resetSettings",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("reset_settings")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"factoryReset",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("factory_reset")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"getExtendedManagementUrl",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_extendedmanagement_url")});case 2:return t=e.sent,n=t.url,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"setExtendedManagementUrl",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return v.default({url:e}).string().canBeNull(),t.next=3,this.postMessage({type:this.getMessage("set_extendedmanagement_url"),url:e});case 3:case"end":return t.stop()}},t,this)}))}},{key:"getMessage",value:function(e){return this.getMessagePrefix()+"."+e}},{key:"getMessagePrefix",value:function(){return this.messagePrefix+"."+e.MESSAGE_PREFIX}}])&&r(t.prototype,n),S&&r(t,S),e}();t.default=S,S.MESSAGE_PREFIX="management"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(203),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,a;return t=e,(n=[{key:"upgrade",value:function(e,t){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){var r,i,a,s;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=o.parseUpgradeArguments(e,t),i=r.baseUrl,a=r.version,s=r.directUri,n.next=3,this.postMessage({type:this.getMessage("firmware_upgrade"),baseUrl:i,version:a,directUri:s});case 3:case"end":return n.stop()}},n,this)}))}},{key:"getVersion",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_firmware_version")});case 2:return t=e.sent,n=t.firmwareVersion,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getType",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_firmware_type")});case 2:return t=e.sent,n=t.firmwareType,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a},function(e,t,n){"use strict";var r=n(509),i=n(510);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=y,t.resolve=function(e,t){return y(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?y(e,!1,!0).resolveObject(t):t},t.format=function(e){i.isString(e)&&(e=y(e));return e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(u),l=["%","/","?",";","#"].concat(f),d=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=n(511);function y(e,t,n){if(e&&i.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}o.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),s=-1!==o&&o<e.indexOf("#")?"?":"#",u=e.split(s);u[0]=u[0].replace(/\\/g,"/");var y=e=u.join(s);if(y=y.trim(),!n&&1===e.split("#").length){var w=c.exec(y);if(w)return this.path=y,this.href=y,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?v.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var _=a.exec(y);if(_){var S=(_=_[0]).toLowerCase();this.protocol=S,y=y.substr(_.length)}if(n||_||y.match(/^\/\/[^@\/]+@[^@\/]+/)){var k="//"===y.substr(0,2);!k||_&&g[_]||(y=y.substr(2),this.slashes=!0)}if(!g[_]&&(k||_&&!b[_])){for(var E,x,M=-1,I=0;I<d.length;I++){-1!==(C=y.indexOf(d[I]))&&(-1===M||C<M)&&(M=C)}-1!==(x=-1===M?y.lastIndexOf("@"):y.lastIndexOf("@",M))&&(E=y.slice(0,x),y=y.slice(x+1),this.auth=decodeURIComponent(E)),M=-1;for(I=0;I<l.length;I++){var C;-1!==(C=y.indexOf(l[I]))&&(-1===M||C<M)&&(M=C)}-1===M&&(M=y.length),this.host=y.slice(0,M),y=y.slice(M),this.parseHost(),this.hostname=this.hostname||"";var R="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!R)for(var P=this.hostname.split(/\./),O=(I=0,P.length);I<O;I++){var j=P[I];if(j&&!j.match(h)){for(var A="",T=0,N=j.length;T<N;T++)j.charCodeAt(T)>127?A+="x":A+=j[T];if(!A.match(h)){var F=P.slice(0,I),D=P.slice(I+1),L=j.match(p);L&&(F.push(L[1]),D.unshift(L[2])),D.length&&(y="/"+D.join(".")+y),this.hostname=F.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=r.toASCII(this.hostname));var W=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+W,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!m[S])for(I=0,O=f.length;I<O;I++){var B=f[I];if(-1!==y.indexOf(B)){var H=encodeURIComponent(B);H===B&&(H=escape(B)),y=y.split(B).join(H)}}var U=y.indexOf("#");-1!==U&&(this.hash=y.substr(U),y=y.slice(0,U));var V=y.indexOf("?");if(-1!==V?(this.search=y.substr(V),this.query=y.substr(V+1),t&&(this.query=v.parse(this.query)),y=y.slice(0,V)):t&&(this.search="",this.query={}),y&&(this.pathname=y),b[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){W=this.pathname||"";var G=this.search||"";this.path=W+G}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,a="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(a=v.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||b[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+o+(n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(s=s.replace("#","%23"))+r},o.prototype.resolve=function(e){return this.resolveObject(y(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var n=new o,r=Object.keys(this),a=0;a<r.length;a++){var s=r[a];n[s]=this[s]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var c=Object.keys(e),u=0;u<c.length;u++){var f=c[u];"protocol"!==f&&(n[f]=e[f])}return b[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!b[e.protocol]){for(var l=Object.keys(e),d=0;d<l.length;d++){var h=l[d];n[h]=e[h]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||g[e.protocol])n.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",v=n.search||"";n.path=m+v}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var y=n.pathname&&"/"===n.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=w||y||n.host&&e.pathname,S=_,k=n.pathname&&n.pathname.split("/")||[],E=(p=e.pathname&&e.pathname.split("/")||[],n.protocol&&!b[n.protocol]);if(E&&(n.hostname="",n.port=null,n.host&&(""===k[0]?k[0]=n.host:k.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),_=_&&(""===p[0]||""===k[0])),w)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,k=p;else if(p.length)k||(k=[]),k.pop(),k=k.concat(p),n.search=e.search,n.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(E)n.hostname=n.host=k.shift(),(R=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=R.shift(),n.host=n.hostname=R.shift());return n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!k.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var x=k.slice(-1)[0],M=(n.host||e.host||k.length>1)&&("."===x||".."===x)||""===x,I=0,C=k.length;C>=0;C--)"."===(x=k[C])?k.splice(C,1):".."===x?(k.splice(C,1),I++):I&&(k.splice(C,1),I--);if(!_&&!S)for(;I--;I)k.unshift("..");!_||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),M&&"/"!==k.join("/").substr(-1)&&k.push("");var R,P=""===k[0]||k[0]&&"/"===k[0].charAt(0);E&&(n.hostname=n.host=P?"":k.length?k.shift():"",(R=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=R.shift(),n.host=n.hostname=R.shift()));return(_=_||n.host&&k.length)&&!P&&k.unshift(""),k.length?n.pathname=k.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){(function(e,r){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var s,c=2147483647,u=36,f=1,l=26,d=38,h=700,p=72,m=128,g="-",b=/^xn--/,v=/[^\x20-\x7E]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=u-f,S=Math.floor,k=String.fromCharCode;function E(e){throw new RangeError(w[e])}function x(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function M(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+x((e=e.replace(y,".")).split("."),t).join(".")}function I(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function C(e){return x(e,function(e){var t="";return e>65535&&(t+=k((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=k(e)}).join("")}function R(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function P(e,t,n){var r=0;for(e=n?S(e/h):e>>1,e+=S(e/t);e>_*l>>1;r+=u)e=S(e/_);return S(r+(_+1)*e/(e+d))}function O(e){var t,n,r,i,o,a,s,d,h,b,v,y=[],w=e.length,_=0,k=m,x=p;for((n=e.lastIndexOf(g))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&E("not-basic"),y.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<w;){for(o=_,a=1,s=u;i>=w&&E("invalid-input"),((d=(v=e.charCodeAt(i++))-48<10?v-22:v-65<26?v-65:v-97<26?v-97:u)>=u||d>S((c-_)/a))&&E("overflow"),_+=d*a,!(d<(h=s<=x?f:s>=x+l?l:s-x));s+=u)a>S(c/(b=u-h))&&E("overflow"),a*=b;x=P(_-o,t=y.length+1,0==o),S(_/t)>c-k&&E("overflow"),k+=S(_/t),_%=t,y.splice(_++,0,k)}return C(y)}function j(e){var t,n,r,i,o,a,s,d,h,b,v,y,w,_,x,M=[];for(y=(e=I(e)).length,t=m,n=0,o=p,a=0;a<y;++a)(v=e[a])<128&&M.push(k(v));for(r=i=M.length,i&&M.push(g);r<y;){for(s=c,a=0;a<y;++a)(v=e[a])>=t&&v<s&&(s=v);for(s-t>S((c-n)/(w=r+1))&&E("overflow"),n+=(s-t)*w,t=s,a=0;a<y;++a)if((v=e[a])<t&&++n>c&&E("overflow"),v==t){for(d=n,h=u;!(d<(b=h<=o?f:h>=o+l?l:h-o));h+=u)x=d-b,_=u-b,M.push(k(R(b+x%_,0))),d=S(x/_);M.push(k(R(d,0))),o=P(n,w,r==i),n=0,++r}++n,++t}return M.join("")}s={version:"1.4.1",ucs2:{decode:I,encode:C},decode:O,encode:j,toASCII:function(e){return M(e,function(e){return v.test(e)?"xn--"+j(e):e})},toUnicode:function(e){return M(e,function(e){return b.test(e)?O(e.slice(4).toLowerCase()):e})}},void 0===(i=function(){return s}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(182)(e),n(38))},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(512),t.encode=t.stringify=n(513)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var c=1e3;o&&"number"==typeof o.maxKeys&&(c=o.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var f=0;f<u;++f){var l,d,h,p,m=e[f].replace(s,"%20"),g=m.indexOf(n);g>=0?(l=m.substr(0,g),d=m.substr(g+1)):(l=m,d=""),h=decodeURIComponent(l),p=decodeURIComponent(d),r(a,h)?i(a[h])?a[h].push(p):a[h]=[a[h],p]:a[h]=p}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?o(a(e),function(a){var s=encodeURIComponent(r(a))+n;return i(e[a])?o(e[a],function(e){return s+encodeURIComponent(r(e))}).join(t):s+encodeURIComponent(r(e[a]))}).join(t):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var a=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,a;return t=e,(n=[{key:"getVolume",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_volume")});case 2:return t=e.sent,n=t.volume,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"setVolume",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o.default({volume:e}).required().number().min(0).max(100),t.next=3,this.postMessage({type:this.getMessage("set_volume"),volume:e});case 3:case"end":return t.stop()}},t,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(516),a=n(517),s=n(7),c=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,c;return t=e,(n=[{key:"resize",value:function(e,t,n,r,c){return i(this,void 0,void 0,regeneratorRuntime.mark(function i(){return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(s.default({baseUrl:e}).required().uri(),s.default({currentVersion:r}).required().string(),void 0!==o.Orientation[t]){i.next=4;break}throw new Error("Invalid orientation");case 4:if(void 0!==o.Resolution[n]){i.next=6;break}throw new Error("Invalid resolution");case 6:if(!c||void 0!==a.Orientation[c]){i.next=8;break}throw new Error("Invalid video orientation");case 8:return i.next=10,this.postMessage({type:this.getMessage("resize_screen"),baseUrl:e,orientation:t,resolution:n,currentVersion:r,videoOrientation:c});case 10:case"end":return i.stop()}},i,this)}))}},{key:"getOrientation",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_screen_orientation")});case 2:return t=e.sent,n=t.screenOrientation,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"setBrightness",value:function(e,t,n,r){return i(this,void 0,void 0,regeneratorRuntime.mark(function i(){return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return s.default({brightness1:t}).required().number().min(0).max(100),s.default({brightness2:r}).required().number().min(0).max(100),s.default({timeFrom1:e}).canBeNull().required().string().matchRegExp(/\d{2}:\d{2}/).timerTime(),s.default({timeFrom2:n}).canBeNull().required().string().matchRegExp(/\d{2}:\d{2}/).timerTime(),i.next=6,this.postMessage({type:this.getMessage("set_screen_brightness"),timeFrom1:e,brightness1:t,timeFrom2:n,brightness2:r});case 6:case"end":return i.stop()}},i,this)}))}},{key:"getBrightness",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_screen_brightness")});case 2:return t=e.sent,n=t.screenBrightness,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"takeAndUploadScreenshot",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s.default({uploadBaseUrl:e}).required().uri(),t.next=3,this.postMessage({type:this.getMessage("upload_screenshot"),uploadBaseUrl:e});case 3:return n=t.sent,r=n.screenshotUrl,t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}))}},{key:"powerOn",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("power_on_display")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"powerOff",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("power_off_display")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"isPoweredOn",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_is_display_power_on")});case 2:return t=e.sent,n=t.isDisplayPowerOn,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getMessage",value:function(e){return this.getMessagePrefix()+"."+e}},{key:"getMessagePrefix",value:function(){return this.messagePrefix}}])&&r(t.prototype,n),c&&r(t,c),e}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Orientation=t.Resolution=void 0,function(e){e[e.FULL_HD=0]="FULL_HD",e[e.HD_READY=1]="HD_READY"}(t.Resolution||(t.Resolution={})),function(e){e[e.LANDSCAPE=0]="LANDSCAPE",e[e.PORTRAIT=1]="PORTRAIT",e[e.LANDSCAPE_FLIPPED=2]="LANDSCAPE_FLIPPED",e[e.PORTRAIT_FLIPPED=3]="PORTRAIT_FLIPPED",e[e.AUTO=4]="AUTO"}(t.Orientation||(t.Orientation={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Orientation=void 0,function(e){e[e.LANDSCAPE=0]="LANDSCAPE",e[e.LANDSCAPE_FLIPPED=1]="LANDSCAPE_FLIPPED"}(t.Orientation||(t.Orientation={}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,o;return t=e,(n=[{key:"enable",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setEnabled(!0);case 2:case"end":return e.stop()}},e,this)}))}},{key:"disable",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setEnabled(!1);case 2:case"end":return e.stop()}},e,this)}))}},{key:"isEnabled",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_is_remote_control_enabled")});case 2:return t=e.sent,n=t.isRemoteControlEnabled,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"lock",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.disable();case 2:case"end":return e.stop()}},e,this)}))}},{key:"unlock",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.enable();case 2:case"end":return e.stop()}},e,this)}))}},{key:"isLocked",value:function(){return this.isEnabled()}},{key:"setEnabled",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.postMessage({type:this.getMessage("set_remote_control_enabled"),enabled:e});case 2:case"end":return t.stop()}},t,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a={year:"number",month:"number",day:"number",hour:"number",minute:"number",second:"number"},s=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,s;return t=e,(n=[{key:"get",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_current_time_with_timezone")});case 2:return t=e.sent,n=t.currentTimeWithTimezone,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"set",value:function(e,t){return this.setManual(e,t)}},{key:"setManual",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n,r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t[0],r=t[1],n instanceof Date?o.default({currentDate:n}).required().date():o.default({currentDate:n}).required().object(a),o.default({timezone:r}).required().string(),e.next=5,this.postMessage({type:this.getMessage("set_current_time_with_timezone"),currentDate:n,timezone:r});case 5:case"end":return e.stop()}},e,this)}))}},{key:"setNTP",value:function(e,t){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return o.default({ntpServer:e}).required().string(),o.default({timezone:t}).required().string(),n.next=4,this.postMessage({type:this.getMessage("set_ntp_time_with_timezone"),ntpServer:e,timezone:t});case 4:case"end":return n.stop()}},n,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),s&&r(t,s),e}();t.default=s},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(203),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,a;return t=e,(n=[{key:"getType",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_application_type")});case 2:return t=e.sent,n=t.applicationType,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getVersion",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_application_version")});case 2:return t=e.sent,n=t.applicationVersion,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"upgrade",value:function(e,t){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){var r,i,a,s;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=o.parseUpgradeArguments(e,t),i=r.baseUrl,a=r.version,s=r.directUri,n.next=3,this.postMessage({type:this.getMessage("app_upgrade"),baseUrl:i,version:a,directUri:s});case 3:case"end":return n.stop()}},n,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,o;return t=e,(n=[{key:"getInfo",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_os_info")});case 2:return t=e.sent,n=t.osInfo,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getCpuUsage",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_cpu_usage")});case 2:return t=e.sent,n=t.cpuUsage,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getMemoryUsage",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_memory_usage")});case 2:return t=e.sent,n=t.memoryUsage,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,a;return t=e,(n=[{key:"enable",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setDebug(!0);case 2:case"end":return e.stop()}},e,this)}))}},{key:"disable",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setDebug(!1);case 2:case"end":return e.stop()}},e,this)}))}},{key:"isEnabled",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("is_enabled")});case 2:return t=e.sent,n=t.isEnabled,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"setDebug",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o.default({enabled:e}).required().boolean(),t.next=3,this.postMessage({type:this.getMessage("set_debug"),enabled:e});case 3:case"end":return t.stop()}},t,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,a;return t=e,(n=[{key:"install",value:function(e,t,n,r){return i(this,void 0,void 0,regeneratorRuntime.mark(function i(){return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return o.default({baseUrl:e}).required().uri(),o.default({packageName:t}).required().string(),o.default({version:n}).required().string(),o.default({build:r}).canBeNull().required().string(),i.next=6,this.postMessage({type:this.getMessage("install_package"),baseUrl:e,packageName:t,version:n,build:r});case 6:case"end":return i.stop()}},i,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(525),a=n(7),s=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,s;return t=e,(n=[{key:"systemReboot",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("reboot_system")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"appRestart",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("restart_app")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"getTimers",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_timers")});case 2:return t=e.sent,n=t.timers,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"setTimer",value:function(e,t,n,r,s){return i(this,void 0,void 0,regeneratorRuntime.mark(function i(){var c,u,f,l,d,h;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(void 0!==o.TimerType[e]){i.next=2;break}throw new Error("Invalid timer type");case 2:a.default({timeOn:t}).canBeNull().required().string().matchRegExp(/\d{2}:\d{2}:\d{2}/).timerTime(),a.default({timeOff:n}).canBeNull().required().string().matchRegExp(/\d{2}:\d{2}:\d{2}/).timerTime(),a.default({weekdays:r}).required().array("string"),a.default({volume:s}).required().number().min(0).max(100),c=!0,u=!1,f=void 0,i.prev=9,l=r[Symbol.iterator]();case 11:if(c=(d=l.next()).done){i.next=18;break}if(h=d.value,void 0!==o.TimerWeekday[h]){i.next=15;break}throw new Error("Invalid timer weekday");case 15:c=!0,i.next=11;break;case 18:i.next=24;break;case 20:i.prev=20,i.t0=i.catch(9),u=!0,f=i.t0;case 24:i.prev=24,i.prev=25,c||null==l.return||l.return();case 27:if(i.prev=27,!u){i.next=30;break}throw f;case 30:return i.finish(27);case 31:return i.finish(24);case 32:return i.next=34,this.postMessage({type:this.getMessage("set_timer"),timerType:e,timeOn:t,timeOff:n,weekdays:r,volume:s});case 34:case"end":return i.stop()}},i,this,[[9,20,24,32],[25,,27,31]])}))}},{key:"unsetTimer",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===o.TimerType[e]&&console.warn("Invalid timer type"),t.next=3,this.setTimer(e,null,null,[],0);case 3:case"end":return t.stop()}},t,this)}))}},{key:"getProprietaryTimers",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_proprietary_timers")});case 2:return t=e.sent,n=t.timers,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"setProprietaryTimer",value:function(e,t,n,r){var s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return i(this,void 0,void 0,regeneratorRuntime.mark(function i(){var c,u,f,l,d,h;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:a.default({type:e}).required().string().matchRegExp(/^TIMER_\d+$/),a.default({timeOn:t}).canBeNull().required().string().matchRegExp(/\d{2}:\d{2}:\d{2}/).timerTime(),a.default({timeOff:n}).canBeNull().required().string().matchRegExp(/\d{2}:\d{2}:\d{2}/).timerTime(),a.default({weekdays:r}).required().array("string"),a.default({keepAppletRunning:s}).required().boolean(),c=!0,u=!1,f=void 0,i.prev=8,l=r[Symbol.iterator]();case 10:if(c=(d=l.next()).done){i.next=17;break}if(h=d.value,void 0!==o.TimerWeekday[h]){i.next=14;break}throw new Error("Invalid timer weekday");case 14:c=!0,i.next=10;break;case 17:i.next=23;break;case 19:i.prev=19,i.t0=i.catch(8),u=!0,f=i.t0;case 23:i.prev=23,i.prev=24,c||null==l.return||l.return();case 26:if(i.prev=26,!u){i.next=29;break}throw f;case 29:return i.finish(26);case 30:return i.finish(23);case 31:return i.next=33,this.postMessage({type:this.getMessage("set_proprietary_timer"),timerType:e,timeOn:t,timeOff:n,weekdays:r,keepAppletRunning:s});case 33:case"end":return i.stop()}},i,this,[[8,19,23,31],[24,,26,30]])}))}},{key:"unsetProprietaryTimer",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.postMessage({type:this.getMessage("delete_proprietary_timer"),timerType:e});case 3:t.next=9;break;case 5:return t.prev=5,t.t0=t.catch(0),t.next=9,this.setProprietaryTimer(e,null,null,[]);case 9:case"end":return t.stop()}},t,this,[[0,5]])}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),s&&r(t,s),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimerWeekday=t.TimerType=void 0,function(e){e[e.TIMER_1=0]="TIMER_1",e[e.TIMER_2=1]="TIMER_2",e[e.TIMER_3=2]="TIMER_3",e[e.TIMER_4=3]="TIMER_4",e[e.TIMER_5=4]="TIMER_5",e[e.TIMER_6=5]="TIMER_6",e[e.TIMER_7=6]="TIMER_7"}(t.TimerType||(t.TimerType={})),function(e){e[e.sun=0]="sun",e[e.mon=1]="mon",e[e.tue=2]="tue",e[e.wed=3]="wed",e[e.thu=4]="thu",e[e.fri=5]="fri",e[e.sat=6]="sat"}(t.TimerWeekday||(t.TimerWeekday={}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(527),a=n(7),s=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,s;return t=e,(n=[{key:"getActiveInfo",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_network_info")});case 2:return t=e.sent,n=t.networkInfo,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"listInterfaces",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_network_interfaces")});case 2:return t=e.sent,n=t.interfaces,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"setManual",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n,r,i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("string"!=typeof t[0]){e.next=8;break}return n=t[0],r=t[1],a.default({interfaceName:n}).required().string(),a.default({options:r}).required().object(o.VINetworkOptions),e.next=6,this.postMessage({type:this.getMessage("set_network_manual_v2"),interfaceName:n,options:r});case 6:e.next=12;break;case 8:return i=t[0],a.default({options:i}).required().object(o.VINetworkOptionsLegacy),e.next=12,this.postMessage({type:this.getMessage("set_network_manual"),options:i});case 12:case"end":return e.stop()}},e,this)}))}},{key:"setDHCP",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n,r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("ethernet"!==t[0]&&"wifi"!==t[0]){e.next=7;break}return n=t[0],a.default({networkInterface:n}).required().string(o.VNetworkInterface),e.next=5,this.postMessage({type:this.getMessage("set_network_dhcp"),networkInterface:n});case 5:e.next=11;break;case 7:return r=t[0],a.default({interfaceName:r}).required().string(),e.next=11,this.postMessage({type:this.getMessage("set_network_dhcp_v2"),interfaceName:r});case 11:case"end":return e.stop()}},e,this)}))}},{key:"disableInterface",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return a.default({interfaceName:e}).required().string(),t.next=3,this.postMessage({type:this.getMessage("disable_network_interface"),interfaceName:e});case 3:case"end":return t.stop()}},t,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),s&&r(t,s),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VINetworkOptions=t.VINetworkOptionsLegacy=t.VNetworkInterface=void 0,t.VNetworkInterface=["wifi","ethernet"],t.VINetworkOptionsLegacy={interface:{string:t.VNetworkInterface},localAddress:"string",gateway:"string",netmask:"string",dns:{array:"string"}},t.VINetworkOptions={localAddress:"string",gateway:"string",netmask:"string",dns:{array:"string"}}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.VIWifiConnectOptions=void 0;var o=n(15),a=n(529),s=n(7);t.VIWifiConnectOptions={hidden:"?boolean"};var c=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.eventEmitter=new o.EventEmitter}var n,c,u;return n=e,(c=[{key:"isClientEnabled",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("is_enabled")});case 2:return t=e.sent,n=t.isWifiEnabled,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"enableClient",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("enable")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"isAPEnabled",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("is_ap_enabled")});case 2:return t=e.sent,n=t.isWifiAPEnabled,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"enableAP",value:function(e,t){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return s.default({ssid:e}).required().string(),s.default({password:t}).required().string(),n.next=4,this.postMessage({type:this.getMessage("enable_ap"),ssid:e,password:t});case 4:case"end":return n.stop()}},n,this)}))}},{key:"disable",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("disable")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"getConnectedTo",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_connected_to")});case 2:return t=e.sent,e.abrupt("return",t||null);case 4:case"end":return e.stop()}},e,this)}))}},{key:"connect",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i(this,void 0,void 0,regeneratorRuntime.mark(function i(){return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return s.default({ssid:e}).required().string(),s.default({password:n}).string(),s.default({options:r}).object(t.VIWifiConnectOptions),i.next=5,this.postMessage({type:this.getMessage("connect"),ssid:e,password:n,options:r});case 5:case"end":return i.stop()}},i,this)}))}},{key:"disconnect",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("disconnect")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"getCountry",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_country")});case 2:return t=e.sent,n=t.countryCode,e.abrupt("return",n||null);case 5:case"end":return e.stop()}},e,this)}))}},{key:"setCountry",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s.default({countryCode:e}).required().string(),t.next=3,this.postMessage({type:this.getMessage("set_country"),countryCode:e});case 3:case"end":return t.stop()}},t,this)}))}},{key:"scanDevices",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("scan")});case 2:return t=e.sent,n=t.devices,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"on",value:function(e,t){this.eventEmitter.on(e,t)}},{key:"once",value:function(e,t){this.eventEmitter.once(e,t)}},{key:"removeListener",value:function(e,t){this.eventEmitter.removeListener(e,t)}},{key:"removeAllListeners",value:function(e){e?this.eventEmitter.removeAllListeners(e):this.eventEmitter.removeAllListeners()}},{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage("event_"+a.WifiEvent.CLIENT_ENABLED):case this.getMessage("event_"+a.WifiEvent.CLIENT_CONNECTED):case this.getMessage("event_"+a.WifiEvent.CLIENT_CONNECT_REJECTED):case this.getMessage("event_"+a.WifiEvent.CLIENT_DISCONNECTED):case this.getMessage("event_"+a.WifiEvent.AP_ENABLED):case this.getMessage("event_"+a.WifiEvent.DISABLED):var t=this.getMessage("event_"),n=e.type.substring(t.length);this.eventEmitter.emit(n)}}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}}])&&r(n.prototype,c),u&&r(n,u),e}();t.default=c,c.MESSAGE_PREFIX="wifi"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WifiEvent=void 0,function(e){e.CLIENT_ENABLED="client_enabled",e.CLIENT_CONNECTED="client_connected",e.CLIENT_CONNECT_REJECTED="client_connect_rejected",e.CLIENT_DISCONNECTED="client_disconnected",e.AP_ENABLED="ap_enabled",e.DISABLED="disabled"}(t.WifiEvent||(t.WifiEvent={}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(531),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,a;return t=e,(n=[{key:"getPinCode",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_pin_code")});case 2:return t=e.sent,n=t.pinCode,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"setPinCode",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o.validatePinCode(e),t.next=3,this.postMessage({type:this.getMessage("set_pin_code"),pinCode:e});case 3:case"end":return t.stop()}},t,this)}))}},{key:"generateRandomPinCode",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setPinCode(o.generateRandomPin());case 2:case"end":return e.stop()}},e,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validatePinCode=t.generateRandomPin=void 0;var r=n(532),i=n(40),o=n(128);t.generateRandomPin=function(){return Math.floor(1e4*Math.random()).toString().padStart(4,"0")},t.validatePinCode=function(e){if(!e.match(/^\d{4}$/))throw new r.default({kind:"appletSecurityError",message:"Invalid PIN code: ".concat(e),code:i.default.SECURITY_PIN_CODE_INVALID,suggestion:o.default.SECURITY_PIN_CODE_FORMAT})}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(52),c=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,o(t).call(this,Object.assign(Object.assign({},e),{pathToDocs:t.PATH_TO_DOCS,kind:"appletError",type:e.type?e.type:"AppletSecurityError"})))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,s["default"]),t}();t.default=c,c.PATH_TO_DOCS="/api/js/management/12-js-management-security"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,o;return t=e,(n=[{key:"isEnabled",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("proxy_is_enabled")});case 2:return t=e.sent,n=t.isEnabled,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"setManual",value:function(e,t,n,r){return i(this,void 0,void 0,regeneratorRuntime.mark(function i(){return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.postMessage({type:this.getMessage("proxy_set_manual"),uri:e,port:t,username:n,password:r});case 2:case"end":return i.stop()}},i,this)}))}},{key:"disable",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("proxy_disable")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"getConnectedTo",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("proxy_get_connected_to")});case 2:return t=e.sent,n=t.connectedTo,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(535),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,a;return t=e,(n=[{key:"get",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_peer_recovery")});case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}},e,this)}))}},{key:"set",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o.validatePeerRecoveryConfiguration(e),t.next=3,this.postMessage(Object.assign({type:this.getMessage("set_peer_recovery")},e));case 3:case"end":return t.stop()}},t,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validatePeerRecoveryConfiguration=void 0;var r=n(7);t.validatePeerRecoveryConfiguration=function(e){var t=r.default({configuration:e}).setError(new Error("Invalid peer recovery configuration")).required();e.enabled?t.object({enabled:"boolean",urlLauncherAddress:"string"}):t.object({enabled:"boolean",autoEnableTimeoutMs:"?number"})}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(537),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,a;return t=e,(n=[{key:"get",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_auto_recovery")});case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}},e,this)}))}},{key:"set",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o.validateAutoRecoveryConfiguration(e),t.next=3,this.postMessage(Object.assign({type:this.getMessage("set_auto_recovery")},e));case 3:case"end":return t.stop()}},t,this)}))}},{key:"getMessage",value:function(e){return this.messagePrefix+"."+e}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAutoRecoveryConfiguration=void 0;var r=n(7);t.validateAutoRecoveryConfiguration=function(e){var t=r.default({configuration:e}).setError(new Error("Invalid auto recovery configuration")).required();e.enabled?t.object({enabled:"boolean",healthcheckIntervalMs:"number"}):t.object({enabled:"boolean",autoEnableTimeoutMs:"?number"})}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,o;return t=e,(n=[{key:"getList",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("get_list")});case 2:return t=e.sent,n=t.monitors,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}))}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}}])&&r(t.prototype,n),o&&r(t,o),e}();o.MESSAGE_PREFIX="monitors",t.default=o},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(540),o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.proximity=new i.default(this.getMessagePrefix())}var t,n,o;return t=e,(n=[{key:"handleMessageData",value:function(e){this.proximity.handleMessageData(e)}},{key:"getMessagePrefix",value:function(){return this.messagePrefix+"."+e.MESSAGE_PREFIX}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o,o.MESSAGE_PREFIX="sensors"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(15),o=n(7),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.lastDetected=!1,this.eventEmitter=new i.EventEmitter}var t,n,a;return t=e,(n=[{key:"onStateChange",value:function(e){var t=this;return o.default({callback:e}).required().function(),this.lastDetected&&e(this.lastDetected),this.eventEmitter.addListener("change",e),function(){return t.eventEmitter.removeListener("change",e)}}},{key:"handleMessageData",value:function(e){switch(e.type){case this.getMessage("change"):e.detected!==this.lastDetected&&(this.lastDetected=e.detected,this.eventEmitter.emit("change",e.detected))}}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a,a.MESSAGE_PREFIX="proximity"},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.createExchange=void 0,t.createExchange=function e(t,n){var i=this,o=function(e){return[t,e].join(".")};return{messageNameToType:o,postMessage:function(e){return r(i,void 0,void 0,regeneratorRuntime.mark(function t(){var r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=o(e.type),e=Object.assign(Object.assign({},e),{type:r}),t.abrupt("return",n(e));case 3:case"end":return t.stop()}},t)}))},createNamespaced:function(t){return e(o(t),n)}}}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,o;return t=e,(n=[{key:"showOSD",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.postMessage({type:this.getMessage("show_osd")});case 2:case"end":return e.stop()}},e,this)}))}},{key:"getMessage",value:function(t){return this.messagePrefix+"."+e.MESSAGE_PREFIX+"."+t}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o,o.MESSAGE_PREFIX="osd"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a=n(544),s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.commandApi=t}var t,n,s;return t=e,(n=[{key:"recordItemPlayed",value:function(e){var t=e.name,n=e.customId,r=e.type,s=e.tags,c=e.fileName,u=e.playbackSuccess,f=e.errorMessage;return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o.default({name:t}).required().string(),o.default({customId:n}).string(),o.default({type:r}).string(["video","image","html","custom"]),o.default({tags:s}).array("string"),o.default({fileName:c}).string(),o.default({playbackSuccess:u}).boolean(),o.default({errorMessage:f}).string(),e.next=9,this.commandApi.dispatch({type:a.default.ItemPlayed,itemName:t,customId:n,itemType:r,itemTags:s,fileName:c,playbackSuccess:u,errorMessage:f});case 9:case"end":return e.stop()}},e,this)}))}}])&&r(t.prototype,n),s&&r(t,s),e}();t.default=s},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.ItemPlayed="PoP.ItemPlayed"}(r||(r={})),t.default=r},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(546),o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n,this.mdc=new i.default(this.getMessagePrefix(),this.postMessage)}var t,n,o;return t=e,(n=[{key:"getMessagePrefix",value:function(){return this.messagePrefix+"."+e.MESSAGE_PREFIX}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o,o.MESSAGE_PREFIX="native_commands"},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messagePrefix=t,this.postMessage=n}var t,n,a;return t=e,(n=[{key:"sendOne",value:function(e,t,n){return i(this,void 0,void 0,regeneratorRuntime.mark(function r(){var i,a;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return o.default({ipAddress:e}).required().string(),o.default({command:t}).required().number(),void 0!==n&&o.default({data:n}).required().array("number"),void 0===n&&(n=[]),r.next=6,this.postMessage({type:this.getMessage("send_one"),ipAddress:e,command:t,data:n});case 6:return i=r.sent,a=i.commandResponse,r.abrupt("return",a);case 9:case"end":return r.stop()}},r,this)}))}},{key:"getMessage",value:function(e){return this.getMessagePrefix()+"."+e}},{key:"getMessagePrefix",value:function(){return this.messagePrefix+"."+e.MESSAGE_PREFIX}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a,a.MESSAGE_PREFIX="mdc"},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});var a=n(548),s=n(549),c=n(550),u=n(551),f=n(552),l=n(553),d=n(554),h=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.frontApplet=t,this.frontApplet.command.onCommand(function(e){e.command.type===a.EnableMonitoring&&(n.frontApplet.config.sosMonitoring=!0)}),this.frontApplet.command.onCommand(function(e){e.command.type===a.DisableMonitoring&&(n.frontApplet.config.sosMonitoring=!1)}),this.handleTimingLoaded(),this.handleHtmlSnapshotTakingRequests(),this.interceptConsoleLogging(),this.handleOfflineCacheFilesRequests(),this.handleVideoStatesChanges(),this.handleFileSystemRequests()}var t,n,h;return t=e,(n=[{key:"onCommand",value:function(e){var t=this;this.frontApplet.command.onCommand(function(n){"object"===r(t.frontApplet.config)&&t.frontApplet.config.sosMonitoring&&e(n)})}},{key:"dispatch",value:function(e){"object"===r(this.frontApplet.config)&&this.frontApplet.config.sosMonitoring&&this.frontApplet.command.dispatch(e)}},{key:"handleTimingLoaded",value:function(){return o(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.frontApplet.onReady();case 2:this.dispatch({type:s.TimingLoaded});case 3:case"end":return e.stop()}},e,this)}))}},{key:"handleHtmlSnapshotTakingRequests",value:function(){var e=this;this.onCommand(function(t){switch(t.command.type){case c.TakeHtmlSnapshot:e.dispatch({type:c.HtmlSnapshotTaken,html:e.frontApplet.window.document.documentElement.outerHTML})}})}},{key:"interceptConsoleLogging",value:function(){var e=this,t=console.log;console.log=function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t.apply(console,r),e.dispatch({type:u.ConsoleLogged,level:"log",messages:r})};var n=console.error;console.error=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];n.apply(console,r),e.dispatch({type:u.ConsoleLogged,level:"error",messages:r})};var r=console.warn;console.warn=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];r.apply(console,n),e.dispatch({type:u.ConsoleLogged,level:"warn",messages:n})};var i=console.info;console.info=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];i.apply(console,n),e.dispatch({type:u.ConsoleLogged,level:"info",messages:n})};var o=console.debug;console.debug=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];o.apply(console,n),e.dispatch({type:u.ConsoleLogged,level:"debug",messages:n})}}},{key:"handleFileSystemRequests",value:function(){var e=this;this.onCommand(function(t){return o(e,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.command.type,e.next=e.t0===d.FileSystemListOfStorageUnitsRequest?3:e.t0===d.FileSystemListFilesRequest?11:e.t0===d.FileSystemGetFileRequest?19:e.t0===d.FileSystemExistsRequest?27:e.t0===d.FileSystemDownloadFileRequest?35:e.t0===d.FileSystemDeleteFileRequest?43:e.t0===d.FileSystemMoveFileRequest?51:e.t0===d.FileSystemGetFileChecksumRequest?59:e.t0===d.FileSystemExtractFileRequest?67:e.t0===d.FileSystemCreateDirectoryRequest?75:e.t0===d.FileSystemCreateArchiveFileRequest?83:e.t0===d.FileSystemIsDirectoryRequest?91:e.t0===d.FileSystemCopyFileRequest?99:e.t0===d.FileSystemWriteFileRequest?107:e.t0===d.FileSystemAppendFileRequest?115:e.t0===d.FileSystemReadFileRequest?123:131;break;case 3:return e.t1=this,e.t2=d.FileSystemListOfStorageUnitsResult,e.next=7,this.frontApplet.fileSystem.listStorageUnits();case 7:return e.t3=e.sent,e.t4={type:e.t2,storageUnits:e.t3},e.t1.dispatch.call(e.t1,e.t4),e.abrupt("break",131);case 11:return e.t5=this,e.t6=d.FileSystemListFilesResult,e.next=15,this.frontApplet.fileSystem.listFiles(t.command.filePath);case 15:return e.t7=e.sent,e.t8={type:e.t6,pathList:e.t7},e.t5.dispatch.call(e.t5,e.t8),e.abrupt("break",131);case 19:return e.t9=this,e.t10=d.FileSystemGetFileResult,e.next=23,this.frontApplet.fileSystem.getFile(t.command.filePath);case 23:return e.t11=e.sent,e.t12={type:e.t10,file:e.t11},e.t9.dispatch.call(e.t9,e.t12),e.abrupt("break",131);case 27:return e.t13=this,e.t14=d.FileSystemExistsResult,e.next=31,this.frontApplet.fileSystem.exists(t.command.filePath);case 31:return e.t15=e.sent,e.t16={type:e.t14,result:e.t15},e.t13.dispatch.call(e.t13,e.t16),e.abrupt("break",131);case 35:return e.t17=this,e.t18=d.FileSystemDownloadFileResult,e.next=39,this.frontApplet.fileSystem.downloadFile(t.command.filePath,t.command.sourceUri,t.command.headers);case 39:return e.t19=e.sent,e.t20={type:e.t18,result:e.t19},e.t17.dispatch.call(e.t17,e.t20),e.abrupt("break",131);case 43:return e.t21=this,e.t22=d.FileSystemDeleteFileResult,e.next=47,this.frontApplet.fileSystem.deleteFile(t.command.filePath,t.command.recursive);case 47:return e.t23=e.sent,e.t24={type:e.t22,result:e.t23},e.t21.dispatch.call(e.t21,e.t24),e.abrupt("break",131);case 51:return e.t25=this,e.t26=d.FileSystemMoveFileResult,e.next=55,this.frontApplet.fileSystem.moveFile(t.command.sourceFilePath,t.command.destinationFilePath,t.command.options);case 55:return e.t27=e.sent,e.t28={type:e.t26,result:e.t27},e.t25.dispatch.call(e.t25,e.t28),e.abrupt("break",131);case 59:return e.t29=this,e.t30=d.FileSystemGetFileChecksumResult,e.next=63,this.frontApplet.fileSystem.getFileChecksum(t.command.filePath,t.command.hashType);case 63:return e.t31=e.sent,e.t32={type:e.t30,result:e.t31},e.t29.dispatch.call(e.t29,e.t32),e.abrupt("break",131);case 67:return e.t33=this,e.t34=d.FileSystemExtractFileResult,e.next=71,this.frontApplet.fileSystem.extractFile(t.command.archiveFilePath,t.command.destinationDirectionPath,t.command.method);case 71:return e.t35=e.sent,e.t36={type:e.t34,result:e.t35},e.t33.dispatch.call(e.t33,e.t36),e.abrupt("break",131);case 75:return e.t37=this,e.t38=d.FileSystemCreateDirectoryResult,e.next=79,this.frontApplet.fileSystem.createDirectory(t.command.directoryPath);case 79:return e.t39=e.sent,e.t40={type:e.t38,result:e.t39},e.t37.dispatch.call(e.t37,e.t40),e.abrupt("break",131);case 83:return e.t41=this,e.t42=d.FileSystemCreateArchiveFileResult,e.next=87,this.frontApplet.fileSystem.createArchive(t.command.archiveFilePath,t.command.archiveEntries);case 87:return e.t43=e.sent,e.t44={type:e.t42,result:e.t43},e.t41.dispatch.call(e.t41,e.t44),e.abrupt("break",131);case 91:return e.t45=this,e.t46=d.FileSystemIsDirectoryResult,e.next=95,this.frontApplet.fileSystem.isDirectory(t.command.filePath);case 95:return e.t47=e.sent,e.t48={type:e.t46,result:e.t47},e.t45.dispatch.call(e.t45,e.t48),e.abrupt("break",131);case 99:return e.t49=this,e.t50=d.FileSystemCopyFileResult,e.next=103,this.frontApplet.fileSystem.copyFile(t.command.sourceFilePath,t.command.destinationFilePath,t.command.options);case 103:return e.t51=e.sent,e.t52={type:e.t50,result:e.t51},e.t49.dispatch.call(e.t49,e.t52),e.abrupt("break",131);case 107:return e.t53=this,e.t54=d.FileSystemWriteFileResult,e.next=111,this.frontApplet.fileSystem.writeFile(t.command.filePath,t.command.content);case 111:return e.t55=e.sent,e.t56={type:e.t54,result:e.t55},e.t53.dispatch.call(e.t53,e.t56),e.abrupt("break",131);case 115:return e.t57=this,e.t58=d.FileSystemAppendFileResult,e.next=119,this.frontApplet.fileSystem.appendFile(t.command.filePath,t.command.content);case 119:return e.t59=e.sent,e.t60={type:e.t58,result:e.t59},e.t57.dispatch.call(e.t57,e.t60),e.abrupt("break",131);case 123:return e.t61=this,e.t62=d.FileSystemReadFileResult,e.next=127,this.frontApplet.fileSystem.readFile(t.command.filePath);case 127:return e.t63=e.sent,e.t64={type:e.t62,data:e.t63},e.t61.dispatch.call(e.t61,e.t64),e.abrupt("break",131);case 131:case"end":return e.stop()}},e,this)}))})}},{key:"handleOfflineCacheFilesRequests",value:function(){var e=this;this.onCommand(function(t){return o(e,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.command.type,e.next=e.t0===f.OfflineCacheListFiles?3:e.t0===f.OfflineCacheLoadFile?11:e.t0===f.OfflineCacheGetChecksumRequest?19:e.t0===f.OfflineCacheValidateChecksumRequest?27:e.t0===f.OfflineCacheLoadOrSaveFileRequest?35:43;break;case 3:return e.t1=this,e.t2=f.OfflineCacheFilesListed,e.next=7,this.frontApplet.offline.cache.listFiles();case 7:return e.t3=e.sent,e.t4={type:e.t2,fileUids:e.t3},e.t1.dispatch.call(e.t1,e.t4),e.abrupt("break",43);case 11:return e.t5=this,e.t6=f.OfflineCacheFileLoaded,e.next=15,this.frontApplet.offline.cache.loadFile(t.command.uid);case 15:return e.t7=e.sent,e.t8={type:e.t6,file:e.t7},e.t5.dispatch.call(e.t5,e.t8),e.abrupt("break",43);case 19:return e.t9=this,e.t10=f.OfflineCacheGetChecksumResult,e.next=23,this.frontApplet.offline.cache.getChecksumFile(t.command.uid,t.command.hashType);case 23:return e.t11=e.sent,e.t12={type:e.t10,result:e.t11},e.t9.dispatch.call(e.t9,e.t12),e.abrupt("break",43);case 27:return e.t13=this,e.t14=f.OfflineCacheValidateChecksumResult,e.next=31,this.frontApplet.offline.cache.validateChecksumFile(t.command.uid,t.command.hash,t.command.hashType);case 31:return e.t15=e.sent,e.t16={type:e.t14,result:e.t15},e.t13.dispatch.call(e.t13,e.t16),e.abrupt("break",43);case 35:return e.t17=this,e.t18=f.OfflineCacheLoadOrSaveFileResult,e.next=39,this.frontApplet.offline.cache.loadOrSaveFile(t.command.uid,t.command.uri,t.command.headers);case 39:return e.t19=e.sent,e.t20={type:e.t18,file:e.t19},e.t17.dispatch.call(e.t17,e.t20),e.abrupt("break",43);case 43:case"end":return e.stop()}},e,this)}))})}},{key:"handleVideoStatesChanges",value:function(){var e=this;this.frontApplet.video.onPlay(function(t){e.dispatch(Object.assign({type:l.VideoStateChanged,state:"play"},t.srcArguments))}),this.frontApplet.video.onPrepare(function(t){e.dispatch(Object.assign({type:l.VideoStateChanged,state:"prepare"},t.srcArguments))}),this.frontApplet.video.onStop(function(t){e.dispatch(Object.assign({type:l.VideoStateChanged,state:"stop"},t.srcArguments))}),this.frontApplet.video.onPause(function(t){e.dispatch(Object.assign({type:l.VideoStateChanged,state:"pause"},t.srcArguments))}),this.frontApplet.video.onResume(function(t){e.dispatch(Object.assign({type:l.VideoStateChanged,state:"resume"},t.srcArguments))}),this.frontApplet.video.onEnded(function(t){e.dispatch(Object.assign({type:l.VideoStateChanged,state:"ended"},t.srcArguments))}),this.frontApplet.video.onError(function(t){e.dispatch(Object.assign({type:l.VideoStateChanged,state:"error"},t.srcArguments))})}}])&&i(t.prototype,n),h&&i(t,h),e}();t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DisableMonitoring=t.EnableMonitoring=void 0,t.EnableMonitoring="sos.Monitoring.EnableMonitoring",t.DisableMonitoring="sos.Monitoring.DisableMonitoring"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimingLoaded=void 0,t.TimingLoaded="sos.Monitoring.Timing.TimingLoaded"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HtmlSnapshotTaken=t.TakeHtmlSnapshot=void 0,t.TakeHtmlSnapshot="sos.Html.TakeHtmlSnapshot",t.HtmlSnapshotTaken="sos.Monitoring.Html.HtmlSnapshotTaken"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleLogged=void 0,t.ConsoleLogged="sos.Monitoring.Console.ConsoleLogged"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OfflineCacheLoadOrSaveFileResult=t.OfflineCacheLoadOrSaveFileRequest=t.OfflineCacheValidateChecksumResult=t.OfflineCacheValidateChecksumRequest=t.OfflineCacheGetChecksumResult=t.OfflineCacheGetChecksumRequest=t.OfflineCacheFileLoaded=t.OfflineCacheLoadFile=t.OfflineCacheFilesListed=t.OfflineCacheListFiles=void 0,t.OfflineCacheListFiles="sos.Monitoring.Offline.Cache.OfflineCacheListFiles",t.OfflineCacheFilesListed="sos.Monitoring.Offline.Cache.OfflineCacheFilesListed",t.OfflineCacheLoadFile="sos.Monitoring.Offline.Cache.OfflineCacheLoadFile",t.OfflineCacheFileLoaded="sos.Monitoring.Offline.Cache.OfflineCacheFileLoaded",t.OfflineCacheGetChecksumRequest="sos.Monitoring.Offline.Cache.OfflineCacheGetChecksumRequest",t.OfflineCacheGetChecksumResult="sos.Monitoring.Offline.Cache.OfflineCacheGetChecksumResult",t.OfflineCacheValidateChecksumRequest="sos.Monitoring.Offline.Cache.OfflineCacheValidateChecksumRequest",t.OfflineCacheValidateChecksumResult="sos.Monitoring.Offline.Cache.OfflineCacheValidateChecksumResult",t.OfflineCacheLoadOrSaveFileRequest="sos.Monitoring.Offline.Cache.OfflineCacheLoadOrSaveFileRequest",t.OfflineCacheLoadOrSaveFileResult="sos.Monitoring.Offline.Cache.OfflineCacheLoadOrSaveFileResult"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VideoStateChanged=void 0,t.VideoStateChanged="sos.Monitoring.Video.VideoStateChanged"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemAppendFileResult=t.FileSystemAppendFileRequest=t.FileSystemGetFileResult=t.FileSystemGetFileRequest=t.FileSystemExtractFileResult=t.FileSystemCreateArchiveFileResult=t.FileSystemCreateArchiveFileRequest=t.FileSystemExtractFileRequest=t.FileSystemGetFileChecksumResult=t.FileSystemGetFileChecksumRequest=t.FileSystemCopyFileResult=t.FileSystemCopyFileRequest=t.FileSystemMoveFileResult=t.FileSystemMoveFileRequest=t.FileSystemReadFileResult=t.FileSystemReadFileRequest=t.FileSystemWriteFileResult=t.FileSystemWriteFileRequest=t.FileSystemDownloadFileResult=t.FileSystemDownloadFileRequest=t.FileSystemCreateDirectoryResult=t.FileSystemCreateDirectoryRequest=t.FileSystemDeleteFileResult=t.FileSystemDeleteFileRequest=t.FileSystemExistsResult=t.FileSystemExistsRequest=t.FileSystemIsDirectoryResult=t.FileSystemIsDirectoryRequest=t.FileSystemListFilesResult=t.FileSystemListFilesRequest=t.FileSystemListOfStorageUnitsResult=t.FileSystemListOfStorageUnitsRequest=void 0,t.FileSystemListOfStorageUnitsRequest="sos.Monitoring.FileSystem.FileSystemListOfStorageUnitsRequest",t.FileSystemListOfStorageUnitsResult="sos.Monitoring.FileSystem.FileSystemListOfStorageUnitsResult",t.FileSystemListFilesRequest="sos.Monitoring.FileSystem.FileSystemListFilesRequest",t.FileSystemListFilesResult="sos.Monitoring.FileSystem.FileSystemListFilesResult",t.FileSystemIsDirectoryRequest="sos.Monitoring.FileSystem.FileSystemIsDirectoryRequest",t.FileSystemIsDirectoryResult="sos.Monitoring.FileSystem.FileSystemIsDirectoryResult",t.FileSystemExistsRequest="sos.Monitoring.FileSystem.FileSystemExistsRequest",t.FileSystemExistsResult="sos.Monitoring.FileSystem.FileSystemExistsResult",t.FileSystemDeleteFileRequest="sos.Monitoring.FileSystem.FileSystemDeleteFileRequest",t.FileSystemDeleteFileResult="sos.Monitoring.FileSystem.FileSystemDeleteFileResult",t.FileSystemCreateDirectoryRequest="sos.Monitoring.FileSystem.FileSystemCreateDirectoryRequest",t.FileSystemCreateDirectoryResult="sos.Monitoring.FileSystem.FileSystemCreateDirectoryResult",t.FileSystemDownloadFileRequest="sos.Monitoring.FileSystem.FileSystemDownloadFileRequest",t.FileSystemDownloadFileResult="sos.Monitoring.FileSystem.FileSystemDownloadFileResult",t.FileSystemWriteFileRequest="sos.Monitoring.FileSystem.FileSystemWriteFileRequest",t.FileSystemWriteFileResult="sos.Monitoring.FileSystem.FileSystemWriteFileResult",t.FileSystemReadFileRequest="sos.Monitoring.FileSystem.FileSystemReadFileRequest",t.FileSystemReadFileResult="sos.Monitoring.FileSystem.FileSystemReadFileResult",t.FileSystemMoveFileRequest="sos.Monitoring.FileSystem.FileSystemMoveFileRequest",t.FileSystemMoveFileResult="sos.Monitoring.FileSystem.FileSystemMoveFileResult",t.FileSystemCopyFileRequest="sos.Monitoring.FileSystem.FileSystemCopyFileRequest",t.FileSystemCopyFileResult="sos.Monitoring.FileSystem.FileSystemCopyFileResult",t.FileSystemGetFileChecksumRequest="sos.Monitoring.FileSystem.FileSystemGetFileChecksumRequest",t.FileSystemGetFileChecksumResult="sos.Monitoring.FileSystem.FileSystemGetFileChecksumResult",t.FileSystemExtractFileRequest="sos.Monitoring.FileSystem.FileSystemExtractFileRequest",t.FileSystemCreateArchiveFileRequest="sos.Monitoring.FileSystem.FileSystemCreateArchiveFileRequest",t.FileSystemCreateArchiveFileResult="sos.Monitoring.FileSystem.FileSystemCreateArchiveFileResult",t.FileSystemExtractFileResult="sos.Monitoring.FileSystem.FileSystemExtractFileResult",t.FileSystemGetFileRequest="sos.Monitoring.FileSystem.FileSystemGetFileRequest",t.FileSystemGetFileResult="sos.Monitoring.FileSystem.FileSystemGetFileResult",t.FileSystemAppendFileRequest="sos.Monitoring.FileSystem.FileSystemAppendFileRequest",t.FileSystemAppendFileResult="sos.Monitoring.FileSystem.FileSystemAppendFileResult"}])});
9
9
  //# sourceMappingURL=bundle.js.map