@memori.ai/memori-webcomponent 3.0.0 → 3.0.2

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.
@@ -47,7 +47,7 @@ var r,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,b,w,x,S,M,_,A;if(e(t.exports,"unstable_now",
47
47
  * @author Feross Aboukhadijeh <https://feross.org>
48
48
  * @license MIT
49
49
  */var r,i,o,s;e(t.exports,"Buffer",(()=>r),(e=>r=e)),e(t.exports,"SlowBuffer",(()=>i),(e=>i=e)),e(t.exports,"INSPECT_MAX_BYTES",(()=>o),(e=>o=e)),e(t.exports,"kMaxLength",(()=>s),(e=>s=e));var l=a("9Et26"),c=a("bDLoS"),u="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r=h,i=function(e){+e!=e&&(e=0);return h.alloc(+e)},o=50;var d=2147483647;function f(e){if(e>d)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,h.prototype),t}function h(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return g(e)}return p(e,t,n)}function p(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!h.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|w(e,t),r=f(n),i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(q(e,Uint8Array)){var t=new Uint8Array(e);return y(t.buffer,t.byteOffset,t.byteLength)}return v(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(q(e,ArrayBuffer)||e&&q(e.buffer,ArrayBuffer))return y(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(q(e,SharedArrayBuffer)||e&&q(e.buffer,SharedArrayBuffer)))return y(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return h.from(r,t,n);var i=function(e){if(h.isBuffer(e)){var t=0|b(e.length),n=f(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||K(e.length)?f(0):v(e);if("Buffer"===e.type&&Array.isArray(e.data))return v(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return h.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function m(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function g(e){return m(e),f(e<0?0:0|b(e))}function v(e){for(var t=e.length<0?0:0|b(e.length),n=f(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function y(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,h.prototype),r}function b(e){if(e>=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return 0|e}function w(e,t){if(h.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(e).length;default:if(i)return r?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function x(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 L(this,t,n);case"utf8":case"utf-8":return O(this,t,n);case"ascii":return P(this,t,n);case"latin1":case"binary":return N(this,t,n);case"base64":return I(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function S(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function M(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),K(n=+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=h.from(t,r)),h.isBuffer(t))return 0===t.length?-1:_(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):_(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,n,r,i){var o,a=1,s=e.length,l=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,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=n;o<s;o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*a}else-1!==u&&(o-=o-u),u=-1}else for(n+l>s&&(n=s-l),o=n;o>=0;o--){for(var d=!0,f=0;f<l;f++)if(c(e,o+f)!==c(t,f)){d=!1;break}if(d)return o}return-1}function A(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;r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(K(s))return a;e[n+a]=s}return a}function E(e,t,n,r){return G(V(t,e.length-n),e,n,r)}function C(e,t,n,r){return G(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function k(e,t,n,r){return G(W(t),e,n,r)}function T(e,t,n,r){return G(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function I(e,t,n){return 0===t&&n===e.length?l.fromByteArray(e):l.fromByteArray(e.slice(t,n))}function O(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,l,c=e[i],u=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&c)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=d}return function(e){var t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=R));return n}(r)}s=d,h.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),h.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}}),h.poolSize=8192,h.from=function(e,t,n){return p(e,t,n)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array),h.alloc=function(e,t,n){return function(e,t,n){return m(e),e<=0?f(e):void 0!==t?"string"==typeof n?f(e).fill(t,n):f(e).fill(t):f(e)}(e,t,n)},h.allocUnsafe=function(e){return g(e)},h.allocUnsafeSlow=function(e){return g(e)},h.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==h.prototype},h.compare=function(e,t){if(q(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),q(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(e)||!h.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');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},h.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}},h.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return h.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=h.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(q(o,Uint8Array))i+o.length>r.length?h.from(o).copy(r,i):Uint8Array.prototype.set.call(r,o,i);else{if(!h.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i)}i+=o.length}return r},h.byteLength=w,h.prototype._isBuffer=!0,h.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)S(this,t,t+1);return this},h.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)S(this,t,t+3),S(this,t+1,t+2);return this},h.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)S(this,t,t+7),S(this,t+1,t+6),S(this,t+2,t+5),S(this,t+3,t+4);return this},h.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?O(this,0,e):x.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(e){if(!h.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===h.compare(this,e)},h.prototype.inspect=function(){var e="",t=o;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},u&&(h.prototype[u]=h.prototype.inspect),h.prototype.compare=function(e,t,n,r,i){if(q(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);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),l=this.slice(r,i),c=e.slice(t,n),u=0;u<s;++u)if(l[u]!==c[u]){o=l[u],a=c[u];break}return o<a?-1:a<o?1:0},h.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},h.prototype.indexOf=function(e,t,n){return M(this,e,t,n,!0)},h.prototype.lastIndexOf=function(e,t,n){return M(this,e,t,n,!1)},h.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 A(this,e,t,n);case"utf8":case"utf-8":return E(this,e,t,n);case"ascii":case"latin1":case"binary":return C(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function P(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 N(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 L(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+=Y[e[o]];return i}function D(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length-1;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function B(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 j(e,t,n,r,i,o){if(!h.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 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 U(e,t,n,r,i){return t=+t,n>>>=0,i||F(e,0,n,4),c.write(e,t,n,r,23,4),n+4}function z(e,t,n,r,i){return t=+t,n>>>=0,i||F(e,0,n,8),c.write(e,t,n,r,52,8),n+8}h.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,h.prototype),r},h.prototype.readUintLE=h.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},h.prototype.readUintBE=h.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},h.prototype.readUint8=h.prototype.readUInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),this[e]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]|this[e+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]<<8|this[e+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},h.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||B(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},h.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||B(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},h.prototype.readInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},h.prototype.readInt16LE=function(e,t){e>>>=0,t||B(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt16BE=function(e,t){e>>>=0,t||B(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},h.prototype.readInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},h.prototype.readFloatLE=function(e,t){return e>>>=0,t||B(e,4,this.length),c.read(this,e,!0,23,4)},h.prototype.readFloatBE=function(e,t){return e>>>=0,t||B(e,4,this.length),c.read(this,e,!1,23,4)},h.prototype.readDoubleLE=function(e,t){return e>>>=0,t||B(e,8,this.length),c.read(this,e,!0,52,8)},h.prototype.readDoubleBE=function(e,t){return e>>>=0,t||B(e,8,this.length),c.read(this,e,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||j(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},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||j(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},h.prototype.writeUint8=h.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,1,255,0),this[t]=255&e,t+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},h.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);j(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},h.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);j(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},h.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},h.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},h.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},h.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},h.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},h.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},h.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},h.prototype.writeDoubleLE=function(e,t,n){return z(this,e,t,!0,n)},h.prototype.writeDoubleBE=function(e,t,n){return z(this,e,t,!1,n)},h.prototype.copy=function(e,t,n,r){if(!h.isBuffer(e))throw new TypeError("argument should be a Buffer");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("Index out of range");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=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},h.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),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!h.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var i=e.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));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=h.isBuffer(e)?e:h.from(e,r),s=a.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var H=/[^+/0-9A-Za-z-_]/g;function V(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 W(e){return l.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(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}function q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!=e}var Y=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t}()})),a.register("9Et26",(function(t,n){var r,i;e(t.exports,"toByteArray",(()=>r),(e=>r=e)),e(t.exports,"fromByteArray",(()=>i),(e=>i=e)),r=function(e){var t,n,r=d(e),i=r[0],o=r[1],l=new s(function(e,t,n){return 3*(t+n)/4-n}(0,i,o)),c=0,u=o>0?i-4:i;for(n=0;n<u;n+=4)t=a[e.charCodeAt(n)]<<18|a[e.charCodeAt(n+1)]<<12|a[e.charCodeAt(n+2)]<<6|a[e.charCodeAt(n+3)],l[c++]=t>>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===o&&(t=a[e.charCodeAt(n)]<<2|a[e.charCodeAt(n+1)]>>4,l[c++]=255&t);1===o&&(t=a[e.charCodeAt(n)]<<10|a[e.charCodeAt(n+1)]<<4|a[e.charCodeAt(n+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},i=function(e){for(var t,n=e.length,r=n%3,i=[],a=16383,s=0,l=n-r;s<l;s+=a)i.push(f(e,s,s+a>l?l:s+a));1===r?(t=e[n-1],i.push(o[t>>2]+o[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(o[t>>10]+o[t>>4&63]+o[t<<2&63]+"="));return i.join("")};for(var o=[],a=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,u=l.length;c<u;++c)o[c]=l[c],a[l.charCodeAt(c)]=c;function d(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 r,i,a=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(o[(i=r)>>18&63]+o[i>>12&63]+o[i>>6&63]+o[63&i]);return a.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63})),a.register("bDLoS",(function(t,n){
50
- /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var r,i;e(t.exports,"read",(()=>r),(e=>r=e)),e(t.exports,"write",(()=>i),(e=>i=e)),r=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,d=n?i-1:0,f=n?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-u)-1,h>>=-u,u+=s;u>0;o=256*o+e[t+d],d+=f,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=c}return(h?-1:1)*a*Math.pow(2,o-r)},i=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<<c)-1,d=u>>1,f=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=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-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,c+=i;c>0;e[n+h]=255&a,h+=p,a/=256,c-=8);e[n+h-p]|=128*m}})),a.register("9gzJO",(function(e,t){var n=a("ePtPP"),r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},i=/%[sdj%]/g;e.exports.format=function(e){if(!y(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(l(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(e).replace(i,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),s=r[n];n<o;s=r[++n])g(s)||!x(s)?a+=" "+s:a+=" "+l(s);return a},e.exports.deprecate=function(t,r){if(void 0!==n&&!0===n.noDeprecation)return t;if(void 0===n)return function(){return e.exports.deprecate(t,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),i=!0}return t.apply(this,arguments)}};var o={},s=/^$/;function l(t,n){var r={seen:[],stylize:u};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(n)?r.showHidden=n:n&&e.exports._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=c),d(r,t,r.depth)}function c(e,t){var n=l.styles[t];return n?"["+l.colors[n][0]+"m"+e+"["+l.colors[n][1]+"m":e}function u(e,t){return e}function d(t,n,r){if(t.customInspect&&n&&_(n.inspect)&&n.inspect!==e.exports.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return y(i)||(i=d(t,i,r)),i}var o=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(y(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(v(t))return e.stylize(""+t,"number");if(m(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(t,n);if(o)return o;var a=Object.keys(n),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),M(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(_(n)){var l=n.name?": "+n.name:"";return t.stylize("[Function"+l+"]","special")}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(S(n))return t.stylize(Date.prototype.toString.call(n),"date");if(M(n))return f(n)}var c,u="",x=!1,A=["{","}"];(p(n)&&(x=!0,A=["[","]"]),_(n))&&(u=" [Function"+(n.name?": "+n.name:"")+"]");return w(n)&&(u=" "+RegExp.prototype.toString.call(n)),S(n)&&(u=" "+Date.prototype.toUTCString.call(n)),M(n)&&(u=" "+f(n)),0!==a.length||x&&0!=n.length?r<0?w(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),c=x?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)T(t,String(a))?o.push(h(e,t,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(h(e,t,n,r,i,!0))})),o}(t,n,r,s,a):a.map((function(e){return h(t,n,r,s,e,x)})),t.seen.pop(),function(e,t,n){var r=e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);return r>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(c,u,A)):A[0]+u+A[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,i,o){var a,s,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),T(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=g(n)?d(e,l.value,null):d(e,l.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),b(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function g(e){return null===e}function v(e){return"number"==typeof e}function y(e){return"string"==typeof e}function b(e){return void 0===e}function w(e){return x(e)&&"[object RegExp]"===A(e)}function x(e){return"object"==typeof e&&null!==e}function S(e){return x(e)&&"[object Date]"===A(e)}function M(e){return x(e)&&("[object Error]"===A(e)||e instanceof Error)}function _(e){return"function"==typeof e}function A(e){return Object.prototype.toString.call(e)}function E(e){return e<10?"0"+e.toString(10):e.toString(10)}e.exports.debuglog=function(t){if(t=t.toUpperCase(),!o[t])if(s.test(t)){var r=n.pid;o[t]=function(){var n=e.exports.format.apply(e.exports,arguments);console.error("%s %d: %s",t,r,n)}}else o[t]=function(){};return o[t]},e.exports.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.exports.types=a("bM5Oe"),e.exports.isArray=p,e.exports.isBoolean=m,e.exports.isNull=g,e.exports.isNullOrUndefined=function(e){return null==e},e.exports.isNumber=v,e.exports.isString=y,e.exports.isSymbol=function(e){return"symbol"==typeof e},e.exports.isUndefined=b,e.exports.isRegExp=w,e.exports.types.isRegExp=w,e.exports.isObject=x,e.exports.isDate=S,e.exports.types.isDate=S,e.exports.isError=M,e.exports.types.isNativeError=M,e.exports.isFunction=_,e.exports.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},e.exports.isBuffer=a("jPRhY");var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(){var e=new Date,t=[E(e.getHours()),E(e.getMinutes()),E(e.getSeconds())].join(":");return[e.getDate(),C[e.getMonth()],t].join(" ")}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports.log=function(){console.log("%s - %s",k(),e.exports.format.apply(e.exports,arguments))},e.exports.inherits=a("5jAh8"),e.exports._extend=function(e,t){if(!t||!x(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var I="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function O(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}e.exports.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(I&&e[I]){var t;if("function"!=typeof(t=e[I]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,I,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(e,r){e?n(e):t(r)}));try{e.apply(this,i)}catch(e){n(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),I&&Object.defineProperty(t,I,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,r(e))},e.exports.promisify.custom=I,e.exports.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var i=t.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return i.apply(o,arguments)};e.apply(this,t).then((function(e){n.nextTick(a.bind(null,null,e))}),(function(e){n.nextTick(O.bind(null,e,a))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,r(e)),t}})),a.register("ePtPP",(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 l,c=[],u=!1,d=-1;function f(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&h())}function h(){if(!u){var e=s(f);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!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];c.push(new p(e,t)),1!==c.length||u||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}})),a.register("bM5Oe",(function(e,t){"use strict";var n=a("3vY4Y"),r=a("jgq2W"),i=a("8yoeR"),o=a("doLxT");function s(e){return e.call.bind(e)}var l="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,u=s(Object.prototype.toString),d=s(Number.prototype.valueOf),f=s(String.prototype.valueOf),h=s(Boolean.prototype.valueOf);if(l)var p=s(BigInt.prototype.valueOf);if(c)var m=s(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function v(e){return"[object Map]"===u(e)}function y(e){return"[object Set]"===u(e)}function b(e){return"[object WeakMap]"===u(e)}function w(e){return"[object WeakSet]"===u(e)}function x(e){return"[object ArrayBuffer]"===u(e)}function S(e){return"undefined"!=typeof ArrayBuffer&&(x.working?x(e):e instanceof ArrayBuffer)}function M(e){return"[object DataView]"===u(e)}function _(e){return"undefined"!=typeof DataView&&(M.working?M(e):e instanceof DataView)}e.exports.isArgumentsObject=n,e.exports.isGeneratorFunction=r,e.exports.isTypedArray=o,e.exports.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},e.exports.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):o(e)||_(e)},e.exports.isUint8Array=function(e){return"Uint8Array"===i(e)},e.exports.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===i(e)},e.exports.isUint16Array=function(e){return"Uint16Array"===i(e)},e.exports.isUint32Array=function(e){return"Uint32Array"===i(e)},e.exports.isInt8Array=function(e){return"Int8Array"===i(e)},e.exports.isInt16Array=function(e){return"Int16Array"===i(e)},e.exports.isInt32Array=function(e){return"Int32Array"===i(e)},e.exports.isFloat32Array=function(e){return"Float32Array"===i(e)},e.exports.isFloat64Array=function(e){return"Float64Array"===i(e)},e.exports.isBigInt64Array=function(e){return"BigInt64Array"===i(e)},e.exports.isBigUint64Array=function(e){return"BigUint64Array"===i(e)},v.working="undefined"!=typeof Map&&v(new Map),e.exports.isMap=function(e){return"undefined"!=typeof Map&&(v.working?v(e):e instanceof Map)},y.working="undefined"!=typeof Set&&y(new Set),e.exports.isSet=function(e){return"undefined"!=typeof Set&&(y.working?y(e):e instanceof Set)},b.working="undefined"!=typeof WeakMap&&b(new WeakMap),e.exports.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(b.working?b(e):e instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),e.exports.isWeakSet=function(e){return w(e)},x.working="undefined"!=typeof ArrayBuffer&&x(new ArrayBuffer),e.exports.isArrayBuffer=S,M.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&M(new DataView(new ArrayBuffer(1),0,1)),e.exports.isDataView=_;var A="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function E(e){return"[object SharedArrayBuffer]"===u(e)}function C(e){return void 0!==A&&(void 0===E.working&&(E.working=E(new A)),E.working?E(e):e instanceof A)}function k(e){return g(e,d)}function T(e){return g(e,f)}function I(e){return g(e,h)}function O(e){return l&&g(e,p)}function R(e){return c&&g(e,m)}e.exports.isSharedArrayBuffer=C,e.exports.isAsyncFunction=function(e){return"[object AsyncFunction]"===u(e)},e.exports.isMapIterator=function(e){return"[object Map Iterator]"===u(e)},e.exports.isSetIterator=function(e){return"[object Set Iterator]"===u(e)},e.exports.isGeneratorObject=function(e){return"[object Generator]"===u(e)},e.exports.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===u(e)},e.exports.isNumberObject=k,e.exports.isStringObject=T,e.exports.isBooleanObject=I,e.exports.isBigIntObject=O,e.exports.isSymbolObject=R,e.exports.isBoxedPrimitive=function(e){return k(e)||T(e)||I(e)||O(e)||R(e)},e.exports.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(S(e)||C(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e.exports,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))})),a.register("3vY4Y",(function(e,t){"use strict";var n=a("gp4q4")(),r=a("6pFFa")("Object.prototype.toString"),i=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===r(e)},o=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==r(e)&&"[object Function]"===r(e.callee)},s=function(){return i(arguments)}();i.isLegacyArguments=o,e.exports=s?i:o})),a.register("gp4q4",(function(e,t){"use strict";var n=a("fPlzF");e.exports=function(){return n()&&!!Symbol.toStringTag}})),a.register("fPlzF",(function(e,t){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}})),a.register("6pFFa",(function(e,t){"use strict";var n=a("3kYrO"),r=a("1Mwz1"),i=r(n("String.prototype.indexOf"));e.exports=function(e,t){var o=n(e,!!t);return"function"==typeof o&&i(e,".prototype.")>-1?r(o):o}})),a.register("3kYrO",(function(e,t){"use strict";var n,r=SyntaxError,i=Function,o=TypeError,s=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(e){l=null}var c=function(){throw new o},u=l?function(){try{return c}catch(e){try{return l(arguments,"callee").get}catch(e){return c}}}():c,d=a("l5rv7")(),f=Object.getPrototypeOf||function(e){return e.__proto__},h={},p="undefined"==typeof Uint8Array?n:f(Uint8Array),m={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":d?f([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d?f(f([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&d?f((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&d?f((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d?f(""[Symbol.iterator]()):n,"%Symbol%":d?Symbol:n,"%SyntaxError%":r,"%ThrowTypeError%":u,"%TypedArray%":p,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},g=function e(t){var n;if("%AsyncFunction%"===t)n=s("async function () {}");else if("%GeneratorFunction%"===t)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=s("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(n=f(i.prototype))}return m[t]=n,n},v={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},y=a("2JiOr"),b=a("c5f2w"),w=y.call(Function.call,Array.prototype.concat),x=y.call(Function.apply,Array.prototype.splice),S=y.call(Function.call,String.prototype.replace),M=y.call(Function.call,String.prototype.slice),_=y.call(Function.call,RegExp.prototype.exec),A=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,E=/\\(\\)?/g,C=function(e){var t=M(e,0,1),n=M(e,-1);if("%"===t&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new r("invalid intrinsic syntax, expected opening `%`");var i=[];return S(e,A,(function(e,t,n,r){i[i.length]=n?S(r,E,"$1"):t||e})),i},k=function(e,t){var n,i=e;if(b(v,i)&&(i="%"+(n=v[i])[0]+"%"),b(m,i)){var a=m[i];if(a===h&&(a=g(i)),void 0===a&&!t)throw new o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:a}}throw new r("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new o('"allowMissing" argument must be a boolean');if(null===_(/^%?[^%]*%?$/,e))throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=C(e),i=n.length>0?n[0]:"",a=k("%"+i+"%",t),s=a.name,c=a.value,u=!1,d=a.alias;d&&(i=d[0],x(n,w([0,1],d)));for(var f=1,h=!0;f<n.length;f+=1){var p=n[f],g=M(p,0,1),v=M(p,-1);if(('"'===g||"'"===g||"`"===g||'"'===v||"'"===v||"`"===v)&&g!==v)throw new r("property names with quotes must have matching quotes");if("constructor"!==p&&h||(u=!0),b(m,s="%"+(i+="."+p)+"%"))c=m[s];else if(null!=c){if(!(p in c)){if(!t)throw new o("base intrinsic for "+e+" exists, but the property is not available.");return}if(l&&f+1>=n.length){var y=l(c,p);c=(h=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[p]}else h=b(c,p),c=c[p];h&&!u&&(m[s]=c)}}return c}})),a.register("l5rv7",(function(e,t){"use strict";var n="undefined"!=typeof Symbol&&Symbol,r=a("fPlzF");e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&r())))}})),a.register("2JiOr",(function(e,t){"use strict";var n=a("5DpJt");e.exports=Function.prototype.bind||n})),a.register("5DpJt",(function(e,t){"use strict";var n="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,i=Object.prototype.toString,o="[object Function]";e.exports=function(e){var t=this;if("function"!=typeof t||i.call(t)!==o)throw new TypeError(n+t);for(var a,s=r.call(arguments,1),l=function(){if(this instanceof a){var n=t.apply(this,s.concat(r.call(arguments)));return Object(n)===n?n:this}return t.apply(e,s.concat(r.call(arguments)))},c=Math.max(0,t.length-s.length),u=[],d=0;d<c;d++)u.push("$"+d);if(a=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(l),t.prototype){var f=function(){};f.prototype=t.prototype,a.prototype=new f,f.prototype=null}return a}})),a.register("c5f2w",(function(e,t){"use strict";var n=a("2JiOr");e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)})),a.register("1Mwz1",(function(e,t){"use strict";var n=a("2JiOr"),r=a("3kYrO"),i=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),s=r("%Reflect.apply%",!0)||n.call(o,i),l=r("%Object.getOwnPropertyDescriptor%",!0),c=r("%Object.defineProperty%",!0),u=r("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=s(n,o,arguments);if(l&&c){var r=l(t,"length");r.configurable&&c(t,"length",{value:1+u(0,e.length-(arguments.length-1))})}return t};var d=function(){return s(n,i,arguments)};c?c(e.exports,"apply",{value:d}):e.exports.apply=d})),a.register("jgq2W",(function(e,t){"use strict";var n,r=Object.prototype.toString,i=Function.prototype.toString,o=/^\s*(?:function)?\*/,s=a("gp4q4")(),l=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(o.test(i.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===r.call(e);if(!l)return!1;if(void 0===n){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&l(t)}return l(e)===n}})),a.register("8yoeR",(function(e,n){"use strict";var r=a("kz55o"),i=a("5gqKI"),o=a("6pFFa"),s=a("8WWik"),l=o("Object.prototype.toString"),c=a("gp4q4")(),u="undefined"==typeof globalThis?t:globalThis,d=i(),f=o("String.prototype.slice"),h={},p=Object.getPrototypeOf;c&&s&&p&&r(d,(function(e){if("function"==typeof u[e]){var t=new u[e];if(Symbol.toStringTag in t){var n=p(t),r=s(n,Symbol.toStringTag);if(!r){var i=p(n);r=s(i,Symbol.toStringTag)}h[e]=r.get}}}));var m=a("doLxT");e.exports=function(e){return!!m(e)&&(c&&Symbol.toStringTag in e?function(e){var t=!1;return r(h,(function(n,r){if(!t)try{var i=n.call(e);i===r&&(t=i)}catch(e){}})),t}(e):f(l(e),8,-1))}})),a.register("kz55o",(function(e,t){"use strict";var n=a("4Z0y4"),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,o=function(e,t,n){for(var r=0,o=e.length;r<o;r++)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))},s=function(e,t,n){for(var r=0,i=e.length;r<i;r++)null==n?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)},l=function(e,t,n){for(var r in e)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))};e.exports=function(e,t,i){if(!n(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=i),"[object Array]"===r.call(e)?o(e,t,a):"string"==typeof e?s(e,t,a):l(e,t,a)}})),a.register("4Z0y4",(function(e,t){"use strict";var n,r,i=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{n=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,n)}catch(e){e!==r&&(o=null)}else o=null;var a=/^\s*class\b/,s=function(e){try{var t=i.call(e);return a.test(t)}catch(e){return!1}},l=function(e){try{return!s(e)&&(i.call(e),!0)}catch(e){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,d=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var h=document.all;c.call(h)===c.call(document.all)&&(f=function(e){if((d||!e)&&(void 0===e||"object"==typeof e))try{var t=c.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,n)}catch(e){if(e!==r)return!1}return!s(e)&&l(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(u)return l(e);if(s(e))return!1;var t=c.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&l(e)}})),a.register("5gqKI",(function(e,n){"use strict";var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?t:globalThis;e.exports=function(){for(var e=[],t=0;t<r.length;t++)"function"==typeof i[r[t]]&&(e[e.length]=r[t]);return e}})),a.register("8WWik",(function(e,t){"use strict";var n=a("3kYrO")("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n})),a.register("doLxT",(function(e,n){"use strict";var r=a("kz55o"),i=a("5gqKI"),o=a("6pFFa"),s=o("Object.prototype.toString"),l=a("gp4q4")(),c=a("8WWik"),u="undefined"==typeof globalThis?t:globalThis,d=i(),f=o("Array.prototype.indexOf",!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},h=o("String.prototype.slice"),p={},m=Object.getPrototypeOf;l&&c&&m&&r(d,(function(e){var t=new u[e];if(Symbol.toStringTag in t){var n=m(t),r=c(n,Symbol.toStringTag);if(!r){var i=m(n);r=c(i,Symbol.toStringTag)}p[e]=r.get}}));e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!l||!(Symbol.toStringTag in e)){var t=h(s(e),8,-1);return f(d,t)>-1}return!!c&&function(e){var t=!1;return r(p,(function(n,r){if(!t)try{t=n.call(e)===r}catch(e){}})),t}(e)}})),a.register("jPRhY",(function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}})),a.register("5jAh8",(function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}})),a.register("fnFC9",(function(e,n){var r=a("fB4ch"),i=a("9QxiN"),o=a("iCrCa"),s=a("7X2JB"),l=a("8iXHm"),c=e.exports;c.request=function(e,n){e="string"==typeof e?l.parse(e):o(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||i,s=e.hostname||e.host,c=e.port,u=e.path||"/";s&&-1!==s.indexOf(":")&&(s="["+s+"]"),e.url=(s?a+"//"+s:"")+(c?":"+c:"")+u,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var d=new r(e);return n&&d.on("response",n),d},c.get=function(e,t){var n=c.request(e,t);return n.end(),n},c.ClientRequest=r,c.IncomingMessage=i.IncomingMessage,c.Agent=function(){},c.Agent.defaultMaxSockets=4,c.globalAgent=new c.Agent,c.STATUS_CODES=s,c.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]})),a.register("fB4ch",(function(e,n){var r=a("ePtPP"),i=a("bqBrJ").Buffer,o=a("7lggT"),s=a("5jAh8"),l=a("9QxiN"),c=a("8IqCp"),u=l.IncomingMessage,d=l.readyStates;var f=e.exports=function(e){var t,n=this;c.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+i.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var r=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)r=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}n._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":"text"}(t,r),n._fetchTimer=null,n._socketTimeout=null,n._socketTimer=null,n.on("finish",(function(){n._onFinish()}))};s(f,c.Writable),f.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===h.indexOf(n)&&(this._headers[n]={name:e,value:t})},f.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},f.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},f.prototype._onFinish=function(){var e=this;if(!e._destroyed){var n=e._opts;"timeout"in n&&0!==n.timeout&&e.setTimeout(n.timeout);var i=e._headers,a=null;"GET"!==n.method&&"HEAD"!==n.method&&(a=new Blob(e._body,{type:(i["content-type"]||{}).value||""}));var s=[];if(Object.keys(i).forEach((function(e){var t=i[e].name,n=i[e].value;Array.isArray(n)?n.forEach((function(e){s.push([t,e])})):s.push([t,n])})),"fetch"===e._mode){var l=null;if(o.abortController){var c=new AbortController;l=c.signal,e._fetchAbortController=c,"requestTimeout"in n&&0!==n.requestTimeout&&(e._fetchTimer=t.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),n.requestTimeout))}t.fetch(e._opts.url,{method:e._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:n.withCredentials?"include":"same-origin",signal:l}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var u=e._xhr=new t.XMLHttpRequest;try{u.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}"responseType"in u&&(u.responseType=e._mode),"withCredentials"in u&&(u.withCredentials=!!n.withCredentials),"text"===e._mode&&"overrideMimeType"in u&&u.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in n&&(u.timeout=n.requestTimeout,u.ontimeout=function(){e.emit("requestTimeout")}),s.forEach((function(e){u.setRequestHeader(e[0],e[1])})),e._response=null,u.onreadystatechange=function(){switch(u.readyState){case d.LOADING:case d.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(u.onprogress=function(){e._onXHRProgress()}),u.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{u.send(a)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}}}},f.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},f.prototype._connect=function(){var e=this;e._destroyed||(e._response=new u(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},f.prototype._write=function(e,t,n){this._body.push(e),n()},f.prototype._resetTimers=function(e){var n=this;t.clearTimeout(n._socketTimer),n._socketTimer=null,e?(t.clearTimeout(n._fetchTimer),n._fetchTimer=null):n._socketTimeout&&(n._socketTimer=t.setTimeout((function(){n.emit("timeout")}),n._socketTimeout))},f.prototype.abort=f.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},f.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=void 0),c.Writable.prototype.end.call(this,e,t,n)},f.prototype.setTimeout=function(e,t){var n=this;t&&n.once("timeout",t),n._socketTimeout=e,n._resetTimers(!1)},f.prototype.flushHeaders=function(){},f.prototype.setNoDelay=function(){},f.prototype.setSocketKeepAlive=function(){};var h=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]})),a.register("7lggT",(function(n,r){var i,o,a,s,l,c,u,d;function f(){if(void 0!==d)return d;if(t.XMLHttpRequest){d=new t.XMLHttpRequest;try{d.open("GET",t.XDomainRequest?"/":"https://example.com")}catch(e){d=null}}else d=null;return d}function h(e){var t=f();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function p(e){return"function"==typeof e}e(n.exports,"fetch",(()=>i),(e=>i=e)),e(n.exports,"writableStream",(()=>o),(e=>o=e)),e(n.exports,"abortController",(()=>a),(e=>a=e)),e(n.exports,"arraybuffer",(()=>s),(e=>s=e)),e(n.exports,"msstream",(()=>l),(e=>l=e)),e(n.exports,"mozchunkedarraybuffer",(()=>c),(e=>c=e)),e(n.exports,"overrideMimeType",(()=>u),(e=>u=e)),i=p(t.fetch)&&p(t.ReadableStream),o=p(t.WritableStream),a=p(t.AbortController),s=i||h("arraybuffer"),l=!i&&h("ms-stream"),c=!i&&h("moz-chunked-arraybuffer"),u=i||!!f()&&p(f().overrideMimeType),d=null})),a.register("9QxiN",(function(n,r){var i,o;e(n.exports,"readyStates",(()=>i),(e=>i=e)),e(n.exports,"IncomingMessage",(()=>o),(e=>o=e));var s=a("ePtPP"),l=a("bqBrJ").Buffer,c=a("7lggT"),u=a("5jAh8"),d=a("8IqCp"),f=i={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},h=o=function(e,t,n,r){var i=this;if(d.Readable.call(i),i._mode=n,i.headers={},i.rawHeaders=[],i.trailers={},i.rawTrailers=[],i.on("end",(function(){s.nextTick((function(){i.emit("close")}))})),"fetch"===n){if(i._fetchResponse=t,i.url=t.url,i.statusCode=t.status,i.statusMessage=t.statusText,t.headers.forEach((function(e,t){i.headers[t.toLowerCase()]=e,i.rawHeaders.push(t,e)})),c.writableStream){var o=new WritableStream({write:function(e){return r(!1),new Promise((function(t,n){i._destroyed?n():i.push(l.from(e))?t():i._resumeFetch=t}))},close:function(){r(!0),i._destroyed||i.push(null)},abort:function(e){r(!0),i._destroyed||i.emit("error",e)}});try{return void t.body.pipeTo(o).catch((function(e){r(!0),i._destroyed||i.emit("error",e)}))}catch(e){}}var a=t.body.getReader();!function e(){a.read().then((function(t){i._destroyed||(r(t.done),t.done?i.push(null):(i.push(l.from(t.value)),e()))})).catch((function(e){r(!0),i._destroyed||i.emit("error",e)}))}()}else{if(i._xhr=e,i._pos=0,i.url=e.responseURL,i.statusCode=e.status,i.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===i.headers[n]&&(i.headers[n]=[]),i.headers[n].push(t[2])):void 0!==i.headers[n]?i.headers[n]+=", "+t[2]:i.headers[n]=t[2],i.rawHeaders.push(t[1],t[2])}})),i._charset="x-user-defined",!c.overrideMimeType){var u=i.rawHeaders["mime-type"];if(u){var f=u.match(/;\s*charset=([^;])(;|$)/);f&&(i._charset=f[1].toLowerCase())}i._charset||(i._charset="utf-8")}}};u(h,d.Readable),h.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},h.prototype._onXHRProgress=function(e){var n=this,r=n._xhr,i=null;switch(n._mode){case"text":if((i=r.responseText).length>n._pos){var o=i.substr(n._pos);if("x-user-defined"===n._charset){for(var a=l.alloc(o.length),s=0;s<o.length;s++)a[s]=255&o.charCodeAt(s);n.push(a)}else n.push(o,n._charset);n._pos=i.length}break;case"arraybuffer":if(r.readyState!==f.DONE||!r.response)break;i=r.response,n.push(l.from(new Uint8Array(i)));break;case"moz-chunked-arraybuffer":if(i=r.response,r.readyState!==f.LOADING||!i)break;n.push(l.from(new Uint8Array(i)));break;case"ms-stream":if(i=r.response,r.readyState!==f.LOADING)break;var c=new t.MSStreamReader;c.onprogress=function(){c.result.byteLength>n._pos&&(n.push(l.from(new Uint8Array(c.result.slice(n._pos)))),n._pos=c.result.byteLength)},c.onload=function(){e(!0),n.push(null)},c.readAsArrayBuffer(i)}n._xhr.readyState===f.DONE&&"ms-stream"!==n._mode&&(e(!0),n.push(null))}})),a.register("8IqCp",(function(e,t){(t=e.exports=a("kZTRI")).Stream=t,t.Readable=t,t.Writable=a("gihud"),t.Duplex=a("jqAKP"),t.Transform=a("erC5i"),t.PassThrough=a("3dCe5"),t.finished=a("j5ZwK"),t.pipeline=a("azGNy")})),a.register("kZTRI",(function(e,n){var r,i=a("ePtPP");e.exports=E,E.ReadableState=A;a("3oV8N").EventEmitter;var o=function(e,t){return e.listeners(t).length},s=a("3vqBO"),l=a("bqBrJ").Buffer,c=t.Uint8Array||function(){};var u,d=a("1DJXa");u=d&&d.debuglog?d.debuglog("stream"):function(){};var f,h,p,m=a("k9Eb1"),g=a("6hWXN"),v=a("56mX2").getHighWaterMark,y=a("aOgJu").codes,b=y.ERR_INVALID_ARG_TYPE,w=y.ERR_STREAM_PUSH_AFTER_EOF,x=y.ERR_METHOD_NOT_IMPLEMENTED,S=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;a("5jAh8")(E,s);var M=g.errorOrDestroy,_=["error","close","destroy","pause","resume"];function A(e,t,n){r=r||a("jqAKP"),e=e||{},"boolean"!=typeof n&&(n=t instanceof r),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=v(this,e,"readableHighWaterMark",n),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=a("28kcI").StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function E(e){if(r=r||a("jqAKP"),!(this instanceof E))return new E(e);var t=this instanceof r;this._readableState=new A(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function C(e,t,n,r,i){u("readableAddChunk",t);var o,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(u("onEofChunk"),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,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,R(e)))}(e,a);else if(i||(o=function(e,t){var n;r=t,l.isBuffer(r)||r instanceof c||"string"==typeof t||void 0===t||e.objectMode||(n=new b("chunk",["string","Buffer","Uint8Array"],t));var r;return n}(a,t)),o)M(e,o);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),r)a.endEmitted?M(e,new S):k(e,a,t,!0);else if(a.ended)M(e,new w);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?k(e,a,t,!1):P(e,a)):k(e,a,t,!1)}else r||(a.reading=!1,P(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function k(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&O(e)),P(e,t)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=g.destroy,E.prototype._undestroy=g.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=l.from(e,t),t=""),n=!0),C(this,e,t,!1,n)},E.prototype.unshift=function(e){return C(this,e,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(e){f||(f=a("28kcI").StringDecoder);var t=new f(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,r="";null!==n;)r+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==r&&this._readableState.buffer.push(r),this._readableState.length=r.length,this};var T=1073741824;function I(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=T?e=T:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(R,e))}function R(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,j(e)}function P(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(u("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function L(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function D(e){u("readable nexttick read 0"),e.read(0)}function B(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function F(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function U(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(z,t,e))}function z(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function H(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}E.prototype.read=function(e){u("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?U(this):O(this),null;if(0===(e=I(e,t))&&t.ended)return 0===t.length&&U(this),null;var r,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&u("length less than watermark",i=!0),t.ended||t.reading?u("reading or ended",i=!1):i&&(u("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=I(n,t))),null===(r=e>0?F(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&U(this)),null!==r&&this.emit("data",r),r},E.prototype._read=function(e){M(this,new x("_read()"))},E.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,u("pipe count=%d opts=%j",r.pipesCount,t);var a=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?l:g;function s(t,i){u("onunpipe"),t===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",m),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",s),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",f),d=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function l(){u("onend"),e.end()}r.endEmitted?i.nextTick(a):n.once("end",a),e.on("unpipe",s);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,j(e))}}(n);e.on("drain",c);var d=!1;function f(t){u("ondata");var i=e.write(t);u("dest.write",i),!1===i&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==H(r.pipes,e))&&!d&&(u("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function h(t){u("onerror",t),g(),e.removeListener("error",h),0===o(e,"error")&&M(e,t)}function p(){e.removeListener("finish",m),g()}function m(){u("onfinish"),e.removeListener("close",p),g()}function g(){u("unpipe"),n.unpipe(e)}return n.on("data",f),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",p),e.once("finish",m),e.emit("pipe",n),r.flowing||(u("pipe resume"),n.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=H(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},E.prototype.on=function(e,t){var n=s.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,u("on readable",r.length,r.reading),r.length?O(this):r.reading||i.nextTick(D,this))),n},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var n=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(L,this),n},E.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(L,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(B,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<_.length;o++)e.on(_[o],this.emit.bind(this,_[o]));return this._read=function(t){u("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=a("5gKYZ")),h(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=F,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(e,t){return void 0===p&&(p=a("8igDo")),p(E,e,t)})})),a.register("3oV8N",(function(e,t){"use strict";var n,r="object"==typeof Reflect?Reflect:null,i=r&&"function"==typeof r.apply?r.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};n=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,n)}(e,i,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var i,o,a,s;if(l(n),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=c(e))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=d.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}function g(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var 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 l=o[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var c=l.length,u=m(l,c);for(n=0;n<c;++n)i(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return u(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return u(this,e,t,!0)},a.prototype.once=function(e,t){return l(t),this.on(e,f(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,f(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,o,a;if(l(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(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},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var 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},a.prototype.listeners=function(e){return h(this,e,!0)},a.prototype.rawListeners=function(e){return h(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}})),a.register("3vqBO",(function(e,t){e.exports=a("3oV8N").EventEmitter})),a.register("k9Eb1",(function(e,t){"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,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=a("bqBrJ").Buffer,s=a("1DJXa").inspect,l=s&&s.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,a,c;return t=e,a=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,r,i=o.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,r=s,o.prototype.copy.call(t,n,r),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),0==(e-=o)){o===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return s(this,function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?n(Object(i),!0).forEach((function(t){r(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}],a&&i(t.prototype,a),c&&i(t,c),e}()})),a.register("6hWXN",(function(e,t){var n=a("ePtPP");function r(e,t){o(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var a=this,s=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return s||l?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(o,this,e)):n.nextTick(o,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?a._writableState?a._writableState.errorEmitted?n.nextTick(i,a):(a._writableState.errorEmitted=!0,n.nextTick(r,a,e)):n.nextTick(r,a,e):t?(n.nextTick(i,a),t(e)):n.nextTick(i,a)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}})),a.register("56mX2",(function(e,t){"use strict";var n=a("aOgJu").codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}})),a.register("aOgJu",(function(t,n){var r;e(t.exports,"codes",(()=>r),(e=>r=e));var i={};function o(e,t,n){n||(n=Error);var r=function(e){var n,r;function i(n,r,i){return e.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,i))||this}return r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);r.prototype.name=n.name,r.prototype.code=e,i[e]=r}function a(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i,o,s;if("string"==typeof t&&(i="not ",t.substr(!o||o<0?0:+o,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(a(t,"type"));else{var l=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(a(t,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),r=i})),a.register("jqAKP",(function(e,t){var n=a("ePtPP"),r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=u;var i=a("kZTRI"),o=a("gihud");a("5jAh8")(u,i);for(var s=r(o.prototype),l=0;l<s.length;l++){var c=s[l];u.prototype[c]||(u.prototype[c]=o.prototype[c])}function u(e){if(!(this instanceof u))return new u(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",d)))}function d(){this._writableState.ended||n.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})})),a.register("gihud",(function(e,n){var r,i=a("ePtPP");function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=E,E.WritableState=A;var s={deprecate:a("aAtir")},l=a("3vqBO"),c=a("bqBrJ").Buffer,u=t.Uint8Array||function(){};var d,f=a("6hWXN"),h=a("56mX2").getHighWaterMark,p=a("aOgJu").codes,m=p.ERR_INVALID_ARG_TYPE,g=p.ERR_METHOD_NOT_IMPLEMENTED,v=p.ERR_MULTIPLE_CALLBACK,y=p.ERR_STREAM_CANNOT_PIPE,b=p.ERR_STREAM_DESTROYED,w=p.ERR_STREAM_NULL_VALUES,x=p.ERR_STREAM_WRITE_AFTER_END,S=p.ERR_UNKNOWN_ENCODING,M=f.errorOrDestroy;function _(){}function A(e,t,n){r=r||a("jqAKP"),e=e||{},"boolean"!=typeof n&&(n=t instanceof r),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!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,o=n.writecb;if("function"!=typeof o)throw new v;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.nextTick(o,r),i.nextTick(R,e,t),e._writableState.errorEmitted=!0,M(e,r)):(o(r),e._writableState.errorEmitted=!0,M(e,r),R(e,t))}(e,n,r,t,o);else{var a=I(n)||e.destroyed;a||n.corked||n.bufferProcessing||!n.bufferedRequest||T(e,n),r?i.nextTick(k,e,n,a,o):k(e,n,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function E(e){var t=this instanceof(r=r||a("jqAKP"));if(!t&&!d.call(E,this))return new E(e);this._writableState=new A(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function C(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function k(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),R(e,t)}function T(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var s=0,l=!0;n;)i[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;i.allBuffers=l,C(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,u=n.encoding,d=n.callback;if(C(e,t,!1,t.objectMode?1:c.length,c,u,d),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function I(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final((function(n){t.pendingcb--,n&&M(e,n),t.prefinished=!0,e.emit("prefinish"),R(e,t)}))}function R(e,t){var n=I(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(O,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}a("5jAh8")(E,l),A.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(A.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===E&&(e&&e._writableState instanceof A)}})):d=function(e){return e instanceof this},E.prototype.pipe=function(){M(this,new y)},E.prototype.write=function(e,t,n){var r,o=this._writableState,a=!1,s=!o.objectMode&&(r=e,c.isBuffer(r)||r instanceof u);return s&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=_),o.ending?function(e,t){var n=new x;M(e,n),i.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var o;return null===n?o=new w:"string"==typeof n||t.objectMode||(o=new m("chunk",["string","Buffer"],n)),!o||(M(e,o),i.nextTick(r,o),!1)}(this,o,e,n))&&(o.pendingcb++,a=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,n));return t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else C(e,t,!1,s,r,i,o);return l}(this,o,s,e,t,n)),a},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||T(this,e))},E.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 S(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,n){n(new g("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,R(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=f.destroy,E.prototype._undestroy=f.undestroy,E.prototype._destroy=function(e,t){t(e)}})),a.register("aAtir",(function(e,n){function r(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(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}})),a.register("28kcI",(function(t,n){var r;e(t.exports,"StringDecoder",(()=>r),(e=>r=e));var i=a("8ByQm").Buffer,o=i.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 s(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&&(i.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=d,t=4;break;case"utf8":this.fillLast=c,t=4;break;case"base64":this.text=f,this.end=h,t=3;break;default:return this.write=p,void(this.end=m)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function l(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function c(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 u(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function d(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 h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function m(e){return e&&e.length?this.write(e):""}r=s,s.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||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=l(t[r]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if(i=l(t[r]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if(i=l(t[r]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},s.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}})),a.register("8ByQm",(function(e,t){
50
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var r,i;e(t.exports,"read",(()=>r),(e=>r=e)),e(t.exports,"write",(()=>i),(e=>i=e)),r=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,d=n?i-1:0,f=n?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-u)-1,h>>=-u,u+=s;u>0;o=256*o+e[t+d],d+=f,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=c}return(h?-1:1)*a*Math.pow(2,o-r)},i=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<<c)-1,d=u>>1,f=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=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-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,c+=i;c>0;e[n+h]=255&a,h+=p,a/=256,c-=8);e[n+h-p]|=128*m}})),a.register("9gzJO",(function(e,t){var n=a("ePtPP"),r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},i=/%[sdj%]/g;e.exports.format=function(e){if(!y(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(l(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(e).replace(i,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),s=r[n];n<o;s=r[++n])g(s)||!x(s)?a+=" "+s:a+=" "+l(s);return a},e.exports.deprecate=function(t,r){if(void 0!==n&&!0===n.noDeprecation)return t;if(void 0===n)return function(){return e.exports.deprecate(t,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),i=!0}return t.apply(this,arguments)}};var o={},s=/^$/;function l(t,n){var r={seen:[],stylize:u};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(n)?r.showHidden=n:n&&e.exports._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=c),d(r,t,r.depth)}function c(e,t){var n=l.styles[t];return n?"["+l.colors[n][0]+"m"+e+"["+l.colors[n][1]+"m":e}function u(e,t){return e}function d(t,n,r){if(t.customInspect&&n&&_(n.inspect)&&n.inspect!==e.exports.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return y(i)||(i=d(t,i,r)),i}var o=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(y(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(v(t))return e.stylize(""+t,"number");if(m(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(t,n);if(o)return o;var a=Object.keys(n),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),M(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(_(n)){var l=n.name?": "+n.name:"";return t.stylize("[Function"+l+"]","special")}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(S(n))return t.stylize(Date.prototype.toString.call(n),"date");if(M(n))return f(n)}var c,u="",x=!1,A=["{","}"];(p(n)&&(x=!0,A=["[","]"]),_(n))&&(u=" [Function"+(n.name?": "+n.name:"")+"]");return w(n)&&(u=" "+RegExp.prototype.toString.call(n)),S(n)&&(u=" "+Date.prototype.toUTCString.call(n)),M(n)&&(u=" "+f(n)),0!==a.length||x&&0!=n.length?r<0?w(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),c=x?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)T(t,String(a))?o.push(h(e,t,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(h(e,t,n,r,i,!0))})),o}(t,n,r,s,a):a.map((function(e){return h(t,n,r,s,e,x)})),t.seen.pop(),function(e,t,n){var r=e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);return r>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(c,u,A)):A[0]+u+A[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,i,o){var a,s,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),T(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=g(n)?d(e,l.value,null):d(e,l.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),b(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function g(e){return null===e}function v(e){return"number"==typeof e}function y(e){return"string"==typeof e}function b(e){return void 0===e}function w(e){return x(e)&&"[object RegExp]"===A(e)}function x(e){return"object"==typeof e&&null!==e}function S(e){return x(e)&&"[object Date]"===A(e)}function M(e){return x(e)&&("[object Error]"===A(e)||e instanceof Error)}function _(e){return"function"==typeof e}function A(e){return Object.prototype.toString.call(e)}function E(e){return e<10?"0"+e.toString(10):e.toString(10)}e.exports.debuglog=function(t){if(t=t.toUpperCase(),!o[t])if(s.test(t)){var r=n.pid;o[t]=function(){var n=e.exports.format.apply(e.exports,arguments);console.error("%s %d: %s",t,r,n)}}else o[t]=function(){};return o[t]},e.exports.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.exports.types=a("bM5Oe"),e.exports.isArray=p,e.exports.isBoolean=m,e.exports.isNull=g,e.exports.isNullOrUndefined=function(e){return null==e},e.exports.isNumber=v,e.exports.isString=y,e.exports.isSymbol=function(e){return"symbol"==typeof e},e.exports.isUndefined=b,e.exports.isRegExp=w,e.exports.types.isRegExp=w,e.exports.isObject=x,e.exports.isDate=S,e.exports.types.isDate=S,e.exports.isError=M,e.exports.types.isNativeError=M,e.exports.isFunction=_,e.exports.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},e.exports.isBuffer=a("jPRhY");var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(){var e=new Date,t=[E(e.getHours()),E(e.getMinutes()),E(e.getSeconds())].join(":");return[e.getDate(),C[e.getMonth()],t].join(" ")}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports.log=function(){console.log("%s - %s",k(),e.exports.format.apply(e.exports,arguments))},e.exports.inherits=a("5jAh8"),e.exports._extend=function(e,t){if(!t||!x(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var I="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function O(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}e.exports.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(I&&e[I]){var t;if("function"!=typeof(t=e[I]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,I,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(e,r){e?n(e):t(r)}));try{e.apply(this,i)}catch(e){n(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),I&&Object.defineProperty(t,I,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,r(e))},e.exports.promisify.custom=I,e.exports.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var i=t.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return i.apply(o,arguments)};e.apply(this,t).then((function(e){n.nextTick(a.bind(null,null,e))}),(function(e){n.nextTick(O.bind(null,e,a))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,r(e)),t}})),a.register("ePtPP",(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 l,c=[],u=!1,d=-1;function f(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&h())}function h(){if(!u){var e=s(f);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!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];c.push(new p(e,t)),1!==c.length||u||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}})),a.register("bM5Oe",(function(e,t){"use strict";var n=a("3vY4Y"),r=a("jgq2W"),i=a("8yoeR"),o=a("doLxT");function s(e){return e.call.bind(e)}var l="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,u=s(Object.prototype.toString),d=s(Number.prototype.valueOf),f=s(String.prototype.valueOf),h=s(Boolean.prototype.valueOf);if(l)var p=s(BigInt.prototype.valueOf);if(c)var m=s(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function v(e){return"[object Map]"===u(e)}function y(e){return"[object Set]"===u(e)}function b(e){return"[object WeakMap]"===u(e)}function w(e){return"[object WeakSet]"===u(e)}function x(e){return"[object ArrayBuffer]"===u(e)}function S(e){return"undefined"!=typeof ArrayBuffer&&(x.working?x(e):e instanceof ArrayBuffer)}function M(e){return"[object DataView]"===u(e)}function _(e){return"undefined"!=typeof DataView&&(M.working?M(e):e instanceof DataView)}e.exports.isArgumentsObject=n,e.exports.isGeneratorFunction=r,e.exports.isTypedArray=o,e.exports.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},e.exports.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):o(e)||_(e)},e.exports.isUint8Array=function(e){return"Uint8Array"===i(e)},e.exports.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===i(e)},e.exports.isUint16Array=function(e){return"Uint16Array"===i(e)},e.exports.isUint32Array=function(e){return"Uint32Array"===i(e)},e.exports.isInt8Array=function(e){return"Int8Array"===i(e)},e.exports.isInt16Array=function(e){return"Int16Array"===i(e)},e.exports.isInt32Array=function(e){return"Int32Array"===i(e)},e.exports.isFloat32Array=function(e){return"Float32Array"===i(e)},e.exports.isFloat64Array=function(e){return"Float64Array"===i(e)},e.exports.isBigInt64Array=function(e){return"BigInt64Array"===i(e)},e.exports.isBigUint64Array=function(e){return"BigUint64Array"===i(e)},v.working="undefined"!=typeof Map&&v(new Map),e.exports.isMap=function(e){return"undefined"!=typeof Map&&(v.working?v(e):e instanceof Map)},y.working="undefined"!=typeof Set&&y(new Set),e.exports.isSet=function(e){return"undefined"!=typeof Set&&(y.working?y(e):e instanceof Set)},b.working="undefined"!=typeof WeakMap&&b(new WeakMap),e.exports.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(b.working?b(e):e instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),e.exports.isWeakSet=function(e){return w(e)},x.working="undefined"!=typeof ArrayBuffer&&x(new ArrayBuffer),e.exports.isArrayBuffer=S,M.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&M(new DataView(new ArrayBuffer(1),0,1)),e.exports.isDataView=_;var A="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function E(e){return"[object SharedArrayBuffer]"===u(e)}function C(e){return void 0!==A&&(void 0===E.working&&(E.working=E(new A)),E.working?E(e):e instanceof A)}function k(e){return g(e,d)}function T(e){return g(e,f)}function I(e){return g(e,h)}function O(e){return l&&g(e,p)}function R(e){return c&&g(e,m)}e.exports.isSharedArrayBuffer=C,e.exports.isAsyncFunction=function(e){return"[object AsyncFunction]"===u(e)},e.exports.isMapIterator=function(e){return"[object Map Iterator]"===u(e)},e.exports.isSetIterator=function(e){return"[object Set Iterator]"===u(e)},e.exports.isGeneratorObject=function(e){return"[object Generator]"===u(e)},e.exports.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===u(e)},e.exports.isNumberObject=k,e.exports.isStringObject=T,e.exports.isBooleanObject=I,e.exports.isBigIntObject=O,e.exports.isSymbolObject=R,e.exports.isBoxedPrimitive=function(e){return k(e)||T(e)||I(e)||O(e)||R(e)},e.exports.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(S(e)||C(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e.exports,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))})),a.register("3vY4Y",(function(e,t){"use strict";var n=a("gp4q4")(),r=a("6pFFa")("Object.prototype.toString"),i=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===r(e)},o=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==r(e)&&"[object Function]"===r(e.callee)},s=function(){return i(arguments)}();i.isLegacyArguments=o,e.exports=s?i:o})),a.register("gp4q4",(function(e,t){"use strict";var n=a("fPlzF");e.exports=function(){return n()&&!!Symbol.toStringTag}})),a.register("fPlzF",(function(e,t){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}})),a.register("6pFFa",(function(e,t){"use strict";var n=a("3kYrO"),r=a("1Mwz1"),i=r(n("String.prototype.indexOf"));e.exports=function(e,t){var o=n(e,!!t);return"function"==typeof o&&i(e,".prototype.")>-1?r(o):o}})),a.register("3kYrO",(function(e,t){"use strict";var n,r=SyntaxError,i=Function,o=TypeError,s=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(e){l=null}var c=function(){throw new o},u=l?function(){try{return c}catch(e){try{return l(arguments,"callee").get}catch(e){return c}}}():c,d=a("l5rv7")(),f=Object.getPrototypeOf||function(e){return e.__proto__},h={},p="undefined"==typeof Uint8Array?n:f(Uint8Array),m={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":d?f([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d?f(f([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&d?f((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&d?f((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d?f(""[Symbol.iterator]()):n,"%Symbol%":d?Symbol:n,"%SyntaxError%":r,"%ThrowTypeError%":u,"%TypedArray%":p,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},g=function e(t){var n;if("%AsyncFunction%"===t)n=s("async function () {}");else if("%GeneratorFunction%"===t)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=s("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(n=f(i.prototype))}return m[t]=n,n},v={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},y=a("2JiOr"),b=a("c5f2w"),w=y.call(Function.call,Array.prototype.concat),x=y.call(Function.apply,Array.prototype.splice),S=y.call(Function.call,String.prototype.replace),M=y.call(Function.call,String.prototype.slice),_=y.call(Function.call,RegExp.prototype.exec),A=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,E=/\\(\\)?/g,C=function(e){var t=M(e,0,1),n=M(e,-1);if("%"===t&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new r("invalid intrinsic syntax, expected opening `%`");var i=[];return S(e,A,(function(e,t,n,r){i[i.length]=n?S(r,E,"$1"):t||e})),i},k=function(e,t){var n,i=e;if(b(v,i)&&(i="%"+(n=v[i])[0]+"%"),b(m,i)){var a=m[i];if(a===h&&(a=g(i)),void 0===a&&!t)throw new o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:a}}throw new r("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new o('"allowMissing" argument must be a boolean');if(null===_(/^%?[^%]*%?$/,e))throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=C(e),i=n.length>0?n[0]:"",a=k("%"+i+"%",t),s=a.name,c=a.value,u=!1,d=a.alias;d&&(i=d[0],x(n,w([0,1],d)));for(var f=1,h=!0;f<n.length;f+=1){var p=n[f],g=M(p,0,1),v=M(p,-1);if(('"'===g||"'"===g||"`"===g||'"'===v||"'"===v||"`"===v)&&g!==v)throw new r("property names with quotes must have matching quotes");if("constructor"!==p&&h||(u=!0),b(m,s="%"+(i+="."+p)+"%"))c=m[s];else if(null!=c){if(!(p in c)){if(!t)throw new o("base intrinsic for "+e+" exists, but the property is not available.");return}if(l&&f+1>=n.length){var y=l(c,p);c=(h=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[p]}else h=b(c,p),c=c[p];h&&!u&&(m[s]=c)}}return c}})),a.register("l5rv7",(function(e,t){"use strict";var n="undefined"!=typeof Symbol&&Symbol,r=a("fPlzF");e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&r())))}})),a.register("2JiOr",(function(e,t){"use strict";var n=a("5DpJt");e.exports=Function.prototype.bind||n})),a.register("5DpJt",(function(e,t){"use strict";var n="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,i=Object.prototype.toString,o="[object Function]";e.exports=function(e){var t=this;if("function"!=typeof t||i.call(t)!==o)throw new TypeError(n+t);for(var a,s=r.call(arguments,1),l=function(){if(this instanceof a){var n=t.apply(this,s.concat(r.call(arguments)));return Object(n)===n?n:this}return t.apply(e,s.concat(r.call(arguments)))},c=Math.max(0,t.length-s.length),u=[],d=0;d<c;d++)u.push("$"+d);if(a=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(l),t.prototype){var f=function(){};f.prototype=t.prototype,a.prototype=new f,f.prototype=null}return a}})),a.register("c5f2w",(function(e,t){"use strict";var n=a("2JiOr");e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)})),a.register("1Mwz1",(function(e,t){"use strict";var n=a("2JiOr"),r=a("3kYrO"),i=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),s=r("%Reflect.apply%",!0)||n.call(o,i),l=r("%Object.getOwnPropertyDescriptor%",!0),c=r("%Object.defineProperty%",!0),u=r("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=s(n,o,arguments);if(l&&c){var r=l(t,"length");r.configurable&&c(t,"length",{value:1+u(0,e.length-(arguments.length-1))})}return t};var d=function(){return s(n,i,arguments)};c?c(e.exports,"apply",{value:d}):e.exports.apply=d})),a.register("jgq2W",(function(e,t){"use strict";var n,r=Object.prototype.toString,i=Function.prototype.toString,o=/^\s*(?:function)?\*/,s=a("gp4q4")(),l=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(o.test(i.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===r.call(e);if(!l)return!1;if(void 0===n){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&l(t)}return l(e)===n}})),a.register("8yoeR",(function(e,n){"use strict";var r=a("kz55o"),i=a("5gqKI"),o=a("6pFFa"),s=a("8WWik"),l=o("Object.prototype.toString"),c=a("gp4q4")(),u="undefined"==typeof globalThis?t:globalThis,d=i(),f=o("String.prototype.slice"),h={},p=Object.getPrototypeOf;c&&s&&p&&r(d,(function(e){if("function"==typeof u[e]){var t=new u[e];if(Symbol.toStringTag in t){var n=p(t),r=s(n,Symbol.toStringTag);if(!r){var i=p(n);r=s(i,Symbol.toStringTag)}h[e]=r.get}}}));var m=a("doLxT");e.exports=function(e){return!!m(e)&&(c&&Symbol.toStringTag in e?function(e){var t=!1;return r(h,(function(n,r){if(!t)try{var i=n.call(e);i===r&&(t=i)}catch(e){}})),t}(e):f(l(e),8,-1))}})),a.register("kz55o",(function(e,t){"use strict";var n=a("4Z0y4"),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,o=function(e,t,n){for(var r=0,o=e.length;r<o;r++)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))},s=function(e,t,n){for(var r=0,i=e.length;r<i;r++)null==n?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)},l=function(e,t,n){for(var r in e)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))};e.exports=function(e,t,i){if(!n(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=i),"[object Array]"===r.call(e)?o(e,t,a):"string"==typeof e?s(e,t,a):l(e,t,a)}})),a.register("4Z0y4",(function(e,t){"use strict";var n,r,i=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{n=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,n)}catch(e){e!==r&&(o=null)}else o=null;var a=/^\s*class\b/,s=function(e){try{var t=i.call(e);return a.test(t)}catch(e){return!1}},l=function(e){try{return!s(e)&&(i.call(e),!0)}catch(e){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,d=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var h=document.all;c.call(h)===c.call(document.all)&&(f=function(e){if((d||!e)&&(void 0===e||"object"==typeof e))try{var t=c.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,n)}catch(e){if(e!==r)return!1}return!s(e)&&l(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(u)return l(e);if(s(e))return!1;var t=c.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&l(e)}})),a.register("5gqKI",(function(e,n){"use strict";var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?t:globalThis;e.exports=function(){for(var e=[],t=0;t<r.length;t++)"function"==typeof i[r[t]]&&(e[e.length]=r[t]);return e}})),a.register("8WWik",(function(e,t){"use strict";var n=a("3kYrO")("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n})),a.register("doLxT",(function(e,n){"use strict";var r=a("kz55o"),i=a("5gqKI"),o=a("6pFFa"),s=o("Object.prototype.toString"),l=a("gp4q4")(),c=a("8WWik"),u="undefined"==typeof globalThis?t:globalThis,d=i(),f=o("Array.prototype.indexOf",!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},h=o("String.prototype.slice"),p={},m=Object.getPrototypeOf;l&&c&&m&&r(d,(function(e){var t=new u[e];if(Symbol.toStringTag in t){var n=m(t),r=c(n,Symbol.toStringTag);if(!r){var i=m(n);r=c(i,Symbol.toStringTag)}p[e]=r.get}}));e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!l||!(Symbol.toStringTag in e)){var t=h(s(e),8,-1);return f(d,t)>-1}return!!c&&function(e){var t=!1;return r(p,(function(n,r){if(!t)try{t=n.call(e)===r}catch(e){}})),t}(e)}})),a.register("jPRhY",(function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}})),a.register("5jAh8",(function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}})),a.register("fnFC9",(function(e,n){var r=a("fB4ch"),i=a("9QxiN"),o=a("iCrCa"),s=a("7X2JB"),l=a("8iXHm"),c=e.exports;c.request=function(e,n){e="string"==typeof e?l.parse(e):o(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||i,s=e.hostname||e.host,c=e.port,u=e.path||"/";s&&-1!==s.indexOf(":")&&(s="["+s+"]"),e.url=(s?a+"//"+s:"")+(c?":"+c:"")+u,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var d=new r(e);return n&&d.on("response",n),d},c.get=function(e,t){var n=c.request(e,t);return n.end(),n},c.ClientRequest=r,c.IncomingMessage=i.IncomingMessage,c.Agent=function(){},c.Agent.defaultMaxSockets=4,c.globalAgent=new c.Agent,c.STATUS_CODES=s,c.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]})),a.register("fB4ch",(function(e,n){var r=a("bqBrJ").Buffer,i=a("ePtPP"),o=a("7lggT"),s=a("5jAh8"),l=a("9QxiN"),c=a("8IqCp"),u=l.IncomingMessage,d=l.readyStates;var f=e.exports=function(e){var t,n=this;c.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+r.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var i=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)i=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}n._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":"text"}(t,i),n._fetchTimer=null,n._socketTimeout=null,n._socketTimer=null,n.on("finish",(function(){n._onFinish()}))};s(f,c.Writable),f.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===h.indexOf(n)&&(this._headers[n]={name:e,value:t})},f.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},f.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},f.prototype._onFinish=function(){var e=this;if(!e._destroyed){var n=e._opts;"timeout"in n&&0!==n.timeout&&e.setTimeout(n.timeout);var r=e._headers,a=null;"GET"!==n.method&&"HEAD"!==n.method&&(a=new Blob(e._body,{type:(r["content-type"]||{}).value||""}));var s=[];if(Object.keys(r).forEach((function(e){var t=r[e].name,n=r[e].value;Array.isArray(n)?n.forEach((function(e){s.push([t,e])})):s.push([t,n])})),"fetch"===e._mode){var l=null;if(o.abortController){var c=new AbortController;l=c.signal,e._fetchAbortController=c,"requestTimeout"in n&&0!==n.requestTimeout&&(e._fetchTimer=t.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),n.requestTimeout))}t.fetch(e._opts.url,{method:e._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:n.withCredentials?"include":"same-origin",signal:l}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var u=e._xhr=new t.XMLHttpRequest;try{u.open(e._opts.method,e._opts.url,!0)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}"responseType"in u&&(u.responseType=e._mode),"withCredentials"in u&&(u.withCredentials=!!n.withCredentials),"text"===e._mode&&"overrideMimeType"in u&&u.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in n&&(u.timeout=n.requestTimeout,u.ontimeout=function(){e.emit("requestTimeout")}),s.forEach((function(e){u.setRequestHeader(e[0],e[1])})),e._response=null,u.onreadystatechange=function(){switch(u.readyState){case d.LOADING:case d.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(u.onprogress=function(){e._onXHRProgress()}),u.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{u.send(a)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}}}},f.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},f.prototype._connect=function(){var e=this;e._destroyed||(e._response=new u(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},f.prototype._write=function(e,t,n){this._body.push(e),n()},f.prototype._resetTimers=function(e){var n=this;t.clearTimeout(n._socketTimer),n._socketTimer=null,e?(t.clearTimeout(n._fetchTimer),n._fetchTimer=null):n._socketTimeout&&(n._socketTimer=t.setTimeout((function(){n.emit("timeout")}),n._socketTimeout))},f.prototype.abort=f.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},f.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=void 0),c.Writable.prototype.end.call(this,e,t,n)},f.prototype.setTimeout=function(e,t){var n=this;t&&n.once("timeout",t),n._socketTimeout=e,n._resetTimers(!1)},f.prototype.flushHeaders=function(){},f.prototype.setNoDelay=function(){},f.prototype.setSocketKeepAlive=function(){};var h=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]})),a.register("7lggT",(function(n,r){var i,o,a,s,l,c,u,d;function f(){if(void 0!==d)return d;if(t.XMLHttpRequest){d=new t.XMLHttpRequest;try{d.open("GET",t.XDomainRequest?"/":"https://example.com")}catch(e){d=null}}else d=null;return d}function h(e){var t=f();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function p(e){return"function"==typeof e}e(n.exports,"fetch",(()=>i),(e=>i=e)),e(n.exports,"writableStream",(()=>o),(e=>o=e)),e(n.exports,"abortController",(()=>a),(e=>a=e)),e(n.exports,"arraybuffer",(()=>s),(e=>s=e)),e(n.exports,"msstream",(()=>l),(e=>l=e)),e(n.exports,"mozchunkedarraybuffer",(()=>c),(e=>c=e)),e(n.exports,"overrideMimeType",(()=>u),(e=>u=e)),i=p(t.fetch)&&p(t.ReadableStream),o=p(t.WritableStream),a=p(t.AbortController),s=i||h("arraybuffer"),l=!i&&h("ms-stream"),c=!i&&h("moz-chunked-arraybuffer"),u=i||!!f()&&p(f().overrideMimeType),d=null})),a.register("9QxiN",(function(n,r){var i,o;e(n.exports,"readyStates",(()=>i),(e=>i=e)),e(n.exports,"IncomingMessage",(()=>o),(e=>o=e));var s=a("bqBrJ").Buffer,l=a("ePtPP"),c=a("7lggT"),u=a("5jAh8"),d=a("8IqCp"),f=i={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},h=o=function(e,t,n,r){var i=this;if(d.Readable.call(i),i._mode=n,i.headers={},i.rawHeaders=[],i.trailers={},i.rawTrailers=[],i.on("end",(function(){l.nextTick((function(){i.emit("close")}))})),"fetch"===n){if(i._fetchResponse=t,i.url=t.url,i.statusCode=t.status,i.statusMessage=t.statusText,t.headers.forEach((function(e,t){i.headers[t.toLowerCase()]=e,i.rawHeaders.push(t,e)})),c.writableStream){var o=new WritableStream({write:function(e){return r(!1),new Promise((function(t,n){i._destroyed?n():i.push(s.from(e))?t():i._resumeFetch=t}))},close:function(){r(!0),i._destroyed||i.push(null)},abort:function(e){r(!0),i._destroyed||i.emit("error",e)}});try{return void t.body.pipeTo(o).catch((function(e){r(!0),i._destroyed||i.emit("error",e)}))}catch(e){}}var a=t.body.getReader();!function e(){a.read().then((function(t){i._destroyed||(r(t.done),t.done?i.push(null):(i.push(s.from(t.value)),e()))})).catch((function(e){r(!0),i._destroyed||i.emit("error",e)}))}()}else{if(i._xhr=e,i._pos=0,i.url=e.responseURL,i.statusCode=e.status,i.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===i.headers[n]&&(i.headers[n]=[]),i.headers[n].push(t[2])):void 0!==i.headers[n]?i.headers[n]+=", "+t[2]:i.headers[n]=t[2],i.rawHeaders.push(t[1],t[2])}})),i._charset="x-user-defined",!c.overrideMimeType){var u=i.rawHeaders["mime-type"];if(u){var f=u.match(/;\s*charset=([^;])(;|$)/);f&&(i._charset=f[1].toLowerCase())}i._charset||(i._charset="utf-8")}}};u(h,d.Readable),h.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},h.prototype._onXHRProgress=function(e){var n=this,r=n._xhr,i=null;switch(n._mode){case"text":if((i=r.responseText).length>n._pos){var o=i.substr(n._pos);if("x-user-defined"===n._charset){for(var a=s.alloc(o.length),l=0;l<o.length;l++)a[l]=255&o.charCodeAt(l);n.push(a)}else n.push(o,n._charset);n._pos=i.length}break;case"arraybuffer":if(r.readyState!==f.DONE||!r.response)break;i=r.response,n.push(s.from(new Uint8Array(i)));break;case"moz-chunked-arraybuffer":if(i=r.response,r.readyState!==f.LOADING||!i)break;n.push(s.from(new Uint8Array(i)));break;case"ms-stream":if(i=r.response,r.readyState!==f.LOADING)break;var c=new t.MSStreamReader;c.onprogress=function(){c.result.byteLength>n._pos&&(n.push(s.from(new Uint8Array(c.result.slice(n._pos)))),n._pos=c.result.byteLength)},c.onload=function(){e(!0),n.push(null)},c.readAsArrayBuffer(i)}n._xhr.readyState===f.DONE&&"ms-stream"!==n._mode&&(e(!0),n.push(null))}})),a.register("8IqCp",(function(e,t){(t=e.exports=a("kZTRI")).Stream=t,t.Readable=t,t.Writable=a("gihud"),t.Duplex=a("jqAKP"),t.Transform=a("erC5i"),t.PassThrough=a("3dCe5"),t.finished=a("j5ZwK"),t.pipeline=a("azGNy")})),a.register("kZTRI",(function(e,n){var r,i=a("ePtPP");e.exports=E,E.ReadableState=A;a("3oV8N").EventEmitter;var o=function(e,t){return e.listeners(t).length},s=a("3vqBO"),l=a("bqBrJ").Buffer,c=t.Uint8Array||function(){};var u,d=a("1DJXa");u=d&&d.debuglog?d.debuglog("stream"):function(){};var f,h,p,m=a("k9Eb1"),g=a("6hWXN"),v=a("56mX2").getHighWaterMark,y=a("aOgJu").codes,b=y.ERR_INVALID_ARG_TYPE,w=y.ERR_STREAM_PUSH_AFTER_EOF,x=y.ERR_METHOD_NOT_IMPLEMENTED,S=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;a("5jAh8")(E,s);var M=g.errorOrDestroy,_=["error","close","destroy","pause","resume"];function A(e,t,n){r=r||a("jqAKP"),e=e||{},"boolean"!=typeof n&&(n=t instanceof r),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=v(this,e,"readableHighWaterMark",n),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=a("28kcI").StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function E(e){if(r=r||a("jqAKP"),!(this instanceof E))return new E(e);var t=this instanceof r;this._readableState=new A(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function C(e,t,n,r,i){u("readableAddChunk",t);var o,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(u("onEofChunk"),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,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,R(e)))}(e,a);else if(i||(o=function(e,t){var n;r=t,l.isBuffer(r)||r instanceof c||"string"==typeof t||void 0===t||e.objectMode||(n=new b("chunk",["string","Buffer","Uint8Array"],t));var r;return n}(a,t)),o)M(e,o);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),r)a.endEmitted?M(e,new S):k(e,a,t,!0);else if(a.ended)M(e,new w);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?k(e,a,t,!1):P(e,a)):k(e,a,t,!1)}else r||(a.reading=!1,P(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function k(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&O(e)),P(e,t)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=g.destroy,E.prototype._undestroy=g.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=l.from(e,t),t=""),n=!0),C(this,e,t,!1,n)},E.prototype.unshift=function(e){return C(this,e,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(e){f||(f=a("28kcI").StringDecoder);var t=new f(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,r="";null!==n;)r+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==r&&this._readableState.buffer.push(r),this._readableState.length=r.length,this};var T=1073741824;function I(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=T?e=T:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(R,e))}function R(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,j(e)}function P(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(u("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function L(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function D(e){u("readable nexttick read 0"),e.read(0)}function B(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function F(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function U(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(z,t,e))}function z(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function H(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}E.prototype.read=function(e){u("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?U(this):O(this),null;if(0===(e=I(e,t))&&t.ended)return 0===t.length&&U(this),null;var r,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&u("length less than watermark",i=!0),t.ended||t.reading?u("reading or ended",i=!1):i&&(u("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=I(n,t))),null===(r=e>0?F(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&U(this)),null!==r&&this.emit("data",r),r},E.prototype._read=function(e){M(this,new x("_read()"))},E.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,u("pipe count=%d opts=%j",r.pipesCount,t);var a=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?l:g;function s(t,i){u("onunpipe"),t===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",m),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",s),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",f),d=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function l(){u("onend"),e.end()}r.endEmitted?i.nextTick(a):n.once("end",a),e.on("unpipe",s);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,j(e))}}(n);e.on("drain",c);var d=!1;function f(t){u("ondata");var i=e.write(t);u("dest.write",i),!1===i&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==H(r.pipes,e))&&!d&&(u("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function h(t){u("onerror",t),g(),e.removeListener("error",h),0===o(e,"error")&&M(e,t)}function p(){e.removeListener("finish",m),g()}function m(){u("onfinish"),e.removeListener("close",p),g()}function g(){u("unpipe"),n.unpipe(e)}return n.on("data",f),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",p),e.once("finish",m),e.emit("pipe",n),r.flowing||(u("pipe resume"),n.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=H(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},E.prototype.on=function(e,t){var n=s.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,u("on readable",r.length,r.reading),r.length?O(this):r.reading||i.nextTick(D,this))),n},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var n=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(L,this),n},E.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(L,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(B,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<_.length;o++)e.on(_[o],this.emit.bind(this,_[o]));return this._read=function(t){u("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=a("5gKYZ")),h(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=F,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(e,t){return void 0===p&&(p=a("8igDo")),p(E,e,t)})})),a.register("3oV8N",(function(e,t){"use strict";var n,r="object"==typeof Reflect?Reflect:null,i=r&&"function"==typeof r.apply?r.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};n=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,n)}(e,i,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var i,o,a,s;if(l(n),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=c(e))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=d.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}function g(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var 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 l=o[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var c=l.length,u=m(l,c);for(n=0;n<c;++n)i(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return u(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return u(this,e,t,!0)},a.prototype.once=function(e,t){return l(t),this.on(e,f(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,f(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,o,a;if(l(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(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},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var 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},a.prototype.listeners=function(e){return h(this,e,!0)},a.prototype.rawListeners=function(e){return h(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}})),a.register("3vqBO",(function(e,t){e.exports=a("3oV8N").EventEmitter})),a.register("k9Eb1",(function(e,t){"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,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=a("bqBrJ").Buffer,s=a("1DJXa").inspect,l=s&&s.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,a,c;return t=e,a=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,r,i=o.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,r=s,o.prototype.copy.call(t,n,r),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),0==(e-=o)){o===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return s(this,function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?n(Object(i),!0).forEach((function(t){r(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}],a&&i(t.prototype,a),c&&i(t,c),e}()})),a.register("6hWXN",(function(e,t){var n=a("ePtPP");function r(e,t){o(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var a=this,s=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return s||l?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(o,this,e)):n.nextTick(o,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?a._writableState?a._writableState.errorEmitted?n.nextTick(i,a):(a._writableState.errorEmitted=!0,n.nextTick(r,a,e)):n.nextTick(r,a,e):t?(n.nextTick(i,a),t(e)):n.nextTick(i,a)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}})),a.register("56mX2",(function(e,t){"use strict";var n=a("aOgJu").codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}})),a.register("aOgJu",(function(t,n){var r;e(t.exports,"codes",(()=>r),(e=>r=e));var i={};function o(e,t,n){n||(n=Error);var r=function(e){var n,r;function i(n,r,i){return e.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,i))||this}return r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);r.prototype.name=n.name,r.prototype.code=e,i[e]=r}function a(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i,o,s;if("string"==typeof t&&(i="not ",t.substr(!o||o<0?0:+o,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(a(t,"type"));else{var l=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(a(t,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),r=i})),a.register("jqAKP",(function(e,t){var n=a("ePtPP"),r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=u;var i=a("kZTRI"),o=a("gihud");a("5jAh8")(u,i);for(var s=r(o.prototype),l=0;l<s.length;l++){var c=s[l];u.prototype[c]||(u.prototype[c]=o.prototype[c])}function u(e){if(!(this instanceof u))return new u(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",d)))}function d(){this._writableState.ended||n.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})})),a.register("gihud",(function(e,n){var r,i=a("ePtPP");function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=E,E.WritableState=A;var s={deprecate:a("aAtir")},l=a("3vqBO"),c=a("bqBrJ").Buffer,u=t.Uint8Array||function(){};var d,f=a("6hWXN"),h=a("56mX2").getHighWaterMark,p=a("aOgJu").codes,m=p.ERR_INVALID_ARG_TYPE,g=p.ERR_METHOD_NOT_IMPLEMENTED,v=p.ERR_MULTIPLE_CALLBACK,y=p.ERR_STREAM_CANNOT_PIPE,b=p.ERR_STREAM_DESTROYED,w=p.ERR_STREAM_NULL_VALUES,x=p.ERR_STREAM_WRITE_AFTER_END,S=p.ERR_UNKNOWN_ENCODING,M=f.errorOrDestroy;function _(){}function A(e,t,n){r=r||a("jqAKP"),e=e||{},"boolean"!=typeof n&&(n=t instanceof r),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!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,o=n.writecb;if("function"!=typeof o)throw new v;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.nextTick(o,r),i.nextTick(R,e,t),e._writableState.errorEmitted=!0,M(e,r)):(o(r),e._writableState.errorEmitted=!0,M(e,r),R(e,t))}(e,n,r,t,o);else{var a=I(n)||e.destroyed;a||n.corked||n.bufferProcessing||!n.bufferedRequest||T(e,n),r?i.nextTick(k,e,n,a,o):k(e,n,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function E(e){var t=this instanceof(r=r||a("jqAKP"));if(!t&&!d.call(E,this))return new E(e);this._writableState=new A(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function C(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function k(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),R(e,t)}function T(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var s=0,l=!0;n;)i[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;i.allBuffers=l,C(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,u=n.encoding,d=n.callback;if(C(e,t,!1,t.objectMode?1:c.length,c,u,d),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function I(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final((function(n){t.pendingcb--,n&&M(e,n),t.prefinished=!0,e.emit("prefinish"),R(e,t)}))}function R(e,t){var n=I(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(O,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}a("5jAh8")(E,l),A.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(A.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===E&&(e&&e._writableState instanceof A)}})):d=function(e){return e instanceof this},E.prototype.pipe=function(){M(this,new y)},E.prototype.write=function(e,t,n){var r,o=this._writableState,a=!1,s=!o.objectMode&&(r=e,c.isBuffer(r)||r instanceof u);return s&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=_),o.ending?function(e,t){var n=new x;M(e,n),i.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var o;return null===n?o=new w:"string"==typeof n||t.objectMode||(o=new m("chunk",["string","Buffer"],n)),!o||(M(e,o),i.nextTick(r,o),!1)}(this,o,e,n))&&(o.pendingcb++,a=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,n));return t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else C(e,t,!1,s,r,i,o);return l}(this,o,s,e,t,n)),a},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||T(this,e))},E.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 S(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,n){n(new g("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,R(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=f.destroy,E.prototype._undestroy=f.undestroy,E.prototype._destroy=function(e,t){t(e)}})),a.register("aAtir",(function(e,n){function r(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(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}})),a.register("28kcI",(function(t,n){var r;e(t.exports,"StringDecoder",(()=>r),(e=>r=e));var i=a("8ByQm").Buffer,o=i.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 s(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&&(i.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=d,t=4;break;case"utf8":this.fillLast=c,t=4;break;case"base64":this.text=f,this.end=h,t=3;break;default:return this.write=p,void(this.end=m)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function l(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function c(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 u(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function d(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 h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function m(e){return e&&e.length?this.write(e):""}r=s,s.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||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=l(t[r]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if(i=l(t[r]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if(i=l(t[r]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},s.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}})),a.register("8ByQm",(function(e,t){
51
51
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
52
52
  var n=a("bqBrJ"),r=n.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return r(e,t,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,e.exports),e.exports.Buffer=o),o.prototype=Object.create(r.prototype),i(r,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=r(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}})),a.register("5gKYZ",(function(e,t){var n,r=a("ePtPP");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}var o=a("j5ZwK"),s=Symbol("lastResolve"),l=Symbol("lastReject"),c=Symbol("error"),u=Symbol("ended"),d=Symbol("lastPromise"),f=Symbol("handlePromise"),h=Symbol("stream");function p(e,t){return{value:e,done:t}}function m(e){var t=e[s];if(null!==t){var n=e[h].read();null!==n&&(e[d]=null,e[s]=null,e[l]=null,t(p(n,!1)))}}function g(e){r.nextTick(m,e)}var v=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[u])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise((function(t,n){r.nextTick((function(){e[c]?n(e[c]):t(p(void 0,!0))}))}));var n,i=this[d];if(i)n=new Promise(function(e,t){return function(n,r){e.then((function(){t[u]?n(p(void 0,!0)):t[f](n,r)}),r)}}(i,this));else{var o=this[h].read();if(null!==o)return Promise.resolve(p(o,!1));n=new Promise(this[f])}return this[d]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,n){e[h].destroy(null,(function(e){e?n(e):t(p(void 0,!0))}))}))})),n),v);e.exports=function(e){var t,n=Object.create(y,(i(t={},h,{value:e,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,l,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,u,{value:e._readableState.endEmitted,writable:!0}),i(t,f,{value:function(e,t){var r=n[h].read();r?(n[d]=null,n[s]=null,n[l]=null,e(p(r,!1))):(n[s]=e,n[l]=t)},writable:!0}),t));return n[d]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[l];return null!==t&&(n[d]=null,n[s]=null,n[l]=null,t(e)),void(n[c]=e)}var r=n[s];null!==r&&(n[d]=null,n[s]=null,n[l]=null,r(p(void 0,!0))),n[u]=!0})),e.on("readable",g.bind(null,n)),n}})),a.register("j5ZwK",(function(e,t){"use strict";var n=a("aOgJu").codes.ERR_STREAM_PREMATURE_CLOSE;function r(){}e.exports=function e(t,i,o){if("function"==typeof i)return e(t,null,i);i||(i={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(o||r);var a=i.readable||!1!==i.readable&&t.readable,s=i.writable||!1!==i.writable&&t.writable,l=function(){t.writable||u()},c=t._writableState&&t._writableState.finished,u=function(){s=!1,c=!0,a||o.call(t)},d=t._readableState&&t._readableState.endEmitted,f=function(){a=!1,d=!0,s||o.call(t)},h=function(e){o.call(t,e)},p=function(){var e;return a&&!d?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):s&&!c?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},m=function(){t.req.on("finish",u)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?s&&!t._writableState&&(t.on("end",l),t.on("close",l)):(t.on("complete",u),t.on("abort",p),t.req?m():t.on("request",m)),t.on("end",f),t.on("finish",u),!1!==i.error&&t.on("error",h),t.on("close",p),function(){t.removeListener("complete",u),t.removeListener("abort",p),t.removeListener("request",m),t.req&&t.req.removeListener("finish",u),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",u),t.removeListener("end",f),t.removeListener("error",h),t.removeListener("close",p)}}})),a.register("8igDo",(function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}})),a.register("erC5i",(function(e,t){"use strict";e.exports=u;var n=a("aOgJu").codes,r=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,l=a("jqAKP");function c(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new i);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function u(e){if(!(this instanceof u))return new u(e);l.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function d(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(t,n){f(e,t,n)}))}function f(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new s;if(e._transformState.transforming)throw new o;return e.push(null)}a("5jAh8")(u,l),u.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},u.prototype._transform=function(e,t,n){n(new r("_transform()"))},u.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)}},u.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},u.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,(function(e){t(e)}))}})),a.register("3dCe5",(function(e,t){"use strict";e.exports=r;var n=a("erC5i");function r(e){if(!(this instanceof r))return new r(e);n.call(this,e)}a("5jAh8")(r,n),r.prototype._transform=function(e,t,n){n(null,e)}})),a.register("azGNy",(function(e,t){"use strict";var n;var r=a("aOgJu").codes,i=r.ERR_MISSING_ARGS,o=r.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function l(e,t,r,i){i=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(i);var s=!1;e.on("close",(function(){s=!0})),void 0===n&&(n=a("j5ZwK")),n(e,{readable:t,writable:r},(function(e){if(e)return i(e);s=!0,i()}));var l=!1;return function(t){if(!s&&!l)return l=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void i(t||new o("pipe"))}}function c(e){e()}function u(e,t){return e.pipe(t)}function d(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}e.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=d(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new i("streams");var a=t.map((function(e,n){var i=n<t.length-1;return l(e,i,n>0,(function(e){r||(r=e),e&&a.forEach(c),i||(a.forEach(c),o(r))}))}));return t.reduce(u)}})),a.register("iCrCa",(function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var i in r)n.call(r,i)&&(e[i]=r[i])}return e};var n=Object.prototype.hasOwnProperty})),a.register("7X2JB",(function(e,t){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}})),a.register("8iXHm",(function(t,n){var r;e(t.exports,"parse",(()=>r),(e=>r=e));var i=a("izynC"),o=a("f5Jlg");function s(){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}r=x;var l=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(d),h=["%","/","?",";","#"].concat(f),p=["/","?","#"],m=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},y={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},w=a("WCmTO");function x(e,t,n){if(e&&o.isObject(e)&&e instanceof s)return e;var r=new s;return r.parse(e,t,n),r}s.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),a=-1!==r&&r<e.indexOf("#")?"?":"#",s=e.split(a);s[0]=s[0].replace(/\\/g,"/");var c=e=s.join(a);if(c=c.trim(),!n&&1===e.split("#").length){var d=u.exec(c);if(d)return this.path=c,this.href=c,this.pathname=d[1],d[2]?(this.search=d[2],this.query=t?w.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var x=l.exec(c);if(x){var S=(x=x[0]).toLowerCase();this.protocol=S,c=c.substr(x.length)}if(n||x||c.match(/^\/\/[^@\/]+@[^@\/]+/)){var M="//"===c.substr(0,2);!M||x&&y[x]||(c=c.substr(2),this.slashes=!0)}if(!y[x]&&(M||x&&!b[x])){for(var _,A,E=-1,C=0;C<p.length;C++){-1!==(k=c.indexOf(p[C]))&&(-1===E||k<E)&&(E=k)}-1!==(A=-1===E?c.lastIndexOf("@"):c.lastIndexOf("@",E))&&(_=c.slice(0,A),c=c.slice(A+1),this.auth=decodeURIComponent(_)),E=-1;for(C=0;C<h.length;C++){var k;-1!==(k=c.indexOf(h[C]))&&(-1===E||k<E)&&(E=k)}-1===E&&(E=c.length),this.host=c.slice(0,E),c=c.slice(E),this.parseHost(),this.hostname=this.hostname||"";var T="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!T)for(var I=this.hostname.split(/\./),O=(C=0,I.length);C<O;C++){var R=I[C];if(R&&!R.match(m)){for(var P="",N=0,L=R.length;N<L;N++)R.charCodeAt(N)>127?P+="x":P+=R[N];if(!P.match(m)){var D=I.slice(0,C),B=I.slice(C+1),j=R.match(g);j&&(D.push(j[1]),B.unshift(j[2])),B.length&&(c="/"+B.join(".")+c),this.hostname=D.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=i.toASCII(this.hostname));var F=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+F,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==c[0]&&(c="/"+c))}if(!v[S])for(C=0,O=f.length;C<O;C++){var z=f[C];if(-1!==c.indexOf(z)){var H=encodeURIComponent(z);H===z&&(H=escape(z)),c=c.split(z).join(H)}}var V=c.indexOf("#");-1!==V&&(this.hash=c.substr(V),c=c.slice(0,V));var W=c.indexOf("?");if(-1!==W?(this.search=c.substr(W),this.query=c.substr(W+1),t&&(this.query=w.parse(this.query)),c=c.slice(0,W)):t&&(this.search="",this.query={}),c&&(this.pathname=c),b[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var G=this.search||"";this.path=F+G}return this.href=this.format(),this},s.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||"",i=!1,a="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(a=w.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||b[t])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+i+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+r},s.prototype.resolve=function(e){return this.resolveObject(x(e,!1,!0)).format()},s.prototype.resolveObject=function(e){if(o.isString(e)){var t=new s;t.parse(e,!1,!0),e=t}for(var n=new s,r=Object.keys(this),i=0;i<r.length;i++){var a=r[i];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),c=0;c<l.length;c++){var u=l[c];"protocol"!==u&&(n[u]=e[u])}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 d=Object.keys(e),f=0;f<d.length;f++){var h=d[f];n[h]=e[h]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||y[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||"",g=n.search||"";n.path=m+g}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var v=n.pathname&&"/"===n.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),x=w||v||n.host&&e.pathname,S=x,M=n.pathname&&n.pathname.split("/")||[],_=(p=e.pathname&&e.pathname.split("/")||[],n.protocol&&!b[n.protocol]);if(_&&(n.hostname="",n.port=null,n.host&&(""===M[0]?M[0]=n.host:M.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),x=x&&(""===p[0]||""===M[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,M=p;else if(p.length)M||(M=[]),M.pop(),M=M.concat(p),n.search=e.search,n.query=e.query;else if(!o.isNullOrUndefined(e.search)){if(_)n.hostname=n.host=M.shift(),(T=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=T.shift(),n.host=n.hostname=T.shift());return n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!M.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var A=M.slice(-1)[0],E=(n.host||e.host||M.length>1)&&("."===A||".."===A)||""===A,C=0,k=M.length;k>=0;k--)"."===(A=M[k])?M.splice(k,1):".."===A?(M.splice(k,1),C++):C&&(M.splice(k,1),C--);if(!x&&!S)for(;C--;C)M.unshift("..");!x||""===M[0]||M[0]&&"/"===M[0].charAt(0)||M.unshift(""),E&&"/"!==M.join("/").substr(-1)&&M.push("");var T,I=""===M[0]||M[0]&&"/"===M[0].charAt(0);_&&(n.hostname=n.host=I?"":M.length?M.shift():"",(T=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=T.shift(),n.host=n.hostname=T.shift()));return(x=x||n.host&&M.length)&&!I&&M.unshift(""),M.length?n.pathname=M.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.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},s.prototype.parseHost=function(){var e=this.host,t=c.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}})),a.register("izynC",(function(e,n){!function(r){var i=n&&!n.nodeType&&n,o=e&&!e.nodeType&&e,a="object"==typeof t&&t;a.global!==a&&a.window!==a&&a.self!==a||(r=a);var s,l,c=2147483647,u=36,d=/^xn--/,f=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,g=String.fromCharCode;function v(e){throw new RangeError(p[e])}function y(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function b(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+y((e=e.replace(h,".")).split("."),t).join(".")}function w(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 x(e){return y(e,(function(e){var t="";return e>65535&&(t+=g((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=g(e)})).join("")}function S(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function M(e,t,n){var r=0;for(e=n?m(e/700):e>>1,e+=m(e/t);e>455;r+=u)e=m(e/35);return m(r+36*e/(e+38))}function _(e){var t,n,r,i,o,a,s,l,d,f,h,p=[],g=e.length,y=0,b=128,w=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&v("not-basic"),p.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<g;){for(o=y,a=1,s=u;i>=g&&v("invalid-input"),((l=(h=e.charCodeAt(i++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:u)>=u||l>m((c-y)/a))&&v("overflow"),y+=l*a,!(l<(d=s<=w?1:s>=w+26?26:s-w));s+=u)a>m(c/(f=u-d))&&v("overflow"),a*=f;w=M(y-o,t=p.length+1,0==o),m(y/t)>c-b&&v("overflow"),b+=m(y/t),y%=t,p.splice(y++,0,b)}return x(p)}function A(e){var t,n,r,i,o,a,s,l,d,f,h,p,y,b,x,_=[];for(p=(e=w(e)).length,t=128,n=0,o=72,a=0;a<p;++a)(h=e[a])<128&&_.push(g(h));for(r=i=_.length,i&&_.push("-");r<p;){for(s=c,a=0;a<p;++a)(h=e[a])>=t&&h<s&&(s=h);for(s-t>m((c-n)/(y=r+1))&&v("overflow"),n+=(s-t)*y,t=s,a=0;a<p;++a)if((h=e[a])<t&&++n>c&&v("overflow"),h==t){for(l=n,d=u;!(l<(f=d<=o?1:d>=o+26?26:d-o));d+=u)x=l-f,b=u-f,_.push(g(S(f+x%b,0))),l=m(x/b);_.push(g(S(l,0))),o=M(n,y,r==i),n=0,++r}++n,++t}return _.join("")}if(s={version:"1.4.1",ucs2:{decode:w,encode:x},decode:_,encode:A,toASCII:function(e){return b(e,(function(e){return f.test(e)?"xn--"+A(e):e}))},toUnicode:function(e){return b(e,(function(e){return d.test(e)?_(e.slice(4).toLowerCase()):e}))}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",(function(){return s}));else if(i&&o)if(e.exports==i)o.exports=s;else for(l in s)s.hasOwnProperty(l)&&(i[l]=s[l]);else r.punycode=s}(this)})),a.register("f5Jlg",(function(e,t){"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}}})),a.register("WCmTO",(function(t,n){var r,i;e(t.exports,"parse",(()=>r),(e=>r=e)),e(t.exports,"stringify",(()=>i),(e=>i=e)),r=a("irK6S"),i=a("h75Bs")})),a.register("irK6S",(function(e,t){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,i,o){t=t||"&",i=i||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var c=e.length;l>0&&c>l&&(c=l);for(var u=0;u<c;++u){var d,f,h,p,m=e[u].replace(s,"%20"),g=m.indexOf(i);g>=0?(d=m.substr(0,g),f=m.substr(g+1)):(d=m,f=""),h=decodeURIComponent(d),p=decodeURIComponent(f),n(a,h)?r(a[h])?a[h].push(p):a[h]=[a[h],p]:a[h]=p}return a};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}})),a.register("h75Bs",(function(e,t){"use strict";var n=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,a,s){return t=t||"&",a=a||"=",null===e&&(e=void 0),"object"==typeof e?i(o(e),(function(o){var s=encodeURIComponent(n(o))+a;return r(e[o])?i(e[o],(function(e){return s+encodeURIComponent(n(e))})).join(t):s+encodeURIComponent(n(e[o]))})).join(t):s?encodeURIComponent(n(s))+a+encodeURIComponent(n(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(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 o=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}})),a.register("hK5aC",(function(e,t){var n=a("fnFC9"),r=a("8iXHm"),i=e.exports;for(var o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);function s(e){if("string"==typeof e&&(e=r.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}i.request=function(e,t){return e=s(e),n.request.call(this,e,t)},i.get=function(e,t){return e=s(e),n.get.call(this,e,t)}})),a.register("805Dg",(function(t,n){var r;e(t.exports,"getOCSPURI",(()=>r),(e=>r=e));var i=a("5U18c"),o=a("1DJXa");o=a("1DJXa");r=function(e,t){var n=o["id-pkix-ocsp"].join("."),r=i.utils.toDER(e,"CERTIFICATE");r=o.Certificate.decode(r,"der"),i.utils.getAuthorityInfo(r,n,t)}})),a.register("9ZaT0",(function(t,n){var r;e(t.exports,"generate",(()=>r),(e=>r=e));var i=a("5U18c"),o=a("dc7aw"),s=a("1DJXa");s=a("1DJXa");function l(e){return o.createHash("sha1").update(e).digest()}r=function(e,t){var n,r;n=e.tbsCertificate?e:s.Certificate.decode(i.utils.toDER(e,"CERTIFICATE"),"der"),r=t.tbsCertificate?t:s.Certificate.decode(i.utils.toDER(t,"CERTIFICATE"),"der");var a=n.tbsCertificate,c=r.tbsCertificate,u={hashAlgorithm:{algorithm:[1,3,14,3,2,26]},issuerNameHash:l(s.Name.encode(a.issuer,"der")),issuerKeyHash:l(c.subjectPublicKeyInfo.subjectPublicKey.data),serialNumber:a.serialNumber},d={tbsRequest:{version:"v1",requestList:[{reqCert:u}],requestExtensions:[{extnID:s["id-pkix-ocsp-nonce"],critical:!1,extnValue:s.Nonce.encode(o.randomBytes(16),"der")}]}};return{id:l(s.CertID.encode(u,"der")),certID:u,data:s.OCSPRequest.encode(d,"der"),cert:n,issuer:r}}})),a.register("dc7aw",(function(t,n){var r,i,o;e(t.exports,"randomBytes",(()=>r),(e=>r=e)),e(t.exports,"createHash",(()=>i),(e=>i=e)),e(t.exports,"createVerify",(()=>o),(e=>o=e)),r=a("3xr1Z"),i=a("d8QYu"),a("7Q3Pj");var s=a("8zF5N"),l=Object.keys(s),c=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(l);var u=a("cabM3");u.pbkdf2,u.pbkdf2Sync;var d=a("3feuT");d.Cipher,d.createCipher,d.Cipheriv,d.createCipheriv,d.Decipher,d.createDecipher,d.Decipheriv,d.createDecipheriv,d.getCiphers,d.listCiphers;var f=a("hzteC");f.DiffieHellmanGroup,f.createDiffieHellmanGroup,f.getDiffieHellman,f.createDiffieHellman,f.DiffieHellman;var h=a("cD2JS");h.createSign,h.Sign,o=h.createVerify,h.Verify,a("5nTVb");var p=a("5IN4o");p.publicEncrypt,p.privateEncrypt,p.publicDecrypt,p.privateDecrypt;var m=a("lPq1P");m.randomFill,m.randomFillSync})),a.register("3xr1Z",(function(e,n){var r=a("ePtPP"),i=65536;var o=a("8ByQm").Buffer,s=t.crypto||t.msCrypto;s&&s.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var n=o.allocUnsafe(e);if(e>0)if(e>i)for(var a=0;a<e;a+=i)s.getRandomValues(n.slice(a,a+i));else s.getRandomValues(n);return"function"==typeof t?r.nextTick((function(){t(null,n)})):n}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}})),a.register("d8QYu",(function(e,t){"use strict";var n=a("5jAh8"),r=a("d5AKh"),i=a("akTKC"),o=a("5eKyq"),s=a("9HuUe");function l(e){s.call(this,"digest"),this._hash=e}n(l,s),l.prototype._update=function(e){this._hash.update(e)},l.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new r:"rmd160"===e||"ripemd160"===e?new i:new l(o(e))}})),a.register("d5AKh",(function(e,t){"use strict";var n=a("5jAh8"),r=a("hbeGo"),i=a("8ByQm").Buffer,o=new Array(16);function s(){r.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function l(e,t){return e<<t|e>>>32-t}function c(e,t,n,r,i,o,a){return l(e+(t&n|~t&r)+i+o|0,a)+t|0}function u(e,t,n,r,i,o,a){return l(e+(t&r|n&~r)+i+o|0,a)+t|0}function d(e,t,n,r,i,o,a){return l(e+(t^n^r)+i+o|0,a)+t|0}function f(e,t,n,r,i,o,a){return l(e+(n^(t|~r))+i+o|0,a)+t|0}n(s,r),s.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=d(n,r=u(r,i,a,n,e[12],2368359562,20),i,a,e[5],4294588738,4),a=d(a,n,r,i,e[8],2272392833,11),i=d(i,a,n,r,e[11],1839030562,16),r=d(r,i,a,n,e[14],4259657740,23),n=d(n,r,i,a,e[1],2763975236,4),a=d(a,n,r,i,e[4],1272893353,11),i=d(i,a,n,r,e[7],4139469664,16),r=d(r,i,a,n,e[10],3200236656,23),n=d(n,r,i,a,e[13],681279174,4),a=d(a,n,r,i,e[0],3936430074,11),i=d(i,a,n,r,e[3],3572445317,16),r=d(r,i,a,n,e[6],76029189,23),n=d(n,r,i,a,e[9],3654602809,4),a=d(a,n,r,i,e[12],3873151461,11),i=d(i,a,n,r,e[15],530742520,16),n=f(n,r=d(r,i,a,n,e[2],3299628645,23),i,a,e[0],4096336452,6),a=f(a,n,r,i,e[7],1126891415,10),i=f(i,a,n,r,e[14],2878612391,15),r=f(r,i,a,n,e[5],4237533241,21),n=f(n,r,i,a,e[12],1700485571,6),a=f(a,n,r,i,e[3],2399980690,10),i=f(i,a,n,r,e[10],4293915773,15),r=f(r,i,a,n,e[1],2240044497,21),n=f(n,r,i,a,e[8],1873313359,6),a=f(a,n,r,i,e[15],4264355552,10),i=f(i,a,n,r,e[6],2734768916,15),r=f(r,i,a,n,e[13],1309151649,21),n=f(n,r,i,a,e[4],4149444226,6),a=f(a,n,r,i,e[11],3174756917,10),i=f(i,a,n,r,e[2],718787259,15),r=f(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},s.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=i.allocUnsafe(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=s})),a.register("hbeGo",(function(e,t){"use strict";var n=a("8ByQm").Buffer,r=a("8IqCp").Transform;function i(e){r.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}a("5jAh8")(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,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));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(){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();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return t},i.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=i})),a.register("akTKC",(function(e,t){"use strict";var n=a("bqBrJ").Buffer,r=a("5jAh8"),i=a("hbeGo"),o=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],l=[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],c=[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],u=[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],d=[0,1518500249,1859775393,2400959708,2840853838],f=[1352829926,1548603684,1836072691,2053994217,0];function h(){i.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 v(e,t,n,r,i,o,a,s){return p(e+((t|~n)^r)+o+a|0,s)+i|0}function y(e,t,n,r,i,o,a,s){return p(e+(t&r|n&~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}r(h,i),h.prototype._update=function(){for(var e=o,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,a=0|this._d,h=0|this._e,w=0|this._a,x=0|this._b,S=0|this._c,M=0|this._d,_=0|this._e,A=0;A<80;A+=1){var E,C;A<16?(E=m(n,r,i,a,h,e[s[A]],d[0],c[A]),C=b(w,x,S,M,_,e[l[A]],f[0],u[A])):A<32?(E=g(n,r,i,a,h,e[s[A]],d[1],c[A]),C=y(w,x,S,M,_,e[l[A]],f[1],u[A])):A<48?(E=v(n,r,i,a,h,e[s[A]],d[2],c[A]),C=v(w,x,S,M,_,e[l[A]],f[2],u[A])):A<64?(E=y(n,r,i,a,h,e[s[A]],d[3],c[A]),C=g(w,x,S,M,_,e[l[A]],f[3],u[A])):(E=b(n,r,i,a,h,e[s[A]],d[4],c[A]),C=m(w,x,S,M,_,e[l[A]],f[4],u[A])),n=h,h=a,a=p(i,10),i=r,r=E,w=_,_=M,M=p(S,10),S=x,x=C}var k=this._b+i+M|0;this._b=this._c+a+_|0,this._c=this._d+h+w|0,this._d=this._e+n+x|0,this._e=this._a+r+S|0,this._a=k},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=n.alloc?n.alloc(20):new n(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})),a.register("5eKyq",(function(e,t){var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=a("3WWrs"),n.sha1=a("20KWg"),n.sha224=a("7FU1E"),n.sha256=a("5f2Bs"),n.sha384=a("hSEUB"),n.sha512=a("1Wrwk")})),a.register("3WWrs",(function(e,t){var n=a("5jAh8"),r=a("6TDWC"),i=a("8ByQm").Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function l(){this.init(),this._w=s,r.call(this,64,56)}function c(e){return e<<30|e>>>2}function u(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}n(l,r),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,l=0|this._e,d=0;d<16;++d)n[d]=e.readInt32BE(4*d);for(;d<80;++d)n[d]=n[d-3]^n[d-8]^n[d-14]^n[d-16];for(var f=0;f<80;++f){var h=~~(f/20),p=0|((t=r)<<5|t>>>27)+u(h,i,a,s)+l+n[f]+o[h];l=s,s=a,a=c(i),i=r,r=p}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=i.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=l})),a.register("6TDWC",(function(e,t){var n=a("8ByQm").Buffer;function r(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}r.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s<o;){for(var l=a%i,c=Math.min(o-s,i-l),u=0;u<c;u++)r[l+u]=e[s+u];s+=c,(a+=c)%i==0&&this._update(r)}return this._len+=o,this},r.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},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=r})),a.register("20KWg",(function(e,t){var n=a("5jAh8"),r=a("6TDWC"),i=a("8ByQm").Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function l(){this.init(),this._w=s,r.call(this,64,56)}function c(e){return e<<5|e>>>27}function u(e){return e<<30|e>>>2}function d(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}n(l,r),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,l=0|this._e,f=0;f<16;++f)n[f]=e.readInt32BE(4*f);for(;f<80;++f)n[f]=(t=n[f-3]^n[f-8]^n[f-14]^n[f-16])<<1|t>>>31;for(var h=0;h<80;++h){var p=~~(h/20),m=c(r)+d(p,i,a,s)+l+n[h]+o[p]|0;l=s,s=a,a=u(i),i=r,r=m}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=i.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=l})),a.register("7FU1E",(function(e,t){var n=a("5jAh8"),r=a("5f2Bs"),i=a("6TDWC"),o=a("8ByQm").Buffer,s=new Array(64);function l(){this.init(),this._w=s,i.call(this,64,56)}n(l,r),l.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},l.prototype._hash=function(){var e=o.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=l})),a.register("5f2Bs",(function(e,t){var n=a("5jAh8"),r=a("6TDWC"),i=a("8ByQm").Buffer,o=[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 l(){this.init(),this._w=s,r.call(this,64,56)}function c(e,t,n){return n^e&(t^n)}function u(e,t,n){return e&t|n&(e|t)}function d(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function f(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}n(l,r),l.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},l.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,l=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,v=0;v<16;++v)n[v]=e.readInt32BE(4*v);for(;v<64;++v)n[v]=0|(((t=n[v-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[v-7]+h(n[v-15])+n[v-16];for(var y=0;y<64;++y){var b=g+f(l)+c(l,p,m)+o[y]+n[y]|0,w=d(r)+u(r,i,a)|0;g=m,m=p,p=l,l=s+b|0,s=a,a=i,i=r,r=b+w|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=l+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},l.prototype._hash=function(){var e=i.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=l})),a.register("hSEUB",(function(e,t){var n=a("5jAh8"),r=a("1Wrwk"),i=a("6TDWC"),o=a("8ByQm").Buffer,s=new Array(160);function l(){this.init(),this._w=s,i.call(this,128,112)}n(l,r),l.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},l.prototype._hash=function(){var e=o.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=l})),a.register("1Wrwk",(function(e,t){var n=a("5jAh8"),r=a("6TDWC"),i=a("8ByQm").Buffer,o=[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 l(){this.init(),this._w=s,r.call(this,128,112)}function c(e,t,n){return n^e&(t^n)}function u(e,t,n){return e&t|n&(e|t)}function d(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function f(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 v(e,t){return e>>>0<t>>>0?1:0}n(l,r),l.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},l.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,a=0|this._dh,s=0|this._eh,l=0|this._fh,y=0|this._gh,b=0|this._hh,w=0|this._al,x=0|this._bl,S=0|this._cl,M=0|this._dl,_=0|this._el,A=0|this._fl,E=0|this._gl,C=0|this._hl,k=0;k<32;k+=2)t[k]=e.readInt32BE(4*k),t[k+1]=e.readInt32BE(4*k+4);for(;k<160;k+=2){var T=t[k-30],I=t[k-30+1],O=h(T,I),R=p(I,T),P=m(T=t[k-4],I=t[k-4+1]),N=g(I,T),L=t[k-14],D=t[k-14+1],B=t[k-32],j=t[k-32+1],F=R+D|0,U=O+L+v(F,R)|0;U=(U=U+P+v(F=F+N|0,N)|0)+B+v(F=F+j|0,j)|0,t[k]=U,t[k+1]=F}for(var z=0;z<160;z+=2){U=t[z],F=t[z+1];var H=u(n,r,i),V=u(w,x,S),W=d(n,w),G=d(w,n),q=f(s,_),K=f(_,s),Y=o[z],J=o[z+1],Q=c(s,l,y),X=c(_,A,E),Z=C+K|0,$=b+q+v(Z,C)|0;$=($=($=$+Q+v(Z=Z+X|0,X)|0)+Y+v(Z=Z+J|0,J)|0)+U+v(Z=Z+F|0,F)|0;var ee=G+V|0,te=W+H+v(ee,G)|0;b=y,C=E,y=l,E=A,l=s,A=_,s=a+$+v(_=M+Z|0,M)|0,a=i,M=S,i=r,S=x,r=n,x=w,n=$+te+v(w=Z+ee|0,Z)|0}this._al=this._al+w|0,this._bl=this._bl+x|0,this._cl=this._cl+S|0,this._dl=this._dl+M|0,this._el=this._el+_|0,this._fl=this._fl+A|0,this._gl=this._gl+E|0,this._hl=this._hl+C|0,this._ah=this._ah+n+v(this._al,w)|0,this._bh=this._bh+r+v(this._bl,x)|0,this._ch=this._ch+i+v(this._cl,S)|0,this._dh=this._dh+a+v(this._dl,M)|0,this._eh=this._eh+s+v(this._el,_)|0,this._fh=this._fh+l+v(this._fl,A)|0,this._gh=this._gh+y+v(this._gl,E)|0,this._hh=this._hh+b+v(this._hl,C)|0},l.prototype._hash=function(){var e=i.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=l})),a.register("9HuUe",(function(e,t){var n=a("8ByQm").Buffer,r=a("hFDuv").Transform,i=a("28kcI").StringDecoder;function o(e){r.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}a("5jAh8")(o,r),o.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},o.prototype.setAutoPadding=function(){},o.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},o.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},o.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},o.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)}},o.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},o.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},o.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new i(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=o})),a.register("hFDuv",(function(e,t){e.exports=r;var n=a("3oV8N").EventEmitter;function r(){n.call(this)}a("5jAh8")(r,n),r.Readable=a("kZTRI"),r.Writable=a("gihud"),r.Duplex=a("jqAKP"),r.Transform=a("erC5i"),r.PassThrough=a("3dCe5"),r.finished=a("j5ZwK"),r.pipeline=a("azGNy"),r.Stream=r,r.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",l));var a=!1;function s(){a||(a=!0,e.end())}function l(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===n.listenerCount(this,"error"))throw e}function u(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",l),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return r.on("error",c),e.on("error",c),r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e}})),a.register("7Q3Pj",(function(e,t){"use strict";var n=a("5jAh8"),r=a("kQpbp"),i=a("9HuUe"),o=a("8ByQm").Buffer,s=a("i7eWY"),l=a("akTKC"),c=a("5eKyq"),u=o.alloc(128);function d(e,t){i.call(this,"digest"),"string"==typeof t&&(t=o.from(t));var n="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>n)?t=("rmd160"===e?new l:c(e)).update(t).digest():t.length<n&&(t=o.concat([t,u],n));for(var r=this._ipad=o.allocUnsafe(n),a=this._opad=o.allocUnsafe(n),s=0;s<n;s++)r[s]=54^t[s],a[s]=92^t[s];this._hash="rmd160"===e?new l:c(e),this._hash.update(r)}n(d,i),d.prototype._update=function(e){this._hash.update(e)},d.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new l:c(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new d("rmd160",t):"md5"===e?new r(s,t):new d(e,t)}})),a.register("kQpbp",(function(e,t){"use strict";var n=a("5jAh8"),r=a("8ByQm").Buffer,i=a("9HuUe"),o=r.alloc(128),s=64;function l(e,t){i.call(this,"digest"),"string"==typeof t&&(t=r.from(t)),this._alg=e,this._key=t,t.length>s?t=e(t):t.length<s&&(t=r.concat([t,o],s));for(var n=this._ipad=r.allocUnsafe(s),a=this._opad=r.allocUnsafe(s),l=0;l<s;l++)n[l]=54^t[l],a[l]=92^t[l];this._hash=[n]}n(l,i),l.prototype._update=function(e){this._hash.push(e)},l.prototype._final=function(){var e=this._alg(r.concat(this._hash));return this._alg(r.concat([this._opad,e]))},e.exports=l})),a.register("i7eWY",(function(e,t){var n=a("d5AKh");e.exports=function(e){return(new n).update(e).digest()}})),a.register("8zF5N",(function(e,t){e.exports=a("aeDps")})),a.register("aeDps",(function(e,t){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"}}')})),a.register("cabM3",(function(t,n){var r,i;e(t.exports,"pbkdf2",(()=>r),(e=>r=e)),e(t.exports,"pbkdf2Sync",(()=>i),(e=>i=e)),r=a("1dDF3"),i=a("8Rgya")})),a.register("1dDF3",(function(e,n){var r,i,o=a("8ByQm").Buffer,s=a("e25FX"),l=a("zQTLA"),c=a("8Rgya"),u=a("7PgqL"),d=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"},h=[];function p(){return i||(i=t.process&&t.process.nextTick?t.process.nextTick:t.queueMicrotask?t.queueMicrotask:t.setImmediate?t.setImmediate:t.setTimeout)}function m(e,t,n,r,i){return d.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return d.deriveBits({name:"PBKDF2",salt:t,iterations:n,hash:{name:i}},e,r<<3)})).then((function(e){return o.from(e)}))}e.exports=function(e,n,i,a,g,v){"function"==typeof g&&(v=g,g=void 0);var y=f[(g=g||"sha1").toLowerCase()];if(y&&"function"==typeof t.Promise){if(s(i,a),e=u(e,l,"Password"),n=u(n,l,"Salt"),"function"!=typeof v)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){p()((function(){t(null,e)}))}),(function(e){p()((function(){t(e)}))}))}(function(e){if(t.process&&!t.process.browser)return Promise.resolve(!1);if(!d||!d.importKey||!d.deriveBits)return Promise.resolve(!1);if(void 0!==h[e])return h[e];var n=m(r=r||o.alloc(8),r,10,128,e).then((function(){return!0})).catch((function(){return!1}));return h[e]=n,n}(y).then((function(t){return t?m(e,n,i,a,y):c(e,n,i,a,g)})),v)}else p()((function(){var t;try{t=c(e,n,i,a,g)}catch(e){return v(e)}v(null,t)}))}})),a.register("e25FX",(function(e,t){var n=Math.pow(2,30)-1;e.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>n||t!=t)throw new TypeError("Bad key length")}})),a.register("zQTLA",(function(e,n){var r,i=a("ePtPP");if(t.process&&t.process.browser)r="utf-8";else if(t.process&&t.process.version){r=parseInt(i.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else r="utf-8";e.exports=r})),a.register("8Rgya",(function(e,t){var n=a("i7eWY"),r=a("akTKC"),i=a("5eKyq"),o=a("8ByQm").Buffer,s=a("e25FX"),l=a("zQTLA"),c=a("7PgqL"),u=o.alloc(128),d={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function f(e,t,a){var s=function(e){function t(t){return i(e).update(t).digest()}function o(e){return(new r).update(e).digest()}return"rmd160"===e||"ripemd160"===e?o:"md5"===e?n:t}(e),l="sha512"===e||"sha384"===e?128:64;t.length>l?t=s(t):t.length<l&&(t=o.concat([t,u],l));for(var c=o.allocUnsafe(l+d[e]),f=o.allocUnsafe(l+d[e]),h=0;h<l;h++)c[h]=54^t[h],f[h]=92^t[h];var p=o.allocUnsafe(l+a+4);c.copy(p,0,0,l),this.ipad1=p,this.ipad2=c,this.opad=f,this.alg=e,this.blocksize=l,this.hash=s,this.size=d[e]}f.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){s(n,r);var a=new f(i=i||"sha1",e=c(e,l,"Password"),(t=c(t,l,"Salt")).length),u=o.allocUnsafe(r),h=o.allocUnsafe(t.length+4);t.copy(h,0,0,t.length);for(var p=0,m=d[i],g=Math.ceil(r/m),v=1;v<=g;v++){h.writeUInt32BE(v,t.length);for(var y=a.run(h,a.ipad1),b=y,w=1;w<n;w++){b=a.run(b,a.ipad2);for(var x=0;x<m;x++)y[x]^=b[x]}y.copy(u,p),p+=m}return u}})),a.register("7PgqL",(function(e,t){var n=a("8ByQm").Buffer;e.exports=function(e,t,r){if(n.isBuffer(e))return e;if("string"==typeof e)return n.from(e,t);if(ArrayBuffer.isView(e))return n.from(e.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}})),a.register("3feuT",(function(t,n){var r,i,o,s,l,c,u,d,f,h;e(t.exports,"createCipher",(()=>r),(e=>r=e)),e(t.exports,"Cipher",(()=>i),(e=>i=e)),e(t.exports,"createCipheriv",(()=>o),(e=>o=e)),e(t.exports,"Cipheriv",(()=>s),(e=>s=e)),e(t.exports,"createDecipher",(()=>l),(e=>l=e)),e(t.exports,"Decipher",(()=>c),(e=>c=e)),e(t.exports,"createDecipheriv",(()=>u),(e=>u=e)),e(t.exports,"Decipheriv",(()=>d),(e=>d=e)),e(t.exports,"listCiphers",(()=>f),(e=>f=e)),e(t.exports,"getCiphers",(()=>h),(e=>h=e));var p=a("i5Vju"),m=a("duD0R"),g=a("cD8zA"),v=a("bJC4J"),y=a("2tkTk");function b(e,t,n){if(e=e.toLowerCase(),g[e])return m.createCipheriv(e,t,n);if(v[e])return new p({key:t,iv:n,mode:e});throw new TypeError("invalid suite type")}function w(e,t,n){if(e=e.toLowerCase(),g[e])return m.createDecipheriv(e,t,n);if(v[e])return new p({key:t,iv:n,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}r=i=function(e,t){var n,r;if(e=e.toLowerCase(),g[e])n=g[e].key,r=g[e].iv;else{if(!v[e])throw new TypeError("invalid suite type");n=8*v[e].key,r=v[e].iv}var i=y(t,!1,n,r);return b(e,i.key,i.iv)},o=s=b,l=c=function(e,t){var n,r;if(e=e.toLowerCase(),g[e])n=g[e].key,r=g[e].iv;else{if(!v[e])throw new TypeError("invalid suite type");n=8*v[e].key,r=v[e].iv}var i=y(t,!1,n,r);return w(e,i.key,i.iv)},u=d=w,f=h=function(){return Object.keys(v).concat(m.getCiphers())}})),a.register("i5Vju",(function(e,t){var n=a("9HuUe"),r=a("96ToB"),i=a("5jAh8"),o=a("8ByQm").Buffer,s={"des-ede3-cbc":r.CBC.instantiate(r.EDE),"des-ede3":r.EDE,"des-ede-cbc":r.CBC.instantiate(r.EDE),"des-ede":r.EDE,"des-cbc":r.CBC.instantiate(r.DES),"des-ecb":r.DES};function l(e){n.call(this);var t,r=e.mode.toLowerCase(),i=s[r];t=e.decrypt?"decrypt":"encrypt";var a=e.key;o.isBuffer(a)||(a=o.from(a)),"des-ede"!==r&&"des-ede-cbc"!==r||(a=o.concat([a,a.slice(0,8)]));var l=e.iv;o.isBuffer(l)||(l=o.from(l)),this._des=i.create({key:a,iv:l,type:t})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],e.exports=l,i(l,n),l.prototype._update=function(e){return o.from(this._des.update(e))},l.prototype._final=function(){return o.from(this._des.final())}})),a.register("96ToB",(function(t,n){var r,i,o;e(t.exports,"DES",(()=>r),(e=>r=e)),e(t.exports,"CBC",(()=>i),(e=>i=e)),e(t.exports,"EDE",(()=>o),(e=>o=e)),a("gnnuw"),a("04Bjm"),r=a("gno1I"),i=a("Hz9en"),o=a("8fziB")})),a.register("gnnuw",(function(t,n){var r,i,o,a,s,l,c,u,d,f,h;e(t.exports,"readUInt32BE",(()=>r),(e=>r=e)),e(t.exports,"writeUInt32BE",(()=>i),(e=>i=e)),e(t.exports,"ip",(()=>o),(e=>o=e)),e(t.exports,"rip",(()=>a),(e=>a=e)),e(t.exports,"pc1",(()=>s),(e=>s=e)),e(t.exports,"r28shl",(()=>l),(e=>l=e)),e(t.exports,"pc2",(()=>c),(e=>c=e)),e(t.exports,"expand",(()=>u),(e=>u=e)),e(t.exports,"substitute",(()=>d),(e=>d=e)),e(t.exports,"permute",(()=>f),(e=>f=e)),e(t.exports,"padSplit",(()=>h),(e=>h=e)),r=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},i=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},o=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},a=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},s=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},l=function(e,t){return e<<t&268435455|e>>>28-t};var p=[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];c=function(e,t,n,r){for(var i=0,o=0,a=p.length>>>1,s=0;s<a;s++)i<<=1,i|=e>>>p[s]&1;for(s=a;s<p.length;s++)o<<=1,o|=t>>>p[s]&1;n[r+0]=i>>>0,n[r+1]=o>>>0},u=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 m=[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];d=function(e,t){for(var n=0,r=0;r<4;r++){n<<=4,n|=m[64*r+(e>>>18-6*r&63)]}for(r=0;r<4;r++){n<<=4,n|=m[256+64*r+(t>>>18-6*r&63)]}return n>>>0};var g=[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];f=function(e){for(var t=0,n=0;n<g.length;n++)t<<=1,t|=e>>>g[n]&1;return t>>>0},h=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(" ")}})),a.register("04Bjm",(function(e,t){"use strict";var n=a("iGZtb");function r(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=r,r.prototype._init=function(){},r.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},r.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},r.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},r.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},r.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},r.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},r.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},r.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},r.prototype._unpad=function(e){return e},r.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}})),a.register("iGZtb",(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)}})),a.register("gno1I",(function(e,t){"use strict";var n=a("iGZtb"),r=a("5jAh8"),i=a("gnnuw"),o=a("04Bjm");function s(){this.tmp=new Array(2),this.keys=null}function l(e){o.call(this,e);var t=new s;this._desState=t,this.deriveKeys(t,e.key)}r(l,o),e.exports=l,l.create=function(e){return new l(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];l.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var r=i.readUInt32BE(t,0),o=i.readUInt32BE(t,4);i.pc1(r,o,e.tmp,0),r=e.tmp[0],o=e.tmp[1];for(var a=0;a<e.keys.length;a+=2){var s=c[a>>>1];r=i.r28shl(r,s),o=i.r28shl(o,s),i.pc2(r,o,e.keys,a)}},l.prototype._update=function(e,t,n,r){var o=this._desState,a=i.readUInt32BE(e,t),s=i.readUInt32BE(e,t+4);i.ip(a,s,o.tmp,0),a=o.tmp[0],s=o.tmp[1],"encrypt"===this.type?this._encrypt(o,a,s,o.tmp,0):this._decrypt(o,a,s,o.tmp,0),a=o.tmp[0],s=o.tmp[1],i.writeUInt32BE(n,a,r),i.writeUInt32BE(n,s,r+4)},l.prototype._pad=function(e,t){for(var n=e.length-t,r=t;r<e.length;r++)e[r]=n;return!0},l.prototype._unpad=function(e){for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)n.equal(e[r],t);return e.slice(0,e.length-t)},l.prototype._encrypt=function(e,t,n,r,o){for(var a=t,s=n,l=0;l<e.keys.length;l+=2){var c=e.keys[l],u=e.keys[l+1];i.expand(s,e.tmp,0),c^=e.tmp[0],u^=e.tmp[1];var d=i.substitute(c,u),f=s;s=(a^i.permute(d))>>>0,a=f}i.rip(s,a,r,o)},l.prototype._decrypt=function(e,t,n,r,o){for(var a=n,s=t,l=e.keys.length-2;l>=0;l-=2){var c=e.keys[l],u=e.keys[l+1];i.expand(a,e.tmp,0),c^=e.tmp[0],u^=e.tmp[1];var d=i.substitute(c,u),f=a;a=(s^i.permute(d))>>>0,s=f}i.rip(a,s,r,o)}})),a.register("Hz9en",(function(t,n){var r;e(t.exports,"instantiate",(()=>r),(e=>r=e));var i=a("iGZtb"),o=a("5jAh8"),s={};function l(e){i.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]}r=function(e){function t(t){e.call(this,t),this._cbcInit()}o(t,e);for(var n=Object.keys(s),r=0;r<n.length;r++){var i=n[r];t.prototype[i]=s[i]}return t.create=function(e){return new t(e)},t},s._cbcInit=function(){var e=new l(this.options.iv);this._cbcState=e},s._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]}}})),a.register("8fziB",(function(e,t){"use strict";var n=a("iGZtb"),r=a("5jAh8"),i=a("04Bjm"),o=a("gno1I");function s(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),a=t.slice(16,24);this.ciphers="encrypt"===e?[o.create({type:"encrypt",key:r}),o.create({type:"decrypt",key:i}),o.create({type:"encrypt",key:a})]:[o.create({type:"decrypt",key:a}),o.create({type:"encrypt",key:i}),o.create({type:"decrypt",key:r})]}function l(e){i.call(this,e);var t=new s(this.type,this.options.key);this._edeState=t}r(l,i),e.exports=l,l.create=function(e){return new l(e)},l.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)},l.prototype._pad=o.prototype._pad,l.prototype._unpad=o.prototype._unpad})),a.register("duD0R",(function(t,n){var r,i,o;e(t.exports,"createCipheriv",(()=>r),(e=>r=e)),e(t.exports,"createDecipheriv",(()=>i),(e=>i=e)),e(t.exports,"getCiphers",(()=>o),(e=>o=e));var s=a("7ArtE"),l=a("4nqK6"),c=a("6P430");s.createCipher,r=s.createCipheriv,l.createDecipher,i=l.createDecipheriv,o=function(){return Object.keys(c)}})),a.register("7ArtE",(function(t,n){var r,i;e(t.exports,"createCipheriv",(()=>r),(e=>r=e)),e(t.exports,"createCipher",(()=>i),(e=>i=e));var o=a("cD8zA"),s=a("dU8tN"),l=a("8ByQm").Buffer,c=a("kqHo3"),u=a("9HuUe"),d=a("5gOZ5"),f=a("2tkTk");function h(e,t,n){u.call(this),this._cache=new m,this._cipher=new d.AES(t),this._prev=l.from(n),this._mode=e,this._autopadding=!0}a("5jAh8")(h,u),h.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 l.concat(r)};var p=l.alloc(16,16);function m(){this.cache=l.allocUnsafe(0)}function g(e,t,n){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=l.from(t)),t.length!==r.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof n&&(n=l.from(n)),"GCM"!==r.mode&&n.length!==r.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===r.type?new c(r.module,t,n):"auth"===r.type?new s(r.module,t,n):new h(r.module,t,n)}h.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(p))throw this._cipher.scrub(),new Error("data not multiple of block length")},h.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},m.prototype.add=function(e){this.cache=l.concat([this.cache,e])},m.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},m.prototype.flush=function(){for(var e=16-this.cache.length,t=l.allocUnsafe(e),n=-1;++n<e;)t.writeUInt8(e,n);return l.concat([this.cache,t])},r=g,i=function(e,t){var n=o[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=f(t,!1,n.key,n.iv);return g(e,r.key,r.iv)}})),a.register("cD8zA",(function(e,t){var n={ECB:a("fmYcl"),CBC:a("hyeta"),CFB:a("dABZp"),CFB8:a("f4OJE"),CFB1:a("hUOdV"),OFB:a("49TA8"),CTR:a("bSabi"),GCM:a("bSabi")},r=a("6P430");for(var i in r)r[i].module=n[r[i].mode];e.exports=r})),a.register("fmYcl",(function(t,n){var r,i;e(t.exports,"encrypt",(()=>r),(e=>r=e)),e(t.exports,"decrypt",(()=>i),(e=>i=e)),r=function(e,t){return e._cipher.encryptBlock(t)},i=function(e,t){return e._cipher.decryptBlock(t)}})),a.register("hyeta",(function(t,n){var r,i;e(t.exports,"encrypt",(()=>r),(e=>r=e)),e(t.exports,"decrypt",(()=>i),(e=>i=e));var o=a("i9W9Q");r=function(e,t){var n=o(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},i=function(e,t){var n=e._prev;e._prev=t;var r=e._cipher.decryptBlock(t);return o(r,n)}})),a.register("i9W9Q",(function(e,t){var n=a("bqBrJ").Buffer;e.exports=function(e,t){for(var r=Math.min(e.length,t.length),i=new n(r),o=0;o<r;++o)i[o]=e[o]^t[o];return i}})),a.register("dABZp",(function(t,n){var r;e(t.exports,"encrypt",(()=>r),(e=>r=e));var i=a("8ByQm").Buffer,o=a("i9W9Q");function s(e,t,n){var r=t.length,a=o(t,e._cache);return e._cache=e._cache.slice(r),e._prev=i.concat([e._prev,n?t:a]),a}r=function(e,t,n){for(var r,o=i.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=i.allocUnsafe(0)),!(e._cache.length<=t.length)){o=i.concat([o,s(e,t,n)]);break}r=e._cache.length,o=i.concat([o,s(e,t.slice(0,r),n)]),t=t.slice(r)}return o}})),a.register("f4OJE",(function(t,n){var r;e(t.exports,"encrypt",(()=>r),(e=>r=e));var i=a("8ByQm").Buffer;function o(e,t,n){var r=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=i.concat([e._prev.slice(1),i.from([n?t:r])]),r}r=function(e,t,n){for(var r=t.length,a=i.allocUnsafe(r),s=-1;++s<r;)a[s]=o(e,t[s],n);return a}})),a.register("hUOdV",(function(t,n){var r;e(t.exports,"encrypt",(()=>r),(e=>r=e));var i=a("8ByQm").Buffer;function o(e,t,n){for(var r,i,o=-1,a=0;++o<8;)r=t&1<<7-o?128:0,a+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^r))>>o%8,e._prev=s(e._prev,n?r:i);return a}function s(e,t){var n=e.length,r=-1,o=i.allocUnsafe(e.length);for(e=i.concat([e,i.from([t])]);++r<n;)o[r]=e[r]<<1|e[r+1]>>7;return o}r=function(e,t,n){for(var r=t.length,a=i.allocUnsafe(r),s=-1;++s<r;)a[s]=o(e,t[s],n);return a}})),a.register("49TA8",(function(t,n){var r;e(t.exports,"encrypt",(()=>r),(e=>r=e));var i=a("bqBrJ").Buffer,o=a("i9W9Q");function s(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}r=function(e,t){for(;e._cache.length<t.length;)e._cache=i.concat([e._cache,s(e)]);var n=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),o(t,n)}})),a.register("bSabi",(function(t,n){var r;e(t.exports,"encrypt",(()=>r),(e=>r=e));var i=a("i9W9Q"),o=a("8ByQm").Buffer,s=a("dPGrC");function l(e){var t=e._cipher.encryptBlockRaw(e._prev);return s(e._prev),t}r=function(e,t){var n=Math.ceil(t.length/16),r=e._cache.length;e._cache=o.concat([e._cache,o.allocUnsafe(16*n)]);for(var a=0;a<n;a++){var s=l(e),c=r+16*a;e._cache.writeUInt32BE(s[0],c+0),e._cache.writeUInt32BE(s[1],c+4),e._cache.writeUInt32BE(s[2],c+8),e._cache.writeUInt32BE(s[3],c+12)}var u=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),i(t,u)}})),a.register("dPGrC",(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)}}})),a.register("6P430",(function(e,t){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"}}')})),a.register("dU8tN",(function(e,t){var n=a("5gOZ5"),r=a("8ByQm").Buffer,i=a("9HuUe"),o=a("5jAh8"),s=a("zwlJI"),l=a("i9W9Q"),c=a("dPGrC");function u(e,t,o,a){i.call(this);var l=r.alloc(4,0);this._cipher=new n.AES(t);var u=this._cipher.encryptBlock(l);this._ghash=new s(u),o=function(e,t,n){if(12===t.length)return e._finID=r.concat([t,r.from([0,0,0,1])]),r.concat([t,r.from([0,0,0,2])]);var i=new s(n),o=t.length,a=o%16;i.update(t),a&&(a=16-a,i.update(r.alloc(a,0))),i.update(r.alloc(8,0));var l=8*o,u=r.alloc(8);u.writeUIntBE(l,0,8),i.update(u),e._finID=i.state;var d=r.from(e._finID);return c(d),d}(this,o,u),this._prev=r.from(o),this._cache=r.allocUnsafe(0),this._secCache=r.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}o(u,i),u.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=r.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},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=l(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()},u.prototype.getAuthTag=function(){if(this._decrypt||!r.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},u.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},u.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=u})),a.register("5gOZ5",(function(t,n){var r;e(t.exports,"AES",(()=>r),(e=>r=e));var i=a("8ByQm").Buffer;function o(e){i.isBuffer(e)||(e=i.from(e));for(var t=e.length/4|0,n=new Array(t),r=0;r<t;r++)n[r]=e.readUInt32BE(4*r);return n}function s(e){for(;0<e.length;e++)e[0]=0}function l(e,t,n,r,i){for(var o,a,s,l,c=n[0],u=n[1],d=n[2],f=n[3],h=e[0]^t[0],p=e[1]^t[1],m=e[2]^t[2],g=e[3]^t[3],v=4,y=1;y<i;y++)o=c[h>>>24]^u[p>>>16&255]^d[m>>>8&255]^f[255&g]^t[v++],a=c[p>>>24]^u[m>>>16&255]^d[g>>>8&255]^f[255&h]^t[v++],s=c[m>>>24]^u[g>>>16&255]^d[h>>>8&255]^f[255&p]^t[v++],l=c[g>>>24]^u[h>>>16&255]^d[p>>>8&255]^f[255&m]^t[v++],h=o,p=a,m=s,g=l;return o=(r[h>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&g])^t[v++],a=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[g>>>8&255]<<8|r[255&h])^t[v++],s=(r[m>>>24]<<24|r[g>>>16&255]<<16|r[h>>>8&255]<<8|r[255&p])^t[v++],l=(r[g>>>24]<<24|r[h>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^t[v++],[o>>>=0,a>>>=0,s>>>=0,l>>>=0]}var c=[0,1,2,4,8,16,32,64,128,27,54],u=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,l=0;l<256;++l){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,n[a]=c,r[c]=a;var u=e[a],d=e[u],f=e[d],h=257*e[c]^16843008*c;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*f^65537*d^257*u^16843008*a,o[0][c]=h<<24|h>>>8,o[1][c]=h<<16|h>>>16,o[2][c]=h<<8|h>>>24,o[3][c]=h,0===a?a=s=1:(a=u^e[e[e[f^u]]],s^=e[e[s]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:o}}();function d(e){this._key=o(e),this._reset()}d.blockSize=16,d.keySize=32,d.prototype.blockSize=d.blockSize,d.prototype.keySize=d.keySize,d.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=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=c[o/t|0]<<24):t>6&&o%t==4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-t]^a}for(var s=[],l=0;l<r;l++){var d=r-l,f=i[d-(l%4?0:4)];s[l]=l<4||d<=4?f:u.INV_SUB_MIX[0][u.SBOX[f>>>24]]^u.INV_SUB_MIX[1][u.SBOX[f>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[f>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&f]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=s},d.prototype.encryptBlockRaw=function(e){return l(e=o(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},d.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=i.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},d.prototype.decryptBlock=function(e){var t=(e=o(e))[1];e[1]=e[3],e[3]=t;var n=l(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),r=i.allocUnsafe(16);return r.writeUInt32BE(n[0],0),r.writeUInt32BE(n[3],4),r.writeUInt32BE(n[2],8),r.writeUInt32BE(n[1],12),r},d.prototype.scrub=function(){s(this._keySchedule),s(this._invKeySchedule),s(this._key)},r=d})),a.register("zwlJI",(function(e,t){var n=a("8ByQm").Buffer,r=n.alloc(16,0);function i(e){var t=n.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 o(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}o.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},o.prototype._multiply=function(){for(var e,t,n,r=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],o=[0,0,0,0],a=-1;++a<128;){for(0!=(this.state[~~(a/8)]&1<<7-a%8)&&(o[0]^=r[0],o[1]^=r[1],o[2]^=r[2],o[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]=-520093696^r[0])}this.state=i(o)},o.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},o.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,r],16)),this.ghash(i([0,e,0,t])),this.state},e.exports=o})),a.register("kqHo3",(function(e,t){var n=a("5gOZ5"),r=a("8ByQm").Buffer,i=a("9HuUe");function o(e,t,o,a){i.call(this),this._cipher=new n.AES(t),this._prev=r.from(o),this._cache=r.allocUnsafe(0),this._secCache=r.allocUnsafe(0),this._decrypt=a,this._mode=e}a("5jAh8")(o,i),o.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()},e.exports=o})),a.register("2tkTk",(function(e,t){var n=a("8ByQm").Buffer,r=a("d5AKh");e.exports=function(e,t,i,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=i/8,s=n.alloc(a),l=n.alloc(o||0),c=n.alloc(0);a>0||o>0;){var u=new r;u.update(c),u.update(e),t&&u.update(t),c=u.digest();var d=0;if(a>0){var f=s.length-a;d=Math.min(a,c.length),c.copy(s,f,0,d),a-=d}if(d<c.length&&o>0){var h=l.length-o,p=Math.min(o,c.length-d);c.copy(l,h,d,d+p),o-=p}}return c.fill(0),{key:s,iv:l}}})),a.register("4nqK6",(function(t,n){var r,i;e(t.exports,"createDecipher",(()=>r),(e=>r=e)),e(t.exports,"createDecipheriv",(()=>i),(e=>i=e));var o=a("dU8tN"),s=a("8ByQm").Buffer,l=a("cD8zA"),c=a("kqHo3"),u=a("9HuUe"),d=a("5gOZ5"),f=a("2tkTk");function h(e,t,n){u.call(this),this._cache=new p,this._last=void 0,this._cipher=new d.AES(t),this._prev=s.from(n),this._mode=e,this._autopadding=!0}function p(){this.cache=s.allocUnsafe(0)}function m(e,t,n){var r=l[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=s.from(n)),"GCM"!==r.mode&&n.length!==r.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof t&&(t=s.from(t)),t.length!==r.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===r.type?new c(r.module,t,n,!0):"auth"===r.type?new o(r.module,t,n,!0):new h(r.module,t,n)}a("5jAh8")(h,u),h.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 s.concat(r)},h.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")},h.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},p.prototype.add=function(e){this.cache=s.concat([this.cache,e])},p.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},p.prototype.flush=function(){if(this.cache.length)return this.cache},r=function(e,t){var n=l[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=f(t,!1,n.key,n.iv);return m(e,r.key,r.iv)},i=m})),a.register("bJC4J",(function(t,n){var r,i,o,a,s,l,c,u;e(t.exports,"des-ecb",(()=>r),(e=>r=e)),e(t.exports,"des-cbc",(()=>i),(e=>i=e)),e(t.exports,"des",(()=>o),(e=>o=e)),e(t.exports,"des-ede3-cbc",(()=>a),(e=>a=e)),e(t.exports,"des3",(()=>s),(e=>s=e)),e(t.exports,"des-ede3",(()=>l),(e=>l=e)),e(t.exports,"des-ede-cbc",(()=>c),(e=>c=e)),e(t.exports,"des-ede",(()=>u),(e=>u=e)),r={key:8,iv:0},i=o={key:8,iv:8},a=s={key:24,iv:8},l={key:24,iv:0},c={key:16,iv:8},u={key:16,iv:0}})),a.register("hzteC",(function(t,n){var r,i,o,s,l;e(t.exports,"DiffieHellmanGroup",(()=>r),(e=>r=e)),e(t.exports,"createDiffieHellmanGroup",(()=>i),(e=>i=e)),e(t.exports,"getDiffieHellman",(()=>o),(e=>o=e)),e(t.exports,"createDiffieHellman",(()=>s),(e=>s=e)),e(t.exports,"DiffieHellman",(()=>l),(e=>l=e));var c=a("bqBrJ").Buffer,u=a("iHSaM"),d=a("eDa4Q"),f=a("8cNuf");var h={binary:!0,hex:!0,base64:!0};r=i=o=function(e){var t=new c(d[e].prime,"hex"),n=new c(d[e].gen,"hex");return new f(t,n)},s=l=function e(t,n,r,i){return c.isBuffer(n)||void 0===h[n]?e(t,"binary",n,r):(n=n||"binary",i=i||"binary",r=r||new c([2]),c.isBuffer(r)||(r=new c(r,i)),"number"==typeof t?new f(u(t,r),r,!0):(c.isBuffer(t)||(t=new c(t,n)),new f(t,r,!0)))}})),a.register("iHSaM",(function(e,t){var n=a("3xr1Z");e.exports=v,v.simpleSieve=m,v.fermatTest=g;var r=a("jXr8Y"),i=new r(24),o=new(a("eYSrG")),s=new r(1),l=new r(2),c=new r(5),u=(new r(16),new r(8),new r(10)),d=new r(3),f=(new r(7),new r(11)),h=new r(4),p=(new r(12),null);function m(e){for(var t=function(){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}(),n=0;n<t.length;n++)if(0===e.modn(t[n]))return 0===e.cmpn(t[n]);return!0}function g(e){var t=r.mont(e);return 0===l.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function v(e,t){if(e<16)return new r(2===t||5===t?[140,123]:[140,39]);var a,p;for(t=new r(t);;){for(a=new r(n(Math.ceil(e/8)));a.bitLength()>e;)a.ishrn(1);if(a.isEven()&&a.iadd(s),a.testn(1)||a.iadd(l),t.cmp(l)){if(!t.cmp(c))for(;a.mod(u).cmp(d);)a.iadd(h)}else for(;a.mod(i).cmp(f);)a.iadd(h);if(m(p=a.shrn(1))&&m(a)&&g(p)&&g(a)&&o.test(p)&&o.test(a))return a}}})),a.register("jXr8Y",(function(e,t){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.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 o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:a("1DJXa").Buffer}catch(e){}function s(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function l(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),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}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){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):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("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"===r)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"===r)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()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,a=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=l(e,t,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=l(e,t,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},i.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,l=0,u=n;u<s;u+=r)l=c(e,u,u+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==a){var d=1;for(l=c(e,u,e.length,t),u=0;u<a;u++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},i.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},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.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"],d=[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],f=[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 h(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,l=a/67108864|0;n.words[0]=s;for(var c=1;c<r;c++){for(var u=l>>>26,d=67108863&l,f=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=f;h++){var p=c-h|0;u+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}n.words[c]=0|d,l=0|u}return 0!==l?n.words[c]=0|l:n.length--,n.strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],l=(16777215&(s<<i|o)).toString(16);r=0!==(o=s>>>24-i&16777215)||a!==this.length-1?u[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],h=f[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,l="le"===t,c=new e(o),u=this.clone();if(l){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),c[s]=a;for(;s<o;s++)c[s]=0}else{for(s=0;s<o-i;s++)c[s]=0;for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),c[o-s-1]=a}return c},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.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},i.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},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.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},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.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()},i.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.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()},i.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.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()},i.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},i.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},i.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)},i.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()},i.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,n){var r,i,o,a=e.words,s=t.words,l=n.words,c=0,u=0|a[0],d=8191&u,f=u>>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,x=b>>>13,S=0|a[4],M=8191&S,_=S>>>13,A=0|a[5],E=8191&A,C=A>>>13,k=0|a[6],T=8191&k,I=k>>>13,O=0|a[7],R=8191&O,P=O>>>13,N=0|a[8],L=8191&N,D=N>>>13,B=0|a[9],j=8191&B,F=B>>>13,U=0|s[0],z=8191&U,H=U>>>13,V=0|s[1],W=8191&V,G=V>>>13,q=0|s[2],K=8191&q,Y=q>>>13,J=0|s[3],Q=8191&J,X=J>>>13,Z=0|s[4],$=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],le=8191&se,ce=se>>>13,ue=0|s[8],de=8191&ue,fe=ue>>>13,he=0|s[9],pe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(c+(r=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,H))+Math.imul(f,z)|0))<<13)|0;c=((o=Math.imul(f,H))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,z),i=(i=Math.imul(p,H))+Math.imul(m,z)|0,o=Math.imul(m,H);var ve=(c+(r=r+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(f,W)|0))<<13)|0;c=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,z),i=(i=Math.imul(v,H))+Math.imul(y,z)|0,o=Math.imul(y,H),r=r+Math.imul(p,W)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,G)|0;var ye=(c+(r=r+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(f,K)|0))<<13)|0;c=((o=o+Math.imul(f,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(w,z),i=(i=Math.imul(w,H))+Math.imul(x,z)|0,o=Math.imul(x,H),r=r+Math.imul(v,W)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,Y)|0;var be=(c+(r=r+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,X)|0)+Math.imul(f,Q)|0))<<13)|0;c=((o=o+Math.imul(f,X)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(M,z),i=(i=Math.imul(M,H))+Math.imul(_,z)|0,o=Math.imul(_,H),r=r+Math.imul(w,W)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,G)|0,r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,X)|0;var we=(c+(r=r+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,$)|0))<<13)|0;c=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(E,z),i=(i=Math.imul(E,H))+Math.imul(C,z)|0,o=Math.imul(C,H),r=r+Math.imul(M,W)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,X)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,ee)|0;var xe=(c+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;c=((o=o+Math.imul(f,re)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(T,z),i=(i=Math.imul(T,H))+Math.imul(I,z)|0,o=Math.imul(I,H),r=r+Math.imul(E,W)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,G)|0,r=r+Math.imul(M,K)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,X)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,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=(c+(r=r+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;c=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(R,z),i=(i=Math.imul(R,H))+Math.imul(P,z)|0,o=Math.imul(P,H),r=r+Math.imul(T,W)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(E,K)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(C,K)|0,o=o+Math.imul(C,Y)|0,r=r+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,X)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(y,ne)|0,o=o+Math.imul(y,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 Me=(c+(r=r+Math.imul(d,le)|0)|0)+((8191&(i=(i=i+Math.imul(d,ce)|0)+Math.imul(f,le)|0))<<13)|0;c=((o=o+Math.imul(f,ce)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,z),i=(i=Math.imul(L,H))+Math.imul(D,z)|0,o=Math.imul(D,H),r=r+Math.imul(R,W)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,G)|0,r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,Y)|0,r=r+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,X)|0,r=r+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ce)|0;var _e=(c+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;c=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(j,z),i=(i=Math.imul(j,H))+Math.imul(F,z)|0,o=Math.imul(F,H),r=r+Math.imul(L,W)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(D,W)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(R,K)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,Y)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,X)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,ee)|0,r=r+Math.imul(M,ne)|0,i=(i=i+Math.imul(M,re)|0)+Math.imul(_,ne)|0,o=o+Math.imul(_,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,r=r+Math.imul(v,le)|0,i=(i=i+Math.imul(v,ce)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ce)|0,r=r+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,fe)|0;var Ae=(c+(r=r+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;c=((o=o+Math.imul(f,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(j,W),i=(i=Math.imul(j,G))+Math.imul(F,W)|0,o=Math.imul(F,G),r=r+Math.imul(L,K)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,X)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(C,ne)|0,o=o+Math.imul(C,re)|0,r=r+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,ce)|0,r=r+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(y,de)|0,o=o+Math.imul(y,fe)|0;var Ee=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(j,K),i=(i=Math.imul(j,Y))+Math.imul(F,K)|0,o=Math.imul(F,Y),r=r+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,X)|0,r=r+Math.imul(R,$)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(I,ne)|0,o=o+Math.imul(I,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,r=r+Math.imul(M,le)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,ce)|0,r=r+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(x,de)|0,o=o+Math.imul(x,fe)|0;var Ce=(c+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,Q),i=(i=Math.imul(j,X))+Math.imul(F,Q)|0,o=Math.imul(F,X),r=r+Math.imul(L,$)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,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(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,r=r+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(C,le)|0,o=o+Math.imul(C,ce)|0,r=r+Math.imul(M,de)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(_,de)|0,o=o+Math.imul(_,fe)|0;var ke=(c+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,ee))+Math.imul(F,$)|0,o=Math.imul(F,ee),r=r+Math.imul(L,ne)|0,i=(i=i+Math.imul(L,re)|0)+Math.imul(D,ne)|0,o=o+Math.imul(D,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(T,le)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,ce)|0,r=r+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,fe)|0;var Te=(c+(r=r+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(F,ne)|0,o=Math.imul(F,re),r=r+Math.imul(L,oe)|0,i=(i=i+Math.imul(L,ae)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,ae)|0,r=r+Math.imul(R,le)|0,i=(i=i+Math.imul(R,ce)|0)+Math.imul(P,le)|0,o=o+Math.imul(P,ce)|0,r=r+Math.imul(T,de)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(I,de)|0,o=o+Math.imul(I,fe)|0;var Ie=(c+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),r=r+Math.imul(L,le)|0,i=(i=i+Math.imul(L,ce)|0)+Math.imul(D,le)|0,o=o+Math.imul(D,ce)|0,r=r+Math.imul(R,de)|0,i=(i=i+Math.imul(R,fe)|0)+Math.imul(P,de)|0,o=o+Math.imul(P,fe)|0;var Oe=(c+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(I,pe)|0))<<13)|0;c=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,le),i=(i=Math.imul(j,ce))+Math.imul(F,le)|0,o=Math.imul(F,ce),r=r+Math.imul(L,de)|0,i=(i=i+Math.imul(L,fe)|0)+Math.imul(D,de)|0,o=o+Math.imul(D,fe)|0;var Re=(c+(r=r+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(j,de),i=(i=Math.imul(j,fe))+Math.imul(F,de)|0,o=Math.imul(F,fe);var Pe=(c+(r=r+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,me)|0)+Math.imul(D,pe)|0))<<13)|0;c=((o=o+Math.imul(D,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ne=(c+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,l[0]=ge,l[1]=ve,l[2]=ye,l[3]=be,l[4]=we,l[5]=xe,l[6]=Se,l[7]=Me,l[8]=_e,l[9]=Ae,l[10]=Ee,l[11]=Ce,l[12]=ke,l[13]=Te,l[14]=Ie,l[15]=Oe,l[16]=Re,l[17]=Pe,l[18]=Ne,0!==c&&(l[19]=c,n.length++),n};function m(e,t,n){return(new g).mulp(e,t,n)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=h),i.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?p(this,e,t):r<63?h(this,e,t):r<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,l=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=l;c++){var u=o-c,d=(0|e.words[u])*(0|t.words[c]),f=67108863&d;s=67108863&(f=f+s|0),i+=(a=(a=a+(d/67108864|0)|0)+(f>>>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):m(this,e,t),n},g.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},g.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},g.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]]},g.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,l=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),u=0;u<i;u+=s)for(var d=l,f=c,h=0;h<a;h++){var p=n[u+h],m=r[u+h],g=n[u+h+a],v=r[u+h+a],y=d*g-f*v;v=d*v+f*g,g=y,n[u+h]=p+g,r[u+h]=m+v,n[u+h+a]=p-g,r[u+h+a]=m-v,h!==s&&(y=l*d-c*f,f=l*f+c*d,d=y)}},g.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},g.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}},g.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},g.prototype.convert13b=function(e,t,r,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)r[a]=0;n(0===o),n(0==(-8192&o))},g.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},g.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),l=new Array(r),c=new Array(r),u=new Array(r),d=new Array(r),f=n.words;f.length=r,this.convert13b(e.words,e.length,a,r),this.convert13b(t.words,t.length,c,r),this.transform(a,o,s,l,r,i),this.transform(c,o,u,d,r,i);for(var h=0;h<r;h++){var p=s[h]*u[h]-l[h]*d[h];l[h]=s[h]*d[h]+l[h]*u[h],s[h]=p}return this.conjugate(s,l,r),this.transform(s,l,f,o,r,i),this.conjugate(f,o,r),this.normalize13b(f,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),m(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.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 i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var o=n.sqr();r<t.length;r++,o=o.sqr())0!==t[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,l=(0|this.words[t])-s<<r;this.words[t]=l|a,a=s>>>26-r}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()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("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,l=r;if(i-=a,i=Math.max(0,i),l){for(var c=0;c<a;c++)l.words[c]=this.words[c];l.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=i);c--){var d=0|this.words[c];this.words[c]=u<<26-o|d>>>o,u=d&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r)&&!!(this.words[r]&i)},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(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)},i.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},i.prototype.isubn=function(e){if(n("number"==typeof e),n(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()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,o,a=e.length+r;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+s;var l=(0|e.words[i])*t;s=((o-=67108863&l)>>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-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()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,a=0|o.words[o.length-1];0!==(n=26-this._countBits(a))&&(o=o.ushln(n),r.iushln(n),a=0|o.words[o.length-1]);var s,l=r.length-o.length;if("mod"!==t){(s=new i(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var u=r.clone()._ishlnsubmul(o,1,l);0===u.negative&&(r=u,s&&(s.words[l]=1));for(var d=l-1;d>=0;d--){var f=67108864*(0|r.words[o.length+d])+(0|r.words[o.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(o,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(o,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.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)},i.prototype.modn=function(e){n(e<=67108863);for(var t=67108864%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),s=new i(0),l=new i(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0==(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(u),a.isub(d)),o.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(d)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s),a.isub(l)):(r.isub(t),s.isub(o),l.isub(a))}return{a:s,b:l,gcd:r.iushln(c)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),s=new i(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var d=0,f=1;0==(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(o=0===t.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(e),o},i.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)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;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},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(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},i.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},i.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},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new M(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function _(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}y.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.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):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},r(b,y),b.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&n)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.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},r(w,y),r(x,y),r(S,y),S.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},i._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new w;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return v[e]=t,t},M.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},M.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},M.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},M.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},M.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)},M.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},M.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)},M.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},M.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},M.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},M.prototype.isqr=function(e){return this.imul(e,e.clone())},M.prototype.sqr=function(e){return this.mul(e,e)},M.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);n(!o.isZero());var s=new i(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var d=this.pow(u,o),f=this.pow(e,o.addn(1).iushrn(1)),h=this.pow(e,o),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g<p);var v=this.pow(d,new i(1).iushln(p-g-1));f=f.redMul(v),d=v.redSqr(),h=h.redMul(d),p=g}return f},M.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},M.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var o=n[0],a=0,s=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var c=t.words[r],u=l-1;u>=0;u--){var d=c>>u&1;o!==n[0]&&(o=this.sqr(o)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===r&&0===u)&&(o=this.mul(o,n[a]),s=0,a=0)):s=0}l=26}return o},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new _(e)},r(_,M),_.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},_.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},_.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)},_.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},_.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)})),a.register("eYSrG",(function(e,t){var n=a("jXr8Y"),r=a("hZWXr");function i(e){this.rand=e||new r.Rand}e.exports=i,i.create=function(e){return new i(e)},i.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},i.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},i.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),a=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),l=0;!s.testn(l);l++);for(var c=e.shrn(l),u=s.toRed(o);t>0;t--){var d=this._randrange(new n(2),s);r&&r(d);var f=d.toRed(o).redPow(c);if(0!==f.cmp(a)&&0!==f.cmp(u)){for(var h=1;h<l;h++){if(0===(f=f.redSqr()).cmp(a))return!1;if(0===f.cmp(u))break}if(h===l)return!1}}return!0},i.prototype.getDivisor=function(e,t){var r=e.bitLength(),i=n.mont(e),o=new n(1).toRed(i);t||(t=Math.max(1,r/48|0));for(var a=e.subn(1),s=0;!a.testn(s);s++);for(var l=e.shrn(s),c=a.toRed(i);t>0;t--){var u=this._randrange(new n(2),a),d=e.gcd(u);if(0!==d.cmpn(1))return d;var f=u.toRed(i).redPow(l);if(0!==f.cmp(o)&&0!==f.cmp(c)){for(var h=1;h<s;h++){if(0===(f=f.redSqr()).cmp(o))return f.fromRed().subn(1).gcd(e);if(0===f.cmp(c))break}if(h===s)return(f=f.redSqr()).fromRed().subn(1).gcd(e)}}return!1}})),a.register("hZWXr",(function(e,t){var n;function r(e){this.rand=e}if(e.exports=function(e){return n||(n=new r(null)),n.generate(e)},e.exports.Rand=r,r.prototype.generate=function(e){return this._rand(e)},r.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?r.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?r.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(r.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var i=a("1DJXa");if("function"!=typeof i.randomBytes)throw new Error("Not supported");r.prototype._rand=function(e){return i.randomBytes(e)}}catch(e){}})),a.register("eDa4Q",(function(e,t){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"}}')})),a.register("8cNuf",(function(e,t){var n=a("bqBrJ").Buffer,r=a("jXr8Y"),i=new(a("eYSrG")),o=new r(24),s=new r(11),l=new r(10),c=new r(3),u=new r(7),d=a("iHSaM"),f=a("3xr1Z");function h(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._pub=new r(e),this}function p(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._priv=new r(e),this}e.exports=g;var m={};function g(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=h,this.setPrivateKey=p):this._primeCode=8}function v(e,t){var r=new n(e.toArray());return t?r.toString(t):r}Object.defineProperty(g.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 m)return m[r];var a,f=0;if(e.isEven()||!d.simpleSieve||!d.fermatTest(e)||!i.test(e))return f+=1,f+="02"===n||"05"===n?8:4,m[r]=f,f;switch(i.test(e.shrn(1))||(f+=2),n){case"02":e.mod(o).cmp(s)&&(f+=8);break;case"05":(a=e.mod(l)).cmp(c)&&a.cmp(u)&&(f+=8);break;default:f+=4}return m[r]=f,f}(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new r(f(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.prototype.computeSecret=function(e){var t=(e=(e=new r(e)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new n(t.toArray()),o=this.getPrime();if(i.length<o.length){var a=new n(o.length-i.length);a.fill(0),i=n.concat([a,i])}return i},g.prototype.getPublicKey=function(e){return v(this._pub,e)},g.prototype.getPrivateKey=function(e){return v(this._priv,e)},g.prototype.getPrime=function(e){return v(this.__prime,e)},g.prototype.getGenerator=function(e){return v(this._gen,e)},g.prototype.setGenerator=function(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this.__gen=e,this._gen=new r(e),this}})),a.register("cD2JS",(function(e,t){var n=a("8ByQm").Buffer,r=a("d8QYu"),i=a("8IqCp"),o=a("5jAh8"),s=a("hgNoQ"),l=a("ajRoR"),c=a("aeDps");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 d(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 f(e){return new u(e)}function h(e){return new d(e)}Object.keys(c).forEach((function(e){c[e].id=n.from(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,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},u.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),r=s(n,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},o(d,i.Writable),d.prototype._write=function(e,t,n){this._hash.update(e),n()},d.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},d.prototype.verify=function(e,t,r){"string"==typeof t&&(t=n.from(t,r)),this.end();var i=this._hash.digest();return l(t,i,e,this._signType,this._tag)},e.exports={Sign:f,Verify:h,createSign:f,createVerify:h}})),a.register("hgNoQ",(function(e,t){var n=a("8ByQm").Buffer,r=a("7Q3Pj"),i=a("8sAbQ"),o=a("dkUCk").ec,s=a("fmDmL"),l=a("fEs62"),c=a("g4OMi");function u(e,t,i,o){if((e=n.from(e.toArray())).length<t.byteLength()){var a=n.alloc(t.byteLength()-e.length);e=n.concat([a,e])}var s=i.length,l=function(e,t){e=d(e,t),e=e.mod(t);var r=n.from(e.toArray());if(r.length<t.byteLength()){var i=n.alloc(t.byteLength()-r.length);r=n.concat([i,r])}return r}(i,t),c=n.alloc(s);c.fill(1);var u=n.alloc(s);return u=r(o,u).update(c).update(n.from([0])).update(e).update(l).digest(),c=r(o,u).update(c).digest(),{k:u=r(o,u).update(c).update(n.from([1])).update(e).update(l).digest(),v:c=r(o,u).update(c).digest()}}function d(e,t){var n=new s(e),r=(e.length<<3)-t.bitLength();return r>0&&n.ishrn(r),n}function f(e,t,i){var o,a;do{for(o=n.alloc(0);8*o.length<e.bitLength();)t.v=r(i,t.k).update(t.v).digest(),o=n.concat([o,t.v]);a=d(o,e),t.k=r(i,t.k).update(t.v).update(n.from([0])).digest(),t.v=r(i,t.k).update(t.v).digest()}while(-1!==a.cmp(e));return a}function h(e,t,n,r){return e.toRed(s.mont(n)).redPow(t).fromRed().mod(r)}e.exports=function(e,t,r,a,p){var m=l(t);if(m.curve){if("ecdsa"!==a&&"ecdsa/rsa"!==a)throw new Error("wrong private key type");return function(e,t){var r=c[t.curve.join(".")];if(!r)throw new Error("unknown curve "+t.curve.join("."));var i=new o(r).keyFromPrivate(t.privateKey),a=i.sign(e);return n.from(a.toDER())}(e,m)}if("dsa"===m.type){if("dsa"!==a)throw new Error("wrong private key type");return function(e,t,r){var i,o=t.params.priv_key,a=t.params.p,l=t.params.q,c=t.params.g,p=new s(0),m=d(e,l).mod(l),g=!1,v=u(o,l,e,r);for(;!1===g;)p=h(c,i=f(l,v,r),a,l),0===(g=i.invm(l).imul(m.add(o.mul(p))).mod(l)).cmpn(0)&&(g=!1,p=new s(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e));128&t[0]&&(t=[0].concat(t));var r=e.length+t.length+4,i=[48,r,2,e.length];return i=i.concat(e,[2,t.length],t),n.from(i)}(p,g)}(e,m,r)}if("rsa"!==a&&"ecdsa/rsa"!==a)throw new Error("wrong private key type");e=n.concat([p,e]);for(var g=m.modulus.byteLength(),v=[0,1];e.length+v.length+1<g;)v.push(255);v.push(0);for(var y=-1;++y<e.length;)v.push(e[y]);return i(v,m)},e.exports.getKey=u,e.exports.makeKey=f})),a.register("8sAbQ",(function(e,t){var n=a("bqBrJ").Buffer,r=a("7FPic"),i=a("3xr1Z");function o(e){var t,n=e.modulus.byteLength();do{t=new r(i(n))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function s(e,t){var i=function(e){var t=o(e);return{blinder:t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),a=t.modulus.byteLength(),s=new r(e).mul(i.blinder).umod(t.modulus),l=s.toRed(r.mont(t.prime1)),c=s.toRed(r.mont(t.prime2)),u=t.coefficient,d=t.prime1,f=t.prime2,h=l.redPow(t.exponent1).fromRed(),p=c.redPow(t.exponent2).fromRed(),m=h.isub(p).imul(u).umod(d).imul(f);return p.iadd(m).imul(i.unblinder).umod(t.modulus).toArrayLike(n,"be",a)}s.getr=o,e.exports=s})),a.register("7FPic",(function(e,t){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.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 o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:a("1DJXa").Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function l(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,r,i){for(var o=0,a=0,s=Math.min(e.length,r),l=t;l<s;l++){var c=e.charCodeAt(l)-48;o*=i,a=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a<i,"Invalid character"),o+=a}return o}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){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):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("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"===r)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"===r)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()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,a=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=l(e,t,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=l(e,t,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},i.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,l=0,u=n;u<s;u+=r)l=c(e,u,u+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==a){var d=1;for(l=c(e,u,e.length,t),u=0;u<a;u++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},i.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},i.prototype._move=function(e){u(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(e){i.prototype.inspect=d}else i.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var f=["","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"],h=[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],p=[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];i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],l=(16777215&(s<<i|o)).toString(16);o=s>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?f[6-l.length]+l+r:l+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],u=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modrn(u).toString(e);r=(d=d.idivn(u)).isZero()?m+r:f[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function m(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,l=a/67108864|0;n.words[0]=s;for(var c=1;c<r;c++){for(var u=l>>>26,d=67108863&l,f=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=f;h++){var p=c-h|0;u+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}n.words[c]=0|d,l=0|u}return 0!==l?n.words[c]=0|l:n.length--,n._strip()}i.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},i.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|r;e[n++]=255&a,n<e.length&&(e[n++]=a>>8&255),n<e.length&&(e[n++]=a>>16&255),6===o?(n<e.length&&(e[n++]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},i.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|r;e[n--]=255&a,n>=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===o?(n>=0&&(e[n--]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.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},i.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},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.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},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.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()},i.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.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()},i.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.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()},i.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},i.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},i.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)},i.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()},i.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,n){var r,i,o,a=e.words,s=t.words,l=n.words,c=0,u=0|a[0],d=8191&u,f=u>>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,x=b>>>13,S=0|a[4],M=8191&S,_=S>>>13,A=0|a[5],E=8191&A,C=A>>>13,k=0|a[6],T=8191&k,I=k>>>13,O=0|a[7],R=8191&O,P=O>>>13,N=0|a[8],L=8191&N,D=N>>>13,B=0|a[9],j=8191&B,F=B>>>13,U=0|s[0],z=8191&U,H=U>>>13,V=0|s[1],W=8191&V,G=V>>>13,q=0|s[2],K=8191&q,Y=q>>>13,J=0|s[3],Q=8191&J,X=J>>>13,Z=0|s[4],$=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],le=8191&se,ce=se>>>13,ue=0|s[8],de=8191&ue,fe=ue>>>13,he=0|s[9],pe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(c+(r=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,H))+Math.imul(f,z)|0))<<13)|0;c=((o=Math.imul(f,H))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,z),i=(i=Math.imul(p,H))+Math.imul(m,z)|0,o=Math.imul(m,H);var ve=(c+(r=r+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(f,W)|0))<<13)|0;c=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,z),i=(i=Math.imul(v,H))+Math.imul(y,z)|0,o=Math.imul(y,H),r=r+Math.imul(p,W)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,G)|0;var ye=(c+(r=r+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(f,K)|0))<<13)|0;c=((o=o+Math.imul(f,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(w,z),i=(i=Math.imul(w,H))+Math.imul(x,z)|0,o=Math.imul(x,H),r=r+Math.imul(v,W)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,Y)|0;var be=(c+(r=r+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,X)|0)+Math.imul(f,Q)|0))<<13)|0;c=((o=o+Math.imul(f,X)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(M,z),i=(i=Math.imul(M,H))+Math.imul(_,z)|0,o=Math.imul(_,H),r=r+Math.imul(w,W)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,G)|0,r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,X)|0;var we=(c+(r=r+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,$)|0))<<13)|0;c=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(E,z),i=(i=Math.imul(E,H))+Math.imul(C,z)|0,o=Math.imul(C,H),r=r+Math.imul(M,W)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,X)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,ee)|0;var xe=(c+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;c=((o=o+Math.imul(f,re)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(T,z),i=(i=Math.imul(T,H))+Math.imul(I,z)|0,o=Math.imul(I,H),r=r+Math.imul(E,W)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,G)|0,r=r+Math.imul(M,K)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,X)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,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=(c+(r=r+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;c=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(R,z),i=(i=Math.imul(R,H))+Math.imul(P,z)|0,o=Math.imul(P,H),r=r+Math.imul(T,W)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(E,K)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(C,K)|0,o=o+Math.imul(C,Y)|0,r=r+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,X)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(y,ne)|0,o=o+Math.imul(y,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 Me=(c+(r=r+Math.imul(d,le)|0)|0)+((8191&(i=(i=i+Math.imul(d,ce)|0)+Math.imul(f,le)|0))<<13)|0;c=((o=o+Math.imul(f,ce)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,z),i=(i=Math.imul(L,H))+Math.imul(D,z)|0,o=Math.imul(D,H),r=r+Math.imul(R,W)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,G)|0,r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,Y)|0,r=r+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,X)|0,r=r+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ce)|0;var _e=(c+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;c=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(j,z),i=(i=Math.imul(j,H))+Math.imul(F,z)|0,o=Math.imul(F,H),r=r+Math.imul(L,W)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(D,W)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(R,K)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,Y)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,X)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,ee)|0,r=r+Math.imul(M,ne)|0,i=(i=i+Math.imul(M,re)|0)+Math.imul(_,ne)|0,o=o+Math.imul(_,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,r=r+Math.imul(v,le)|0,i=(i=i+Math.imul(v,ce)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ce)|0,r=r+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,fe)|0;var Ae=(c+(r=r+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;c=((o=o+Math.imul(f,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(j,W),i=(i=Math.imul(j,G))+Math.imul(F,W)|0,o=Math.imul(F,G),r=r+Math.imul(L,K)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,X)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(C,ne)|0,o=o+Math.imul(C,re)|0,r=r+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,ce)|0,r=r+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(y,de)|0,o=o+Math.imul(y,fe)|0;var Ee=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(j,K),i=(i=Math.imul(j,Y))+Math.imul(F,K)|0,o=Math.imul(F,Y),r=r+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,X)|0,r=r+Math.imul(R,$)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(I,ne)|0,o=o+Math.imul(I,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,r=r+Math.imul(M,le)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,ce)|0,r=r+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(x,de)|0,o=o+Math.imul(x,fe)|0;var Ce=(c+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,Q),i=(i=Math.imul(j,X))+Math.imul(F,Q)|0,o=Math.imul(F,X),r=r+Math.imul(L,$)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,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(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,r=r+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(C,le)|0,o=o+Math.imul(C,ce)|0,r=r+Math.imul(M,de)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(_,de)|0,o=o+Math.imul(_,fe)|0;var ke=(c+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,ee))+Math.imul(F,$)|0,o=Math.imul(F,ee),r=r+Math.imul(L,ne)|0,i=(i=i+Math.imul(L,re)|0)+Math.imul(D,ne)|0,o=o+Math.imul(D,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(T,le)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,ce)|0,r=r+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,fe)|0;var Te=(c+(r=r+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(F,ne)|0,o=Math.imul(F,re),r=r+Math.imul(L,oe)|0,i=(i=i+Math.imul(L,ae)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,ae)|0,r=r+Math.imul(R,le)|0,i=(i=i+Math.imul(R,ce)|0)+Math.imul(P,le)|0,o=o+Math.imul(P,ce)|0,r=r+Math.imul(T,de)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(I,de)|0,o=o+Math.imul(I,fe)|0;var Ie=(c+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),r=r+Math.imul(L,le)|0,i=(i=i+Math.imul(L,ce)|0)+Math.imul(D,le)|0,o=o+Math.imul(D,ce)|0,r=r+Math.imul(R,de)|0,i=(i=i+Math.imul(R,fe)|0)+Math.imul(P,de)|0,o=o+Math.imul(P,fe)|0;var Oe=(c+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(I,pe)|0))<<13)|0;c=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,le),i=(i=Math.imul(j,ce))+Math.imul(F,le)|0,o=Math.imul(F,ce),r=r+Math.imul(L,de)|0,i=(i=i+Math.imul(L,fe)|0)+Math.imul(D,de)|0,o=o+Math.imul(D,fe)|0;var Re=(c+(r=r+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(j,de),i=(i=Math.imul(j,fe))+Math.imul(F,de)|0,o=Math.imul(F,fe);var Pe=(c+(r=r+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,me)|0)+Math.imul(D,pe)|0))<<13)|0;c=((o=o+Math.imul(D,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ne=(c+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,l[0]=ge,l[1]=ve,l[2]=ye,l[3]=be,l[4]=we,l[5]=xe,l[6]=Se,l[7]=Me,l[8]=_e,l[9]=Ae,l[10]=Ee,l[11]=Ce,l[12]=ke,l[13]=Te,l[14]=Ie,l[15]=Oe,l[16]=Re,l[17]=Pe,l[18]=Ne,0!==c&&(l[19]=c,n.length++),n};function v(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,l=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=l;c++){var u=o-c,d=(0|e.words[u])*(0|t.words[c]),f=67108863&d;s=67108863&(f=f+s|0),i+=(a=(a=a+(d/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function y(e,t,n){return v(e,t,n)}function b(e,t){this.x=e,this.y=t}Math.imul||(g=m),i.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):n<63?m(this,e,t):n<1024?v(this,e,t):y(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},b.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},b.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]]},b.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,l=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),u=0;u<i;u+=s)for(var d=l,f=c,h=0;h<a;h++){var p=n[u+h],m=r[u+h],g=n[u+h+a],v=r[u+h+a],y=d*g-f*v;v=d*v+f*g,g=y,n[u+h]=p+g,r[u+h]=m+v,n[u+h+a]=p-g,r[u+h+a]=m-v,h!==s&&(y=l*d-c*f,f=l*f+c*d,d=y)}},b.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},b.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}},b.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},b.prototype.convert13b=function(e,t,r,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)r[a]=0;n(0===o),n(0==(-8192&o))},b.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},b.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),l=new Array(r),c=new Array(r),u=new Array(r),d=new Array(r),f=n.words;f.length=r,this.convert13b(e.words,e.length,a,r),this.convert13b(t.words,t.length,c,r),this.transform(a,o,s,l,r,i),this.transform(c,o,u,d,r,i);for(var h=0;h<r;h++){var p=s[h]*u[h]-l[h]*d[h];l[h]=s[h]*d[h]+l[h]*u[h],s[h]=p}return this.conjugate(s,l,r),this.transform(s,l,f,o,r,i),this.conjugate(f,o,r),this.normalize13b(f,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n._strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),y(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,a=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.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]>>>i&1}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var o=n.sqr();r<t.length;r++,o=o.sqr())0!==t[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,l=(0|this.words[t])-s<<r;this.words[t]=l|a,a=s>>>26-r}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()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("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,l=r;if(i-=a,i=Math.max(0,i),l){for(var c=0;c<a;c++)l.words[c]=this.words[c];l.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=i);c--){var d=0|this.words[c];this.words[c]=u<<26-o|d>>>o,u=d&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r)&&!!(this.words[r]&i)},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(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)},i.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},i.prototype.isubn=function(e){if(n("number"==typeof e),n(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()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,o,a=e.length+r;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+s;var l=(0|e.words[i])*t;s=((o-=67108863&l)>>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-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()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,a=0|o.words[o.length-1];0!==(n=26-this._countBits(a))&&(o=o.ushln(n),r.iushln(n),a=0|o.words[o.length-1]);var s,l=r.length-o.length;if("mod"!==t){(s=new i(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var u=r.clone()._ishlnsubmul(o,1,l);0===u.negative&&(r=u,s&&(s.words[l]=1));for(var d=l-1;d>=0;d--){var f=67108864*(0|r.words[o.length+d])+(0|r.words[o.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(o,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(o,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var o,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.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)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=67108864%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),s=new i(0),l=new i(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0==(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(u),a.isub(d)),o.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(d)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s),a.isub(l)):(r.isub(t),s.isub(o),l.isub(a))}return{a:s,b:l,gcd:r.iushln(c)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),s=new i(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var d=0,f=1;0==(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(o=0===t.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(e),o},i.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)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;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},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(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},i.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},i.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},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new E(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function x(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}x.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.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):void 0!==n.strip?n.strip():n._strip(),n},x.prototype.split=function(e,t){e.iushrn(this.n,0,t)},x.prototype.imulK=function(e){return e.imul(this.k)},r(S,x),S.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&n)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},S.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},r(M,x),r(_,x),r(A,x),A.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},i._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new S;else if("p224"===e)t=new M;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return w[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.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)},E.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},E.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)},E.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);n(!o.isZero());var s=new i(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var d=this.pow(u,o),f=this.pow(e,o.addn(1).iushrn(1)),h=this.pow(e,o),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g<p);var v=this.pow(d,new i(1).iushln(p-g-1));f=f.redMul(v),d=v.redSqr(),h=h.redMul(d),p=g}return f},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var o=n[0],a=0,s=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var c=t.words[r],u=l-1;u>=0;u--){var d=c>>u&1;o!==n[0]&&(o=this.sqr(o)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===r&&0===u)&&(o=this.mul(o,n[a]),s=0,a=0)):s=0}l=26}return o},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new C(e)},r(C,E),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.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)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)})),a.register("dkUCk",(function(e,t){"use strict";var n=e.exports;n.version=a("ca4g8").version,n.utils=a("fp2gt"),n.rand=a("hZWXr"),n.curve=a("e5bLI"),n.curves=a("gU8eC"),n.ec=a("4hQQJ"),n.eddsa=a("ieJqr")})),a.register("ca4g8",(function(e,t){e.exports=JSON.parse('{"name":"elliptic","version":"6.5.4","description":"EC cryptography","main":"lib/elliptic.js","files":["lib"],"scripts":{"lint":"eslint lib test","lint:fix":"npm run lint -- --fix","unit":"istanbul test _mocha --reporter=spec test/index.js","test":"npm run lint && npm run unit","version":"grunt dist && git add dist/"},"repository":{"type":"git","url":"git@github.com:indutny/elliptic"},"keywords":["EC","Elliptic","curve","Cryptography"],"author":"Fedor Indutny <fedor@indutny.com>","license":"MIT","bugs":{"url":"https://github.com/indutny/elliptic/issues"},"homepage":"https://github.com/indutny/elliptic","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.1.0","eslint":"^7.6.0","grunt":"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.5","mocha":"^8.0.1"},"dependencies":{"bn.js":"^4.11.9","brorand":"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1","inherits":"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}')})),a.register("fp2gt",(function(e,t){"use strict";var n=e.exports,r=a("jXr8Y"),i=a("iGZtb"),o=a("8Znt4");n.assert=i,n.toArray=o.toArray,n.zero2=o.zero2,n.toHex=o.toHex,n.encode=o.encode,n.getNAF=function(e,t,n){var r=new Array(Math.max(e.bitLength(),n)+1);r.fill(0);for(var i=1<<t+1,o=e.clone(),a=0;a<r.length;a++){var s,l=o.andln(i-1);o.isOdd()?(s=l>(i>>1)-1?(i>>1)-l:l,o.isubn(s)):s=0,r[a]=s,o.iushrn(1)}return r},n.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,l=e.andln(3)+i&3,c=t.andln(3)+o&3;3===l&&(l=-1),3===c&&(c=-1),a=0==(1&l)?0:3!==(r=e.andln(7)+i&7)&&5!==r||2!==c?l:-l,n[0].push(a),s=0==(1&c)?0:3!==(r=t.andln(7)+o&7)&&5!==r||2!==l?c:-c,n[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return n},n.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new r(e,"hex","le")}})),a.register("8Znt4",(function(e,t){"use strict";var n=e.exports;function r(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",n=0;n<e.length;n++)t+=r(e[n].toString(16));return t}n.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},n.zero2=r,n.toHex=i,n.encode=function(e,t){return"hex"===t?i(e):e}})),a.register("e5bLI",(function(e,t){"use strict";var n=e.exports;n.base=a("84G9i"),n.short=a("9nyiD"),n.mont=a("lQ6rN"),n.edwards=a("6iYEY")})),a.register("84G9i",(function(e,t){"use strict";var n=a("jXr8Y"),r=a("fp2gt"),i=r.getNAF,o=r.getJSF,s=r.assert;function l(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(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),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=l,l.prototype.point=function(){throw new Error("Not implemented")},l.prototype.validate=function(){throw new Error("Not implemented")},l.prototype._fixedNafMul=function(e,t){s(e.precomputed);var n=e._getDoubles(),r=i(t,1,this._bitLength),o=(1<<n.step+1)-(n.step%2==0?2:1);o/=3;var a,l,c=[];for(a=0;a<r.length;a+=n.step){l=0;for(var u=a+n.step-1;u>=a;u--)l=(l<<1)+r[u];c.push(l)}for(var d=this.jpoint(null,null,null),f=this.jpoint(null,null,null),h=o;h>0;h--){for(a=0;a<c.length;a++)(l=c[a])===h?f=f.mixedAdd(n.points[a]):l===-h&&(f=f.mixedAdd(n.points[a].neg()));d=d.add(f)}return d.toP()},l.prototype._wnafMul=function(e,t){var n=4,r=e._getNAFPoints(n);n=r.wnd;for(var o=r.points,a=i(t,n,this._bitLength),l=this.jpoint(null,null,null),c=a.length-1;c>=0;c--){for(var u=0;c>=0&&0===a[c];c--)u++;if(c>=0&&u++,l=l.dblp(u),c<0)break;var d=a[c];s(0!==d),l="affine"===e.type?d>0?l.mixedAdd(o[d-1>>1]):l.mixedAdd(o[-d-1>>1].neg()):d>0?l.add(o[d-1>>1]):l.add(o[-d-1>>1].neg())}return"affine"===e.type?l.toP():l},l.prototype._wnafMulAdd=function(e,t,n,r,a){var s,l,c,u=this._wnafT1,d=this._wnafT2,f=this._wnafT3,h=0;for(s=0;s<r;s++){var p=(c=t[s])._getNAFPoints(e);u[s]=p.wnd,d[s]=p.points}for(s=r-1;s>=1;s-=2){var m=s-1,g=s;if(1===u[m]&&1===u[g]){var v=[t[m],null,null,t[g]];0===t[m].y.cmp(t[g].y)?(v[1]=t[m].add(t[g]),v[2]=t[m].toJ().mixedAdd(t[g].neg())):0===t[m].y.cmp(t[g].y.redNeg())?(v[1]=t[m].toJ().mixedAdd(t[g]),v[2]=t[m].add(t[g].neg())):(v[1]=t[m].toJ().mixedAdd(t[g]),v[2]=t[m].toJ().mixedAdd(t[g].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],b=o(n[m],n[g]);for(h=Math.max(b[0].length,h),f[m]=new Array(h),f[g]=new Array(h),l=0;l<h;l++){var w=0|b[0][l],x=0|b[1][l];f[m][l]=y[3*(w+1)+(x+1)],f[g][l]=0,d[m]=v}}else f[m]=i(n[m],u[m],this._bitLength),f[g]=i(n[g],u[g],this._bitLength),h=Math.max(f[m].length,h),h=Math.max(f[g].length,h)}var S=this.jpoint(null,null,null),M=this._wnafT4;for(s=h;s>=0;s--){for(var _=0;s>=0;){var A=!0;for(l=0;l<r;l++)M[l]=0|f[l][s],0!==M[l]&&(A=!1);if(!A)break;_++,s--}if(s>=0&&_++,S=S.dblp(_),s<0)break;for(l=0;l<r;l++){var E=M[l];0!==E&&(E>0?c=d[l][E-1>>1]:E<0&&(c=d[l][-E-1>>1].neg()),S="affine"===c.type?S.mixedAdd(c):S.add(c))}}for(s=0;s<r;s++)d[s]=null;return a?S:S.toP()},l.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},l.prototype.decodePoint=function(e,t){e=r.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")},c.prototype.encodeCompressed=function(e){return this.encode(e,!0)},c.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))},c.prototype.encode=function(e,t){return r.encode(this._encode(t),e)},c.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},c.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)},c.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}},c.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}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t}})),a.register("9nyiD",(function(e,t){"use strict";var n=a("fp2gt"),r=a("jXr8Y"),i=a("5jAh8"),o=a("84G9i"),s=n.assert;function l(e){o.call(this,"short",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(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 c(e,t,n,i){o.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new r(t,16),this.y=new r(n,16),i&&(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 u(e,t,n,i){o.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new r(0)):(this.x=new r(t,16),this.y=new r(n,16),this.z=new r(i,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}i(l,o),e.exports=l,l.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new r(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);t=(t=i[0].cmp(i[1])<0?i[0]:i[1]).toRed(this.red)}if(e.lambda)n=new r(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 r(e.a,16),b:new r(e.b,16)}})):this._getEndoBasis(n)}}},l.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:r.mont(e),n=new r(2).toRed(t).redInvm(),i=n.redNeg(),o=new r(3).toRed(t).redNeg().redSqrt().redMul(n);return[i.redAdd(o).fromRed(),i.redSub(o).fromRed()]},l.prototype._getEndoBasis=function(e){for(var t,n,i,o,a,s,l,c,u,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=e,h=this.n.clone(),p=new r(1),m=new r(0),g=new r(0),v=new r(1),y=0;0!==f.cmpn(0);){var b=h.div(f);c=h.sub(b.mul(f)),u=g.sub(b.mul(p));var w=v.sub(b.mul(m));if(!i&&c.cmp(d)<0)t=l.neg(),n=p,i=c.neg(),o=u;else if(i&&2==++y)break;l=c,h=f,f=c,g=p,p=u,v=m,m=w}a=c.neg(),s=u;var x=i.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(x)>=0&&(a=t,s=n),i.negative&&(i=i.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:i,b:o},{a:a,b:s}]},l.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),l=i.mul(n.b),c=o.mul(r.b);return{k1:e.sub(a).sub(s),k2:l.add(c).neg()}},l.prototype.pointFromX=function(e,t){(e=new r(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(0!==i.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var o=i.fromRed().isOdd();return(t&&!o||!t&&o)&&(i=i.redNeg()),this.point(e,i)},l.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)},l.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],l=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),l=l.neg(!0)),r[2*o]=s,r[2*o+1]=l,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var c=this._wnafMulAdd(1,r,i,2*o,n),u=0;u<2*o;u++)r[u]=null,i[u]=null;return c},i(c,o.BasePoint),l.prototype.point=function(e,t,n){return new c(this,e,t,n)},l.prototype.pointFromJSON=function(e,t){return c.fromJSON(this,e,t)},c.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}},c.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]},c.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},c.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)+">"},c.prototype.isInfinity=function(){return this.inf},c.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)},c.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)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new r(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.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)},c.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)},c.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))},c.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},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},i(u,o.BasePoint),l.prototype.jpoint=function(e,t,n){return new u(this,e,t,n)},u.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)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.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),l=o.redSub(a);if(0===s.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),d=r.redMul(c),f=l.redSqr().redIAdd(u).redISub(d).redISub(d),h=l.redMul(d.redISub(f)).redISub(o.redMul(u)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,h,p)},u.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 l=a.redSqr(),c=l.redMul(a),u=n.redMul(l),d=s.redSqr().redIAdd(c).redISub(u).redISub(u),f=s.redMul(u.redISub(d)).redISub(i.redMul(c)),h=this.z.redMul(a);return this.curve.jpoint(d,f,h)},u.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t<e;t++)n=n.dbl();return n}var r=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,l=s.redSqr().redSqr(),c=a.redAdd(a);for(t=0;t<e;t++){var u=o.redSqr(),d=c.redSqr(),f=d.redSqr(),h=u.redAdd(u).redIAdd(u).redIAdd(r.redMul(l)),p=o.redMul(d),m=h.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),v=h.redMul(g);v=v.redIAdd(v).redISub(f);var y=c.redMul(s);t+1<e&&(l=l.redMul(f)),o=m,s=y,c=v}return this.curve.jpoint(o,c.redMul(i),s)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},u.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),l=s.redSqr().redISub(a).redISub(a),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=l,t=s.redMul(a.redISub(l)).redISub(c),n=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),d=this.y.redSqr(),f=d.redSqr(),h=this.x.redAdd(d).redSqr().redISub(u).redISub(f);h=h.redIAdd(h);var p=u.redAdd(u).redIAdd(u),m=p.redSqr(),g=f.redIAdd(f);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)},u.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),l=s.redSqr().redISub(a).redISub(a);e=l;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=s.redMul(a.redISub(l)).redISub(c),n=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),d=this.y.redSqr(),f=this.x.redMul(d),h=this.x.redSub(u).redMul(this.x.redAdd(u));h=h.redAdd(h).redIAdd(h);var p=f.redIAdd(f),m=(p=p.redIAdd(p)).redAdd(p);e=h.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(d).redISub(u);var g=d.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)},u.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)),l=t.redAdd(t),c=(l=l.redIAdd(l)).redMul(a),u=s.redSqr().redISub(c.redAdd(c)),d=c.redISub(u),f=a.redSqr();f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var h=s.redMul(d).redISub(f),p=n.redAdd(n).redMul(r);return this.curve.jpoint(u,h,p)},u.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(),l=r.redIAdd(r);l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var c=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(l),u=t.redMul(c);u=(u=u.redIAdd(u)).redIAdd(u);var d=this.x.redMul(s).redISub(u);d=(d=d.redIAdd(d)).redIAdd(d);var f=this.y.redMul(c.redMul(l.redISub(c)).redISub(a.redMul(s)));f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var h=this.z.redAdd(a).redSqr().redISub(n).redISub(s);return this.curve.jpoint(d,f,h)},u.prototype.mul=function(e,t){return e=new r(e,t),this.curve._wnafMul(this,e)},u.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)},u.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}},u.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)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}})),a.register("lQ6rN",(function(e,t){"use strict";var n=a("jXr8Y"),r=a("5jAh8"),i=a("84G9i"),o=a("fp2gt");function s(e){i.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function l(e,t,r){i.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}r(s,i),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)},r(l,i.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(o.toArray(e,t),1)},s.prototype.point=function(e,t){return new l(this,e,t)},s.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(e,t){return new l(e,t[0],t[1]||e.one)},l.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)+">"},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},l.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)},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},l.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()),l=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,l)},l.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},l.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()}})),a.register("6iYEY",(function(e,t){"use strict";var n=a("fp2gt"),r=a("jXr8Y"),i=a("5jAh8"),o=a("84G9i"),s=n.assert;function l(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,o.call(this,"edwards",e),this.a=new r(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new r(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new r(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 c(e,t,n,i,a){o.BasePoint.call(this,e,"projective"),null===t&&null===n&&null===i?(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 r(t,16),this.y=new r(n,16),this.z=i?new r(i,16):this.curve.one,this.t=a&&new r(a,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()))))}i(l,o),e.exports=l,l.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},l.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},l.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},l.prototype.pointFromX=function(e,t){(e=new r(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),i=this.c2.redSub(this.a.redMul(n)),o=this.one.redSub(this.c2.redMul(this.d).redMul(n)),a=i.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var l=s.fromRed().isOdd();return(t&&!l||!t&&l)&&(s=s.redNeg()),this.point(e,s)},l.prototype.pointFromY=function(e,t){(e=new r(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),i=n.redSub(this.c2),o=n.redMul(this.d).redMul(this.c2).redSub(this.a),a=i.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)},l.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)},i(c,o.BasePoint),l.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},l.prototype.point=function(e,t,n,r){return new c(this,e,t,n,r)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.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)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.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),l=i.redMul(a),c=o.redMul(s),u=i.redMul(s),d=a.redMul(o);return this.curve.point(l,c,d,u)},c.prototype._projDbl=function(){var e,t,n,r,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),l=this.y.redSqr();if(this.curve.twisted){var c=(r=this.curve._mulA(s)).redAdd(l);this.zOne?(e=a.redSub(s).redSub(l).redMul(c.redSub(this.curve.two)),t=c.redMul(r.redSub(l)),n=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),o=c.redSub(i).redISub(i),e=a.redSub(s).redISub(l).redMul(o),t=c.redMul(r.redSub(l)),n=c.redMul(o))}else r=s.redAdd(l),i=this.curve._mulC(this.z).redSqr(),o=r.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(r)).redMul(o),t=this.curve._mulC(r).redMul(s.redISub(l)),n=r.redMul(o);return this.curve.point(e,t,n)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.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),l=n.redAdd(t),c=o.redMul(a),u=s.redMul(l),d=o.redMul(l),f=a.redMul(s);return this.curve.point(c,u,f,d)},c.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),l=i.redSub(s),c=i.redAdd(s),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),d=r.redMul(l).redMul(u);return this.curve.twisted?(t=r.redMul(c).redMul(a.redSub(this.curve._mulA(o))),n=l.redMul(c)):(t=r.redMul(c).redMul(a.redSub(o)),n=this.curve._mulC(l).redMul(c)),this.curve.point(d,t,n)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},c.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},c.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},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.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}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add})),a.register("gU8eC",(function(e,t){"use strict";var n,r=e.exports,i=a("ba8bl"),o=a("e5bLI"),s=a("fp2gt").assert;function l(e){"short"===e.type?this.curve=new o.short(e):"edwards"===e.type?this.curve=new o.edwards(e):this.curve=new o.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 c(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var n=new l(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:n}),n}})}r.PresetCurve=l,c("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:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("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:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("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:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("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:i.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"]}),c("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:i.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"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),c("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:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=a("2OXMU")}catch(e){n=void 0}c("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:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})})),a.register("ba8bl",(function(e,t){var n=e.exports;n.utils=a("7MeDX"),n.common=a("cXjky"),n.sha=a("dBAtQ"),n.ripemd=a("fEnno"),n.hmac=a("aBJ6r"),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160})),a.register("7MeDX",(function(t,n){var r,i,o,s,l,c,u,d,f,h,p,m,g,v,y,b,w,x,S,M,_,A,E,C,k,T;e(t.exports,"inherits",(()=>r),(e=>r=e)),e(t.exports,"toArray",(()=>i),(e=>i=e)),e(t.exports,"toHex",(()=>o),(e=>o=e)),e(t.exports,"htonl",(()=>s),(e=>s=e)),e(t.exports,"toHex32",(()=>l),(e=>l=e)),e(t.exports,"zero2",(()=>c),(e=>c=e)),e(t.exports,"zero8",(()=>u),(e=>u=e)),e(t.exports,"join32",(()=>d),(e=>d=e)),e(t.exports,"split32",(()=>f),(e=>f=e)),e(t.exports,"rotr32",(()=>h),(e=>h=e)),e(t.exports,"rotl32",(()=>p),(e=>p=e)),e(t.exports,"sum32",(()=>m),(e=>m=e)),e(t.exports,"sum32_3",(()=>g),(e=>g=e)),e(t.exports,"sum32_4",(()=>v),(e=>v=e)),e(t.exports,"sum32_5",(()=>y),(e=>y=e)),e(t.exports,"sum64",(()=>b),(e=>b=e)),e(t.exports,"sum64_hi",(()=>w),(e=>w=e)),e(t.exports,"sum64_lo",(()=>x),(e=>x=e)),e(t.exports,"sum64_4_hi",(()=>S),(e=>S=e)),e(t.exports,"sum64_4_lo",(()=>M),(e=>M=e)),e(t.exports,"sum64_5_hi",(()=>_),(e=>_=e)),e(t.exports,"sum64_5_lo",(()=>A),(e=>A=e)),e(t.exports,"rotr64_hi",(()=>E),(e=>E=e)),e(t.exports,"rotr64_lo",(()=>C),(e=>C=e)),e(t.exports,"shr64_hi",(()=>k),(e=>k=e)),e(t.exports,"shr64_lo",(()=>T),(e=>T=e));var I=a("iGZtb"),O=a("5jAh8");function R(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function P(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function N(e){return 1===e.length?"0"+e:e}function L(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}r=O,i=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 o=e.charCodeAt(i);o<128?n[r++]=o:o<2048?(n[r++]=o>>6|192,n[r++]=63&o|128):R(e,i)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),n[r++]=o>>18|240,n[r++]=o>>12&63|128,n[r++]=o>>6&63|128,n[r++]=63&o|128):(n[r++]=o>>12|224,n[r++]=o>>6&63|128,n[r++]=63&o|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n},o=function(e){for(var t="",n=0;n<e.length;n++)t+=N(e[n].toString(16));return t},s=P,l=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=P(i)),n+=L(i.toString(16))}return n},c=N,u=L,d=function(e,t,n,r){var i=n-t;I(i%4==0);for(var o=new Array(i/4),a=0,s=t;a<o.length;a++,s+=4){var l;l="big"===r?e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3]:e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s],o[a]=l>>>0}return o},f=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},h=function(e,t){return e>>>t|e<<32-t},p=function(e,t){return e<<t|e>>>32-t},m=function(e,t){return e+t>>>0},g=function(e,t,n){return e+t+n>>>0},v=function(e,t,n,r){return e+t+n+r>>>0},y=function(e,t,n,r,i){return e+t+n+r+i>>>0},b=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},w=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},x=function(e,t,n,r){return t+r>>>0},S=function(e,t,n,r,i,o,a,s){var l=0,c=t;return l+=(c=c+r>>>0)<t?1:0,l+=(c=c+o>>>0)<o?1:0,e+n+i+a+(l+=(c=c+s>>>0)<s?1:0)>>>0},M=function(e,t,n,r,i,o,a,s){return t+r+o+s>>>0},_=function(e,t,n,r,i,o,a,s,l,c){var u=0,d=t;return u+=(d=d+r>>>0)<t?1:0,u+=(d=d+o>>>0)<o?1:0,u+=(d=d+s>>>0)<s?1:0,e+n+i+a+l+(u+=(d=d+c>>>0)<c?1:0)>>>0},A=function(e,t,n,r,i,o,a,s,l,c){return t+r+o+s+c>>>0},E=function(e,t,n){return(t<<32-n|e>>>n)>>>0},C=function(e,t,n){return(e<<32-n|t>>>n)>>>0},k=function(e,t,n){return e>>>n},T=function(e,t,n){return(e<<32-n|t>>>n)>>>0}})),a.register("cXjky",(function(t,n){var r;e(t.exports,"BlockHash",(()=>r),(e=>r=e));var i=a("7MeDX"),o=a("iGZtb");function s(){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}r=s,s.prototype.update=function(e,t){if(e=i.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=i.join32(e,0,e.length-n,this.endian);for(var r=0;r<e.length;r+=this._delta32)this._update(e,r,r+this._delta32)}return this},s.prototype.digest=function(e){return this.update(this._pad()),o(null===this.pending),this._digest(e)},s.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}})),a.register("dBAtQ",(function(t,n){var r,i,o,s,l;e(t.exports,"sha1",(()=>r),(e=>r=e)),e(t.exports,"sha224",(()=>i),(e=>i=e)),e(t.exports,"sha256",(()=>o),(e=>o=e)),e(t.exports,"sha384",(()=>s),(e=>s=e)),e(t.exports,"sha512",(()=>l),(e=>l=e)),r=a("gkYl9"),i=a("dBaTo"),o=a("bMsM7"),s=a("69vgx"),l=a("cvw4e")})),a.register("gkYl9",(function(e,t){"use strict";var n=a("7MeDX"),r=a("cXjky"),i=a("5buio"),o=n.rotl32,s=n.sum32,l=n.sum32_5,c=i.ft_1,u=r.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function f(){if(!(this instanceof f))return new f;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(f,u),e.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.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]=o(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],a=this.h[1],u=this.h[2],f=this.h[3],h=this.h[4];for(r=0;r<n.length;r++){var p=~~(r/20),m=l(o(i,5),c(p,a,u,f),h,n[r],d[p]);h=f,f=u,u=o(a,30),a=i,i=m}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],a),this.h[2]=s(this.h[2],u),this.h[3]=s(this.h[3],f),this.h[4]=s(this.h[4],h)},f.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}})),a.register("5buio",(function(t,n){var r,i,o,s,l,c,u;e(t.exports,"ft_1",(()=>r),(e=>r=e)),e(t.exports,"ch32",(()=>i),(e=>i=e)),e(t.exports,"maj32",(()=>o),(e=>o=e)),e(t.exports,"s0_256",(()=>s),(e=>s=e)),e(t.exports,"s1_256",(()=>l),(e=>l=e)),e(t.exports,"g0_256",(()=>c),(e=>c=e)),e(t.exports,"g1_256",(()=>u),(e=>u=e));var d=a("7MeDX").rotr32;function f(e,t,n){return e&t^~e&n}function h(e,t,n){return e&t^e&n^t&n}function p(e,t,n){return e^t^n}r=function(e,t,n,r){return 0===e?f(t,n,r):1===e||3===e?p(t,n,r):2===e?h(t,n,r):void 0},i=f,o=h,s=function(e){return d(e,2)^d(e,13)^d(e,22)},l=function(e){return d(e,6)^d(e,11)^d(e,25)},c=function(e){return d(e,7)^d(e,18)^e>>>3},u=function(e){return d(e,17)^d(e,19)^e>>>10}})),a.register("dBaTo",(function(e,t){"use strict";var n=a("7MeDX"),r=a("bMsM7");function i(){if(!(this instanceof i))return new i;r.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(i,r),e.exports=i,i.blockSize=512,i.outSize=224,i.hmacStrength=192,i.padLength=64,i.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}})),a.register("bMsM7",(function(e,t){"use strict";var n=a("7MeDX"),r=a("cXjky"),i=a("5buio"),o=a("iGZtb"),s=n.sum32,l=n.sum32_4,c=n.sum32_5,u=i.ch32,d=i.maj32,f=i.s0_256,h=i.s1_256,p=i.g0_256,m=i.g1_256,g=r.BlockHash,v=[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 y(){if(!(this instanceof y))return new y;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}n.inherits(y,g),e.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.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]=l(m(n[r-2]),n[r-7],p(n[r-15]),n[r-16]);var i=this.h[0],a=this.h[1],g=this.h[2],v=this.h[3],y=this.h[4],b=this.h[5],w=this.h[6],x=this.h[7];for(o(this.k.length===n.length),r=0;r<n.length;r++){var S=c(x,h(y),u(y,b,w),this.k[r],n[r]),M=s(f(i),d(i,a,g));x=w,w=b,b=y,y=s(v,S),v=g,g=a,a=i,i=s(S,M)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],a),this.h[2]=s(this.h[2],g),this.h[3]=s(this.h[3],v),this.h[4]=s(this.h[4],y),this.h[5]=s(this.h[5],b),this.h[6]=s(this.h[6],w),this.h[7]=s(this.h[7],x)},y.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}})),a.register("69vgx",(function(e,t){"use strict";var n=a("7MeDX"),r=a("cvw4e");function i(){if(!(this instanceof i))return new i;r.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(i,r),e.exports=i,i.blockSize=1024,i.outSize=384,i.hmacStrength=192,i.padLength=128,i.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}})),a.register("cvw4e",(function(e,t){"use strict";var n=a("7MeDX"),r=a("cXjky"),i=a("iGZtb"),o=n.rotr64_hi,s=n.rotr64_lo,l=n.shr64_hi,c=n.shr64_lo,u=n.sum64,d=n.sum64_hi,f=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,m=n.sum64_5_hi,g=n.sum64_5_lo,v=r.BlockHash,y=[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 b(){if(!(this instanceof b))return new b;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=y,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 x(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 M(e,t,n,r,i,o){var a=t&r^t&o^r&o;return a<0&&(a+=4294967296),a}function _(e,t){var n=o(e,t,28)^o(t,e,2)^o(t,e,7);return n<0&&(n+=4294967296),n}function A(e,t){var n=s(e,t,28)^s(t,e,2)^s(t,e,7);return n<0&&(n+=4294967296),n}function E(e,t){var n=o(e,t,14)^o(e,t,18)^o(t,e,9);return n<0&&(n+=4294967296),n}function C(e,t){var n=s(e,t,14)^s(e,t,18)^s(t,e,9);return n<0&&(n+=4294967296),n}function k(e,t){var n=o(e,t,1)^o(e,t,8)^l(e,t,7);return n<0&&(n+=4294967296),n}function T(e,t){var n=s(e,t,1)^s(e,t,8)^c(e,t,7);return n<0&&(n+=4294967296),n}function I(e,t){var n=o(e,t,19)^o(t,e,29)^l(e,t,6);return n<0&&(n+=4294967296),n}function O(e,t){var n=s(e,t,19)^s(t,e,29)^c(e,t,6);return n<0&&(n+=4294967296),n}n.inherits(b,v),e.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.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=I(n[r-4],n[r-3]),o=O(n[r-4],n[r-3]),a=n[r-14],s=n[r-13],l=k(n[r-30],n[r-29]),c=T(n[r-30],n[r-29]),u=n[r-32],d=n[r-31];n[r]=h(i,o,a,s,l,c,u,d),n[r+1]=p(i,o,a,s,l,c,u,d)}},b.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,r=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],l=this.h[4],c=this.h[5],h=this.h[6],p=this.h[7],v=this.h[8],y=this.h[9],b=this.h[10],k=this.h[11],T=this.h[12],I=this.h[13],O=this.h[14],R=this.h[15];i(this.k.length===n.length);for(var P=0;P<n.length;P+=2){var N=O,L=R,D=E(v,y),B=C(v,y),j=w(v,y,b,k,T),F=x(v,y,b,k,T,I),U=this.k[P],z=this.k[P+1],H=n[P],V=n[P+1],W=m(N,L,D,B,j,F,U,z,H,V),G=g(N,L,D,B,j,F,U,z,H,V);N=_(r,o),L=A(r,o),D=S(r,o,a,s,l),B=M(r,o,a,s,l,c);var q=d(N,L,D,B),K=f(N,L,D,B);O=T,R=I,T=b,I=k,b=v,k=y,v=d(h,p,W,G),y=f(p,p,W,G),h=l,p=c,l=a,c=s,a=r,s=o,r=d(W,G,q,K),o=f(W,G,q,K)}u(this.h,0,r,o),u(this.h,2,a,s),u(this.h,4,l,c),u(this.h,6,h,p),u(this.h,8,v,y),u(this.h,10,b,k),u(this.h,12,T,I),u(this.h,14,O,R)},b.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}})),a.register("fEnno",(function(t,n){var r;e(t.exports,"ripemd160",(()=>r),(e=>r=e));var i=a("7MeDX"),o=a("cXjky"),s=i.rotl32,l=i.sum32,c=i.sum32_3,u=i.sum32_4,d=o.BlockHash;function f(){if(!(this instanceof f))return new f;d.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(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 p(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function m(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}i.inherits(f,d),r=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],o=this.h[3],a=this.h[4],d=n,f=r,w=i,x=o,S=a,M=0;M<80;M++){var _=l(s(u(n,h(M,r,i,o),e[g[M]+t],p(M)),y[M]),a);n=a,a=o,o=s(i,10),i=r,r=_,_=l(s(u(d,h(79-M,f,w,x),e[v[M]+t],m(M)),b[M]),S),d=S,S=x,x=s(w,10),w=f,f=_}_=c(this.h[1],i,x),this.h[1]=c(this.h[2],o,S),this.h[2]=c(this.h[3],a,d),this.h[3]=c(this.h[4],n,f),this.h[4]=c(this.h[0],r,w),this.h[0]=_},f.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"little"):i.split32(this.h,"little")};var g=[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],v=[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],y=[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]})),a.register("aBJ6r",(function(e,t){"use strict";var n=a("7MeDX"),r=a("iGZtb");function i(e,t,r){if(!(this instanceof i))return new i(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=i,i.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),r(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)},i.prototype.update=function(e,t){return this.inner.update(e,t),this},i.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}})),a.register("2OXMU",(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"]]}}})),a.register("4hQQJ",(function(e,t){"use strict";var n=a("jXr8Y"),r=a("h84tF"),i=a("fp2gt"),o=a("gU8eC"),s=a("hZWXr"),l=i.assert,c=a("8HvNn"),u=a("k8sA6");function d(e){if(!(this instanceof d))return new d(e);"string"==typeof e&&(l(Object.prototype.hasOwnProperty.call(o,e),"Unknown curve "+e),e=o[e]),e instanceof o.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=d,d.prototype.keyPair=function(e){return new c(this,e)},d.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},d.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},d.prototype.genKeyPair=function(e){e||(e={});for(var t=new r({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()}),i=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(t.generate(i));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},d.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},d.prototype.sign=function(e,t,i,o){"object"==typeof i&&(o=i,i=null),o||(o={}),t=this.keyFromPrivate(t,i),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),l=e.toArray("be",a),c=new r({hash:this.hash,entropy:s,nonce:l,pers:o.pers,persEnc:o.persEnc||"utf8"}),d=this.n.sub(new n(1)),f=0;;f++){var h=o.k?o.k(f):new n(c.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(d)>=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 v=h.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var y=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),y^=1),new u({r:g,s:v,recoveryParam:y})}}}}}},d.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new u(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,l=a.invm(this.n),c=l.mul(e).umod(this.n),d=l.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),d)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,r.getPublic(),d)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},d.prototype.recoverPubKey=function(e,t,r,i){l((3&r)===r,"The recovery param is more than two bits"),t=new u(t,i);var o=this.n,a=new n(e),s=t.r,c=t.s,d=1&r,f=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");s=f?this.curve.pointFromX(s.add(this.curve.n),d):this.curve.pointFromX(s,d);var h=t.r.invm(o),p=o.sub(a).mul(h).umod(o),m=c.mul(h).umod(o);return this.g.mulAdd(p,s,m)},d.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new u(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")}})),a.register("h84tF",(function(e,t){"use strict";var n=a("ba8bl"),r=a("8Znt4"),i=a("iGZtb");function o(e){if(!(this instanceof o))return new o(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=r.toArray(e.entropy,e.entropyEnc||"hex"),n=r.toArray(e.nonce,e.nonceEnc||"hex"),a=r.toArray(e.pers,e.persEnc||"hex");i(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,a)}e.exports=o,o.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},o.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},o.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())},o.prototype.reseed=function(e,t,n,o){"string"!=typeof t&&(o=n,n=t,t=null),e=r.toArray(e,t),n=r.toArray(n,o),i(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},o.prototype.generate=function(e,t,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(i=n,n=t,t=null),n&&(n=r.toArray(n,i||"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++,r.encode(a,t)}})),a.register("8HvNn",(function(e,t){"use strict";var n=a("jXr8Y"),r=a("fp2gt").assert;function i(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=i,i.fromPublic=function(e,t,n){return t instanceof i?t:new i(e,{pub:t,pubEnc:n})},i.fromPrivate=function(e,t,n){return t instanceof i?t:new i(e,{priv:t,privEnc:n})},i.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"}},i.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},i.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},i.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},i.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?r(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||r(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)},i.prototype.derive=function(e){return e.validate()||r(e.validate(),"public point not validated"),e.mul(this.priv).getX()},i.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},i.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},i.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}})),a.register("k8sA6",(function(e,t){"use strict";var n=a("jXr8Y"),r=a("fp2gt"),i=r.assert;function o(e,t){if(e instanceof o)return e;this._importDER(e,t)||(i(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function l(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;for(var i=0,o=0,a=t.place;o<r;o++,a++)i<<=8,i|=e[a],i>>>=0;return!(i<=127)&&(t.place=a,i)}function c(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 u(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=o,o.prototype._importDER=function(e,t){e=r.toArray(e,t);var i=new s;if(48!==e[i.place++])return!1;var o=l(e,i);if(!1===o)return!1;if(o+i.place!==e.length)return!1;if(2!==e[i.place++])return!1;var a=l(e,i);if(!1===a)return!1;var c=e.slice(i.place,a+i.place);if(i.place+=a,2!==e[i.place++])return!1;var u=l(e,i);if(!1===u)return!1;if(e.length!==u+i.place)return!1;var d=e.slice(i.place,u+i.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new n(c),this.s=new n(d),this.recoveryParam=null,!0},o.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=c(t),n=c(n);!(n[0]||128&n[1]);)n=n.slice(1);var i=[2];u(i,t.length),(i=i.concat(t)).push(2),u(i,n.length);var o=i.concat(n),a=[48];return u(a,o.length),a=a.concat(o),r.encode(a,e)}})),a.register("ieJqr",(function(e,t){"use strict";var n=a("ba8bl"),r=a("gU8eC"),i=a("fp2gt"),o=i.assert,s=i.parseBytes,l=a("knAIT"),c=a("8CdZY");function u(e){if(o("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=r[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=n.sha512}e.exports=u,u.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()),l=r.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:l,Rencoded:o})},u.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)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return i.intFromLE(e.digest()).umod(this.curve.n)},u.prototype.keyFromPublic=function(e){return l.fromPublic(this,e)},u.prototype.keyFromSecret=function(e){return l.fromSecret(this,e)},u.prototype.makeSignature=function(e){return e instanceof c?e:new c(this,e)},u.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},u.prototype.decodePoint=function(e){var t=(e=i.parseBytes(e)).length-1,n=e.slice(0,t).concat(-129&e[t]),r=0!=(128&e[t]),o=i.intFromLE(n);return this.curve.pointFromY(o,r)},u.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},u.prototype.decodeInt=function(e){return i.intFromLE(e)},u.prototype.isPoint=function(e){return e instanceof this.pointClass}})),a.register("knAIT",(function(e,t){"use strict";var n=a("fp2gt"),r=n.assert,i=n.parseBytes,o=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=i(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=i(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},o(s,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),o(s,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),o(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})),o(s,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),o(s,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),o(s,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),s.prototype.sign=function(e){return r(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 r(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s})),a.register("8CdZY",(function(e,t){"use strict";var n=a("jXr8Y"),r=a("fp2gt"),i=r.assert,o=r.cachedProperty,s=r.parseBytes;function l(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)}),i(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}o(l,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),o(l,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),o(l,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),o(l,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),l.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},l.prototype.toHex=function(){return r.encode(this.toBytes(),"hex").toUpperCase()},e.exports=l})),a.register("fmDmL",(function(e,t){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.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 o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:a("1DJXa").Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function l(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,r,i){for(var o=0,a=0,s=Math.min(e.length,r),l=t;l<s;l++){var c=e.charCodeAt(l)-48;o*=i,a=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a<i,"Invalid character"),o+=a}return o}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){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):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("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"===r)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"===r)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()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,a=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=l(e,t,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=l(e,t,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},i.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,l=0,u=n;u<s;u+=r)l=c(e,u,u+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==a){var d=1;for(l=c(e,u,e.length,t),u=0;u<a;u++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},i.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},i.prototype._move=function(e){u(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(e){i.prototype.inspect=d}else i.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var f=["","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"],h=[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],p=[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];i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],l=(16777215&(s<<i|o)).toString(16);o=s>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?f[6-l.length]+l+r:l+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],u=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modrn(u).toString(e);r=(d=d.idivn(u)).isZero()?m+r:f[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function m(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,l=a/67108864|0;n.words[0]=s;for(var c=1;c<r;c++){for(var u=l>>>26,d=67108863&l,f=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=f;h++){var p=c-h|0;u+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}n.words[c]=0|d,l=0|u}return 0!==l?n.words[c]=0|l:n.length--,n._strip()}i.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},i.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|r;e[n++]=255&a,n<e.length&&(e[n++]=a>>8&255),n<e.length&&(e[n++]=a>>16&255),6===o?(n<e.length&&(e[n++]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},i.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|r;e[n--]=255&a,n>=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===o?(n>=0&&(e[n--]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.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},i.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},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.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},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.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()},i.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.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()},i.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.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()},i.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},i.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},i.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)},i.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()},i.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,n){var r,i,o,a=e.words,s=t.words,l=n.words,c=0,u=0|a[0],d=8191&u,f=u>>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,x=b>>>13,S=0|a[4],M=8191&S,_=S>>>13,A=0|a[5],E=8191&A,C=A>>>13,k=0|a[6],T=8191&k,I=k>>>13,O=0|a[7],R=8191&O,P=O>>>13,N=0|a[8],L=8191&N,D=N>>>13,B=0|a[9],j=8191&B,F=B>>>13,U=0|s[0],z=8191&U,H=U>>>13,V=0|s[1],W=8191&V,G=V>>>13,q=0|s[2],K=8191&q,Y=q>>>13,J=0|s[3],Q=8191&J,X=J>>>13,Z=0|s[4],$=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],le=8191&se,ce=se>>>13,ue=0|s[8],de=8191&ue,fe=ue>>>13,he=0|s[9],pe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(c+(r=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,H))+Math.imul(f,z)|0))<<13)|0;c=((o=Math.imul(f,H))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,z),i=(i=Math.imul(p,H))+Math.imul(m,z)|0,o=Math.imul(m,H);var ve=(c+(r=r+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(f,W)|0))<<13)|0;c=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,z),i=(i=Math.imul(v,H))+Math.imul(y,z)|0,o=Math.imul(y,H),r=r+Math.imul(p,W)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,G)|0;var ye=(c+(r=r+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(f,K)|0))<<13)|0;c=((o=o+Math.imul(f,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(w,z),i=(i=Math.imul(w,H))+Math.imul(x,z)|0,o=Math.imul(x,H),r=r+Math.imul(v,W)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,Y)|0;var be=(c+(r=r+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,X)|0)+Math.imul(f,Q)|0))<<13)|0;c=((o=o+Math.imul(f,X)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(M,z),i=(i=Math.imul(M,H))+Math.imul(_,z)|0,o=Math.imul(_,H),r=r+Math.imul(w,W)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,G)|0,r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,X)|0;var we=(c+(r=r+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,$)|0))<<13)|0;c=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(E,z),i=(i=Math.imul(E,H))+Math.imul(C,z)|0,o=Math.imul(C,H),r=r+Math.imul(M,W)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,X)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,ee)|0;var xe=(c+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;c=((o=o+Math.imul(f,re)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(T,z),i=(i=Math.imul(T,H))+Math.imul(I,z)|0,o=Math.imul(I,H),r=r+Math.imul(E,W)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,G)|0,r=r+Math.imul(M,K)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,X)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,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=(c+(r=r+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;c=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(R,z),i=(i=Math.imul(R,H))+Math.imul(P,z)|0,o=Math.imul(P,H),r=r+Math.imul(T,W)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(E,K)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(C,K)|0,o=o+Math.imul(C,Y)|0,r=r+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,X)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(y,ne)|0,o=o+Math.imul(y,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 Me=(c+(r=r+Math.imul(d,le)|0)|0)+((8191&(i=(i=i+Math.imul(d,ce)|0)+Math.imul(f,le)|0))<<13)|0;c=((o=o+Math.imul(f,ce)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,z),i=(i=Math.imul(L,H))+Math.imul(D,z)|0,o=Math.imul(D,H),r=r+Math.imul(R,W)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,G)|0,r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,Y)|0,r=r+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,X)|0,r=r+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ce)|0;var _e=(c+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;c=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(j,z),i=(i=Math.imul(j,H))+Math.imul(F,z)|0,o=Math.imul(F,H),r=r+Math.imul(L,W)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(D,W)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(R,K)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,Y)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,X)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,ee)|0,r=r+Math.imul(M,ne)|0,i=(i=i+Math.imul(M,re)|0)+Math.imul(_,ne)|0,o=o+Math.imul(_,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,r=r+Math.imul(v,le)|0,i=(i=i+Math.imul(v,ce)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ce)|0,r=r+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,fe)|0;var Ae=(c+(r=r+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;c=((o=o+Math.imul(f,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(j,W),i=(i=Math.imul(j,G))+Math.imul(F,W)|0,o=Math.imul(F,G),r=r+Math.imul(L,K)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,X)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(C,ne)|0,o=o+Math.imul(C,re)|0,r=r+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,ce)|0,r=r+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(y,de)|0,o=o+Math.imul(y,fe)|0;var Ee=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(j,K),i=(i=Math.imul(j,Y))+Math.imul(F,K)|0,o=Math.imul(F,Y),r=r+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,X)|0,r=r+Math.imul(R,$)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(I,ne)|0,o=o+Math.imul(I,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,r=r+Math.imul(M,le)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,ce)|0,r=r+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(x,de)|0,o=o+Math.imul(x,fe)|0;var Ce=(c+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,Q),i=(i=Math.imul(j,X))+Math.imul(F,Q)|0,o=Math.imul(F,X),r=r+Math.imul(L,$)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,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(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,r=r+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(C,le)|0,o=o+Math.imul(C,ce)|0,r=r+Math.imul(M,de)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(_,de)|0,o=o+Math.imul(_,fe)|0;var ke=(c+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,ee))+Math.imul(F,$)|0,o=Math.imul(F,ee),r=r+Math.imul(L,ne)|0,i=(i=i+Math.imul(L,re)|0)+Math.imul(D,ne)|0,o=o+Math.imul(D,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(T,le)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,ce)|0,r=r+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,fe)|0;var Te=(c+(r=r+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(F,ne)|0,o=Math.imul(F,re),r=r+Math.imul(L,oe)|0,i=(i=i+Math.imul(L,ae)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,ae)|0,r=r+Math.imul(R,le)|0,i=(i=i+Math.imul(R,ce)|0)+Math.imul(P,le)|0,o=o+Math.imul(P,ce)|0,r=r+Math.imul(T,de)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(I,de)|0,o=o+Math.imul(I,fe)|0;var Ie=(c+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),r=r+Math.imul(L,le)|0,i=(i=i+Math.imul(L,ce)|0)+Math.imul(D,le)|0,o=o+Math.imul(D,ce)|0,r=r+Math.imul(R,de)|0,i=(i=i+Math.imul(R,fe)|0)+Math.imul(P,de)|0,o=o+Math.imul(P,fe)|0;var Oe=(c+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(I,pe)|0))<<13)|0;c=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,le),i=(i=Math.imul(j,ce))+Math.imul(F,le)|0,o=Math.imul(F,ce),r=r+Math.imul(L,de)|0,i=(i=i+Math.imul(L,fe)|0)+Math.imul(D,de)|0,o=o+Math.imul(D,fe)|0;var Re=(c+(r=r+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(j,de),i=(i=Math.imul(j,fe))+Math.imul(F,de)|0,o=Math.imul(F,fe);var Pe=(c+(r=r+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,me)|0)+Math.imul(D,pe)|0))<<13)|0;c=((o=o+Math.imul(D,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ne=(c+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,l[0]=ge,l[1]=ve,l[2]=ye,l[3]=be,l[4]=we,l[5]=xe,l[6]=Se,l[7]=Me,l[8]=_e,l[9]=Ae,l[10]=Ee,l[11]=Ce,l[12]=ke,l[13]=Te,l[14]=Ie,l[15]=Oe,l[16]=Re,l[17]=Pe,l[18]=Ne,0!==c&&(l[19]=c,n.length++),n};function v(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,l=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=l;c++){var u=o-c,d=(0|e.words[u])*(0|t.words[c]),f=67108863&d;s=67108863&(f=f+s|0),i+=(a=(a=a+(d/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function y(e,t,n){return v(e,t,n)}function b(e,t){this.x=e,this.y=t}Math.imul||(g=m),i.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):n<63?m(this,e,t):n<1024?v(this,e,t):y(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},b.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},b.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]]},b.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,l=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),u=0;u<i;u+=s)for(var d=l,f=c,h=0;h<a;h++){var p=n[u+h],m=r[u+h],g=n[u+h+a],v=r[u+h+a],y=d*g-f*v;v=d*v+f*g,g=y,n[u+h]=p+g,r[u+h]=m+v,n[u+h+a]=p-g,r[u+h+a]=m-v,h!==s&&(y=l*d-c*f,f=l*f+c*d,d=y)}},b.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},b.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}},b.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},b.prototype.convert13b=function(e,t,r,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)r[a]=0;n(0===o),n(0==(-8192&o))},b.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},b.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),l=new Array(r),c=new Array(r),u=new Array(r),d=new Array(r),f=n.words;f.length=r,this.convert13b(e.words,e.length,a,r),this.convert13b(t.words,t.length,c,r),this.transform(a,o,s,l,r,i),this.transform(c,o,u,d,r,i);for(var h=0;h<r;h++){var p=s[h]*u[h]-l[h]*d[h];l[h]=s[h]*d[h]+l[h]*u[h],s[h]=p}return this.conjugate(s,l,r),this.transform(s,l,f,o,r,i),this.conjugate(f,o,r),this.normalize13b(f,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n._strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),y(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,a=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.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]>>>i&1}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var o=n.sqr();r<t.length;r++,o=o.sqr())0!==t[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,l=(0|this.words[t])-s<<r;this.words[t]=l|a,a=s>>>26-r}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()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("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,l=r;if(i-=a,i=Math.max(0,i),l){for(var c=0;c<a;c++)l.words[c]=this.words[c];l.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=i);c--){var d=0|this.words[c];this.words[c]=u<<26-o|d>>>o,u=d&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r)&&!!(this.words[r]&i)},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(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)},i.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},i.prototype.isubn=function(e){if(n("number"==typeof e),n(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()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,o,a=e.length+r;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+s;var l=(0|e.words[i])*t;s=((o-=67108863&l)>>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-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()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,a=0|o.words[o.length-1];0!==(n=26-this._countBits(a))&&(o=o.ushln(n),r.iushln(n),a=0|o.words[o.length-1]);var s,l=r.length-o.length;if("mod"!==t){(s=new i(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var u=r.clone()._ishlnsubmul(o,1,l);0===u.negative&&(r=u,s&&(s.words[l]=1));for(var d=l-1;d>=0;d--){var f=67108864*(0|r.words[o.length+d])+(0|r.words[o.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(o,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(o,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var o,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.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)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=67108864%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),s=new i(0),l=new i(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0==(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(u),a.isub(d)),o.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(d)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s),a.isub(l)):(r.isub(t),s.isub(o),l.isub(a))}return{a:s,b:l,gcd:r.iushln(c)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),s=new i(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var d=0,f=1;0==(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(o=0===t.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(e),o},i.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)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;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},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(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},i.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},i.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},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new E(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function x(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}x.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.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):void 0!==n.strip?n.strip():n._strip(),n},x.prototype.split=function(e,t){e.iushrn(this.n,0,t)},x.prototype.imulK=function(e){return e.imul(this.k)},r(S,x),S.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&n)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},S.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},r(M,x),r(_,x),r(A,x),A.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},i._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new S;else if("p224"===e)t=new M;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return w[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.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)},E.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},E.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)},E.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);n(!o.isZero());var s=new i(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var d=this.pow(u,o),f=this.pow(e,o.addn(1).iushrn(1)),h=this.pow(e,o),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g<p);var v=this.pow(d,new i(1).iushln(p-g-1));f=f.redMul(v),d=v.redSqr(),h=h.redMul(d),p=g}return f},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var o=n[0],a=0,s=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var c=t.words[r],u=l-1;u>=0;u--){var d=c>>u&1;o!==n[0]&&(o=this.sqr(o)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===r&&0===u)&&(o=this.mul(o,n[a]),s=0,a=0)):s=0}l=26}return o},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new C(e)},r(C,E),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.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)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)})),a.register("fEs62",(function(e,t){var n=a("7BZGE"),r=a("ei3QW"),i=a("3skN1"),o=a("duD0R"),s=a("cabM3"),l=a("8ByQm").Buffer;function c(e){var t;"object"!=typeof e||l.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=l.from(e));var a,c,u=i(e,t),d=u.tag,f=u.data;switch(d){case"CERTIFICATE":c=n.certificate.decode(f,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=n.PublicKey.decode(f,"der")),a=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=n.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+a)}case"ENCRYPTED PRIVATE KEY":f=function(e,t){var n=e.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=r[e.algorithm.decrypt.cipher.algo.join(".")],c=e.algorithm.decrypt.cipher.iv,u=e.subjectPrivateKey,d=parseInt(a.split("-")[1],10)/8,f=s.pbkdf2Sync(t,n,i,d,"sha1"),h=o.createDecipheriv(a,f,c),p=[];return p.push(h.update(u)),p.push(h.final()),l.concat(p)}(f=n.EncryptedPrivateKey.decode(f,"der"),t);case"PRIVATE KEY":switch(a=(c=n.PrivateKey.decode(f,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:n.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=n.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+a)}case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(f,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(f,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(f,"der")};case"EC PRIVATE KEY":return{curve:(f=n.ECPrivateKey.decode(f,"der")).parameters.value,privateKey:f.privateKey};default:throw new Error("unknown key type "+d)}}e.exports=c,c.signature=n.signature})),a.register("7BZGE",(function(t,n){var r,i,o,s,l,c,u,d,f,h;e(t.exports,"certificate",(()=>r),(e=>r=e)),e(t.exports,"RSAPrivateKey",(()=>i),(e=>i=e)),e(t.exports,"RSAPublicKey",(()=>o),(e=>o=e)),e(t.exports,"PublicKey",(()=>s),(e=>s=e)),e(t.exports,"PrivateKey",(()=>l),(e=>l=e)),e(t.exports,"EncryptedPrivateKey",(()=>c),(e=>c=e)),e(t.exports,"DSAPrivateKey",(()=>u),(e=>u=e)),e(t.exports,"DSAparam",(()=>d),(e=>d=e)),e(t.exports,"ECPrivateKey",(()=>f),(e=>f=e)),e(t.exports,"signature",(()=>h),(e=>h=e));var p=a("fXArl");r=a("jT65m");var m=p.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())}));i=m;var g=p.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));o=g;var v=p.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(y),this.key("subjectPublicKey").bitstr())}));s=v;var y=p.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())})),b=p.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(y),this.key("subjectPrivateKey").octstr())}));l=b;var w=p.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())}));c=w;var x=p.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())}));u=x,d=p.define("DSAparam",(function(){this.int()}));var S=p.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(M),this.key("publicKey").optional().explicit(1).bitstr())}));f=S;var M=p.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));h=p.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))})),a.register("fXArl",(function(e,t){"use strict";const n=e.exports;n.bignum=a("jXr8Y"),n.define=a("i8Q43").define,n.base=a("2LhNZ"),n.constants=a("bPkB2"),n.decoders=a("f0HFe"),n.encoders=a("gxTVa")})),a.register("i8Q43",(function(e,t){"use strict";var n=a("gxTVa"),r=a("f0HFe"),i=a("5jAh8");function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}e.exports.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(e){const t=this.name;function n(e){this._initNamed(e,t)}return i(n,e),n.prototype._initNamed=function(t,n){e.call(this,t,n)},new n(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(r[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(n[e])),this.encoders[e]},o.prototype.encode=function(e,t,n){return this._getEncoder(t).encode(e,n)}})),a.register("gxTVa",(function(e,t){"use strict";const n=e.exports;n.der=a("ak7Mt"),n.pem=a("2SPPK")})),a.register("ak7Mt",(function(e,t){"use strict";var n=a("5jAh8"),r=a("lfHxF").Buffer,i=a("LjaX0"),o=a("jPxyL");function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new l,this.tree._init(e.body)}function l(e){i.call(this,"der",e)}function c(e){return e<10?"0"+e:e}e.exports=s,s.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(l,i),l.prototype._encodeComposite=function(e,t,n,i){const a=function(e,t,n,r){let i;"seqof"===e?e="seq":"setof"===e&&(e="set");if(o.tagByName.hasOwnProperty(e))i=o.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|=o.tagClassByName[n||"universal"]<<6,i}(e,t,n,this.reporter);if(i.length<128){const e=r.alloc(2);return e[0]=a,e[1]=i.length,this._createEncoderBuffer([e,i])}let s=1;for(let e=i.length;e>=256;e>>=8)s++;const l=r.alloc(2+s);l[0]=a,l[1]=128|s;for(let e=1+s,t=i.length;t>0;e--,t>>=8)l[e]=255&t;return this._createEncoderBuffer([l,i])},l.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=r.alloc(2*e.length);for(let n=0;n<e.length;n++)t.writeUInt16BE(e.charCodeAt(n),2*n);return this._createEncoderBuffer(t)}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)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},l.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(let t=0;t<e.length;t++)e[t]|=0}else if(Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]|=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])}let i=0;for(let t=0;t<e.length;t++){let n=e[t];for(i++;n>=128;n>>=7)i++}const o=r.alloc(i);let a=o.length-1;for(let t=e.length-1;t>=0;t--){let n=e[t];for(o[a--]=127&n;(n>>=7)>0;)o[a--]=128|127&n}return this._createEncoderBuffer(o)},l.prototype._encodeTime=function(e,t){let n;const r=new Date(e);return"gentime"===t?n=[c(r.getUTCFullYear()),c(r.getUTCMonth()+1),c(r.getUTCDate()),c(r.getUTCHours()),c(r.getUTCMinutes()),c(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[c(r.getUTCFullYear()%100),c(r.getUTCMonth()+1),c(r.getUTCDate()),c(r.getUTCHours()),c(r.getUTCMinutes()),c(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},l.prototype._encodeNull=function(){return this._createEncoderBuffer("")},l.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&&!r.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=r.from(t)}if(r.isBuffer(e)){let t=e.length;0===e.length&&t++;const n=r.alloc(t);return e.copy(n),0===e.length&&(n[0]=0),this._createEncoderBuffer(n)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let n=1;for(let t=e;t>=256;t>>=8)n++;const i=new Array(n);for(let t=i.length-1;t>=0;t--)i[t]=255&e,e>>=8;return 128&i[0]&&i.unshift(0),this._createEncoderBuffer(r.from(i))},l.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},l.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},l.prototype._skipDefault=function(e,t,n){const r=this._baseState;let i;if(null===r.default)return!1;const o=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,t,n).join()),o.length!==r.defaultBuffer.length)return!1;for(i=0;i<o.length;i++)if(o[i]!==r.defaultBuffer[i])return!1;return!0}})),a.register("lfHxF",(function(e,t){var n,r=a("ePtPP"),i=a("bqBrJ"),o=i.Buffer,s={};for(n in i)i.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(s[n]=i[n]);var l=s.Buffer={};for(n in o)o.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(l[n]=o[n]);if(s.Buffer.prototype=o.prototype,l.from&&l.from!==Uint8Array.from||(l.from=function(e,t,n){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return o(e,t,n)}),l.alloc||(l.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2147483648)throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=o(e);return t&&0!==t.length?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r}),!s.kStringMaxLength)try{s.kStringMaxLength=r.binding("buffer").kStringMaxLength}catch(e){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),e.exports=s})),a.register("LjaX0",(function(e,t){"use strict";var n=a("9PoU3").Reporter,r=a("bJRdc").EncoderBuffer,i=a("bJRdc").DecoderBuffer,o=a("iGZtb");const 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"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function c(e,t,n){const r={};this._baseState=r,r.name=n,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=c;const u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){const e=this._baseState,t={};u.forEach((function(n){t[n]=e[n]}));const n=new this.constructor(t.parent);return n._baseState=t,n},c.prototype._wrap=function(){const e=this._baseState;l.forEach((function(t){this[t]=function(){const n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}}),this)},c.prototype._init=function(e){const t=this._baseState;o(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),o.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){const 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&&(o(null===t.children),t.children=n,n.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(o(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(n){n==(0|n)&&(n|=0);const 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){c.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),s.forEach((function(e){c.prototype[e]=function(){const t=this._baseState,n=Array.prototype.slice.call(arguments);return o(null===t.tag),t.tag=e,this._useArgs(n),this}})),c.prototype.use=function(e){o(e);const t=this._baseState;return o(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){const t=this._baseState;return o(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){const t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){const t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){const t=this._baseState;return o(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){const t=this._baseState;return o(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){const t=this._baseState;return o(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){const n=this._baseState;if(null===n.parent)return e.wrapResult(n.children[0]._decode(e,t));let r,o=n.default,a=!0,s=null;if(null!==n.key&&(s=e.enterKey(n.key)),n.optional){let r=null;if(null!==n.explicit?r=n.explicit:null!==n.implicit?r=n.implicit:null!==n.tag&&(r=n.tag),null!==r||n.any){if(a=this._peekTag(e,r,n.any),e.isError(a))return a}else{const r=e.save();try{null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),a=!0}catch(e){a=!1}e.restore(r)}}if(n.obj&&a&&(r=e.enterObject()),a){if(null!==n.explicit){const t=this._decodeTag(e,n.explicit);if(e.isError(t))return t;e=t}const r=e.offset;if(null===n.use&&null===n.choice){let t;n.any&&(t=e.save());const r=this._decodeTag(e,null!==n.implicit?n.implicit:n.tag,n.any);if(e.isError(r))return r;n.any?o=e.raw(t):e=r}if(t&&t.track&&null!==n.tag&&t.track(e.path(),r,e.length,"tagged"),t&&t.track&&null!==n.tag&&t.track(e.path(),e.offset,e.length,"content"),n.any||(o=null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t)),e.isError(o))return o;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)){const r=new i(o);o=this._getUse(n.contains,e._reporterState.obj)._decode(r,t)}}return n.obj&&a&&(o=e.leaveObject(r)),null===n.key||null===o&&!0!==a?null!==s&&e.exitKey(s):e.leaveKey(s,n.key,o),o},c.prototype._decodeGeneric=function(e,t,n){const 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)},c.prototype._getUse=function(e,t){const n=this._baseState;return n.useDecoder=this._use(e,t),o(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},c.prototype._decodeChoice=function(e,t){const n=this._baseState;let r=null,i=!1;return Object.keys(n.choice).some((function(o){const a=e.save(),s=n.choice[o];try{const n=s._decode(e,t);if(e.isError(n))return!1;r={type:o,value:n},i=!0}catch(t){return e.restore(a),!1}return!0}),this),i?r:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new r(e,this.reporter)},c.prototype._encode=function(e,t,n){const r=this._baseState;if(null!==r.default&&r.default===e)return;const i=this._encodeValue(e,t,n);return void 0===i||this._skipDefault(i,t,n)?void 0:i},c.prototype._encodeValue=function(e,t,r){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);let o=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}let 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,r)._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");const r=t.enterKey(n._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const 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");const n=this.clone();n._baseState.implicit=null,a=this._createEncoderBuffer(e.map((function(n){const r=this._baseState;return this._getUse(r.args[0],e)._encode(n,t)}),n))}else null!==i.use?o=this._getUse(i.use,r)._encode(e,t):(a=this._encodePrimitive(i.tag,e),s=!0);if(!i.any&&null===i.choice){const e=null!==i.implicit?i.implicit:i.tag,n=null===i.implicit?"universal":"context";null===e?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(e,s,n,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(e,t){const n=this._baseState,r=n.choice[e.type];return r||o(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){const 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)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}})),a.register("9PoU3",(function(t,n){var r;e(t.exports,"Reporter",(()=>r),(e=>r=e));var i=a("5jAh8");function o(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function s(e,t){this.path=e,this.rethrow(t)}r=o,o.prototype.isError=function(e){return e instanceof s},o.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},o.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},o.prototype.enterKey=function(e){return this._reporterState.path.push(e)},o.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},o.prototype.leaveKey=function(e,t,n){const r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=n)},o.prototype.path=function(){return this._reporterState.path.join("/")},o.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},o.prototype.leaveObject=function(e){const t=this._reporterState,n=t.obj;return t.obj=e,n},o.prototype.error=function(e){let t;const n=this._reporterState,r=e instanceof s;if(t=r?e:new s(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},o.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},i(s,Error),s.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,s),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}})),a.register("bJRdc",(function(t,n){var r,i;e(t.exports,"DecoderBuffer",(()=>r),(e=>r=e)),e(t.exports,"EncoderBuffer",(()=>i),(e=>i=e));var o=a("5jAh8"),s=a("9PoU3").Reporter,l=a("lfHxF").Buffer;function c(e,t){s.call(this,t),l.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function u(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return u.isEncoderBuffer(e)||(e=new u(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=l.byteLength(e);else{if(!l.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}o(c,s),r=c,c.isDecoderBuffer=function(e){if(e instanceof c)return!0;return"object"==typeof e&&l.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},c.prototype.save=function(){return{offset:this.offset,reporter:s.prototype.save.call(this)}},c.prototype.restore=function(e){const t=new c(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,s.prototype.restore.call(this,e.reporter),t},c.prototype.isEmpty=function(){return this.offset===this.length},c.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},c.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const n=new c(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n},c.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},i=u,u.isEncoderBuffer=function(e){if(e instanceof u)return!0;return"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},u.prototype.join=function(e,t){return e||(e=l.alloc(this.length)),t||(t=0),0===this.length||(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):l.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}})),a.register("jPxyL",(function(t,n){var r,i,o,a;function s(e){const t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);const r=e[n];t[r]=n})),t}e(t.exports,"tagClass",(()=>r),(e=>r=e)),e(t.exports,"tagClassByName",(()=>i),(e=>i=e)),e(t.exports,"tag",(()=>o),(e=>o=e)),e(t.exports,"tagByName",(()=>a),(e=>a=e)),i=s(r={0:"universal",1:"application",2:"context",3:"private"}),a=s(o={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"})})),a.register("2SPPK",(function(e,t){"use strict";var n=a("5jAh8"),r=a("ak7Mt");function i(e){r.call(this,e),this.enc="pem"}n(i,r),e.exports=i,i.prototype.encode=function(e,t){const n=r.prototype.encode.call(this,e).toString("base64"),i=["-----BEGIN "+t.label+"-----"];for(let e=0;e<n.length;e+=64)i.push(n.slice(e,e+64));return i.push("-----END "+t.label+"-----"),i.join("\n")}})),a.register("f0HFe",(function(e,t){"use strict";const n=e.exports;n.der=a("hGpEk"),n.pem=a("cpbbP")})),a.register("hGpEk",(function(e,t){"use strict";var n=a("5jAh8"),r=a("jXr8Y"),i=a("bJRdc").DecoderBuffer,o=a("LjaX0"),s=a("jPxyL");function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){o.call(this,"der",e)}function u(e,t){let n=e.readUInt8(t);if(e.isError(n))return n;const r=s.tagClass[n>>6],i=0==(32&n);if(31==(31&n)){let r=n;for(n=0;128==(128&r);){if(r=e.readUInt8(t),e.isError(r))return r;n<<=7,n|=127&r}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:s.tag[n]}}function d(e,t,n){let r=e.readUInt8(n);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;const i=127&r;if(i>4)return e.error("length octect is too long");r=0;for(let t=0;t<i;t++){r<<=8;const t=e.readUInt8(n);if(e.isError(t))return t;r|=t}return r}e.exports=l,l.prototype.decode=function(e,t){return i.isDecoderBuffer(e)||(e=new i(e,t)),this.tree._decode(e,t)},n(c,o),c.prototype._peekTag=function(e,t,n){if(e.isEmpty())return!1;const r=e.save(),i=u(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)},c.prototype._decodeTag=function(e,t,n){const r=u(e,'Failed to decode tag of "'+t+'"');if(e.isError(r))return r;let i=d(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+'"');const 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+'"'))},c.prototype._skipUntilEnd=function(e,t){for(;;){const n=u(e,t);if(e.isError(n))return n;const r=d(e,n.primitive,t);if(e.isError(r))return r;let i;if(i=n.primitive||null!==r?e.skip(r):this._skipUntilEnd(e,t),e.isError(i))return i;if("end"===n.tagStr)break}},c.prototype._decodeList=function(e,t,n,r){const i=[];for(;!e.isEmpty();){const t=this._peekTag(e,"end");if(e.isError(t))return t;const o=n.decode(e,"der",r);if(e.isError(o)&&t)break;i.push(o)}return i},c.prototype._decodeStr=function(e,t){if("bitstr"===t){const t=e.readUInt8();return e.isError(t)?t:{unused:t,data:e.raw()}}if("bmpstr"===t){const t=e.raw();if(t.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");let n="";for(let e=0;e<t.length/2;e++)n+=String.fromCharCode(t.readUInt16BE(2*e));return n}if("numstr"===t){const t=e.raw().toString("ascii");return this._isNumstr(t)?t:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){const t=e.raw().toString("ascii");return this._isPrintstr(t)?t:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},c.prototype._decodeObjid=function(e,t,n){let r;const i=[];let o=0,a=0;for(;!e.isEmpty();)a=e.readUInt8(),o<<=7,o|=127&a,0==(128&a)&&(i.push(o),o=0);128&a&&i.push(o);const s=i[0]/40|0,l=i[0]%40;if(r=n?i:[s,l].concat(i.slice(1)),t){let e=t[r.join(" ")];void 0===e&&(e=t[r.join(".")]),void 0!==e&&(r=e)}return r},c.prototype._decodeTime=function(e,t){const n=e.raw().toString();let r,i,o,a,s,l;if("gentime"===t)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),l=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),l=0|n.slice(10,12),r=r<70?2e3+r:1900+r}return Date.UTC(r,i-1,o,a,s,l,0)},c.prototype._decodeNull=function(){return null},c.prototype._decodeBool=function(e){const t=e.readUInt8();return e.isError(t)?t:0!==t},c.prototype._decodeInt=function(e,t){const n=e.raw();let i=new r(n);return t&&(i=t[i.toString(10)]||i),i},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}})),a.register("cpbbP",(function(e,t){"use strict";var n=a("5jAh8"),r=a("lfHxF").Buffer,i=a("hGpEk");function o(e){i.call(this,e),this.enc="pem"}n(o,i),e.exports=o,o.prototype.decode=function(e,t){const n=e.toString().split(/[\r\n]+/g),o=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/;let s=-1,l=-1;for(let e=0;e<n.length;e++){const t=n[e].match(a);if(null!==t&&t[2]===o){if(-1!==s){if("END"!==t[1])break;l=e;break}if("BEGIN"!==t[1])break;s=e}}if(-1===s||-1===l)throw new Error("PEM section not found for: "+o);const c=n.slice(s+1,l).join("");c.replace(/[^a-z0-9+/=]+/gi,"");const u=r.from(c,"base64");return i.prototype.decode.call(this,u,t)}})),a.register("2LhNZ",(function(e,t){"use strict";const n=e.exports;n.Reporter=a("9PoU3").Reporter,n.DecoderBuffer=a("bJRdc").DecoderBuffer,n.EncoderBuffer=a("bJRdc").EncoderBuffer,n.Node=a("LjaX0")})),a.register("bPkB2",(function(e,t){"use strict";const n=e.exports;n._reverse=function(e){const t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);const r=e[n];t[r]=n})),t},n.der=a("jPxyL")})),a.register("jT65m",(function(e,t){"use strict";var n=a("fXArl"),r=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),i=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),o=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())})),l=n.define("RelativeDistinguishedName",(function(){this.setof(i)})),c=n.define("RDNSequence",(function(){this.seqof(l)})),u=n.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),d=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(r),this.key("notAfter").use(r))})),f=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),h=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(u),this.key("validity").use(d),this.key("subject").use(u),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(f).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(h),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())}));e.exports=p})),a.register("ei3QW",(function(e,t){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"}')})),a.register("3skN1",(function(e,t){var n=/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,r=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,o=a("2tkTk"),s=a("duD0R"),l=a("8ByQm").Buffer;e.exports=function(e,t){var a,c=e.toString(),u=c.match(n);if(u){var d="aes"+u[1],f=l.from(u[2],"hex"),h=l.from(u[3].replace(/[\r\n]/g,""),"base64"),p=o(t,f.slice(0,8),parseInt(u[1],10)).key,m=[],g=s.createDecipheriv(d,p,f);m.push(g.update(h)),m.push(g.final()),a=l.concat(m)}else{var v=c.match(i);a=l.from(v[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(r)[1],data:a}}})),a.register("g4OMi",(function(e,t){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"}')})),a.register("ajRoR",(function(e,t){var n=a("8ByQm").Buffer,r=a("fmDmL"),i=a("dkUCk").ec,o=a("fEs62"),s=a("g4OMi");function l(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,t,a,c,u){var d=o(a);if("ec"===d.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,n){var r=s[n.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var o=new i(r),a=n.data.subjectPrivateKey.data;return o.verify(t,e,a)}(e,t,d)}if("dsa"===d.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,n){var i=n.data.p,a=n.data.q,s=n.data.g,c=n.data.pub_key,u=o.signature.decode(e,"der"),d=u.s,f=u.r;l(d,a),l(f,a);var h=r.mont(i),p=d.invm(a),m=s.toRed(h).redPow(new r(t).mul(p).mod(a)).fromRed().mul(c.toRed(h).redPow(f.mul(p).mod(a)).fromRed()).mod(i).mod(a);return 0===m.cmp(f)}(e,t,d)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");t=n.concat([u,t]);for(var f=d.modulus.byteLength(),h=[1],p=0;t.length+h.length+2<f;)h.push(255),p++;h.push(0);for(var m=-1;++m<t.length;)h.push(t[m]);h=n.from(h);var g=r.mont(d.modulus);e=(e=new r(e).toRed(g)).redPow(new r(d.publicExponent)),e=n.from(e.fromRed().toArray());var v=p<8?1:0;for(f=Math.min(e.length,h.length),e.length!==h.length&&(v=1),m=-1;++m<f;)v|=e[m]^h[m];return 0===v}})),a.register("5nTVb",(function(e,t){var n=a("bqBrJ").Buffer,r=a("dkUCk"),i=a("jXr8Y");e.exports=function(e){return new s(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 s(e){this.curveType=o[e],this.curveType||(this.curveType={name:e}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function l(e,t,r){Array.isArray(e)||(e=e.toArray());var i=new n(e);if(r&&i.length<r){var o=new n(r-i.length);o.fill(0),i=n.concat([o,i])}return t?i.toString(t):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,s.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},s.prototype.computeSecret=function(e,t,r){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),l(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},s.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),l(n,e)},s.prototype.getPrivateKey=function(e){return l(this.keys.getPrivate(),e)},s.prototype.setPublicKey=function(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this.keys._importPublic(e),this},s.prototype.setPrivateKey=function(e,t){t=t||"utf8",n.isBuffer(e)||(e=new n(e,t));var r=new i(e);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}})),a.register("5IN4o",(function(t,n){var r,i,o,s;e(t.exports,"publicEncrypt",(()=>r),(e=>r=e)),e(t.exports,"privateDecrypt",(()=>i),(e=>i=e)),e(t.exports,"privateEncrypt",(()=>o),(e=>o=e)),e(t.exports,"publicDecrypt",(()=>s),(e=>s=e)),r=a("9FMrF"),i=a("42pBv"),o=function(e,t){return r(e,t,!0)},s=function(e,t){return i(e,t,!0)}})),a.register("9FMrF",(function(e,t){var n=a("fEs62"),r=a("3xr1Z"),i=a("d8QYu"),o=a("hvg46"),s=a("f936l"),l=a("jXr8Y"),c=a("3jVNX"),u=a("8sAbQ"),d=a("8ByQm").Buffer;e.exports=function(e,t,a){var f;f=e.padding?e.padding:a?1:4;var h,p=n(e);if(4===f)h=function(e,t){var n=e.modulus.byteLength(),a=t.length,c=i("sha1").update(d.alloc(0)).digest(),u=c.length,f=2*u;if(a>n-f-2)throw new Error("message too long");var h=d.alloc(n-a-f-2),p=n-u-1,m=r(u),g=s(d.concat([c,h,d.alloc(1,1),t],p),o(m,p)),v=s(m,o(g,u));return new l(d.concat([d.alloc(1),v,g],n))}(p,t);else if(1===f)h=function(e,t,n){var i,o=t.length,a=e.modulus.byteLength();if(o>a-11)throw new Error("message too long");i=n?d.alloc(a-o-3,255):function(e){var t,n=d.allocUnsafe(e),i=0,o=r(2*e),a=0;for(;i<e;)a===o.length&&(o=r(2*e),a=0),(t=o[a++])&&(n[i++]=t);return n}(a-o-3);return new l(d.concat([d.from([0,n?1:2]),i,d.alloc(1),t],a))}(p,t,a);else{if(3!==f)throw new Error("unknown padding");if((h=new l(t)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return a?u(h,p):c(h,p)}})),a.register("hvg46",(function(e,t){var n=a("d8QYu"),r=a("8ByQm").Buffer;function i(e){var t=r.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var o,a=r.alloc(0),s=0;a.length<t;)o=i(s++),a=r.concat([a,n("sha1").update(e).update(o).digest()]);return a.slice(0,t)}})),a.register("f936l",(function(e,t){e.exports=function(e,t){for(var n=e.length,r=-1;++r<n;)e[r]^=t[r];return e}})),a.register("3jVNX",(function(e,t){var n=a("jXr8Y"),r=a("8ByQm").Buffer;e.exports=function(e,t){return r.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}})),a.register("42pBv",(function(e,t){var n=a("fEs62"),r=a("hvg46"),i=a("f936l"),o=a("jXr8Y"),s=a("8sAbQ"),l=a("d8QYu"),c=a("3jVNX"),u=a("8ByQm").Buffer;e.exports=function(e,t,a){var d;d=e.padding?e.padding:a?1:4;var f,h=n(e),p=h.modulus.byteLength();if(t.length>p||new o(t).cmp(h.modulus)>=0)throw new Error("decryption error");f=a?c(new o(t),h):s(t,h);var m=u.alloc(p-f.length);if(f=u.concat([m,f],p),4===d)return function(e,t){var n=e.modulus.byteLength(),o=l("sha1").update(u.alloc(0)).digest(),a=o.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,a+1),c=t.slice(a+1),d=i(s,r(c,a)),f=i(c,r(d,n-a-1));if(function(e,t){e=u.from(e),t=u.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}(o,f.slice(0,a)))throw new Error("decryption error");var h=a;for(;0===f[h];)h++;if(1!==f[h++])throw new Error("decryption error");return f.slice(h)}(h,f);if(1===d)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,f,a);if(3===d)return f;throw new Error("unknown padding")}})),a.register("lPq1P",(function(n,r){var i,o;e(n.exports,"randomFill",(()=>i),(e=>i=e)),e(n.exports,"randomFillSync",(()=>o),(e=>o=e));var s=a("ePtPP");function l(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var c=a("8ByQm"),u=(a("3xr1Z"),c.Buffer),d=c.kMaxLength,f=t.crypto||t.msCrypto,h=Math.pow(2,32)-1;function p(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>h||e<0)throw new TypeError("offset must be a uint32");if(e>d||e>t)throw new RangeError("offset out of range")}function m(e,t,n){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>h||e<0)throw new TypeError("size must be a uint32");if(e+t>n||e>d)throw new RangeError("buffer too small")}function g(e,t,n,r){var i=e.buffer,o=new Uint8Array(i,t,n);if(f.getRandomValues(o),!r)return e;s.nextTick((function(){r(null,e)}))}f&&f.getRandomValues?(i=function(e,n,r,i){if(!(u.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof n)i=n,n=0,r=e.length;else if("function"==typeof r)i=r,r=e.length-n;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return p(n,e.length),m(r,n,e.length),g(e,n,r,i)},o=function(e,n,r){void 0===n&&(n=0);if(!(u.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');p(n,e.length),void 0===r&&(r=e.length-n);return m(r,n,e.length),g(e,n,r)}):(i=l,o=l)})),a.register("2bMu7",(function(e,t){var n=a("ePtPP"),r=a("5U18c"),i=a("9gzJO"),o=a("8iXHm"),s=a("1DJXa");e.exports=function(e,t){var a,l=!0;function c(e,r){if(l)return l=!1,void n.nextTick((function(){t(e,r)}));t(e,r)}try{a=r.request.generate(e.cert,e.issuer)}catch(e){return c(e)}var u=s["id-pkix-ocsp"].join(".");r.utils.getAuthorityInfo(a.cert,u,(function(t,n){if(t)return c(t);var s;s=void 0!==e.httpOptions?i._extend(e.httpOptions,o.parse(n)):n,r.utils.getResponse(s,a.data,(function(e,t){if(e)return c(e);r.verify({request:a,response:t},c)}))})),l=!1}})),a.register("ahZQv",(function(e,t){var n=a("ePtPP"),r=a("5U18c"),i=a("1DJXa"),o=a("dc7aw");e.exports=function(e,t){var a,s=e.request;function l(e){n.nextTick((function(){t(e,h&&h.certStatus)}))}try{a=s.issuer||i.Certificate.decode(r.utils.toDER(e.issuer,"CERTIFICATE"),"der"),h=r.utils.parseResponse(e.response)}catch(e){return l(e)}var c=e.response.slice(h.start,h.end),u=h.certs,d=h.certsTbs.map((function(t){return e.response.slice(t.start,t.end)}));h=h.value;var f=r.utils.sign[h.signatureAlgorithm.algorithm.join(".")];if(f){var h,p=function(e,t,n){var a=e.tbsCertificate.subjectPublicKeyInfo;a=r.utils.toPEM(i.SubjectPublicKeyInfo.encode(a,"der"),"PUBLIC KEY");for(var s=0;s<t.length;s++){var l=t[s],c=r.utils.sign[l.signatureAlgorithm.algorithm.join(".")];if(!c)throw new Error("Unknown signature algorithm "+l.signatureAlgorithm.algorithm);var u=o.createVerify(c);if(u.update(n[s]),!u.verify(a,l.signature.data))throw new Error("Invalid signature");var d=l.tbsCertificate.subjectPublicKeyInfo;return r.utils.toPEM(i.SubjectPublicKeyInfo.encode(d,"der"),"PUBLIC KEY")}return a}(a,u,d),m=o.createVerify(f),g=h.tbsResponseData,v=h.signature.data;if(m.update(c),!m.verify(p,v))return l(new Error("Invalid signature"));if(g.responses.length<1)return l(new Error("Expected at least one response"));if((h=g.responses[0]).certId.hashAlgorithm.algorithm.join(".")!==s.certID.hashAlgorithm.algorithm.join("."))return l(new Error("Hash algorithm mismatch"));if(h.certId.issuerNameHash.toString("hex")!==s.certID.issuerNameHash.toString("hex"))return l(new Error("Issuer name hash mismatch"));if(h.certId.issuerKeyHash.toString("hex")!==s.certID.issuerKeyHash.toString("hex"))return l(new Error("Issuer key hash mismatch"));if(0!==h.certId.serialNumber.cmp(s.certID.serialNumber))return l(new Error("Serial number mismatch"));if("good"!==h.certStatus.type)return l(new Error("OCSP Status: "+h.certStatus.type));var y=+new Date,b=e.nudge||6e4;return h.thisUpdate-b>y||h.nextUpdate+b<y?l(new Error("OCSP Response expired")):l(null)}l(new Error("Unknown signature algorithm "+h.signatureAlgorithm.algorithm))}})),a.register("iEMHh",(function(t,n){var r,i,o,s,l,c,u,d,f,h,p,m;e(t.exports,"id-ad-caIssuers",(()=>r),(e=>r=e)),e(t.exports,"id-kp-OCSPSigning",(()=>i),(e=>i=e)),e(t.exports,"getResponse",(()=>o),(e=>o=e)),e(t.exports,"parseResponse",(()=>s),(e=>s=e)),e(t.exports,"digest",(()=>l),(e=>l=e)),e(t.exports,"digestRev",(()=>c),(e=>c=e)),e(t.exports,"sign",(()=>u),(e=>u=e)),e(t.exports,"signRev",(()=>d),(e=>d=e)),e(t.exports,"toPEM",(()=>f),(e=>f=e)),e(t.exports,"toDER",(()=>h),(e=>h=e)),e(t.exports,"getAuthorityInfo",(()=>p),(e=>p=e)),e(t.exports,"RSAPrivateKey",(()=>m),(e=>m=e));var g=a("bqBrJ").Buffer,v=a("fnFC9"),y=a("9gzJO"),b=a("8iXHm"),w=a("fXArl"),x=a("1DJXa");r=[1,3,6,1,5,5,7,48,2],i=[1,3,6,1,5,5,7,3,9],o=function(e,t,n){"object"!=typeof e&&(e=b.parse(e));var r=y._extend({method:"POST",headers:{"Content-Type":"application/ocsp-request","Content-Length":t.length}},e);function i(e,t){n&&n(e,t),n=null}v.request(r,(function(e){if(e.statusCode<200||e.statusCode>=400)return i(new Error("Failed to obtain OCSP response: "+e.statusCode));var t=[];e.on("readable",(function(){var n=e.read();n&&t.push(n)})),e.on("end",(function(){i(null,g.concat(t))}))})).on("error",i).end(t)},s=function(e){var t={start:0,end:e.length},n=x.OCSPResponse.decode(e,"der",{track:function(e,n,r,i){"content"===i&&"responseBytes/response"===e&&(t.start=n,t.end=r)}}),r=n.responseStatus;if("successful"!==r)throw new Error("Bad OCSP response status: "+r);var o=n.responseBytes.responseType;if("id-pkix-ocsp-basic"!==o)throw new Error("Unknown OCSP response type: "+o);var a=n.responseBytes.response,s={start:t.start,end:t.end},l=[],c=x.BasicOCSPResponse.decode(a,"der",{track:function(e,n,r,i){"tagged"===i&&("tbsResponseData"===e?(s.start=t.start+n,s.end=t.start+r):"certs/tbsCertificate"===e&&l.push({start:t.start+n,end:t.start+r}))}}),u=i.join("."),d=(c.certs||[]).filter((function(e){return e.tbsCertificate.extensions.some((function(e){return"extendedKeyUsage"===e.extnID&&e.extnValue.some((function(e){return e.join(".")===u}))}))}));return{start:s.start,end:s.end,value:c,certs:d,certsTbs:l}},l={"1.3.14.3.2.26":"sha1","2.16.840.1.101.3.4.2.1":"sha256"},c={sha1:"1.3.14.3.2.26",sha256:"2.16.840.1.101.3.4.2.1"},u={"1.2.840.113549.1.1.5":"sha1WithRSAEncryption","1.2.840.113549.1.1.11":"sha256WithRSAEncryption","1.2.840.113549.1.1.12":"sha384WithRSAEncryption","1.2.840.113549.1.1.13":"sha512WithRSAEncryption"},d={sha1WithRSAEncryption:[1,2,840,113549,1,1,5],sha256WithRSAEncryption:[1,2,840,113549,1,1,11],sha384WithRSAEncryption:[1,2,840,113549,1,1,12],sha512WithRSAEncryption:[1,2,840,113549,1,1,13]},f=function(e,t){for(var n=e.toString("base64"),r=["-----BEGIN "+t+"-----"],i=0;i<n.length;i+=64)r.push(n.slice(i,i+64));return r.push("-----END "+t+"-----"),r.join("\n")},h=function(e,t){var n=e.toString().match(new RegExp("-----BEGIN "+t+"-----([^-]*)-----END "+t+"-----"));return n=n?new g(n[1].replace(/[\r\n]/g,""),"base64"):"string"==typeof e?new g(e):e},p=function(e,t,n){var r=e.tbsCertificate.extensions;r||(r=[]);var i=r.filter((function(e){return"authorityInformationAccess"===e.extnID}));if(0===i.length)return n(new Error("AuthorityInfoAccess not found in extensions"));var o=null;return i.some((function(e){return e.extnValue.some((function(e){if(e.accessMethod.join(".")!==t)return!1;var n=e.accessLocation;return"uniformResourceIdentifier"===n.type&&(o=n.value+"",!0)}))}))?n(null,o):n(new Error(t+" not found in AuthorityInfoAccess"))};var S=w.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())}));m=S})),a.register("4IUwl",(function(e,t){
53
53
  /*!
@@ -94,7 +94,7 @@ var r,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,b,w,x,S,M,_,A,E,C,k,T,I;e(t.exports,"AsyncMo
94
94
  //! momentjs.com
95
95
  e.exports=function(){"use strict";var t,n;function r(){return t.apply(null,arguments)}function i(e){t=e}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function c(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,r=[],i=e.length;for(n=0;n<i;++n)r.push(t(e[n],n));return r}function h(e,t){for(var n in t)s(t,n)&&(e[n]=t[n]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,n,r){return Yn(e,t,n,r,!0).utc()}function m(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(e){return null==e._pf&&(e._pf=m()),e._pf}function v(e){if(null==e._isValid){var t=g(e),r=n.call(t.parsedDateParts,(function(e){return null!=e})),i=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r);if(e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return i;e._isValid=i}return e._isValid}function y(e){var t=p(NaN);return null!=e?h(g(t),e):g(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var b=r.momentProperties=[],w=!1;function x(e,t){var n,r,i,o=b.length;if(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=g(t)),c(t._locale)||(e._locale=t._locale),o>0)for(n=0;n<o;n++)c(i=t[r=b[n]])||(e[r]=i);return e}function S(e){x(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===w&&(w=!0,r.updateOffset(this),w=!1)}function M(e){return e instanceof S||null!=e&&null!=e._isAMomentObject}function _(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function A(e,t){var n=!0;return h((function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var i,o,a,l=[],c=arguments.length;for(o=0;o<c;o++){if(i="","object"==typeof arguments[o]){for(a in i+="\n["+o+"] ",arguments[0])s(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[o];l.push(i)}_(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var E,C={};function k(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),C[e]||(_(t),C[e]=!0)}function T(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function I(e){var t,n;for(n in e)s(e,n)&&(T(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function O(e,t){var n,r=h({},e);for(n in t)s(t,n)&&(a(e[n])&&a(t[n])?(r[n]={},h(r[n],e[n]),h(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)s(e,n)&&!s(t,n)&&a(e[n])&&(r[n]=h({},r[n]));return r}function R(e){null!=e&&this.set(e)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,E=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var P={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function N(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return T(r)?r.call(t,n):r}function L(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var D=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,B=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,j={},F={};function U(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(F[e]=i),t&&(F[t[0]]=function(){return L(i.apply(this,arguments),t[1],t[2])}),n&&(F[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function z(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function H(e){var t,n,r=e.match(D);for(t=0,n=r.length;t<n;t++)F[r[t]]?r[t]=F[r[t]]:r[t]=z(r[t]);return function(t){var i,o="";for(i=0;i<n;i++)o+=T(r[i])?r[i].call(t,e):r[i];return o}}function V(e,t){return e.isValid()?(t=W(t,e.localeData()),j[t]=j[t]||H(t),j[t](e)):e.localeData().invalidDate()}function W(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(B.lastIndex=0;n>=0&&B.test(e);)e=e.replace(B,r),B.lastIndex=0,n-=1;return e}var G={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function q(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(D).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var K="Invalid date";function Y(){return this._invalidDate}var J="%d",Q=/\d{1,2}/;function X(e){return this._ordinal.replace("%d",e)}var Z={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function $(e,t,n,r){var i=this._relativeTime[n];return T(i)?i(e,t,n,r):i.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return T(n)?n(t):n.replace(/%s/i,t)}var te={};function ne(e,t){var n=e.toLowerCase();te[n]=te[n+"s"]=te[t]=e}function re(e){return"string"==typeof e?te[e]||te[e.toLowerCase()]:void 0}function ie(e){var t,n,r={};for(n in e)s(e,n)&&(t=re(n))&&(r[t]=e[n]);return r}var oe={};function ae(e,t){oe[e]=t}function se(e){var t,n=[];for(t in e)s(e,t)&&n.push({unit:t,priority:oe[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}function le(e){return e%4==0&&e%100!=0||e%400==0}function ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ue(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=ce(t)),n}function de(e,t){return function(n){return null!=n?(he(this,e,n),r.updateOffset(this,t),this):fe(this,e)}}function fe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function he(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&le(e.year())&&1===e.month()&&29===e.date()?(n=ue(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),$e(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function pe(e){return T(this[e=re(e)])?this[e]():this}function me(e,t){if("object"==typeof e){var n,r=se(e=ie(e)),i=r.length;for(n=0;n<i;n++)this[r[n].unit](e[r[n].unit])}else if(T(this[e=re(e)]))return this[e](t);return this}var ge,ve=/\d/,ye=/\d\d/,be=/\d{3}/,we=/\d{4}/,xe=/[+-]?\d{6}/,Se=/\d\d?/,Me=/\d\d\d\d?/,_e=/\d\d\d\d\d\d?/,Ae=/\d{1,3}/,Ee=/\d{1,4}/,Ce=/[+-]?\d{1,6}/,ke=/\d+/,Te=/[+-]?\d+/,Ie=/Z|[+-]\d\d:?\d\d/gi,Oe=/Z|[+-]\d\d(?::?\d\d)?/gi,Re=/[+-]?\d+(\.\d{1,3})?/,Pe=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function Ne(e,t,n){ge[e]=T(t)?t:function(e,r){return e&&n?n:t}}function Le(e,t){return s(ge,e)?ge[e](t._strict,t._locale):new RegExp(De(e))}function De(e){return Be(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i})))}function Be(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}ge={};var je={};function Fe(e,t){var n,r,i=t;for("string"==typeof e&&(e=[e]),u(t)&&(i=function(e,n){n[t]=ue(e)}),r=e.length,n=0;n<r;n++)je[e[n]]=i}function Ue(e,t){Fe(e,(function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)}))}function ze(e,t,n){null!=t&&s(je,e)&&je[e](t,n._a,n,e)}var He,Ve=0,We=1,Ge=2,qe=3,Ke=4,Ye=5,Je=6,Qe=7,Xe=8;function Ze(e,t){return(e%t+t)%t}function $e(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=Ze(t,12);return e+=(t-n)/12,1===n?le(e)?29:28:31-n%7%2}He=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},U("M",["MM",2],"Mo",(function(){return this.month()+1})),U("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),U("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),ne("month","M"),ae("month",8),Ne("M",Se),Ne("MM",Se,ye),Ne("MMM",(function(e,t){return t.monthsShortRegex(e)})),Ne("MMMM",(function(e,t){return t.monthsRegex(e)})),Fe(["M","MM"],(function(e,t){t[We]=ue(e)-1})),Fe(["MMM","MMMM"],(function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[We]=i:g(n).invalidMonth=e}));var et="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),tt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),nt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,rt=Pe,it=Pe;function ot(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||nt).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone}function at(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[nt.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function st(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=p([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=He.call(this._shortMonthsParse,a))?i:null:-1!==(i=He.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=He.call(this._shortMonthsParse,a))||-1!==(i=He.call(this._longMonthsParse,a))?i:null:-1!==(i=He.call(this._longMonthsParse,a))||-1!==(i=He.call(this._shortMonthsParse,a))?i:null}function lt(e,t,n){var r,i,o;if(this._monthsParseExact)return st.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=p([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function ct(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=ue(t);else if(!u(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),$e(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function ut(e){return null!=e?(ct(this,e),r.updateOffset(this,!0),this):fe(this,"Month")}function dt(){return $e(this.year(),this.month())}function ft(e){return this._monthsParseExact?(s(this,"_monthsRegex")||pt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=rt),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function ht(e){return this._monthsParseExact?(s(this,"_monthsRegex")||pt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=it),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function pt(){function e(e,t){return t.length-e.length}var t,n,r=[],i=[],o=[];for(t=0;t<12;t++)n=p([2e3,t]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(r.sort(e),i.sort(e),o.sort(e),t=0;t<12;t++)r[t]=Be(r[t]),i[t]=Be(i[t]);for(t=0;t<24;t++)o[t]=Be(o[t]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function mt(e){return le(e)?366:365}U("Y",0,0,(function(){var e=this.year();return e<=9999?L(e,4):"+"+e})),U(0,["YY",2],0,(function(){return this.year()%100})),U(0,["YYYY",4],0,"year"),U(0,["YYYYY",5],0,"year"),U(0,["YYYYYY",6,!0],0,"year"),ne("year","y"),ae("year",1),Ne("Y",Te),Ne("YY",Se,ye),Ne("YYYY",Ee,we),Ne("YYYYY",Ce,xe),Ne("YYYYYY",Ce,xe),Fe(["YYYYY","YYYYYY"],Ve),Fe("YYYY",(function(e,t){t[Ve]=2===e.length?r.parseTwoDigitYear(e):ue(e)})),Fe("YY",(function(e,t){t[Ve]=r.parseTwoDigitYear(e)})),Fe("Y",(function(e,t){t[Ve]=parseInt(e,10)})),r.parseTwoDigitYear=function(e){return ue(e)+(ue(e)>68?1900:2e3)};var gt=de("FullYear",!0);function vt(){return le(this.year())}function yt(e,t,n,r,i,o,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,o,a),s}function bt(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function wt(e,t,n){var r=7+t-n;return-(7+bt(e,0,r).getUTCDay()-t)%7+r-1}function xt(e,t,n,r,i){var o,a,s=1+7*(t-1)+(7+n-r)%7+wt(e,r,i);return s<=0?a=mt(o=e-1)+s:s>mt(e)?(o=e+1,a=s-mt(e)):(o=e,a=s),{year:o,dayOfYear:a}}function St(e,t,n){var r,i,o=wt(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?r=a+Mt(i=e.year()-1,t,n):a>Mt(e.year(),t,n)?(r=a-Mt(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Mt(e,t,n){var r=wt(e,t,n),i=wt(e+1,t,n);return(mt(e)-r+i)/7}function _t(e){return St(e,this._week.dow,this._week.doy).week}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),ne("week","w"),ne("isoWeek","W"),ae("week",5),ae("isoWeek",5),Ne("w",Se),Ne("ww",Se,ye),Ne("W",Se),Ne("WW",Se,ye),Ue(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=ue(e)}));var At={dow:0,doy:6};function Et(){return this._week.dow}function Ct(){return this._week.doy}function kt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Tt(e){var t=St(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function It(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Ot(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Rt(e,t){return e.slice(t,7).concat(e.slice(0,t))}U("d",0,"do","day"),U("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),U("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),U("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),ae("day",11),ae("weekday",11),ae("isoWeekday",11),Ne("d",Se),Ne("e",Se),Ne("E",Se),Ne("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Ne("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Ne("dddd",(function(e,t){return t.weekdaysRegex(e)})),Ue(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e})),Ue(["d","e","E"],(function(e,t,n,r){t[r]=ue(e)}));var Pt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Nt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Lt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Dt=Pe,Bt=Pe,jt=Pe;function Ft(e,t){var n=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Rt(n,this._week.dow):e?n[e.day()]:n}function Ut(e){return!0===e?Rt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function zt(e){return!0===e?Rt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ht(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=p([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=He.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=He.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=He.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=He.call(this._weekdaysParse,a))||-1!==(i=He.call(this._shortWeekdaysParse,a))||-1!==(i=He.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=He.call(this._shortWeekdaysParse,a))||-1!==(i=He.call(this._weekdaysParse,a))||-1!==(i=He.call(this._minWeekdaysParse,a))?i:null:-1!==(i=He.call(this._minWeekdaysParse,a))||-1!==(i=He.call(this._weekdaysParse,a))||-1!==(i=He.call(this._shortWeekdaysParse,a))?i:null}function Vt(e,t,n){var r,i,o;if(this._weekdaysParseExact)return Ht.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=p([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Wt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=It(e,this.localeData()),this.add(e-t,"d")):t}function Gt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function qt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Ot(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Kt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Dt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Yt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Bt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Jt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=jt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Qt(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],l=[],c=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),r=Be(this.weekdaysMin(n,"")),i=Be(this.weekdaysShort(n,"")),o=Be(this.weekdays(n,"")),a.push(r),s.push(i),l.push(o),c.push(r),c.push(i),c.push(o);a.sort(e),s.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Xt(){return this.hours()%12||12}function Zt(){return this.hours()||24}function $t(e,t){U(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function en(e,t){return t._meridiemParse}function tn(e){return"p"===(e+"").toLowerCase().charAt(0)}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,Xt),U("k",["kk",2],0,Zt),U("hmm",0,0,(function(){return""+Xt.apply(this)+L(this.minutes(),2)})),U("hmmss",0,0,(function(){return""+Xt.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)})),U("Hmm",0,0,(function(){return""+this.hours()+L(this.minutes(),2)})),U("Hmmss",0,0,(function(){return""+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)})),$t("a",!0),$t("A",!1),ne("hour","h"),ae("hour",13),Ne("a",en),Ne("A",en),Ne("H",Se),Ne("h",Se),Ne("k",Se),Ne("HH",Se,ye),Ne("hh",Se,ye),Ne("kk",Se,ye),Ne("hmm",Me),Ne("hmmss",_e),Ne("Hmm",Me),Ne("Hmmss",_e),Fe(["H","HH"],qe),Fe(["k","kk"],(function(e,t,n){var r=ue(e);t[qe]=24===r?0:r})),Fe(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),Fe(["h","hh"],(function(e,t,n){t[qe]=ue(e),g(n).bigHour=!0})),Fe("hmm",(function(e,t,n){var r=e.length-2;t[qe]=ue(e.substr(0,r)),t[Ke]=ue(e.substr(r)),g(n).bigHour=!0})),Fe("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[qe]=ue(e.substr(0,r)),t[Ke]=ue(e.substr(r,2)),t[Ye]=ue(e.substr(i)),g(n).bigHour=!0})),Fe("Hmm",(function(e,t,n){var r=e.length-2;t[qe]=ue(e.substr(0,r)),t[Ke]=ue(e.substr(r))})),Fe("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[qe]=ue(e.substr(0,r)),t[Ke]=ue(e.substr(r,2)),t[Ye]=ue(e.substr(i))}));var nn=/[ap]\.?m?\.?/i,rn=de("Hours",!0);function on(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var an,sn={calendar:P,longDateFormat:G,invalidDate:K,ordinal:J,dayOfMonthOrdinalParse:Q,relativeTime:Z,months:et,monthsShort:tt,week:At,weekdays:Pt,weekdaysMin:Lt,weekdaysShort:Nt,meridiemParse:nn},ln={},cn={};function un(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function dn(e){return e?e.toLowerCase().replace("_","-"):e}function fn(e){for(var t,n,r,i,o=0;o<e.length;){for(t=(i=dn(e[o]).split("-")).length,n=(n=dn(e[o+1]))?n.split("-"):null;t>0;){if(r=pn(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&un(i,n)>=t-1)break;t--}o++}return an}function hn(e){return null!=e.match("^[^/\\\\]*$")}function pn(t){var n=null;if(void 0===ln[t]&&e&&e.exports&&hn(t))try{n=an._abbr,(void 0)("./locale/"+t),mn(n)}catch(e){ln[t]=null}return ln[t]}function mn(e,t){var n;return e&&((n=c(t)?yn(e):gn(e,t))?an=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),an._abbr}function gn(e,t){if(null!==t){var n,r=sn;if(t.abbr=e,null!=ln[e])k("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ln[e]._config;else if(null!=t.parentLocale)if(null!=ln[t.parentLocale])r=ln[t.parentLocale]._config;else{if(null==(n=pn(t.parentLocale)))return cn[t.parentLocale]||(cn[t.parentLocale]=[]),cn[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ln[e]=new R(O(r,t)),cn[e]&&cn[e].forEach((function(e){gn(e.name,e.config)})),mn(e),ln[e]}return delete ln[e],null}function vn(e,t){if(null!=t){var n,r,i=sn;null!=ln[e]&&null!=ln[e].parentLocale?ln[e].set(O(ln[e]._config,t)):(null!=(r=pn(e))&&(i=r._config),t=O(i,t),null==r&&(t.abbr=e),(n=new R(t)).parentLocale=ln[e],ln[e]=n),mn(e)}else null!=ln[e]&&(null!=ln[e].parentLocale?(ln[e]=ln[e].parentLocale,e===mn()&&mn(e)):null!=ln[e]&&delete ln[e]);return ln[e]}function yn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return an;if(!o(e)){if(t=pn(e))return t;e=[e]}return fn(e)}function bn(){return E(ln)}function wn(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[We]<0||n[We]>11?We:n[Ge]<1||n[Ge]>$e(n[Ve],n[We])?Ge:n[qe]<0||n[qe]>24||24===n[qe]&&(0!==n[Ke]||0!==n[Ye]||0!==n[Je])?qe:n[Ke]<0||n[Ke]>59?Ke:n[Ye]<0||n[Ye]>59?Ye:n[Je]<0||n[Je]>999?Je:-1,g(e)._overflowDayOfYear&&(t<Ve||t>Ge)&&(t=Ge),g(e)._overflowWeeks&&-1===t&&(t=Qe),g(e)._overflowWeekday&&-1===t&&(t=Xe),g(e).overflow=t),e}var xn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Sn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Mn=/Z|[+-]\d\d(?::?\d\d)?/,_n=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],An=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],En=/^\/?Date\((-?\d+)/i,Cn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,kn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Tn(e){var t,n,r,i,o,a,s=e._i,l=xn.exec(s)||Sn.exec(s),c=_n.length,u=An.length;if(l){for(g(e).iso=!0,t=0,n=c;t<n;t++)if(_n[t][1].exec(l[1])){i=_n[t][0],r=!1!==_n[t][2];break}if(null==i)return void(e._isValid=!1);if(l[3]){for(t=0,n=u;t<n;t++)if(An[t][1].exec(l[3])){o=(l[2]||" ")+An[t][0];break}if(null==o)return void(e._isValid=!1)}if(!r&&null!=o)return void(e._isValid=!1);if(l[4]){if(!Mn.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=i+(o||"")+(a||""),zn(e)}else e._isValid=!1}function In(e,t,n,r,i,o){var a=[On(e),tt.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return o&&a.push(parseInt(o,10)),a}function On(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Rn(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Pn(e,t,n){return!e||Nt.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(g(n).weekdayMismatch=!0,n._isValid=!1,!1)}function Nn(e,t,n){if(e)return kn[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}function Ln(e){var t,n=Cn.exec(Rn(e._i));if(n){if(t=In(n[4],n[3],n[2],n[5],n[6],n[7]),!Pn(n[1],t,e))return;e._a=t,e._tzm=Nn(n[8],n[9],n[10]),e._d=bt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function Dn(e){var t=En.exec(e._i);null===t?(Tn(e),!1===e._isValid&&(delete e._isValid,Ln(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Bn(e,t,n){return null!=e?e:null!=t?t:n}function jn(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Fn(e){var t,n,r,i,o,a=[];if(!e._d){for(r=jn(e),e._w&&null==e._a[Ge]&&null==e._a[We]&&Un(e),null!=e._dayOfYear&&(o=Bn(e._a[Ve],r[Ve]),(e._dayOfYear>mt(o)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=bt(o,0,e._dayOfYear),e._a[We]=n.getUTCMonth(),e._a[Ge]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[qe]&&0===e._a[Ke]&&0===e._a[Ye]&&0===e._a[Je]&&(e._nextDay=!0,e._a[qe]=0),e._d=(e._useUTC?bt:yt).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[qe]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}function Un(e){var t,n,r,i,o,a,s,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(o=1,a=4,n=Bn(t.GG,e._a[Ve],St(Jn(),1,4).year),r=Bn(t.W,1),((i=Bn(t.E,1))<1||i>7)&&(l=!0)):(o=e._locale._week.dow,a=e._locale._week.doy,c=St(Jn(),o,a),n=Bn(t.gg,e._a[Ve],c.year),r=Bn(t.w,c.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o),r<1||r>Mt(n,o,a)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(s=xt(n,r,i,o,a),e._a[Ve]=s.year,e._dayOfYear=s.dayOfYear)}function zn(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],g(e).empty=!0;var t,n,i,o,a,s,l,c=""+e._i,u=c.length,d=0;for(l=(i=W(e._f,e._locale).match(D)||[]).length,t=0;t<l;t++)o=i[t],(n=(c.match(Le(o,e))||[])[0])&&((a=c.substr(0,c.indexOf(n))).length>0&&g(e).unusedInput.push(a),c=c.slice(c.indexOf(n)+n.length),d+=n.length),F[o]?(n?g(e).empty=!1:g(e).unusedTokens.push(o),ze(o,n,e)):e._strict&&!n&&g(e).unusedTokens.push(o);g(e).charsLeftOver=u-d,c.length>0&&g(e).unusedInput.push(c),e._a[qe]<=12&&!0===g(e).bigHour&&e._a[qe]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[qe]=Hn(e._locale,e._a[qe],e._meridiem),null!==(s=g(e).era)&&(e._a[Ve]=e._locale.erasConvertYear(s,e._a[Ve])),Fn(e),wn(e)}else Ln(e);else Tn(e)}function Hn(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function Vn(e){var t,n,r,i,o,a,s=!1,l=e._f.length;if(0===l)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<l;i++)o=0,a=!1,t=x({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],zn(t),v(t)&&(a=!0),o+=g(t).charsLeftOver,o+=10*g(t).unusedTokens.length,g(t).score=o,s?o<r&&(r=o,n=t):(null==r||o<r||a)&&(r=o,n=t,a&&(s=!0));h(e,n||t)}function Wn(e){if(!e._d){var t=ie(e._i),n=void 0===t.day?t.date:t.day;e._a=f([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Fn(e)}}function Gn(e){var t=new S(wn(qn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function qn(e){var t=e._i,n=e._f;return e._locale=e._locale||yn(e._l),null===t||void 0===n&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),M(t)?new S(wn(t)):(d(t)?e._d=t:o(n)?Vn(e):n?zn(e):Kn(e),v(e)||(e._d=null),e))}function Kn(e){var t=e._i;c(t)?e._d=new Date(r.now()):d(t)?e._d=new Date(t.valueOf()):"string"==typeof t?Dn(e):o(t)?(e._a=f(t.slice(0),(function(e){return parseInt(e,10)})),Fn(e)):a(t)?Wn(e):u(t)?e._d=new Date(t):r.createFromInputFallback(e)}function Yn(e,t,n,r,i){var s={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(a(e)&&l(e)||o(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=e,s._f=t,s._strict=r,Gn(s)}function Jn(e,t,n,r){return Yn(e,t,n,r,!1)}r.createFromInputFallback=A("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),r.ISO_8601=function(){},r.RFC_2822=function(){};var Qn=A("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Jn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()})),Xn=A("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Jn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()}));function Zn(e,t){var n,r;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Jn();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}function $n(){return Zn("isBefore",[].slice.call(arguments,0))}function er(){return Zn("isAfter",[].slice.call(arguments,0))}var tr=function(){return Date.now?Date.now():+new Date},nr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function rr(e){var t,n,r=!1,i=nr.length;for(t in e)if(s(e,t)&&(-1===He.call(nr,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[nr[n]]){if(r)return!1;parseFloat(e[nr[n]])!==ue(e[nr[n]])&&(r=!0)}return!0}function ir(){return this._isValid}function or(){return kr(NaN)}function ar(e){var t=ie(e),n=t.year||0,r=t.quarter||0,i=t.month||0,o=t.week||t.isoWeek||0,a=t.day||0,s=t.hour||0,l=t.minute||0,c=t.second||0,u=t.millisecond||0;this._isValid=rr(t),this._milliseconds=+u+1e3*c+6e4*l+36e5*s,this._days=+a+7*o,this._months=+i+3*r+12*n,this._data={},this._locale=yn(),this._bubble()}function sr(e){return e instanceof ar}function lr(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function cr(e,t,n){var r,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&ue(e[r])!==ue(t[r]))&&a++;return a+o}function ur(e,t){U(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+L(~~(e/60),2)+t+L(~~e%60,2)}))}ur("Z",":"),ur("ZZ",""),Ne("Z",Oe),Ne("ZZ",Oe),Fe(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=fr(Oe,e)}));var dr=/([\+\-]|\d\d)/gi;function fr(e,t){var n,r,i=(t||"").match(e);return null===i?null:0===(r=60*(n=((i[i.length-1]||[])+"").match(dr)||["-",0,0])[1]+ue(n[2]))?0:"+"===n[0]?r:-r}function hr(e,t){var n,i;return t._isUTC?(n=t.clone(),i=(M(e)||d(e)?e.valueOf():Jn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):Jn(e).local()}function pr(e){return-Math.round(e._d.getTimezoneOffset())}function mr(e,t,n){var i,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=fr(Oe,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=pr(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==e&&(!t||this._changeInProgress?Pr(this,kr(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:pr(this)}function gr(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function vr(e){return this.utcOffset(0,e)}function yr(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(pr(this),"m")),this}function br(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=fr(Ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function wr(e){return!!this.isValid()&&(e=e?Jn(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function xr(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Sr(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return x(t,this),(t=qn(t))._a?(e=t._isUTC?p(t._a):Jn(t._a),this._isDSTShifted=this.isValid()&&cr(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Mr(){return!!this.isValid()&&!this._isUTC}function _r(){return!!this.isValid()&&this._isUTC}function Ar(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Er=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Cr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function kr(e,t){var n,r,i,o=e,a=null;return sr(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(o={},t?o[t]=+e:o.milliseconds=+e):(a=Er.exec(e))?(n="-"===a[1]?-1:1,o={y:0,d:ue(a[Ge])*n,h:ue(a[qe])*n,m:ue(a[Ke])*n,s:ue(a[Ye])*n,ms:ue(lr(1e3*a[Je]))*n}):(a=Cr.exec(e))?(n="-"===a[1]?-1:1,o={y:Tr(a[2],n),M:Tr(a[3],n),w:Tr(a[4],n),d:Tr(a[5],n),h:Tr(a[6],n),m:Tr(a[7],n),s:Tr(a[8],n)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(i=Or(Jn(o.from),Jn(o.to)),(o={}).ms=i.milliseconds,o.M=i.months),r=new ar(o),sr(e)&&s(e,"_locale")&&(r._locale=e._locale),sr(e)&&s(e,"_isValid")&&(r._isValid=e._isValid),r}function Tr(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Ir(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Or(e,t){var n;return e.isValid()&&t.isValid()?(t=hr(t,e),e.isBefore(t)?n=Ir(e,t):((n=Ir(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Rr(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(k(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Pr(this,kr(n,r),e),this}}function Pr(e,t,n,i){var o=t._milliseconds,a=lr(t._days),s=lr(t._months);e.isValid()&&(i=null==i||i,s&&ct(e,fe(e,"Month")+s*n),a&&he(e,"Date",fe(e,"Date")+a*n),o&&e._d.setTime(e._d.valueOf()+o*n),i&&r.updateOffset(e,a||s))}kr.fn=ar.prototype,kr.invalid=or;var Nr=Rr(1,"add"),Lr=Rr(-1,"subtract");function Dr(e){return"string"==typeof e||e instanceof String}function Br(e){return M(e)||d(e)||Dr(e)||u(e)||Fr(e)||jr(e)||null==e}function jr(e){var t,n,r=a(e)&&!l(e),i=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=o.length;for(t=0;t<c;t+=1)n=o[t],i=i||s(e,n);return r&&i}function Fr(e){var t=o(e),n=!1;return t&&(n=0===e.filter((function(t){return!u(t)&&Dr(e)})).length),t&&n}function Ur(e){var t,n,r=a(e)&&!l(e),i=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<o.length;t+=1)n=o[t],i=i||s(e,n);return r&&i}function zr(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Hr(e,t){1===arguments.length&&(arguments[0]?Br(arguments[0])?(e=arguments[0],t=void 0):Ur(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Jn(),i=hr(n,this).startOf("day"),o=r.calendarFormat(this,i)||"sameElse",a=t&&(T(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,Jn(n)))}function Vr(){return new S(this)}function Wr(e,t){var n=M(e)?e:Jn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Gr(e,t){var n=M(e)?e:Jn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function qr(e,t,n,r){var i=M(e)?e:Jn(e),o=M(t)?t:Jn(t);return!!(this.isValid()&&i.isValid()&&o.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(o,n):!this.isAfter(o,n))}function Kr(e,t){var n,r=M(e)?e:Jn(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function Yr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Jr(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Qr(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=hr(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=re(t)){case"year":o=Xr(this,r)/12;break;case"month":o=Xr(this,r);break;case"quarter":o=Xr(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:ce(o)}function Xr(e,t){if(e.date()<t.date())return-Xr(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Zr(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function $r(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?V(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+6e4*this.utcOffset()).toISOString().replace("Z",V(n,"Z")):V(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ei(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,i="moment",o="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=o+'[")]',this.format(e+t+n+r)}function ti(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=V(this,e);return this.localeData().postformat(t)}function ni(e,t){return this.isValid()&&(M(e)&&e.isValid()||Jn(e).isValid())?kr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ri(e){return this.from(Jn(),e)}function ii(e,t){return this.isValid()&&(M(e)&&e.isValid()||Jn(e).isValid())?kr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function oi(e){return this.to(Jn(),e)}function ai(e){var t;return void 0===e?this._locale._abbr:(null!=(t=yn(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var si=A("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function li(){return this._locale}var ci=1e3,ui=60*ci,di=60*ui,fi=3506328*di;function hi(e,t){return(e%t+t)%t}function pi(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-fi:new Date(e,t,n).valueOf()}function mi(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-fi:Date.UTC(e,t,n)}function gi(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?mi:pi,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hi(t+(this._isUTC?0:this.utcOffset()*ui),di);break;case"minute":t=this._d.valueOf(),t-=hi(t,ui);break;case"second":t=this._d.valueOf(),t-=hi(t,ci)}return this._d.setTime(t),r.updateOffset(this,!0),this}function vi(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?mi:pi,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=di-hi(t+(this._isUTC?0:this.utcOffset()*ui),di)-1;break;case"minute":t=this._d.valueOf(),t+=ui-hi(t,ui)-1;break;case"second":t=this._d.valueOf(),t+=ci-hi(t,ci)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function yi(){return this._d.valueOf()-6e4*(this._offset||0)}function bi(){return Math.floor(this.valueOf()/1e3)}function wi(){return new Date(this.valueOf())}function xi(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Si(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Mi(){return this.isValid()?this.toISOString():null}function _i(){return v(this)}function Ai(){return h({},g(this))}function Ei(){return g(this).overflow}function Ci(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function ki(e,t){var n,i,o,a=this._eras||yn("en")._eras;for(n=0,i=a.length;n<i;++n)switch("string"==typeof a[n].since&&(o=r(a[n].since).startOf("day"),a[n].since=o.valueOf()),typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":o=r(a[n].until).startOf("day").valueOf(),a[n].until=o.valueOf()}return a}function Ti(e,t,n){var r,i,o,a,s,l=this.eras();for(e=e.toUpperCase(),r=0,i=l.length;r<i;++r)if(o=l[r].name.toUpperCase(),a=l[r].abbr.toUpperCase(),s=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return l[r];break;case"NNNN":if(o===e)return l[r];break;case"NNNNN":if(s===e)return l[r]}else if([o,a,s].indexOf(e)>=0)return l[r]}function Ii(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function Oi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""}function Ri(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""}function Pi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""}function Ni(){var e,t,n,i,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=o[e].since<=o[e].until?1:-1,i=this.clone().startOf("day").valueOf(),o[e].since<=i&&i<=o[e].until||o[e].until<=i&&i<=o[e].since)return(this.year()-r(o[e].since).year())*n+o[e].offset;return this.year()}function Li(e){return s(this,"_erasNameRegex")||Hi.call(this),e?this._erasNameRegex:this._erasRegex}function Di(e){return s(this,"_erasAbbrRegex")||Hi.call(this),e?this._erasAbbrRegex:this._erasRegex}function Bi(e){return s(this,"_erasNarrowRegex")||Hi.call(this),e?this._erasNarrowRegex:this._erasRegex}function ji(e,t){return t.erasAbbrRegex(e)}function Fi(e,t){return t.erasNameRegex(e)}function Ui(e,t){return t.erasNarrowRegex(e)}function zi(e,t){return t._eraYearOrdinalRegex||ke}function Hi(){var e,t,n=[],r=[],i=[],o=[],a=this.eras();for(e=0,t=a.length;e<t;++e)r.push(Be(a[e].name)),n.push(Be(a[e].abbr)),i.push(Be(a[e].narrow)),o.push(Be(a[e].name)),o.push(Be(a[e].abbr)),o.push(Be(a[e].narrow));this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+i.join("|")+")","i")}function Vi(e,t){U(0,[e,e.length],0,t)}function Wi(e){return Qi.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Gi(e){return Qi.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function qi(){return Mt(this.year(),1,4)}function Ki(){return Mt(this.isoWeekYear(),1,4)}function Yi(){var e=this.localeData()._week;return Mt(this.year(),e.dow,e.doy)}function Ji(){var e=this.localeData()._week;return Mt(this.weekYear(),e.dow,e.doy)}function Qi(e,t,n,r,i){var o;return null==e?St(this,r,i).year:(t>(o=Mt(e,r,i))&&(t=o),Xi.call(this,e,t,n,r,i))}function Xi(e,t,n,r,i){var o=xt(e,t,n,r,i),a=bt(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Zi(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}U("N",0,0,"eraAbbr"),U("NN",0,0,"eraAbbr"),U("NNN",0,0,"eraAbbr"),U("NNNN",0,0,"eraName"),U("NNNNN",0,0,"eraNarrow"),U("y",["y",1],"yo","eraYear"),U("y",["yy",2],0,"eraYear"),U("y",["yyy",3],0,"eraYear"),U("y",["yyyy",4],0,"eraYear"),Ne("N",ji),Ne("NN",ji),Ne("NNN",ji),Ne("NNNN",Fi),Ne("NNNNN",Ui),Fe(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?g(n).era=i:g(n).invalidEra=e})),Ne("y",ke),Ne("yy",ke),Ne("yyy",ke),Ne("yyyy",ke),Ne("yo",zi),Fe(["y","yy","yyy","yyyy"],Ve),Fe(["yo"],(function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ve]=n._locale.eraYearOrdinalParse(e,i):t[Ve]=parseInt(e,10)})),U(0,["gg",2],0,(function(){return this.weekYear()%100})),U(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Vi("gggg","weekYear"),Vi("ggggg","weekYear"),Vi("GGGG","isoWeekYear"),Vi("GGGGG","isoWeekYear"),ne("weekYear","gg"),ne("isoWeekYear","GG"),ae("weekYear",1),ae("isoWeekYear",1),Ne("G",Te),Ne("g",Te),Ne("GG",Se,ye),Ne("gg",Se,ye),Ne("GGGG",Ee,we),Ne("gggg",Ee,we),Ne("GGGGG",Ce,xe),Ne("ggggg",Ce,xe),Ue(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=ue(e)})),Ue(["gg","GG"],(function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)})),U("Q",0,"Qo","quarter"),ne("quarter","Q"),ae("quarter",7),Ne("Q",ve),Fe("Q",(function(e,t){t[We]=3*(ue(e)-1)})),U("D",["DD",2],"Do","date"),ne("date","D"),ae("date",9),Ne("D",Se),Ne("DD",Se,ye),Ne("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Fe(["D","DD"],Ge),Fe("Do",(function(e,t){t[Ge]=ue(e.match(Se)[0])}));var $i=de("Date",!0);function eo(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}U("DDD",["DDDD",3],"DDDo","dayOfYear"),ne("dayOfYear","DDD"),ae("dayOfYear",4),Ne("DDD",Ae),Ne("DDDD",be),Fe(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=ue(e)})),U("m",["mm",2],0,"minute"),ne("minute","m"),ae("minute",14),Ne("m",Se),Ne("mm",Se,ye),Fe(["m","mm"],Ke);var to=de("Minutes",!1);U("s",["ss",2],0,"second"),ne("second","s"),ae("second",15),Ne("s",Se),Ne("ss",Se,ye),Fe(["s","ss"],Ye);var no,ro,io=de("Seconds",!1);for(U("S",0,0,(function(){return~~(this.millisecond()/100)})),U(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),U(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),U(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),U(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),U(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),U(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ne("millisecond","ms"),ae("millisecond",16),Ne("S",Ae,ve),Ne("SS",Ae,ye),Ne("SSS",Ae,be),no="SSSS";no.length<=9;no+="S")Ne(no,ke);function oo(e,t){t[Je]=ue(1e3*("0."+e))}for(no="S";no.length<=9;no+="S")Fe(no,oo);function ao(){return this._isUTC?"UTC":""}function so(){return this._isUTC?"Coordinated Universal Time":""}ro=de("Milliseconds",!1),U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var lo=S.prototype;function co(e){return Jn(1e3*e)}function uo(){return Jn.apply(null,arguments).parseZone()}function fo(e){return e}lo.add=Nr,lo.calendar=Hr,lo.clone=Vr,lo.diff=Qr,lo.endOf=vi,lo.format=ti,lo.from=ni,lo.fromNow=ri,lo.to=ii,lo.toNow=oi,lo.get=pe,lo.invalidAt=Ei,lo.isAfter=Wr,lo.isBefore=Gr,lo.isBetween=qr,lo.isSame=Kr,lo.isSameOrAfter=Yr,lo.isSameOrBefore=Jr,lo.isValid=_i,lo.lang=si,lo.locale=ai,lo.localeData=li,lo.max=Xn,lo.min=Qn,lo.parsingFlags=Ai,lo.set=me,lo.startOf=gi,lo.subtract=Lr,lo.toArray=xi,lo.toObject=Si,lo.toDate=wi,lo.toISOString=$r,lo.inspect=ei,"undefined"!=typeof Symbol&&null!=Symbol.for&&(lo[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),lo.toJSON=Mi,lo.toString=Zr,lo.unix=bi,lo.valueOf=yi,lo.creationData=Ci,lo.eraName=Oi,lo.eraNarrow=Ri,lo.eraAbbr=Pi,lo.eraYear=Ni,lo.year=gt,lo.isLeapYear=vt,lo.weekYear=Wi,lo.isoWeekYear=Gi,lo.quarter=lo.quarters=Zi,lo.month=ut,lo.daysInMonth=dt,lo.week=lo.weeks=kt,lo.isoWeek=lo.isoWeeks=Tt,lo.weeksInYear=Yi,lo.weeksInWeekYear=Ji,lo.isoWeeksInYear=qi,lo.isoWeeksInISOWeekYear=Ki,lo.date=$i,lo.day=lo.days=Wt,lo.weekday=Gt,lo.isoWeekday=qt,lo.dayOfYear=eo,lo.hour=lo.hours=rn,lo.minute=lo.minutes=to,lo.second=lo.seconds=io,lo.millisecond=lo.milliseconds=ro,lo.utcOffset=mr,lo.utc=vr,lo.local=yr,lo.parseZone=br,lo.hasAlignedHourOffset=wr,lo.isDST=xr,lo.isLocal=Mr,lo.isUtcOffset=_r,lo.isUtc=Ar,lo.isUTC=Ar,lo.zoneAbbr=ao,lo.zoneName=so,lo.dates=A("dates accessor is deprecated. Use date instead.",$i),lo.months=A("months accessor is deprecated. Use month instead",ut),lo.years=A("years accessor is deprecated. Use year instead",gt),lo.zone=A("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gr),lo.isDSTShifted=A("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Sr);var ho=R.prototype;function po(e,t,n,r){var i=yn(),o=p().set(r,t);return i[n](o,e)}function mo(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return po(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=po(e,r,n,"month");return i}function go(e,t,n,r){"boolean"==typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var i,o=yn(),a=e?o._week.dow:0,s=[];if(null!=n)return po(t,(n+a)%7,r,"day");for(i=0;i<7;i++)s[i]=po(t,(i+a)%7,r,"day");return s}function vo(e,t){return mo(e,t,"months")}function yo(e,t){return mo(e,t,"monthsShort")}function bo(e,t,n){return go(e,t,n,"weekdays")}function wo(e,t,n){return go(e,t,n,"weekdaysShort")}function xo(e,t,n){return go(e,t,n,"weekdaysMin")}ho.calendar=N,ho.longDateFormat=q,ho.invalidDate=Y,ho.ordinal=X,ho.preparse=fo,ho.postformat=fo,ho.relativeTime=$,ho.pastFuture=ee,ho.set=I,ho.eras=ki,ho.erasParse=Ti,ho.erasConvertYear=Ii,ho.erasAbbrRegex=Di,ho.erasNameRegex=Li,ho.erasNarrowRegex=Bi,ho.months=ot,ho.monthsShort=at,ho.monthsParse=lt,ho.monthsRegex=ht,ho.monthsShortRegex=ft,ho.week=_t,ho.firstDayOfYear=Ct,ho.firstDayOfWeek=Et,ho.weekdays=Ft,ho.weekdaysMin=zt,ho.weekdaysShort=Ut,ho.weekdaysParse=Vt,ho.weekdaysRegex=Kt,ho.weekdaysShortRegex=Yt,ho.weekdaysMinRegex=Jt,ho.isPM=tn,ho.meridiem=on,mn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===ue(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=A("moment.lang is deprecated. Use moment.locale instead.",mn),r.langData=A("moment.langData is deprecated. Use moment.localeData instead.",yn);var So=Math.abs;function Mo(){var e=this._data;return this._milliseconds=So(this._milliseconds),this._days=So(this._days),this._months=So(this._months),e.milliseconds=So(e.milliseconds),e.seconds=So(e.seconds),e.minutes=So(e.minutes),e.hours=So(e.hours),e.months=So(e.months),e.years=So(e.years),this}function _o(e,t,n,r){var i=kr(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Ao(e,t){return _o(this,e,t,1)}function Eo(e,t){return _o(this,e,t,-1)}function Co(e){return e<0?Math.floor(e):Math.ceil(e)}function ko(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*Co(Io(s)+a),a=0,s=0),l.milliseconds=o%1e3,e=ce(o/1e3),l.seconds=e%60,t=ce(e/60),l.minutes=t%60,n=ce(t/60),l.hours=n%24,a+=ce(n/24),s+=i=ce(To(a)),a-=Co(Io(i)),r=ce(s/12),s%=12,l.days=a,l.months=s,l.years=r,this}function To(e){return 4800*e/146097}function Io(e){return 146097*e/4800}function Oo(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=re(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+To(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Io(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function Ro(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*ue(this._months/12):NaN}function Po(e){return function(){return this.as(e)}}var No=Po("ms"),Lo=Po("s"),Do=Po("m"),Bo=Po("h"),jo=Po("d"),Fo=Po("w"),Uo=Po("M"),zo=Po("Q"),Ho=Po("y");function Vo(){return kr(this)}function Wo(e){return e=re(e),this.isValid()?this[e+"s"]():NaN}function Go(e){return function(){return this.isValid()?this._data[e]:NaN}}var qo=Go("milliseconds"),Ko=Go("seconds"),Yo=Go("minutes"),Jo=Go("hours"),Qo=Go("days"),Xo=Go("months"),Zo=Go("years");function $o(){return ce(this.days()/7)}var ea=Math.round,ta={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function na(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function ra(e,t,n,r){var i=kr(e).abs(),o=ea(i.as("s")),a=ea(i.as("m")),s=ea(i.as("h")),l=ea(i.as("d")),c=ea(i.as("M")),u=ea(i.as("w")),d=ea(i.as("y")),f=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||a<=1&&["m"]||a<n.m&&["mm",a]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(f=f||u<=1&&["w"]||u<n.w&&["ww",u]),(f=f||c<=1&&["M"]||c<n.M&&["MM",c]||d<=1&&["y"]||["yy",d])[2]=t,f[3]=+e>0,f[4]=r,na.apply(null,f)}function ia(e){return void 0===e?ea:"function"==typeof e&&(ea=e,!0)}function oa(e,t){return void 0!==ta[e]&&(void 0===t?ta[e]:(ta[e]=t,"s"===e&&(ta.ss=t-1),!0))}function aa(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,o=ta;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(o=Object.assign({},ta,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),r=ra(this,!i,o,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)}var sa=Math.abs;function la(e){return(e>0)-(e<0)||+e}function ca(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,o,a,s,l=sa(this._milliseconds)/1e3,c=sa(this._days),u=sa(this._months),d=this.asSeconds();return d?(e=ce(l/60),t=ce(e/60),l%=60,e%=60,n=ce(u/12),u%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",o=la(this._months)!==la(d)?"-":"",a=la(this._days)!==la(d)?"-":"",s=la(this._milliseconds)!==la(d)?"-":"",i+"P"+(n?o+n+"Y":"")+(u?o+u+"M":"")+(c?a+c+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+r+"S":"")):"P0D"}var ua=ar.prototype;return ua.isValid=ir,ua.abs=Mo,ua.add=Ao,ua.subtract=Eo,ua.as=Oo,ua.asMilliseconds=No,ua.asSeconds=Lo,ua.asMinutes=Do,ua.asHours=Bo,ua.asDays=jo,ua.asWeeks=Fo,ua.asMonths=Uo,ua.asQuarters=zo,ua.asYears=Ho,ua.valueOf=Ro,ua._bubble=ko,ua.clone=Vo,ua.get=Wo,ua.milliseconds=qo,ua.seconds=Ko,ua.minutes=Yo,ua.hours=Jo,ua.days=Qo,ua.weeks=$o,ua.months=Xo,ua.years=Zo,ua.humanize=aa,ua.toISOString=ca,ua.toString=ca,ua.toJSON=ca,ua.locale=ai,ua.localeData=li,ua.toIsoString=A("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ca),ua.lang=si,U("X",0,0,"unix"),U("x",0,0,"valueOf"),Ne("x",Te),Ne("X",Re),Fe("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),Fe("x",(function(e,t,n){n._d=new Date(ue(e))})),
96
96
  //! moment.js
97
- r.version="2.29.4",i(Jn),r.fn=lo,r.min=$n,r.max=er,r.now=tr,r.utc=p,r.unix=co,r.months=vo,r.isDate=d,r.locale=mn,r.invalid=y,r.duration=kr,r.isMoment=M,r.weekdays=bo,r.parseZone=uo,r.localeData=yn,r.isDuration=sr,r.monthsShort=yo,r.weekdaysMin=xo,r.defineLocale=gn,r.updateLocale=vn,r.locales=bn,r.weekdaysShort=wo,r.normalizeUnits=re,r.relativeTimeRounding=ia,r.relativeTimeThreshold=oa,r.calendarFormat=zr,r.prototype=lo,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()})),a("juxiN").register(JSON.parse('{"adfgW":"index.js","cmazm":"abap.bc6c1a94.js","jPTA1":"abnf.a3fdbafa.js","jdWNC":"actionscript.59d9b9ea.js","2CBqg":"ada.7ae8a3a8.js","3wHhO":"agda.c22a72e2.js","kFVdl":"al.43edf93f.js","3V4RR":"antlr4.fab93bd9.js","ksX9L":"apacheconf.1ea6f6bc.js","3N81M":"apex.5f5d0b00.js","lBh32":"apl.f0e0255a.js","1cOI2":"applescript.f8873ad2.js","hwV5I":"aql.0596cd74.js","cxQUy":"arduino.8a10351d.js","h8XDs":"arff.b6eba224.js","1glOK":"asciidoc.3591554e.js","5YI5Q":"asm6502.eb3baf93.js","5aM2c":"asmatmel.93b67168.js","aKcNk":"aspnet.a154be94.js","bYGuI":"csharp.60bc2788.js","4ffJ6":"autohotkey.dc99c6b5.js","6o8gr":"autoit.7bd54007.js","d0QlI":"avisynth.506bbdad.js","1vpfH":"avro-idl.ab78e3d7.js","d78C2":"basic.09310972.js","1V5ou":"batch.5c48c918.js","h9qnw":"bbcode.4e0cb2f2.js","eluAn":"bicep.e394696d.js","jD2Yh":"birb.54766d79.js","3ligT":"bison.2c2552ab.js","cSnAi":"bnf.ec556d42.js","gmloY":"brainfuck.4e81eb1d.js","77rtQ":"brightscript.3c7cc723.js","hfFki":"bro.8db28f8a.js","8SYqo":"bsl.260fabfb.js","i4HkI":"cfscript.92c90b90.js","1rBYK":"chaiscript.76481f4b.js","gQYEz":"cil.622792d1.js","bq2uf":"clike.36346267.js","h7tza":"clojure.9da4900e.js","aK2oY":"cmake.234b57e3.js","3V5TZ":"cobol.2e8bd2ea.js","72v5N":"coffeescript.261b318a.js","lNJYg":"concurnas.9d189a8c.js","cHo4f":"coq.917e2a53.js","7GKmU":"crystal.d23925f3.js","a5f4n":"cshtml.92086949.js","2nOzn":"csp.9b5dd573.js","iZH8k":"css-extras.7f3088a6.js","3V9km":"css.fb6f00e3.js","7TCh4":"csv.06af3522.js","8MqYl":"cypher.6af6e534.js","6Oo3A":"d.303192e5.js","6ks0D":"dart.6fb62874.js","huqsT":"dataweave.e97ef31d.js","YtcLG":"dax.013d5e9a.js","1s9Hz":"dhall.d5ee83ba.js","b677V":"diff.9ef56ea8.js","ak2pO":"django.13b0bb49.js","8LDFZ":"dns-zone-file.189b08c5.js","1awLf":"docker.1da9769e.js","9dPYr":"dot.8dca92f3.js","e2ZjS":"ebnf.58c0fa63.js","9h8KW":"editorconfig.9c7b63a5.js","4SWgd":"eiffel.090bab86.js","6HmuU":"ejs.0ee535c3.js","2KAkF":"elixir.dc192ee6.js","jPV3v":"elm.c88782bd.js","agNrQ":"erb.55ec7cf0.js","9BmS2":"erlang.956455fa.js","fqf1c":"etlua.79f6dba5.js","cgMSr":"lua.88c0a077.js","92McF":"excel-formula.d0dd1424.js","juFxG":"factor.e311ca38.js","1dWPh":"false.a93fe44c.js","2k0b2":"firestore-security-rules.4ea155d7.js","dvL1Q":"flow.96e0f48a.js","5oumN":"fortran.0811bc79.js","fP8jO":"fsharp.0119d0fd.js","7L6sP":"ftl.c5671dbe.js","2ujce":"gap.b0574953.js","hzgIA":"gcode.29260c31.js","5MUDD":"gdscript.545f127b.js","ghckm":"gedcom.d53f8a81.js","ian9z":"gherkin.0c5a099f.js","dsuH3":"git.2d89a25c.js","dvV8S":"glsl.0bf837a6.js","6BDWE":"gml.04204c1b.js","btSYt":"gn.cbb4c3be.js","j94Lr":"go-module.2bebc9b8.js","207xG":"go.cc49e5b2.js","iQ4Nh":"graphql.3d658adb.js","9E9pJ":"groovy.3e5836cd.js","hLXUt":"haml.9a056759.js","5ob5h":"handlebars.8c13dfe6.js","1nDhS":"haskell.3c80aa72.js","kQehe":"haxe.40a1dc98.js","1sziu":"hcl.84488f47.js","28Tam":"hlsl.323b0c17.js","awNOU":"hoon.df16cb45.js","eeLMI":"hpkp.9c950797.js","gjEKw":"hsts.0440ab7b.js","3bCJ7":"http.96d5f1c1.js","id4YZ":"ichigojam.c0bd16f5.js","5TKHe":"icon.439feb9f.js","eijPh":"icu-message-format.e96f6551.js","lv8gR":"idris.d3811412.js","bW8K3":"iecst.3fdbbc52.js","b8EBv":"ignore.00726ce9.js","jOS96":"inform7.65978ef5.js","dn3Yf":"ini.1cbb0515.js","iUSU6":"io.e628fd7e.js","6wbwo":"j.b959d174.js","5qA0j":"java.0ffd8069.js","hdx4d":"javadoc.b99752ae.js","jRMSs":"javadoclike.8cc3d825.js","l2DRD":"javascript.fe729813.js","cpOeo":"javastacktrace.cc22fb4b.js","fSVrK":"jexl.2cce5cc0.js","03mi8":"jolie.d8f352cd.js","j6YjP":"jq.65b95777.js","6JQIv":"js-extras.7d041902.js","5nVrm":"js-templates.a3463d0b.js","9gPZY":"jsdoc.0c5cc4d3.js","8q0xA":"json5.b9de5531.js","fIx8j":"jsonp.eefdc553.js","a3ur7":"jsstacktrace.8d3a2b71.js","bKtxi":"julia.679e1c74.js","9vqI0":"keepalived.e694c167.js","lDUCl":"keyman.d1406200.js","gcEXq":"kotlin.fd040b34.js","cxxOt":"kumir.b2072cfc.js","b8NIc":"kusto.98546fcc.js","iXz7U":"latex.ecc17a0d.js","9nRbn":"latte.18295a4f.js","lWxq2":"less.a8a986ab.js","7dEcL":"lilypond.0423d709.js","ck7Ll":"scheme.4039466f.js","hI3m3":"liquid.533f073c.js","7qpQZ":"lisp.b075bd53.js","8Cm1D":"livescript.2b19fb05.js","9sT8D":"llvm.6b74465d.js","gQkTU":"log.b74346d6.js","86y52":"lolcode.0fbc730a.js","6bXdx":"magma.bbb66246.js","hDIxO":"makefile.bf1a7653.js","4wRUQ":"markdown.4a5510a8.js","66rgq":"markup.973a8c4c.js","iAx9A":"matlab.caaa1e9f.js","5SXMq":"maxscript.58a0bf4d.js","gnQ55":"mel.c5da9d2e.js","8G54S":"mermaid.ced53190.js","gfXsu":"mizar.4e6d6035.js","7nZsb":"mongodb.5c4e0cf9.js","hUs37":"monkey.9be800f3.js","fKqwA":"moonscript.fc782589.js","luHXo":"n1ql.7f05115f.js","j0sqX":"n4js.318f41b7.js","avS2d":"nand2tetris-hdl.be3bb656.js","8fNUI":"naniscript.ec3afc9a.js","6PKtR":"nasm.1ee2623a.js","2LUGi":"neon.1d5a4ec8.js","esMLb":"nevod.6908715c.js","jQ8dR":"nginx.404fbeb4.js","1kuW2":"nim.36bf497b.js","7YxPR":"nix.3af3b6b2.js","b1EPY":"nsis.94e1fb71.js","j169M":"objectivec.49a6b342.js","1b4qw":"ocaml.c5fca1eb.js","c0JxA":"opencl.4194613a.js","54ivl":"openqasm.4b589cb3.js","kYO5l":"oz.498e9cbd.js","811Qi":"parigp.ed6a3789.js","gXO52":"parser.3329b2ab.js","4SQCy":"pascal.82aebbcf.js","9KuwN":"pascaligo.4bbd3a85.js","eM7TR":"pcaxis.e636466e.js","6w6GH":"peoplecode.32e124c6.js","eQPpI":"perl.7d72d7fd.js","b83gb":"php-extras.9606406b.js","l8BPM":"phpdoc.617f8af6.js","2cVRv":"plsql.482f8da9.js","gOyA3":"powerquery.486ee359.js","1BYb4":"powershell.856a4dd0.js","lIwm5":"processing.2c7d4403.js","cHCln":"prolog.812b5c86.js","d460J":"promql.8e6b9da4.js","lAnQP":"properties.40afd4d0.js","dG8OA":"protobuf.84963e3e.js","eRbDh":"psl.9c32166c.js","27W0o":"pug.54462c11.js","75Y4h":"puppet.2646aef5.js","kgGGG":"pure.a10bd6b4.js","hFuIq":"purebasic.629b75cd.js","db2yj":"purescript.216751ba.js","8ZppB":"q.b46a94a4.js","iFM89":"qml.bd71f711.js","7FNJV":"qore.d7e006f8.js","6AsUF":"qsharp.7bab07d1.js","7Xrsp":"r.3036c5c0.js","dh9BI":"racket.b867dd29.js","8pRTf":"reason.405183ad.js","kUbHD":"regex.aa4684b4.js","bNx4l":"rego.61da6b5d.js","jbksA":"renpy.ff0ce389.js","gP26j":"rest.91bee177.js","6FCYh":"rip.33f479a4.js","lEjxk":"roboconf.0ba2e9bf.js","c8BOJ":"robotframework.72ccad61.js","elAoE":"rust.9a35cb62.js","eDL1o":"sas.b3b3be64.js","gIQMB":"sass.165275f3.js","i7Y8T":"scala.a51a6234.js","OzRer":"shell-session.c47a7880.js","hZA2W":"smali.46e3f703.js","gT51y":"smalltalk.fb31e155.js","2OoIP":"smarty.abd6973e.js","33hrk":"sml.6d8c2545.js","3uuqi":"solidity.80562c5b.js","kHJvD":"solution-file.30e00f5f.js","6iiDq":"soy.46a7ec1f.js","2TkEp":"sparql.dbb56be0.js","eirDq":"turtle.b8836781.js","jmDes":"splunk-spl.149146f6.js","81dr7":"sqf.ea070acb.js","i4XqC":"squirrel.1efaf6f3.js","1zw3p":"stan.6efb4565.js","kfIG2":"stylus.d4d41ca4.js","dksml":"swift.ea86fdd0.js","4w3mZ":"systemd.df819c28.js","6b6p1":"t4-cs.b3eaa646.js","budu0":"t4-templating.db399052.js","7RUUk":"t4-vb.082c208c.js","2cwdT":"vbnet.ac572fcc.js","fBA7X":"tap.82e5520b.js","gqbYu":"yaml.3d0bf472.js","lCVk7":"tcl.fffb53bb.js","aKXaK":"textile.20ae1d45.js","ks7hU":"toml.69754057.js","kCJbl":"tremor.262b95d4.js","iZ71n":"tt2.f07906cb.js","5mLLA":"twig.a95c4964.js","i9AIa":"typoscript.3dbd38d9.js","iHNMy":"unrealscript.e5c3fc1d.js","bKWLJ":"uorazor.cf3ed6dc.js","2XcAn":"uri.59c4e10c.js","enDcg":"v.fe8e0874.js","db4Ta":"vala.386e6270.js","cmaSk":"velocity.9a0ffb21.js","29RKO":"verilog.4308f028.js","4aBVG":"vhdl.ca8ee4c0.js","6Jrfy":"vim.897929a5.js","kNyzl":"visual-basic.bc36aaac.js","4LJ5s":"warpscript.6d00b50f.js","6Ocza":"wasm.029f651e.js","hvPGO":"web-idl.97fc763d.js","lS90V":"wiki.1179d7f8.js","9LY8Y":"wolfram.7017e6a0.js","bFBdJ":"wren.d4121438.js","iskNq":"xeora.cce693be.js","ek7X7":"xml-doc.025d4193.js","hwA94":"xojo.843f212e.js","f8rnQ":"xquery.50701bd4.js","3Q9qv":"yang.2c70775f.js","a0Oht":"zig.e33efe11.js","dnGOp":"core.ade097c7.js"}'));var s;s=a("9Hk4c");var l,c=a("2BCLI"),u=a("85Hg2");l=a("bG9xl")();const d=e=>e?new URL(e.startsWith("http")?e:`https://${e}`).origin:"https://backend.memori.ai";var f=a("dCyaf");const h=(e,t)=>r(f)(`${t.apiUrl}${e}`,{...t,body:(null==t?void 0:t.body)?JSON.stringify(t.body):void 0,mode:"cors",credentials:"include",headers:{"Content-Type":"application/json",...null==t?void 0:t.headers}}).then((e=>(null==t?void 0:t.text)?e.text():e.json()));var p=e=>({getTenantPublicMemoriList:t=>h(`/TenantPublicMemori/${encodeURIComponent(t)}`,{apiUrl:e}),getTenantMetaverseMemoriList:t=>h(`/TenantMetaverseMemori/${encodeURIComponent(t)}`,{apiUrl:e}),getPublicMemoriList:t=>h(`/PublicMemori/${t}`,{apiUrl:e}),getAllMemori:t=>h(`/AllMemori/${t}`,{apiUrl:e}),getUserByIDMemoriList:(t,n,r)=>h(`/UserMemoriByID/${t}/${n}${r?`/${r}`:""}`,{apiUrl:e}),getUserMemoriList:(t,n,r)=>h(`/UserMemori/${t}/${n}${r?`/${r}`:""}`,{apiUrl:e}),getMemoriList:t=>h(`/Memori/${t}`,{apiUrl:e}),getSharedMemoriList:t=>h(`/SharedMemori/${t}`,{apiUrl:e}),getTenantCategories:t=>h(`/TenantMemoriCategories/${encodeURIComponent(t)}`,{apiUrl:e}),getMemoriConfigs:t=>h(`/MemoriConfigs/${t}`,{apiUrl:e}),createMemori:(t,n)=>h(`/Memori/${t}`,{apiUrl:e,body:n,method:"POST"}),updateMemori:(t,n)=>h(`/Memori/${t}/${n.memoriID}`,{apiUrl:e,body:n,method:"PATCH"}),deleteMemori:(t,n)=>h(`/Memori/${t}`,{apiUrl:e,body:n,method:"DELETE"}),getMemoriById:(t,n)=>h(`/Memori/${t}/${n}`,{apiUrl:e}),getMemoriByUserAndId:(t,n,r,i)=>h(`/MemoriById/${t}/${n}/${r}${i?`/${i}`:""}`,{apiUrl:e}),getMemori:(t,n,r,i)=>h(`/Memori/${encodeURIComponent(t)}/${encodeURIComponent(n)}/${encodeURIComponent(r)}/${null!=i?i:""}`,{apiUrl:e}),getMemoriSessions:(t,n,r,i)=>h(`/MemoriSessions/${t}/${n}${r?`/${r}`:""}${r&&i?`/${i}`:""}`,{apiUrl:e}),transferMemori:(t,n)=>h(`/TransferMemori/${t}`,{apiUrl:e,body:n,method:"POST"}),memoriContentUpdated:(t,n)=>h(`/MemoriContentUpdated/${t}/${n}`,{apiUrl:e,method:"POST"})}),m=e=>({userSignUp:t=>h("/User",{apiUrl:e,body:t,method:"POST"}),userConfirmSignUp:t=>h("/UserConfirm",{apiUrl:e,body:t,method:"POST"}),userLogin:t=>h("/Login",{apiUrl:e,body:t,method:"POST"}),userLogout:t=>h(`/Logout/${t}`,{apiUrl:e,method:"POST"}),getUser:(t,n)=>h(`/User/${t}/${n}`,{apiUrl:e}),getUsersList:t=>h(`/Users/${t}`,{apiUrl:e}),deleteUser:(t,n)=>h(`/User/${t}/${n}`,{apiUrl:e,method:"DELETE"}),updateUser:(t,n,r)=>h(`/User/${t}/${n}`,{apiUrl:e,method:"PATCH",body:r}),resetPassword:t=>h("/ResetPassword",{apiUrl:e,body:t,method:"POST"}),resetConfirm:t=>h("/ResetConfirm",{apiUrl:e,body:t,method:"POST"}),recoverUsername:t=>h("/RecoverUsername",{apiUrl:e,body:t,method:"POST"}),getTenantConfig:t=>h(`/Tenant/${t}`,{apiUrl:e}),resendVerificationCode:t=>h("/ResendVerificationCode",{apiUrl:e,body:t,method:"POST"}),createUser:(t,n)=>h(`/User/${t}`,{apiUrl:e,body:n,method:"POST"})}),g=e=>({getMemoriIntegrationsList:(t,n)=>h(`/Integrations/${t}/${n}`,{apiUrl:e}),getAllIntegrationsList:t=>h(`/AllIntegrations/${t}`,{apiUrl:e}),getIntegration:(t,n)=>h(`/Integration/${t}/${n}`,{apiUrl:e}),deleteIntegration:(t,n)=>h(`/Integration/${t}/${n}`,{apiUrl:e,method:"DELETE"}),createIntegration:(t,n)=>h(`/Integration/${t}`,{apiUrl:e,method:"POST",body:n}),updateIntegration:(t,n,r)=>h(`/Integration/${t}/${n}`,{apiUrl:e,method:"PATCH",body:r})}),v=e=>({getUploadAssetURL:(t,n,r)=>`${e}/Asset/${t}${n?`/${n}`:""}${r?`/${r}`:""}`,uploadAsset:async(t,n,r,i,o)=>{const a=new FormData,s=await fetch(n),l=await s.blob();a.append(t,l,t);const c=await fetch(`${e}/Asset/${r}${i?`/${i}`:""}${o?`/${o}`:""}`,{method:"POST",body:a});return await c.json()},getAsset:(t,n)=>h(`/Asset/${t}/${n}`,{apiUrl:e,method:"GET"}),updateAsset:(t,n,r)=>h(`/Asset/${t}/${n.split("/").reverse()[0]}`,{apiUrl:e,method:"PATCH",body:r}),deleteAsset:(t,n)=>h(`/Asset/${t}/${n.split("/").reverse()[0]}`,{apiUrl:e,method:"DELETE"})}),y=e=>({getSentInvitations:t=>h(`/SentInvitations/${t}`,{apiUrl:e}),getMemoriInvitations:(t,n)=>h(`/MemoriInvitations/${t}/${n}`,{apiUrl:e}),getReceivedInvitations:t=>h(`/ReceivedInvitations/${t}`,{apiUrl:e}),getAllInvitations:t=>h(`/AllInvitations/${t}`,{apiUrl:e}),getInvitation:(t,n)=>h(`/Invitation/${t}/${n}`,{apiUrl:e}),updateInvitation:(t,n)=>h(`/Invitation/${t}/${n.invitationID}`,{apiUrl:e,method:"PATCH",body:n}),deleteInvitation:(t,n)=>h(`/Invitation/${t}/${n}`,{apiUrl:e,method:"DELETE"}),acceptInvitation:(t,n)=>h(`/AcceptInvitation/${t}/${n}`,{apiUrl:e,method:"POST"}),rejectInvitation:(t,n)=>h(`/RejectInvitation/${t}/${n}`,{apiUrl:e,method:"POST"}),sendInvitation:(t,n)=>h(`/SendInvitation/${t}`,{apiUrl:e,method:"POST",body:n})}),b=e=>({getTenantConsumptionLogs:(t,n,r,i,o)=>h(`/TenantConsumptionLogs/${t}/${n}/${r}${i?`/${i}`:""}${i&&o?`/${o}`:""}`,{apiUrl:e}),getUserConsumptionLogs:(t,n,r,i,o)=>h(`/UserConsumptionLogs/${t}/${n}/${r}${i?`/${i}`:""}${i&&o?`/${o}`:""}`,{apiUrl:e}),getMemoriConsumptionLogs:(t,n,r,i,o)=>h(`/MemoriConsumptionLogs/${t}/${n}/${r}${i?`/${i}`:""}${i&&o?`/${o}`:""}`,{apiUrl:e})}),w=e=>({getTenantNotifications:t=>h(`/TenantNotifications/${t}`,{apiUrl:e}),getUserNotifications:t=>h(`/UserNotifications/${t}`,{apiUrl:e})}),x=e=>({importCSV:async(t,n,r,i)=>h(`/ImportExport/ImportCSV/${t}/${n}`,{apiUrl:e,method:"POST",body:{rows:r,...i}}),importTXT:async(t,n,r,i)=>h(`/ImportExport/ImportTXT/${t}/${n}`,{apiUrl:e,method:"POST",body:{rows:r,...i}}),importProcesses:async t=>h(`/ImportExport/ImportProcesses/${t}`,{apiUrl:e,method:"GET"}),importStatus:async(t,n)=>h(`/ImportExport/ImportStatus/${t}/${n}`,{apiUrl:e,method:"GET"}),stopImport:async(t,n)=>h(`/ImportExport/StopImport/${t}/${n}`,{apiUrl:e,method:"POST"}),exportCSV:async(t,n,r,i)=>h(`/ImportExport/ExportCSV/${t}/${n}`,{apiUrl:e,method:"POST",body:{csvSpecs:r,password:i},text:!0}),exportJSONL:async(t,n,r,i)=>h(`/ImportExport/ExportJSONL/${t}/${n}`,{apiUrl:e,method:"POST",body:{jsonlSpecs:r,password:i},text:!0})});var S=e=>({asset:v(e),memori:p(e),user:m(e),integration:g(e),invitation:y(e),consumptionLogs:b(e),notifications:w(e),importExport:x(e),...v(e),...p(e),...m(e),...g(e),...y(e),...b(e),...w(e),...x(e)}),M=e=>({getCorrelationPairs:async(t,n,r)=>h(`/CorrelationPairs/${t}${n?`/${n}${r?`/${r}`:""}`:""}`,{method:"GET",apiUrl:e}),postCorrelationPair:async(t,n)=>h(`/CorrelationPair/${t}`,{method:"POST",apiUrl:e,body:n}),deleteCorrelationPair:async(t,n)=>h(`/CorrelationPair/${t}/${n}`,{method:"DELETE",apiUrl:e})}),_=e=>({postTextEnteredEvent:async({sessionId:t,text:n})=>h(`/TextEnteredEvent/${t}`,{method:"POST",apiUrl:e,body:{text:n}}),postPlaceChangedEvent:async({sessionId:t,placeName:n,latitude:r,longitude:i,uncertaintyKm:o})=>h(`/PlaceChangedEvent/${t}`,{method:"POST",apiUrl:e,body:{placeName:n,latitude:r,longitude:i,uncertaintyKm:o}}),postDateChangedEvent:async t=>h(`/DateChangedEvent/${t}`,{method:"POST",apiUrl:e}),postTagChangedEvent:async(t,n)=>h(`/TagChangedEvent/${t}`,{method:"POST",apiUrl:e,body:{tag:n}}),postTimeoutEvent:async t=>h(`/TimeoutEvent/${t}`,{method:"POST",apiUrl:e}),postMediumSelectedEvent:async(t,n)=>h(`/MediumSelectedEvent/${t}`,{method:"POST",apiUrl:e,body:{medium:n}}),postDateSelectedEvent:async t=>h(`/DateSelectedEvent/${t}`,{method:"GET",apiUrl:e}),postPlaceSelectedEvent:async t=>h(`/PlaceSelectedEvent/${t}`,{method:"GET",apiUrl:e}),postTagSelectedEvent:async t=>h(`/TagSelectedEvent/${t}`,{method:"GET",apiUrl:e})}),A=e=>({getIntents:async t=>h(`/Intents/${t}`,{method:"GET",apiUrl:e}),getIntent:async(t,n)=>h(`/Intent/${t}/${n}`,{method:"GET",apiUrl:e}),patchIntent:async(t,n)=>h(`/Intent/${t}/${n.intentID}`,{method:"PATCH",apiUrl:e,body:n}),deleteIntent:async(t,n)=>h(`/Intent/${t}/${n}`,{method:"DELETE",apiUrl:e}),createIntent:async(t,n)=>h(`/Intent/${t}`,{method:"POST",apiUrl:e,body:n}),getIntentSlots:async t=>h(`/IntentSlots/${t}`,{method:"GET",apiUrl:e}),getIntentSlot:async(t,n)=>h(`/IntentSlot/${t}/${n}`,{method:"GET",apiUrl:e}),patchIntentSlot:async(t,n)=>h(`/IntentSlot/${t}/${n.intentSlotID}`,{method:"PATCH",apiUrl:e,body:n}),deleteIntentSlot:async(t,n)=>h(`/IntentSlot/${t}/${n}`,{method:"DELETE",apiUrl:e}),createIntentSlot:async(t,n)=>h(`/IntentSlot/${t}`,{method:"POST",apiUrl:e,body:n})}),E=e=>({getLocalizationKeys:async t=>h(`/LocalizationKeys/${t}`,{method:"GET",apiUrl:e}),getLocalizationKey:async(t,n)=>h(`/LocalizationKey/${t}/${n}`,{method:"GET",apiUrl:e}),deleteLocalizationKey:async(t,n)=>h(`/LocalizationKey/${t}/${n}`,{method:"DELETE",apiUrl:e}),postLocalizationKey:async(t,n)=>h(`/LocalizationKey/${t}`,{method:"POST",apiUrl:e,body:n}),patchLocalizationKey:async(t,n)=>h(`/LocalizationKey/${t}`,{method:"PATCH",apiUrl:e,body:n})}),C=e=>({getMedia:async(t,n)=>h(`/Media/${t}/${n}`,{method:"GET",apiUrl:e}),deleteMedia:async(t,n)=>h(`/Media/${t}/${n}`,{method:"DELETE",apiUrl:e}),getMedium:async(t,n,r)=>h(`/Medium/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),patchMedium:async(t,n,r)=>h(`/Medium/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),deleteMedium:(t,n,r)=>h(`/Medium/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),postMedium:async(t,n)=>h(`/Medium/${t}/${n}`,{method:"GET",apiUrl:e})}),k=e=>({getMemories:async(t,n)=>h(`/Memories/${t}${n?`/${n}`:""}`,{method:"GET",apiUrl:e}),getMemoriesPaginated:async(t,n,r,i)=>h(`/Memories/${t}/${n}/${r}${i?`/${i}`:""}`,{method:"GET",apiUrl:e}),getMemory:async(t,n)=>h(`/Memory/${t}/${n}`,{method:"GET",apiUrl:e}),patchMemory:async(t,n)=>h(`/Memory/${t}/${n.memoryID}`,{method:"PATCH",apiUrl:e,body:n}),deleteMemory:async(t,n)=>h(`/Memory/${t}/${n}`,{method:"DELETE",apiUrl:e}),postMemory:async(t,n)=>h(`/Memory/${t}`,{method:"POST",apiUrl:e,body:n}),getMemoryAccess:async(t,n)=>h(`/MemoryAccess/${t}/${n}`,{method:"GET",apiUrl:e})}),T=e=>({getWordVector:async(t,n)=>h(`/WordVector/${t}/${n}`,{method:"GET",apiUrl:e}),getSimilarWords:async(t,n)=>h(`/SimilarWords/${t}/${n}`,{method:"GET",apiUrl:e}),guessLanguage:async(t,n)=>h(`/GuessLanguage/${t}`,{method:"POST",apiUrl:e,body:{text:n}}),computeSimilarity:async(t,n,r,i,o)=>h(`/ComputeSimilarity/${t}`,{method:"POST",apiUrl:e,body:{referenceText:n,referenceTextType:r,comparisonText:i,comparisonTextType:o}}),checkWords:async(t,n)=>h(`/CheckWords/${t}`,{method:"POST",apiUrl:e,body:{text:n}})}),I=e=>({getPeople:async t=>h(`/People/${t}`,{method:"GET",apiUrl:e}),getPerson:async(t,n)=>h(`/Person/${t}/${n}`,{method:"GET",apiUrl:e}),patchPerson:async(t,n)=>h(`/Person/${t}/${n.personID}`,{method:"PATCH",body:n,apiUrl:e}),deletePerson:async(t,n)=>h(`/Person/${t}/${n}`,{method:"DELETE",apiUrl:e}),postPerson:async(t,n)=>h(`/Person/${t}`,{method:"POST",body:n,apiUrl:e})}),O=e=>({getPromptedQuestions:async t=>h(`/PromptedQuestions/${t}`,{method:"GET",apiUrl:e}),getPromptedQuestion:async(t,n)=>h(`/PromptedQuestion/${t}/${n}`,{method:"GET",apiUrl:e}),patchPromptedQuestion:async(t,n)=>h(`/PromptedQuestion/${t}/${n}`,{method:"GET",apiUrl:e}),deletePromptedQuestion:async(t,n)=>h(`/PromptedQuestion/${t}/${n}`,{method:"GET",apiUrl:e}),postPromptedQuestion:async t=>h(`/PromptedQuestion/${t}`,{method:"GET",apiUrl:e})}),R=e=>({searchMemory:async(t,n)=>h(`/Search/${t}`,{method:"POST",body:n,apiUrl:e}),postRandom:async t=>h(`/Random/${t}`,{method:"POST",apiUrl:e}),postHints:async t=>h(`/Hints/${t}`,{method:"GET",apiUrl:e})}),P=e=>({initSession:async t=>h("/Session",{method:"POST",body:t,apiUrl:e}),getSession:async t=>h(`/Session/${t}`,{method:"GET",apiUrl:e}),deleteSession:async t=>h(`/Session/${t}`,{method:"DELETE",apiUrl:e})}),N=e=>({getStatistics:async t=>h(`/Statistics/${t}`,{method:"GET",apiUrl:e}),getContentQualityIndexes:async t=>h(`/ContentQualityIndexes/${t}`,{method:"GET",apiUrl:e}),getTextQualityIndexes:async t=>h(`/TextQualityIndexes/${t}`,{method:"GET",apiUrl:e}),getEventLogs:async(t,n,r)=>h(`/EventLogs/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),getMemoryEventLogs:async(t,n,r,i)=>h(`/EventLogs/${t}/${n}/${r}/${i}`,{method:"GET",apiUrl:e}),getIntentEventLogs:async(t,n,r,i)=>h(`/EventLogs/${t}/${n}/${r}/${i}`,{method:"GET",apiUrl:e})}),L=e=>({getUnansweredQuestions:async t=>h(`/UnansweredQuestions/${t}`,{method:"GET",apiUrl:e}),getUnansweredQuestionsPaginated:async(t,n,r)=>h(`/UnansweredQuestions/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),postUnansweredQuestion:async(t,n)=>h(`/UnansweredQuestion/${t}`,{method:"POST",apiUrl:e,body:n}),deleteUnansweredQuestion:async(t,n)=>h(`/UnansweredQuestion/${t}/${n}`,{method:"DELETE",apiUrl:e})}),D=e=>({getContextVars:async t=>h(`/ContextVars/${t}`,{method:"GET",apiUrl:e}),getContextVarNames:async t=>h(`/ContextVarNames/${t}`,{method:"GET",apiUrl:e}),getContextVarValues:async(t,n)=>h(`/ContextVarValues/${t}/${n}`,{method:"GET",apiUrl:e})}),B=e=>({getCustomWords:async t=>h(`/CustomWords/${t}`,{method:"GET",apiUrl:e}),getCustomWord:async(t,n)=>h(`/CustomWord/${t}/${n}`,{method:"GET",apiUrl:e}),deleteCustomWord:async(t,n)=>h(`/CustomWord/${t}/${n}`,{method:"DELETE",apiUrl:e}),postCustomWord:async(t,n)=>h(`/CustomWord/${t}`,{method:"POST",apiUrl:e,body:n}),patchCustomWord:async(t,n)=>h(`/CustomWord/${t}/${n.customWordID}`,{method:"PATCH",apiUrl:e,body:n})}),j=e=>({getChatLogs:async(t,n,r)=>h(`/ChatLogs/${t}${n?`/${n}`:""}${n&&r?`/${r}`:""}`,{method:"GET",apiUrl:e}),getSessionChatLogs:async(t,n)=>h(`/SessionChatLogs/${t}/${n}`,{method:"GET",apiUrl:e}),deleteChatLogs:async(t,n,r)=>h(`/ChatLogs/${t}${n?`/${n}`:""}${n&&r?`/${r}`:""}`,{method:"DELETE",apiUrl:e}),deleteChatLog:async(t,n)=>h(`/ChatLog/${t}/${n}`,{method:"DELETE",apiUrl:e})}),F=e=>({getExpertReferences:async t=>h(`/ExpertReferences/${t}`,{method:"GET",apiUrl:e}),getExpertReferencesPaginated:async(t,n,r)=>h(`/ExpertReferences/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),getExpertReference:async(t,n)=>h(`/ExpertReference/${t}/${n}`,{method:"GET",apiUrl:e}),updateExpertReference:async(t,n)=>h(`/ExpertReference/${t}/${n.expertID}`,{method:"PATCH",apiUrl:e,body:n}),createExpertReference:async(t,n)=>h(`/ExpertReference/${t}`,{method:"POST",apiUrl:e,body:n}),deleteExpertReference:async(t,n)=>h(`/ExpertReference/${t}/${n}`,{method:"DELETE",apiUrl:e})}),U=e=>({correlationPairs:M(e),...M(e),dialog:_(e),..._(e),intents:A(e),...A(e),localizationKeys:E(e),...E(e),media:C(e),...C(e),memories:k(e),...k(e),nlp:T(e),...T(e),people:I(e),...I(e),promptedQuestions:O(e),...O(e),search:R(e),...R(e),session:P(e),...P(e),stats:N(e),...N(e),unansweredQuestions:L(e),...L(e),contextVars:D(e),...D(e),customDictionary:B(e),...B(e),chatLogs:j(e),...j(e),expertReferences:F(e),...F(e)}),z={};e(z,"allowedMediaTypes",(()=>H)),e(z,"anonTag",(()=>V));const H=["image/jpeg","image/png","image/jpg","image/gif","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/pdf","video/mp4","video/avi","audio/mpeg3","audio/wav","audio/mpeg","video/mpeg","model/gltf-binary"],V="👤";var W=e=>({getResourceUrl:({type:t,resourceURI:n,sessionID:r,baseURL:i="https://app.twincreator.com"})=>{let o="cover"===t?`${i}/images/memoriCover.png`:`${i}/images/memoriAvatar.png`;return n&&0!==n.length?n.includes("memoriai/memory")?`${n}?memori-ai-session-id=${r}`:n.startsWith("https://")||n.startsWith("http://")?`${n}${r?`/${r}`:""}`:n.startsWith("cloud://")?`${e.replace(/v2/,"v1")}/CloudAsset/${n.replace("cloud://","")}`:n.startsWith("guid://")?`${e.replace(/v2/,"v1")}/GuidAsset/${n.replace("guid://","")}`:o:o}});var G=e=>{const t=d(e),n=`${t}/memori/v2`,r=`${t}/api/v2`;return{backend:S(r),...U(n),constants:{...z,HOSTNAME:t,BACKEND_URL:r,ENGINE_URL:n},asset:W(r)}},q=(u=a("85Hg2"),{}),K={};(K=function(e){if(Array.isArray(e))return e}).__esModule=!0,K.default=K;var Y={};(Y=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}).__esModule=!0,Y.default=Y;var J={},Q={};(Q=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}).__esModule=!0,Q.default=Q,J=function(e,t){if(e){if("string"==typeof e)return Q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q(e,t):void 0}},J.__esModule=!0,J.default=J;var X={};(X=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}).__esModule=!0,X.default=X,(q=function(e,t){return K(e)||Y(e,t)||J(e,t)||X()}).__esModule=!0,q.default=q;var Z={},$={},ee={};function te(e){return ee=te="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},ee.__esModule=!0,ee.default=ee,te(e)}(ee=te).__esModule=!0,ee.default=ee;var ne=ee.default,re={},ie=ee.default;(re=function(e,t){if("object"!==ie(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==ie(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}).__esModule=!0,re.default=re,($=function(e){var t=re(e,"string");return"symbol"===ne(t)?t:String(t)}).__esModule=!0,$.default=$,(Z=function(e,t,n){return(t=$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}).__esModule=!0,Z.default=Z;u=a("85Hg2");var oe={};(oe=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}).__esModule=!0,oe.default=oe;var ae={};function se(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)}}(ae=function(e,t,n){return t&&se(e.prototype,t),n&&se(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}).__esModule=!0,ae.default=ae;u=a("85Hg2");var le=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ce={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},ue=function(e){return ce[e]};var de,fe={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(le,ue)}},he=(0,u.createContext)();function pe(){return fe}var me=function(){function e(){r(oe)(this,e),this.usedNamespaces={}}return r(ae)(e,[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function ge(){return de}function ve(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"string"==typeof n[0]&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var ye={};function be(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&ye[t[0]]||("string"==typeof t[0]&&(ye[t[0]]=new Date),ve.apply(void 0,t))}function we(e,t,n){e.loadNamespaces(t,(function(){if(e.isInitialized)n();else{e.on("initialized",(function t(){setTimeout((function(){e.off("initialized",t)}),0),n()}))}}))}function xe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.languages[0],i=!!t.options&&t.options.fallbackLng,o=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e))&&(!!t.hasResourceBundle(r,e)||(!(t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages))||!(!a(r,e)||i&&!a(o,e))))}function Se(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t.languages||!t.languages.length)return be("i18n.languages were undefined or empty",t.languages),!0;var r=void 0!==t.options.ignoreJSONStructure;return r?t.hasLoadedNamespace(e,{precheck:function(t,r){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):xe(e,t,n)}function Me(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){r(Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ee=function(e,t){var n=(0,u.useRef)();return(0,u.useEffect)((function(){n.current=t?n.current:e}),[e,t]),n.current};function Ce(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.i18n,i=(0,u.useContext)(he)||{},o=i.i18n,a=i.defaultNS,s=n||o||ge();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new me),!s){be("You will need to pass in an i18next instance by using initReactI18next");var l=function(e){return Array.isArray(e)?e[e.length-1]:e},c=[l,{},!1];return c.t=l,c.i18n={},c.ready=!1,c}s.options.react&&void 0!==s.options.react.wait&&be("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var d=Ae(Ae(Ae({},pe()),s.options.react),t),f=d.useSuspense,h=d.keyPrefix,p=e||a||s.options&&s.options.defaultNS;p="string"==typeof p?[p]:p||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(p);var m=(s.isInitialized||s.initializedStoreOnce)&&p.every((function(e){return Se(e,s,d)}));function g(){return s.getFixedT(null,"fallback"===d.nsMode?p:p[0],h)}var v=(0,u.useState)(g),y=r(q)(v,2),b=y[0],w=y[1],x=p.join(),S=Ee(x),M=(0,u.useRef)(!0);(0,u.useEffect)((function(){var e=d.bindI18n,t=d.bindI18nStore;function n(){M.current&&w(g)}return M.current=!0,m||f||we(s,p,(function(){M.current&&w(g)})),m&&S&&S!==x&&M.current&&w(g),e&&s&&s.on(e,n),t&&s&&s.store.on(t,n),function(){M.current=!1,e&&s&&e.split(" ").forEach((function(e){return s.off(e,n)})),t&&s&&t.split(" ").forEach((function(e){return s.store.off(e,n)}))}}),[s,x]);var _=(0,u.useRef)(!0);(0,u.useEffect)((function(){M.current&&!_.current&&w(g),_.current=!1}),[s,h]);var A=[b,s,m];if(A.t=b,A.i18n=s,A.ready=m,m)return A;if(!m&&!f)return A;throw new Promise((function(e){we(s,p,(function(){e()}))}))}var ke={};!function(e,t,n,r){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(t),a=i(n),s=i(r),l=function(e,t,n){return{endTime:t,insertTime:n,type:"exponentialRampToValue",value:e}},c=function(e,t,n){return{endTime:t,insertTime:n,type:"linearRampToValue",value:e}},u=function(e,t){return{startTime:t,type:"setValue",value:e}},d=function(e,t,n){return{duration:n,startTime:t,type:"setValueCurve",values:e}},f=function(e,t,n){var r=n.startTime,i=n.target,o=n.timeConstant;return i+(t-i)*Math.exp((r-e)/o)},h=function(e){return"exponentialRampToValue"===e.type},p=function(e){return"linearRampToValue"===e.type},m=function(e){return h(e)||p(e)},g=function(e){return"setValue"===e.type},v=function(e){return"setValueCurve"===e.type},y=function e(t,n,r,i){var o=t[n];return void 0===o?i:m(o)||g(o)?o.value:v(o)?o.values[o.values.length-1]:f(r,e(t,n-1,o.startTime,i),o)},b=function(e,t,n,r,i){return void 0===n?[r.insertTime,i]:m(n)?[n.endTime,n.value]:g(n)?[n.startTime,n.value]:v(n)?[n.startTime+n.duration,n.values[n.values.length-1]]:[n.startTime,y(e,t-1,n.startTime,i)]},w=function(e){return"cancelAndHold"===e.type},x=function(e){return"cancelScheduledValues"===e.type},S=function(e){return w(e)||x(e)?e.cancelTime:h(e)||p(e)?e.endTime:e.startTime},M=function(e,t,n,r){var i=r.endTime,o=r.value;return n===o?o:0<n&&0<o||n<0&&o<0?n*Math.pow(o/n,(e-t)/(i-t)):0},_=function(e,t,n,r){return n+(e-t)/(r.endTime-t)*(r.value-n)},A=function(e,t){var n=Math.floor(t),r=Math.ceil(t);return n===r?e[n]:(1-(t-n))*e[n]+(1-(r-t))*e[r]},E=function(e,t){var n=t.duration,r=t.startTime,i=t.values,o=(e-r)/n*(i.length-1);return A(i,o)},C=function(e){return"setTarget"===e.type},k=function(e){function t(e){a.default(this,t),this._automationEvents=[],this._currenTime=0,this._defaultValue=e}return s.default(t,[{key:e,value:function(){return this._automationEvents[Symbol.iterator]()}},{key:"add",value:function(e){var t=S(e);if(w(e)||x(e)){var n=this._automationEvents.findIndex((function(n){return x(e)&&v(n)?n.startTime+n.duration>=t:S(n)>=t})),r=this._automationEvents[n];if(-1!==n&&(this._automationEvents=this._automationEvents.slice(0,n)),w(e)){var i=this._automationEvents[this._automationEvents.length-1];if(void 0!==r&&m(r)){if(C(i))throw new Error("The internal list is malformed.");var o=v(i)?i.startTime+i.duration:S(i),a=v(i)?i.values[i.values.length-1]:i.value,s=h(r)?M(t,o,a,r):_(t,o,a,r),f=h(r)?l(s,t,this._currenTime):c(s,t,this._currenTime);this._automationEvents.push(f)}void 0!==i&&C(i)&&this._automationEvents.push(u(this.getValue(t),t)),void 0!==i&&v(i)&&i.startTime+i.duration>t&&(this._automationEvents[this._automationEvents.length-1]=d(new Float32Array([6,7]),i.startTime,t-i.startTime))}}else{var g=this._automationEvents.findIndex((function(e){return S(e)>t})),y=-1===g?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[g-1];if(void 0!==y&&v(y)&&S(y)+y.duration>t)return!1;var b=h(e)?l(e.value,e.endTime,this._currenTime):p(e)?c(e.value,t,this._currenTime):e;if(-1===g)this._automationEvents.push(b);else{if(v(e)&&t+e.duration>S(this._automationEvents[g]))return!1;this._automationEvents.splice(g,0,b)}}return!0}},{key:"flush",value:function(e){var t=this._automationEvents.findIndex((function(t){return S(t)>e}));if(t>1){var n=this._automationEvents.slice(t-1),r=n[0];C(r)&&n.unshift(u(y(this._automationEvents,t-2,r.startTime,this._defaultValue),r.startTime)),this._automationEvents=n}}},{key:"getValue",value:function(e){if(0===this._automationEvents.length)return this._defaultValue;var t=this._automationEvents.findIndex((function(t){return S(t)>e})),n=this._automationEvents[t],r=(-1===t?this._automationEvents.length:t)-1,i=this._automationEvents[r];if(void 0!==i&&C(i)&&(void 0===n||!m(n)||n.insertTime>e))return f(e,y(this._automationEvents,r-1,i.startTime,this._defaultValue),i);if(void 0!==i&&g(i)&&(void 0===n||!m(n)))return i.value;if(void 0!==i&&v(i)&&(void 0===n||!m(n)||i.startTime+i.duration>e))return e<i.startTime+i.duration?E(e,i):i.values[i.values.length-1];if(void 0!==i&&m(i)&&(void 0===n||!m(n)))return i.value;if(void 0!==n&&h(n)){var a=b(this._automationEvents,r,i,n,this._defaultValue),s=o.default(a,2),l=s[0],c=s[1];return M(e,l,c,n)}if(void 0!==n&&p(n)){var u=b(this._automationEvents,r,i,n,this._defaultValue),d=o.default(u,2),w=d[0],x=d[1];return _(e,w,x,n)}return this._defaultValue}}]),t}(Symbol.iterator),T=function(e){return{cancelTime:e,type:"cancelAndHold"}},I=function(e){return{cancelTime:e,type:"cancelScheduledValues"}},O=function(e,t){return{endTime:t,type:"exponentialRampToValue",value:e}},R=function(e,t){return{endTime:t,type:"linearRampToValue",value:e}},P=function(e,t,n){return{startTime:t,target:e,timeConstant:n,type:"setTarget"}};e.AutomationEventList=k,e.createCancelAndHoldAutomationEvent=T,e.createCancelScheduledValuesAutomationEvent=I,e.createExponentialRampToValueAutomationEvent=O,e.createLinearRampToValueAutomationEvent=R,e.createSetTargetAutomationEvent=P,e.createSetValueAutomationEvent=u,e.createSetValueCurveAutomationEvent=d,Object.defineProperty(e,"__esModule",{value:!0})}(ke,a("kagof"),a("4qTFT"),a("9uC66"));const Te=new WeakSet,Ie=new WeakMap,Oe=new WeakMap,Re=new WeakMap,Pe=new WeakMap,Ne=new WeakMap,Le=new WeakMap,De=new WeakMap,Be=new WeakMap,je=new WeakMap,Fe={construct:()=>Fe},Ue=e=>{try{new new Proxy(e,Fe)}catch{return!1}return!0},ze=/^import(?:(?:[\s]+[\w]+|(?:[\s]+[\w]+[\s]*,)?[\s]*\{[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?(?:[\s]*,[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?)*[\s]*}|(?:[\s]+[\w]+[\s]*,)?[\s]*\*[\s]+as[\s]+[\w]+)[\s]+from)?(?:[\s]*)("([^"\\]|\\.)+"|'([^'\\]|\\.)+')(?:[\s]*);?/,He=(e,t)=>{const n=[];let r=e.replace(/^[\s]+/,""),i=r.match(ze);for(;null!==i;){const e=i[1].slice(1,-1),o=i[0].replace(/([\s]+)?;?$/,"").replace(e,new URL(e,t).toString());n.push(o),r=r.slice(i[0].length).replace(/^[\s]+/,""),i=r.match(ze)}return[n.join(";"),r]},Ve=e=>{if(void 0!==e&&!Array.isArray(e))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},We=e=>{if(!Ue(e))throw new TypeError("The given value for processorCtor should be a constructor.");if(null===e.prototype||"object"!=typeof e.prototype)throw new TypeError("The given value for processorCtor should have a prototype.")},Ge=(e,t)=>{const n=e.get(t);if(void 0===n)throw new Error("A value with the given key could not be found.");return n},qe=(e,t)=>{const n=Array.from(e).filter(t);if(n.length>1)throw Error("More than one element was found.");if(0===n.length)throw Error("No element was found.");const[r]=n;return e.delete(r),r},Ke=(e,t,n,r)=>{const i=Ge(e,t),o=qe(i,(e=>e[0]===n&&e[1]===r));return 0===i.size&&e.delete(t),o},Ye=e=>Ge(Le,e),Je=e=>{if(Te.has(e))throw new Error("The AudioNode is already stored.");Te.add(e),Ye(e).forEach((e=>e(!0)))},Qe=e=>"port"in e,Xe=e=>{if(!Te.has(e))throw new Error("The AudioNode is not stored.");Te.delete(e),Ye(e).forEach((e=>e(!1)))},Ze=(e,t)=>{!Qe(e)&&t.every((e=>0===e.size))&&Xe(e)},$e={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},et=(e,t)=>e.context===t,tt=e=>{try{e.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},nt=()=>new DOMException("","IndexSizeError"),rt=e=>{var t;e.getChannelData=(t=e.getChannelData,n=>{try{return t.call(e,n)}catch(e){if(12===e.code)throw nt();throw e}})},it={numberOfChannels:1},ot=-34028234663852886e22,at=34028234663852886e22,st=e=>Te.has(e),lt={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},ct=e=>"playbackRate"in e,ut=e=>"frequency"in e&&"gain"in e,dt=e=>"offset"in e,ft=e=>!("frequency"in e)&&"gain"in e,ht=e=>"detune"in e&&"frequency"in e,pt=e=>"pan"in e,mt=e=>Ge(Ie,e),gt=e=>Ge(Re,e),vt=(e,t)=>{const{activeInputs:n}=mt(e);n.forEach((n=>n.forEach((([n])=>{t.includes(e)||vt(n,[...t,e])}))));const r=ct(e)?[e.playbackRate]:Qe(e)?Array.from(e.parameters.values()):ut(e)?[e.Q,e.detune,e.frequency,e.gain]:dt(e)?[e.offset]:ft(e)?[e.gain]:ht(e)?[e.detune,e.frequency]:pt(e)?[e.pan]:[];for(const e of r){const n=gt(e);void 0!==n&&n.activeInputs.forEach((([e])=>vt(e,t)))}st(e)&&Xe(e)},yt=e=>{vt(e.destination,[])},bt=e=>void 0===e||"number"==typeof e||"string"==typeof e&&("balanced"===e||"interactive"===e||"playback"===e),wt=e=>"context"in e,xt=e=>wt(e[0]),St=(e,t,n,r)=>{for(const t of e)if(n(t)){if(r)return!1;throw Error("The set contains at least one similar element.")}return e.add(t),!0},Mt=(e,t,[n,r],i)=>{St(e,[t,n,r],(e=>e[0]===t&&e[1]===n),i)},_t=(e,[t,n,r],i)=>{const o=e.get(t);void 0===o?e.set(t,new Set([[n,r]])):St(o,[n,r],(e=>e[0]===n),i)},At=e=>"inputs"in e,Et=(e,t,n,r)=>{if(At(t)){const i=t.inputs[r];return e.connect(i,n,0),[i,n,0]}return e.connect(t,n,r),[t,n,r]},Ct=(e,t,n)=>{for(const r of e)if(r[0]===t&&r[1]===n)return e.delete(r),r;return null},kt=(e,t,n)=>qe(e,(e=>e[0]===t&&e[1]===n)),Tt=(e,t)=>{if(!Ye(e).delete(t))throw new Error("Missing the expected event listener.")},It=(e,t,n)=>{const r=Ge(e,t),i=qe(r,(e=>e[0]===n));return 0===r.size&&e.delete(t),i},Ot=(e,t,n,r)=>{At(t)?e.disconnect(t.inputs[r],n,0):e.disconnect(t,n,r)},Rt=e=>Ge(Oe,e),Pt=e=>Ge(Pe,e),Nt=e=>De.has(e),Lt=e=>!Te.has(e),Dt=(e,t)=>new Promise((n=>{if(null!==t)n(!0);else{const t=e.createScriptProcessor(256,1,1),r=e.createGain(),i=e.createBuffer(1,2,44100),o=i.getChannelData(0);o[0]=1,o[1]=1;const a=e.createBufferSource();a.buffer=i,a.loop=!0,a.connect(t).connect(e.destination),a.connect(r),a.disconnect(r),t.onaudioprocess=r=>{const i=r.inputBuffer.getChannelData(0);Array.prototype.some.call(i,(e=>1===e))?n(!0):n(!1),a.stop(),t.onaudioprocess=null,a.disconnect(t),t.disconnect(e.destination)},a.start()}})),Bt=(e,t)=>{const n=new Map;for(const t of e)for(const e of t){const t=n.get(e);n.set(e,void 0===t?1:t+1)}n.forEach(((e,n)=>t(n,e)))},jt=e=>"context"in e,Ft=e=>{const t=new Map;var n,r;e.connect=(n=e.connect.bind(e),(e,r=0,i=0)=>{const o=jt(e)?n(e,r,i):n(e,r),a=t.get(e);return void 0===a?t.set(e,[{input:i,output:r}]):a.every((e=>e.input!==i||e.output!==r))&&a.push({input:i,output:r}),o}),e.disconnect=(r=e.disconnect,(n,i,o)=>{if(r.apply(e),void 0===n)t.clear();else if("number"==typeof n)for(const[e,r]of t){const i=r.filter((e=>e.output!==n));0===i.length?t.delete(e):t.set(e,i)}else if(t.has(n))if(void 0===i)t.delete(n);else{const e=t.get(n);if(void 0!==e){const r=e.filter((e=>e.output!==i&&(e.input!==o||void 0===o)));0===r.length?t.delete(n):t.set(n,r)}}for(const[n,r]of t)r.forEach((t=>{jt(n)?e.connect(n,t.output,t.input):e.connect(n,t.output)}))})},Ut=(e,t,n,r)=>{const{activeInputs:i,passiveInputs:o}=gt(t),{outputs:a}=mt(e),s=Ye(e),l=a=>{const s=Rt(e),l=Pt(t);if(a){const t=It(o,e,n);Mt(i,e,t,!1),r||Nt(e)||s.connect(l,n)}else{const t=kt(i,e,n);_t(o,t,!1),r||Nt(e)||s.disconnect(l,n)}};return!!St(a,[t,n],(e=>e[0]===t&&e[1]===n),!0)&&(s.add(l),st(e)?Mt(i,e,[n,l],!0):_t(o,[e,n,l],!0),!0)},zt=(e,t,n,r,i)=>{const[o,a]=((e,t,n,r)=>{const{activeInputs:i,passiveInputs:o}=mt(t),a=Ct(i[r],e,n);if(null===a)return[Ke(o,e,n,r)[2],!1];return[a[2],!0]})(e,n,r,i);if(null!==o&&(Tt(e,o),!a||t||Nt(e)||Ot(Rt(e),Rt(n),r,i)),st(n)){const{activeInputs:e}=mt(n);Ze(n,e)}},Ht=(e,t,n,r)=>{const[i,o]=((e,t,n)=>{const{activeInputs:r,passiveInputs:i}=gt(t),o=Ct(r,e,n);if(null===o)return[It(i,e,n)[1],!1];return[o[2],!0]})(e,n,r);null!==i&&(Tt(e,i),!o||t||Nt(e)||Rt(e).disconnect(Pt(n),r))};class Vt{constructor(e){this._map=new Map(e)}get size(){return this._map.size}entries(){return this._map.entries()}forEach(e,t=null){return this._map.forEach(((n,r)=>e.call(t,n,r,this)))}get(e){return this._map.get(e)}has(e){return this._map.has(e)}keys(){return this._map.keys()}values(){return this._map.values()}}const Wt={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,parameterData:{},processorOptions:{}};function Gt(e,t,n,r,i){if("function"==typeof e.copyFromChannel)0===t[n].byteLength&&(t[n]=new Float32Array(128)),e.copyFromChannel(t[n],r,i);else{const o=e.getChannelData(r);if(0===t[n].byteLength)t[n]=o.slice(i,i+128);else{const e=new Float32Array(o.buffer,i*Float32Array.BYTES_PER_ELEMENT,128);t[n].set(e)}}}const qt=(e,t,n,r,i)=>{"function"==typeof e.copyToChannel?0!==t[n].byteLength&&e.copyToChannel(t[n],r,i):0!==t[n].byteLength&&e.getChannelData(r).set(t[n],i)},Kt=(e,t)=>{const n=[];for(let r=0;r<e;r+=1){const e=[],i="number"==typeof t?t:t[r];for(let t=0;t<i;t+=1)e.push(new Float32Array(128));n.push(e)}return n},Yt=(e,t)=>{const n=Ge(je,e),r=Rt(t);return Ge(n,r)},Jt=async(e,t,n,r,i,o,a)=>{const s=null===t?128*Math.ceil(e.context.length/128):t.length,l=r.channelCount*r.numberOfInputs,c=i.reduce(((e,t)=>e+t),0),u=0===c?null:n.createBuffer(c,s,n.sampleRate);if(void 0===o)throw new Error("Missing the processor constructor.");const d=mt(e),f=await Yt(n,e),h=Kt(r.numberOfInputs,r.channelCount),p=Kt(r.numberOfOutputs,i),m=Array.from(e.parameters.keys()).reduce(((e,t)=>({...e,[t]:new Float32Array(128)})),{});for(let c=0;c<s;c+=128){if(r.numberOfInputs>0&&null!==t)for(let e=0;e<r.numberOfInputs;e+=1)for(let n=0;n<r.channelCount;n+=1)Gt(t,h[e],n,n,c);void 0!==o.parameterDescriptors&&null!==t&&o.parameterDescriptors.forEach((({name:e},n)=>{Gt(t,m,e,l+n,c)}));for(let e=0;e<r.numberOfInputs;e+=1)for(let t=0;t<i[e];t+=1)0===p[e][t].byteLength&&(p[e][t]=new Float32Array(128));try{const e=h.map(((e,t)=>0===d.activeInputs[t].size?[]:e)),t=a(c/n.sampleRate,n.sampleRate,(()=>f.process(e,p,m)));if(null!==u)for(let e=0,t=0;e<r.numberOfOutputs;e+=1){for(let n=0;n<i[e];n+=1)qt(u,p[e],n,t+n,c);t+=i[e]}if(!t)break}catch(t){e.dispatchEvent(new ErrorEvent("processorerror",{colno:t.colno,filename:t.filename,lineno:t.lineno,message:t.message}));break}}return u},Qt={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},Xt={channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6},Zt={channelCount:6,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:6},$t={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},en={buffer:null,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",disableNormalization:!1},tn=e=>{const{port1:t,port2:n}=new MessageChannel;return new Promise((r=>{const i=()=>{n.onmessage=null,t.close(),n.close(),r()};n.onmessage=()=>i();try{t.postMessage(e,[e])}finally{i()}}))},nn={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},rn=e=>"delayTime"in e,on=(e,t,n)=>{const r=t[n];if(void 0===r)throw e();return r},an={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},sn={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},ln=()=>new DOMException("","InvalidStateError"),cn=()=>new DOMException("","InvalidAccessError"),un=e=>{var t;e.getFrequencyResponse=(t=e.getFrequencyResponse,(n,r,i)=>{if(n.length!==r.length||r.length!==i.length)throw cn();return t.call(e,n,r,i)})},dn={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},fn=(e,t,n,r,i,o,a,s,l,c,u)=>{const d=c.length;let f=s;for(let s=0;s<d;s+=1){let d=n[0]*c[s];for(let t=1;t<i;t+=1){const r=f-t&l-1;d+=n[t]*o[r],d-=e[t]*a[r]}for(let e=i;e<r;e+=1)d+=n[e]*o[f-e&l-1];for(let n=i;n<t;n+=1)d-=e[n]*a[f-n&l-1];o[f]=c[s],a[f]=d,f=f+1&l-1,u[s]=d}return f},hn={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers"},pn=e=>{const t=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const n=e.decodeAudioData(t.buffer,(()=>{}));return void 0!==n&&(n.catch((()=>{})),!0)}catch{}return!1},mn={numberOfChannels:1},gn=(e,t,n)=>{const r=t[n];void 0!==r&&r!==e[n]&&(e[n]=r)},vn=(e,t)=>{gn(e,t,"channelCount"),gn(e,t,"channelCountMode"),gn(e,t,"channelInterpretation")},yn=e=>"function"==typeof e.getFloatTimeDomainData,bn=(e,t,n)=>{const r=t[n];void 0!==r&&r!==e[n].value&&(e[n].value=r)},wn=e=>{e.start=(t=>{let n=!1;return(r=0,i=0,o)=>{if(n)throw ln();t.call(e,r,i,o),n=!0}})(e.start)},xn=e=>{var t;e.start=(t=e.start,(n=0,r=0,i)=>{if("number"==typeof i&&i<0||r<0||n<0)throw new RangeError("The parameters can't be negative.");t.call(e,n,r,i)})},Sn=e=>{var t;e.stop=(t=e.stop,(n=0)=>{if(n<0)throw new RangeError("The parameter can't be negative.");t.call(e,n)})},Mn=e=>{const{port1:t}=new MessageChannel;try{t.postMessage(e)}finally{t.close()}},_n=(e,t)=>null===e?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(e*t))))),An=e=>new Promise(((t,n)=>{const{port1:r,port2:i}=new MessageChannel;r.onmessage=({data:e})=>{r.close(),i.close(),t(e)},r.onmessageerror=({data:e})=>{r.close(),i.close(),n(e)},i.postMessage(e)})),En=async(e,t)=>new e(await An(t)),Cn=(e,t,n,r)=>{let i=je.get(e);void 0===i&&(i=new WeakMap,je.set(e,i));const o=En(n,r);return i.set(t,o),o},kn=(e,t)=>{const n=e.createBiquadFilter();return vn(n,t),bn(n,t,"Q"),bn(n,t,"detune"),bn(n,t,"frequency"),bn(n,t,"gain"),gn(n,t,"type"),n},Tn=e=>{const t=e.numberOfOutputs;Object.defineProperty(e,"channelCount",{get:()=>t,set:e=>{if(e!==t)throw ln()}}),Object.defineProperty(e,"channelCountMode",{get:()=>"explicit",set:e=>{if("explicit"!==e)throw ln()}}),Object.defineProperty(e,"channelInterpretation",{get:()=>"discrete",set:e=>{if("discrete"!==e)throw ln()}})},In=(e,t)=>{const n=e.createChannelSplitter(t.numberOfOutputs);return vn(n,t),Tn(n),n},On=(e,t)=>(e.connect=t.connect.bind(t),e.disconnect=t.disconnect.bind(t),e),Rn=(e,t)=>{const n=e.createDelay(t.maxDelayTime);return vn(n,t),bn(n,t,"delayTime"),n},Pn=(e,t)=>{const n=e.createGain();return vn(n,t),bn(n,t,"gain"),n};function Nn(e,t){const n=t[0]*t[0]+t[1]*t[1];return[(e[0]*t[0]+e[1]*t[1])/n,(e[1]*t[0]-e[0]*t[1])/n]}function Ln(e,t){let n=[0,0];for(let o=e.length-1;o>=0;o-=1)i=t,n=[(r=n)[0]*i[0]-r[1]*i[1],r[0]*i[1]+r[1]*i[0]],n[0]+=e[o];var r,i;return n}const Dn=(e,t,n,r)=>e.createScriptProcessor(t,n,r),Bn=()=>new DOMException("","NotSupportedError"),jn={numberOfChannels:1},Fn={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,periodicWave:void 0,type:"sine"},Un={channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",coneInnerAngle:360,coneOuterAngle:360,coneOuterGain:0,distanceModel:"inverse",maxDistance:1e4,orientationX:1,orientationY:0,orientationZ:0,panningModel:"equalpower",positionX:0,positionY:0,positionZ:0,refDistance:1,rolloffFactor:1},zn={disableNormalization:!1},Hn={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},Vn=()=>new DOMException("","UnknownError"),Wn={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},Gn=(e,t,n)=>void 0===e.copyFromChannel?e.getChannelData(n)[0]:(e.copyFromChannel(t,n),t[0]),qn=e=>{if(null===e)return!1;const t=e.length;return t%2!=0?0!==e[Math.floor(t/2)]:e[t/2-1]+e[t/2]!==0},Kn=(e,t,n,r)=>{let i=e;for(;!i.hasOwnProperty(t);)i=Object.getPrototypeOf(i);const{get:o,set:a}=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(e,t,{get:n(o),set:r(a)})},Yn=(e,t,n)=>{try{e.setValueAtTime(t,n)}catch(r){if(9!==r.code)throw r;Yn(e,t,n+1e-7)}},Jn=e=>{const t=e.createOscillator();try{t.start(-1)}catch(e){return e instanceof RangeError}return!1},Qn=e=>{const t=e.createBuffer(1,1,44100),n=e.createBufferSource();n.buffer=t,n.start(),n.stop();try{return n.stop(),!0}catch{return!1}},Xn=e=>{const t=e.createOscillator();try{t.stop(-1)}catch(e){return e instanceof RangeError}return!1},Zn=(e,t)=>{const n=t.createGain();e.connect(n);const r=(i=e.disconnect,()=>{i.call(e,n),e.removeEventListener("ended",r)});var i;e.addEventListener("ended",r),On(e,n),e.stop=(t=>{let r=!1;return(i=0)=>{if(r)try{t.call(e,i)}catch{n.gain.setValueAtTime(0,i)}else t.call(e,i),r=!0}})(e.stop)},$n=(e,t)=>n=>{const r={value:e};return Object.defineProperties(n,{currentTarget:r,target:r}),"function"==typeof t?t.call(e,n):t.handleEvent.call(e,n)},er=(tr=St,(e,t,[n,r,i],o)=>{tr(e[r],[t,n,i],(e=>e[0]===t&&e[1]===n),o)});var tr;const nr=(e=>(t,n,[r,i,o],a)=>{const s=t.get(r);void 0===s?t.set(r,new Set([[i,n,o]])):e(s,[i,n,o],(e=>e[0]===i&&e[1]===n),a)})(St),rr=(ir=qe,(e,t,n,r)=>ir(e[r],(e=>e[0]===t&&e[1]===n)));var ir;const or=new WeakMap,ar=(sr=or,e=>{var t;return null!==(t=sr.get(e))&&void 0!==t?t:0});var sr;const lr=(cr=new Map,ur=new WeakMap,(e,t)=>{const n=ur.get(e);if(void 0!==n)return n;const r=cr.get(e);if(void 0!==r)return r;try{const n=t();return n instanceof Promise?(cr.set(e,n),n.catch((()=>!1)).then((t=>(cr.delete(e),ur.set(e,t),t)))):(ur.set(e,n),n)}catch{return ur.set(e,!1),!1}});var cr,ur;const dr="undefined"==typeof window?null:window,fr=(hr=lr,pr=nt,(e,t)=>{const n=e.createAnalyser();if(vn(n,t),!(t.maxDecibels>t.minDecibels))throw pr();return gn(n,t,"fftSize"),gn(n,t,"maxDecibels"),gn(n,t,"minDecibels"),gn(n,t,"smoothingTimeConstant"),hr(yn,(()=>yn(n)))||(e=>{e.getFloatTimeDomainData=t=>{const n=new Uint8Array(t.length);e.getByteTimeDomainData(n);const r=Math.max(n.length,e.fftSize);for(let e=0;e<r;e+=1)t[e]=.0078125*(n[e]-128);return t}})(n),n});var hr,pr;const mr=(gr=mt,e=>{const t=gr(e);if(null===t.renderer)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return t.renderer});var gr;const vr=((e,t,n)=>async(r,i,o)=>{const a=e(r);await Promise.all(a.activeInputs.map(((e,a)=>Array.from(e).map((async([e,s])=>{const l=t(e),c=await l.render(e,i),u=r.context.destination;n(e)||r===u&&n(r)||c.connect(o,s,a)})))).reduce(((e,t)=>[...e,...t]),[]))})(mt,mr,Nt),yr=(br=fr,wr=Rt,xr=vr,()=>{const e=new WeakMap;return{render(t,n){const r=e.get(n);return void 0!==r?Promise.resolve(r):(async(t,n)=>{let r=wr(t);if(!et(r,n)){const e={channelCount:r.channelCount,channelCountMode:r.channelCountMode,channelInterpretation:r.channelInterpretation,fftSize:r.fftSize,maxDecibels:r.maxDecibels,minDecibels:r.minDecibels,smoothingTimeConstant:r.smoothingTimeConstant};r=br(n,e)}return e.set(n,r),await xr(t,n,r),r})(t,n)}}});var br,wr,xr;const Sr=(Mr=Ne,e=>{const t=Mr.get(e);if(void 0===t)throw ln();return t});var Mr;const _r=(e=>null===e?null:e.hasOwnProperty("OfflineAudioContext")?e.OfflineAudioContext:e.hasOwnProperty("webkitOfflineAudioContext")?e.webkitOfflineAudioContext:null)(dr),Ar=(Er=_r,e=>null!==Er&&e instanceof Er);var Er;const Cr=new WeakMap,kr=(Tr=$n,class{constructor(e){this._nativeEventTarget=e,this._listeners=new WeakMap}addEventListener(e,t,n){if(null!==t){let r=this._listeners.get(t);void 0===r&&(r=Tr(this,t),"function"==typeof t&&this._listeners.set(t,r)),this._nativeEventTarget.addEventListener(e,r,n)}}dispatchEvent(e){return this._nativeEventTarget.dispatchEvent(e)}removeEventListener(e,t,n){const r=null===t?void 0:this._listeners.get(t);this._nativeEventTarget.removeEventListener(e,void 0===r?null:r,n)}});var Tr;const Ir=(e=>null===e?null:e.hasOwnProperty("AudioContext")?e.AudioContext:e.hasOwnProperty("webkitAudioContext")?e.webkitAudioContext:null)(dr),Or=(Rr=Ir,e=>null!==Rr&&e instanceof Rr);var Rr;const Pr=(e=>t=>null!==e&&"function"==typeof e.AudioNode&&t instanceof e.AudioNode)(dr),Nr=(e=>t=>null!==e&&"function"==typeof e.AudioParam&&t instanceof e.AudioParam)(dr),Lr=(e=>null===e?null:e.hasOwnProperty("AudioWorkletNode")?e.AudioWorkletNode:null)(dr),Dr=((e,t,n,r,i,o,a,s,l,c,u,d,f,h,p,m)=>class extends c{constructor(t,r,i,o){super(i),this._context=t,this._nativeAudioNode=i;const a=u(t);d(a)&&!0!==n(Dt,(()=>Dt(a,m)))&&Ft(i),Oe.set(this,i),Le.set(this,new Set),"closed"!==t.state&&r&&Je(this),e(this,o,i)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(e){this._nativeAudioNode.channelCount=e}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(e){this._nativeAudioNode.channelCountMode=e}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(e){this._nativeAudioNode.channelInterpretation=e}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(e,n=0,s=0){if(n<0||n>=this._nativeAudioNode.numberOfOutputs)throw i();const c=u(this._context),d=p(c);if(f(e)||h(e))throw o();if(wt(e)){const i=Rt(e);try{const t=Et(this._nativeAudioNode,i,n,s),r=Lt(this);(d||r)&&this._nativeAudioNode.disconnect(...t),"closed"!==this.context.state&&!r&&Lt(e)&&Je(e)}catch(e){if(12===e.code)throw o();throw e}if(t(this,e,n,s,d)){const t=l([this],e);Bt(t,r(d))}return e}const m=Pt(e);if("playbackRate"===m.name&&1024===m.maxValue)throw a();try{this._nativeAudioNode.connect(m,n),(d||Lt(this))&&this._nativeAudioNode.disconnect(m,n)}catch(e){if(12===e.code)throw o();throw e}if(Ut(this,e,n,d)){const t=l([this],e);Bt(t,r(d))}}disconnect(e,t,n){let r;const a=u(this._context),c=p(a);if(void 0===e)r=((e,t)=>{const n=mt(e),r=[];for(const i of n.outputs)xt(i)?zt(e,t,...i):Ht(e,t,...i),r.push(i[0]);return n.outputs.clear(),r})(this,c);else if("number"==typeof e){if(e<0||e>=this.numberOfOutputs)throw i();r=((e,t,n)=>{const r=mt(e),i=[];for(const o of r.outputs)o[1]===n&&(xt(o)?zt(e,t,...o):Ht(e,t,...o),i.push(o[0]),r.outputs.delete(o));return i})(this,c,e)}else{if(void 0!==t&&(t<0||t>=this.numberOfOutputs))throw i();if(wt(e)&&void 0!==n&&(n<0||n>=e.numberOfInputs))throw i();if(r=((e,t,n,r,i)=>{const o=mt(e);return Array.from(o.outputs).filter((e=>!(e[0]!==n||void 0!==r&&e[1]!==r||void 0!==i&&e[2]!==i))).map((n=>(xt(n)?zt(e,t,...n):Ht(e,t,...n),o.outputs.delete(n),n[0])))})(this,c,e,t,n),0===r.length)throw o()}for(const e of r){const t=l([this],e);Bt(t,s)}}})((Br=Ie,(e,t,n)=>{const r=[];for(let e=0;e<n.numberOfInputs;e+=1)r.push(new Set);Br.set(e,{activeInputs:r,outputs:new Set,passiveInputs:new WeakMap,renderer:t})}),((e,t,n,r,i,o,a,s,l,c,u,d,f)=>{const h=new WeakMap;return(p,m,g,v,y)=>{const{activeInputs:b,passiveInputs:w}=o(m),{outputs:x}=o(p),S=s(p),M=o=>{const s=l(m),c=l(p);if(o){const t=Ke(w,p,g,v);e(b,p,t,!1),y||d(p)||n(c,s,g,v),f(m)&&Je(m)}else{const e=r(b,p,g,v);t(w,v,e,!1),y||d(p)||i(c,s,g,v);const n=a(m);if(0===n)u(m)&&Ze(m,b);else{const e=h.get(m);void 0!==e&&clearTimeout(e),h.set(m,setTimeout((()=>{u(m)&&Ze(m,b)}),1e3*n))}}};return!!c(x,[m,g,v],(e=>e[0]===m&&e[1]===g&&e[2]===v),!0)&&(S.add(M),u(p)?e(b,p,[g,v,M],!0):t(w,v,[p,g,M],!0),!0)}})(er,nr,Et,rr,Ot,mt,ar,Ye,Rt,St,st,Nt,Lt),lr,((e,t,n,r,i,o)=>a=>(s,l)=>{const c=e.get(s);if(void 0===c){if(!a&&o(s)){const e=r(s),{outputs:o}=n(s);for(const n of o)if(xt(n)){const i=r(n[0]);t(e,i,n[1],n[2])}else{const t=i(n[0]);e.disconnect(t,n[1])}}e.set(s,l)}else e.set(s,c+l)})(De,Ot,mt,Rt,Pt,st),nt,cn,Bn,((e,t,n,r,i,o,a,s)=>(l,c)=>{const u=t.get(l);if(void 0===u)throw new Error("Missing the expected cycle count.");const d=o(l.context),f=s(d);if(u===c){if(t.delete(l),!f&&a(l)){const t=r(l),{outputs:o}=n(l);for(const n of o)if(xt(n)){const i=r(n[0]);e(t,i,n[1],n[2])}else{const e=i(n[0]);t.connect(e,n[1])}}}else t.set(l,u-c)})(Et,De,mt,Rt,Pt,Sr,st,Ar),((e,t,n)=>function r(i,o){const a=wt(o)?o:n(e,o);if(rn(a))return[];if(i[0]===a)return[i];if(i.includes(a))return[];const{outputs:s}=t(a);return Array.from(s).map((e=>r([...i,a],e[0]))).reduce(((e,t)=>e.concat(t)),[])})(Cr,mt,Ge),kr,Sr,Or,Pr,Nr,Ar,Lr);var Br;const jr=((e,t,n,r,i,o)=>class extends e{constructor(e,n){const a=i(e),s={...$e,...n},l=r(a,s);super(e,!1,l,o(a)?t():null),this._nativeAnalyserNode=l}get fftSize(){return this._nativeAnalyserNode.fftSize}set fftSize(e){this._nativeAnalyserNode.fftSize=e}get frequencyBinCount(){return this._nativeAnalyserNode.frequencyBinCount}get maxDecibels(){return this._nativeAnalyserNode.maxDecibels}set maxDecibels(e){const t=this._nativeAnalyserNode.maxDecibels;if(this._nativeAnalyserNode.maxDecibels=e,!(e>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=t,n()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(e){const t=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=e,!(this._nativeAnalyserNode.maxDecibels>e))throw this._nativeAnalyserNode.minDecibels=t,n()}get smoothingTimeConstant(){return this._nativeAnalyserNode.smoothingTimeConstant}set smoothingTimeConstant(e){this._nativeAnalyserNode.smoothingTimeConstant=e}getByteFrequencyData(e){this._nativeAnalyserNode.getByteFrequencyData(e)}getByteTimeDomainData(e){this._nativeAnalyserNode.getByteTimeDomainData(e)}getFloatFrequencyData(e){this._nativeAnalyserNode.getFloatFrequencyData(e)}getFloatTimeDomainData(e){this._nativeAnalyserNode.getFloatTimeDomainData(e)}})(Dr,yr,nt,fr,Sr,Ar),Fr=new WeakSet,Ur=(e=>null===e?null:e.hasOwnProperty("AudioBuffer")?e.AudioBuffer:null)(dr),zr=(Hr=new Uint32Array(1),e=>(Hr[0]=e,Hr[0]));var Hr;const Vr=((e,t)=>n=>{n.copyFromChannel=(r,i,o=0)=>{const a=e(o),s=e(i);if(s>=n.numberOfChannels)throw t();const l=n.length,c=n.getChannelData(s),u=r.length;for(let e=a<0?-a:0;e+a<l&&e<u;e+=1)r[e]=c[e+a]},n.copyToChannel=(r,i,o=0)=>{const a=e(o),s=e(i);if(s>=n.numberOfChannels)throw t();const l=n.length,c=n.getChannelData(s),u=r.length;for(let e=a<0?-a:0;e+a<l&&e<u;e+=1)c[e+a]=r[e]}})(zr,nt),Wr=(Gr=zr,e=>{var t,n;e.copyFromChannel=(t=e.copyFromChannel,(n,r,i=0)=>{const o=Gr(i),a=Gr(r);if(o<e.length)return t.call(e,n,a,o)}),e.copyToChannel=(n=e.copyToChannel,(t,r,i=0)=>{const o=Gr(i),a=Gr(r);if(o<e.length)return n.call(e,t,a,o)})});var Gr;const qr=((e,t,n,r,i,o,a,s)=>{let l=null;return class c{constructor(c){if(null===i)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:u,numberOfChannels:d,sampleRate:f}={...it,...c};null===l&&(l=new i(1,1,44100));const h=null!==r&&t(o,o)?new r({length:u,numberOfChannels:d,sampleRate:f}):l.createBuffer(d,u,f);if(0===h.numberOfChannels)throw n();return"function"!=typeof h.copyFromChannel?(a(h),rt(h)):t(tt,(()=>tt(h)))||s(h),e.add(h),h}static[Symbol.hasInstance](t){return null!==t&&"object"==typeof t&&Object.getPrototypeOf(t)===c.prototype||e.has(t)}}})(Fr,lr,Bn,Ur,_r,(Kr=Ur,()=>{if(null===Kr)return!1;try{new Kr({length:1,sampleRate:44100})}catch{return!1}return!0}),Vr,Wr);var Kr;const Yr=(Jr=Pn,(e,t)=>{const n=Jr(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});t.connect(n).connect(e.destination);const r=()=>{t.removeEventListener("ended",r),t.disconnect(n),n.disconnect()};t.addEventListener("ended",r)});var Jr;const Qr=(Xr=mr,Zr=gt,$r=Nt,async(e,t,n)=>{const r=Zr(e);await Promise.all(Array.from(r.activeInputs).map((async([e,r])=>{const i=Xr(e),o=await i.render(e,t);$r(e)||o.connect(n,r)})))});var Xr,Zr,$r;const ei=(ti=Qr,(e,t,n)=>ti(t,e,n));var ti;const ni=((e,t,n,r,i,o,a,s,l,c,u)=>(d,f)=>{const h=d.createBufferSource();return vn(h,f),bn(h,f,"playbackRate"),gn(h,f,"buffer"),gn(h,f,"loop"),gn(h,f,"loopEnd"),gn(h,f,"loopStart"),t(n,(()=>n(d)))||wn(h),t(r,(()=>r(d)))||l(h),t(i,(()=>i(d)))||c(h,d),t(o,(()=>o(d)))||xn(h),t(a,(()=>a(d)))||u(h,d),t(s,(()=>s(d)))||Sn(h),e(d,h),h})(Yr,lr,(e=>{const t=e.createBufferSource();t.start();try{t.start()}catch{return!0}return!1}),(e=>{const t=e.createBufferSource(),n=e.createBuffer(1,1,44100);t.buffer=n;try{t.start(0,1)}catch{return!1}return!0}),(e=>{const t=e.createBufferSource();t.start();try{t.stop()}catch{return!1}return!0}),Jn,Qn,Xn,(e=>{var t;e.start=(t=e.start,(n=0,r=0,i)=>{const o=e.buffer,a=null===o?r:Math.min(o.duration,r);null!==o&&a>o.duration-.5/e.context.sampleRate?t.call(e,n,0,0):t.call(e,n,a,i)})}),(ri=Kn,(e,t)=>{const n=t.createBuffer(1,1,44100);null===e.buffer&&(e.buffer=n),ri(e,"buffer",(t=>()=>{const r=t.call(e);return r===n?null:r}),(t=>r=>t.call(e,null===r?n:r)))}),Zn);var ri;const ii=((e,t)=>(n,r,i)=>(e(r).replay(i),t(r,n,i)))((e=>t=>{const n=e(t);if(null===n.renderer)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return n.renderer})(gt),Qr),oi=((e,t,n,r,i)=>()=>{const o=new WeakMap;let a=null,s=null;return{set start(e){a=e},set stop(e){s=e},render(l,c){const u=o.get(c);return void 0!==u?Promise.resolve(u):(async(l,c)=>{let u=n(l);const d=et(u,c);if(!d){const e={buffer:u.buffer,channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,loop:u.loop,loopEnd:u.loopEnd,loopStart:u.loopStart,playbackRate:u.playbackRate.value};u=t(c,e),null!==a&&u.start(...a),null!==s&&u.stop(s)}return o.set(c,u),d?await e(c,l.playbackRate,u.playbackRate):await r(c,l.playbackRate,u.playbackRate),await i(l,c,u),u})(l,c)}}})(ei,ni,Rt,ii,vr),ai=((e,t,n,r,i,o,a,s,l,c,u,d,f)=>(h,p,m,g=null,v=null)=>{const y=new(0,ke.AutomationEventList)(m.defaultValue),b=p?r(y):null,w={get defaultValue(){return m.defaultValue},get maxValue(){return null===g?m.maxValue:g},get minValue(){return null===v?m.minValue:v},get value(){return m.value},set value(e){m.value=e,w.setValueAtTime(e,h.context.currentTime)},cancelAndHoldAtTime(e){if("function"==typeof m.cancelAndHoldAtTime)null===b&&y.flush(h.context.currentTime),y.add(i(e)),m.cancelAndHoldAtTime(e);else{const t=Array.from(y).pop();null===b&&y.flush(h.context.currentTime),y.add(i(e));const n=Array.from(y).pop();m.cancelScheduledValues(e),t!==n&&void 0!==n&&("exponentialRampToValue"===n.type?m.exponentialRampToValueAtTime(n.value,n.endTime):"linearRampToValue"===n.type?m.linearRampToValueAtTime(n.value,n.endTime):"setValue"===n.type?m.setValueAtTime(n.value,n.startTime):"setValueCurve"===n.type&&m.setValueCurveAtTime(n.values,n.startTime,n.duration))}return w},cancelScheduledValues:e=>(null===b&&y.flush(h.context.currentTime),y.add(o(e)),m.cancelScheduledValues(e),w),exponentialRampToValueAtTime(e,t){if(0===e)throw new RangeError;if(!Number.isFinite(t)||t<0)throw new RangeError;return null===b&&y.flush(h.context.currentTime),y.add(a(e,t)),m.exponentialRampToValueAtTime(e,t),w},linearRampToValueAtTime:(e,t)=>(null===b&&y.flush(h.context.currentTime),y.add(s(e,t)),m.linearRampToValueAtTime(e,t),w),setTargetAtTime:(e,t,n)=>(null===b&&y.flush(h.context.currentTime),y.add(l(e,t,n)),m.setTargetAtTime(e,t,n),w),setValueAtTime:(e,t)=>(null===b&&y.flush(h.context.currentTime),y.add(c(e,t)),m.setValueAtTime(e,t),w),setValueCurveAtTime(e,t,n){const r=e instanceof Float32Array?e:new Float32Array(e);if(null!==d&&"webkitAudioContext"===d.name){const e=t+n,i=h.context.sampleRate,o=Math.ceil(t*i),a=Math.floor(e*i),s=a-o,l=new Float32Array(s);for(let e=0;e<s;e+=1){const a=(r.length-1)/n*((o+e)/i-t),s=Math.floor(a),c=Math.ceil(a);l[e]=s===c?r[s]:(1-(a-s))*r[s]+(1-(c-a))*r[c]}null===b&&y.flush(h.context.currentTime),y.add(u(l,t,n)),m.setValueCurveAtTime(l,t,n);const c=a/i;c<e&&f(w,l[l.length-1],c),f(w,r[r.length-1],e)}else null===b&&y.flush(h.context.currentTime),y.add(u(r,t,n)),m.setValueCurveAtTime(r,t,n);return w}};return n.set(w,m),t.set(w,h),e(w,b),w})((si=Re,(e,t)=>{si.set(e,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:t})}),Cr,Pe,(e=>({replay(t){for(const n of e)if("exponentialRampToValue"===n.type){const{endTime:e,value:r}=n;t.exponentialRampToValueAtTime(r,e)}else if("linearRampToValue"===n.type){const{endTime:e,value:r}=n;t.linearRampToValueAtTime(r,e)}else if("setTarget"===n.type){const{startTime:e,target:r,timeConstant:i}=n;t.setTargetAtTime(r,e,i)}else if("setValue"===n.type){const{startTime:e,value:r}=n;t.setValueAtTime(r,e)}else{if("setValueCurve"!==n.type)throw new Error("Can't apply an unknown automation.");{const{duration:e,startTime:r,values:i}=n;t.setValueCurveAtTime(i,r,e)}}}})),ke.createCancelAndHoldAutomationEvent,ke.createCancelScheduledValuesAutomationEvent,ke.createExponentialRampToValueAutomationEvent,ke.createLinearRampToValueAutomationEvent,ke.createSetTargetAutomationEvent,ke.createSetValueAutomationEvent,ke.createSetValueCurveAutomationEvent,Ir,Yn);var si;const li=((e,t,n,r,i,o,a,s)=>class extends e{constructor(e,r){const s=o(e),l={...lt,...r},c=i(s,l),u=a(s),d=u?t():null;super(e,!1,c,d),this._audioBufferSourceNodeRenderer=d,this._isBufferNullified=!1,this._isBufferSet=null!==l.buffer,this._nativeAudioBufferSourceNode=c,this._onended=null,this._playbackRate=n(this,u,c.playbackRate,at,ot)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(e){if(this._nativeAudioBufferSourceNode.buffer=e,null!==e){if(this._isBufferSet)throw r();this._isBufferSet=!0}}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(e){this._nativeAudioBufferSourceNode.loop=e}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(e){this._nativeAudioBufferSourceNode.loopEnd=e}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(e){this._nativeAudioBufferSourceNode.loopStart=e}get onended(){return this._onended}set onended(e){const t="function"==typeof e?s(this,e):null;this._nativeAudioBufferSourceNode.onended=t;const n=this._nativeAudioBufferSourceNode.onended;this._onended=null!==n&&n===t?e:n}get playbackRate(){return this._playbackRate}start(e=0,t=0,n){if(this._nativeAudioBufferSourceNode.start(e,t,n),null!==this._audioBufferSourceNodeRenderer&&(this._audioBufferSourceNodeRenderer.start=void 0===n?[e,t]:[e,t,n]),"closed"!==this.context.state){Je(this);const e=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",e),st(this)&&Xe(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",e)}}stop(e=0){this._nativeAudioBufferSourceNode.stop(e),null!==this._audioBufferSourceNodeRenderer&&(this._audioBufferSourceNodeRenderer.stop=e)}})(Dr,oi,ai,ln,ni,Sr,Ar,$n),ci=((e,t,n,r,i,o,a,s)=>class extends e{constructor(e,n){const r=o(e),l=a(r),c=i(r,n,l);super(e,!1,c,l?t(s):null),this._isNodeOfNativeOfflineAudioContext=l,this._nativeAudioDestinationNode=c}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(e){if(this._isNodeOfNativeOfflineAudioContext)throw r();if(e>this._nativeAudioDestinationNode.maxChannelCount)throw n();this._nativeAudioDestinationNode.channelCount=e}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(e){if(this._isNodeOfNativeOfflineAudioContext)throw r();this._nativeAudioDestinationNode.channelCountMode=e}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}})(Dr,(e=>{const t=new WeakMap;return{render(n,r){const i=t.get(r);return void 0!==i?Promise.resolve(i):(async(n,r)=>{const i=r.destination;return t.set(r,i),await e(n,r,i),i})(n,r)}}}),nt,ln,((e,t)=>(n,r,i)=>{const o=n.destination;if(o.channelCount!==r)try{o.channelCount=r}catch{}i&&"explicit"!==o.channelCountMode&&(o.channelCountMode="explicit"),0===o.maxChannelCount&&Object.defineProperty(o,"maxChannelCount",{value:r});const a=e(n,{channelCount:r,channelCountMode:o.channelCountMode,channelInterpretation:o.channelInterpretation,gain:1});return t(a,"channelCount",(e=>()=>e.call(a)),(e=>t=>{e.call(a,t);try{o.channelCount=t}catch(e){if(t>o.maxChannelCount)throw e}})),t(a,"channelCountMode",(e=>()=>e.call(a)),(e=>t=>{e.call(a,t),o.channelCountMode=t})),t(a,"channelInterpretation",(e=>()=>e.call(a)),(e=>t=>{e.call(a,t),o.channelInterpretation=t})),Object.defineProperty(a,"maxChannelCount",{get:()=>o.maxChannelCount}),a.connect(o),a})(Pn,Kn),Sr,Ar,vr),ui=((e,t,n,r,i)=>()=>{const o=new WeakMap;return{render(a,s){const l=o.get(s);return void 0!==l?Promise.resolve(l):(async(a,s)=>{let l=n(a);const c=et(l,s);if(!c){const e={Q:l.Q.value,channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,detune:l.detune.value,frequency:l.frequency.value,gain:l.gain.value,type:l.type};l=t(s,e)}return o.set(s,l),c?(await e(s,a.Q,l.Q),await e(s,a.detune,l.detune),await e(s,a.frequency,l.frequency),await e(s,a.gain,l.gain)):(await r(s,a.Q,l.Q),await r(s,a.detune,l.detune),await r(s,a.frequency,l.frequency),await r(s,a.gain,l.gain)),await i(a,s,l),l})(a,s)}}})(ei,kn,Rt,ii,vr),di=(e=>(t,n)=>e.set(t,n))(or),fi=(hi=Dr,pi=ai,mi=ui,gi=cn,vi=kn,yi=Sr,bi=Ar,wi=di,class extends hi{constructor(e,t){const n=yi(e),r={...Qt,...t},i=vi(n,r),o=bi(n);super(e,!1,i,o?mi():null),this._Q=pi(this,o,i.Q,at,ot),this._detune=pi(this,o,i.detune,1200*Math.log2(at),-1200*Math.log2(at)),this._frequency=pi(this,o,i.frequency,e.sampleRate/2,0),this._gain=pi(this,o,i.gain,40*Math.log10(at),ot),this._nativeBiquadFilterNode=i,wi(this,1)}get detune(){return this._detune}get frequency(){return this._frequency}get gain(){return this._gain}get Q(){return this._Q}get type(){return this._nativeBiquadFilterNode.type}set type(e){this._nativeBiquadFilterNode.type=e}getFrequencyResponse(e,t,n){try{this._nativeBiquadFilterNode.getFrequencyResponse(e,t,n)}catch(e){if(11===e.code)throw gi();throw e}if(e.length!==t.length||t.length!==n.length)throw gi()}});var hi,pi,mi,gi,vi,yi,bi,wi;const xi=((e,t)=>(n,r,i)=>{const o=new Set;var a,s;return n.connect=(a=n.connect,(i,s=0,l=0)=>{const c=0===o.size;if(t(i))return a.call(n,i,s,l),e(o,[i,s,l],(e=>e[0]===i&&e[1]===s&&e[2]===l),!0),c&&r(),i;a.call(n,i,s),e(o,[i,s],(e=>e[0]===i&&e[1]===s),!0),c&&r()}),n.disconnect=(s=n.disconnect,(e,r,a)=>{const l=o.size>0;if(void 0===e)s.apply(n),o.clear();else if("number"==typeof e){s.call(n,e);for(const t of o)t[1]===e&&o.delete(t)}else{t(e)?s.call(n,e,r,a):s.call(n,e,r);for(const t of o)t[0]!==e||void 0!==r&&t[1]!==r||void 0!==a&&t[2]!==a||o.delete(t)}const c=0===o.size;l&&c&&i()}),n})(St,Pr),Si=(Mi=ln,_i=xi,(e,t)=>{t.channelCount=1,t.channelCountMode="explicit",Object.defineProperty(t,"channelCount",{get:()=>1,set:()=>{throw Mi()}}),Object.defineProperty(t,"channelCountMode",{get:()=>"explicit",set:()=>{throw Mi()}});const n=e.createBufferSource();_i(t,(()=>{const e=t.numberOfInputs;for(let r=0;r<e;r+=1)n.connect(t,0,r)}),(()=>n.disconnect(t)))});var Mi,_i;const Ai=((e,t)=>(n,r)=>{const i=n.createChannelMerger(r.numberOfInputs);return null!==e&&"webkitAudioContext"===e.name&&t(n,i),vn(i,r),i})(Ir,Si),Ei=((e,t,n)=>()=>{const r=new WeakMap;return{render(i,o){const a=r.get(o);return void 0!==a?Promise.resolve(a):(async(i,o)=>{let a=t(i);if(!et(a,o)){const t={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfInputs:a.numberOfInputs};a=e(o,t)}return r.set(o,a),await n(i,o,a),a})(i,o)}}})(Ai,Rt,vr),Ci=((e,t,n,r,i)=>class extends e{constructor(e,o){const a=r(e),s={...Xt,...o};super(e,!1,n(a,s),i(a)?t():null)}})(Dr,Ei,Ai,Sr,Ar),ki=((e,t,n)=>()=>{const r=new WeakMap;return{render(i,o){const a=r.get(o);return void 0!==a?Promise.resolve(a):(async(i,o)=>{let a=t(i);if(!et(a,o)){const t={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfOutputs:a.numberOfOutputs};a=e(o,t)}return r.set(o,a),await n(i,o,a),a})(i,o)}}})(In,Rt,vr),Ti=((e,t,n,r,i,o)=>class extends e{constructor(e,a){const s=r(e),l=o({...Zt,...a});super(e,!1,n(s,l),i(s)?t():null)}})(Dr,ki,In,Sr,Ar,(e=>({...e,channelCount:e.numberOfOutputs}))),Ii=((e,t,n,r)=>(i,{offset:o,...a})=>{const s=i.createBuffer(1,2,44100),l=t(i,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),c=n(i,{...a,gain:o}),u=s.getChannelData(0);u[0]=1,u[1]=1,l.buffer=s,l.loop=!0;const d={get bufferSize(){},get channelCount(){return c.channelCount},set channelCount(e){c.channelCount=e},get channelCountMode(){return c.channelCountMode},set channelCountMode(e){c.channelCountMode=e},get channelInterpretation(){return c.channelInterpretation},set channelInterpretation(e){c.channelInterpretation=e},get context(){return c.context},get inputs(){return[]},get numberOfInputs(){return l.numberOfInputs},get numberOfOutputs(){return c.numberOfOutputs},get offset(){return c.gain},get onended(){return l.onended},set onended(e){l.onended=e},addEventListener:(...e)=>l.addEventListener(e[0],e[1],e[2]),dispatchEvent:(...e)=>l.dispatchEvent(e[0]),removeEventListener:(...e)=>l.removeEventListener(e[0],e[1],e[2]),start(e=0){l.start.call(l,e)},stop(e=0){l.stop.call(l,e)}};return e(i,l),r(On(d,c),(()=>l.connect(c)),(()=>l.disconnect(c)))})(Yr,ni,Pn,xi),Oi=((e,t,n,r,i)=>(o,a)=>{if(void 0===o.createConstantSource)return n(o,a);const s=o.createConstantSource();return vn(s,a),bn(s,a,"offset"),t(r,(()=>r(o)))||xn(s),t(i,(()=>i(o)))||Sn(s),e(o,s),s})(Yr,lr,Ii,Jn,Xn),Ri=((e,t,n,r,i)=>()=>{const o=new WeakMap;let a=null,s=null;return{set start(e){a=e},set stop(e){s=e},render(l,c){const u=o.get(c);return void 0!==u?Promise.resolve(u):(async(l,c)=>{let u=n(l);const d=et(u,c);if(!d){const e={channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,offset:u.offset.value};u=t(c,e),null!==a&&u.start(a),null!==s&&u.stop(s)}return o.set(c,u),d?await e(c,l.offset,u.offset):await r(c,l.offset,u.offset),await i(l,c,u),u})(l,c)}}})(ei,Oi,Rt,ii,vr),Pi=((e,t,n,r,i,o,a)=>class extends e{constructor(e,a){const s=i(e),l={...$t,...a},c=r(s,l),u=o(s),d=u?n():null;super(e,!1,c,d),this._constantSourceNodeRenderer=d,this._nativeConstantSourceNode=c,this._offset=t(this,u,c.offset,at,ot),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(e){const t="function"==typeof e?a(this,e):null;this._nativeConstantSourceNode.onended=t;const n=this._nativeConstantSourceNode.onended;this._onended=null!==n&&n===t?e:n}start(e=0){if(this._nativeConstantSourceNode.start(e),null!==this._constantSourceNodeRenderer&&(this._constantSourceNodeRenderer.start=e),"closed"!==this.context.state){Je(this);const e=()=>{this._nativeConstantSourceNode.removeEventListener("ended",e),st(this)&&Xe(this)};this._nativeConstantSourceNode.addEventListener("ended",e)}}stop(e=0){this._nativeConstantSourceNode.stop(e),null!==this._constantSourceNodeRenderer&&(this._constantSourceNodeRenderer.stop=e)}})(Dr,ai,Ri,Oi,Sr,Ar,$n),Ni=((e,t)=>(n,r)=>{const i=n.createConvolver();if(vn(i,r),r.disableNormalization===i.normalize&&(i.normalize=!r.disableNormalization),gn(i,r,"buffer"),r.channelCount>2)throw e();if(t(i,"channelCount",(e=>()=>e.call(i)),(t=>n=>{if(n>2)throw e();return t.call(i,n)})),"max"===r.channelCountMode)throw e();return t(i,"channelCountMode",(e=>()=>e.call(i)),(t=>n=>{if("max"===n)throw e();return t.call(i,n)})),i})(Bn,Kn),Li=((e,t,n)=>()=>{const r=new WeakMap;return{render(i,o){const a=r.get(o);return void 0!==a?Promise.resolve(a):(async(i,o)=>{let a=t(i);if(!et(a,o)){const t={buffer:a.buffer,channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,disableNormalization:!a.normalize};a=e(o,t)}return r.set(o,a),At(a)?await n(i,o,a.inputs[0]):await n(i,o,a),a})(i,o)}}})(Ni,Rt,vr),Di=((e,t,n,r,i,o)=>class extends e{constructor(e,a){const s=r(e),l={...en,...a},c=n(s,l);super(e,!1,c,i(s)?t():null),this._isBufferNullified=!1,this._nativeConvolverNode=c,null!==l.buffer&&o(this,l.buffer.duration)}get buffer(){return this._isBufferNullified?null:this._nativeConvolverNode.buffer}set buffer(e){if(this._nativeConvolverNode.buffer=e,null===e&&null!==this._nativeConvolverNode.buffer){const e=this._nativeConvolverNode.context;this._nativeConvolverNode.buffer=e.createBuffer(1,1,e.sampleRate),this._isBufferNullified=!0,o(this,0)}else this._isBufferNullified=!1,o(this,null===this._nativeConvolverNode.buffer?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(e){this._nativeConvolverNode.normalize=e}})(Dr,Li,Ni,Sr,Ar,di),Bi=((e,t,n,r,i)=>o=>{const a=new WeakMap;return{render(s,l){const c=a.get(l);return void 0!==c?Promise.resolve(c):(async(s,l)=>{let c=n(s);const u=et(c,l);if(!u){const e={channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,delayTime:c.delayTime.value,maxDelayTime:o};c=t(l,e)}return a.set(l,c),u?await e(l,s.delayTime,c.delayTime):await r(l,s.delayTime,c.delayTime),await i(s,l,c),c})(s,l)}}})(ei,Rn,Rt,ii,vr),ji=((e,t,n,r,i,o,a)=>class extends e{constructor(e,s){const l=i(e),c={...nn,...s},u=r(l,c),d=o(l);super(e,!1,u,d?n(c.maxDelayTime):null),this._delayTime=t(this,d,u.delayTime),a(this,c.maxDelayTime)}get delayTime(){return this._delayTime}})(Dr,ai,Bi,Rn,Sr,Ar,di),Fi=(Ui=Bn,(e,t)=>{const n=e.createDynamicsCompressor();if(vn(n,t),t.channelCount>2)throw Ui();if("max"===t.channelCountMode)throw Ui();return bn(n,t,"attack"),bn(n,t,"knee"),bn(n,t,"ratio"),bn(n,t,"release"),bn(n,t,"threshold"),n});var Ui;const zi=((e,t,n,r,i)=>()=>{const o=new WeakMap;return{render(a,s){const l=o.get(s);return void 0!==l?Promise.resolve(l):(async(a,s)=>{let l=n(a);const c=et(l,s);if(!c){const e={attack:l.attack.value,channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,knee:l.knee.value,ratio:l.ratio.value,release:l.release.value,threshold:l.threshold.value};l=t(s,e)}return o.set(s,l),c?(await e(s,a.attack,l.attack),await e(s,a.knee,l.knee),await e(s,a.ratio,l.ratio),await e(s,a.release,l.release),await e(s,a.threshold,l.threshold)):(await r(s,a.attack,l.attack),await r(s,a.knee,l.knee),await r(s,a.ratio,l.ratio),await r(s,a.release,l.release),await r(s,a.threshold,l.threshold)),await i(a,s,l),l})(a,s)}}})(ei,Fi,Rt,ii,vr),Hi=((e,t,n,r,i,o,a,s)=>class extends e{constructor(e,i){const l=o(e),c={...an,...i},u=r(l,c),d=a(l);super(e,!1,u,d?n():null),this._attack=t(this,d,u.attack),this._knee=t(this,d,u.knee),this._nativeDynamicsCompressorNode=u,this._ratio=t(this,d,u.ratio),this._release=t(this,d,u.release),this._threshold=t(this,d,u.threshold),s(this,.006)}get attack(){return this._attack}get channelCount(){return this._nativeDynamicsCompressorNode.channelCount}set channelCount(e){const t=this._nativeDynamicsCompressorNode.channelCount;if(this._nativeDynamicsCompressorNode.channelCount=e,e>2)throw this._nativeDynamicsCompressorNode.channelCount=t,i()}get channelCountMode(){return this._nativeDynamicsCompressorNode.channelCountMode}set channelCountMode(e){const t=this._nativeDynamicsCompressorNode.channelCountMode;if(this._nativeDynamicsCompressorNode.channelCountMode=e,"max"===e)throw this._nativeDynamicsCompressorNode.channelCountMode=t,i()}get knee(){return this._knee}get ratio(){return this._ratio}get reduction(){return"number"==typeof this._nativeDynamicsCompressorNode.reduction.value?this._nativeDynamicsCompressorNode.reduction.value:this._nativeDynamicsCompressorNode.reduction}get release(){return this._release}get threshold(){return this._threshold}})(Dr,ai,zi,Fi,Bn,Sr,Ar,di),Vi=((e,t,n,r,i)=>()=>{const o=new WeakMap;return{render(a,s){const l=o.get(s);return void 0!==l?Promise.resolve(l):(async(a,s)=>{let l=n(a);const c=et(l,s);if(!c){const e={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,gain:l.gain.value};l=t(s,e)}return o.set(s,l),c?await e(s,a.gain,l.gain):await r(s,a.gain,l.gain),await i(a,s,l),l})(a,s)}}})(ei,Pn,Rt,ii,vr),Wi=((e,t,n,r,i,o)=>class extends e{constructor(e,a){const s=i(e),l={...sn,...a},c=r(s,l),u=o(s);super(e,!1,c,u?n():null),this._gain=t(this,u,c.gain,at,ot)}get gain(){return this._gain}})(Dr,ai,Vi,Pn,Sr,Ar),Gi=((e,t,n,r)=>(i,o,{channelCount:a,channelCountMode:s,channelInterpretation:l,feedback:c,feedforward:u})=>{const d=_n(o,i.sampleRate),f=c instanceof Float64Array?c:new Float64Array(c),h=u instanceof Float64Array?u:new Float64Array(u),p=f.length,m=h.length,g=Math.min(p,m);if(0===p||p>20)throw r();if(0===f[0])throw t();if(0===m||m>20)throw r();if(0===h[0])throw t();if(1!==f[0]){for(let e=0;e<m;e+=1)h[e]/=f[0];for(let e=1;e<p;e+=1)f[e]/=f[0]}const v=n(i,d,a,a);v.channelCount=a,v.channelCountMode=s,v.channelInterpretation=l;const y=[],b=[],w=[];for(let e=0;e<a;e+=1){y.push(0);const e=new Float32Array(32),t=new Float32Array(32);e.fill(0),t.fill(0),b.push(e),w.push(t)}v.onaudioprocess=e=>{const t=e.inputBuffer,n=e.outputBuffer,r=t.numberOfChannels;for(let e=0;e<r;e+=1){const r=t.getChannelData(e),i=n.getChannelData(e);y[e]=fn(f,p,h,m,g,b[e],w[e],y[e],32,r,i)}};const x=i.sampleRate/2;return On({get bufferSize(){return d},get channelCount(){return v.channelCount},set channelCount(e){v.channelCount=e},get channelCountMode(){return v.channelCountMode},set channelCountMode(e){v.channelCountMode=e},get channelInterpretation(){return v.channelInterpretation},set channelInterpretation(e){v.channelInterpretation=e},get context(){return v.context},get inputs(){return[v]},get numberOfInputs(){return v.numberOfInputs},get numberOfOutputs(){return v.numberOfOutputs},addEventListener:(...e)=>v.addEventListener(e[0],e[1],e[2]),dispatchEvent:(...e)=>v.dispatchEvent(e[0]),getFrequencyResponse(t,n,r){if(t.length!==n.length||n.length!==r.length)throw e();const i=t.length;for(let e=0;e<i;e+=1){const i=-Math.PI*(t[e]/x),o=[Math.cos(i),Math.sin(i)],a=Nn(Ln(h,o),Ln(f,o));n[e]=Math.sqrt(a[0]*a[0]+a[1]*a[1]),r[e]=Math.atan2(a[1],a[0])}},removeEventListener:(...e)=>v.removeEventListener(e[0],e[1],e[2])},v)})(cn,ln,Dn,Bn),qi=((e,t,n,r)=>i=>e(pn,(()=>pn(i)))?Promise.resolve(e(r,r)).then((e=>{if(!e){const e=n(i,512,0,1);i.oncomplete=()=>{e.onaudioprocess=null,e.disconnect()},e.onaudioprocess=()=>i.currentTime,e.connect(i.destination)}return i.startRendering()})):new Promise((e=>{const n=t(i,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});i.oncomplete=t=>{n.disconnect(),e(t.renderedBuffer)},n.connect(i.destination),i.startRendering()})))(lr,Pn,Dn,((e,t)=>()=>{if(null===t)return Promise.resolve(!1);const n=new t(1,1,44100),r=e(n,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise((e=>{n.oncomplete=()=>{r.disconnect(),e(0!==n.currentTime)},n.startRendering()}))})(Pn,_r)),Ki=((e,t,n,r,i)=>(o,a)=>{const s=new WeakMap;let l=null;const c=async(c,u)=>{let d=null,f=t(c);const h=et(f,u);if(void 0===u.createIIRFilter?d=e(u,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):h||(f=u.createIIRFilter(a,o)),s.set(u,null===d?f:d),null!==d){if(null===l){if(null===n)throw new Error("Missing the native OfflineAudioContext constructor.");const e=new n(c.context.destination.channelCount,c.context.length,u.sampleRate);l=(async()=>{await r(c,e,e.destination);return((e,t,n,r)=>{const i=n instanceof Float64Array?n:new Float64Array(n),o=r instanceof Float64Array?r:new Float64Array(r),a=i.length,s=o.length,l=Math.min(a,s);if(1!==i[0]){for(let e=0;e<a;e+=1)o[e]/=i[0];for(let e=1;e<s;e+=1)i[e]/=i[0]}const c=new Float32Array(32),u=new Float32Array(32),d=t.createBuffer(e.numberOfChannels,e.length,e.sampleRate),f=e.numberOfChannels;for(let t=0;t<f;t+=1){const n=e.getChannelData(t),r=d.getChannelData(t);c.fill(0),u.fill(0),fn(i,a,o,s,l,c,u,0,32,n,r)}return d})(await i(e),u,o,a)})()}const e=await l;return d.buffer=e,d.start(0),d}return await r(c,u,f),f};return{render(e,t){const n=s.get(t);return void 0!==n?Promise.resolve(n):c(e,t)}}})(ni,Rt,_r,vr,qi),Yi=(Ji=Gi,(e,t,n)=>{if(void 0===e.createIIRFilter)return Ji(e,t,n);const r=e.createIIRFilter(n.feedforward,n.feedback);return vn(r,n),r});var Ji;const Qi=((e,t,n,r,i,o)=>class extends e{constructor(e,a){const s=r(e),l=i(s),c={...dn,...a},u=t(s,l?null:e.baseLatency,c);super(e,!1,u,l?n(c.feedback,c.feedforward):null),un(u),this._nativeIIRFilterNode=u,o(this,1)}getFrequencyResponse(e,t,n){return this._nativeIIRFilterNode.getFrequencyResponse(e,t,n)}})(Dr,Yi,Ki,Sr,Ar,di),Xi=((e,t,n,r,i,o,a,s)=>(l,c)=>{const u=c.listener,{forwardX:d,forwardY:f,forwardZ:h,positionX:p,positionY:m,positionZ:g,upX:v,upY:y,upZ:b}=void 0===u.forwardX?(()=>{const d=new Float32Array(1),f=t(c,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),h=a(c);let p=!1,m=[0,0,-1,0,1,0],g=[0,0,0];const v=()=>{if(p)return;p=!0;const e=r(c,256,9,0);e.onaudioprocess=({inputBuffer:e})=>{const t=[o(e,d,0),o(e,d,1),o(e,d,2),o(e,d,3),o(e,d,4),o(e,d,5)];t.some(((e,t)=>e!==m[t]))&&(u.setOrientation(...t),m=t);const n=[o(e,d,6),o(e,d,7),o(e,d,8)];n.some(((e,t)=>e!==g[t]))&&(u.setPosition(...n),g=n)},f.connect(e)},y=e=>t=>{t!==m[e]&&(m[e]=t,u.setOrientation(...m))},b=e=>t=>{t!==g[e]&&(g[e]=t,u.setPosition(...g))},w=(t,r,o)=>{const a=n(c,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:r});a.connect(f,0,t),a.start(),Object.defineProperty(a.offset,"defaultValue",{get:()=>r});const u=e({context:l},h,a.offset,at,ot);var d,p,m,g,y,b,w;return s(u,"value",(e=>()=>e.call(u)),(e=>t=>{try{e.call(u,t)}catch(e){if(9!==e.code)throw e}v(),h&&o(t)})),u.cancelAndHoldAtTime=(d=u.cancelAndHoldAtTime,h?()=>{throw i()}:(...e)=>{const t=d.apply(u,e);return v(),t}),u.cancelScheduledValues=(p=u.cancelScheduledValues,h?()=>{throw i()}:(...e)=>{const t=p.apply(u,e);return v(),t}),u.exponentialRampToValueAtTime=(m=u.exponentialRampToValueAtTime,h?()=>{throw i()}:(...e)=>{const t=m.apply(u,e);return v(),t}),u.linearRampToValueAtTime=(g=u.linearRampToValueAtTime,h?()=>{throw i()}:(...e)=>{const t=g.apply(u,e);return v(),t}),u.setTargetAtTime=(y=u.setTargetAtTime,h?()=>{throw i()}:(...e)=>{const t=y.apply(u,e);return v(),t}),u.setValueAtTime=(b=u.setValueAtTime,h?()=>{throw i()}:(...e)=>{const t=b.apply(u,e);return v(),t}),u.setValueCurveAtTime=(w=u.setValueCurveAtTime,h?()=>{throw i()}:(...e)=>{const t=w.apply(u,e);return v(),t}),u};return{forwardX:w(0,0,y(0)),forwardY:w(1,0,y(1)),forwardZ:w(2,-1,y(2)),positionX:w(6,0,b(0)),positionY:w(7,0,b(1)),positionZ:w(8,0,b(2)),upX:w(3,0,y(3)),upY:w(4,1,y(4)),upZ:w(5,0,y(5))}})():u;return{get forwardX(){return d},get forwardY(){return f},get forwardZ(){return h},get positionX(){return p},get positionY(){return m},get positionZ(){return g},get upX(){return v},get upY(){return y},get upZ(){return b}}})(ai,Ai,Oi,Dn,Bn,Gn,Ar,Kn),Zi=new WeakMap,$i=((e,t,n,r,i,o)=>class extends n{constructor(n,o){super(n),this._nativeContext=n,Ne.set(this,n),r(n)&&i.set(n,new Set),this._destination=new e(this,o),this._listener=t(this,n),this._onstatechange=null}get currentTime(){return this._nativeContext.currentTime}get destination(){return this._destination}get listener(){return this._listener}get onstatechange(){return this._onstatechange}set onstatechange(e){const t="function"==typeof e?o(this,e):null;this._nativeContext.onstatechange=t;const n=this._nativeContext.onstatechange;this._onstatechange=null!==n&&n===t?e:n}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}})(ci,Xi,kr,Ar,Zi,$n),eo=((e,t,n,r,i,o)=>(a,s)=>{const l=a.createOscillator();return vn(l,s),bn(l,s,"detune"),bn(l,s,"frequency"),void 0!==s.periodicWave?l.setPeriodicWave(s.periodicWave):gn(l,s,"type"),t(n,(()=>n(a)))||xn(l),t(r,(()=>r(a)))||o(l,a),t(i,(()=>i(a)))||Sn(l),e(a,l),l})(Yr,lr,Jn,Qn,Xn,Zn),to=((e,t,n,r,i)=>()=>{const o=new WeakMap;let a=null,s=null,l=null;return{set periodicWave(e){a=e},set start(e){s=e},set stop(e){l=e},render(c,u){const d=o.get(u);return void 0!==d?Promise.resolve(d):(async(c,u)=>{let d=n(c);const f=et(d,u);if(!f){const e={channelCount:d.channelCount,channelCountMode:d.channelCountMode,channelInterpretation:d.channelInterpretation,detune:d.detune.value,frequency:d.frequency.value,periodicWave:null===a?void 0:a,type:d.type};d=t(u,e),null!==s&&d.start(s),null!==l&&d.stop(l)}return o.set(u,d),f?(await e(u,c.detune,d.detune),await e(u,c.frequency,d.frequency)):(await r(u,c.detune,d.detune),await r(u,c.frequency,d.frequency)),await i(c,u,d),d})(c,u)}}})(ei,eo,Rt,ii,vr),no=((e,t,n,r,i,o,a)=>class extends e{constructor(e,a){const s=i(e),l={...Fn,...a},c=n(s,l),u=o(s),d=u?r():null,f=e.sampleRate/2;super(e,!1,c,d),this._detune=t(this,u,c.detune,153600,-153600),this._frequency=t(this,u,c.frequency,f,-f),this._nativeOscillatorNode=c,this._onended=null,this._oscillatorNodeRenderer=d,null!==this._oscillatorNodeRenderer&&void 0!==l.periodicWave&&(this._oscillatorNodeRenderer.periodicWave=l.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(e){const t="function"==typeof e?a(this,e):null;this._nativeOscillatorNode.onended=t;const n=this._nativeOscillatorNode.onended;this._onended=null!==n&&n===t?e:n}get type(){return this._nativeOscillatorNode.type}set type(e){this._nativeOscillatorNode.type=e,null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.periodicWave=null)}setPeriodicWave(e){this._nativeOscillatorNode.setPeriodicWave(e),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.periodicWave=e)}start(e=0){if(this._nativeOscillatorNode.start(e),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.start=e),"closed"!==this.context.state){Je(this);const e=()=>{this._nativeOscillatorNode.removeEventListener("ended",e),st(this)&&Xe(this)};this._nativeOscillatorNode.addEventListener("ended",e)}}stop(e=0){this._nativeOscillatorNode.stop(e),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.stop=e)}})(Dr,ai,eo,to,Sr,Ar,$n),ro=(io=ni,(e,t)=>{const n=io(e,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),r=e.createBuffer(1,2,44100);return n.buffer=r,n.loop=!0,n.connect(t),n.start(),()=>{n.stop(),n.disconnect(t)}});var io;const oo=((e,t,n,r,i)=>(o,{curve:a,oversample:s,...l})=>{const c=o.createWaveShaper(),u=o.createWaveShaper();vn(c,l),vn(u,l);const d=n(o,{...l,gain:1}),f=n(o,{...l,gain:-1}),h=n(o,{...l,gain:1}),p=n(o,{...l,gain:-1});let m=null,g=!1,v=null;const y={get bufferSize(){},get channelCount(){return c.channelCount},set channelCount(e){d.channelCount=e,f.channelCount=e,c.channelCount=e,h.channelCount=e,u.channelCount=e,p.channelCount=e},get channelCountMode(){return c.channelCountMode},set channelCountMode(e){d.channelCountMode=e,f.channelCountMode=e,c.channelCountMode=e,h.channelCountMode=e,u.channelCountMode=e,p.channelCountMode=e},get channelInterpretation(){return c.channelInterpretation},set channelInterpretation(e){d.channelInterpretation=e,f.channelInterpretation=e,c.channelInterpretation=e,h.channelInterpretation=e,u.channelInterpretation=e,p.channelInterpretation=e},get context(){return c.context},get curve(){return v},set curve(n){if(null!==n&&n.length<2)throw t();if(null===n)c.curve=n,u.curve=n;else{const e=n.length,t=new Float32Array(e+2-e%2),r=new Float32Array(e+2-e%2);t[0]=n[0],r[0]=-n[e-1];const i=Math.ceil((e+1)/2),o=(e+1)/2-1;for(let a=1;a<i;a+=1){const s=a/i*o,l=Math.floor(s),c=Math.ceil(s);t[a]=l===c?n[l]:(1-(s-l))*n[l]+(1-(c-s))*n[c],r[a]=l===c?-n[e-1-l]:-(1-(s-l))*n[e-1-l]-(1-(c-s))*n[e-1-c]}t[i]=e%2==1?n[i-1]:(n[i-2]+n[i-1])/2,c.curve=t,u.curve=r}v=n,g&&(r(v)&&null===m?m=e(o,d):null!==m&&(m(),m=null))},get inputs(){return[d]},get numberOfInputs(){return c.numberOfInputs},get numberOfOutputs(){return c.numberOfOutputs},get oversample(){return c.oversample},set oversample(e){c.oversample=e,u.oversample=e},addEventListener:(...e)=>d.addEventListener(e[0],e[1],e[2]),dispatchEvent:(...e)=>d.dispatchEvent(e[0]),removeEventListener:(...e)=>d.removeEventListener(e[0],e[1],e[2])};null!==a&&(y.curve=a instanceof Float32Array?a:new Float32Array(a)),s!==y.oversample&&(y.oversample=s);return i(On(y,h),(()=>{d.connect(c).connect(h),d.connect(f).connect(u).connect(p).connect(h),g=!0,r(v)&&(m=e(o,d))}),(()=>{d.disconnect(c),c.disconnect(h),d.disconnect(f),f.disconnect(u),u.disconnect(p),p.disconnect(h),g=!1,null!==m&&(m(),m=null)}))})(ro,ln,Pn,qn,xi),ao=((e,t,n,r,i,o,a)=>(s,l)=>{const c=s.createWaveShaper();if(null!==o&&"webkitAudioContext"===o.name&&void 0===s.createGain().gain.automationRate)return n(s,l);vn(c,l);const u=null===l.curve||l.curve instanceof Float32Array?l.curve:new Float32Array(l.curve);if(null!==u&&u.length<2)throw t();gn(c,{curve:u},"curve"),gn(c,l,"oversample");let d=null,f=!1;a(c,"curve",(e=>()=>e.call(c)),(t=>n=>(t.call(c,n),f&&(r(n)&&null===d?d=e(s,c):r(n)||null===d||(d(),d=null)),n)));return i(c,(()=>{f=!0,r(c.curve)&&(d=e(s,c))}),(()=>{f=!1,null!==d&&(d(),d=null)}))})(ro,ln,oo,qn,xi,Ir,Kn),so=((e,t,n,r,i,o,a,s,l,c)=>(u,{coneInnerAngle:d,coneOuterAngle:f,coneOuterGain:h,distanceModel:p,maxDistance:m,orientationX:g,orientationY:v,orientationZ:y,panningModel:b,positionX:w,positionY:x,positionZ:S,refDistance:M,rolloffFactor:_,...A})=>{const E=u.createPanner();if(A.channelCount>2)throw a();if("max"===A.channelCountMode)throw a();vn(E,A);const C={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},k=n(u,{...C,channelInterpretation:"speakers",numberOfInputs:6}),T=r(u,{...A,gain:1}),I=r(u,{...C,gain:1}),O=r(u,{...C,gain:0}),R=r(u,{...C,gain:0}),P=r(u,{...C,gain:0}),N=r(u,{...C,gain:0}),L=r(u,{...C,gain:0}),D=i(u,256,6,1),B=o(u,{...C,curve:new Float32Array([1,1]),oversample:"none"});let j=[g,v,y],F=[w,x,S];const U=new Float32Array(1);D.onaudioprocess=({inputBuffer:e})=>{const t=[l(e,U,0),l(e,U,1),l(e,U,2)];t.some(((e,t)=>e!==j[t]))&&(E.setOrientation(...t),j=t);const n=[l(e,U,3),l(e,U,4),l(e,U,5)];n.some(((e,t)=>e!==F[t]))&&(E.setPosition(...n),F=n)},Object.defineProperty(O.gain,"defaultValue",{get:()=>0}),Object.defineProperty(R.gain,"defaultValue",{get:()=>0}),Object.defineProperty(P.gain,"defaultValue",{get:()=>0}),Object.defineProperty(N.gain,"defaultValue",{get:()=>0}),Object.defineProperty(L.gain,"defaultValue",{get:()=>0});const z={get bufferSize(){},get channelCount(){return E.channelCount},set channelCount(e){if(e>2)throw a();T.channelCount=e,E.channelCount=e},get channelCountMode(){return E.channelCountMode},set channelCountMode(e){if("max"===e)throw a();T.channelCountMode=e,E.channelCountMode=e},get channelInterpretation(){return E.channelInterpretation},set channelInterpretation(e){T.channelInterpretation=e,E.channelInterpretation=e},get coneInnerAngle(){return E.coneInnerAngle},set coneInnerAngle(e){E.coneInnerAngle=e},get coneOuterAngle(){return E.coneOuterAngle},set coneOuterAngle(e){E.coneOuterAngle=e},get coneOuterGain(){return E.coneOuterGain},set coneOuterGain(e){if(e<0||e>1)throw t();E.coneOuterGain=e},get context(){return E.context},get distanceModel(){return E.distanceModel},set distanceModel(e){E.distanceModel=e},get inputs(){return[T]},get maxDistance(){return E.maxDistance},set maxDistance(e){if(e<0)throw new RangeError;E.maxDistance=e},get numberOfInputs(){return E.numberOfInputs},get numberOfOutputs(){return E.numberOfOutputs},get orientationX(){return I.gain},get orientationY(){return O.gain},get orientationZ(){return R.gain},get panningModel(){return E.panningModel},set panningModel(e){E.panningModel=e},get positionX(){return P.gain},get positionY(){return N.gain},get positionZ(){return L.gain},get refDistance(){return E.refDistance},set refDistance(e){if(e<0)throw new RangeError;E.refDistance=e},get rolloffFactor(){return E.rolloffFactor},set rolloffFactor(e){if(e<0)throw new RangeError;E.rolloffFactor=e},addEventListener:(...e)=>T.addEventListener(e[0],e[1],e[2]),dispatchEvent:(...e)=>T.dispatchEvent(e[0]),removeEventListener:(...e)=>T.removeEventListener(e[0],e[1],e[2])};d!==z.coneInnerAngle&&(z.coneInnerAngle=d),f!==z.coneOuterAngle&&(z.coneOuterAngle=f),h!==z.coneOuterGain&&(z.coneOuterGain=h),p!==z.distanceModel&&(z.distanceModel=p),m!==z.maxDistance&&(z.maxDistance=m),g!==z.orientationX.value&&(z.orientationX.value=g),v!==z.orientationY.value&&(z.orientationY.value=v),y!==z.orientationZ.value&&(z.orientationZ.value=y),b!==z.panningModel&&(z.panningModel=b),w!==z.positionX.value&&(z.positionX.value=w),x!==z.positionY.value&&(z.positionY.value=x),S!==z.positionZ.value&&(z.positionZ.value=S),M!==z.refDistance&&(z.refDistance=M),_!==z.rolloffFactor&&(z.rolloffFactor=_),1===j[0]&&0===j[1]&&0===j[2]||E.setOrientation(...j),0===F[0]&&0===F[1]&&0===F[2]||E.setPosition(...F);return c(On(z,E),(()=>{T.connect(E),e(T,B,0,0),B.connect(I).connect(k,0,0),B.connect(O).connect(k,0,1),B.connect(R).connect(k,0,2),B.connect(P).connect(k,0,3),B.connect(N).connect(k,0,4),B.connect(L).connect(k,0,5),k.connect(D).connect(u.destination)}),(()=>{T.disconnect(E),s(T,B,0,0),B.disconnect(I),I.disconnect(k),B.disconnect(O),O.disconnect(k),B.disconnect(R),R.disconnect(k),B.disconnect(P),P.disconnect(k),B.disconnect(N),N.disconnect(k),B.disconnect(L),L.disconnect(k),k.disconnect(D),D.disconnect(u.destination)}))})(Et,ln,Ai,Pn,Dn,ao,Bn,Ot,Gn,xi),lo=(co=so,(e,t)=>{const n=e.createPanner();return void 0===n.orientationX?co(e,t):(vn(n,t),bn(n,t,"orientationX"),bn(n,t,"orientationY"),bn(n,t,"orientationZ"),bn(n,t,"positionX"),bn(n,t,"positionY"),bn(n,t,"positionZ"),gn(n,t,"coneInnerAngle"),gn(n,t,"coneOuterAngle"),gn(n,t,"coneOuterGain"),gn(n,t,"distanceModel"),gn(n,t,"maxDistance"),gn(n,t,"panningModel"),gn(n,t,"refDistance"),gn(n,t,"rolloffFactor"),n)});var co;const uo=((e,t,n,r,i,o,a,s,l,c)=>()=>{const u=new WeakMap;let d=null;return{render(f,h){const p=u.get(h);return void 0!==p?Promise.resolve(p):(async(f,h)=>{let p=null,m=o(f);const g={channelCount:m.channelCount,channelCountMode:m.channelCountMode,channelInterpretation:m.channelInterpretation},v={...g,coneInnerAngle:m.coneInnerAngle,coneOuterAngle:m.coneOuterAngle,coneOuterGain:m.coneOuterGain,distanceModel:m.distanceModel,maxDistance:m.maxDistance,panningModel:m.panningModel,refDistance:m.refDistance,rolloffFactor:m.rolloffFactor},y=et(m,h);if("bufferSize"in m)p=r(h,{...g,gain:1});else if(!y){const e={...v,orientationX:m.orientationX.value,orientationY:m.orientationY.value,orientationZ:m.orientationZ.value,positionX:m.positionX.value,positionY:m.positionY.value,positionZ:m.positionZ.value};m=i(h,e)}if(u.set(h,null===p?m:p),null!==p){if(null===d){if(null===a)throw new Error("Missing the native OfflineAudioContext constructor.");const e=new a(6,f.context.length,h.sampleRate),r=t(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6});r.connect(e.destination),d=(async()=>{const t=await Promise.all([f.orientationX,f.orientationY,f.orientationZ,f.positionX,f.positionY,f.positionZ].map((async(t,r)=>{const i=n(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:0===r?1:0});return await s(e,t,i.offset),i})));for(let e=0;e<6;e+=1)t[e].connect(r,0,e),t[e].start(0);return c(e)})()}const e=await d,o=r(h,{...g,gain:1});await l(f,h,o);const u=[];for(let t=0;t<e.numberOfChannels;t+=1)u.push(e.getChannelData(t));let m=[u[0][0],u[1][0],u[2][0]],y=[u[3][0],u[4][0],u[5][0]],b=r(h,{...g,gain:1}),w=i(h,{...v,orientationX:m[0],orientationY:m[1],orientationZ:m[2],positionX:y[0],positionY:y[1],positionZ:y[2]});o.connect(b).connect(w.inputs[0]),w.connect(p);for(let t=128;t<e.length;t+=128){const e=[u[0][t],u[1][t],u[2][t]],n=[u[3][t],u[4][t],u[5][t]];if(e.some(((e,t)=>e!==m[t]))||n.some(((e,t)=>e!==y[t]))){m=e,y=n;const a=t/h.sampleRate;b.gain.setValueAtTime(0,a),b=r(h,{...g,gain:0}),w=i(h,{...v,orientationX:m[0],orientationY:m[1],orientationZ:m[2],positionX:y[0],positionY:y[1],positionZ:y[2]}),b.gain.setValueAtTime(1,a),o.connect(b).connect(w.inputs[0]),w.connect(p)}}return p}return y?(await e(h,f.orientationX,m.orientationX),await e(h,f.orientationY,m.orientationY),await e(h,f.orientationZ,m.orientationZ),await e(h,f.positionX,m.positionX),await e(h,f.positionY,m.positionY),await e(h,f.positionZ,m.positionZ)):(await s(h,f.orientationX,m.orientationX),await s(h,f.orientationY,m.orientationY),await s(h,f.orientationZ,m.orientationZ),await s(h,f.positionX,m.positionX),await s(h,f.positionY,m.positionY),await s(h,f.positionZ,m.positionZ)),At(m)?await l(f,h,m.inputs[0]):await l(f,h,m),m})(f,h)}}})(ei,Ai,Oi,Pn,lo,Rt,_r,ii,vr,qi),fo=((e,t,n,r,i,o,a)=>class extends e{constructor(e,s){const l=i(e),c={...Un,...s},u=n(l,c),d=o(l);super(e,!1,u,d?r():null),this._nativePannerNode=u,this._orientationX=t(this,d,u.orientationX,at,ot),this._orientationY=t(this,d,u.orientationY,at,ot),this._orientationZ=t(this,d,u.orientationZ,at,ot),this._positionX=t(this,d,u.positionX,at,ot),this._positionY=t(this,d,u.positionY,at,ot),this._positionZ=t(this,d,u.positionZ,at,ot),a(this,1)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(e){this._nativePannerNode.coneInnerAngle=e}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(e){this._nativePannerNode.coneOuterAngle=e}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(e){this._nativePannerNode.coneOuterGain=e}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(e){this._nativePannerNode.distanceModel=e}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(e){this._nativePannerNode.maxDistance=e}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(e){this._nativePannerNode.panningModel=e}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(e){this._nativePannerNode.refDistance=e}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(e){this._nativePannerNode.rolloffFactor=e}})(Dr,ai,lo,uo,Sr,Ar,di),ho=(e=>(t,{disableNormalization:n,imag:r,real:i})=>{const o=r instanceof Float32Array?r:new Float32Array(r),a=i instanceof Float32Array?i:new Float32Array(i),s=t.createPeriodicWave(a,o,{disableNormalization:n});if(Array.from(r).length<2)throw e();return s})(nt),po=((e,t,n,r)=>class i{constructor(i,o){const a=t(i),s=r({...zn,...o}),l=e(a,s);return n.add(l),l}static[Symbol.hasInstance](e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===i.prototype||n.has(e)}})(ho,Sr,new WeakSet,(e=>{const{imag:t,real:n}=e;return void 0===t?void 0===n?{...e,imag:[0,0],real:[0,0]}:{...e,imag:Array.from(n,(()=>0)),real:n}:void 0===n?{...e,imag:t,real:Array.from(t,(()=>0))}:{...e,imag:t,real:n}})),mo=((e,t,n,r,i,o)=>{const a=16385,s=new Float32Array([1,1]),l=Math.PI/2,c={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},u={...c,oversample:"none"},d=(e,o,d,f,h)=>{if(1===o)return((e,t,i,o)=>{const d=new Float32Array(a),f=new Float32Array(a);for(let e=0;e<a;e+=1){const t=e/16384*l;d[e]=Math.cos(t),f[e]=Math.sin(t)}const h=n(e,{...c,gain:0}),p=r(e,{...u,curve:d}),m=r(e,{...u,curve:s}),g=n(e,{...c,gain:0}),v=r(e,{...u,curve:f});return{connectGraph(){t.connect(h),t.connect(void 0===m.inputs?m:m.inputs[0]),t.connect(g),m.connect(i),i.connect(void 0===p.inputs?p:p.inputs[0]),i.connect(void 0===v.inputs?v:v.inputs[0]),p.connect(h.gain),v.connect(g.gain),h.connect(o,0,0),g.connect(o,0,1)},disconnectGraph(){t.disconnect(h),t.disconnect(void 0===m.inputs?m:m.inputs[0]),t.disconnect(g),m.disconnect(i),i.disconnect(void 0===p.inputs?p:p.inputs[0]),i.disconnect(void 0===v.inputs?v:v.inputs[0]),p.disconnect(h.gain),v.disconnect(g.gain),h.disconnect(o,0,0),g.disconnect(o,0,1)}}})(e,d,f,h);if(2===o)return((e,i,o,d)=>{const f=new Float32Array(a),h=new Float32Array(a),p=new Float32Array(a),m=new Float32Array(a),g=Math.floor(8192.5);for(let e=0;e<a;e+=1)if(e>g){const t=(e-g)/(16384-g)*l;f[e]=Math.cos(t),h[e]=Math.sin(t),p[e]=0,m[e]=1}else{const t=e/(16384-g)*l;f[e]=1,h[e]=0,p[e]=Math.cos(t),m[e]=Math.sin(t)}const v=t(e,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),y=n(e,{...c,gain:0}),b=r(e,{...u,curve:f}),w=n(e,{...c,gain:0}),x=r(e,{...u,curve:h}),S=r(e,{...u,curve:s}),M=n(e,{...c,gain:0}),_=r(e,{...u,curve:p}),A=n(e,{...c,gain:0}),E=r(e,{...u,curve:m});return{connectGraph(){i.connect(v),i.connect(void 0===S.inputs?S:S.inputs[0]),v.connect(y,0),v.connect(w,0),v.connect(M,1),v.connect(A,1),S.connect(o),o.connect(void 0===b.inputs?b:b.inputs[0]),o.connect(void 0===x.inputs?x:x.inputs[0]),o.connect(void 0===_.inputs?_:_.inputs[0]),o.connect(void 0===E.inputs?E:E.inputs[0]),b.connect(y.gain),x.connect(w.gain),_.connect(M.gain),E.connect(A.gain),y.connect(d,0,0),M.connect(d,0,0),w.connect(d,0,1),A.connect(d,0,1)},disconnectGraph(){i.disconnect(v),i.disconnect(void 0===S.inputs?S:S.inputs[0]),v.disconnect(y,0),v.disconnect(w,0),v.disconnect(M,1),v.disconnect(A,1),S.disconnect(o),o.disconnect(void 0===b.inputs?b:b.inputs[0]),o.disconnect(void 0===x.inputs?x:x.inputs[0]),o.disconnect(void 0===_.inputs?_:_.inputs[0]),o.disconnect(void 0===E.inputs?E:E.inputs[0]),b.disconnect(y.gain),x.disconnect(w.gain),_.disconnect(M.gain),E.disconnect(A.gain),y.disconnect(d,0,0),M.disconnect(d,0,0),w.disconnect(d,0,1),A.disconnect(d,0,1)}}})(e,d,f,h);throw i()};return(t,{channelCount:r,channelCountMode:a,pan:s,...l})=>{if("max"===a)throw i();const c=e(t,{...l,channelCount:1,channelCountMode:a,numberOfInputs:2}),u=n(t,{...l,channelCount:r,channelCountMode:a,gain:1}),f=n(t,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:s});let{connectGraph:h,disconnectGraph:p}=d(t,r,u,f,c);Object.defineProperty(f.gain,"defaultValue",{get:()=>0}),Object.defineProperty(f.gain,"maxValue",{get:()=>1}),Object.defineProperty(f.gain,"minValue",{get:()=>-1});const m={get bufferSize(){},get channelCount(){return u.channelCount},set channelCount(e){u.channelCount!==e&&(g&&p(),({connectGraph:h,disconnectGraph:p}=d(t,e,u,f,c)),g&&h()),u.channelCount=e},get channelCountMode(){return u.channelCountMode},set channelCountMode(e){if("clamped-max"===e||"max"===e)throw i();u.channelCountMode=e},get channelInterpretation(){return u.channelInterpretation},set channelInterpretation(e){u.channelInterpretation=e},get context(){return u.context},get inputs(){return[u]},get numberOfInputs(){return u.numberOfInputs},get numberOfOutputs(){return u.numberOfOutputs},get pan(){return f.gain},addEventListener:(...e)=>u.addEventListener(e[0],e[1],e[2]),dispatchEvent:(...e)=>u.dispatchEvent(e[0]),removeEventListener:(...e)=>u.removeEventListener(e[0],e[1],e[2])};let g=!1;return o(On(m,c),(()=>{h(),g=!0}),(()=>{p(),g=!1}))}})(Ai,In,Pn,ao,Bn,xi),go=((e,t)=>(n,r)=>{const i=r.channelCountMode;if("clamped-max"===i)throw t();if(void 0===n.createStereoPanner)return e(n,r);const o=n.createStereoPanner();return vn(o,r),bn(o,r,"pan"),Object.defineProperty(o,"channelCountMode",{get:()=>i,set:e=>{if(e!==i)throw t()}}),o})(mo,Bn),vo=((e,t,n,r,i)=>()=>{const o=new WeakMap;return{render(a,s){const l=o.get(s);return void 0!==l?Promise.resolve(l):(async(a,s)=>{let l=n(a);const c=et(l,s);if(!c){const e={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,pan:l.pan.value};l=t(s,e)}return o.set(s,l),c?await e(s,a.pan,l.pan):await r(s,a.pan,l.pan),At(l)?await i(a,s,l.inputs[0]):await i(a,s,l),l})(a,s)}}})(ei,go,Rt,ii,vr),yo=((e,t,n,r,i,o)=>class extends e{constructor(e,a){const s=i(e),l={...Hn,...a},c=n(s,l),u=o(s);super(e,!1,c,u?r():null),this._pan=t(this,u,c.pan)}get pan(){return this._pan}})(Dr,ai,go,vo,Sr,Ar),bo=((e,t,n)=>()=>{const r=new WeakMap;return{render(i,o){const a=r.get(o);return void 0!==a?Promise.resolve(a):(async(i,o)=>{let a=t(i);if(!et(a,o)){const t={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,curve:a.curve,oversample:a.oversample};a=e(o,t)}return r.set(o,a),At(a)?await n(i,o,a.inputs[0]):await n(i,o,a),a})(i,o)}}})(ao,Rt,vr),wo=((e,t,n,r,i,o,a)=>class extends e{constructor(e,t){const s=i(e),l={...Wn,...t},c=n(s,l);super(e,!0,c,o(s)?r():null),this._isCurveNullified=!1,this._nativeWaveShaperNode=c,a(this,1)}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(e){if(null===e)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(e.length<2)throw t();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=e}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(e){this._nativeWaveShaperNode.oversample=e}})(Dr,ln,ao,bo,Sr,Ar,di),xo=(e=>null!==e&&e.isSecureContext)(dr),So=(e=>(t,n,r)=>{Object.defineProperties(e,{currentFrame:{configurable:!0,get:()=>Math.round(t*n)},currentTime:{configurable:!0,get:()=>t}});try{return r()}finally{null!==e&&(delete e.currentFrame,delete e.currentTime)}})(dr),Mo=new WeakMap,_o=((e,t)=>n=>{let r=e.get(n);if(void 0!==r)return r;if(null===t)throw new Error("Missing the native OfflineAudioContext constructor.");return r=new t(1,1,44100),e.set(n,r),r})(Mo,_r),Ao=xo?((e,t,n,r,i,o,a,s,l,c,u,d,f)=>{let h=0;return(p,m,g={credentials:"omit"})=>{const v=u.get(p);if(void 0!==v&&v.has(m))return Promise.resolve();const y=c.get(p);if(void 0!==y){const e=y.get(m);if(void 0!==e)return e}const b=o(p),w=void 0===b.audioWorklet?i(m).then((([e,t])=>{const[r,i]=He(e,t);return n(`${r};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${i}\n})})(window,'_AWGS')`)})).then((()=>{const e=f._AWGS.pop();if(void 0===e)throw new SyntaxError;r(b.currentTime,b.sampleRate,(()=>e(class{},void 0,((e,n)=>{if(""===e.trim())throw t();const r=Be.get(b);if(void 0!==r){if(r.has(e))throw t();We(n),Ve(n.parameterDescriptors),r.set(e,n)}else We(n),Ve(n.parameterDescriptors),Be.set(b,new Map([[e,n]]))}),b.sampleRate,void 0,void 0)))})):Promise.all([i(m),Promise.resolve(e(d,d))]).then((([[e,t],n])=>{const r=h+1;h=r;const[i,o]=He(e,t),c=new Blob([`${i};((AudioWorkletProcessor,registerProcessor)=>{${o}\n})(${n?"AudioWorkletProcessor":"class extends AudioWorkletProcessor {__b=new WeakSet();constructor(){super();(p=>p.postMessage=(q=>(m,t)=>q.call(p,m,t?t.filter(u=>!this.__b.has(u)):t))(p.postMessage))(this.port)}}"},(n,p)=>registerProcessor(n,class extends p{${n?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));"}process(i,o,p){${n?"":"i.forEach(this.__c);o.forEach(this.__c);this.__c(Object.values(p));"}return super.process(i.map(j=>j.some(k=>k.length===0)?[]:j),o,p)}}));registerProcessor('__sac${r}',class extends AudioWorkletProcessor{process(){return !1}})`],{type:"application/javascript; charset=utf-8"}),u=URL.createObjectURL(c);return b.audioWorklet.addModule(u,g).then((()=>{if(s(b))return b;const e=a(b);return e.audioWorklet.addModule(u,g).then((()=>e))})).then((e=>{if(null===l)throw new SyntaxError;try{new l(e,`__sac${r}`)}catch{throw new SyntaxError}})).finally((()=>URL.revokeObjectURL(u)))}));return void 0===y?c.set(p,new Map([[m,w]])):y.set(m,w),w.then((()=>{const e=u.get(p);void 0===e?u.set(p,new Set([m])):e.add(m)})).finally((()=>{const e=c.get(p);void 0!==e&&e.delete(m)})),w}})(lr,Bn,(e=>t=>new Promise(((n,r)=>{if(null===e)return void r(new SyntaxError);const i=e.document.head;if(null===i)r(new SyntaxError);else{const o=e.document.createElement("script"),a=new Blob([t],{type:"application/javascript"}),s=URL.createObjectURL(a),l=e.onerror,c=()=>{e.onerror=l,URL.revokeObjectURL(s)};e.onerror=(t,n,i,o,a)=>n===s||n===e.location.href&&1===i&&1===o?(c(),r(a),!1):null!==l?l(t,n,i,o,a):void 0,o.onerror=()=>{c(),r(new SyntaxError)},o.onload=()=>{c(),n()},o.src=s,o.type="module",i.appendChild(o)}})))(dr),So,(Eo=()=>new DOMException("","AbortError"),async e=>{try{const t=await fetch(e);if(t.ok)return[await t.text(),t.url]}catch{}throw Eo()}),Sr,_o,Ar,Lr,new WeakMap,new WeakMap,((e,t)=>async()=>{if(null===e)return!0;if(null===t)return!1;const n=new Blob(['class A extends AudioWorkletProcessor{process(i){this.port.postMessage(i,[i[0][0].buffer])}}registerProcessor("a",A)'],{type:"application/javascript; charset=utf-8"}),r=new t(1,128,44100),i=URL.createObjectURL(n);let o=!1,a=!1;try{await r.audioWorklet.addModule(i);const t=new e(r,"a",{numberOfOutputs:0}),n=r.createOscillator();t.port.onmessage=()=>o=!0,t.onprocessorerror=()=>a=!0,n.connect(t),n.start(0),await r.startRendering()}catch{}finally{URL.revokeObjectURL(i)}return o&&!a})(Lr,_r),dr):void 0;var Eo;const Co=((e,t)=>n=>e(n)||t(n))(Or,Ar),ko=((e,t,n,r,i,o,a,s,l,c,u)=>(d,f)=>{const h=a(d)?d:o(d);if(i.has(f)){const e=n();return Promise.reject(e)}try{i.add(f)}catch{}return t(l,(()=>l(h)))?h.decodeAudioData(f).then((n=>(tn(f).catch((()=>{})),t(s,(()=>s(n)))||u(n),e.add(n),n))):new Promise(((t,n)=>{const i=async()=>{try{await tn(f)}catch{}},o=e=>{n(e),i()};try{h.decodeAudioData(f,(n=>{"function"!=typeof n.copyFromChannel&&(c(n),rt(n)),e.add(n),i().then((()=>t(n)))}),(e=>{o(null===e?r():e)}))}catch(e){o(e)}}))})(Fr,lr,(()=>new DOMException("","DataCloneError")),(()=>new DOMException("","EncodingError")),new WeakSet,Sr,Co,tt,pn,Vr,Wr),To=(Io=Ao,Oo=jr,Ro=qr,Po=li,No=fi,Lo=Ci,Do=Ti,Bo=Pi,jo=Di,Fo=ko,Uo=ji,zo=Hi,Ho=Wi,Vo=Qi,Wo=$i,Go=no,qo=fo,Ko=po,Yo=yo,Jo=wo,class extends Wo{constructor(e,t){super(e,t),this._nativeContext=e,this._audioWorklet=void 0===Io?void 0:{addModule:(e,t)=>Io(this,e,t)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new Oo(this)}createBiquadFilter(){return new No(this)}createBuffer(e,t,n){return new Ro({length:t,numberOfChannels:e,sampleRate:n})}createBufferSource(){return new Po(this)}createChannelMerger(e=6){return new Lo(this,{numberOfInputs:e})}createChannelSplitter(e=6){return new Do(this,{numberOfOutputs:e})}createConstantSource(){return new Bo(this)}createConvolver(){return new jo(this)}createDelay(e=1){return new Uo(this,{maxDelayTime:e})}createDynamicsCompressor(){return new zo(this)}createGain(){return new Ho(this)}createIIRFilter(e,t){return new Vo(this,{feedback:t,feedforward:e})}createOscillator(){return new Go(this)}createPanner(){return new qo(this)}createPeriodicWave(e,t,n={disableNormalization:!1}){return new Ko(this,{...n,imag:t,real:e})}createStereoPanner(){return new Yo(this)}createWaveShaper(){return new Jo(this)}decodeAudioData(e,t,n){return Fo(this._nativeContext,e).then((e=>("function"==typeof t&&t(e),e)),(e=>{throw"function"==typeof n&&n(e),e}))}});var Io,Oo,Ro,Po,No,Lo,Do,Bo,jo,Fo,Uo,zo,Ho,Vo,Wo,Go,qo,Ko,Yo,Jo;const Qo=((e,t,n,r)=>class extends e{constructor(e,i){const o=n(e),a=t(o,i);if(r(o))throw TypeError();super(e,!0,a,null),this._nativeMediaElementAudioSourceNode=a}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}})(Dr,((e,t)=>e.createMediaElementSource(t.mediaElement)),Sr,Ar),Xo=((e,t,n,r)=>class extends e{constructor(e,i){const o=n(e);if(r(o))throw new TypeError;const a={...hn,...i},s=t(o,a);super(e,!1,s,null),this._nativeMediaStreamAudioDestinationNode=s}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}})(Dr,((e,t)=>{const n=e.createMediaStreamDestination();return vn(n,t),1===n.numberOfOutputs&&Object.defineProperty(n,"numberOfOutputs",{get:()=>0}),n}),Sr,Ar),Zo=((e,t,n,r)=>class extends e{constructor(e,i){const o=n(e),a=t(o,i);if(r(o))throw new TypeError;super(e,!0,a,null),this._nativeMediaStreamAudioSourceNode=a}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}})(Dr,((e,{mediaStream:t})=>{const n=t.getAudioTracks();n.sort(((e,t)=>e.id<t.id?-1:e.id>t.id?1:0));const r=n.slice(0,1),i=e.createMediaStreamSource(new MediaStream(r));return Object.defineProperty(i,"mediaStream",{value:t}),i}),Sr,Ar),$o=((e,t)=>(n,{mediaStreamTrack:r})=>{if("function"==typeof n.createMediaStreamTrackSource)return n.createMediaStreamTrackSource(r);const i=new MediaStream([r]),o=n.createMediaStreamSource(i);if("audio"!==r.kind)throw e();if(t(n))throw new TypeError;return o})(ln,Ar),ea=((e,t,n)=>class extends e{constructor(e,r){const i=n(e);super(e,!0,t(i,r),null)}})(Dr,$o,Sr),ta=((e,t,n,r,i,o,a,s,l)=>class extends e{constructor(e={}){if(null===l)throw new Error("Missing the native AudioContext constructor.");let t;try{t=new l(e)}catch(e){if(12===e.code&&"sampleRate is not in range"===e.message)throw n();throw e}if(null===t)throw r();if(!bt(e.latencyHint))throw new TypeError(`The provided value '${e.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`);if(void 0!==e.sampleRate&&t.sampleRate!==e.sampleRate)throw n();super(t,2);const{latencyHint:i}=e,{sampleRate:o}=t;if(this._baseLatency="number"==typeof t.baseLatency?t.baseLatency:"balanced"===i?512/o:"interactive"===i||void 0===i?256/o:"playback"===i?1024/o:128*Math.max(2,Math.min(128,Math.round(i*o/128)))/o,this._nativeAudioContext=t,"webkitAudioContext"===l.name?(this._nativeGainNode=t.createGain(),this._nativeOscillatorNode=t.createOscillator(),this._nativeGainNode.gain.value=1e-37,this._nativeOscillatorNode.connect(this._nativeGainNode).connect(t.destination),this._nativeOscillatorNode.start()):(this._nativeGainNode=null,this._nativeOscillatorNode=null),this._state=null,"running"===t.state){this._state="suspended";const e=()=>{"suspended"===this._state&&(this._state=null),t.removeEventListener("statechange",e)};t.addEventListener("statechange",e)}}get baseLatency(){return this._baseLatency}get state(){return null!==this._state?this._state:this._nativeAudioContext.state}close(){return"closed"===this.state?this._nativeAudioContext.close().then((()=>{throw t()})):("suspended"===this._state&&(this._state=null),this._nativeAudioContext.close().then((()=>{null!==this._nativeGainNode&&null!==this._nativeOscillatorNode&&(this._nativeOscillatorNode.stop(),this._nativeGainNode.disconnect(),this._nativeOscillatorNode.disconnect()),yt(this)})))}createMediaElementSource(e){return new i(this,{mediaElement:e})}createMediaStreamDestination(){return new o(this)}createMediaStreamSource(e){return new a(this,{mediaStream:e})}createMediaStreamTrackSource(e){return new s(this,{mediaStreamTrack:e})}resume(){return"suspended"===this._state?new Promise(((e,t)=>{const n=()=>{this._nativeAudioContext.removeEventListener("statechange",n),"running"===this._nativeAudioContext.state?e():this.resume().then(e,t)};this._nativeAudioContext.addEventListener("statechange",n)})):this._nativeAudioContext.resume().catch((e=>{if(void 0===e||15===e.code)throw t();throw e}))}suspend(){return this._nativeAudioContext.suspend().catch((e=>{if(void 0===e)throw t();throw e}))}})(To,ln,Bn,Vn,Qo,Xo,Zo,ea,Ir),na=(ra=Zi,e=>{const t=ra.get(e);if(void 0===t)throw new Error("The context has no set of AudioWorkletNodes.");return t});var ra;const ia=(oa=na,(e,t)=>{oa(e).add(t)});var oa;const aa=(e=>(t,n,r=0,i=0)=>{const o=t[r];if(void 0===o)throw e();return jt(n)?o.connect(n,0,i):o.connect(n,0)})(nt),sa=(e=>(t,n)=>{e(t).delete(n)})(na),la=(e=>(t,n,r,i=0)=>void 0===n?t.forEach((e=>e.disconnect())):"number"==typeof n?on(e,t,n).disconnect():jt(n)?void 0===r?t.forEach((e=>e.disconnect(n))):void 0===i?on(e,t,r).disconnect(n,0):on(e,t,r).disconnect(n,0,i):void 0===r?t.forEach((e=>e.disconnect(n))):on(e,t,r).disconnect(n,0))(nt),ca=new WeakMap,ua=(da=ca,fa=Ge,e=>fa(da,e));var da,fa;const ha=((e,t,n,r,i,o,a,s,l,c,u,d,f)=>(h,p,m,g)=>{if(0===g.numberOfInputs&&0===g.numberOfOutputs)throw l();const v=Array.isArray(g.outputChannelCount)?g.outputChannelCount:Array.from(g.outputChannelCount);if(v.some((e=>e<1)))throw l();if(v.length!==g.numberOfOutputs)throw t();if("explicit"!==g.channelCountMode)throw l();const y=g.channelCount*g.numberOfInputs,b=v.reduce(((e,t)=>e+t),0),w=void 0===m.parameterDescriptors?0:m.parameterDescriptors.length;if(y+w>6||b>6)throw l();const x=new MessageChannel,S=[],M=[];for(let e=0;e<g.numberOfInputs;e+=1)S.push(a(h,{channelCount:g.channelCount,channelCountMode:g.channelCountMode,channelInterpretation:g.channelInterpretation,gain:1})),M.push(i(h,{channelCount:g.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:g.channelCount}));const _=[];if(void 0!==m.parameterDescriptors)for(const{defaultValue:e,maxValue:t,minValue:n,name:r}of m.parameterDescriptors){const i=o(h,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:void 0!==g.parameterData[r]?g.parameterData[r]:void 0===e?0:e});Object.defineProperties(i.offset,{defaultValue:{get:()=>void 0===e?0:e},maxValue:{get:()=>void 0===t?at:t},minValue:{get:()=>void 0===n?ot:n}}),_.push(i)}const A=r(h,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,y+w)}),E=_n(p,h.sampleRate),C=s(h,E,y+w,Math.max(1,b)),k=i(h,{channelCount:Math.max(1,b),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,b)}),T=[];for(let e=0;e<g.numberOfOutputs;e+=1)T.push(r(h,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:v[e]}));for(let e=0;e<g.numberOfInputs;e+=1){S[e].connect(M[e]);for(let t=0;t<g.channelCount;t+=1)M[e].connect(A,t,e*g.channelCount+t)}const I=new Vt(void 0===m.parameterDescriptors?[]:m.parameterDescriptors.map((({name:e},t)=>{const n=_[t];return n.connect(A,0,y+t),n.start(0),[e,n.offset]})));A.connect(C);let O=g.channelInterpretation,R=null;const P=0===g.numberOfOutputs?[C]:T,N={get bufferSize(){return E},get channelCount(){return g.channelCount},set channelCount(e){throw n()},get channelCountMode(){return g.channelCountMode},set channelCountMode(e){throw n()},get channelInterpretation(){return O},set channelInterpretation(e){for(const t of S)t.channelInterpretation=e;O=e},get context(){return C.context},get inputs(){return S},get numberOfInputs(){return g.numberOfInputs},get numberOfOutputs(){return g.numberOfOutputs},get onprocessorerror(){return R},set onprocessorerror(e){"function"==typeof R&&N.removeEventListener("processorerror",R),R="function"==typeof e?e:null,"function"==typeof R&&N.addEventListener("processorerror",R)},get parameters(){return I},get port(){return x.port2},addEventListener:(...e)=>C.addEventListener(e[0],e[1],e[2]),connect:e.bind(null,P),disconnect:c.bind(null,P),dispatchEvent:(...e)=>C.dispatchEvent(e[0]),removeEventListener:(...e)=>C.removeEventListener(e[0],e[1],e[2])},L=new Map;var D,B;x.port1.addEventListener=(D=x.port1.addEventListener,(...e)=>{if("message"===e[0]){const t="function"==typeof e[1]?e[1]:"object"==typeof e[1]&&null!==e[1]&&"function"==typeof e[1].handleEvent?e[1].handleEvent:null;if(null!==t){const n=L.get(e[1]);void 0!==n?e[1]=n:(e[1]=e=>{u(h.currentTime,h.sampleRate,(()=>t(e)))},L.set(t,e[1]))}}return D.call(x.port1,e[0],e[1],e[2])}),x.port1.removeEventListener=(B=x.port1.removeEventListener,(...e)=>{if("message"===e[0]){const t=L.get(e[1]);void 0!==t&&(L.delete(e[1]),e[1]=t)}return B.call(x.port1,e[0],e[1],e[2])});let j=null;Object.defineProperty(x.port1,"onmessage",{get:()=>j,set:e=>{"function"==typeof j&&x.port1.removeEventListener("message",j),j="function"==typeof e?e:null,"function"==typeof j&&(x.port1.addEventListener("message",j),x.port1.start())}}),m.prototype.port=x.port1;let F=null;Cn(h,N,m,g).then((e=>F=e));const U=Kt(g.numberOfInputs,g.channelCount),z=Kt(g.numberOfOutputs,v),H=void 0===m.parameterDescriptors?[]:m.parameterDescriptors.reduce(((e,{name:t})=>({...e,[t]:new Float32Array(128)})),{});let V=!0;const W=()=>{g.numberOfOutputs>0&&C.disconnect(k);for(let e=0,t=0;e<g.numberOfOutputs;e+=1){const n=T[e];for(let r=0;r<v[e];r+=1)k.disconnect(n,t+r,r);t+=v[e]}},G=new Map;C.onaudioprocess=({inputBuffer:e,outputBuffer:t})=>{if(null!==F){const n=d(N);for(let r=0;r<E;r+=128){for(let t=0;t<g.numberOfInputs;t+=1)for(let n=0;n<g.channelCount;n+=1)Gt(e,U[t],n,n,r);void 0!==m.parameterDescriptors&&m.parameterDescriptors.forEach((({name:t},n)=>{Gt(e,H,t,y+n,r)}));for(let e=0;e<g.numberOfInputs;e+=1)for(let t=0;t<v[e];t+=1)0===z[e][t].byteLength&&(z[e][t]=new Float32Array(128));try{const e=U.map(((e,t)=>{if(n[t].size>0)return G.set(t,E/128),e;const r=G.get(t);return void 0===r?[]:(e.every((e=>e.every((e=>0===e))))&&(1===r?G.delete(t):G.set(t,r-1)),e)})),i=u(h.currentTime+r/h.sampleRate,h.sampleRate,(()=>F.process(e,z,H)));V=i;for(let e=0,n=0;e<g.numberOfOutputs;e+=1){for(let i=0;i<v[e];i+=1)qt(t,z[e],i,n+i,r);n+=v[e]}}catch(e){V=!1,N.dispatchEvent(new ErrorEvent("processorerror",{colno:e.colno,filename:e.filename,lineno:e.lineno,message:e.message}))}if(!V){for(let e=0;e<g.numberOfInputs;e+=1){S[e].disconnect(M[e]);for(let t=0;t<g.channelCount;t+=1)M[r].disconnect(A,t,e*g.channelCount+t)}if(void 0!==m.parameterDescriptors){const e=m.parameterDescriptors.length;for(let t=0;t<e;t+=1){const e=_[t];e.disconnect(A,0,y+t),e.stop()}}A.disconnect(C),C.onaudioprocess=null,q?W():J();break}}}};let q=!1;const K=a(h,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0}),Y=()=>C.connect(K).connect(h.destination),J=()=>{C.disconnect(K),K.disconnect()};return Y(),f(N,(()=>{if(V){J(),g.numberOfOutputs>0&&C.connect(k);for(let e=0,t=0;e<g.numberOfOutputs;e+=1){const n=T[e];for(let r=0;r<v[e];r+=1)k.connect(n,t+r,r);t+=v[e]}}q=!0}),(()=>{V&&(Y(),W()),q=!1}))})(aa,nt,ln,Ai,In,Oi,Pn,Dn,Bn,la,So,ua,xi),pa=((e,t,n,r,i)=>(o,a,s,l,c,u)=>{if(null!==s)try{const t=new s(o,l,u),r=new Map;let a=null;if(Object.defineProperties(t,{channelCount:{get:()=>u.channelCount,set:()=>{throw e()}},channelCountMode:{get:()=>"explicit",set:()=>{throw e()}},onprocessorerror:{get:()=>a,set:e=>{"function"==typeof a&&t.removeEventListener("processorerror",a),a="function"==typeof e?e:null,"function"==typeof a&&t.addEventListener("processorerror",a)}}}),t.addEventListener=(f=t.addEventListener,(...e)=>{if("processorerror"===e[0]){const t="function"==typeof e[1]?e[1]:"object"==typeof e[1]&&null!==e[1]&&"function"==typeof e[1].handleEvent?e[1].handleEvent:null;if(null!==t){const n=r.get(e[1]);void 0!==n?e[1]=n:(e[1]=n=>{"error"===n.type?(Object.defineProperties(n,{type:{value:"processorerror"}}),t(n)):t(new ErrorEvent(e[0],{...n}))},r.set(t,e[1]))}}return f.call(t,"error",e[1],e[2]),f.call(t,...e)}),t.removeEventListener=(d=t.removeEventListener,(...e)=>{if("processorerror"===e[0]){const t=r.get(e[1]);void 0!==t&&(r.delete(e[1]),e[1]=t)}return d.call(t,"error",e[1],e[2]),d.call(t,e[0],e[1],e[2])}),0!==u.numberOfOutputs){const e=n(o,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});t.connect(e).connect(o.destination);return i(t,(()=>e.disconnect()),(()=>e.connect(o.destination)))}return t}catch(e){if(11===e.code)throw r();throw e}var d,f;if(void 0===c)throw r();return Mn(u),t(o,a,c,u)})(ln,ha,Pn,Bn,xi),ma=((e,t,n,r,i,o,a,s,l,c,u,d,f,h,p,m)=>(g,v,y)=>{const b=new WeakMap;let w=null;return{render(x,S){s(S,x);const M=b.get(S);return void 0!==M?Promise.resolve(M):(async(s,x)=>{let S=u(s),M=null;const _=et(S,x),A=Array.isArray(v.outputChannelCount)?v.outputChannelCount:Array.from(v.outputChannelCount);if(null===d){const e=A.reduce(((e,t)=>e+t),0),n=i(x,{channelCount:Math.max(1,e),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,e)}),o=[];for(let e=0;e<s.numberOfOutputs;e+=1)o.push(r(x,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:A[e]}));const c=a(x,{channelCount:v.channelCount,channelCountMode:v.channelCountMode,channelInterpretation:v.channelInterpretation,gain:1});c.connect=t.bind(null,o),c.disconnect=l.bind(null,o),M=[n,o,c]}else _||(S=new d(x,g));if(b.set(x,null===M?S:M[2]),null!==M){if(null===w){if(void 0===y)throw new Error("Missing the processor constructor.");if(null===f)throw new Error("Missing the native OfflineAudioContext constructor.");const e=s.channelCount*s.numberOfInputs,t=void 0===y.parameterDescriptors?0:y.parameterDescriptors.length,n=e+t,l=async()=>{const l=new f(n,128*Math.ceil(s.context.length/128),x.sampleRate),c=[],u=[];for(let e=0;e<v.numberOfInputs;e+=1)c.push(a(l,{channelCount:v.channelCount,channelCountMode:v.channelCountMode,channelInterpretation:v.channelInterpretation,gain:1})),u.push(i(l,{channelCount:v.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:v.channelCount}));const d=await Promise.all(Array.from(s.parameters.values()).map((async e=>{const t=o(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:e.value});return await h(l,e,t.offset),t}))),g=r(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,e+t)});for(let e=0;e<v.numberOfInputs;e+=1){c[e].connect(u[e]);for(let t=0;t<v.channelCount;t+=1)u[e].connect(g,t,e*v.channelCount+t)}for(const[t,n]of d.entries())n.connect(g,0,e+t),n.start(0);return g.connect(l.destination),await Promise.all(c.map((e=>p(s,l,e)))),m(l)};w=Jt(s,0===n?null:await l(),x,v,A,y,c)}const e=await w,t=n(x,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),[l,u,d]=M;null!==e&&(t.buffer=e,t.start(0)),t.connect(l);for(let e=0,t=0;e<s.numberOfOutputs;e+=1){const n=u[e];for(let r=0;r<A[e];r+=1)l.connect(n,t+r,r);t+=A[e]}return d}if(_)for(const[t,n]of s.parameters.entries())await e(x,n,S.parameters.get(t));else for(const[e,t]of s.parameters.entries())await h(x,t,S.parameters.get(e));return await p(s,x,S),S})(x,S)}}})(ei,aa,ni,Ai,In,Oi,Pn,sa,la,So,Rt,Lr,_r,ii,vr,qi),ga=(va=Mo,e=>va.get(e));var va;const ya=(e=>(t,n)=>{e.set(t,n)})(ca),ba=(xo&&((e,t,n,r,i,o,a,s,l,c,u,d,f,h)=>{})(ia,Dr,ai,ma,pa,mt,ga,Sr,Ar,Lr,(e=>({...e,outputChannelCount:void 0!==e.outputChannelCount?e.outputChannelCount:1===e.numberOfInputs&&1===e.numberOfOutputs?[e.channelCount]:Array.from({length:e.numberOfOutputs},(()=>1))})),ya,(e=>{const{port1:t,port2:n}=new MessageChannel;try{t.postMessage(e)}finally{t.close(),n.close()}}),$n),((e,t,n,r,i)=>{})(ln,Bn,Vn,$i,Ir),((e,t)=>(n,r,i)=>{if(null===t)throw new Error("Missing the native OfflineAudioContext constructor.");try{return new t(n,r,i)}catch(t){if("SyntaxError"===t.name)throw e();throw t}})(Bn,_r)),wa=((e,t,n,r,i,o,a,s)=>(l,c)=>n(l).render(l,c).then((()=>Promise.all(Array.from(r(c)).map((e=>n(e).render(e,c)))))).then((()=>i(c))).then((n=>("function"!=typeof n.copyFromChannel?(a(n),rt(n)):t(o,(()=>o(n)))||s(n),e.add(n),n))))(Fr,lr,mr,na,qi,tt,Vr,Wr);xa=Oe,Sa=Pr;var xa,Sa;Ma=Pe,_a=Nr;var Ma,_a;var Aa,Ea=new Uint8Array(16);function Ca(){if(!Aa&&!(Aa="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Aa(Ea)}var ka=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Ta=function(e){return"string"==typeof e&&ka.test(e)},Ia=[],Oa=0;Oa<256;++Oa)Ia.push((Oa+256).toString(16).substr(1));var Ra=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Ia[e[t+0]]+Ia[e[t+1]]+Ia[e[t+2]]+Ia[e[t+3]]+"-"+Ia[e[t+4]]+Ia[e[t+5]]+"-"+Ia[e[t+6]]+Ia[e[t+7]]+"-"+Ia[e[t+8]]+Ia[e[t+9]]+"-"+Ia[e[t+10]]+Ia[e[t+11]]+Ia[e[t+12]]+Ia[e[t+13]]+Ia[e[t+14]]+Ia[e[t+15]]).toLowerCase();if(!Ta(n))throw TypeError("Stringified UUID is invalid");return n};var Pa=function(e,t,n){var r=(e=e||{}).random||(e.rng||Ca)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return Ra(r)};const Na=()=>Pa(),La=()=>Na().replace(new RegExp("-","g"),"").toUpperCase();var Da,Ba,ja,Fa,Ua,za,Ha,Va;(Ba=Da||(Da={}))[Ba.Debug=0]="Debug",Ba[Ba.Info=1]="Info",Ba[Ba.Warning=2]="Warning",Ba[Ba.Error=3]="Error";class Wa{constructor(e,t){this.privName=e,this.privEventId=La(),this.privEventTime=(new Date).toISOString(),this.privEventType=t,this.privMetadata={}}get name(){return this.privName}get eventId(){return this.privEventId}get eventTime(){return this.privEventTime}get eventType(){return this.privEventType}get metadata(){return this.privMetadata}}class Ga extends Wa{constructor(e,t,n=Da.Info){super(e,n),this.privAudioSourceId=t}get audioSourceId(){return this.privAudioSourceId}}class qa extends Ga{constructor(e){super("AudioSourceInitializingEvent",e)}}class Ka extends Ga{constructor(e){super("AudioSourceReadyEvent",e)}}class Ya extends Ga{constructor(e){super("AudioSourceOffEvent",e)}}class Ja extends Ga{constructor(e,t){super("AudioSourceErrorEvent",e,Da.Error),this.privError=t}get error(){return this.privError}}class Qa extends Ga{constructor(e,t,n){super(e,t),this.privAudioNodeId=n}get audioNodeId(){return this.privAudioNodeId}}class Xa extends Qa{constructor(e,t){super("AudioStreamNodeAttachingEvent",e,t)}}class Za extends Qa{constructor(e,t){super("AudioStreamNodeAttachedEvent",e,t)}}class $a extends Qa{constructor(e,t){super("AudioStreamNodeDetachedEvent",e,t)}}class es extends Qa{constructor(e,t,n){super("AudioStreamNodeErrorEvent",e,t),this.privError=n}get error(){return this.privError}}class ts extends Wa{constructor(e,t,n=Da.Info){super(e,n),this.privJsonResult=t}get jsonString(){return this.privJsonResult}}class ns extends Wa{constructor(e,t,n=Da.Info){super(e,n),this.privConnectionId=t}get connectionId(){return this.privConnectionId}}class rs extends ns{constructor(e,t,n){super("ConnectionStartEvent",e),this.privUri=t,this.privHeaders=n}get uri(){return this.privUri}get headers(){return this.privHeaders}}class is extends ns{constructor(e,t){super("ConnectionEstablishedEvent",e)}}class os extends ns{constructor(e,t,n){super("ConnectionClosedEvent",e,Da.Debug),this.privReason=n,this.privStatusCode=t}get reason(){return this.privReason}get statusCode(){return this.privStatusCode}}class as extends ns{constructor(e,t,n){super("ConnectionErrorEvent",e,Da.Debug),this.privMessage=t,this.privType=n}get message(){return this.privMessage}get type(){return this.privType}}class ss extends ns{constructor(e,t,n){super("ConnectionEstablishErrorEvent",e,Da.Error),this.privStatusCode=t,this.privReason=n}get reason(){return this.privReason}get statusCode(){return this.privStatusCode}}class ls extends ns{constructor(e,t,n){super("ConnectionMessageReceivedEvent",e),this.privNetworkReceivedTime=t,this.privMessage=n}get networkReceivedTime(){return this.privNetworkReceivedTime}get message(){return this.privMessage}}class cs extends ns{constructor(e,t,n){super("ConnectionMessageSentEvent",e),this.privNetworkSentTime=t,this.privMessage=n}get networkSentTime(){return this.privNetworkSentTime}get message(){return this.privMessage}}class us extends Error{constructor(e){super(e),this.name="ArgumentNull",this.message=e}}class ds extends Error{constructor(e){super(e),this.name="InvalidOperation",this.message=e}}class fs extends Error{constructor(e,t){super(t),this.name=e+"ObjectDisposed",this.message=t}}(Fa=ja||(ja={}))[Fa.Text=0]="Text",Fa[Fa.Binary=1]="Binary";class hs{constructor(e,t,n,r){if(this.privBody=null,e===ja.Text&&t&&"string"!=typeof t)throw new ds("Payload must be a string");if(e===ja.Binary&&t&&!(t instanceof ArrayBuffer))throw new ds("Payload must be ArrayBuffer");switch(this.privMessageType=e,this.privBody=t,this.privHeaders=n||{},this.privId=r||La(),this.messageType){case ja.Binary:this.privSize=null!==this.binaryBody?this.binaryBody.byteLength:0;break;case ja.Text:this.privSize=this.textBody.length}}get messageType(){return this.privMessageType}get headers(){return this.privHeaders}get body(){return this.privBody}get textBody(){if(this.privMessageType===ja.Binary)throw new ds("Not supported for binary message");return this.privBody}get binaryBody(){if(this.privMessageType===ja.Text)throw new ds("Not supported for text message");return this.privBody}get id(){return this.privId}}class ps{constructor(e,t){this.privStatusCode=e,this.privReason=t}get statusCode(){return this.privStatusCode}get reason(){return this.privReason}}class ms{constructor(e){this.privEventListeners={},this.privIsDisposed=!1,this.onEvent=e=>{if(this.isDisposed())throw new fs("EventSource");if(this.metadata)for(const t in this.metadata)t&&e.metadata&&(e.metadata[t]||(e.metadata[t]=this.metadata[t]));for(const t in this.privEventListeners)t&&this.privEventListeners[t]&&this.privEventListeners[t](e)},this.attach=e=>{const t=La();return this.privEventListeners[t]=e,{detach:()=>(delete this.privEventListeners[t],Promise.resolve())}},this.attachListener=e=>this.attach(e.onEvent),this.isDisposed=()=>this.privIsDisposed,this.dispose=()=>{this.privEventListeners=null,this.privIsDisposed=!0},this.privMetadata=e}get metadata(){return this.privMetadata}}class gs{static get instance(){return gs.privInstance}}gs.privInstance=new ms,gs.setEventSource=e=>{if(!e)throw new us("eventSource");gs.privInstance=e},(za=Ua||(Ua={}))[za.None=0]="None",za[za.Connected=1]="Connected",za[za.Connecting=2]="Connecting",za[za.Disconnected=3]="Disconnected",(Va=Ha||(Ha={}))[Va.None=0]="None",Va[Va.Resolved=1]="Resolved",Va[Va.Rejected=2]="Rejected";class vs{constructor(){this.resolve=e=>(this.privResolve(e),this),this.reject=e=>(this.privReject(e),this),this.privPromise=new Promise(((e,t)=>{this.privResolve=e,this.privReject=t}))}get promise(){return this.privPromise}}function ys(e,t,n){e.then((e=>{try{t&&t(e)}catch(e){if(n)try{if(e instanceof Error){const t=e;n(t.name+": "+t.message)}else n(e)}catch(e){}}}),(e=>{if(n)try{if(e instanceof Error){const t=e;n(t.name+": "+t.message)}else n(e)}catch(e){}}))}var bs={};e(bs,"Queue",(()=>_s),(e=>_s=e));class ws{constructor(e){if(this.privSubscriptionIdCounter=0,this.privAddSubscriptions={},this.privRemoveSubscriptions={},this.privDisposedSubscriptions={},this.privDisposeReason=null,this.get=e=>(this.throwIfDisposed(),this.privList[e]),this.first=()=>this.get(0),this.last=()=>this.get(this.length()-1),this.add=e=>{this.throwIfDisposed(),this.insertAt(this.privList.length,e)},this.insertAt=(e,t)=>{this.throwIfDisposed(),0===e?this.privList.unshift(t):e===this.privList.length?this.privList.push(t):this.privList.splice(e,0,t),this.triggerSubscriptions(this.privAddSubscriptions)},this.removeFirst=()=>(this.throwIfDisposed(),this.removeAt(0)),this.removeLast=()=>(this.throwIfDisposed(),this.removeAt(this.length()-1)),this.removeAt=e=>(this.throwIfDisposed(),this.remove(e,1)[0]),this.remove=(e,t)=>{this.throwIfDisposed();const n=this.privList.splice(e,t);return this.triggerSubscriptions(this.privRemoveSubscriptions),n},this.clear=()=>{this.throwIfDisposed(),this.remove(0,this.length())},this.length=()=>(this.throwIfDisposed(),this.privList.length),this.onAdded=e=>{this.throwIfDisposed();const t=this.privSubscriptionIdCounter++;return this.privAddSubscriptions[t]=e,{detach:()=>(delete this.privAddSubscriptions[t],Promise.resolve())}},this.onRemoved=e=>{this.throwIfDisposed();const t=this.privSubscriptionIdCounter++;return this.privRemoveSubscriptions[t]=e,{detach:()=>(delete this.privRemoveSubscriptions[t],Promise.resolve())}},this.onDisposed=e=>{this.throwIfDisposed();const t=this.privSubscriptionIdCounter++;return this.privDisposedSubscriptions[t]=e,{detach:()=>(delete this.privDisposedSubscriptions[t],Promise.resolve())}},this.join=e=>(this.throwIfDisposed(),this.privList.join(e)),this.toArray=()=>{const e=Array();return this.privList.forEach((t=>{e.push(t)})),e},this.any=e=>(this.throwIfDisposed(),e?this.where(e).length()>0:this.length()>0),this.all=e=>(this.throwIfDisposed(),this.where(e).length()===this.length()),this.forEach=e=>{this.throwIfDisposed();for(let t=0;t<this.length();t++)e(this.privList[t],t)},this.select=e=>{this.throwIfDisposed();const t=[];for(let n=0;n<this.privList.length;n++)t.push(e(this.privList[n],n));return new ws(t)},this.where=e=>{this.throwIfDisposed();const t=new ws;for(let n=0;n<this.privList.length;n++)e(this.privList[n],n)&&t.add(this.privList[n]);return t},this.orderBy=e=>{this.throwIfDisposed();const t=this.toArray().sort(e);return new ws(t)},this.orderByDesc=e=>(this.throwIfDisposed(),this.orderBy(((t,n)=>e(n,t)))),this.clone=()=>(this.throwIfDisposed(),new ws(this.toArray())),this.concat=e=>(this.throwIfDisposed(),new ws(this.privList.concat(e.toArray()))),this.concatArray=e=>(this.throwIfDisposed(),new ws(this.privList.concat(e))),this.isDisposed=()=>null==this.privList,this.dispose=e=>{this.isDisposed()||(this.privDisposeReason=e,this.privList=null,this.privAddSubscriptions=null,this.privRemoveSubscriptions=null,this.triggerSubscriptions(this.privDisposedSubscriptions))},this.throwIfDisposed=()=>{if(this.isDisposed())throw new fs("List",this.privDisposeReason)},this.triggerSubscriptions=e=>{if(e)for(const t in e)t&&e[t]()},this.privList=[],e)for(const t of e)this.privList.push(t)}}var xs,Ss,Ms=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};(Ss=xs||(xs={}))[Ss.Dequeue=0]="Dequeue",Ss[Ss.Peek=1]="Peek";class _s{constructor(e){this.privPromiseStore=new ws,this.privIsDrainInProgress=!1,this.privIsDisposing=!1,this.privDisposeReason=null,this.enqueue=e=>{this.throwIfDispose(),this.enqueueFromPromise(new Promise(((t,n)=>{t(e)})))},this.enqueueFromPromise=e=>{this.throwIfDispose(),e.then((e=>{this.privList.add(e)}),(e=>{}))},this.dequeue=()=>{this.throwIfDispose();const e=new vs;return this.privSubscribers&&(this.privSubscribers.add({deferral:e,type:xs.Dequeue}),this.drain()),e.promise},this.peek=()=>{this.throwIfDispose();const e=new vs;return this.privSubscribers&&(this.privSubscribers.add({deferral:e,type:xs.Peek}),this.drain()),e.promise},this.length=()=>(this.throwIfDispose(),this.privList.length()),this.isDisposed=()=>null==this.privSubscribers,this.drain=()=>{if(!this.privIsDrainInProgress&&!this.privIsDisposing){this.privIsDrainInProgress=!0;const e=this.privSubscribers,t=this.privList;if(e&&t){for(;t.length()>0&&e.length()>0&&!this.privIsDisposing;){const n=e.removeFirst();if(n.type===xs.Peek)n.deferral.resolve(t.first());else{const e=t.removeFirst();n.deferral.resolve(e)}}this.privSubscribers===e&&(this.privSubscribers=e),this.privList===t&&(this.privList=t)}this.privIsDrainInProgress=!1}},this.throwIfDispose=()=>{if(this.isDisposed()){if(this.privDisposeReason)throw new ds(this.privDisposeReason);throw new fs("Queue")}if(this.privIsDisposing)throw new ds("Queue disposing")},this.privList=e||new ws,this.privDetachables=[],this.privSubscribers=new ws,this.privDetachables.push(this.privList.onAdded(this.drain))}drainAndDispose(e,t){return Ms(this,void 0,void 0,(function*(){if(!this.isDisposed()&&!this.privIsDisposing){this.privDisposeReason=t,this.privIsDisposing=!0;const n=this.privSubscribers;if(n){for(;n.length()>0;){n.removeFirst().deferral.resolve(void 0)}this.privSubscribers===n&&(this.privSubscribers=n)}for(const e of this.privDetachables)yield e.detach();if(this.privPromiseStore.length()>0&&e){const t=[];return this.privPromiseStore.toArray().forEach((e=>{t.push(e)})),Promise.all(t).finally((()=>{this.privSubscribers=null,this.privList.forEach(((t,n)=>{e(t)})),this.privList=null})).then()}this.privSubscribers=null,this.privList=null}}))}dispose(e){return Ms(this,void 0,void 0,(function*(){yield this.drainAndDispose(null,e)}))}}class As{constructor(e,t,n){if(this.privPayload=null,!t)throw new us("payload");if(e===ja.Binary&&"ArrayBuffer"!==t.__proto__.constructor.name)throw new ds("Payload must be ArrayBuffer");if(e===ja.Text&&"string"!=typeof t)throw new ds("Payload must be a string");this.privMessageType=e,this.privPayload=t,this.privId=n||La()}get messageType(){return this.privMessageType}get payload(){return this.privPayload}get textContent(){if(this.privMessageType===ja.Binary)throw new ds("Not supported for binary message");return this.privPayload}get binaryContent(){if(this.privMessageType===ja.Text)throw new ds("Not supported for text message");return this.privPayload}get id(){return this.privId}}class Es{constructor(e,t){this.encode=e=>{const t=this.downSampleAudioFrame(e,this.privActualSampleRate,this.privDesiredSampleRate);if(!t)return null;const n=2*t.length,r=new ArrayBuffer(n),i=new DataView(r);return this.floatTo16BitPCM(i,0,t),r},this.setString=(e,t,n)=>{for(let r=0;r<n.length;r++)e.setUint8(t+r,n.charCodeAt(r))},this.floatTo16BitPCM=(e,t,n)=>{for(let r=0;r<n.length;r++,t+=2){const i=Math.max(-1,Math.min(1,n[r]));e.setInt16(t,i<0?32768*i:32767*i,!0)}},this.downSampleAudioFrame=(e,t,n)=>{if(!e)return null;if(n===t||n>t)return e;const r=t/n,i=Math.round(e.length/r),o=new Float32Array(i);let a=0,s=0;for(;s<i;){const t=Math.round((s+1)*r);let n=0,i=0;for(;a<t&&a<e.length;)n+=e[a++],i++;o[s++]=n/i}return o},this.privActualSampleRate=e,this.privDesiredSampleRate=t}}var Cs={};e(Cs,"Stream",(()=>Os),(e=>Os=e));var ks,Ts,Is=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class Os{constructor(e){this.privIsWriteEnded=!1,this.privIsReadEnded=!1,this.read=()=>{if(this.privIsReadEnded)throw new ds("Stream read has already finished");return this.privReaderQueue.dequeue().then((e=>Is(this,void 0,void 0,(function*(){return(void 0===e||e.isEnd)&&(yield this.privReaderQueue.dispose("End of stream reached")),e}))))},this.readEnded=()=>{this.privIsReadEnded||(this.privIsReadEnded=!0,this.privReaderQueue=new(0,bs.Queue))},this.throwIfClosed=()=>{if(this.privIsWriteEnded)throw new ds("Stream closed")},this.privId=e||La(),this.privReaderQueue=new(0,bs.Queue)}get isClosed(){return this.privIsWriteEnded}get isReadEnded(){return this.privIsReadEnded}get id(){return this.privId}close(){this.privIsWriteEnded||(this.writeStreamChunk({buffer:null,isEnd:!0,timeReceived:Date.now()}),this.privIsWriteEnded=!0)}writeStreamChunk(e){if(this.throwIfClosed(),!this.privReaderQueue.isDisposed())try{this.privReaderQueue.enqueue(e)}catch(e){}}}(Ts=ks||(ks={}))[Ts.Success=0]="Success",Ts[Ts.Error=1]="Error";class Rs extends Cs.Stream{constructor(e,t){super(t),this.privTargetChunkSize=e,this.privNextBufferReadyBytes=0}writeStreamChunk(e){if(e.isEnd||0===this.privNextBufferReadyBytes&&e.buffer.byteLength===this.privTargetChunkSize)return void super.writeStreamChunk(e);let t=0;for(;t<e.buffer.byteLength;){void 0===this.privNextBufferToWrite&&(this.privNextBufferToWrite=new ArrayBuffer(this.privTargetChunkSize),this.privNextBufferStartTime=e.timeReceived);const n=Math.min(e.buffer.byteLength-t,this.privTargetChunkSize-this.privNextBufferReadyBytes),r=new Uint8Array(this.privNextBufferToWrite),i=new Uint8Array(e.buffer.slice(t,n+t));r.set(i,this.privNextBufferReadyBytes),this.privNextBufferReadyBytes+=n,t+=n,this.privNextBufferReadyBytes===this.privTargetChunkSize&&(super.writeStreamChunk({buffer:this.privNextBufferToWrite,isEnd:!1,timeReceived:this.privNextBufferStartTime}),this.privNextBufferReadyBytes=0,this.privNextBufferToWrite=void 0)}}close(){0===this.privNextBufferReadyBytes||this.isClosed||super.writeStreamChunk({buffer:this.privNextBufferToWrite.slice(0,this.privNextBufferReadyBytes),isEnd:!1,timeReceived:this.privNextBufferStartTime}),super.close()}}class Ps{}Ps.workerTimers=null,Ps.clearTimeout=e=>Ps.timers().clearTimeout(e),Ps.setTimeout=(e,t)=>Ps.timers().setTimeout(e,t),Ps.load=e=>{const t=new Map([[0,()=>{}]]),n=new Map,r=new Worker(e);r.addEventListener("message",(({data:e})=>{if(Ps.isCallNotification(e)){const{params:{timerId:r}}=e,i=t.get(r);if("number"==typeof i){const e=n.get(i);if(void 0===e||e!==r)throw new Error("The timer is in an undefined state.")}else{if(void 0===i)throw new Error("The timer is in an undefined state.");i(),t.delete(r)}}else{if(!Ps.isClearResponse(e)){const{error:{message:t}}=e;throw new Error(t)}{const{id:r}=e,i=n.get(r);if(void 0===i)throw new Error("The timer is in an undefined state.");n.delete(r),t.delete(i)}}}));return{clearTimeout:e=>{const i=Math.random();n.set(i,e),t.set(e,i),r.postMessage({id:i,method:"clear",params:{timerId:e}})},setTimeout:(e,n)=>{const i=Math.random();return t.set(i,e),r.postMessage({id:null,method:"set",params:{delay:n,now:performance.now(),timerId:i}}),i}}},Ps.loadWorkerTimers=()=>()=>{if(null!==Ps.workerTimers)return Ps.workerTimers;const e=new Blob(['!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=14)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return d}));const r=new Map,o=new Map,i=e=>{const t=r.get(e);if(void 0===t)throw new Error(\'There is no interval scheduled with the given id "\'.concat(e,\'".\'));clearTimeout(t),r.delete(e)},u=e=>{const t=o.get(e);if(void 0===t)throw new Error(\'There is no timeout scheduled with the given id "\'.concat(e,\'".\'));clearTimeout(t),o.delete(e)},f=(e,t)=>{let n,r;if("performance"in self){const o=performance.now();n=o,r=e-Math.max(0,o-t)}else n=Date.now(),r=e;return{expected:n+r,remainingDelay:r}},c=(e,t,n,r)=>{const o="performance"in self?performance.now():Date.now();o>n?postMessage({id:null,method:"call",params:{timerId:t}}):e.set(t,setTimeout(c,n-o,e,t,n))},a=(e,t,n)=>{const{expected:o,remainingDelay:i}=f(e,n);r.set(t,setTimeout(c,i,r,t,o))},d=(e,t,n)=>{const{expected:r,remainingDelay:i}=f(e,n);o.set(t,setTimeout(c,i,o,t,r))}},function(e,t,n){"use strict";n.r(t);var r=n(2);for(var o in r)"default"!==o&&function(e){n.d(t,e,(function(){return r[e]}))}(o);var i=n(3);for(var o in i)"default"!==o&&function(e){n.d(t,e,(function(){return i[e]}))}(o);var u=n(4);for(var o in u)"default"!==o&&function(e){n.d(t,e,(function(){return u[e]}))}(o);var f=n(5);for(var o in f)"default"!==o&&function(e){n.d(t,e,(function(){return f[e]}))}(o);var c=n(6);for(var o in c)"default"!==o&&function(e){n.d(t,e,(function(){return c[e]}))}(o);var a=n(7);for(var o in a)"default"!==o&&function(e){n.d(t,e,(function(){return a[e]}))}(o);var d=n(8);for(var o in d)"default"!==o&&function(e){n.d(t,e,(function(){return d[e]}))}(o);var s=n(9);for(var o in s)"default"!==o&&function(e){n.d(t,e,(function(){return s[e]}))}(o)},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.r(t);var r=n(11);for(var o in r)"default"!==o&&function(e){n.d(t,e,(function(){return r[e]}))}(o);var i=n(12);for(var o in i)"default"!==o&&function(e){n.d(t,e,(function(){return i[e]}))}(o);var u=n(13);for(var o in u)"default"!==o&&function(e){n.d(t,e,(function(){return u[e]}))}(o)},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(1);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);var u=n(10);for(var i in u)"default"!==i&&function(e){n.d(t,e,(function(){return u[e]}))}(i);addEventListener("message",({data:e})=>{try{if("clear"===e.method){const{id:t,params:{timerId:n}}=e;Object(r.b)(n),postMessage({error:null,id:t})}else{if("set"!==e.method)throw new Error(\'The given method "\'.concat(e.method,\'" is not supported\'));{const{params:{delay:t,now:n,timerId:o}}=e;Object(r.d)(t,o,n)}}}catch(t){postMessage({error:{message:t.message},id:e.id,result:null})}})}]);'],{type:"application/javascript; charset=utf-8"}),t=URL.createObjectURL(e);return Ps.workerTimers=Ps.load(t),Ps.workerTimers.setTimeout((()=>URL.revokeObjectURL(t)),0),Ps.workerTimers},Ps.timers=Ps.loadWorkerTimers(),Ps.isCallNotification=e=>void 0!==e.method&&"call"===e.method,Ps.isClearResponse=e=>null===e.error&&"number"==typeof e.id;class Ns extends Wa{constructor(e,t,n){super(e,t),this.privSignature=n}}class Ls extends Ns{constructor(e){super("OCSPMemoryCacheHitEvent",Da.Debug,e)}}class Ds extends Ns{constructor(e){super("OCSPCacheMissEvent",Da.Debug,e)}}class Bs extends Ns{constructor(e){super("OCSPDiskCacheHitEvent",Da.Debug,e)}}class js extends Ns{constructor(e){super("OCSPCacheUpdateNeededEvent",Da.Debug,e)}}class Fs extends Ns{constructor(e){super("OCSPMemoryCacheStoreEvent",Da.Debug,e)}}class Us extends Ns{constructor(e){super("OCSPDiskCacheStoreEvent",Da.Debug,e)}}class zs extends Ns{constructor(e){super("OCSPCacheUpdateCompleteEvent",Da.Debug,e)}}class Hs extends Ns{constructor(){super("OCSPStapleReceivedEvent",Da.Debug,"")}}class Vs extends Ns{constructor(e,t){super("OCSPCacheEntryExpiredEvent",Da.Debug,e),this.privExpireTime=t}}class Ws extends Ns{constructor(e,t,n){super("OCSPCacheEntryNeedsRefreshEvent",Da.Debug,e),this.privExpireTime=n,this.privStartTime=t}}class Gs extends Ns{constructor(e,t,n){super("OCSPCacheHitEvent",Da.Debug,e),this.privExpireTime=n,this.privExpireTimeString=new Date(n).toLocaleDateString(),this.privStartTime=t,this.privStartTimeString=new Date(t).toLocaleTimeString()}}class qs extends Ns{constructor(e,t){super("OCSPVerificationFailedEvent",Da.Debug,e),this.privError=t}}class Ks extends Ns{constructor(e,t){super("OCSPCacheFetchErrorEvent",Da.Debug,e),this.privError=t}}class Ys extends Ns{constructor(e){super("OCSPResponseRetrievedEvent",Da.Debug,e)}}class Js extends Ns{constructor(e,t){super("OCSPCacheUpdateErrorEvent",Da.Debug,e),this.privError=t}}class Qs extends Wa{constructor(e){super("BackgroundEvent",Da.Error),this.privError=e}get error(){return this.privError}}var Xs={};e(Xs,"MicAudioSource",(()=>mu),(e=>mu=e));class Zs{}Zs.AuthKey="Ocp-Apim-Subscription-Key",Zs.ConnectionId="X-ConnectionId",Zs.ContentType="Content-Type",Zs.CustomCommandsAppId="X-CommandsAppId",Zs.Path="Path",Zs.RequestId="X-RequestId",Zs.RequestStreamId="X-StreamId",Zs.RequestTimestamp="X-Timestamp";class $s{constructor(e,t){this.privHeaderName=e,this.privToken=t}get headerName(){return this.privHeaderName}get token(){return this.privToken}}class el{constructor(e){if(this.fetch=e=>Promise.resolve(this.privAuthInfo),this.fetchOnExpiry=e=>Promise.resolve(this.privAuthInfo),!e)throw new us("subscriptionKey");this.privAuthInfo=new $s(Zs.AuthKey,e)}}const tl="Authorization";class nl{constructor(e,t){if(this.fetch=e=>this.privFetchCallback(e).then((e=>new $s(tl,nl.privTokenPrefix+e))),this.fetchOnExpiry=e=>this.privFetchOnExpiryCallback(e).then((e=>new $s(tl,nl.privTokenPrefix+e))),!e)throw new us("fetchCallback");if(!t)throw new us("fetchOnExpiryCallback");this.privFetchCallback=e,this.privFetchOnExpiryCallback=t}}nl.privTokenPrefix="bearer ";var rl,il,ol,al,sl,ll,cl={};e(cl,"ServiceRecognizerBase",(()=>Sl),(e=>Sl=e)),(il=rl||(rl={}))[il.Error=0]="Error",il[il.EndOfStream=1]="EndOfStream",(al=ol||(ol={}))[al.NoError=0]="NoError",al[al.AuthenticationFailure=1]="AuthenticationFailure",al[al.BadRequestParameters=2]="BadRequestParameters",al[al.TooManyRequests=3]="TooManyRequests",al[al.ConnectionFailure=4]="ConnectionFailure",al[al.ServiceTimeout=5]="ServiceTimeout",al[al.ServiceError=6]="ServiceError",al[al.RuntimeError=7]="RuntimeError",al[al.Forbidden=8]="Forbidden",(ll=sl||(sl={}))[ll.SpeechServiceConnection_Key=0]="SpeechServiceConnection_Key",ll[ll.SpeechServiceConnection_Endpoint=1]="SpeechServiceConnection_Endpoint",ll[ll.SpeechServiceConnection_Region=2]="SpeechServiceConnection_Region",ll[ll.SpeechServiceAuthorization_Token=3]="SpeechServiceAuthorization_Token",ll[ll.SpeechServiceAuthorization_Type=4]="SpeechServiceAuthorization_Type",ll[ll.SpeechServiceConnection_EndpointId=5]="SpeechServiceConnection_EndpointId",ll[ll.SpeechServiceConnection_TranslationToLanguages=6]="SpeechServiceConnection_TranslationToLanguages",ll[ll.SpeechServiceConnection_TranslationVoice=7]="SpeechServiceConnection_TranslationVoice",ll[ll.SpeechServiceConnection_TranslationFeatures=8]="SpeechServiceConnection_TranslationFeatures",ll[ll.SpeechServiceConnection_IntentRegion=9]="SpeechServiceConnection_IntentRegion",ll[ll.SpeechServiceConnection_ProxyHostName=10]="SpeechServiceConnection_ProxyHostName",ll[ll.SpeechServiceConnection_ProxyPort=11]="SpeechServiceConnection_ProxyPort",ll[ll.SpeechServiceConnection_ProxyUserName=12]="SpeechServiceConnection_ProxyUserName",ll[ll.SpeechServiceConnection_ProxyPassword=13]="SpeechServiceConnection_ProxyPassword",ll[ll.SpeechServiceConnection_RecoMode=14]="SpeechServiceConnection_RecoMode",ll[ll.SpeechServiceConnection_RecoLanguage=15]="SpeechServiceConnection_RecoLanguage",ll[ll.Speech_SessionId=16]="Speech_SessionId",ll[ll.SpeechServiceConnection_SynthLanguage=17]="SpeechServiceConnection_SynthLanguage",ll[ll.SpeechServiceConnection_SynthVoice=18]="SpeechServiceConnection_SynthVoice",ll[ll.SpeechServiceConnection_SynthOutputFormat=19]="SpeechServiceConnection_SynthOutputFormat",ll[ll.SpeechServiceConnection_AutoDetectSourceLanguages=20]="SpeechServiceConnection_AutoDetectSourceLanguages",ll[ll.SpeechServiceResponse_RequestDetailedResultTrueFalse=21]="SpeechServiceResponse_RequestDetailedResultTrueFalse",ll[ll.SpeechServiceResponse_RequestProfanityFilterTrueFalse=22]="SpeechServiceResponse_RequestProfanityFilterTrueFalse",ll[ll.SpeechServiceResponse_JsonResult=23]="SpeechServiceResponse_JsonResult",ll[ll.SpeechServiceResponse_JsonErrorDetails=24]="SpeechServiceResponse_JsonErrorDetails",ll[ll.CancellationDetails_Reason=25]="CancellationDetails_Reason",ll[ll.CancellationDetails_ReasonText=26]="CancellationDetails_ReasonText",ll[ll.CancellationDetails_ReasonDetailedText=27]="CancellationDetails_ReasonDetailedText",ll[ll.LanguageUnderstandingServiceResponse_JsonResult=28]="LanguageUnderstandingServiceResponse_JsonResult",ll[ll.SpeechServiceConnection_Url=29]="SpeechServiceConnection_Url",ll[ll.SpeechServiceConnection_InitialSilenceTimeoutMs=30]="SpeechServiceConnection_InitialSilenceTimeoutMs",ll[ll.SpeechServiceConnection_EndSilenceTimeoutMs=31]="SpeechServiceConnection_EndSilenceTimeoutMs",ll[ll.SpeechServiceConnection_EnableAudioLogging=32]="SpeechServiceConnection_EnableAudioLogging",ll[ll.SpeechServiceResponse_ProfanityOption=33]="SpeechServiceResponse_ProfanityOption",ll[ll.SpeechServiceResponse_PostProcessingOption=34]="SpeechServiceResponse_PostProcessingOption",ll[ll.SpeechServiceResponse_RequestWordLevelTimestamps=35]="SpeechServiceResponse_RequestWordLevelTimestamps",ll[ll.SpeechServiceResponse_StablePartialResultThreshold=36]="SpeechServiceResponse_StablePartialResultThreshold",ll[ll.SpeechServiceResponse_OutputFormatOption=37]="SpeechServiceResponse_OutputFormatOption",ll[ll.SpeechServiceResponse_TranslationRequestStablePartialResult=38]="SpeechServiceResponse_TranslationRequestStablePartialResult",ll[ll.Conversation_ApplicationId=39]="Conversation_ApplicationId",ll[ll.Conversation_DialogType=40]="Conversation_DialogType",ll[ll.Conversation_Initial_Silence_Timeout=41]="Conversation_Initial_Silence_Timeout",ll[ll.Conversation_From_Id=42]="Conversation_From_Id",ll[ll.Conversation_Conversation_Id=43]="Conversation_Conversation_Id",ll[ll.Conversation_Custom_Voice_Deployment_Ids=44]="Conversation_Custom_Voice_Deployment_Ids",ll[ll.Conversation_Speech_Activity_Template=45]="Conversation_Speech_Activity_Template",ll[ll.Conversation_Request_Bot_Status_Messages=46]="Conversation_Request_Bot_Status_Messages",ll[ll.Conversation_Agent_Connection_Id=47]="Conversation_Agent_Connection_Id",ll[ll.SpeechServiceConnection_Host=48]="SpeechServiceConnection_Host",ll[ll.ConversationTranslator_Host=49]="ConversationTranslator_Host",ll[ll.ConversationTranslator_Name=50]="ConversationTranslator_Name",ll[ll.ConversationTranslator_CorrelationId=51]="ConversationTranslator_CorrelationId",ll[ll.ConversationTranslator_Token=52]="ConversationTranslator_Token",ll[ll.PronunciationAssessment_ReferenceText=53]="PronunciationAssessment_ReferenceText",ll[ll.PronunciationAssessment_GradingSystem=54]="PronunciationAssessment_GradingSystem",ll[ll.PronunciationAssessment_Granularity=55]="PronunciationAssessment_Granularity",ll[ll.PronunciationAssessment_EnableMiscue=56]="PronunciationAssessment_EnableMiscue",ll[ll.PronunciationAssessment_Json=57]="PronunciationAssessment_Json",ll[ll.PronunciationAssessment_Params=58]="PronunciationAssessment_Params",ll[ll.SpeakerRecognition_Api_Version=59]="SpeakerRecognition_Api_Version";class ul{constructor(e){this.privSessionId=e}get sessionId(){return this.privSessionId}}class dl extends ul{constructor(e,t){super(t),this.privOffset=e}get offset(){return this.privOffset}}class fl extends hs{constructor(e,t,n,r,i,o,a,s){if(!t)throw new us("path");if(!n)throw new us("requestId");const l={};if(l[Zs.Path]=t,l[Zs.RequestId]=n,l[Zs.RequestTimestamp]=(new Date).toISOString(),r&&(l[Zs.ContentType]=r),o&&(l[Zs.RequestStreamId]=o),a)for(const e in a)e&&(l[e]=a[e]);s?super(e,i,l,s):super(e,i,l),this.privPath=t,this.privRequestId=n,this.privContentType=r,this.privStreamId=o,this.privAdditionalHeaders=a}get path(){return this.privPath}get requestId(){return this.privRequestId}get contentType(){return this.privContentType}get streamId(){return this.privStreamId}get additionalHeaders(){return this.privAdditionalHeaders}}fl.fromConnectionMessage=e=>{let t=null,n=null,r=null,i=null,o=null;const a={};if(e.headers)for(const s in e.headers)s&&(s.toLowerCase()===Zs.Path.toLowerCase()?t=e.headers[s]:s.toLowerCase()===Zs.RequestId.toLowerCase()?n=e.headers[s]:s.toLowerCase()===Zs.RequestTimestamp.toLowerCase()?i=e.headers[s]:s.toLowerCase()===Zs.ContentType.toLowerCase()?r=e.headers[s]:s.toLowerCase()===Zs.RequestStreamId.toLowerCase()?o=e.headers[s]:a[s]=e.headers[s]);return new fl(e.messageType,t,n,r,e.body,o,a,e.id)};var hl,pl,ml,gl,vl,yl,bl,wl,xl=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class Sl{constructor(e,t,n,r,i){if(this.privSetTimeout=setTimeout,this.privIsLiveAudio=!1,this.recognizeOverride=void 0,this.disconnectOverride=void 0,this.receiveMessageOverride=void 0,this.sendSpeechContext=e=>{const t=this.speechContext.toJSON();if(this.privRequestSession.onSpeechContext(),t)return e.send(new fl(ja.Text,"speech.context",this.privRequestSession.requestId,"application/json",t))},this.sendPrePayloadJSONOverride=void 0,this.postConnectImplOverride=void 0,this.configConnectionOverride=void 0,this.sendSpeechServiceConfig=(e,t,n)=>{if(!0!==Sl.telemetryDataEnabled){const e={context:{system:JSON.parse(n).context.system}};n=JSON.stringify(e)}if("true"===this.privRecognizerConfig.parameters.getProperty("TranscriptionService_SingleChannel","false").toLowerCase()){const e=JSON.parse(n);e.context.DisableReferenceChannel="True",e.context.MicSpec="1_0_0",n=JSON.stringify(e)}if(n)return e.send(new fl(ja.Text,"speech.config",t.requestId,"application/json",n))},!e)throw new us("authentication");if(!t)throw new us("connectionFactory");if(!n)throw new us("audioSource");if(!r)throw new us("recognizerConfig");this.privMustReportEndOfStream=!1,this.privAuthentication=e,this.privConnectionFactory=t,this.privAudioSource=n,this.privRecognizerConfig=r,this.privIsDisposed=!1,this.privRecognizer=i,this.privRequestSession=new(0,ic.RequestSession)(this.privAudioSource.id()),this.privConnectionEvents=new ms,this.privServiceEvents=new ms,this.privDynamicGrammar=new xc,this.privSpeechContext=new wc(this.privDynamicGrammar),this.privAgentConfig=new Fc,"undefined"!=typeof Blob&&"undefined"!=typeof Worker&&(this.privSetTimeout=Ps.setTimeout),this.connectionEvents.attach((e=>xl(this,void 0,void 0,(function*(){if("ConnectionClosedEvent"===e.name){const t=e;(1003===t.statusCode||1007===t.statusCode||1002===t.statusCode||4e3===t.statusCode||this.privRequestSession.numConnectionAttempts>this.privRecognizerConfig.maxRetryCount)&&(yield this.cancelRecognitionLocal(rl.Error,1007===t.statusCode?ol.BadRequestParameters:ol.ConnectionFailure,t.reason+" websocket error code: "+t.statusCode))}}))))}get audioSource(){return this.privAudioSource}get speechContext(){return this.privSpeechContext}get dynamicGrammar(){return this.privDynamicGrammar}get agentConfig(){return this.privAgentConfig}set conversationTranslatorToken(e){this.privRecognizerConfig.parameters.setProperty(sl.ConversationTranslator_Token,e)}set authentication(e){this.privAuthentication=this.authentication}isDisposed(){return this.privIsDisposed}dispose(e){return xl(this,void 0,void 0,(function*(){if(this.privIsDisposed=!0,this.privConnectionConfigurationPromise)try{const t=yield this.privConnectionConfigurationPromise;yield t.dispose(e)}catch(e){return}}))}get connectionEvents(){return this.privConnectionEvents}get serviceEvents(){return this.privServiceEvents}get recognitionMode(){return this.privRecognizerConfig.recognitionMode}recognize(e,t,n){return xl(this,void 0,void 0,(function*(){if(void 0!==this.recognizeOverride)return this.recognizeOverride(e,t,n);this.privConnectionConfigurationPromise=null,this.privRecognizerConfig.recognitionMode=e,this.privSuccessCallback=t,this.privErrorCallback=n,this.privRequestSession.startNewRecognition(),this.privRequestSession.listenForServiceTelemetry(this.privAudioSource.events);const r=this.connectImpl();let i;try{const e=yield this.audioSource.attach(this.privRequestSession.audioNodeId),t=yield this.audioSource.format,n=yield this.audioSource.deviceInfo;this.privIsLiveAudio=n.type&&n.type===bl.Microphones,i=new ed(e,t.avgBytesPerSec),yield this.privRequestSession.onAudioSourceAttachCompleted(i,!1),this.privRecognizerConfig.SpeechServiceConfig.Context.audio={source:n}}catch(e){throw yield this.privRequestSession.onStopRecognizing(),e}try{yield r}catch(e){return void(yield this.cancelRecognitionLocal(rl.Error,ol.ConnectionFailure,e))}const o=new ul(this.privRequestSession.sessionId);this.privRecognizer.sessionStarted&&this.privRecognizer.sessionStarted(this.privRecognizer,o);this.receiveMessage();this.sendAudio(i).catch((e=>xl(this,void 0,void 0,(function*(){yield this.cancelRecognitionLocal(rl.Error,ol.RuntimeError,e)}))))}))}stopRecognizing(){return xl(this,void 0,void 0,(function*(){if(this.privRequestSession.isRecognizing)try{yield this.audioSource.turnOff(),yield this.sendFinalAudio(),yield this.privRequestSession.onStopRecognizing(),yield this.privRequestSession.turnCompletionPromise}finally{yield this.privRequestSession.dispose()}}))}connect(){return xl(this,void 0,void 0,(function*(){return yield this.connectImpl(),Promise.resolve()}))}connectAsync(e,t){this.connectImpl().then((n=>{try{e&&e()}catch(e){t&&t(e)}}),(e=>{try{t&&t(e)}catch(e){}}))}disconnect(){return xl(this,void 0,void 0,(function*(){yield this.cancelRecognitionLocal(rl.Error,ol.NoError,"Disconnecting"),void 0!==this.disconnectOverride&&(yield this.disconnectOverride());try{yield(yield this.privConnectionPromise).dispose()}catch(e){}this.privConnectionPromise=null}))}sendMessage(e){}sendNetworkMessage(e,t){return xl(this,void 0,void 0,(function*(){const n="string"==typeof t?ja.Text:ja.Binary,r="string"==typeof t?"application/json":"";return(yield this.fetchConnection()).send(new fl(n,e,this.privRequestSession.requestId,r,t))}))}set activityTemplate(e){this.privActivityTemplate=e}get activityTemplate(){return this.privActivityTemplate}sendTelemetryData(){return xl(this,void 0,void 0,(function*(){const e=this.privRequestSession.getTelemetry();if(!0!==Sl.telemetryDataEnabled||this.privIsDisposed||null===e)return;if(Sl.telemetryData)try{Sl.telemetryData(e)}catch(e){}const t=yield this.fetchConnection();yield t.send(new fl(ja.Text,"telemetry",this.privRequestSession.requestId,"application/json",e))}))}cancelRecognitionLocal(e,t,n){return xl(this,void 0,void 0,(function*(){this.privRequestSession.isRecognizing&&(yield this.privRequestSession.onStopRecognizing(),this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,e,t,n))}))}receiveMessage(){return xl(this,void 0,void 0,(function*(){try{if(this.privIsDisposed)return;let e=yield this.fetchConnection();const t=yield e.read();if(void 0!==this.receiveMessageOverride)return this.receiveMessageOverride();if(!t)return this.privRequestSession.isRecognizing?this.receiveMessage():void 0;this.privServiceHasSentMessage=!0;const n=fl.fromConnectionMessage(t);if(n.requestId.toLowerCase()===this.privRequestSession.requestId.toLowerCase())switch(n.path.toLowerCase()){case"turn.start":this.privMustReportEndOfStream=!0,this.privRequestSession.onServiceTurnStartResponse();break;case"speech.startdetected":const t=ql.fromJSON(n.textBody),r=new dl(t.Offset,this.privRequestSession.sessionId);this.privRecognizer.speechStartDetected&&this.privRecognizer.speechStartDetected(this.privRecognizer,r);break;case"speech.enddetected":let i;i=n.textBody.length>0?n.textBody:"{ Offset: 0 }";const o=ql.fromJSON(i);this.privRecognizerConfig.isContinuousRecognition&&this.privRequestSession.onServiceRecognized(o.Offset+this.privRequestSession.currentTurnAudioOffset);const a=new dl(o.Offset+this.privRequestSession.currentTurnAudioOffset,this.privRequestSession.sessionId);this.privRecognizer.speechEndDetected&&this.privRecognizer.speechEndDetected(this.privRecognizer,a);break;case"turn.end":yield this.sendTelemetryData(),this.privRequestSession.isSpeechEnded&&this.privMustReportEndOfStream&&(this.privMustReportEndOfStream=!1,yield this.cancelRecognitionLocal(rl.EndOfStream,ol.NoError,void 0));const s=new ul(this.privRequestSession.sessionId);if(yield this.privRequestSession.onServiceTurnEndResponse(this.privRecognizerConfig.isContinuousRecognition),!this.privRecognizerConfig.isContinuousRecognition||this.privRequestSession.isSpeechEnded||!this.privRequestSession.isRecognizing)return void(this.privRecognizer.sessionStopped&&this.privRecognizer.sessionStopped(this.privRecognizer,s));e=yield this.fetchConnection(),yield this.sendPrePayloadJSON(e);break;default:(yield this.processTypeSpecificMessages(n))||this.privServiceEvents&&this.serviceEvents.onEvent(new ts(n.path.toLowerCase(),n.textBody))}return this.receiveMessage()}catch(e){return null}}))}sendPrePayloadJSON(e){return xl(this,void 0,void 0,(function*(){if(void 0!==this.sendPrePayloadJSONOverride)return this.sendPrePayloadJSONOverride(e);yield this.sendSpeechContext(e),yield this.sendWaveHeader(e)}))}sendWaveHeader(e){return xl(this,void 0,void 0,(function*(){const t=yield this.audioSource.format;return e.send(new fl(ja.Binary,"audio",this.privRequestSession.requestId,"audio/x-wav",t.header))}))}connectImpl(){return this.privConnectionPromise?this.privConnectionPromise.then((e=>e.state()===Ua.Disconnected?(this.privConnectionId=null,this.privConnectionPromise=null,this.privServiceHasSentMessage=!1,this.connectImpl()):this.privConnectionPromise),(e=>(this.privConnectionId=null,this.privConnectionPromise=null,this.privServiceHasSentMessage=!1,this.connectImpl()))):(this.privConnectionPromise=this.retryableConnect(),this.privConnectionPromise.catch((()=>{})),void 0!==this.postConnectImplOverride?this.postConnectImplOverride(this.privConnectionPromise):this.privConnectionPromise)}fetchConnection(){return xl(this,void 0,void 0,(function*(){return this.privConnectionConfigurationPromise?this.privConnectionConfigurationPromise.then((e=>e.state()===Ua.Disconnected?(this.privConnectionId=null,this.privConnectionConfigurationPromise=null,this.privServiceHasSentMessage=!1,this.fetchConnection()):this.privConnectionConfigurationPromise),(e=>(this.privConnectionId=null,this.privConnectionConfigurationPromise=null,this.privServiceHasSentMessage=!1,this.fetchConnection()))):(this.privConnectionConfigurationPromise=this.configureConnection(),yield this.privConnectionConfigurationPromise)}))}sendAudio(e){return xl(this,void 0,void 0,(function*(){const t=yield this.audioSource.format;let n=Date.now();const r=this.privRecognizerConfig.parameters.getProperty("SPEECH-TransmitLengthBeforThrottleMs","5000"),i=t.avgBytesPerSec/1e3*parseInt(r,10),o=this.privRequestSession.recogNumber,a=()=>xl(this,void 0,void 0,(function*(){if(!this.privIsDisposed&&!this.privRequestSession.isSpeechEnded&&this.privRequestSession.isRecognizing&&this.privRequestSession.recogNumber===o){const r=yield this.fetchConnection(),s=yield e.read();if(this.privRequestSession.isSpeechEnded)return;let l,c;if(!s||s.isEnd?(l=null,c=0):(l=s.buffer,this.privRequestSession.onAudioSent(l.byteLength),c=i>=this.privRequestSession.bytesSent?0:Math.max(0,n-Date.now())),0!==c&&(yield this.delay(c)),null!==l&&(n=Date.now()+1e3*l.byteLength/(2*t.avgBytesPerSec)),!this.privIsDisposed&&!this.privRequestSession.isSpeechEnded&&this.privRequestSession.isRecognizing&&this.privRequestSession.recogNumber===o){if(r.send(new fl(ja.Binary,"audio",this.privRequestSession.requestId,null,l)).catch((()=>{this.privRequestSession.onServiceTurnEndResponse(this.privRecognizerConfig.isContinuousRecognition).catch((()=>{}))})),!(null==s?void 0:s.isEnd))return a();this.privIsLiveAudio||this.privRequestSession.onSpeechEnded()}}}));return a()}))}retryableConnect(){return xl(this,void 0,void 0,(function*(){let e=!1;this.privAuthFetchEventId=La();const t=this.privRequestSession.sessionId;this.privConnectionId=void 0!==t?t:La(),this.privRequestSession.onPreConnectionStart(this.privAuthFetchEventId,this.privConnectionId);let n=0,r="";for(;this.privRequestSession.numConnectionAttempts<=this.privRecognizerConfig.maxRetryCount;){const t=e?this.privAuthentication.fetchOnExpiry(this.privAuthFetchEventId):this.privAuthentication.fetch(this.privAuthFetchEventId),i=yield t;yield this.privRequestSession.onAuthCompleted(!1);const o=this.privConnectionFactory.create(this.privRecognizerConfig,i,this.privConnectionId);this.privRequestSession.listenForServiceTelemetry(o.events),o.events.attach((e=>{this.connectionEvents.onEvent(e)}));const a=yield o.open();if(200===a.statusCode)return yield this.privRequestSession.onConnectionEstablishCompleted(a.statusCode),Promise.resolve(o);1006===a.statusCode&&(e=!0),n=a.statusCode,r=a.reason,this.privRequestSession.onRetryConnection()}return yield this.privRequestSession.onConnectionEstablishCompleted(n,r),Promise.reject(`Unable to contact server. StatusCode: ${n}, ${this.privRecognizerConfig.parameters.getProperty(sl.SpeechServiceConnection_Endpoint)} Reason: ${r}`)}))}delay(e){return new Promise(((t,n)=>{this.privSetTimeout(t,e)}))}writeBufferToConsole(e){let t="Buffer Size: ";if(null===e)t+="null";else{const n=new Uint8Array(e);t+=e.byteLength+"\r\n";for(let r=0;r<e.byteLength;r++)t+=n[r].toString(16).padStart(2,"0")+" "}console.info(t)}sendFinalAudio(){return xl(this,void 0,void 0,(function*(){const e=yield this.fetchConnection();yield e.send(new fl(ja.Binary,"audio",this.privRequestSession.requestId,null,null))}))}configureConnection(){return xl(this,void 0,void 0,(function*(){const e=yield this.connectImpl();return void 0!==this.configConnectionOverride?this.configConnectionOverride(e):(yield this.sendSpeechServiceConfig(e,this.privRequestSession,this.privRecognizerConfig.SpeechServiceConfig.serialize()),yield this.sendPrePayloadJSON(e),e)}))}}Sl.telemetryDataEnabled=!0,(pl=hl||(hl={}))[pl.Interactive=0]="Interactive",pl[pl.Conversation=1]="Conversation",pl[pl.Dictation=2]="Dictation",(gl=ml||(ml={}))[gl.Simple=0]="Simple",gl[gl.Detailed=1]="Detailed";class Ml{constructor(e,t){this.privRecognitionMode=hl.Interactive,this.privSpeechServiceConfig=e||new _l(new Al(null)),this.privParameters=t,this.privMaxRetryCount=parseInt(t.getProperty("SPEECH-Error-MaxRetryCount","4"),10)}get parameters(){return this.privParameters}get recognitionMode(){return this.privRecognitionMode}set recognitionMode(e){this.privRecognitionMode=e,this.privRecognitionActivityTimeout=e===hl.Interactive?8e3:25e3,this.privSpeechServiceConfig.Recognition=hl[e]}get SpeechServiceConfig(){return this.privSpeechServiceConfig}get recognitionActivityTimeout(){return this.privRecognitionActivityTimeout}get isContinuousRecognition(){return this.privRecognitionMode!==hl.Interactive}get autoDetectSourceLanguages(){return this.parameters.getProperty(sl.SpeechServiceConnection_AutoDetectSourceLanguages,void 0)}get maxRetryCount(){return this.privMaxRetryCount}}class _l{constructor(e){this.serialize=()=>JSON.stringify(this,((e,t)=>{if(t&&"object"==typeof t){const e={};for(const n in t)Object.hasOwnProperty.call(t,n)&&(e[n&&n.charAt(0).toLowerCase()+n.substring(1)]=t[n]);return e}return t})),this.context=e}get Context(){return this.context}get Recognition(){return this.recognition}set Recognition(e){this.recognition=e.toLowerCase()}}class Al{constructor(e){this.system=new El,this.os=e}}class El{constructor(){this.name="SpeechSDK",this.version="1.20.0",this.build="JavaScript",this.lang="JavaScript"}}class Cl{constructor(e,t,n){this.platform=e,this.name=t,this.version=n}}(yl=vl||(vl={})).Bluetooth="Bluetooth",yl.Wired="Wired",yl.WiFi="WiFi",yl.Cellular="Cellular",yl.InBuilt="InBuilt",yl.Unknown="Unknown",(wl=bl||(bl={})).Phone="Phone",wl.Speaker="Speaker",wl.Car="Car",wl.Headset="Headset",wl.Thermostat="Thermostat",wl.Microphones="Microphones",wl.Deskphone="Deskphone",wl.RemoteControl="RemoteControl",wl.Unknown="Unknown",wl.File="File",wl.Stream="Stream";class kl{constructor(){this.toConnectionMessage=e=>{const t=new vs;try{if(e.messageType===ja.Text){const n=e.textContent;let r={},i=null;if(n){const e=n.split("\r\n\r\n");e&&e.length>0&&(r=this.parseHeaders(e[0]),e.length>1&&(i=e[1]))}t.resolve(new hs(e.messageType,i,r,e.id))}else if(e.messageType===ja.Binary){const n=e.binaryContent;let r={},i=null;if(!n||n.byteLength<2)throw new Error("Invalid binary message format. Header length missing.");const o=new DataView(n),a=o.getInt16(0);if(n.byteLength<a+2)throw new Error("Invalid binary message format. Header content missing.");let s="";for(let e=0;e<a;e++)s+=String.fromCharCode(o.getInt8(e+2));r=this.parseHeaders(s),n.byteLength>a+2&&(i=n.slice(2+a)),t.resolve(new hs(e.messageType,i,r,e.id))}}catch(e){t.reject(`Error formatting the message. Error: ${e}`)}return t.promise},this.fromConnectionMessage=e=>{const t=new vs;try{if(e.messageType===ja.Text){const n=`${this.makeHeaders(e)}\r\n${e.textBody?e.textBody:""}`;t.resolve(new As(ja.Text,n,e.id))}else if(e.messageType===ja.Binary){const n=this.makeHeaders(e),r=e.binaryBody,i=this.stringToArrayBuffer(n),o=new Int8Array(i),a=o.byteLength,s=new Int8Array(2+a+(r?r.byteLength:0));if(s[0]=a>>8&255,s[1]=255&a,s.set(o,2),r){const e=new Int8Array(r);s.set(e,2+a)}const l=s.buffer;t.resolve(new As(ja.Binary,l,e.id))}}catch(e){t.reject(`Error formatting the message. ${e}`)}return t.promise},this.makeHeaders=e=>{let t="";if(e.headers)for(const n in e.headers)n&&(t+=`${n}: ${e.headers[n]}\r\n`);return t},this.parseHeaders=e=>{const t={};if(e){const n=e.match(/[^\r\n]+/g);if(t)for(const e of n)if(e){const n=e.indexOf(":"),r=n>0?e.substr(0,n).trim().toLowerCase():e,i=n>0&&e.length>n+1?e.substr(n+1).trim():"";t[r]=i}}return t},this.stringToArrayBuffer=e=>{const t=new ArrayBuffer(e.length),n=new DataView(t);for(let t=0;t<e.length;t++)n.setUint8(t,e.charCodeAt(t));return t}}}var Tl,Il,Ol,Rl,Pl,Nl,Ll,Dl;(Il=Tl||(Tl={}))[Il.Simple=0]="Simple",Il[Il.Detailed=1]="Detailed";class Bl{}Bl.BotId="botid",Bl.CustomSpeechDeploymentId="cid",Bl.CustomVoiceDeploymentId="deploymentId",Bl.EnableAudioLogging="storeAudio",Bl.EnableLanguageId="lidEnabled",Bl.EnableWordLevelTimestamps="wordLevelTimestamps",Bl.EndSilenceTimeoutMs="endSilenceTimeoutMs",Bl.Format="format",Bl.InitialSilenceTimeoutMs="initialSilenceTimeoutMs",Bl.Language="language",Bl.Profanity="profanity",Bl.RequestBotStatusMessages="enableBotMessageStatus",Bl.StableIntermediateThreshold="stableIntermediateThreshold",Bl.StableTranslation="stableTranslation",Bl.TestHooks="testhooks";class jl{static getHostSuffix(e){if(e){if(e.toLowerCase().startsWith("china"))return".azure.cn";if(e.toLowerCase().startsWith("usgov"))return".azure.us"}return".microsoft.com"}setCommonUrlParams(e,t,n){this.setUrlParameter(sl.SpeechServiceConnection_EnableAudioLogging,Bl.EnableAudioLogging,e,t,n),this.setUrlParameter(sl.SpeechServiceResponse_RequestWordLevelTimestamps,Bl.EnableWordLevelTimestamps,e,t,n),this.setUrlParameter(sl.SpeechServiceResponse_ProfanityOption,Bl.Profanity,e,t,n),this.setUrlParameter(sl.SpeechServiceConnection_InitialSilenceTimeoutMs,Bl.InitialSilenceTimeoutMs,e,t,n),this.setUrlParameter(sl.SpeechServiceConnection_EndSilenceTimeoutMs,Bl.EndSilenceTimeoutMs,e,t,n),this.setUrlParameter(sl.SpeechServiceResponse_StablePartialResultThreshold,Bl.StableIntermediateThreshold,e,t,n);const r=JSON.parse(e.parameters.getProperty(fu,"{}"));Object.keys(r).forEach(((e,n,i)=>{t[e]=r[e]}))}setUrlParameter(e,t,n,r,i){const o=n.parameters.getProperty(e,void 0);!o||i&&-1!==i.search(t)||(r[t]=o.toLocaleLowerCase())}}class Fl extends jl{constructor(){super(...arguments),this.interactiveRelativeUri="/speech/recognition/interactive/cognitiveservices/v1",this.conversationRelativeUri="/speech/recognition/conversation/cognitiveservices/v1",this.dictationRelativeUri="/speech/recognition/dictation/cognitiveservices/v1",this.create=(e,t,n)=>{let r=e.parameters.getProperty(sl.SpeechServiceConnection_Endpoint,void 0);const i=e.parameters.getProperty(sl.SpeechServiceConnection_Region,void 0),o=jl.getHostSuffix(i),a=e.parameters.getProperty(sl.SpeechServiceConnection_Host,"wss://"+i+".stt.speech"+o),s={},l=e.parameters.getProperty(sl.SpeechServiceConnection_EndpointId,void 0),c=e.parameters.getProperty(sl.SpeechServiceConnection_RecoLanguage,void 0);if(l?r&&-1!==r.search(Bl.CustomSpeechDeploymentId)||(s[Bl.CustomSpeechDeploymentId]=l):c&&(r&&-1!==r.search(Bl.Language)||(s[Bl.Language]=c)),r&&-1!==r.search(Bl.Format)||(s[Bl.Format]=e.parameters.getProperty(uu,Tl[Tl.Simple]).toLowerCase()),void 0!==e.autoDetectSourceLanguages&&(s[Bl.EnableLanguageId]="true"),this.setCommonUrlParams(e,s,r),!r)switch(e.recognitionMode){case hl.Conversation:r="true"===e.parameters.getProperty(hu,"false")?a+this.dictationRelativeUri:a+this.conversationRelativeUri;break;case hl.Dictation:r=a+this.dictationRelativeUri;break;default:r=a+this.interactiveRelativeUri}const u={};void 0!==t.token&&""!==t.token&&(u[t.headerName]=t.token),u[Zs.ConnectionId]=n,e.parameters.setProperty(sl.SpeechServiceConnection_Url,r);const d="true"===e.parameters.getProperty("SPEECH-EnableWebsocketCompression","false");return new(0,wu.WebsocketConnection)(r,s,u,new kl,nd.fromRecognizerConfig(e),d,n)}}}class Ul{constructor(){this.synthesisUri="/cognitiveservices/websocket/v1",this.create=(e,t,n)=>{let r=e.parameters.getProperty(sl.SpeechServiceConnection_Endpoint,void 0);const i=e.parameters.getProperty(sl.SpeechServiceConnection_Region,void 0),o=jl.getHostSuffix(i),a=e.parameters.getProperty(sl.SpeechServiceConnection_EndpointId,void 0),s=void 0===a?"tts":"voice",l=e.parameters.getProperty(sl.SpeechServiceConnection_Host,"wss://"+i+"."+s+".speech"+o);r||(r=l+this.synthesisUri);const c={};void 0!==t.token&&""!==t.token&&(c[t.headerName]=t.token),c[Zs.ConnectionId]=n,void 0!==a&&(c[Bl.CustomVoiceDeploymentId]=a),e.parameters.setProperty(sl.SpeechServiceConnection_Url,r);const u="true"===e.parameters.getProperty("SPEECH-EnableWebsocketCompression","false");return new(0,wu.WebsocketConnection)(r,{},c,new kl,nd.fromParameters(e.parameters),u,n)}}}(Rl=Ol||(Ol={}))[Rl.NoMatch=0]="NoMatch",Rl[Rl.Canceled=1]="Canceled",Rl[Rl.RecognizingSpeech=2]="RecognizingSpeech",Rl[Rl.RecognizedSpeech=3]="RecognizedSpeech",Rl[Rl.RecognizedKeyword=4]="RecognizedKeyword",Rl[Rl.RecognizingIntent=5]="RecognizingIntent",Rl[Rl.RecognizedIntent=6]="RecognizedIntent",Rl[Rl.TranslatingSpeech=7]="TranslatingSpeech",Rl[Rl.TranslatedSpeech=8]="TranslatedSpeech",Rl[Rl.SynthesizingAudio=9]="SynthesizingAudio",Rl[Rl.SynthesizingAudioCompleted=10]="SynthesizingAudioCompleted",Rl[Rl.SynthesizingAudioStarted=11]="SynthesizingAudioStarted",Rl[Rl.EnrollingVoiceProfile=12]="EnrollingVoiceProfile",Rl[Rl.EnrolledVoiceProfile=13]="EnrolledVoiceProfile",Rl[Rl.RecognizedSpeakers=14]="RecognizedSpeakers",Rl[Rl.RecognizedSpeaker=15]="RecognizedSpeaker",Rl[Rl.ResetVoiceProfile=16]="ResetVoiceProfile",Rl[Rl.DeletedVoiceProfile=17]="DeletedVoiceProfile",Rl[Rl.VoicesListRetrieved=18]="VoicesListRetrieved";class zl{static implTranslateRecognitionResult(e){let t=Ol.Canceled;switch(e){case Ll.Success:t=Ol.RecognizedSpeech;break;case Ll.NoMatch:case Ll.InitialSilenceTimeout:case Ll.BabbleTimeout:case Ll.EndOfDictation:t=Ol.NoMatch;break;case Ll.Error:case Ll.BadRequest:case Ll.Forbidden:default:t=Ol.Canceled}return t}static implTranslateCancelResult(e){let t=rl.EndOfStream;switch(e){case Ll.Success:case Ll.EndOfDictation:case Ll.NoMatch:t=rl.EndOfStream;break;case Ll.InitialSilenceTimeout:case Ll.BabbleTimeout:case Ll.Error:case Ll.BadRequest:case Ll.Forbidden:default:t=rl.Error}return t}static implTranslateCancelErrorCode(e){let t=ol.NoError;switch(e){case Ll.Error:t=ol.ServiceError;break;case Ll.TooManyRequests:t=ol.TooManyRequests;break;case Ll.BadRequest:t=ol.BadRequestParameters;break;case Ll.Forbidden:t=ol.Forbidden;break;default:t=ol.NoError}return t}static implTranslateErrorDetails(e){let t="The speech service encountered an internal error and could not continue.";switch(e){case ol.Forbidden:t="The recognizer is using a free subscription that ran out of quota.";break;case ol.BadRequestParameters:t="Invalid parameter or unsupported audio format in the request.";break;case ol.TooManyRequests:t="The number of parallel requests exceeded the number of allowed concurrent transcriptions."}return t}}(Nl=Pl||(Pl={}))[Nl.Success=0]="Success",Nl[Nl.SynthesisEnd=1]="SynthesisEnd",Nl[Nl.Error=2]="Error",(Dl=Ll||(Ll={}))[Dl.Success=0]="Success",Dl[Dl.NoMatch=1]="NoMatch",Dl[Dl.InitialSilenceTimeout=2]="InitialSilenceTimeout",Dl[Dl.BabbleTimeout=3]="BabbleTimeout",Dl[Dl.Error=4]="Error",Dl[Dl.EndOfDictation=5]="EndOfDictation",Dl[Dl.TooManyRequests=6]="TooManyRequests",Dl[Dl.BadRequest=7]="BadRequest",Dl[Dl.Forbidden=8]="Forbidden";class Hl{static throwIfNullOrUndefined(e,t){if(null==e)throw new Error("throwIfNullOrUndefined:"+t)}static throwIfNull(e,t){if(null===e)throw new Error("throwIfNull:"+t)}static throwIfNullOrWhitespace(e,t){if(Hl.throwIfNullOrUndefined(e,t),(""+e).trim().length<1)throw new Error("throwIfNullOrWhitespace:"+t)}static throwIfDisposed(e){if(e)throw new Error("the object is already disposed")}static throwIfArrayEmptyOrWhitespace(e,t){if(Hl.throwIfNullOrUndefined(e,t),0===e.length)throw new Error("throwIfArrayEmptyOrWhitespace:"+t);for(const n of e)Hl.throwIfNullOrWhitespace(n,t)}static throwIfFileDoesNotExist(e,t){Hl.throwIfNullOrWhitespace(e,t)}static throwIfNotUndefined(e,t){if(void 0!==e)throw new Error("throwIfNotUndefined:"+t)}}class Vl{constructor(){this.privKeys=[],this.privValues=[]}getProperty(e,t){let n;n="string"==typeof e?e:sl[e];for(let e=0;e<this.privKeys.length;e++)if(this.privKeys[e]===n)return this.privValues[e];return t}setProperty(e,t){let n;n="string"==typeof e?e:sl[e];for(let e=0;e<this.privKeys.length;e++)if(this.privKeys[e]===n)return void(this.privValues[e]=t);this.privKeys.push(n),this.privValues.push(t)}clone(){const e=new Vl;for(let t=0;t<this.privKeys.length;t++)e.privKeys.push(this.privKeys[t]),e.privValues.push(this.privValues[t]);return e}mergeTo(e){this.privKeys.forEach((t=>{if(void 0===e.getProperty(t,void 0)){const n=this.getProperty(t);e.setProperty(t,n)}}))}get keys(){return this.privKeys}}class Wl{constructor(e,t,n,r,i,o,a,s,l,c){this.privResultId=e,this.privReason=t,this.privText=n,this.privDuration=r,this.privOffset=i,this.privLanguage=o,this.privLanguageDetectionConfidence=a,this.privErrorDetails=s,this.privJson=l,this.privProperties=c}get resultId(){return this.privResultId}get reason(){return this.privReason}get text(){return this.privText}get duration(){return this.privDuration}get offset(){return this.privOffset}get language(){return this.privLanguage}get languageDetectionConfidence(){return this.privLanguageDetectionConfidence}get errorDetails(){return this.privErrorDetails}get json(){return this.privJson}get properties(){return this.privProperties}}class Gl extends Wl{constructor(e,t,n,r,i,o,a,s,l,c,u){super(e,t,n,r,i,o,a,l,c,u),this.privSpeakerId=s}get speakerId(){return this.privSpeakerId}}class ql{constructor(e){this.privSpeechStartDetected=JSON.parse(e)}static fromJSON(e){return new ql(e)}get Offset(){return this.privSpeechStartDetected.Offset}}class Kl{constructor(e){this.privSpeechHypothesis=JSON.parse(e)}static fromJSON(e){return new Kl(e)}get Text(){return this.privSpeechHypothesis.Text}get Offset(){return this.privSpeechHypothesis.Offset}get Duration(){return this.privSpeechHypothesis.Duration}get Language(){return void 0===this.privSpeechHypothesis.PrimaryLanguage?void 0:this.privSpeechHypothesis.PrimaryLanguage.Language}get LanguageDetectionConfidence(){return void 0===this.privSpeechHypothesis.PrimaryLanguage?void 0:this.privSpeechHypothesis.PrimaryLanguage.Confidence}get SpeakerId(){return this.privSpeechHypothesis.SpeakerId}}var Yl={};e(Yl,"SpeechServiceRecognizer",(()=>$l),(e=>$l=e));class Jl extends dl{constructor(e,t,n){super(t,n),this.privResult=e}get result(){return this.privResult}}class Ql extends dl{constructor(e,t,n,r,i){super(r,i),this.privReason=e,this.privErrorDetails=t,this.privErrorCode=n}get reason(){return this.privReason}get errorCode(){return this.privErrorCode}get errorDetails(){return this.privErrorDetails}}class Xl extends Ql{}var Zl=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class $l extends cl.ServiceRecognizerBase{constructor(e,t,n,r,i){if(super(e,t,n,r,i),this.privSpeechRecognizer=i,void 0!==r.autoDetectSourceLanguages){const e=r.autoDetectSourceLanguages.split(",");this.privSpeechContext.setSection("languageId",{languages:e,onSuccess:{action:"Recognize"},onUnknown:{action:"None"}}),this.privSpeechContext.setSection("phraseOutput",{interimResults:{resultType:"Auto"},phraseResults:{resultType:"Always"}})}}processTypeSpecificMessages(e){return Zl(this,void 0,void 0,(function*(){let t;const n=new Vl;n.setProperty(sl.SpeechServiceResponse_JsonResult,e.textBody);let r=!1;switch(e.path.toLowerCase()){case"speech.hypothesis":case"speech.fragment":const i=Kl.fromJSON(e.textBody),o=i.Offset+this.privRequestSession.currentTurnAudioOffset;t=new Gl(this.privRequestSession.requestId,Ol.RecognizingSpeech,i.Text,i.Duration,o,i.Language,i.LanguageDetectionConfidence,void 0,void 0,e.textBody,n),this.privRequestSession.onHypothesis(o);const a=new Jl(t,i.Duration,this.privRequestSession.sessionId);if(this.privSpeechRecognizer.recognizing)try{this.privSpeechRecognizer.recognizing(this.privSpeechRecognizer,a)}catch(e){}r=!0;break;case"speech.phrase":const s=tc.fromJSON(e.textBody),l=zl.implTranslateRecognitionResult(s.RecognitionStatus);if(this.privRequestSession.onPhraseRecognized(this.privRequestSession.currentTurnAudioOffset+s.Offset+s.Duration),Ol.Canceled===l){const e=zl.implTranslateCancelResult(s.RecognitionStatus),t=zl.implTranslateCancelErrorCode(s.RecognitionStatus);yield this.cancelRecognitionLocal(e,t,zl.implTranslateErrorDetails(t))}else{if(!this.privRequestSession.isSpeechEnded||l!==Ol.NoMatch||s.RecognitionStatus===Ll.InitialSilenceTimeout){if(this.privRecognizerConfig.parameters.getProperty(uu)===Tl[Tl.Simple])t=new Gl(this.privRequestSession.requestId,l,s.DisplayText,s.Duration,s.Offset+this.privRequestSession.currentTurnAudioOffset,s.Language,s.LanguageDetectionConfidence,void 0,void 0,e.textBody,n);else{const r=ec.fromJSON(e.textBody),i=r.Offset+this.privRequestSession.currentTurnAudioOffset,o=r.getJsonWithCorrectedOffsets(i);t=new Gl(this.privRequestSession.requestId,l,r.RecognitionStatus===Ll.Success?r.NBest[0].Display:void 0,r.Duration,i,r.Language,r.LanguageDetectionConfidence,void 0,void 0,o,n)}const r=new Jl(t,t.offset,this.privRequestSession.sessionId);if(this.privSpeechRecognizer.recognized)try{this.privSpeechRecognizer.recognized(this.privSpeechRecognizer,r)}catch(e){}}if(this.privSuccessCallback){try{this.privSuccessCallback(t)}catch(e){this.privErrorCallback&&this.privErrorCallback(e)}this.privSuccessCallback=void 0,this.privErrorCallback=void 0}}r=!0}return r}))}cancelRecognition(e,t,n,r,i){const o=new Vl;if(o.setProperty(du,ol[r]),this.privSpeechRecognizer.canceled){const t=new Xl(n,i,r,void 0,e);try{this.privSpeechRecognizer.canceled(this.privSpeechRecognizer,t)}catch(e){}}if(this.privSuccessCallback){const e=new Gl(t,Ol.Canceled,void 0,void 0,void 0,void 0,void 0,void 0,i,void 0,o);try{this.privSuccessCallback(e),this.privSuccessCallback=void 0}catch(e){}}}}class ec{constructor(e){this.privDetailedSpeechPhrase=JSON.parse(e),this.privDetailedSpeechPhrase.RecognitionStatus=Ll[this.privDetailedSpeechPhrase.RecognitionStatus]}static fromJSON(e){return new ec(e)}getJsonWithCorrectedOffsets(e){if(this.privDetailedSpeechPhrase.NBest){let t;for(const e of this.privDetailedSpeechPhrase.NBest)if(e.Words&&e.Words[0]){t=e.Words[0].Offset;break}if(t&&t<e){const n=e-t;for(const e of this.privDetailedSpeechPhrase.NBest)if(e.Words)for(const t of e.Words)t.Offset+=n}}return JSON.stringify(this.privDetailedSpeechPhrase)}get RecognitionStatus(){return this.privDetailedSpeechPhrase.RecognitionStatus}get NBest(){return this.privDetailedSpeechPhrase.NBest}get Duration(){return this.privDetailedSpeechPhrase.Duration}get Offset(){return this.privDetailedSpeechPhrase.Offset}get Language(){return void 0===this.privDetailedSpeechPhrase.PrimaryLanguage?void 0:this.privDetailedSpeechPhrase.PrimaryLanguage.Language}get LanguageDetectionConfidence(){return void 0===this.privDetailedSpeechPhrase.PrimaryLanguage?void 0:this.privDetailedSpeechPhrase.PrimaryLanguage.Confidence}get Text(){return this.privDetailedSpeechPhrase.NBest&&this.privDetailedSpeechPhrase.NBest[0]?this.privDetailedSpeechPhrase.NBest[0].Display:this.privDetailedSpeechPhrase.DisplayText}get SpeakerId(){return this.privDetailedSpeechPhrase.SpeakerId}}class tc{constructor(e){this.privSimpleSpeechPhrase=JSON.parse(e),this.privSimpleSpeechPhrase.RecognitionStatus=Ll[this.privSimpleSpeechPhrase.RecognitionStatus]}static fromJSON(e){return new tc(e)}get RecognitionStatus(){return this.privSimpleSpeechPhrase.RecognitionStatus}get DisplayText(){return this.privSimpleSpeechPhrase.DisplayText}get Offset(){return this.privSimpleSpeechPhrase.Offset}get Duration(){return this.privSimpleSpeechPhrase.Duration}get Language(){return void 0===this.privSimpleSpeechPhrase.PrimaryLanguage?void 0:this.privSimpleSpeechPhrase.PrimaryLanguage.Language}get LanguageDetectionConfidence(){return void 0===this.privSimpleSpeechPhrase.PrimaryLanguage?void 0:this.privSimpleSpeechPhrase.PrimaryLanguage.Confidence}get SpeakerId(){return this.privSimpleSpeechPhrase.SpeakerId}}var nc,rc,ic={};e(ic,"RequestSession",(()=>bc),(e=>bc=e));class oc extends Wa{constructor(e,t,n,r=Da.Info){super(e,r),this.privRequestId=t,this.privSessionId=n}get requestId(){return this.privRequestId}get sessionId(){return this.privSessionId}}class ac extends oc{constructor(e,t,n,r){super("RecognitionTriggeredEvent",e,t),this.privAudioSourceId=n,this.privAudioNodeId=r}get audioSourceId(){return this.privAudioSourceId}get audioNodeId(){return this.privAudioNodeId}}class sc extends oc{constructor(e,t,n,r){super("ListeningStartedEvent",e,t),this.privAudioSourceId=n,this.privAudioNodeId=r}get audioSourceId(){return this.privAudioSourceId}get audioNodeId(){return this.privAudioNodeId}}class lc extends oc{constructor(e,t,n){super("ConnectingToServiceEvent",e,n),this.privAuthFetchEventid=t}get authFetchEventid(){return this.privAuthFetchEventid}}class cc extends oc{constructor(e,t,n,r,i){super("RecognitionStartedEvent",e,i),this.privAudioSourceId=t,this.privAudioNodeId=n,this.privAuthFetchEventId=r}get audioSourceId(){return this.privAudioSourceId}get audioNodeId(){return this.privAudioNodeId}get authFetchEventId(){return this.privAuthFetchEventId}}(rc=nc||(nc={}))[rc.Success=0]="Success",rc[rc.AudioSourceError=1]="AudioSourceError",rc[rc.AudioSourceTimeout=2]="AudioSourceTimeout",rc[rc.AuthTokenFetchError=3]="AuthTokenFetchError",rc[rc.AuthTokenFetchTimeout=4]="AuthTokenFetchTimeout",rc[rc.UnAuthorized=5]="UnAuthorized",rc[rc.ConnectTimeout=6]="ConnectTimeout",rc[rc.ConnectError=7]="ConnectError",rc[rc.ClientRecognitionActivityTimeout=8]="ClientRecognitionActivityTimeout",rc[rc.UnknownError=9]="UnknownError";class uc{constructor(e,t,n){this.privIsDisposed=!1,this.privListeningTriggerMetric=null,this.privMicMetric=null,this.privConnectionEstablishMetric=null,this.onEvent=e=>{if(!this.privIsDisposed&&(e instanceof ac&&e.requestId===this.privRequestId&&(this.privListeningTriggerMetric={End:e.eventTime,Name:"ListeningTrigger",Start:e.eventTime}),e instanceof Xa&&e.audioSourceId===this.privAudioSourceId&&e.audioNodeId===this.privAudioNodeId&&(this.privMicStartTime=e.eventTime),e instanceof Za&&e.audioSourceId===this.privAudioSourceId&&e.audioNodeId===this.privAudioNodeId&&(this.privMicStartTime=e.eventTime),e instanceof Ja&&e.audioSourceId===this.privAudioSourceId&&(this.privMicMetric||(this.privMicMetric={End:e.eventTime,Error:e.error,Name:"Microphone",Start:this.privMicStartTime})),e instanceof es&&e.audioSourceId===this.privAudioSourceId&&e.audioNodeId===this.privAudioNodeId&&(this.privMicMetric||(this.privMicMetric={End:e.eventTime,Error:e.error,Name:"Microphone",Start:this.privMicStartTime})),e instanceof $a&&e.audioSourceId===this.privAudioSourceId&&e.audioNodeId===this.privAudioNodeId&&(this.privMicMetric||(this.privMicMetric={End:e.eventTime,Name:"Microphone",Start:this.privMicStartTime})),e instanceof lc&&e.requestId===this.privRequestId&&(this.privConnectionId=e.sessionId),e instanceof rs&&e.connectionId===this.privConnectionId&&(this.privConnectionStartTime=e.eventTime),e instanceof is&&e.connectionId===this.privConnectionId&&(this.privConnectionEstablishMetric||(this.privConnectionEstablishMetric={End:e.eventTime,Id:this.privConnectionId,Name:"Connection",Start:this.privConnectionStartTime})),e instanceof ss&&e.connectionId===this.privConnectionId&&(this.privConnectionEstablishMetric||(this.privConnectionEstablishMetric={End:e.eventTime,Error:this.getConnectionError(e.statusCode),Id:this.privConnectionId,Name:"Connection",Start:this.privConnectionStartTime})),e instanceof ls&&e.connectionId===this.privConnectionId&&e.message&&e.message.headers&&e.message.headers.path)){this.privReceivedMessages[e.message.headers.path]||(this.privReceivedMessages[e.message.headers.path]=new Array);const t=50;this.privReceivedMessages[e.message.headers.path].length<t&&this.privReceivedMessages[e.message.headers.path].push(e.networkReceivedTime)}},this.getTelemetry=()=>{const e=new Array;this.privListeningTriggerMetric&&e.push(this.privListeningTriggerMetric),this.privMicMetric&&e.push(this.privMicMetric),this.privConnectionEstablishMetric&&e.push(this.privConnectionEstablishMetric),this.privPhraseLatencies.length>0&&e.push({PhraseLatencyMs:this.privPhraseLatencies}),this.privHypothesisLatencies.length>0&&e.push({FirstHypothesisLatencyMs:this.privHypothesisLatencies});const t={Metrics:e,ReceivedMessages:this.privReceivedMessages},n=JSON.stringify(t);return this.privReceivedMessages={},this.privListeningTriggerMetric=null,this.privMicMetric=null,this.privConnectionEstablishMetric=null,this.privPhraseLatencies=[],this.privHypothesisLatencies=[],n},this.dispose=()=>{this.privIsDisposed=!0},this.getConnectionError=e=>{switch(e){case 400:case 1002:case 1003:case 1005:case 1007:case 1008:case 1009:return"BadRequest";case 401:return"Unauthorized";case 403:return"Forbidden";case 503:case 1001:return"ServerUnavailable";case 500:case 1011:return"ServerError";case 408:case 504:return"Timeout";default:return"statuscode:"+e.toString()}},this.privRequestId=e,this.privAudioSourceId=t,this.privAudioNodeId=n,this.privReceivedMessages={},this.privPhraseLatencies=[],this.privHypothesisLatencies=[]}phraseReceived(e){e>0&&this.privPhraseLatencies.push(Date.now()-e)}hypothesisReceived(e){e>0&&this.privHypothesisLatencies.push(Date.now()-e)}get hasTelemetry(){return 0!==Object.keys(this.privReceivedMessages).length||null!==this.privListeningTriggerMetric||null!==this.privMicMetric||null!==this.privConnectionEstablishMetric||0!==this.privPhraseLatencies.length||0!==this.privHypothesisLatencies.length}}var dc,fc,hc,pc,mc,gc,vc,yc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class bc{constructor(e){this.privIsDisposed=!1,this.privDetachables=new Array,this.privIsAudioNodeDetached=!1,this.privIsRecognizing=!1,this.privIsSpeechEnded=!1,this.privTurnStartAudioOffset=0,this.privLastRecoOffset=0,this.privHypothesisReceived=!1,this.privBytesSent=0,this.privRecogNumber=0,this.privInTurn=!1,this.privConnectionAttempts=0,this.onPreConnectionStart=(e,t)=>{this.privAuthFetchEventId=e,this.privSessionId=t,this.onEvent(new lc(this.privRequestId,this.privAuthFetchEventId,this.privSessionId))},this.onSpeechContext=()=>{this.privRequestId=La()},this.onServiceTurnStartResponse=()=>{this.privTurnDeferral&&this.privInTurn&&(this.privTurnDeferral.reject("Another turn started before current completed."),this.privTurnDeferral.promise.then().catch((()=>{}))),this.privInTurn=!0,this.privTurnDeferral=new vs},this.getTelemetry=()=>this.privServiceTelemetryListener.hasTelemetry?this.privServiceTelemetryListener.getTelemetry():null,this.onEvent=e=>{this.privServiceTelemetryListener&&this.privServiceTelemetryListener.onEvent(e),gs.instance.onEvent(e)},this.privAudioSourceId=e,this.privRequestId=La(),this.privAudioNodeId=La(),this.privTurnDeferral=new vs,this.privTurnDeferral.resolve()}get sessionId(){return this.privSessionId}get requestId(){return this.privRequestId}get audioNodeId(){return this.privAudioNodeId}get turnCompletionPromise(){return this.privTurnDeferral.promise}get isSpeechEnded(){return this.privIsSpeechEnded}get isRecognizing(){return this.privIsRecognizing}get currentTurnAudioOffset(){return this.privTurnStartAudioOffset}get recogNumber(){return this.privRecogNumber}get numConnectionAttempts(){return this.privConnectionAttempts}get bytesSent(){return this.privBytesSent}listenForServiceTelemetry(e){this.privServiceTelemetryListener&&this.privDetachables.push(e.attachListener(this.privServiceTelemetryListener))}startNewRecognition(){this.privIsSpeechEnded=!1,this.privIsRecognizing=!0,this.privTurnStartAudioOffset=0,this.privLastRecoOffset=0,this.privRecogNumber++,this.privServiceTelemetryListener=new uc(this.privRequestId,this.privAudioSourceId,this.privAudioNodeId),this.onEvent(new ac(this.requestId,this.privSessionId,this.privAudioSourceId,this.privAudioNodeId))}onAudioSourceAttachCompleted(e,t,n){return yc(this,void 0,void 0,(function*(){this.privAudioNode=e,this.privIsAudioNodeDetached=!1,t?yield this.onComplete():this.onEvent(new sc(this.privRequestId,this.privSessionId,this.privAudioSourceId,this.privAudioNodeId))}))}onAuthCompleted(e,t){return yc(this,void 0,void 0,(function*(){e&&(yield this.onComplete())}))}onConnectionEstablishCompleted(e,t){return yc(this,void 0,void 0,(function*(){if(200===e)return this.onEvent(new cc(this.requestId,this.privAudioSourceId,this.privAudioNodeId,this.privAuthFetchEventId,this.privSessionId)),this.privAudioNode&&this.privAudioNode.replay(),this.privTurnStartAudioOffset=this.privLastRecoOffset,void(this.privBytesSent=0);403===e&&(yield this.onComplete())}))}onServiceTurnEndResponse(e){return yc(this,void 0,void 0,(function*(){this.privTurnDeferral.resolve(),!e||this.isSpeechEnded?(yield this.onComplete(),this.privInTurn=!1):(this.privTurnStartAudioOffset=this.privLastRecoOffset,this.privAudioNode.replay())}))}onHypothesis(e){this.privHypothesisReceived||(this.privHypothesisReceived=!0,this.privServiceTelemetryListener.hypothesisReceived(this.privAudioNode.findTimeAtOffset(e)))}onPhraseRecognized(e){this.privServiceTelemetryListener.phraseReceived(this.privAudioNode.findTimeAtOffset(e)),this.onServiceRecognized(e)}onServiceRecognized(e){this.privLastRecoOffset=e,this.privHypothesisReceived=!1,this.privAudioNode.shrinkBuffers(e),this.privConnectionAttempts=0}onAudioSent(e){this.privBytesSent+=e}onRetryConnection(){this.privConnectionAttempts++}dispose(e){var t;return yc(this,void 0,void 0,(function*(){if(!this.privIsDisposed){this.privIsDisposed=!0;for(const e of this.privDetachables)yield e.detach();null===(t=this.privServiceTelemetryListener)||void 0===t||t.dispose(),this.privIsRecognizing=!1}}))}onStopRecognizing(){return yc(this,void 0,void 0,(function*(){yield this.onComplete()}))}onSpeechEnded(){this.privIsSpeechEnded=!0}onComplete(){return yc(this,void 0,void 0,(function*(){this.privIsRecognizing&&(this.privIsRecognizing=!1,yield this.detachAudioNode())}))}detachAudioNode(){return yc(this,void 0,void 0,(function*(){this.privIsAudioNodeDetached||(this.privIsAudioNodeDetached=!0,this.privAudioNode&&(yield this.privAudioNode.detach()))}))}}class wc{constructor(e){this.privContext={},this.privDynamicGrammar=e}setSection(e,t){this.privContext[e]=t}setPronunciationAssessmentParams(e){void 0===this.privContext.phraseDetection&&(this.privContext.phraseDetection={enrichment:{pronunciationAssessment:{}}}),this.privContext.phraseDetection.enrichment.pronunciationAssessment=JSON.parse(e),void 0===this.privContext.phraseOutput&&(this.privContext.phraseOutput={detailed:{options:[]},format:{}}),this.privContext.phraseOutput.format="Detailed",this.privContext.phraseOutput.detailed.options.push("PronunciationAssessment"),-1===this.privContext.phraseOutput.detailed.options.indexOf("WordTimings")&&this.privContext.phraseOutput.detailed.options.push("WordTimings"),-1===this.privContext.phraseOutput.detailed.options.indexOf("SNR")&&this.privContext.phraseOutput.detailed.options.push("SNR")}toJSON(){const e=this.privDynamicGrammar.generateGrammarObject();this.setSection("dgi",e);return JSON.stringify(this.privContext)}}class xc{addPhrase(e){this.privPhrases||(this.privPhrases=[]),e instanceof Array?this.privPhrases=this.privPhrases.concat(e):this.privPhrases.push(e)}clearPhrases(){this.privPhrases=void 0}addReferenceGrammar(e){this.privGrammars||(this.privGrammars=[]),e instanceof Array?this.privGrammars=this.privGrammars.concat(e):this.privGrammars.push(e)}clearGrammars(){this.privGrammars=void 0}generateGrammarObject(){if(void 0===this.privGrammars&&void 0===this.privPhrases)return;const e={};if(e.ReferenceGrammars=this.privGrammars,void 0!==this.privPhrases&&0!==this.privPhrases.length){const t=[];this.privPhrases.forEach(((e,n,r)=>{t.push({Text:e})})),e.Groups=[{Type:"Generic",Items:t}]}return e}}(fc=dc||(dc={}))[fc.Raw8Khz8BitMonoMULaw=0]="Raw8Khz8BitMonoMULaw",fc[fc.Riff16Khz16KbpsMonoSiren=1]="Riff16Khz16KbpsMonoSiren",fc[fc.Audio16Khz16KbpsMonoSiren=2]="Audio16Khz16KbpsMonoSiren",fc[fc.Audio16Khz32KBitRateMonoMp3=3]="Audio16Khz32KBitRateMonoMp3",fc[fc.Audio16Khz128KBitRateMonoMp3=4]="Audio16Khz128KBitRateMonoMp3",fc[fc.Audio16Khz64KBitRateMonoMp3=5]="Audio16Khz64KBitRateMonoMp3",fc[fc.Audio24Khz48KBitRateMonoMp3=6]="Audio24Khz48KBitRateMonoMp3",fc[fc.Audio24Khz96KBitRateMonoMp3=7]="Audio24Khz96KBitRateMonoMp3",fc[fc.Audio24Khz160KBitRateMonoMp3=8]="Audio24Khz160KBitRateMonoMp3",fc[fc.Raw16Khz16BitMonoTrueSilk=9]="Raw16Khz16BitMonoTrueSilk",fc[fc.Riff16Khz16BitMonoPcm=10]="Riff16Khz16BitMonoPcm",fc[fc.Riff8Khz16BitMonoPcm=11]="Riff8Khz16BitMonoPcm",fc[fc.Riff24Khz16BitMonoPcm=12]="Riff24Khz16BitMonoPcm",fc[fc.Riff8Khz8BitMonoMULaw=13]="Riff8Khz8BitMonoMULaw",fc[fc.Raw16Khz16BitMonoPcm=14]="Raw16Khz16BitMonoPcm",fc[fc.Raw24Khz16BitMonoPcm=15]="Raw24Khz16BitMonoPcm",fc[fc.Raw8Khz16BitMonoPcm=16]="Raw8Khz16BitMonoPcm",fc[fc.Ogg16Khz16BitMonoOpus=17]="Ogg16Khz16BitMonoOpus",fc[fc.Ogg24Khz16BitMonoOpus=18]="Ogg24Khz16BitMonoOpus",fc[fc.Raw48Khz16BitMonoPcm=19]="Raw48Khz16BitMonoPcm",fc[fc.Riff48Khz16BitMonoPcm=20]="Riff48Khz16BitMonoPcm",fc[fc.Audio48Khz96KBitRateMonoMp3=21]="Audio48Khz96KBitRateMonoMp3",fc[fc.Audio48Khz192KBitRateMonoMp3=22]="Audio48Khz192KBitRateMonoMp3",fc[fc.Ogg48Khz16BitMonoOpus=23]="Ogg48Khz16BitMonoOpus",fc[fc.Webm16Khz16BitMonoOpus=24]="Webm16Khz16BitMonoOpus",fc[fc.Webm24Khz16BitMonoOpus=25]="Webm24Khz16BitMonoOpus",fc[fc.Raw24Khz16BitMonoTrueSilk=26]="Raw24Khz16BitMonoTrueSilk",fc[fc.Raw8Khz8BitMonoALaw=27]="Raw8Khz8BitMonoALaw",fc[fc.Riff8Khz8BitMonoALaw=28]="Riff8Khz8BitMonoALaw",fc[fc.Webm24Khz16Bit24KbpsMonoOpus=29]="Webm24Khz16Bit24KbpsMonoOpus",fc[fc.Audio16Khz16Bit32KbpsMonoOpus=30]="Audio16Khz16Bit32KbpsMonoOpus",fc[fc.Audio24Khz16Bit48KbpsMonoOpus=31]="Audio24Khz16Bit48KbpsMonoOpus",fc[fc.Audio24Khz16Bit24KbpsMonoOpus=32]="Audio24Khz16Bit24KbpsMonoOpus",(pc=hc||(hc={}))[pc.PCM=1]="PCM",pc[pc.MuLaw=2]="MuLaw",pc[pc.Siren=3]="Siren",pc[pc.MP3=4]="MP3",pc[pc.SILKSkype=5]="SILKSkype",pc[pc.OGG_OPUS=6]="OGG_OPUS",pc[pc.WEBM_OPUS=7]="WEBM_OPUS",pc[pc.ALaw=8]="ALaw",pc[pc.FLAC=9]="FLAC",pc[pc.OPUS=10]="OPUS";class Sc{static getDefaultInputFormat(){return Mc.getDefaultInputFormat()}static getWaveFormat(e,t,n,r){return new Mc(e,t,n,r)}static getWaveFormatPCM(e,t,n){return new Mc(e,t,n)}}class Mc extends Sc{constructor(e=16e3,t=16,n=1,r=hc.PCM){super(),this.setString=(e,t,n)=>{for(let r=0;r<n.length;r++)e.setUint8(t+r,n.charCodeAt(r))};let i=!0;switch(r){case hc.PCM:this.formatTag=1;break;case hc.ALaw:this.formatTag=6;break;case hc.MuLaw:this.formatTag=7;break;default:i=!1}if(this.bitsPerSample=t,this.samplesPerSec=e,this.channels=n,this.avgBytesPerSec=this.samplesPerSec*this.channels*(this.bitsPerSample/8),this.blockAlign=this.channels*Math.max(this.bitsPerSample,8),i){this.privHeader=new ArrayBuffer(44);const e=new DataView(this.privHeader);this.setString(e,0,"RIFF"),e.setUint32(4,0,!0),this.setString(e,8,"WAVEfmt "),e.setUint32(16,16,!0),e.setUint16(20,this.formatTag,!0),e.setUint16(22,this.channels,!0),e.setUint32(24,this.samplesPerSec,!0),e.setUint32(28,this.avgBytesPerSec,!0),e.setUint16(32,this.channels*(this.bitsPerSample/8),!0),e.setUint16(34,this.bitsPerSample,!0),this.setString(e,36,"data"),e.setUint32(40,0,!0)}}static getDefaultInputFormat(){return new Mc}static getAudioContext(e){const t=window.AudioContext||window.webkitAudioContext||!1;if(t)return void 0!==e&&navigator.mediaDevices.getSupportedConstraints().sampleRate?new t({sampleRate:e}):new t;throw new Error("Browser does not support Web Audio API (AudioContext is not available).")}close(){}get header(){return this.privHeader}}class _c extends Mc{constructor(e,t,n,r,i,o,a,s,l){super(n,o,t,e),this.formatTag=e,this.avgBytesPerSec=r,this.blockAlign=i,this.priAudioFormatString=a,this.priRequestAudioFormatString=s,this.priHasHeader=l}static fromSpeechSynthesisOutputFormat(e){return void 0===e?_c.getDefaultOutputFormat():_c.fromSpeechSynthesisOutputFormatString(_c.SpeechSynthesisOutputFormatToString[e])}static fromSpeechSynthesisOutputFormatString(e){switch(e){case"raw-8khz-8bit-mono-mulaw":return new _c(hc.MuLaw,1,8e3,8e3,1,8,e,e,!1);case"riff-16khz-16kbps-mono-siren":return new _c(hc.Siren,1,16e3,2e3,40,0,e,"audio-16khz-16kbps-mono-siren",!0);case"audio-16khz-16kbps-mono-siren":return new _c(hc.Siren,1,16e3,2e3,40,0,e,e,!1);case"audio-16khz-32kbitrate-mono-mp3":return new _c(hc.MP3,1,16e3,4096,2,16,e,e,!1);case"audio-16khz-128kbitrate-mono-mp3":return new _c(hc.MP3,1,16e3,16384,2,16,e,e,!1);case"audio-16khz-64kbitrate-mono-mp3":return new _c(hc.MP3,1,16e3,8192,2,16,e,e,!1);case"audio-24khz-48kbitrate-mono-mp3":return new _c(hc.MP3,1,24e3,6144,2,16,e,e,!1);case"audio-24khz-96kbitrate-mono-mp3":return new _c(hc.MP3,1,24e3,12288,2,16,e,e,!1);case"audio-24khz-160kbitrate-mono-mp3":return new _c(hc.MP3,1,24e3,20480,2,16,e,e,!1);case"raw-16khz-16bit-mono-truesilk":return new _c(hc.SILKSkype,1,16e3,32e3,2,16,e,e,!1);case"riff-8khz-16bit-mono-pcm":return new _c(hc.PCM,1,8e3,16e3,2,16,e,"raw-8khz-16bit-mono-pcm",!0);case"riff-24khz-16bit-mono-pcm":return new _c(hc.PCM,1,24e3,48e3,2,16,e,"raw-24khz-16bit-mono-pcm",!0);case"riff-8khz-8bit-mono-mulaw":return new _c(hc.MuLaw,1,8e3,8e3,1,8,e,"raw-8khz-8bit-mono-mulaw",!0);case"raw-16khz-16bit-mono-pcm":return new _c(hc.PCM,1,16e3,32e3,2,16,e,"raw-16khz-16bit-mono-pcm",!1);case"raw-24khz-16bit-mono-pcm":return new _c(hc.PCM,1,24e3,48e3,2,16,e,"raw-24khz-16bit-mono-pcm",!1);case"raw-8khz-16bit-mono-pcm":return new _c(hc.PCM,1,8e3,16e3,2,16,e,"raw-8khz-16bit-mono-pcm",!1);case"ogg-16khz-16bit-mono-opus":return new _c(hc.OGG_OPUS,1,16e3,8192,2,16,e,e,!1);case"ogg-24khz-16bit-mono-opus":return new _c(hc.OGG_OPUS,1,24e3,8192,2,16,e,e,!1);case"raw-48khz-16bit-mono-pcm":return new _c(hc.PCM,1,48e3,96e3,2,16,e,"raw-48khz-16bit-mono-pcm",!1);case"riff-48khz-16bit-mono-pcm":return new _c(hc.PCM,1,48e3,96e3,2,16,e,"raw-48khz-16bit-mono-pcm",!0);case"audio-48khz-96kbitrate-mono-mp3":return new _c(hc.MP3,1,48e3,12288,2,16,e,e,!1);case"audio-48khz-192kbitrate-mono-mp3":return new _c(hc.MP3,1,48e3,24576,2,16,e,e,!1);case"ogg-48khz-16bit-mono-opus":return new _c(hc.OGG_OPUS,1,48e3,12e3,2,16,e,e,!1);case"webm-16khz-16bit-mono-opus":return new _c(hc.WEBM_OPUS,1,16e3,4e3,2,16,e,e,!1);case"webm-24khz-16bit-mono-opus":return new _c(hc.WEBM_OPUS,1,24e3,6e3,2,16,e,e,!1);case"webm-24khz-16bit-24kbps-mono-opus":return new _c(hc.WEBM_OPUS,1,24e3,3e3,2,16,e,e,!1);case"audio-16khz-16bit-32kbps-mono-opus":return new _c(hc.OPUS,1,16e3,4e3,2,16,e,e,!1);case"audio-24khz-16bit-48kbps-mono-opus":return new _c(hc.OPUS,1,24e3,6e3,2,16,e,e,!1);case"audio-24khz-16bit-24kbps-mono-opus":return new _c(hc.OPUS,1,24e3,3e3,2,16,e,e,!1);case"audio-24khz-16bit-mono-flac":return new _c(hc.FLAC,1,24e3,24e3,2,16,e,e,!1);case"audio-48khz-16bit-mono-flac":return new _c(hc.FLAC,1,48e3,3e4,2,16,e,e,!1);case"raw-24khz-16bit-mono-truesilk":return new _c(hc.SILKSkype,1,24e3,48e3,2,16,e,e,!1);case"raw-8khz-8bit-mono-alaw":return new _c(hc.ALaw,1,8e3,8e3,1,8,e,e,!1);case"riff-8khz-8bit-mono-alaw":return new _c(hc.ALaw,1,8e3,8e3,1,8,e,"raw-8khz-8bit-mono-alaw",!0);default:return new _c(hc.PCM,1,16e3,32e3,2,16,"riff-16khz-16bit-mono-pcm","raw-16khz-16bit-mono-pcm",!0)}}static getDefaultOutputFormat(){return _c.fromSpeechSynthesisOutputFormatString("undefined"!=typeof window?"audio-24khz-48kbitrate-mono-mp3":"riff-16khz-16bit-mono-pcm")}get hasHeader(){return this.priHasHeader}get header(){if(this.hasHeader)return this.privHeader}updateHeader(e){if(this.priHasHeader){new DataView(this.privHeader).setUint32(40,e,!0)}}get requestAudioFormatString(){return this.priRequestAudioFormatString}}_c.SpeechSynthesisOutputFormatToString={[dc.Raw8Khz8BitMonoMULaw]:"raw-8khz-8bit-mono-mulaw",[dc.Riff16Khz16KbpsMonoSiren]:"riff-16khz-16kbps-mono-siren",[dc.Audio16Khz16KbpsMonoSiren]:"audio-16khz-16kbps-mono-siren",[dc.Audio16Khz32KBitRateMonoMp3]:"audio-16khz-32kbitrate-mono-mp3",[dc.Audio16Khz128KBitRateMonoMp3]:"audio-16khz-128kbitrate-mono-mp3",[dc.Audio16Khz64KBitRateMonoMp3]:"audio-16khz-64kbitrate-mono-mp3",[dc.Audio24Khz48KBitRateMonoMp3]:"audio-24khz-48kbitrate-mono-mp3",[dc.Audio24Khz96KBitRateMonoMp3]:"audio-24khz-96kbitrate-mono-mp3",[dc.Audio24Khz160KBitRateMonoMp3]:"audio-24khz-160kbitrate-mono-mp3",[dc.Raw16Khz16BitMonoTrueSilk]:"raw-16khz-16bit-mono-truesilk",[dc.Riff16Khz16BitMonoPcm]:"riff-16khz-16bit-mono-pcm",[dc.Riff8Khz16BitMonoPcm]:"riff-8khz-16bit-mono-pcm",[dc.Riff24Khz16BitMonoPcm]:"riff-24khz-16bit-mono-pcm",[dc.Riff8Khz8BitMonoMULaw]:"riff-8khz-8bit-mono-mulaw",[dc.Raw16Khz16BitMonoPcm]:"raw-16khz-16bit-mono-pcm",[dc.Raw24Khz16BitMonoPcm]:"raw-24khz-16bit-mono-pcm",[dc.Raw8Khz16BitMonoPcm]:"raw-8khz-16bit-mono-pcm",[dc.Ogg16Khz16BitMonoOpus]:"ogg-16khz-16bit-mono-opus",[dc.Ogg24Khz16BitMonoOpus]:"ogg-24khz-16bit-mono-opus",[dc.Raw48Khz16BitMonoPcm]:"raw-48khz-16bit-mono-pcm",[dc.Riff48Khz16BitMonoPcm]:"riff-48khz-16bit-mono-pcm",[dc.Audio48Khz96KBitRateMonoMp3]:"audio-48khz-96kbitrate-mono-mp3",[dc.Audio48Khz192KBitRateMonoMp3]:"audio-48khz-192kbitrate-mono-mp3",[dc.Ogg48Khz16BitMonoOpus]:"ogg-48khz-16bit-mono-opus",[dc.Webm16Khz16BitMonoOpus]:"webm-16khz-16bit-mono-opus",[dc.Webm24Khz16BitMonoOpus]:"webm-24khz-16bit-mono-opus",[dc.Webm24Khz16Bit24KbpsMonoOpus]:"webm-24khz-16bit-24kbps-mono-opus",[dc.Raw24Khz16BitMonoTrueSilk]:"raw-24khz-16bit-mono-truesilk",[dc.Raw8Khz8BitMonoALaw]:"raw-8khz-8bit-mono-alaw",[dc.Riff8Khz8BitMonoALaw]:"riff-8khz-8bit-mono-alaw",[dc.Audio16Khz16Bit32KbpsMonoOpus]:"audio-16khz-16bit-32kbps-mono-opus",[dc.Audio24Khz16Bit48KbpsMonoOpus]:"audio-24khz-16bit-48kbps-mono-opus",[dc.Audio24Khz16Bit24KbpsMonoOpus]:"audio-24khz-16bit-24kbps-mono-opus"},(gc=mc||(mc={}))[gc.Masked=0]="Masked",gc[gc.Removed=1]="Removed",gc[gc.Raw=2]="Raw";class Ac{constructor(){}static fromSubscription(e,t){Hl.throwIfNullOrWhitespace(e,"subscriptionKey"),Hl.throwIfNullOrWhitespace(t,"region");const n=new Ec;return n.setProperty(sl.SpeechServiceConnection_Region,t),n.setProperty(sl.SpeechServiceConnection_IntentRegion,t),n.setProperty(sl.SpeechServiceConnection_Key,e),n}static fromEndpoint(e,t){Hl.throwIfNull(e,"endpoint");const n=new Ec;return n.setProperty(sl.SpeechServiceConnection_Endpoint,e.href),void 0!==t&&n.setProperty(sl.SpeechServiceConnection_Key,t),n}static fromHost(e,t){Hl.throwIfNull(e,"hostName");const n=new Ec;return n.setProperty(sl.SpeechServiceConnection_Host,e.protocol+"//"+e.hostname+(""===e.port?"":":"+e.port)),void 0!==t&&n.setProperty(sl.SpeechServiceConnection_Key,t),n}static fromAuthorizationToken(e,t){Hl.throwIfNull(e,"authorizationToken"),Hl.throwIfNullOrWhitespace(t,"region");const n=new Ec;return n.setProperty(sl.SpeechServiceConnection_Region,t),n.setProperty(sl.SpeechServiceConnection_IntentRegion,t),n.authorizationToken=e,n}close(){}}class Ec extends Ac{constructor(){super(),this.privProperties=new Vl,this.speechRecognitionLanguage="en-US",this.outputFormat=Tl.Simple}get properties(){return this.privProperties}get endPoint(){return new URL(this.privProperties.getProperty(sl.SpeechServiceConnection_Endpoint))}get subscriptionKey(){return this.privProperties.getProperty(sl.SpeechServiceConnection_Key)}get region(){return this.privProperties.getProperty(sl.SpeechServiceConnection_Region)}get authorizationToken(){return this.privProperties.getProperty(sl.SpeechServiceAuthorization_Token)}set authorizationToken(e){this.privProperties.setProperty(sl.SpeechServiceAuthorization_Token,e)}get speechRecognitionLanguage(){return this.privProperties.getProperty(sl.SpeechServiceConnection_RecoLanguage)}set speechRecognitionLanguage(e){this.privProperties.setProperty(sl.SpeechServiceConnection_RecoLanguage,e)}get autoDetectSourceLanguages(){return this.privProperties.getProperty(sl.SpeechServiceConnection_AutoDetectSourceLanguages)}set autoDetectSourceLanguages(e){this.privProperties.setProperty(sl.SpeechServiceConnection_AutoDetectSourceLanguages,e)}get outputFormat(){return Tl[this.privProperties.getProperty(uu,void 0)]}set outputFormat(e){this.privProperties.setProperty(uu,Tl[e])}get endpointId(){return this.privProperties.getProperty(sl.SpeechServiceConnection_EndpointId)}set endpointId(e){this.privProperties.setProperty(sl.SpeechServiceConnection_EndpointId,e)}setProperty(e,t){Hl.throwIfNull(t,"value"),this.privProperties.setProperty(e,t)}getProperty(e,t){return this.privProperties.getProperty(e,t)}setProxy(e,t,n,r){this.setProperty(sl[sl.SpeechServiceConnection_ProxyHostName],e),this.setProperty(sl[sl.SpeechServiceConnection_ProxyPort],t),this.setProperty(sl[sl.SpeechServiceConnection_ProxyUserName],n),this.setProperty(sl[sl.SpeechServiceConnection_ProxyPassword],r)}setServiceProperty(e,t,n){const r=JSON.parse(this.privProperties.getProperty(fu,"{}"));r[e]=t,this.privProperties.setProperty(fu,JSON.stringify(r))}setProfanity(e){this.privProperties.setProperty(sl.SpeechServiceResponse_ProfanityOption,mc[e])}enableAudioLogging(){this.privProperties.setProperty(sl.SpeechServiceConnection_EnableAudioLogging,"true")}requestWordLevelTimestamps(){this.privProperties.setProperty(sl.SpeechServiceResponse_RequestWordLevelTimestamps,"true")}enableDictation(){this.privProperties.setProperty(hu,"true")}clone(){const e=new Ec;return e.privProperties=this.privProperties.clone(),e}get speechSynthesisLanguage(){return this.privProperties.getProperty(sl.SpeechServiceConnection_SynthLanguage)}set speechSynthesisLanguage(e){this.privProperties.setProperty(sl.SpeechServiceConnection_SynthLanguage,e)}get speechSynthesisVoiceName(){return this.privProperties.getProperty(sl.SpeechServiceConnection_SynthVoice)}set speechSynthesisVoiceName(e){this.privProperties.setProperty(sl.SpeechServiceConnection_SynthVoice,e)}get speechSynthesisOutputFormat(){return dc[this.privProperties.getProperty(sl.SpeechServiceConnection_SynthOutputFormat,void 0)]}set speechSynthesisOutputFormat(e){this.privProperties.setProperty(sl.SpeechServiceConnection_SynthOutputFormat,dc[e])}}class Cc{constructor(){}set applicationId(e){}}Cc.DialogTypes=((vc=class{}).BotFramework="bot_framework",vc.CustomCommands="custom_commands",vc);var kc={};e(kc,"AudioOutputStream",(()=>Rc),(e=>Rc=e)),e(kc,"PullAudioOutputStream",(()=>Pc),(e=>Pc=e)),e(kc,"PullAudioOutputStreamImpl",(()=>Nc),(e=>Nc=e)),e(kc,"PushAudioOutputStream",(()=>Lc),(e=>Lc=e)),e(kc,"PushAudioOutputStreamImpl",(()=>Dc),(e=>Dc=e));var Tc,Ic,Oc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class Rc{constructor(){}static createPullStream(){return Pc.create()}}class Pc extends Rc{static create(){return new Nc}}class Nc extends Pc{constructor(){super(),this.privId=La(),this.privStream=new(0,Cs.Stream)}set format(e){null==e&&(this.privFormat=_c.getDefaultOutputFormat()),this.privFormat=e}get format(){return this.privFormat}get isClosed(){return this.privStream.isClosed}id(){return this.privId}read(e){return Oc(this,void 0,void 0,(function*(){const t=new Int8Array(e);let n=0;if(void 0!==this.privLastChunkView){if(this.privLastChunkView.length>e.byteLength)return t.set(this.privLastChunkView.slice(0,e.byteLength)),this.privLastChunkView=this.privLastChunkView.slice(e.byteLength),Promise.resolve(e.byteLength);t.set(this.privLastChunkView),n=this.privLastChunkView.length,this.privLastChunkView=void 0}for(;n<e.byteLength&&!this.privStream.isReadEnded;){const r=yield this.privStream.read();if(void 0===r||r.isEnd)yield this.privStream.readEnded();else{let i;r.buffer.byteLength>e.byteLength-n?(i=r.buffer.slice(0,e.byteLength-n),this.privLastChunkView=new Int8Array(r.buffer.slice(e.byteLength-n))):i=r.buffer,t.set(new Int8Array(i),n),n+=i.byteLength}}return n}))}write(e){Hl.throwIfNullOrUndefined(this.privStream,"must set format before writing"),this.privStream.writeStreamChunk({buffer:e,isEnd:!1,timeReceived:Date.now()})}close(){this.privStream.close()}}class Lc extends Rc{constructor(){super()}static create(e){return new Dc(e)}}class Dc extends Lc{constructor(e){super(),this.privId=La(),this.privCallback=e}set format(e){}write(e){this.privCallback.write&&this.privCallback.write(e)}close(){this.privCallback.close&&this.privCallback.close()}id(){return this.privId}}(Ic=Tc||(Tc={}))[Ic.None=0]="None",Ic[Ic.TextToSpeechAudio=1]="TextToSpeechAudio";var Bc,jc;class Fc{toJsonString(){return JSON.stringify(this.iPrivConfig)}get(){return this.iPrivConfig}set(e){this.iPrivConfig=e}}(jc=Bc||(Bc={})).WordBoundary="WordBoundary",jc.Bookmark="Bookmark",jc.Viseme="Viseme";class Uc{constructor(e){this.privSynthesisAudioMetadata=JSON.parse(e)}static fromJSON(e){return new Uc(e)}get Metadata(){return this.privSynthesisAudioMetadata.Metadata}}var zc={};e(zc,"SynthesisTurn",(()=>au),(e=>au=e));var Hc={};e(Hc,"SynthesisAdapterBase",(()=>Qc),(e=>Qc=e));class Vc{constructor(e){this.privResult=e}get result(){return this.privResult}}class Wc{constructor(e,t,n,r){this.privResultId=e,this.privReason=t,this.privErrorDetails=n,this.privProperties=r}get resultId(){return this.privResultId}get reason(){return this.privReason}get errorDetails(){return this.privErrorDetails}get properties(){return this.privProperties}}class Gc extends Wc{constructor(e,t,n,r,i){super(e,t,r,i),this.privAudioData=n}get audioData(){return this.privAudioData}}class qc{constructor(e,t,n,r){this.privAudioOffset=e,this.privText=t,this.privWordLength=n,this.privTextOffset=r}get audioOffset(){return this.privAudioOffset}get text(){return this.privText}get wordLength(){return this.privWordLength}get textOffset(){return this.privTextOffset}}class Kc{constructor(e,t){this.privAudioOffset=e,this.privText=t}get audioOffset(){return this.privAudioOffset}get text(){return this.privText}}class Yc{constructor(e,t,n){this.privAudioOffset=e,this.privVisemeId=t,this.privAnimation=n}get audioOffset(){return this.privAudioOffset}get visemeId(){return this.privVisemeId}get animation(){return this.privAnimation}}var Jc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class Qc{constructor(e,t,n,r,i){if(this.speakOverride=void 0,this.receiveMessageOverride=void 0,this.connectImplOverride=void 0,this.configConnectionOverride=void 0,this.sendSynthesisContext=e=>{const t=this.synthesisContext.toJSON();if(t)return e.send(new fl(ja.Text,"synthesis.context",this.privSynthesisTurn.requestId,"application/json",t))},this.sendSpeechServiceConfig=(e,t)=>{if(t)return e.send(new fl(ja.Text,"speech.config",this.privSynthesisTurn.requestId,"application/json",t))},this.sendSsmlMessage=(e,t,n)=>e.send(new fl(ja.Text,"ssml",n,"application/ssml+xml",t)),!e)throw new us("authentication");if(!t)throw new us("connectionFactory");if(!n)throw new us("synthesizerConfig");this.privAuthentication=e,this.privConnectionFactory=t,this.privSynthesizerConfig=n,this.privIsDisposed=!1,this.privSpeechSynthesizer=r,this.privSessionAudioDestination=i,this.privSynthesisTurn=new(0,zc.SynthesisTurn),this.privConnectionEvents=new ms,this.privServiceEvents=new ms,this.privSynthesisContext=new cu(this.privSpeechSynthesizer),this.privAgentConfig=new Fc,this.connectionEvents.attach((e=>{if("ConnectionClosedEvent"===e.name){const t=e;1e3!==t.statusCode&&this.cancelSynthesisLocal(rl.Error,1007===t.statusCode?ol.BadRequestParameters:ol.ConnectionFailure,t.reason+" websocket error code: "+t.statusCode)}}))}get synthesisContext(){return this.privSynthesisContext}get agentConfig(){return this.privAgentConfig}get connectionEvents(){return this.privConnectionEvents}get serviceEvents(){return this.privServiceEvents}set activityTemplate(e){this.privActivityTemplate=e}get activityTemplate(){return this.privActivityTemplate}set audioOutputFormat(e){this.privAudioOutputFormat=e,this.privSynthesisTurn.audioOutputFormat=e,void 0!==this.privSessionAudioDestination&&(this.privSessionAudioDestination.format=e),void 0!==this.synthesisContext&&(this.synthesisContext.audioOutputFormat=e)}static addHeader(e,t){if(!t.hasHeader)return e;t.updateHeader(e.byteLength);const n=new Uint8Array(e.byteLength+t.header.byteLength);return n.set(new Uint8Array(t.header),0),n.set(new Uint8Array(e),t.header.byteLength),n.buffer}isDisposed(){return this.privIsDisposed}dispose(e){return Jc(this,void 0,void 0,(function*(){if(this.privIsDisposed=!0,void 0!==this.privSessionAudioDestination&&this.privSessionAudioDestination.close(),this.privConnectionConfigurationPromise){const t=yield this.privConnectionConfigurationPromise;yield t.dispose(e)}}))}connect(){return Jc(this,void 0,void 0,(function*(){yield this.connectImpl()}))}sendNetworkMessage(e,t){return Jc(this,void 0,void 0,(function*(){const n="string"==typeof t?ja.Text:ja.Binary,r="string"==typeof t?"application/json":"";return(yield this.fetchConnection()).send(new fl(n,e,this.privSynthesisTurn.requestId,r,t))}))}Speak(e,t,n,r,i,o){return Jc(this,void 0,void 0,(function*(){let a;if(a=t?e:this.privSpeechSynthesizer.buildSsml(e),void 0!==this.speakOverride)return this.speakOverride(a,n,r,i);this.privSuccessCallback=r,this.privErrorCallback=i,this.privSynthesisTurn.startNewSynthesis(n,e,t,o);try{yield this.connectImpl();const e=yield this.fetchConnection();yield this.sendSynthesisContext(e),yield this.sendSsmlMessage(e,a,n);const t=new Vc(new Gc(n,Ol.SynthesizingAudioStarted));this.privSpeechSynthesizer.synthesisStarted&&this.privSpeechSynthesizer.synthesisStarted(this.privSpeechSynthesizer,t);this.receiveMessage()}catch(e){return this.cancelSynthesisLocal(rl.Error,ol.ConnectionFailure,e),Promise.reject(e)}}))}cancelSynthesis(e,t,n,r){const i=new Vl;i.setProperty(du,ol[n]);const o=new Gc(e,Ol.Canceled,void 0,r,i);if(this.privSpeechSynthesizer.SynthesisCanceled){const e=new Vc(o);try{this.privSpeechSynthesizer.SynthesisCanceled(this.privSpeechSynthesizer,e)}catch(e){}}if(this.privSuccessCallback)try{this.privSuccessCallback(o)}catch(e){}}cancelSynthesisLocal(e,t,n){this.privSynthesisTurn.isSynthesizing&&(this.privSynthesisTurn.onStopSynthesizing(),this.cancelSynthesis(this.privSynthesisTurn.requestId,e,t,n))}processTypeSpecificMessages(e,t,n){return!0}receiveMessage(){return Jc(this,void 0,void 0,(function*(){try{const e=yield this.fetchConnection(),t=yield e.read();if(void 0!==this.receiveMessageOverride)return this.receiveMessageOverride();if(this.privIsDisposed)return;if(!t)return this.privSynthesisTurn.isSynthesizing?this.receiveMessage():void 0;this.privServiceHasSentMessage=!0;const n=fl.fromConnectionMessage(t);if(n.requestId.toLowerCase()===this.privSynthesisTurn.requestId.toLowerCase())switch(n.path.toLowerCase()){case"turn.start":this.privSynthesisTurn.onServiceTurnStartResponse();break;case"response":this.privSynthesisTurn.onServiceResponseMessage(n.textBody);break;case"audio":if(this.privSynthesisTurn.streamId.toLowerCase()===n.streamId.toLowerCase()&&n.binaryBody){if(this.privSynthesisTurn.onAudioChunkReceived(n.binaryBody),this.privSpeechSynthesizer.synthesizing)try{const e=Qc.addHeader(n.binaryBody,this.privSynthesisTurn.audioOutputFormat),t=new Vc(new Gc(this.privSynthesisTurn.requestId,Ol.SynthesizingAudio,e));this.privSpeechSynthesizer.synthesizing(this.privSpeechSynthesizer,t)}catch(e){}void 0!==this.privSessionAudioDestination&&this.privSessionAudioDestination.write(n.binaryBody)}break;case"audio.metadata":const e=Uc.fromJSON(n.textBody).Metadata;for(const t of e)switch(t.Type){case Bc.WordBoundary:this.privSynthesisTurn.onWordBoundaryEvent(t.Data.text.Text);const e=new qc(t.Data.Offset,t.Data.text.Text,t.Data.text.Length,this.privSynthesisTurn.currentTextOffset);if(this.privSpeechSynthesizer.wordBoundary)try{this.privSpeechSynthesizer.wordBoundary(this.privSpeechSynthesizer,e)}catch(e){}break;case Bc.Bookmark:const n=new Kc(t.Data.Offset,t.Data.Bookmark);if(this.privSpeechSynthesizer.bookmarkReached)try{this.privSpeechSynthesizer.bookmarkReached(this.privSpeechSynthesizer,n)}catch(e){}break;case Bc.Viseme:if(this.privSynthesisTurn.onVisemeMetadataReceived(t),t.Data.IsLastAnimation){const e=new Yc(t.Data.Offset,t.Data.VisemeId,this.privSynthesisTurn.getAndClearVisemeAnimation());if(this.privSpeechSynthesizer.visemeReceived)try{this.privSpeechSynthesizer.visemeReceived(this.privSpeechSynthesizer,e)}catch(e){}}}break;case"turn.end":let t;this.privSynthesisTurn.onServiceTurnEndResponse();try{const e=yield this.privSynthesisTurn.getAllReceivedAudioWithHeader();t=new Gc(this.privSynthesisTurn.requestId,Ol.SynthesizingAudioCompleted,e),this.privSuccessCallback&&this.privSuccessCallback(t)}catch(e){this.privErrorCallback&&this.privErrorCallback(e)}if(this.privSpeechSynthesizer.synthesisCompleted)try{this.privSpeechSynthesizer.synthesisCompleted(this.privSpeechSynthesizer,new Vc(t))}catch(e){}break;default:this.processTypeSpecificMessages(n)||this.privServiceEvents&&this.serviceEvents.onEvent(new ts(n.path.toLowerCase(),n.textBody))}return this.receiveMessage()}catch(e){}}))}connectImpl(e=!1){if(this.privConnectionPromise)return this.privConnectionPromise.then((e=>e.state()===Ua.Disconnected?(this.privConnectionId=null,this.privConnectionPromise=null,this.privServiceHasSentMessage=!1,this.connectImpl()):this.privConnectionPromise),(e=>(this.privConnectionId=null,this.privConnectionPromise=null,this.privServiceHasSentMessage=!1,this.connectImpl())));this.privAuthFetchEventId=La(),this.privConnectionId=La(),this.privSynthesisTurn.onPreConnectionStart(this.privAuthFetchEventId,this.privConnectionId);const t=e?this.privAuthentication.fetchOnExpiry(this.privAuthFetchEventId):this.privAuthentication.fetch(this.privAuthFetchEventId);return this.privConnectionPromise=t.then((t=>Jc(this,void 0,void 0,(function*(){yield this.privSynthesisTurn.onAuthCompleted(!1);const n=this.privConnectionFactory.create(this.privSynthesizerConfig,t,this.privConnectionId);n.events.attach((e=>{this.connectionEvents.onEvent(e)}));const r=yield n.open();return 200===r.statusCode?(yield this.privSynthesisTurn.onConnectionEstablishCompleted(r.statusCode),Promise.resolve(n)):403!==r.statusCode||e?(yield this.privSynthesisTurn.onConnectionEstablishCompleted(r.statusCode,r.reason),Promise.reject(`Unable to contact server. StatusCode: ${r.statusCode}, ${this.privSynthesizerConfig.parameters.getProperty(sl.SpeechServiceConnection_Endpoint)} Reason: ${r.reason}`)):this.connectImpl(!0)}))),(e=>Jc(this,void 0,void 0,(function*(){throw yield this.privSynthesisTurn.onAuthCompleted(!0,e),new Error(e)})))),this.privConnectionPromise.catch((()=>{})),this.privConnectionPromise}fetchConnection(){return Jc(this,void 0,void 0,(function*(){return this.privConnectionConfigurationPromise?this.privConnectionConfigurationPromise.then((e=>e.state()===Ua.Disconnected?(this.privConnectionId=null,this.privConnectionConfigurationPromise=null,this.privServiceHasSentMessage=!1,this.fetchConnection()):this.privConnectionConfigurationPromise),(e=>(this.privConnectionId=null,this.privConnectionConfigurationPromise=null,this.privServiceHasSentMessage=!1,this.fetchConnection()))):(this.privConnectionConfigurationPromise=this.configureConnection(),yield this.privConnectionConfigurationPromise)}))}configureConnection(){return Jc(this,void 0,void 0,(function*(){const e=yield this.connectImpl();return void 0!==this.configConnectionOverride?this.configConnectionOverride(e):(yield this.sendSpeechServiceConfig(e,this.privSynthesizerConfig.SpeechServiceConfig.serialize()),e)}))}}Qc.telemetryDataEnabled=!0;class Xc extends Wa{constructor(e,t,n=Da.Info){super(e,n),this.privRequestId=t}get requestId(){return this.privRequestId}}class Zc extends Xc{constructor(e,t,n){super("SynthesisTriggeredEvent",e),this.privSessionAudioDestinationId=t,this.privTurnAudioDestinationId=n}get audioSessionDestinationId(){return this.privSessionAudioDestinationId}get audioTurnDestinationId(){return this.privTurnAudioDestinationId}}class $c extends Xc{constructor(e,t){super("ConnectingToSynthesisServiceEvent",e),this.privAuthFetchEventId=t}get authFetchEventId(){return this.privAuthFetchEventId}}class eu extends Xc{constructor(e,t){super("SynthesisStartedEvent",e),this.privAuthFetchEventId=t}get authFetchEventId(){return this.privAuthFetchEventId}}var tu,nu,ru,iu,ou=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class au{constructor(){this.privIsDisposed=!1,this.privIsSynthesizing=!1,this.privIsSynthesisEnded=!1,this.privBytesReceived=0,this.privInTurn=!1,this.privTextOffset=0,this.privNextSearchTextIndex=0,this.onPreConnectionStart=(e,t)=>{this.privAuthFetchEventId=e,this.onEvent(new $c(this.privRequestId,this.privAuthFetchEventId))},this.onAuthCompleted=(e,t)=>{e&&this.onComplete()},this.onConnectionEstablishCompleted=(e,t)=>{if(200===e)return this.onEvent(new eu(this.requestId,this.privAuthFetchEventId)),void(this.privBytesReceived=0);403===e&&this.onComplete()},this.onServiceResponseMessage=e=>{const t=JSON.parse(e);this.streamId=t.audio.streamId},this.onServiceTurnEndResponse=()=>{this.privInTurn=!1,this.privTurnDeferral.resolve(),this.onComplete()},this.onServiceTurnStartResponse=()=>{this.privTurnDeferral&&this.privInTurn&&(this.privTurnDeferral.reject("Another turn started before current completed."),this.privTurnDeferral.promise.then().catch((()=>{}))),this.privInTurn=!0,this.privTurnDeferral=new vs},this.dispose=e=>{this.privIsDisposed||(this.privIsDisposed=!0)},this.onEvent=e=>{gs.instance.onEvent(e)},this.onComplete=()=>{this.privIsSynthesizing&&(this.privIsSynthesizing=!1,this.privIsSynthesisEnded=!0,this.privAudioOutputStream.close(),this.privInTurn=!1,void 0!==this.privTurnAudioDestination&&(this.privTurnAudioDestination.close(),this.privTurnAudioDestination=void 0))},this.privRequestId=La(),this.privTurnDeferral=new vs,this.privTurnDeferral.resolve()}get requestId(){return this.privRequestId}get streamId(){return this.privStreamId}set streamId(e){this.privStreamId=e}get audioOutputFormat(){return this.privAudioOutputFormat}set audioOutputFormat(e){this.privAudioOutputFormat=e}get turnCompletionPromise(){return this.privTurnDeferral.promise}get isSynthesisEnded(){return this.privIsSynthesisEnded}get isSynthesizing(){return this.privIsSynthesizing}get currentTextOffset(){return this.privTextOffset}get bytesReceived(){return this.privBytesReceived}getAllReceivedAudio(){return ou(this,void 0,void 0,(function*(){return this.privReceivedAudio?Promise.resolve(this.privReceivedAudio):this.privIsSynthesisEnded?(yield this.readAllAudioFromStream(),Promise.resolve(this.privReceivedAudio)):null}))}getAllReceivedAudioWithHeader(){return ou(this,void 0,void 0,(function*(){if(this.privReceivedAudioWithHeader)return this.privReceivedAudioWithHeader;if(!this.privIsSynthesisEnded)return null;if(this.audioOutputFormat.hasHeader){const e=yield this.getAllReceivedAudio();return this.privReceivedAudioWithHeader=Hc.SynthesisAdapterBase.addHeader(e,this.audioOutputFormat),this.privReceivedAudioWithHeader}return this.getAllReceivedAudio()}))}startNewSynthesis(e,t,n,r){this.privIsSynthesisEnded=!1,this.privIsSynthesizing=!0,this.privRequestId=e,this.privRawText=t,this.privIsSSML=n,this.privAudioOutputStream=new(0,kc.PullAudioOutputStreamImpl),this.privAudioOutputStream.format=this.privAudioOutputFormat,this.privReceivedAudio=null,this.privReceivedAudioWithHeader=null,this.privBytesReceived=0,this.privTextOffset=0,this.privNextSearchTextIndex=0,this.privPartialVisemeAnimation="",void 0!==r&&(this.privTurnAudioDestination=r,this.privTurnAudioDestination.format=this.privAudioOutputFormat),this.onEvent(new Zc(this.requestId,void 0,void 0===r?void 0:r.id()))}onAudioChunkReceived(e){this.isSynthesizing&&(this.privAudioOutputStream.write(e),this.privBytesReceived+=e.byteLength,void 0!==this.privTurnAudioDestination&&this.privTurnAudioDestination.write(e))}onWordBoundaryEvent(e){this.updateTextOffset(e)}onVisemeMetadataReceived(e){void 0!==e.Data.AnimationChunk&&(this.privPartialVisemeAnimation+=e.Data.AnimationChunk)}onStopSynthesizing(){this.onComplete()}getAndClearVisemeAnimation(){const e=this.privPartialVisemeAnimation;return this.privPartialVisemeAnimation="",e}updateTextOffset(e){this.privTextOffset>=0&&(this.privTextOffset=this.privRawText.indexOf(e,this.privNextSearchTextIndex),this.privTextOffset>=0&&(this.privNextSearchTextIndex=this.privTextOffset+e.length),this.privIsSSML&&this.privRawText.indexOf("<",this.privTextOffset+1)>this.privRawText.indexOf(">",this.privTextOffset+1)&&this.updateTextOffset(e))}readAllAudioFromStream(){return ou(this,void 0,void 0,(function*(){if(this.privIsSynthesisEnded){this.privReceivedAudio=new ArrayBuffer(this.bytesReceived);try{yield this.privAudioOutputStream.read(this.privReceivedAudio)}catch(e){this.privReceivedAudio=new ArrayBuffer(0)}}}))}}class su{constructor(e){let t=e.parameters.getProperty(sl.SpeechServiceConnection_Endpoint,void 0);if(!t){const n=e.parameters.getProperty(sl.SpeechServiceConnection_Region,"westus"),r=jl.getHostSuffix(n);t=e.parameters.getProperty(sl.SpeechServiceConnection_Host,`https://${n}.tts.speech${r}`)}this.privUri=`${t}/cognitiveservices/voices/list`;const n=fd.requestOptions;n.headers[fd.configParams.subscriptionKey]=e.parameters.getProperty(sl.SpeechServiceConnection_Key,void 0),this.privRestAdapter=new(0,rd.RestMessageAdapter)(n)}getVoicesList(e){return this.privRestAdapter.setHeaders(Zs.ConnectionId,e),this.privRestAdapter.request(rd.RestRequestType.Get,this.privUri)}}(nu=tu||(tu={}))[nu.Standard=0]="Standard",nu[nu.Custom=1]="Custom";class lu{constructor(e,t){this.privSynthesisServiceType=tu.Standard,this.privSpeechServiceConfig=e||new _l(new Al(null)),this.privParameters=t}get parameters(){return this.privParameters}get synthesisServiceType(){return this.privSynthesisServiceType}set synthesisServiceType(e){this.privSynthesisServiceType=e}get SpeechServiceConfig(){return this.privSpeechServiceConfig}}class cu{constructor(e){this.privContext={},this.privSpeechSynthesizer=e}setSection(e,t){this.privContext[e]=t}set audioOutputFormat(e){this.privAudioOutputFormat=e}toJSON(){const e=this.buildSynthesisContext();return this.setSection("synthesis",e),JSON.stringify(this.privContext)}buildSynthesisContext(){return{audio:{metadataOptions:{bookmarkEnabled:!!this.privSpeechSynthesizer.bookmarkReached,sentenceBoundaryEnabled:!1,visemeEnabled:!!this.privSpeechSynthesizer.visemeReceived,wordBoundaryEnabled:!!this.privSpeechSynthesizer.wordBoundary},outputFormat:this.privAudioOutputFormat.requestAudioFormatString},language:{autoDetection:this.privSpeechSynthesizer.autoDetectSourceLanguage}}}}(iu=ru||(ru={}))[iu.TextIndependentIdentification=0]="TextIndependentIdentification",iu[iu.TextDependentVerification=1]="TextDependentVerification",iu[iu.TextIndependentVerification=2]="TextIndependentVerification";const uu="OutputFormat",du="CancellationErrorCode",fu="ServiceProperties",hu="ForceDictation";var pu=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class mu{constructor(e,t,n,r){this.privRecorder=e,this.deviceId=t,this.privStreams={},this.turnOn=()=>{if(this.privInitializeDeferral)return this.privInitializeDeferral.promise;this.privInitializeDeferral=new vs;try{this.createAudioContext()}catch(e){if(e instanceof Error){const t=e;this.privInitializeDeferral.reject(t.name+": "+t.message)}else this.privInitializeDeferral.reject(e);return this.privInitializeDeferral.promise}const e=window.navigator;let t=e.getUserMedia||e.webkitGetUserMedia||e.mozGetUserMedia||e.msGetUserMedia;if(e.mediaDevices&&(t=(t,n,r)=>{e.mediaDevices.getUserMedia(t).then(n).catch(r)}),t){const e=()=>{this.onEvent(new qa(this.privId)),this.privMediaStream&&this.privMediaStream.active?(this.onEvent(new Ka(this.privId)),this.privInitializeDeferral.resolve()):t({audio:!this.deviceId||{deviceId:this.deviceId},video:!1},(e=>{this.privMediaStream=e,this.onEvent(new Ka(this.privId)),this.privInitializeDeferral.resolve()}),(e=>{const t=`Error occurred during microphone initialization: ${e}`;this.privInitializeDeferral.reject(t),this.onEvent(new Ja(this.privId,t))}))};"suspended"===this.privContext.state?this.privContext.resume().then(e).catch((e=>{this.privInitializeDeferral.reject(`Failed to initialize audio context: ${e}`)})):e()}else{const e="Browser does not support getUserMedia.";this.privInitializeDeferral.reject(e),this.onEvent(new Ja(e,""))}return this.privInitializeDeferral.promise},this.id=()=>this.privId,this.attach=e=>(this.onEvent(new Xa(this.privId,e)),this.listen(e).then((t=>(this.onEvent(new Za(this.privId,e)),{detach:()=>pu(this,void 0,void 0,(function*(){return t.readEnded(),delete this.privStreams[e],this.onEvent(new $a(this.privId,e)),this.turnOff()})),id:()=>e,read:()=>t.read()})))),this.detach=e=>{e&&this.privStreams[e]&&(this.privStreams[e].close(),delete this.privStreams[e],this.onEvent(new $a(this.privId,e)))},this.listen=e=>pu(this,void 0,void 0,(function*(){yield this.turnOn();const t=new Rs(this.privOutputChunkSize,e);this.privStreams[e]=t;try{this.privRecorder.record(this.privContext,this.privMediaStream,t)}catch(t){throw this.onEvent(new es(this.privId,e,t)),t}return t})),this.onEvent=e=>{this.privEvents.onEvent(e),gs.instance.onEvent(e)},this.createAudioContext=()=>{this.privContext||(this.privContext=Mc.getAudioContext(mu.AUDIOFORMAT.samplesPerSec))},this.privOutputChunkSize=mu.AUDIOFORMAT.avgBytesPerSec/10,this.privId=n||La(),this.privEvents=new ms,this.privMediaStream=r||null,this.privIsClosing=!1}get format(){return Promise.resolve(mu.AUDIOFORMAT)}get blob(){return Promise.reject("Not implemented for Mic input")}turnOff(){return pu(this,void 0,void 0,(function*(){for(const e in this.privStreams)if(e){const t=this.privStreams[e];t&&t.close()}this.onEvent(new Ya(this.privId)),this.privInitializeDeferral&&(yield this.privInitializeDeferral,this.privInitializeDeferral=null),yield this.destroyAudioContext()}))}get events(){return this.privEvents}get deviceInfo(){return this.getMicrophoneLabel().then((e=>({bitspersample:mu.AUDIOFORMAT.bitsPerSample,channelcount:mu.AUDIOFORMAT.channels,connectivity:vl.Unknown,manufacturer:"Speech SDK",model:e,samplerate:mu.AUDIOFORMAT.samplesPerSec,type:bl.Microphones})))}setProperty(e,t){if("MICROPHONE-WorkletSourceUrl"!==e)throw new Error("Property '"+e+"' is not supported on Microphone.");this.privRecorder.setWorkletUrl(t)}getMicrophoneLabel(){const e="microphone";if(void 0!==this.privMicrophoneLabel)return Promise.resolve(this.privMicrophoneLabel);if(void 0===this.privMediaStream||!this.privMediaStream.active)return Promise.resolve(e);this.privMicrophoneLabel=e;const t=this.privMediaStream.getTracks()[0].getSettings().deviceId;if(void 0===t)return Promise.resolve(this.privMicrophoneLabel);const n=new vs;return navigator.mediaDevices.enumerateDevices().then((e=>{for(const n of e)if(n.deviceId===t){this.privMicrophoneLabel=n.label;break}n.resolve(this.privMicrophoneLabel)}),(()=>n.resolve(this.privMicrophoneLabel))),n.promise}destroyAudioContext(){return pu(this,void 0,void 0,(function*(){if(!this.privContext)return;this.privRecorder.releaseMediaResources(this.privContext);let e=!1;"close"in this.privContext&&(e=!0),e?this.privIsClosing||(this.privIsClosing=!0,yield this.privContext.close(),this.privContext=null,this.privIsClosing=!1):null!==this.privContext&&"running"===this.privContext.state&&(yield this.privContext.suspend())}))}}mu.AUDIOFORMAT=Sc.getDefaultInputFormat();var gu={};e(gu,"FileAudioSource",(()=>yu),(e=>yu=e));var vu=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class yu{constructor(e,t,n){this.privStreams={},this.privHeaderEnd=44,this.turnOn=()=>{if(this.privFilename.lastIndexOf(".wav")!==this.privFilename.length-4){const e=this.privFilename+" is not supported. Only WAVE files are allowed at the moment.";return this.onEvent(new Ja(e,"")),Promise.reject(e)}this.onEvent(new qa(this.privId)),this.onEvent(new Ka(this.privId))},this.id=()=>this.privId,this.attach=e=>vu(this,void 0,void 0,(function*(){this.onEvent(new Xa(this.privId,e));const t=yield this.upload(e);return this.onEvent(new Za(this.privId,e)),Promise.resolve({detach:()=>vu(this,void 0,void 0,(function*(){t.readEnded(),delete this.privStreams[e],this.onEvent(new $a(this.privId,e)),yield this.turnOff()})),id:()=>e,read:()=>t.read()})})),this.detach=e=>{e&&this.privStreams[e]&&(this.privStreams[e].close(),delete this.privStreams[e],this.onEvent(new $a(this.privId,e)))},this.turnOff=()=>{for(const e in this.privStreams)if(e){const t=this.privStreams[e];t&&!t.isClosed&&t.close()}return this.onEvent(new Ya(this.privId)),Promise.resolve()},this.onEvent=e=>{this.privEvents.onEvent(e),gs.instance.onEvent(e)},this.privId=n||La(),this.privEvents=new ms,this.privSource=e,"undefined"!=typeof window&&"undefined"!=typeof Blob&&this.privSource instanceof Blob?this.privFilename=e.name:this.privFilename=t||"unknown.wav",this.privAudioFormatPromise=this.readHeader()}get format(){return this.privAudioFormatPromise}get blob(){return Promise.resolve(this.privSource)}get events(){return this.privEvents}get deviceInfo(){return this.privAudioFormatPromise.then((e=>Promise.resolve({bitspersample:e.bitsPerSample,channelcount:e.channels,connectivity:vl.Unknown,manufacturer:"Speech SDK",model:"File",samplerate:e.samplesPerSec,type:bl.File})))}readHeader(){const e=this.privSource.slice(0,512),t=new vs,n=e=>{const n=new DataView(e),r=e=>String.fromCharCode(n.getUint8(e),n.getUint8(e+1),n.getUint8(e+2),n.getUint8(e+3));if("RIFF"!==r(0))return void t.reject("Invalid WAV header in file, RIFF was not found");if("WAVE"!==r(8)||"fmt "!==r(12))return void t.reject("Invalid WAV header in file, WAVEfmt was not found");const i=n.getInt32(16,!0),o=n.getUint16(22,!0),a=n.getUint32(24,!0),s=n.getUint16(34,!0);let l=36+Math.max(i-16,0);for(;"data"!==r(l);l+=2)if(l>504)return void t.reject("Invalid WAV header in file, data block was not found");this.privHeaderEnd=l+8,t.resolve(Sc.getWaveFormatPCM(a,s,o))};if("undefined"!=typeof window&&"undefined"!=typeof Blob&&e instanceof Blob){const t=new FileReader;t.onload=e=>{const t=e.target.result;n(t)},t.readAsArrayBuffer(e)}else{const t=e;n(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength))}return t.promise}upload(e){return vu(this,void 0,void 0,(function*(){const t=t=>{const n=`Error occurred while processing '${this.privFilename}'. ${t}`;throw this.onEvent(new es(this.privId,e,n)),new Error(n)};try{yield this.turnOn();const n=yield this.privAudioFormatPromise,r=new Rs(n.avgBytesPerSec/10,e);this.privStreams[e]=r;const i=this.privSource.slice(this.privHeaderEnd),o=e=>{r.isClosed||(r.writeStreamChunk({buffer:e,isEnd:!1,timeReceived:Date.now()}),r.close())};if("undefined"!=typeof window&&"undefined"!=typeof Blob&&i instanceof Blob){const e=new FileReader;e.onerror=e=>{t(e.toString())},e.onload=e=>{const t=e.target.result;o(t)},e.readAsArrayBuffer(i)}else{const e=i;o(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength))}return r}catch(e){t(e)}}))}}class bu{constructor(e){this.record=(e,t,n)=>{const r=new Es(e.sampleRate,16e3);let i=!0;const o=e.createMediaStreamSource(t);if(!this.privSpeechProcessorScript){const e=new Blob(["class SP extends AudioWorkletProcessor {\n constructor(options) {\n super(options);\n }\n process(inputs, outputs) {\n const input = inputs[0];\n const output = [];\n for (let channel = 0; channel < input.length; channel += 1) {\n output[channel] = input[channel];\n }\n this.port.postMessage(output[0]);\n return true;\n }\n }\n registerProcessor('speech-processor', SP);"],{type:"application/javascript; charset=utf-8"});this.privSpeechProcessorScript=URL.createObjectURL(e)}const a=()=>{const a=(()=>{let t=0;try{return e.createScriptProcessor(t,1,1)}catch(n){t=2048;let r=e.sampleRate;for(;t<16384&&r>=32e3;)t<<=1,r>>=1;return e.createScriptProcessor(t,1,1)}})();a.onaudioprocess=e=>{const t=e.inputBuffer.getChannelData(0);if(n&&!n.isClosed){const e=r.encode(t);e&&(n.writeStreamChunk({buffer:e,isEnd:!1,timeReceived:Date.now()}),i=!1)}},o.connect(a),a.connect(e.destination),this.privMediaResources={scriptProcessorNode:a,source:o,stream:t}};if(this.privSpeechProcessorScript&&e.audioWorklet)e.audioWorklet.addModule(this.privSpeechProcessorScript).then((()=>{const a=new AudioWorkletNode(e,"speech-processor");a.port.onmessage=e=>{const t=e.data;if(n&&!n.isClosed){const e=r.encode(t);e&&(n.writeStreamChunk({buffer:e,isEnd:!1,timeReceived:Date.now()}),i=!1)}},o.connect(a),a.connect(e.destination),this.privMediaResources={scriptProcessorNode:a,source:o,stream:t}})).catch((()=>{a()}));else try{a()}catch(e){throw new Error(`Unable to start audio worklet node for PCMRecorder: ${e}`)}},this.releaseMediaResources=e=>{this.privMediaResources&&(this.privMediaResources.scriptProcessorNode&&(this.privMediaResources.scriptProcessorNode.disconnect(e.destination),this.privMediaResources.scriptProcessorNode=null),this.privMediaResources.source&&(this.privMediaResources.source.disconnect(),this.privStopInputOnRelease&&this.privMediaResources.stream.getTracks().forEach((e=>e.stop())),this.privMediaResources.source=null))},this.privStopInputOnRelease=e}setWorkletUrl(e){this.privSpeechProcessorScript=e}}var wu={};e(wu,"WebsocketConnection",(()=>$u),(e=>$u=e));var xu={};e(xu,"WebsocketMessageAdapter",(()=>Xu),(e=>Xu=e));var Su=a("1DJXa"),Mu={};e(Mu,"CertCheckAgent",(()=>Ju),(e=>Ju=e));var _u,Au;Su=a("1DJXa");Au=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e};var Eu,Cu,ku={};e(ku,"stringify",(()=>Eu),(e=>Eu=e)),e(ku,"parse",(()=>Cu),(e=>Cu=e));var Tu=Object.prototype.hasOwnProperty;function Iu(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function Ou(e){try{return encodeURIComponent(e)}catch(e){return null}}Eu=function(e,t){t=t||"";var n,r,i=[];for(r in"string"!=typeof t&&(t="?"),e)if(Tu.call(e,r)){if((n=e[r])||null!=n&&!isNaN(n)||(n=""),r=Ou(r),n=Ou(n),null===r||null===n)continue;i.push(r+"="+n)}return i.length?t+i.join("&"):""},Cu=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,r={};t=n.exec(e);){var i=Iu(t[1]),o=Iu(t[2]);null===i||null===o||i in r||(r[i]=o)}return r};var Ru=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,Pu=/[\n\r\t]/g,Nu=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,Lu=/:\d+$/,Du=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,Bu=/^[a-zA-Z]:/;function ju(e){return(e||"").toString().replace(Ru,"")}var Fu=[["#","hash"],["?","query"],function(e,t){return Hu(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],Uu={hash:1,query:1};function zu(e){var n,r=("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{}).location||{},i={},o=typeof(e=e||r);if("blob:"===e.protocol)i=new Wu(unescape(e.pathname),{});else if("string"===o)for(n in i=new Wu(e,{}),Uu)delete i[n];else if("object"===o){for(n in e)n in Uu||(i[n]=e[n]);void 0===i.slashes&&(i.slashes=Nu.test(e.href))}return i}function Hu(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function Vu(e,t){e=(e=ju(e)).replace(Pu,""),t=t||{};var n,r=Du.exec(e),i=r[1]?r[1].toLowerCase():"",o=!!r[2],a=!!r[3],s=0;return o?a?(n=r[2]+r[3]+r[4],s=r[2].length+r[3].length):(n=r[2]+r[4],s=r[2].length):a?(n=r[3]+r[4],s=r[3].length):n=r[4],"file:"===i?s>=2&&(n=n.slice(2)):Hu(i)?n=r[4]:i?o&&(n=n.slice(2)):s>=2&&Hu(t.protocol)&&(n=r[4]),{protocol:i,slashes:o||Hu(i),slashesCount:s,rest:n}}function Wu(e,t,n){if(e=(e=ju(e)).replace(Pu,""),!(this instanceof Wu))return new Wu(e,t,n);var r,i,o,a,s,l,c=Fu.slice(),u=typeof t,d=this,f=0;for("object"!==u&&"string"!==u&&(n=t,t=null),n&&"function"!=typeof n&&(n=ku.parse),r=!(i=Vu(e||"",t=zu(t))).protocol&&!i.slashes,d.slashes=i.slashes||r&&t.slashes,d.protocol=i.protocol||t.protocol||"",e=i.rest,("file:"===i.protocol&&(2!==i.slashesCount||Bu.test(e))||!i.slashes&&(i.protocol||i.slashesCount<2||!Hu(d.protocol)))&&(c[3]=[/(.*)/,"pathname"]);f<c.length;f++)"function"!=typeof(a=c[f])?(o=a[0],l=a[1],o!=o?d[l]=e:"string"==typeof o?~(s="@"===o?e.lastIndexOf(o):e.indexOf(o))&&("number"==typeof a[2]?(d[l]=e.slice(0,s),e=e.slice(s+a[2])):(d[l]=e.slice(s),e=e.slice(0,s))):(s=o.exec(e))&&(d[l]=s[1],e=e.slice(0,s.index)),d[l]=d[l]||r&&a[3]&&t[l]||"",a[4]&&(d[l]=d[l].toLowerCase())):e=a(e,d);n&&(d.query=n(d.query)),r&&t.slashes&&"/"!==d.pathname.charAt(0)&&(""!==d.pathname||""!==t.pathname)&&(d.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,i=n[r-1],o=!1,a=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),a++):a&&(0===r&&(o=!0),n.splice(r,1),a--);return o&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(d.pathname,t.pathname)),"/"!==d.pathname.charAt(0)&&Hu(d.protocol)&&(d.pathname="/"+d.pathname),Au(d.port,d.protocol)||(d.host=d.hostname,d.port=""),d.username=d.password="",d.auth&&(~(s=d.auth.indexOf(":"))?(d.username=d.auth.slice(0,s),d.username=encodeURIComponent(decodeURIComponent(d.username)),d.password=d.auth.slice(s+1),d.password=encodeURIComponent(decodeURIComponent(d.password))):d.username=encodeURIComponent(decodeURIComponent(d.auth)),d.auth=d.password?d.username+":"+d.password:d.username),d.origin="file:"!==d.protocol&&Hu(d.protocol)&&d.host?d.protocol+"//"+d.host:"null",d.href=d.toString()}Wu.prototype={set:function(e,t,n){var r=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||ku.parse)(t)),r[e]=t;break;case"port":r[e]=t,Au(t,r.protocol)?t&&(r.host=r.hostname+":"+t):(r.host=r.hostname,r[e]="");break;case"hostname":r[e]=t,r.port&&(t+=":"+r.port),r.host=t;break;case"host":r[e]=t,Lu.test(t)?(t=t.split(":"),r.port=t.pop(),r.hostname=t.join(":")):(r.hostname=t,r.port="");break;case"protocol":r.protocol=t.toLowerCase(),r.slashes=!n;break;case"pathname":case"hash":if(t){var i="pathname"===e?"/":"#";r[e]=t.charAt(0)!==i?i+t:t}else r[e]=t;break;case"username":case"password":r[e]=encodeURIComponent(t);break;case"auth":var o=t.indexOf(":");~o?(r.username=t.slice(0,o),r.username=encodeURIComponent(decodeURIComponent(r.username)),r.password=t.slice(o+1),r.password=encodeURIComponent(decodeURIComponent(r.password))):r.username=encodeURIComponent(decodeURIComponent(t))}for(var a=0;a<Fu.length;a++){var s=Fu[a];s[4]&&(r[s[1]]=r[s[1]].toLowerCase())}return r.auth=r.password?r.username+":"+r.password:r.username,r.origin="file:"!==r.protocol&&Hu(r.protocol)&&r.host?r.protocol+"//"+r.host:"null",r.href=r.toString(),r},toString:function(e){e&&"function"==typeof e||(e=ku.stringify);var t,n=this,r=n.host,i=n.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var o=i+(n.protocol&&n.slashes||Hu(n.protocol)?"//":"");return n.username?(o+=n.username,n.password&&(o+=":"+n.password),o+="@"):n.password?(o+=":"+n.password,o+="@"):"file:"!==n.protocol&&Hu(n.protocol)&&!r&&"/"!==n.pathname&&(o+="@"),(":"===r[r.length-1]||Lu.test(n.hostname)&&!n.port)&&(r+=":"),o+=r+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(o+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(o+=n.hash),o}},Wu.extractProtocol=Vu,Wu.location=zu,Wu.trimLeft=ju,Wu.qs=ku,_u=Wu;var Gu=a("5U18c"),qu=(Su=a("1DJXa"),Su=a("1DJXa"),Su=a("1DJXa"),Su=a("1DJXa"),a("ePtPP")),Ku=a("bqBrJ").Buffer,Yu=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class Ju{constructor(e){e&&(this.privProxyInfo=e),Ju.privDiskCache||(Ju.privDiskCache=new(r(Su))("microsoft-cognitiveservices-speech-sdk-cache",{supportBuffer:!0,location:void 0}))}static forceReinitDiskCache(){Ju.privDiskCache=void 0,Ju.privMemCache={}}GetAgent(e){const t=new(r(Su).Agent)(this.CreateConnection);if(void 0!==this.privProxyInfo&&void 0!==this.privProxyInfo.HostName&&this.privProxyInfo.Port>0){t["privProxyInfo"]=this.privProxyInfo}return t}static GetProxyAgent(e){const t={host:e.HostName,port:e.Port};e.UserName?t.headers={"Proxy-Authentication":"Basic "+new Ku(e.UserName+":"+(void 0===e.Password)?"":e.Password).toString("base64")}:t.headers={},t.headers.requestOCSP="true";return new(r(Su))(t)}static OCSPCheck(e,t){return Yu(this,void 0,void 0,(function*(){let n,r,i=!1;const o=yield e;o.cork();const a=o;return new Promise(((e,s)=>{o.on("OCSPResponse",(e=>{e&&(this.onEvent(new Hs),r=e)})),o.on("error",(e=>{i||(i=!0,o.destroy(),s(e))})),a.on("secure",(()=>Yu(this,void 0,void 0,(function*(){const l=a.getPeerCertificate(!0);try{const a=yield this.GetIssuer(l);n=Gu.request.generate(l.raw,a.raw);const s=n.id.toString("hex");if(!r){const e=yield Ju.GetResponseFromCache(s,n,t);r=e}yield this.VerifyOCSPResponse(r,n,t),o.uncork(),i=!0,e(o)}catch(e){o.destroy(),i=!0,s(e)}}))))}))}))}static GetIssuer(e){return e.issuerCertificate?Promise.resolve(e.issuerCertificate):new Promise(((t,n)=>{new Gu.Agent({}).fetchIssuer(e,null,((e,r)=>{e?n(e):t(r)}))}))}static GetResponseFromCache(e,t,n){return Yu(this,void 0,void 0,(function*(){let r=Ju.privMemCache[e];if(r&&this.onEvent(new Ls(e)),!r)try{const t=yield Ju.privDiskCache.get(e);t.isCached&&(Ju.onEvent(new Bs(e)),Ju.StoreMemoryCacheEntry(e,t.value),r=t.value)}catch(e){r=null}if(!r)return r;try{const i=Gu.utils.parseResponse(r).value.tbsResponseData;if(i.responses.length<1)return void this.onEvent(new Ks(e,"Not enough data in cached response"));const o=i.responses[0].thisUpdate,a=i.responses[0].nextUpdate;if(a<Date.now()+this.testTimeOffset-6e4)this.onEvent(new Vs(e,a)),r=null;else{const r=Math.min(864e5,(a-o)/2);a-(Date.now()+this.testTimeOffset)<r?(this.onEvent(new Ws(e,o,a)),this.UpdateCache(t,n).catch((t=>{this.onEvent(new Js(e,t.toString()))}))):this.onEvent(new Gs(e,o,a))}}catch(t){this.onEvent(new Ks(e,t)),r=null}return r||this.onEvent(new Ds(e)),r}))}static VerifyOCSPResponse(e,t,n){return Yu(this,void 0,void 0,(function*(){let r=e;t.certID.toString("hex");return r||(r=yield Ju.GetOCSPResponse(t,n)),new Promise(((i,o)=>{Gu.verify({request:t,response:r},((a,s)=>{a?(Ju.onEvent(new qs(t.id.toString("hex"),a)),e?this.VerifyOCSPResponse(null,t,n).then((()=>{i()}),(e=>{o(e)})):o(a)):(e||Ju.StoreCacheEntry(t.id.toString("hex"),r),i())}))}))}))}static UpdateCache(e,t){return Yu(this,void 0,void 0,(function*(){const n=e.id.toString("hex");this.onEvent(new js(n));const r=yield this.GetOCSPResponse(e,t);this.StoreCacheEntry(n,r),this.onEvent(new zs(e.id.toString("hex")))}))}static StoreCacheEntry(e,t){this.StoreMemoryCacheEntry(e,t),this.StoreDiskCacheEntry(e,t)}static StoreMemoryCacheEntry(e,t){this.privMemCache[e]=t,this.onEvent(new Fs(e))}static StoreDiskCacheEntry(e,t){this.privDiskCache.set(e,t).then((()=>{this.onEvent(new Us(e))}))}static GetOCSPResponse(e,t){let n={};if(t){const e=Ju.GetProxyAgent(t);n.agent=e}return new Promise(((t,i)=>{Gu.utils.getAuthorityInfo(e.cert,"1.3.6.1.5.5.7.48.1",((o,a)=>{if(o)return void i(o);const s=r(_u)(a);s.path=s.pathname,n=Object.assign(Object.assign({},n),s),Gu.utils.getResponse(n,e.data,((n,r)=>{n?i(n):(this.onEvent(new Ys(e.certID.toString("hex"))),t(r))}))}))}))}CreateConnection(e,t){const n=void 0!==qu&&t.secureEndpoint;let r;if(t=Object.assign(Object.assign({},t),{requestOCSP:!Ju.forceDisableOCSPStapling,servername:t.host}),this.privProxyInfo){const n=Ju.GetProxyAgent(this.privProxyInfo);r=new Promise(((r,i)=>{n.callback(e,t,((e,t)=>{e?i(e):r(t)}))}))}else r=(t.secureEndpoint,Promise.resolve(Su.connect(t)));return n?Ju.OCSPCheck(r,this.privProxyInfo):r}}Ju.testTimeOffset=0,Ju.forceDisableOCSPStapling=!1,Ju.privMemCache={},Ju.onEvent=e=>{gs.instance.onEvent(e)};var Qu=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class Xu{constructor(e,t,n,i,o,a){if(this.open=()=>{if(this.privConnectionState===Ua.Disconnected)return Promise.reject(`Cannot open a connection that is in ${this.privConnectionState} state`);if(this.privConnectionEstablishDeferral)return this.privConnectionEstablishDeferral.promise;this.privConnectionEstablishDeferral=new vs,this.privCertificateValidatedDeferral=new vs,this.privConnectionState=Ua.Connecting;try{if("undefined"==typeof WebSocket||Xu.forceNpmWebSocket){const e={headers:this.privHeaders,perMessageDeflate:this.privEnableCompression};this.privCertificateValidatedDeferral.resolve();const t=new(0,Mu.CertCheckAgent)(this.proxyInfo);e.agent=t.GetAgent();let n=new URL(this.privUri).protocol;"wss:"===(null==n?void 0:n.toLocaleLowerCase())?n="https:":"ws:"===(null==n?void 0:n.toLocaleLowerCase())&&(n="http:"),e.agent.protocol=n,this.privWebsocketClient=new(r(Su))(this.privUri,e)}else this.privCertificateValidatedDeferral.resolve(),this.privWebsocketClient=new WebSocket(this.privUri);this.privWebsocketClient.binaryType="arraybuffer",this.privReceivingMessageQueue=new(0,bs.Queue),this.privDisconnectDeferral=new vs,this.privSendMessageQueue=new(0,bs.Queue),this.processSendQueue().catch((e=>{gs.instance.onEvent(new Qs(e))}))}catch(e){return this.privConnectionEstablishDeferral.resolve(new ps(500,e)),this.privConnectionEstablishDeferral.promise}return this.onEvent(new rs(this.privConnectionId,this.privUri)),this.privWebsocketClient.onopen=e=>{this.privCertificateValidatedDeferral.promise.then((()=>{this.privConnectionState=Ua.Connected,this.onEvent(new is(this.privConnectionId)),this.privConnectionEstablishDeferral.resolve(new ps(200,""))}),(e=>{this.privConnectionEstablishDeferral.reject(e)}))},this.privWebsocketClient.onerror=e=>{this.onEvent(new as(this.privConnectionId,e.message,e.type)),this.privLastErrorReceived=e.message},this.privWebsocketClient.onclose=e=>{this.privConnectionState===Ua.Connecting?(this.privConnectionState=Ua.Disconnected,this.privConnectionEstablishDeferral.resolve(new ps(e.code,e.reason+" "+this.privLastErrorReceived))):(this.privConnectionState=Ua.Disconnected,this.privWebsocketClient=null,this.onEvent(new os(this.privConnectionId,e.code,e.reason))),this.onClose(e.code,e.reason).catch((e=>{gs.instance.onEvent(new Qs(e))}))},this.privWebsocketClient.onmessage=e=>{const t=(new Date).toISOString();if(this.privConnectionState===Ua.Connected){const n=new vs;if(this.privReceivingMessageQueue.enqueueFromPromise(n.promise),e.data instanceof ArrayBuffer){const r=new As(ja.Binary,e.data);this.privMessageFormatter.toConnectionMessage(r).then((e=>{this.onEvent(new ls(this.privConnectionId,t,e)),n.resolve(e)}),(e=>{n.reject(`Invalid binary message format. Error: ${e}`)}))}else{const r=new As(ja.Text,e.data);this.privMessageFormatter.toConnectionMessage(r).then((e=>{this.onEvent(new ls(this.privConnectionId,t,e)),n.resolve(e)}),(e=>{n.reject(`Invalid text message format. Error: ${e}`)}))}}},this.privConnectionEstablishDeferral.promise},this.send=e=>{if(this.privConnectionState!==Ua.Connected)return Promise.reject(`Cannot send on connection that is in ${Ua[this.privConnectionState]} state`);const t=new vs,n=new vs;return this.privSendMessageQueue.enqueueFromPromise(n.promise),this.privMessageFormatter.fromConnectionMessage(e).then((r=>{n.resolve({Message:e,RawWebsocketMessage:r,sendStatusDeferral:t})}),(e=>{n.reject(`Error formatting the message. ${e}`)})),t.promise},this.read=()=>this.privConnectionState!==Ua.Connected?Promise.reject(`Cannot read on connection that is in ${this.privConnectionState} state`):this.privReceivingMessageQueue.dequeue(),this.close=e=>this.privWebsocketClient?(this.privConnectionState!==Ua.Disconnected&&this.privWebsocketClient.close(1e3,e||"Normal closure by client"),this.privDisconnectDeferral.promise):Promise.resolve(),this.sendRawMessage=e=>{try{return e?(this.onEvent(new cs(this.privConnectionId,(new Date).toISOString(),e.Message)),this.isWebsocketOpen?(this.privWebsocketClient.send(e.RawWebsocketMessage.payload),Promise.resolve()):Promise.reject("websocket send error: Websocket not ready "+this.privConnectionId+" "+e.Message.id+" "+(new Error).stack)):Promise.resolve()}catch(e){return Promise.reject(`websocket send error: ${e}`)}},this.onEvent=e=>{this.privConnectionEvents.onEvent(e),gs.instance.onEvent(e)},!e)throw new us("uri");if(!n)throw new us("messageFormatter");this.proxyInfo=i,this.privConnectionEvents=new ms,this.privConnectionId=t,this.privMessageFormatter=n,this.privConnectionState=Ua.None,this.privUri=e,this.privHeaders=o,this.privEnableCompression=a,this.privHeaders[Zs.ConnectionId]=this.privConnectionId,this.privLastErrorReceived=""}get state(){return this.privConnectionState}get events(){return this.privConnectionEvents}onClose(e,t){return Qu(this,void 0,void 0,(function*(){const n=`Connection closed. ${e}: ${t}`;this.privConnectionState=Ua.Disconnected,this.privDisconnectDeferral.resolve(),yield this.privReceivingMessageQueue.drainAndDispose((e=>{}),n),yield this.privSendMessageQueue.drainAndDispose((e=>{e.sendStatusDeferral.reject(n)}),n)}))}processSendQueue(){return Qu(this,void 0,void 0,(function*(){for(;;){const e=this.privSendMessageQueue.dequeue(),t=yield e;if(!t)return;try{yield this.sendRawMessage(t),t.sendStatusDeferral.resolve()}catch(e){t.sendStatusDeferral.reject(e)}}}))}get isWebsocketOpen(){return this.privWebsocketClient&&this.privWebsocketClient.readyState===this.privWebsocketClient.OPEN}}Xu.forceNpmWebSocket=!1;var Zu=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class $u{constructor(e,t,n,r,i,o=!1,a){if(this.privIsDisposed=!1,this.isDisposed=()=>this.privIsDisposed,this.state=()=>this.privConnectionMessageAdapter.state,this.open=()=>this.privConnectionMessageAdapter.open(),this.send=e=>this.privConnectionMessageAdapter.send(e),this.read=()=>this.privConnectionMessageAdapter.read(),!e)throw new us("uri");if(!r)throw new us("messageFormatter");this.privMessageFormatter=r;let s="",l=0;if(t)for(const n in t)if(n){s+=0===l&&-1===e.indexOf("?")?"?":"&";s+=`${n}=${encodeURIComponent(t[n])}`,l++}if(n)for(const t in n)if(t){s+=0===l&&-1===e.indexOf("?")?"?":"&";s+=`${t}=${encodeURIComponent(n[t])}`,l++}this.privUri=e+s,this.privId=a||La(),this.privConnectionMessageAdapter=new(0,xu.WebsocketMessageAdapter)(this.privUri,this.id,this.privMessageFormatter,i,n,o)}dispose(){return Zu(this,void 0,void 0,(function*(){this.privIsDisposed=!0,this.privConnectionMessageAdapter&&(yield this.privConnectionMessageAdapter.close())}))}get id(){return this.privId}get events(){return this.privConnectionMessageAdapter.events}}class ed{constructor(e,t){this.privBuffers=[],this.privReplayOffset=0,this.privLastShrinkOffset=0,this.privBufferStartOffset=0,this.privBufferSerial=0,this.privBufferedBytes=0,this.privReplay=!1,this.privLastChunkAcquiredTime=0,this.id=()=>this.privAudioNode.id(),this.privAudioNode=e,this.privBytesPerSecond=t}read(){if(this.privReplay&&0!==this.privBuffers.length){const e=this.privReplayOffset-this.privBufferStartOffset;let t=Math.round(e*this.privBytesPerSecond*1e-7);0!=t%2&&t++;let n=0;for(;n<this.privBuffers.length&&t>=this.privBuffers[n].chunk.buffer.byteLength;)t-=this.privBuffers[n++].chunk.buffer.byteLength;if(n<this.privBuffers.length){const e=this.privBuffers[n].chunk.buffer.slice(t);return this.privReplayOffset+=e.byteLength/this.privBytesPerSecond*1e7,n===this.privBuffers.length-1&&(this.privReplay=!1),Promise.resolve({buffer:e,isEnd:!1,timeReceived:this.privBuffers[n].chunk.timeReceived})}}return this.privAudioNode.read().then((e=>(e&&e.buffer&&(this.privBuffers.push(new td(e,this.privBufferSerial++,this.privBufferedBytes)),this.privBufferedBytes+=e.buffer.byteLength),e)))}detach(){return this.privBuffers=void 0,this.privAudioNode.detach()}replay(){this.privBuffers&&0!==this.privBuffers.length&&(this.privReplay=!0,this.privReplayOffset=this.privLastShrinkOffset)}shrinkBuffers(e){if(void 0===this.privBuffers||0===this.privBuffers.length)return;this.privLastShrinkOffset=e;const t=e-this.privBufferStartOffset;let n=Math.round(t*this.privBytesPerSecond*1e-7),r=0;for(;r<this.privBuffers.length&&n>=this.privBuffers[r].chunk.buffer.byteLength;)n-=this.privBuffers[r++].chunk.buffer.byteLength;this.privBufferStartOffset=Math.round(e-n/this.privBytesPerSecond*1e7),this.privBuffers=this.privBuffers.slice(r)}findTimeAtOffset(e){if(e<this.privBufferStartOffset||void 0===this.privBuffers)return 0;for(const t of this.privBuffers){const n=t.byteOffset/this.privBytesPerSecond*1e7,r=n+t.chunk.buffer.byteLength/this.privBytesPerSecond*1e7;if(e>=n&&e<=r)return t.chunk.timeReceived}return 0}}class td{constructor(e,t,n){this.chunk=e,this.serial=t,this.byteOffset=n}}class nd{constructor(e,t,n,r){this.privProxyHostName=e,this.privProxyPort=t,this.privProxyUserName=n,this.privProxyPassword=r}static fromParameters(e){return new nd(e.getProperty(sl.SpeechServiceConnection_ProxyHostName),parseInt(e.getProperty(sl.SpeechServiceConnection_ProxyPort),10),e.getProperty(sl.SpeechServiceConnection_ProxyUserName),e.getProperty(sl.SpeechServiceConnection_ProxyPassword))}static fromRecognizerConfig(e){return this.fromParameters(e.parameters)}get HostName(){return this.privProxyHostName}get Port(){return this.privProxyPort}get UserName(){return this.privProxyUserName}get Password(){return this.privProxyPassword}}var rd={};e(rd,"RestRequestType",(()=>ld),(e=>ld=e)),e(rd,"RestMessageAdapter",(()=>dd),(e=>dd=e));var id,od;const ad=new Set(["json","buffer","string"]);od=e=>(...t)=>{const n=new Set;let r,i,o,a="";return t.forEach((e=>{if("string"==typeof e)if(e.toUpperCase()===e){if(r){throw new Error(`Can't set method to ${e}, already set to ${r}.`)}r=e}else if(e.startsWith("http:")||e.startsWith("https:"))a=e;else{if(!ad.has(e))throw new Error(`Unknown encoding, ${e}`);i=e}else if("number"==typeof e)n.add(e);else{if("object"!=typeof e)throw new Error("Unknown type: "+typeof e);if(Array.isArray(e)||e instanceof Set)e.forEach((e=>n.add(e)));else{if(o)throw new Error("Cannot set headers twice.");o=e}}})),r||(r="GET"),0===n.size&&n.add(200),e(n,r,i,o,a)};class sd extends Error{constructor(e,...t){let n;super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,sd),this.name="StatusError",this.message=e.statusMessage,this.statusCode=e.status,this.res=e,this.json=e.json.bind(e),this.text=e.text.bind(e),this.arrayBuffer=e.arrayBuffer.bind(e);Object.defineProperty(this,"responseBody",{get:()=>(n||(n=this.arrayBuffer()),n)}),this.headers={};for(const[t,n]of e.headers.entries())this.headers[t.toLowerCase()]=n}}id=od(((e,t,n,r,i)=>async(o,a,s={})=>{o=i+(o||"");let l=new URL(o);if(r||(r={}),l.username&&(r.Authorization="Basic "+btoa(l.username+":"+l.password),l=new URL(l.protocol+"//"+l.host+l.pathname+l.search)),"https:"!==l.protocol&&"http:"!==l.protocol)throw new Error(`Unknown protocol, ${l.protocol}`);if(a)if(a instanceof ArrayBuffer||ArrayBuffer.isView(a)||"string"==typeof a);else{if("object"!=typeof a)throw new Error("Unknown body type.");a=JSON.stringify(a),r["Content-Type"]="application/json"}s=new Headers({...r||{},...s});const c=await fetch(l,{method:t,headers:s,body:a});if(c.statusCode=c.status,!e.has(c.status))throw new sd(c);return"json"===n?c.json():"buffer"===n?c.arrayBuffer():"string"===n?c.text():c}));var ld,cd,ud=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};(cd=ld||(ld={})).Get="GET",cd.Post="POST",cd.Delete="DELETE",cd.File="file";class dd{constructor(e){if(!e)throw new us("configParams");this.privHeaders=e.headers,this.privIgnoreCache=e.ignoreCache}static extractHeaderValue(e,t){let n="";try{const r=t.trim().split(/[\r\n]+/),i={};r.forEach((e=>{const t=e.split(": "),n=t.shift().toLowerCase(),r=t.join(": ");i[n]=r})),n=i[e.toLowerCase()]}catch(e){}return n}set options(e){this.privHeaders=e.headers,this.privIgnoreCache=e.ignoreCache}setHeaders(e,t){this.privHeaders[e]=t}request(e,t,n={},i=null,o=null){const a=new vs,s=e===ld.File?"POST":e,l=(e,t={})=>{const n=e;return{data:JSON.stringify(t),headers:JSON.stringify(e.headers),json:t,ok:e.statusCode>=200&&e.statusCode<300,status:e.statusCode,statusText:t.error?t.error.message:n.statusText?n.statusText:n.statusMessage}},c=i=>{r(id)(t,s,this.privHeaders,200,201,202,204,400,401,402,403,404)(""===this.queryParams(n)?"":"?"+this.queryParams(n),i).then((t=>ud(this,void 0,void 0,(function*(){if(e===ld.Delete||204===t.statusCode)a.resolve(l(t));else try{const e=yield t.json();a.resolve(l(t,e))}catch(e){a.resolve(l(t))}})))).catch((e=>{a.reject(e)}))};if(this.privIgnoreCache&&(this.privHeaders["Cache-Control"]="no-cache"),e===ld.File&&o){const e="multipart/form-data";this.privHeaders["content-type"]=e,this.privHeaders["Content-Type"]=e,"undefined"!=typeof Blob&&o instanceof Blob?(e=>{const t=new FileReader;return t.readAsArrayBuffer(e),new Promise((e=>{t.onloadend=()=>{e(t.result)}}))})(o).then((e=>{c(e)})).catch((e=>{a.reject(e)})):c(o)}else e===ld.Post&&i&&(this.privHeaders["content-type"]="application/json",this.privHeaders["Content-Type"]="application/json"),c(i);return a.promise}withQuery(e,t={}){const n=this.queryParams(t);return n?e+(-1===e.indexOf("?")?"?":"&")+n:e}queryParams(e={}){return Object.keys(e).map((t=>encodeURIComponent(t)+"="+encodeURIComponent(e[t]))).join("&")}}class fd{static get requestOptions(){return fd.privDefaultRequestOptions}static get configParams(){return fd.privDefaultParams}static get restErrors(){return fd.privRestErrors}}fd.privDefaultRequestOptions={headers:{Accept:"application/json"},ignoreCache:!1,timeout:1e4},fd.privRestErrors={authInvalidSubscriptionKey:"You must specify either an authentication token to use, or a Cognitive Speech subscription key.",authInvalidSubscriptionRegion:"You must specify the Cognitive Speech region to use.",invalidArgs:"Required input not found: {arg}.",invalidCreateJoinConversationResponse:"Creating/Joining conversation failed with HTTP {status}.",invalidParticipantRequest:"The requested participant was not found.",permissionDeniedConnect:"Required credentials not found.",permissionDeniedConversation:"Invalid operation: only the host can {command} the conversation.",permissionDeniedParticipant:"Invalid operation: only the host can {command} a participant.",permissionDeniedSend:"Invalid operation: the conversation is not in a connected state.",permissionDeniedStart:"Invalid operation: there is already an active conversation."},fd.privDefaultParams={apiVersion:"api-version",authorization:"Authorization",clientAppId:"X-ClientAppId",contentTypeKey:"Content-Type",correlationId:"X-CorrelationId",languageCode:"language",nickname:"nickname",profanity:"profanity",requestId:"X-RequestId",roomId:"roomid",sessionToken:"token",subscriptionKey:"Ocp-Apim-Subscription-Key",subscriptionRegion:"Ocp-Apim-Subscription-Region",token:"X-CapitoToken"};class hd{}var pd={};e(pd,"AudioInputStream",(()=>vd),(e=>vd=e)),e(pd,"PullAudioInputStreamImpl",(()=>xd),(e=>xd=e));var md=a("bqBrJ").Buffer,gd=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class vd{constructor(){}static createPushStream(e){return yd.create(e)}static createPullStream(e,t){return wd.create(e,t)}}class yd extends vd{static create(e){return new bd(e)}}class bd extends yd{constructor(e){super(),this.onEvent=e=>{this.privEvents.onEvent(e),gs.instance.onEvent(e)},this.privFormat=void 0===e?Mc.getDefaultInputFormat():e,this.privEvents=new ms,this.privId=La(),this.privStream=new Rs(this.privFormat.avgBytesPerSec/10)}get format(){return Promise.resolve(this.privFormat)}write(e){this.privStream.writeStreamChunk({buffer:e,isEnd:!1,timeReceived:Date.now()})}close(){this.privStream.close()}id(){return this.privId}get blob(){return this.attach("id").then((e=>{const t=[];let n=md.from("");const r=()=>e.read().then((e=>!e||e.isEnd?"undefined"!=typeof XMLHttpRequest&&"undefined"!=typeof Blob?Promise.resolve(new Blob(t)):Promise.resolve(md.from(n)):("undefined"!=typeof Blob?t.push(e.buffer):n=md.concat([n,this.toBuffer(e.buffer)]),r())));return r()}))}turnOn(){this.onEvent(new qa(this.privId)),this.onEvent(new Ka(this.privId))}attach(e){return gd(this,void 0,void 0,(function*(){this.onEvent(new Xa(this.privId,e)),yield this.turnOn();const t=this.privStream;return this.onEvent(new Za(this.privId,e)),{detach:()=>gd(this,void 0,void 0,(function*(){return this.onEvent(new $a(this.privId,e)),this.turnOff()})),id:()=>e,read:()=>t.read()}}))}detach(e){this.onEvent(new $a(this.privId,e))}turnOff(){}get events(){return this.privEvents}get deviceInfo(){return Promise.resolve({bitspersample:this.privFormat.bitsPerSample,channelcount:this.privFormat.channels,connectivity:vl.Unknown,manufacturer:"Speech SDK",model:"PushStream",samplerate:this.privFormat.samplesPerSec,type:bl.Stream})}toBuffer(e){const t=md.alloc(e.byteLength),n=new Uint8Array(e);for(let e=0;e<t.length;++e)t[e]=n[e];return t}}class wd extends vd{constructor(){super()}static create(e,t){return new xd(e,t)}}class xd extends wd{constructor(e,t){super(),this.onEvent=e=>{this.privEvents.onEvent(e),gs.instance.onEvent(e)},this.privFormat=void 0===t?Sc.getDefaultInputFormat():t,this.privEvents=new ms,this.privId=La(),this.privCallback=e,this.privIsClosed=!1,this.privBufferSize=this.privFormat.avgBytesPerSec/10}get format(){return Promise.resolve(this.privFormat)}close(){this.privIsClosed=!0,this.privCallback.close()}id(){return this.privId}get blob(){return Promise.reject("Not implemented")}turnOn(){this.onEvent(new qa(this.privId)),this.onEvent(new Ka(this.privId))}attach(e){return gd(this,void 0,void 0,(function*(){return this.onEvent(new Xa(this.privId,e)),yield this.turnOn(),this.onEvent(new Za(this.privId,e)),{detach:()=>(this.privCallback.close(),this.onEvent(new $a(this.privId,e)),this.turnOff()),id:()=>e,read:()=>{let e,t=0;for(;t<this.privBufferSize;){const n=new ArrayBuffer(this.privBufferSize-t),r=this.privCallback.read(n);if(void 0===e)e=n;else{new Int8Array(e).set(new Int8Array(n),t)}if(0===r)break;t+=r}return Promise.resolve({buffer:e.slice(0,t),isEnd:this.privIsClosed||0===t,timeReceived:Date.now()})}}}))}detach(e){this.onEvent(new $a(this.privId,e))}turnOff(){}get events(){return this.privEvents}get deviceInfo(){return Promise.resolve({bitspersample:this.privFormat.bitsPerSample,channelcount:this.privFormat.channels,connectivity:vl.Unknown,manufacturer:"Speech SDK",model:"PullStream",samplerate:this.privFormat.samplesPerSec,type:bl.Stream})}}var Sd={};e(Sd,"SpeakerAudioDestination",(()=>Ad),(e=>Ad=e));var Md=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const _d={[hc.PCM]:"audio/wav",[hc.MuLaw]:"audio/x-wav",[hc.MP3]:"audio/mpeg",[hc.OGG_OPUS]:"audio/ogg",[hc.WEBM_OPUS]:"audio/webm; codecs=opus",[hc.ALaw]:"audio/x-wav",[hc.FLAC]:"audio/flac"};class Ad{constructor(e){this.privPlaybackStarted=!1,this.privAppendingToBuffer=!1,this.privMediaSourceOpened=!1,this.privBytesReceived=0,this.privId=e||La(),this.privIsPaused=!1,this.privIsClosed=!1}id(){return this.privId}write(e,t,n){void 0!==this.privAudioBuffer?(this.privAudioBuffer.push(e),this.updateSourceBuffer().then((()=>{t&&t()}),(e=>{n&&n(e)}))):void 0!==this.privAudioOutputStream&&(this.privAudioOutputStream.write(e),this.privBytesReceived+=e.byteLength)}close(e,t){if(this.privIsClosed=!0,void 0!==this.privSourceBuffer)this.handleSourceBufferUpdateEnd().then((()=>{e&&e()}),(e=>{t&&t(e)}));else if(void 0!==this.privAudioOutputStream)if(this.privFormat.formatTag!==hc.PCM&&this.privFormat.formatTag!==hc.MuLaw&&this.privFormat.formatTag!==hc.ALaw||!1!==this.privFormat.hasHeader){let n=new ArrayBuffer(this.privBytesReceived);this.privAudioOutputStream.read(n).then((r=>{n=Hc.SynthesisAdapterBase.addHeader(n,this.privFormat);const i=new Blob([n],{type:_d[this.privFormat.formatTag]});this.privAudio.src=window.URL.createObjectURL(i),this.notifyPlayback().then((()=>{e&&e()}),(e=>{t&&t(e)}))}),(e=>{t&&t(e)}))}else console.warn("Play back is not supported for raw PCM, mulaw or alaw format without header."),this.onAudioEnd&&this.onAudioEnd(this);else this.onAudioEnd&&this.onAudioEnd(this)}set format(e){if("undefined"!=typeof AudioContext||void 0!==window.webkitAudioContext){this.privFormat=e;const t=_d[this.privFormat.formatTag];void 0===t?console.warn(`Unknown mimeType for format ${hc[this.privFormat.formatTag]}; playback is not supported.`):"undefined"!=typeof MediaSource&&MediaSource.isTypeSupported(t)?(this.privAudio=new Audio,this.privAudioBuffer=[],this.privMediaSource=new MediaSource,this.privAudio.src=URL.createObjectURL(this.privMediaSource),this.privAudio.load(),this.privMediaSource.onsourceopen=e=>{this.privMediaSourceOpened=!0,this.privMediaSource.duration=1800,this.privSourceBuffer=this.privMediaSource.addSourceBuffer(t),this.privSourceBuffer.onupdate=e=>{this.updateSourceBuffer().catch((e=>{gs.instance.onEvent(new Qs(e))}))},this.privSourceBuffer.onupdateend=e=>{this.handleSourceBufferUpdateEnd().catch((e=>{gs.instance.onEvent(new Qs(e))}))},this.privSourceBuffer.onupdatestart=e=>{this.privAppendingToBuffer=!1}},this.updateSourceBuffer().catch((e=>{gs.instance.onEvent(new Qs(e))}))):(console.warn(`Format ${hc[this.privFormat.formatTag]} could not be played by MSE, streaming playback is not enabled.`),this.privAudioOutputStream=new(0,kc.PullAudioOutputStreamImpl),this.privAudioOutputStream.format=this.privFormat,this.privAudio=new Audio)}}get volume(){return this.privAudio.volume}set volume(e){this.privAudio.volume=e}mute(){this.privAudio.muted=!0}unmute(){this.privAudio.muted=!1}get isClosed(){return this.privIsClosed}get currentTime(){return void 0!==this.privAudio?this.privAudio.currentTime:-1}pause(){this.privIsPaused||void 0===this.privAudio||(this.privAudio.pause(),this.privIsPaused=!0)}resume(e,t){this.privIsPaused&&void 0!==this.privAudio&&(this.privAudio.play().then((()=>{e&&e()}),(e=>{t&&t(e)})),this.privIsPaused=!1)}get internalAudio(){return this.privAudio}updateSourceBuffer(){return Md(this,void 0,void 0,(function*(){if(void 0!==this.privAudioBuffer&&this.privAudioBuffer.length>0&&this.sourceBufferAvailable()){this.privAppendingToBuffer=!0;const e=this.privAudioBuffer.shift();try{this.privSourceBuffer.appendBuffer(e)}catch(t){return this.privAudioBuffer.unshift(e),void console.log("buffer filled, pausing addition of binaries until space is made")}yield this.notifyPlayback()}else this.canEndStream()&&(yield this.handleSourceBufferUpdateEnd())}))}handleSourceBufferUpdateEnd(){return Md(this,void 0,void 0,(function*(){this.canEndStream()&&this.sourceBufferAvailable()&&(this.privMediaSource.endOfStream(),yield this.notifyPlayback())}))}notifyPlayback(){return Md(this,void 0,void 0,(function*(){this.privPlaybackStarted||void 0===this.privAudio||(this.privPlaybackStarted=!0,this.onAudioStart&&this.onAudioStart(this),this.privAudio.onended=()=>{this.onAudioEnd&&this.onAudioEnd(this)},this.privIsPaused||(yield this.privAudio.play()))}))}canEndStream(){return this.isClosed&&void 0!==this.privSourceBuffer&&0===this.privAudioBuffer.length&&this.privMediaSourceOpened&&!this.privAppendingToBuffer&&"open"===this.privMediaSource.readyState}sourceBufferAvailable(){return void 0!==this.privSourceBuffer&&!this.privSourceBuffer.updating}}class Ed{}Su=a("1DJXa");class Cd{constructor(e){this.id=()=>this.privId,Hl.throwIfNullOrUndefined(Su.openSync,"\nFile System access not available, please use Push or PullAudioOutputStream"),this.privFd=Su.openSync(e,"w")}set format(e){Hl.throwIfNotUndefined(this.privAudioFormat,"format is already set"),this.privAudioFormat=e;let t=0;this.privAudioFormat.hasHeader&&(t=this.privAudioFormat.header.byteLength),void 0!==this.privFd&&(this.privWriteStream=Su.createWriteStream("",{fd:this.privFd,start:t,autoClose:!1}))}write(e){Hl.throwIfNullOrUndefined(this.privAudioFormat,"must set format before writing."),void 0!==this.privWriteStream&&this.privWriteStream.write(new Uint8Array(e.slice(0)))}close(){void 0!==this.privFd&&(this.privWriteStream.on("finish",(()=>{this.privAudioFormat.hasHeader&&(this.privAudioFormat.updateHeader(this.privWriteStream.bytesWritten),Su.writeSync(this.privFd,new Int8Array(this.privAudioFormat.header),0,this.privAudioFormat.header.byteLength,0)),Su.closeSync(this.privFd),this.privFd=void 0})),this.privWriteStream.end())}}class kd{static fromDefaultMicrophoneInput(){const e=new bu(!0);return new Td(new(0,Xs.MicAudioSource)(e))}static fromMicrophoneInput(e){const t=new bu(!0);return new Td(new(0,Xs.MicAudioSource)(t,e))}static fromWavFileInput(e,t="unnamedBuffer.wav"){return new Td(new(0,gu.FileAudioSource)(e,t))}static fromStreamInput(e){if(e instanceof hd)return new Td(new(0,pd.PullAudioInputStreamImpl)(e));if(e instanceof pd.AudioInputStream)return new Td(e);if("undefined"!=typeof MediaStream&&e instanceof MediaStream){const t=new bu(!1);return new Td(new(0,Xs.MicAudioSource)(t,null,null,e))}throw new Error("Not Supported Type")}static fromDefaultSpeakerOutput(){return new Id(new(0,Sd.SpeakerAudioDestination))}static fromSpeakerOutput(e){if(void 0===e)return kd.fromDefaultSpeakerOutput();if(e instanceof Sd.SpeakerAudioDestination)return new Id(e);throw new Error("Not Supported Type")}static fromAudioFileOutput(e){return new Id(new Cd(e))}static fromStreamOutput(e){if(e instanceof Ed)return new Id(new(0,kc.PushAudioOutputStreamImpl)(e));if(e instanceof kc.PushAudioOutputStream)return new Id(e);if(e instanceof kc.PullAudioOutputStream)return new Id(e);throw new Error("Not Supported Type")}}class Td extends kd{constructor(e){super(),this.privSource=e}get format(){return this.privSource.format}close(e,t){this.privSource.turnOff().then((()=>{e&&e()}),(e=>{t&&t(e)}))}id(){return this.privSource.id()}get blob(){return this.privSource.blob}turnOn(){return this.privSource.turnOn()}attach(e){return this.privSource.attach(e)}detach(e){return this.privSource.detach(e)}turnOff(){return this.privSource.turnOff()}get events(){return this.privSource.events}setProperty(e,t){if(Hl.throwIfNull(t,"value"),void 0===this.privSource.setProperty)throw new Error("This AudioConfig instance does not support setting properties.");this.privSource.setProperty(e,t)}getProperty(e,t){if(void 0!==this.privSource.getProperty)return this.privSource.getProperty(e,t);throw new Error("This AudioConfig instance does not support getting properties.")}get deviceInfo(){return this.privSource.deviceInfo}}class Id extends kd{constructor(e){super(),this.privDestination=e}set format(e){this.privDestination.format=e}write(e){this.privDestination.write(e)}close(){this.privDestination.close()}id(){return this.privDestination.id()}setProperty(e,t){throw new Error("This AudioConfig instance does not support setting properties.")}getProperty(e,t){throw new Error("This AudioConfig instance does not support getting properties.")}}var Od={};e(Od,"SpeechRecognizer",(()=>Dd),(e=>Dd=e));var Rd={};e(Rd,"Recognizer",(()=>Nd),(e=>Nd=e));var Pd=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class Nd{constructor(e,t,n){this.audioConfig=void 0!==e?e:kd.fromDefaultMicrophoneInput(),this.privDisposed=!1,this.privProperties=t.clone(),this.privConnectionFactory=n,this.implCommonRecognizerSetup()}close(e,t){Hl.throwIfDisposed(this.privDisposed),ys(this.dispose(!0),e,t)}get internalData(){return this.privReco}dispose(e){return Pd(this,void 0,void 0,(function*(){this.privDisposed||(this.privDisposed=!0,e&&this.privReco&&(yield this.privReco.audioSource.turnOff(),yield this.privReco.dispose()))}))}static get telemetryEnabled(){return cl.ServiceRecognizerBase.telemetryDataEnabled}static enableTelemetry(e){cl.ServiceRecognizerBase.telemetryDataEnabled=e}implCommonRecognizerSetup(){let e="undefined"!=typeof window?"Browser":"Node",t="unknown",n="unknown";"undefined"!=typeof navigator&&(e=e+"/"+navigator.platform,t=navigator.userAgent,n=navigator.appVersion);const r=this.createRecognizerConfig(new _l(new Al(new Cl(e,t,n))));this.privReco=this.createServiceRecognizer(Nd.getAuthFromProperties(this.privProperties),this.privConnectionFactory,this.audioConfig,r)}recognizeOnceAsyncImpl(e){return Pd(this,void 0,void 0,(function*(){Hl.throwIfDisposed(this.privDisposed);const t=new vs;yield this.implRecognizerStop(),yield this.privReco.recognize(e,t.resolve,t.reject);const n=yield t.promise;return yield this.implRecognizerStop(),n}))}startContinuousRecognitionAsyncImpl(e){return Pd(this,void 0,void 0,(function*(){Hl.throwIfDisposed(this.privDisposed),yield this.implRecognizerStop(),yield this.privReco.recognize(e,void 0,void 0)}))}stopContinuousRecognitionAsyncImpl(){return Pd(this,void 0,void 0,(function*(){Hl.throwIfDisposed(this.privDisposed),yield this.implRecognizerStop()}))}implRecognizerStop(){return Pd(this,void 0,void 0,(function*(){this.privReco&&(yield this.privReco.stopRecognizing())}))}static getAuthFromProperties(e){const t=e.getProperty(sl.SpeechServiceConnection_Key,void 0);return t&&""!==t?new el(t):new nl((t=>{const n=e.getProperty(sl.SpeechServiceAuthorization_Token,void 0);return Promise.resolve(n)}),(t=>{const n=e.getProperty(sl.SpeechServiceAuthorization_Token,void 0);return Promise.resolve(n)}))}}var Ld=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class Dd extends Rd.Recognizer{constructor(e,t){const n=e;Hl.throwIfNull(n,"speechConfig"),Hl.throwIfNullOrWhitespace(n.properties.getProperty(sl.SpeechServiceConnection_RecoLanguage),sl[sl.SpeechServiceConnection_RecoLanguage]),super(t,n.properties,new Fl),this.privDisposedRecognizer=!1}static FromConfig(e,t,n){const r=e;t.properties.mergeTo(r.properties);return new Dd(e,n)}get endpointId(){return Hl.throwIfDisposed(this.privDisposedRecognizer),this.properties.getProperty(sl.SpeechServiceConnection_EndpointId,"00000000-0000-0000-0000-000000000000")}get authorizationToken(){return this.properties.getProperty(sl.SpeechServiceAuthorization_Token)}set authorizationToken(e){Hl.throwIfNullOrWhitespace(e,"token"),this.properties.setProperty(sl.SpeechServiceAuthorization_Token,e)}get speechRecognitionLanguage(){return Hl.throwIfDisposed(this.privDisposedRecognizer),this.properties.getProperty(sl.SpeechServiceConnection_RecoLanguage)}get outputFormat(){return Hl.throwIfDisposed(this.privDisposedRecognizer),this.properties.getProperty(uu,Tl[Tl.Simple])===Tl[Tl.Simple]?Tl.Simple:Tl.Detailed}get properties(){return this.privProperties}recognizeOnceAsync(e,t){ys(this.recognizeOnceAsyncImpl(hl.Interactive),e,t)}startContinuousRecognitionAsync(e,t){ys(this.startContinuousRecognitionAsyncImpl(hl.Conversation),e,t)}stopContinuousRecognitionAsync(e,t){ys(this.stopContinuousRecognitionAsyncImpl(),e,t)}startKeywordRecognitionAsync(e,t,n){Hl.throwIfNull(e,"model"),n&&n("Not yet implemented.")}stopKeywordRecognitionAsync(e,t){e&&e()}close(e,t){Hl.throwIfDisposed(this.privDisposedRecognizer),ys(this.dispose(!0),e,t)}dispose(e){const t=Object.create(null,{dispose:{get:()=>super.dispose}});return Ld(this,void 0,void 0,(function*(){this.privDisposedRecognizer||(e&&(this.privDisposedRecognizer=!0,yield this.implRecognizerStop()),yield t.dispose.call(this,e))}))}createRecognizerConfig(e){return new Ml(e,this.properties)}createServiceRecognizer(e,t,n,r){return new(0,Yl.SpeechServiceRecognizer)(e,t,n,r,this)}}var Bd,jd,Fd,Ud,zd={};e(zd,"SpeechSynthesizer",(()=>Gd),(e=>Gd=e)),(jd=Bd||(Bd={}))[jd.Unknown=0]="Unknown",jd[jd.Female=1]="Female",jd[jd.Male=2]="Male",(Ud=Fd||(Fd={}))[Ud.OnlineNeural=1]="OnlineNeural",Ud[Ud.OnlineStandard=2]="OnlineStandard",Ud[Ud.OfflineNeural=3]="OfflineNeural",Ud[Ud.OfflineStandard=4]="OfflineStandard";class Hd{constructor(e){if(this.privStyleList=[],this.privVoicePath="",e&&(this.privName=e.Name,this.privLocale=e.Locale,this.privShortName=e.ShortName,this.privLocalName=e.LocalName,this.privVoiceType=e.VoiceType.endsWith("Standard")?Fd.OnlineStandard:Fd.OnlineNeural,this.privGender="Male"===e.Gender?Bd.Male:"Female"===e.Gender?Bd.Female:Bd.Unknown,e.StyleList&&Array.isArray(e.StyleList)))for(const t of e.StyleList)this.privStyleList.push(t)}get name(){return this.privName}get locale(){return this.privLocale}get shortName(){return this.privShortName}get localName(){return this.privLocalName}get gender(){return this.privGender}get voiceType(){return this.privVoiceType}get styleList(){return this.privStyleList}get voicePath(){return this.privVoicePath}}class Vd extends Wc{constructor(e,t){if(Array.isArray(t)){super(e,Ol.VoicesListRetrieved,void 0,new Vl),this.privVoices=[];for(const e of t)this.privVoices.push(new Hd(e))}else super(e,Ol.Canceled,t.errorDetails?t.errorDetails:"Error information unavailable",new Vl)}get voices(){return this.privVoices}}var Wd=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class Gd{constructor(e,t){const n=e;Hl.throwIfNull(n,"speechConfig"),null!==t&&(this.audioConfig=void 0===t?"undefined"==typeof window?void 0:kd.fromDefaultSpeakerOutput():t),this.privProperties=n.properties.clone(),this.privDisposed=!1,this.privSynthesizing=!1,this.privConnectionFactory=new Ul,this.synthesisRequestQueue=new(0,bs.Queue),this.implCommonSynthesizeSetup()}get authorizationToken(){return this.properties.getProperty(sl.SpeechServiceAuthorization_Token)}set authorizationToken(e){Hl.throwIfNullOrWhitespace(e,"token"),this.properties.setProperty(sl.SpeechServiceAuthorization_Token,e)}get properties(){return this.privProperties}get autoDetectSourceLanguage(){return"OpenRange"===this.properties.getProperty(sl.SpeechServiceConnection_AutoDetectSourceLanguages)}static FromConfig(e,t,n){const r=e;return t.properties.mergeTo(r.properties),new Gd(e,n)}buildSsml(e){const t={"af-ZA":"af-ZA-AdriNeural","am-ET":"am-ET-AmehaNeural","ar-AE":"ar-AE-FatimaNeural","ar-BH":"ar-BH-AliNeural","ar-DZ":"ar-DZ-AminaNeural","ar-EG":"ar-EG-SalmaNeural","ar-IQ":"ar-IQ-BasselNeural","ar-JO":"ar-JO-SanaNeural","ar-KW":"ar-KW-FahedNeural","ar-LY":"ar-LY-ImanNeural","ar-MA":"ar-MA-JamalNeural","ar-QA":"ar-QA-AmalNeural","ar-SA":"ar-SA-HamedNeural","ar-SY":"ar-SY-AmanyNeural","ar-TN":"ar-TN-HediNeural","ar-YE":"ar-YE-MaryamNeural","bg-BG":"bg-BG-BorislavNeural","bn-BD":"bn-BD-NabanitaNeural","ca-ES":"ca-ES-JoanaNeural","cs-CZ":"cs-CZ-AntoninNeural","cy-GB":"cy-GB-AledNeural","da-DK":"da-DK-ChristelNeural","de-AT":"de-AT-IngridNeural","de-CH":"de-CH-JanNeural","de-DE":"de-DE-KatjaNeural","el-GR":"el-GR-AthinaNeural","en-AU":"en-AU-NatashaNeural","en-CA":"en-CA-ClaraNeural","en-GB":"en-GB-LibbyNeural","en-HK":"en-HK-SamNeural","en-IE":"en-IE-ConnorNeural","en-IN":"en-IN-NeerjaNeural","en-KE":"en-KE-AsiliaNeural","en-NG":"en-NG-AbeoNeural","en-NZ":"en-NZ-MitchellNeural","en-PH":"en-PH-JamesNeural","en-SG":"en-SG-LunaNeural","en-TZ":"en-TZ-ElimuNeural","en-US":"en-US-JennyNeural","en-ZA":"en-ZA-LeahNeural","es-AR":"es-AR-ElenaNeural","es-BO":"es-BO-MarceloNeural","es-CL":"es-CL-CatalinaNeural","es-CO":"es-CO-GonzaloNeural","es-CR":"es-CR-JuanNeural","es-CU":"es-CU-BelkysNeural","es-DO":"es-DO-EmilioNeural","es-EC":"es-EC-AndreaNeural","es-ES":"es-ES-AlvaroNeural","es-GQ":"es-GQ-JavierNeural","es-GT":"es-GT-AndresNeural","es-HN":"es-HN-CarlosNeural","es-MX":"es-MX-DaliaNeural","es-NI":"es-NI-FedericoNeural","es-PA":"es-PA-MargaritaNeural","es-PE":"es-PE-AlexNeural","es-PR":"es-PR-KarinaNeural","es-PY":"es-PY-MarioNeural","es-SV":"es-SV-LorenaNeural","es-US":"es-US-AlonsoNeural","es-UY":"es-UY-MateoNeural","es-VE":"es-VE-PaolaNeural","et-EE":"et-EE-AnuNeural","fa-IR":"fa-IR-DilaraNeural","fi-FI":"fi-FI-SelmaNeural","fil-PH":"fil-PH-AngeloNeural","fr-BE":"fr-BE-CharlineNeural","fr-CA":"fr-CA-SylvieNeural","fr-CH":"fr-CH-ArianeNeural","fr-FR":"fr-FR-DeniseNeural","ga-IE":"ga-IE-ColmNeural","gl-ES":"gl-ES-RoiNeural","gu-IN":"gu-IN-DhwaniNeural","he-IL":"he-IL-AvriNeural","hi-IN":"hi-IN-MadhurNeural","hr-HR":"hr-HR-GabrijelaNeural","hu-HU":"hu-HU-NoemiNeural","id-ID":"id-ID-ArdiNeural","it-IT":"it-IT-IsabellaNeural","ja-JP":"ja-JP-NanamiNeural","jv-ID":"jv-ID-DimasNeural","km-KH":"km-KH-PisethNeural","ko-KR":"ko-KR-SunHiNeural","lt-LT":"lt-LT-LeonasNeural","lv-LV":"lv-LV-EveritaNeural","mr-IN":"mr-IN-AarohiNeural","ms-MY":"ms-MY-OsmanNeural","mt-MT":"mt-MT-GraceNeural","my-MM":"my-MM-NilarNeural","nb-NO":"nb-NO-PernilleNeural","nl-BE":"nl-BE-ArnaudNeural","nl-NL":"nl-NL-ColetteNeural","pl-PL":"pl-PL-AgnieszkaNeural","pt-BR":"pt-BR-FranciscaNeural","pt-PT":"pt-PT-DuarteNeural","ro-RO":"ro-RO-AlinaNeural","ru-RU":"ru-RU-SvetlanaNeural","sk-SK":"sk-SK-LukasNeural","sl-SI":"sl-SI-PetraNeural","so-SO":"so-SO-MuuseNeural","su-ID":"su-ID-JajangNeural","sv-SE":"sv-SE-SofieNeural","sw-KE":"sw-KE-RafikiNeural","sw-TZ":"sw-TZ-DaudiNeural","ta-IN":"ta-IN-PallaviNeural","ta-LK":"ta-LK-KumarNeural","ta-SG":"ta-SG-AnbuNeural","te-IN":"te-IN-MohanNeural","th-TH":"th-TH-PremwadeeNeural","tr-TR":"tr-TR-AhmetNeural","uk-UA":"uk-UA-OstapNeural","ur-IN":"ur-IN-GulNeural","ur-PK":"ur-PK-AsadNeural","uz-UZ":"uz-UZ-MadinaNeural","vi-VN":"vi-VN-HoaiMyNeural","zh-CN":"zh-CN-XiaoxiaoNeural","zh-HK":"zh-HK-HiuMaanNeural","zh-TW":"zh-TW-HsiaoChenNeural","zu-ZA":"zu-ZA-ThandoNeural"};let n=this.properties.getProperty(sl.SpeechServiceConnection_SynthLanguage,"en-US"),r=this.properties.getProperty(sl.SpeechServiceConnection_SynthVoice,""),i=Gd.XMLEncode(e);return this.autoDetectSourceLanguage?n="en-US":r=r||t[n],r&&(i=`<voice name='${r}'>${i}</voice>`),i=`<speak version='1.0' xmlns='http://www.w3.org/2001/10/synthesis' xmlns:mstts='http://www.w3.org/2001/mstts' xmlns:emo='http://www.w3.org/2009/10/emotionml' xml:lang='${n}'>${i}</speak>`,i}speakTextAsync(e,t,n,r){this.speakImpl(e,!1,t,n,r)}speakSsmlAsync(e,t,n,r){this.speakImpl(e,!0,t,n,r)}getVoicesAsync(e=""){return Wd(this,void 0,void 0,(function*(){return this.getVoices(e)}))}close(e,t){Hl.throwIfDisposed(this.privDisposed),ys(this.dispose(!0),e,t)}get internalData(){return this.privAdapter}dispose(e){return Wd(this,void 0,void 0,(function*(){this.privDisposed||(e&&this.privAdapter&&(yield this.privAdapter.dispose()),this.privDisposed=!0)}))}createSynthesizerConfig(e){return new lu(e,this.privProperties)}createSynthesisAdapter(e,t,n,r){return new(0,Hc.SynthesisAdapterBase)(e,t,r,this,this.audioConfig)}implCommonSynthesizeSetup(){let e="undefined"!=typeof window?"Browser":"Node",t="unknown",n="unknown";"undefined"!=typeof navigator&&(e=e+"/"+navigator.platform,t=navigator.userAgent,n=navigator.appVersion);const r=this.createSynthesizerConfig(new _l(new Al(new Cl(e,t,n)))),i=this.privProperties.getProperty(sl.SpeechServiceConnection_Key,void 0),o=i&&""!==i?new el(i):new nl((e=>{const t=this.privProperties.getProperty(sl.SpeechServiceAuthorization_Token,void 0);return Promise.resolve(t)}),(e=>{const t=this.privProperties.getProperty(sl.SpeechServiceAuthorization_Token,void 0);return Promise.resolve(t)}));this.privAdapter=this.createSynthesisAdapter(o,this.privConnectionFactory,this.audioConfig,r),this.privAdapter.audioOutputFormat=_c.fromSpeechSynthesisOutputFormat(dc[this.properties.getProperty(sl.SpeechServiceConnection_SynthOutputFormat,void 0)]),this.privRestAdapter=new su(r)}speakImpl(e,t,n,r,i){try{Hl.throwIfDisposed(this.privDisposed);const o=La();let a;a=i instanceof Ed?new(0,kc.PushAudioOutputStreamImpl)(i):i instanceof kc.PullAudioOutputStream?i:void 0!==i?new Cd(i):void 0,this.synthesisRequestQueue.enqueue(new qd(o,e,t,(e=>{if(this.privSynthesizing=!1,n)try{n(e)}catch(e){r&&r(e)}n=void 0,this.adapterSpeak().catch((()=>{}))}),(e=>{r&&r(e)}),a)),this.adapterSpeak().catch((()=>{}))}catch(e){if(r)if(e instanceof Error){const t=e;r(t.name+": "+t.message)}else r(e);this.dispose(!0).catch((()=>{}))}}getVoices(e){return Wd(this,void 0,void 0,(function*(){const t=La(),n=yield this.privRestAdapter.getVoicesList(t);if(n.ok&&Array.isArray(n.json)){let r=n.json;return e&&e.length>0&&(r=r.filter((t=>!!t.Locale&&t.Locale.toLowerCase()===e.toLowerCase()))),new Vd(t,r)}return new Vd(t,{errorDetails:`Error: ${n.status}: ${n.statusText}`})}))}adapterSpeak(){return Wd(this,void 0,void 0,(function*(){if(!this.privDisposed&&!this.privSynthesizing){this.privSynthesizing=!0;const e=yield this.synthesisRequestQueue.dequeue();return this.privAdapter.Speak(e.text,e.isSSML,e.requestId,e.cb,e.err,e.dataStream)}}))}static XMLEncode(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}}class qd{constructor(e,t,n,r,i,o){this.requestId=e,this.text=t,this.isSSML=n,this.cb=r,this.err=i,this.dataStream=o}}var Kd=a("4IUwl");var Yd={error:console.error,info:console.info,success:console.log};u=a("85Hg2"),Kd=a("4IUwl"),Kd=a("4IUwl");var Jd=({className:e,title:t,loading:n=!0})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:r(Kd)(e,{"memori-loading-icon":n}),"aria-label":t,children:(0,s.jsx)("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"})});var Qd=({primary:e=!1,outlined:t=!1,ghost:n=!1,padded:i=!0,shape:o="rounded",danger:a=!1,loading:l=!1,disabled:c=!1,block:u=!1,icon:d,className:f,title:h,id:p,htmlType:m,onClick:g,onMouseDown:v,onMouseUp:y,onMouseLeave:b,onTouchStart:w,onTouchEnd:x,children:S})=>(0,s.jsxs)("button",{id:p,type:m,onClick:g,onMouseDown:v,onMouseUp:y,onMouseLeave:b,onTouchStart:w,onTouchEnd:x,title:h,disabled:l||c,className:r(Kd)("memori-button",{"memori-button--primary":e,"memori-button--outlined":t,"memori-button--ghost":n,"memori-button--square":"square"===o,"memori-button--rounded":"rounded"===o,"memori-button--circle":"circle"===o,"memori-button--padded":i,"memori-button--block":u,"memori-button--with-icon":(d||l)&&S,"memori-button--icon-only":(d||l)&&!S,"memori-button--danger":a,"memori-button--loading":l},f),children:[d&&!l&&(0,s.jsx)("span",{className:"memori-button--icon",children:d}),l&&(0,s.jsx)("span",{className:"memori-button--icon loading-icon",children:(0,s.jsx)(Jd,{loading:!0})}),S]});u=a("85Hg2"),u=a("85Hg2"),u=a("85Hg2");function Xd(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Xd),r}var Zd,$d,ef=(($d=ef||{})[$d.None=0]="None",$d[$d.RenderStrategy=1]="RenderStrategy",$d[$d.Static=2]="Static",$d),tf=((Zd=tf||{})[Zd.Unmount=0]="Unmount",Zd[Zd.Hidden=1]="Hidden",Zd);function nf({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:a}){let s=of(t,e);if(o)return rf(s,n,r,a);let l=null!=i?i:0;if(2&l){let{static:e=!1,...t}=s;if(e)return rf(t,n,r,a)}if(1&l){let{unmount:e=!0,...t}=s;return Xd(e?0:1,{0:()=>null,1:()=>rf({...t,hidden:!0,style:{display:"none"}},n,r,a)})}return rf(s,n,r,a)}function rf(e,t={},n,r){let{as:i=n,children:o,refName:a="ref",...s}=lf(e,["unmount","static"]),l=void 0!==e.ref?{[a]:e.ref}:{},c="function"==typeof o?o(t):o;s.className&&"function"==typeof s.className&&(s.className=s.className(t));let d={};if(t){let e=!1,n=[];for(let[r,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&n.push(r);e&&(d["data-headlessui-state"]=n.join(" "))}if(i===u.Fragment&&Object.keys(sf(s)).length>0){if(!(0,u.isValidElement)(c)||Array.isArray(c)&&c.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(s).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));return(0,u.cloneElement)(c,Object.assign({},of(c.props,sf(lf(s,["ref"]))),d,l,function(...e){return{ref:e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}}(c.ref,l.ref)))}return(0,u.createElement)(i,Object.assign({},lf(s,["ref"]),i!==u.Fragment&&l,i!==u.Fragment&&d),c)}function of(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map((e=>[e,void 0]))));for(let e in n)Object.assign(t,{[e](t,...r){let i=n[e];for(let e of i){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function af(e){var t;return Object.assign((0,u.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function sf(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function lf(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}let cf=(0,(u=a("85Hg2")).createContext)(null);cf.displayName="OpenClosedContext";var uf=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(uf||{});function df(){return(0,u.useContext)(cf)}function ff({value:e,children:t}){return r(u).createElement(cf.Provider,{value:e},t)}u=a("85Hg2"),u=a("85Hg2");const hf="undefined"==typeof window||"undefined"==typeof document;let pf=hf?u.useEffect:u.useLayoutEffect;function mf(){let e=(0,u.useRef)(!1);return pf((()=>(e.current=!0,()=>{e.current=!1})),[]),e}u=a("85Hg2");function gf(e){let t=(0,u.useRef)(e);return pf((()=>{t.current=e}),[e]),t}u=a("85Hg2");let vf={serverHandoffComplete:!1};function yf(){let[e,t]=(0,u.useState)(vf.serverHandoffComplete);return(0,u.useEffect)((()=>{!0!==e&&t(!0)}),[e]),(0,u.useEffect)((()=>{!1===vf.serverHandoffComplete&&(vf.serverHandoffComplete=!0)}),[]),e}u=a("85Hg2"),u=a("85Hg2");let bf=function(e){let t=gf(e);return r(u).useCallback(((...e)=>t.current(...e)),[t])},wf=Symbol();function xf(e,t=!0){return Object.assign(e,{[wf]:t})}function Sf(...e){let t=(0,u.useRef)(e);(0,u.useEffect)((()=>{t.current=e}),[e]);let n=bf((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[wf])))?void 0:n}function Mf(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function _f(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function Af(){let e=[],t=[],n={enqueue(e){t.push(e)},addEventListener:(e,t,r,i)=>(e.addEventListener(t,r,i),n.add((()=>e.removeEventListener(t,r,i)))),requestAnimationFrame(...e){let t=requestAnimationFrame(...e);return n.add((()=>cancelAnimationFrame(t)))},nextFrame:(...e)=>n.requestAnimationFrame((()=>n.requestAnimationFrame(...e))),setTimeout(...e){let t=setTimeout(...e);return n.add((()=>clearTimeout(t)))},microTask(...e){let t={current:!0};return _f((()=>{t.current&&e[0]()})),n.add((()=>{t.current=!1}))},add:t=>(e.push(t),()=>{let n=e.indexOf(t);if(n>=0){let[t]=e.splice(n,1);t()}}),dispose(){for(let t of e.splice(0))t()},async workQueue(){for(let e of t.splice(0))await e()}};return n}function Ef(e,...t){e&&t.length>0&&e.classList.add(...t)}function Cf(e,...t){e&&t.length>0&&e.classList.remove(...t)}var kf,Tf=((kf=Tf||{}).Ended="ended",kf.Cancelled="cancelled",kf);function If(e,t,n,r){let i=n?"enter":"leave",o=Af(),a=void 0!==r?Mf(r):()=>{};"enter"===i&&(e.removeAttribute("hidden"),e.style.display="");let s=Xd(i,{enter:()=>t.enter,leave:()=>t.leave}),l=Xd(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=Xd(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Cf(e,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Ef(e,...s,...c),o.nextFrame((()=>{Cf(e,...c),Ef(e,...l),function(e,t){let n=Af();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[o,a]=[r,i].map((e=>{let[t=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,t)=>t-e));return t}));if(o+a!==0){let r=[];r.push(n.addEventListener(e,"transitionrun",(i=>{i.target===i.currentTarget&&(r.splice(0).forEach((e=>e())),r.push(n.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(t("ended"),r.splice(0).forEach((e=>e())))})),n.addEventListener(e,"transitioncancel",(e=>{e.target===e.currentTarget&&(t("cancelled"),r.splice(0).forEach((e=>e())))}))))})))}else t("ended");n.add((()=>t("cancelled"))),n.dispose}(e,(n=>("ended"===n&&(Cf(e,...s),Ef(e,...t.entered)),a(n))))})),o.dispose}function Of(){let[e]=(0,u.useState)(Af);return(0,u.useEffect)((()=>()=>e.dispose()),[e]),e}function Rf({container:e,direction:t,classes:n,onStart:r,onStop:i}){let o=mf(),a=Of(),s=gf(t);pf((()=>{let t=Af();a.add(t.dispose);let l=e.current;if(l&&"idle"!==s.current&&o.current)return t.dispose(),r.current(s.current),t.add(If(l,n.current,"enter"===s.current,(e=>{t.dispose(),Xd(e,{[Tf.Ended](){i.current(s.current)},[Tf.Cancelled]:()=>{}})}))),t.dispose}),[t])}function Pf(e=""){return e.split(" ").filter((e=>e.trim().length>1))}let Nf=(0,(u=a("85Hg2")).createContext)(null);Nf.displayName="TransitionContext";var Lf,Df=((Lf=Df||{}).Visible="visible",Lf.Hidden="hidden",Lf);let Bf=(0,u.createContext)(null);function jf(e){return"children"in e?jf(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function Ff(e,t){let n=gf(e),r=(0,u.useRef)([]),i=mf(),o=Of(),a=bf(((e,t=tf.Hidden)=>{let a=r.current.findIndex((({el:t})=>t===e));-1!==a&&(Xd(t,{[tf.Unmount](){r.current.splice(a,1)},[tf.Hidden](){r.current[a].state="hidden"}}),o.microTask((()=>{var e;!jf(r)&&i.current&&(null==(e=n.current)||e.call(n))})))})),s=bf((e=>{let t=r.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>a(e,tf.Unmount)})),l=(0,u.useRef)([]),c=(0,u.useRef)(Promise.resolve()),d=(0,u.useRef)({enter:[],leave:[],idle:[]}),f=bf(((e,n,r)=>{l.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter((([t])=>t!==e))),null==t||t.chains.current[n].push([e,new Promise((e=>{l.current.push(e)}))]),null==t||t.chains.current[n].push([e,new Promise((e=>{Promise.all(d.current[n].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===n?c.current=c.current.then((()=>null==t?void 0:t.wait.current)).then((()=>r(n))):r(n)})),h=bf(((e,t,n)=>{Promise.all(d.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=l.current.shift())||e()})).then((()=>n(t)))}));return(0,u.useMemo)((()=>({children:r,register:s,unregister:a,onStart:f,onStop:h,wait:c,chains:d})),[s,a,r,f,h,d,c])}function Uf(){}Bf.displayName="NestingContext";let zf=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Hf(e){var t;let n={};for(let r of zf)n[r]=null!=(t=e[r])?t:Uf;return n}let Vf=ef.RenderStrategy,Wf=af((function(e,t){let{beforeEnter:n,afterEnter:i,beforeLeave:o,afterLeave:a,enter:s,enterFrom:l,enterTo:c,entered:d,leave:f,leaveFrom:h,leaveTo:p,...m}=e,g=(0,u.useRef)(null),v=Sf(g,t),y=m.unmount?tf.Unmount:tf.Hidden,{show:b,appear:w,initial:x}=function(){let e=(0,u.useContext)(Nf);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[S,M]=(0,u.useState)(b?"visible":"hidden"),_=function(){let e=(0,u.useContext)(Bf);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:A,unregister:E}=_,C=(0,u.useRef)(null);(0,u.useEffect)((()=>A(g)),[A,g]),(0,u.useEffect)((()=>{if(y===tf.Hidden&&g.current)return b&&"visible"!==S?void M("visible"):Xd(S,{hidden:()=>E(g),visible:()=>A(g)})}),[S,g,A,E,b,y]);let k=gf({enter:Pf(s),enterFrom:Pf(l),enterTo:Pf(c),entered:Pf(d),leave:Pf(f),leaveFrom:Pf(h),leaveTo:Pf(p)}),T=function(e){let t=(0,u.useRef)(Hf(e));return(0,u.useEffect)((()=>{t.current=Hf(e)}),[e]),t}({beforeEnter:n,afterEnter:i,beforeLeave:o,afterLeave:a}),I=yf();(0,u.useEffect)((()=>{if(I&&"visible"===S&&null===g.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[g,S,I]);let O=x&&!w,R=!I||O||C.current===b?"idle":b?"enter":"leave",P=bf((e=>Xd(e,{enter:()=>T.current.beforeEnter(),leave:()=>T.current.beforeLeave(),idle:()=>{}}))),N=bf((e=>Xd(e,{enter:()=>T.current.afterEnter(),leave:()=>T.current.afterLeave(),idle:()=>{}}))),L=Ff((()=>{M("hidden"),E(g)}),_);Rf({container:g,classes:k,direction:R,onStart:gf((e=>{L.onStart(g,e,P)})),onStop:gf((e=>{L.onStop(g,e,N),"leave"===e&&!jf(L)&&(M("hidden"),E(g))}))}),(0,u.useEffect)((()=>{!O||(y===tf.Hidden?C.current=null:C.current=b)}),[b,O,S]);let D=m,B={ref:v};return r(u).createElement(Bf.Provider,{value:L},r(u).createElement(ff,{value:Xd(S,{visible:uf.Open,hidden:uf.Closed})},nf({ourProps:B,theirProps:D,defaultTag:"div",features:Vf,visible:"visible"===S,name:"Transition.Child"})))})),Gf=af((function(e,t){let{show:n,appear:i=!1,unmount:o,...a}=e,s=(0,u.useRef)(null),l=Sf(s,t);yf();let c=df();if(void 0===n&&null!==c&&(n=Xd(c,{[uf.Open]:!0,[uf.Closed]:!1})),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,f]=(0,u.useState)(n?"visible":"hidden"),h=Ff((()=>{f("hidden")})),[p,m]=(0,u.useState)(!0),g=(0,u.useRef)([n]);pf((()=>{!1!==p&&g.current[g.current.length-1]!==n&&(g.current.push(n),m(!1))}),[g,n]);let v=(0,u.useMemo)((()=>({show:n,appear:i,initial:p})),[n,i,p]);(0,u.useEffect)((()=>{if(n)f("visible");else if(jf(h)){let e=s.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&f("hidden")}else f("hidden")}),[n,h]);let y={unmount:o};return r(u).createElement(Bf.Provider,{value:h},r(u).createElement(Nf.Provider,{value:v},nf({ourProps:{...y,as:u.Fragment,children:r(u).createElement(Wf,{ref:l,...y,...a})},theirProps:{},defaultTag:u.Fragment,features:Vf,visible:"visible"===d,name:"Transition"})))})),qf=af((function(e,t){let n=null!==(0,u.useContext)(Nf),i=null!==df();return r(u).createElement(r(u).Fragment,null,!n&&i?r(u).createElement(Gf,{ref:t,...e}):r(u).createElement(Wf,{ref:t,...e}))})),Kf=Object.assign(Gf,{Child:qf,Root:Gf});u=a("85Hg2");var Yf,Jf=((Yf=Jf||{}).Space=" ",Yf.Enter="Enter",Yf.Escape="Escape",Yf.Backspace="Backspace",Yf.Delete="Delete",Yf.ArrowLeft="ArrowLeft",Yf.ArrowUp="ArrowUp",Yf.ArrowRight="ArrowRight",Yf.ArrowDown="ArrowDown",Yf.Home="Home",Yf.End="End",Yf.PageUp="PageUp",Yf.PageDown="PageDown",Yf.Tab="Tab",Yf);function Qf(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}var Xf;u=a("85Hg2");let Zf=0;function $f(){return++Zf}let eh=null!=(Xf=r(u).useId)?Xf:function(){let e=yf(),[t,n]=r(u).useState(e?$f:null);return pf((()=>{null===t&&n($f())}),[t]),null!=t?""+t:void 0};u=a("85Hg2");var th=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(th||{});let nh=af((function(e,t){let{features:n=1,...r}=e;return nf({ourProps:{ref:t,"aria-hidden":2==(2&n)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...4==(4&n)&&2!=(2&n)&&{display:"none"}}},theirProps:r,slot:{},defaultTag:"div",name:"Hidden"})}));function rh(e){return hf?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let ih=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var oh,ah=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(ah||{}),sh=((oh=sh||{})[oh.Error=0]="Error",oh[oh.Overflow=1]="Overflow",oh[oh.Success=2]="Success",oh[oh.Underflow=3]="Underflow",oh),lh=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(lh||{});function ch(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(ih))}var uh=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(uh||{});function dh(e,t=0){var n;return e!==(null==(n=rh(e))?void 0:n.body)&&Xd(t,{0:()=>e.matches(ih),1(){let t=e;for(;null!==t;){if(t.matches(ih))return!0;t=t.parentElement}return!1}})}function fh(e){let t=rh(e);Af().nextFrame((()=>{t&&!dh(t.activeElement,0)&&hh(e)}))}function hh(e){null==e||e.focus({preventScroll:!0})}let ph=["textarea","input"].join(",");function mh(e,t=(e=>e)){return e.slice().sort(((e,n)=>{let r=t(e),i=t(n);if(null===r||null===i)return 0;let o=r.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}function gh(e,t){return vh(ch(),t,!0,e)}function vh(e,t,n=!0,r=null){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,o=Array.isArray(e)?n?mh(e):e:ch(e);r=null!=r?r:i.activeElement;let a,s=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,o.indexOf(r))-1;if(4&t)return Math.max(0,o.indexOf(r))+1;if(8&t)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=32&t?{preventScroll:!0}:{},u=0,d=o.length;do{if(u>=d||u+d<=0)return 0;let e=l+u;if(16&t)e=(e+d)%d;else{if(e<0)return 3;if(e>=d)return 1}a=o[e],null==a||a.focus(c),u+=s}while(a!==i.activeElement);return 6&t&&function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,ph))&&n}(a)&&a.select(),a.hasAttribute("tabindex")||a.setAttribute("tabindex","0"),2}u=a("85Hg2"),u=a("85Hg2");function yh(e,t,n){let r=gf(t);(0,u.useEffect)((()=>{function t(e){r.current(e)}return window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)}),[e,n])}var bh=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(bh||{});function wh(){let e=(0,u.useRef)(0);return yh("keydown",(t=>{"Tab"===t.key&&(e.current=t.shiftKey?1:0)}),!0),e}u=a("85Hg2");function xh(...e){return(0,u.useMemo)((()=>rh(...e)),[...e])}u=a("85Hg2");function Sh(e,t,n,r){let i=gf(n);(0,u.useEffect)((()=>{function n(e){i.current(e)}return(e=null!=e?e:window).addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}),[e,t,r])}u=a("85Hg2");function Mh(e,t){let n=(0,u.useRef)([]),r=bf(e);(0,u.useEffect)((()=>{let e=[...n.current];for(let[i,o]of t.entries())if(n.current[i]!==o){let i=r(t,e);return n.current=t,i}}),[r,...t])}var _h=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(_h||{});let Ah=Object.assign(af((function(e,t){let n=(0,u.useRef)(null),i=Sf(n,t),{initialFocus:o,containers:a,features:s=30,...l}=e;yf()||(s=1);let c=xh(n);!function({ownerDocument:e},t){let n=(0,u.useRef)(null);Sh(null==e?void 0:e.defaultView,"focusout",(e=>{!t||n.current||(n.current=e.target)}),!0),Mh((()=>{t||((null==e?void 0:e.activeElement)===(null==e?void 0:e.body)&&hh(n.current),n.current=null)}),[t]);let r=(0,u.useRef)(!1);(0,u.useEffect)((()=>(r.current=!1,()=>{r.current=!0,_f((()=>{!r.current||(hh(n.current),n.current=null)}))})),[])}({ownerDocument:c},Boolean(16&s));let d=function({ownerDocument:e,container:t,initialFocus:n},r){let i=(0,u.useRef)(null),o=mf();return Mh((()=>{if(!r)return;let a=t.current;!a||_f((()=>{if(!o.current)return;let t=null==e?void 0:e.activeElement;if(null!=n&&n.current){if((null==n?void 0:n.current)===t)return void(i.current=t)}else if(a.contains(t))return void(i.current=t);null!=n&&n.current?hh(n.current):vh(a,ah.First)===sh.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),i.current=null==e?void 0:e.activeElement}))}),[r]),i}({ownerDocument:c,container:n,initialFocus:o},Boolean(2&s));!function({ownerDocument:e,container:t,containers:n,previousActiveElement:r},i){let o=mf();Sh(null==e?void 0:e.defaultView,"focus",(e=>{if(!i||!o.current)return;let a=new Set(null==n?void 0:n.current);a.add(t);let s=r.current;if(!s)return;let l=e.target;l&&l instanceof HTMLElement?function(e,t){var n;for(let r of e)if(null!=(n=r.current)&&n.contains(t))return!0;return!1}(a,l)?(r.current=l,hh(l)):(e.preventDefault(),e.stopPropagation(),hh(s)):hh(r.current)}),!0)}({ownerDocument:c,container:n,containers:a,previousActiveElement:d},Boolean(8&s));let f=wh(),h=bf((()=>{let e=n.current;!e||Xd(f.current,{[bh.Forwards]:()=>vh(e,ah.First),[bh.Backwards]:()=>vh(e,ah.Last)})})),p={ref:i};return r(u).createElement(r(u).Fragment,null,Boolean(4&s)&&r(u).createElement(nh,{as:"button",type:"button",onFocus:h,features:th.Focusable}),nf({ourProps:p,theirProps:l,defaultTag:"div",name:"FocusTrap"}),Boolean(4&s)&&r(u).createElement(nh,{as:"button",type:"button",onFocus:h,features:th.Focusable}))})),{features:_h});let Eh=new Set,Ch=new Map;function kh(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function Th(e){let t=Ch.get(e);!t||(null===t["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}function Ih(e,t=!0){pf((()=>{if(!t||!e.current)return;let n=e.current,r=rh(n);if(r){Eh.add(n);for(let e of Ch.keys())e.contains(n)&&(Th(e),Ch.delete(e));return r.querySelectorAll("body > *").forEach((e=>{if(e instanceof HTMLElement){for(let t of Eh)if(e.contains(t))return;1===Eh.size&&(Ch.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),kh(e))}})),()=>{if(Eh.delete(n),Eh.size>0)r.querySelectorAll("body > *").forEach((e=>{if(e instanceof HTMLElement&&!Ch.has(e)){for(let t of Eh)if(e.contains(t))return;Ch.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),kh(e)}}));else for(let e of Ch.keys())Th(e),Ch.delete(e)}}}),[t])}u=a("85Hg2"),c=a("2BCLI");let Oh=(0,(u=a("85Hg2")).createContext)(!1);function Rh(e){return r(u).createElement(Oh.Provider,{value:e.force},e.children)}function Ph(e){let t=(0,u.useContext)(Oh),n=(0,u.useContext)(Bh),r=xh(e),[i,o]=(0,u.useState)((()=>{if(!t&&null!==n||hf)return null;let e=null==r?void 0:r.getElementById("headlessui-portal-root");if(e)return e;if(null===r)return null;let i=r.createElement("div");return i.setAttribute("id","headlessui-portal-root"),r.body.appendChild(i)}));return(0,u.useEffect)((()=>{null!==i&&(null!=r&&r.body.contains(i)||null==r||r.body.appendChild(i))}),[i,r]),(0,u.useEffect)((()=>{t||null!==n&&o(n.current)}),[n,o,t]),i}let Nh=u.Fragment,Lh=af((function(e,t){let n=e,r=(0,u.useRef)(null),i=Sf(xf((e=>{r.current=e})),t),o=xh(r),a=Ph(r),[s]=(0,u.useState)((()=>{var e;return hf?null:null!=(e=null==o?void 0:o.createElement("div"))?e:null})),l=yf(),d=(0,u.useRef)(!1);return pf((()=>{if(d.current=!1,a&&s)return a.contains(s)||(s.setAttribute("data-headlessui-portal",""),a.appendChild(s)),()=>{d.current=!0,_f((()=>{var e;!d.current||!a||!s||(a.removeChild(s),a.childNodes.length<=0&&(null==(e=a.parentElement)||e.removeChild(a)))}))}}),[a,s]),l&&a&&s?(0,c.createPortal)(nf({ourProps:{ref:i},theirProps:n,defaultTag:Nh,name:"Portal"}),s):null})),Dh=u.Fragment,Bh=(0,u.createContext)(null),jh=af((function(e,t){let{target:n,...i}=e,o={ref:Sf(t)};return r(u).createElement(Bh.Provider,{value:n},nf({ourProps:o,theirProps:i,defaultTag:Dh,name:"Popover.Group"}))})),Fh=Object.assign(Lh,{Group:jh});let Uh=(0,(u=a("85Hg2")).createContext)(null);function zh(){let e=(0,u.useContext)(Uh);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,zh),e}return e}function Hh(){let[e,t]=(0,u.useState)([]);return[e.length>0?e.join(" "):void 0,(0,u.useMemo)((()=>function(e){let n=bf((e=>(t((t=>[...t,e])),()=>t((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),i=(0,u.useMemo)((()=>({register:n,slot:e.slot,name:e.name,props:e.props})),[n,e.slot,e.name,e.props]);return r(u).createElement(Uh.Provider,{value:i},e.children)}),[t])]}let Vh=af((function(e,t){let n=zh(),r=`headlessui-description-${eh()}`,i=Sf(t);pf((()=>n.register(r)),[r,n.register]);let o=e;return nf({ourProps:{ref:i,...n.props,id:r},theirProps:o,slot:n.slot||{},defaultTag:"p",name:n.name||"Description"})}));let Wh=(0,(u=a("85Hg2")).createContext)((()=>{}));Wh.displayName="StackContext";var Gh=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Gh||{});function qh({children:e,onUpdate:t,type:n,element:i,enabled:o}){let a=(0,u.useContext)(Wh),s=bf(((...e)=>{null==t||t(...e),a(...e)}));return pf((()=>{let e=void 0===o||!0===o;return e&&s(0,n,i),()=>{e&&s(1,n,i)}}),[s,n,i,o]),r(u).createElement(Wh.Provider,{value:s},e)}u=a("85Hg2"),u=a("85Hg2");function Kh(e,t,n){let r=gf(t);(0,u.useEffect)((()=>{function t(e){r.current(e)}return document.addEventListener(e,t,n),()=>document.removeEventListener(e,t,n)}),[e,n])}function Yh(e,t,n=!0){let r=(0,u.useRef)(!1);function i(n,i){if(!r.current||n.defaultPrevented)return;let o=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e),a=i(n);if(null!==a&&a.getRootNode().contains(a)){for(let e of o){if(null===e)continue;let t=e instanceof HTMLElement?e:e.current;if(null!=t&&t.contains(a))return}return!dh(a,uh.Loose)&&-1!==a.tabIndex&&n.preventDefault(),t(n,a)}}(0,u.useEffect)((()=>{requestAnimationFrame((()=>{r.current=n}))}),[n]);let o=(0,u.useRef)(null);Kh("mousedown",(e=>{var t,n;r.current&&(o.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)}),!0),Kh("click",(e=>{!o.current||(i(e,(()=>o.current)),o.current=null)}),!0),Kh("blur",(e=>i(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}var Jh=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Jh||{}),Qh=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Qh||{});let Xh={0:(e,t)=>e.titleId===t.id?e:{...e,titleId:t.id}},Zh=(0,u.createContext)(null);function $h(e){let t=(0,u.useContext)(Zh);if(null===t){let t=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,$h),t}return t}function ep(e,t){(0,u.useEffect)((()=>{var n;if(!t||!e)return;let r=Af();function i(e,t,n){let i=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),r.add((()=>{Object.assign(e.style,{[t]:i})}))}let o=e.documentElement,a=(null!=(n=e.defaultView)?n:window).innerWidth-o.clientWidth;if(i(o,"overflow","hidden"),a>0){i(o,"paddingRight",`${a-(o.clientWidth-o.offsetWidth)}px`)}if(/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0){let e=window.pageYOffset;i(o,"position","fixed"),i(o,"marginTop",`-${e}px`),i(o,"width","100%"),r.add((()=>window.scrollTo(0,e)))}return r.dispose}),[e,t])}function tp(e,t){return Xd(t.type,Xh,e,t)}Zh.displayName="DialogContext";let np=ef.RenderStrategy|ef.Static,rp=af((function(e,t){let{open:n,onClose:i,initialFocus:o,__demoMode:a=!1,...s}=e,[l,c]=(0,u.useState)(0),d=df();void 0===n&&null!==d&&(n=Xd(d,{[uf.Open]:!0,[uf.Closed]:!1}));let f=(0,u.useRef)(new Set),h=(0,u.useRef)(null),p=Sf(h,t),m=(0,u.useRef)(null),g=xh(h),v=e.hasOwnProperty("open")||null!==d,y=e.hasOwnProperty("onClose");if(!v&&!y)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!v)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!y)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof n)throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${n}`);if("function"!=typeof i)throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${i}`);let b=n?0:1,[w,x]=(0,u.useReducer)(tp,{titleId:null,descriptionId:null,panelRef:(0,u.createRef)()}),S=bf((()=>i(!1))),M=bf((e=>x({type:0,id:e}))),_=!!yf()&&(!a&&0===b),A=l>1,E=null!==(0,u.useContext)(Zh),C=A?"parent":"leaf";Ih(h,!!A&&_),Yh((()=>{var e,t;return[...Array.from(null!=(e=null==g?void 0:g.querySelectorAll("body > *, [data-headlessui-portal]"))?e:[]).filter((e=>!(!(e instanceof HTMLElement)||e.contains(m.current)||w.panelRef.current&&e.contains(w.panelRef.current)))),null!=(t=w.panelRef.current)?t:h.current]}),S,_&&!A),Sh(null==g?void 0:g.defaultView,"keydown",(e=>{e.defaultPrevented||e.key===Jf.Escape&&0===b&&(A||(e.preventDefault(),e.stopPropagation(),S()))})),ep(g,0===b&&!E),(0,u.useEffect)((()=>{if(0!==b||!h.current)return;let e=new IntersectionObserver((e=>{for(let t of e)0===t.boundingClientRect.x&&0===t.boundingClientRect.y&&0===t.boundingClientRect.width&&0===t.boundingClientRect.height&&S()}));return e.observe(h.current),()=>e.disconnect()}),[b,h,S]);let[k,T]=Hh(),I=`headlessui-dialog-${eh()}`,O=(0,u.useMemo)((()=>[{dialogState:b,close:S,setTitleId:M},w]),[b,w,S,M]),R=(0,u.useMemo)((()=>({open:0===b})),[b]),P={ref:p,id:I,role:"dialog","aria-modal":0===b||void 0,"aria-labelledby":w.titleId,"aria-describedby":k};return r(u).createElement(qh,{type:"Dialog",enabled:0===b,element:h,onUpdate:bf(((e,t,n)=>{"Dialog"===t&&Xd(e,{[Gh.Add](){f.current.add(n),c((e=>e+1))},[Gh.Remove](){f.current.add(n),c((e=>e-1))}})}))},r(u).createElement(Rh,{force:!0},r(u).createElement(Fh,null,r(u).createElement(Zh.Provider,{value:O},r(u).createElement(Fh.Group,{target:h},r(u).createElement(Rh,{force:!1},r(u).createElement(T,{slot:R,name:"Dialog.Description"},r(u).createElement(Ah,{initialFocus:o,containers:f,features:_?Xd(C,{parent:Ah.features.RestoreFocus,leaf:Ah.features.All&~Ah.features.FocusLock}):Ah.features.None},nf({ourProps:P,theirProps:s,slot:R,defaultTag:"div",features:np,visible:0===b,name:"Dialog"})))))))),r(u).createElement(nh,{features:th.Hidden,ref:m}))})),ip=af((function(e,t){let[{dialogState:n,close:r}]=$h("Dialog.Overlay");return nf({ourProps:{ref:Sf(t),id:`headlessui-dialog-overlay-${eh()}`,"aria-hidden":!0,onClick:bf((e=>{if(e.target===e.currentTarget){if(Qf(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),r()}}))},theirProps:e,slot:(0,u.useMemo)((()=>({open:0===n})),[n]),defaultTag:"div",name:"Dialog.Overlay"})})),op=af((function(e,t){let[{dialogState:n},i]=$h("Dialog.Backdrop"),o=Sf(t),a=`headlessui-dialog-backdrop-${eh()}`;(0,u.useEffect)((()=>{if(null===i.panelRef.current)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")}),[i.panelRef]);let s=(0,u.useMemo)((()=>({open:0===n})),[n]);return r(u).createElement(Rh,{force:!0},r(u).createElement(Fh,null,nf({ourProps:{ref:o,id:a,"aria-hidden":!0},theirProps:e,slot:s,defaultTag:"div",name:"Dialog.Backdrop"})))})),ap=af((function(e,t){let[{dialogState:n},r]=$h("Dialog.Panel"),i=Sf(t,r.panelRef),o=`headlessui-dialog-panel-${eh()}`,a=(0,u.useMemo)((()=>({open:0===n})),[n]);return nf({ourProps:{ref:i,id:o,onClick:bf((e=>{e.stopPropagation()}))},theirProps:e,slot:a,defaultTag:"div",name:"Dialog.Panel"})})),sp=af((function(e,t){let[{dialogState:n,setTitleId:r}]=$h("Dialog.Title"),i=`headlessui-dialog-title-${eh()}`,o=Sf(t);(0,u.useEffect)((()=>(r(i),()=>r(null))),[i,r]);let a=(0,u.useMemo)((()=>({open:0===n})),[n]);return nf({ourProps:{ref:o,id:i},theirProps:e,slot:a,defaultTag:"h2",name:"Dialog.Title"})})),lp=Object.assign(rp,{Backdrop:op,Panel:ap,Overlay:ip,Title:sp,Description:Vh});Kd=a("4IUwl");var cp=({spinning:e=!1,primary:t=!1,className:n,children:i})=>(0,s.jsxs)("div",{className:r(Kd)("memori-spin",n,{"memori-spin--spinning":e,"memori-spin--primary":t}),children:[i,(0,s.jsx)("div",{className:"memori-spin--spinner",children:(0,s.jsx)(Jd,{loading:!0})})]});var up=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"})});Kd=a("4IUwl");var dp=({open:e=!1,onClose:t,className:n,title:i,description:o,children:a,footer:l,loading:c=!1,closable:d=!0,width:f="100%",widthMd:h="100%"})=>{const{t:p}=Ce();return(0,s.jsx)(Kf,{appear:!0,show:e,as:r(u).Fragment,children:(0,s.jsxs)(lp,{open:e,onClose:t,className:r(Kd)("memori-modal",n),children:[(0,s.jsx)(Kf.Child,{as:r(u).Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)("div",{className:"memori-modal--backdrop"})}),(0,s.jsx)("div",{className:"memori-modal--container",children:(0,s.jsx)("div",{className:"memori-modal--container-scrollable",children:(0,s.jsx)(Kf.Child,{as:r(u).Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:(0,s.jsxs)(lp.Panel,{className:"memori-modal--panel",children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n .memori-modal--panel {\n --memori-modal--width: ${f};\n --memori-modal--width-md: ${h};\n }\n `}}),d&&(0,s.jsx)("div",{className:"memori-modal--close",children:(0,s.jsx)(Qd,{ghost:!0,padded:!0,shape:"circle",icon:(0,s.jsx)(up,{}),title:p("close")||"Close",onClick:()=>t(!1)})}),(0,s.jsxs)(cp,{spinning:c,children:[i&&(0,s.jsx)(lp.Title,{className:"memori-modal--title",children:i}),o&&(0,s.jsx)(lp.Description,{className:"memori-modal--description",children:o}),a,l&&(0,s.jsx)("div",{className:"memori-modal--footer",children:l})]})]})})})})]})})},fp=(u=a("85Hg2"),e=>"checkbox"===e.type),hp=e=>e instanceof Date,pp=e=>null==e;const mp=e=>"object"==typeof e;var gp=e=>!pp(e)&&!Array.isArray(e)&&mp(e)&&!hp(e),vp=e=>gp(e)&&e.target?fp(e.target)?e.target.checked:e.target.value:e,yp=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),bp=e=>Array.isArray(e)?e.filter(Boolean):[],wp=e=>void 0===e,xp=(e,t,n)=>{if(!t||!gp(e))return n;const r=bp(t.split(/[,[\].]+?/)).reduce(((e,t)=>pp(e)?e:e[t]),e);return wp(r)||r===e?wp(e[t])?n:e[t]:r};const Sp="blur",Mp="focusout",_p="onBlur",Ap="onChange",Ep="onSubmit",Cp="onTouched",kp="all",Tp="max",Ip="min",Op="maxLength",Rp="minLength",Pp="pattern",Np="required",Lp="validate";r(u).createContext(null);var Dp=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const i=o;return t._proxyFormState[i]!==kp&&(t._proxyFormState[i]=!r||kp),n&&(n[i]=!0),e[i]}});return i},Bp=e=>gp(e)&&!Object.keys(e).length,jp=(e,t,n)=>{const{name:r,...i}=e;return Bp(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find((e=>t[e]===(!n||kp)))},Fp=e=>Array.isArray(e)?e:[e];function Up(e){const t=r(u).useRef(e);t.current=e,r(u).useEffect((()=>{const n=!e.disabled&&t.current.subject.subscribe({next:t.current.callback});return()=>{n&&n.unsubscribe()}}),[e.disabled])}var zp=e=>"string"==typeof e,Hp=(e,t,n,r)=>zp(e)?(r&&t.watch.add(e),xp(n,e)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),xp(n,e)))):(t.watchAll=!!r,n),Vp="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function Wp(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(Vp&&(e instanceof Blob||e instanceof FileList)||!n&&!gp(e))return e;if(t=n?[]:{},Array.isArray(e)||(e=>{const t=e.constructor&&e.constructor.prototype;return gp(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const n in e)t[n]=Wp(e[n]);else t=e}return t}var Gp=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},qp=e=>/^\w*$/.test(e),Kp=e=>bp(e.replace(/["|']|\]/g,"").split(/\.|\[/));function Yp(e,t,n){let r=-1;const i=qp(t)?[t]:Kp(t),o=i.length,a=o-1;for(;++r<o;){const t=i[r];let o=n;if(r!==a){const n=e[t];o=gp(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}e[t]=o,e=e[t]}return e}const Jp=(e,t,n)=>{for(const r of n||Object.keys(e)){const n=xp(e,r);if(n){const{_f:e,...r}=n;if(e&&t(e.name)){if(e.ref.focus){e.ref.focus();break}if(e.refs&&e.refs[0].focus){e.refs[0].focus();break}}else gp(r)&&Jp(r,t)}}};var Qp=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))))),Xp=(e,t,n)=>{const r=bp(xp(e,n));return Yp(r,"root",t[n]),Yp(e,n,r),e},Zp=e=>"boolean"==typeof e,$p=e=>"file"===e.type,em=e=>"function"==typeof e,tm=e=>zp(e)||r(u).isValidElement(e),nm=e=>"radio"===e.type,rm=e=>e instanceof RegExp;const im={value:!1,isValid:!1},om={value:!0,isValid:!0};var am=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!wp(e[0].attributes.value)?wp(e[0].value)||""===e[0].value?om:{value:e[0].value,isValid:!0}:om:im}return im};const sm={isValid:!1,value:null};var lm=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),sm):sm;function cm(e,t,n="validate"){if(tm(e)||Array.isArray(e)&&e.every(tm)||Zp(e)&&!e)return{type:n,message:tm(e)?e:"",ref:t}}var um=e=>gp(e)&&!rm(e)?e:{value:e,message:""},dm=async(e,t,n,r,i)=>{const{ref:o,refs:a,required:s,maxLength:l,minLength:c,min:u,max:d,pattern:f,validate:h,name:p,valueAsNumber:m,mount:g,disabled:v}=e._f;if(!g||v)return{};const y=a?a[0]:o,b=e=>{r&&y.reportValidity&&(y.setCustomValidity(Zp(e)?"":e||""),y.reportValidity())},w={},x=nm(o),S=fp(o),M=x||S,_=(m||$p(o))&&!o.value||""===t||Array.isArray(t)&&!t.length,A=Gp.bind(null,p,n,w),E=(e,t,n,r=Op,i=Rp)=>{const a=e?t:n;w[p]={type:e?r:i,message:a,ref:o,...A(e?r:i,a)}};if(i?!Array.isArray(t)||!t.length:s&&(!M&&(_||pp(t))||Zp(t)&&!t||S&&!am(a).isValid||x&&!lm(a).isValid)){const{value:e,message:t}=tm(s)?{value:!!s,message:s}:um(s);if(e&&(w[p]={type:Np,message:t,ref:y,...A(Np,t)},!n))return b(t),w}if(!(_||pp(u)&&pp(d))){let e,r;const i=um(d),a=um(u);if(pp(t)||isNaN(t)){const n=o.valueAsDate||new Date(t),s=e=>new Date((new Date).toDateString()+" "+e),l="time"==o.type,c="week"==o.type;zp(i.value)&&t&&(e=l?s(t)>s(i.value):c?t>i.value:n>new Date(i.value)),zp(a.value)&&t&&(r=l?s(t)<s(a.value):c?t<a.value:n<new Date(a.value))}else{const n=o.valueAsNumber||(t?+t:t);pp(i.value)||(e=n>i.value),pp(a.value)||(r=n<a.value)}if((e||r)&&(E(!!e,i.message,a.message,Tp,Ip),!n))return b(w[p].message),w}if((l||c)&&!_&&(zp(t)||i&&Array.isArray(t))){const e=um(l),r=um(c),i=!pp(e.value)&&t.length>e.value,o=!pp(r.value)&&t.length<r.value;if((i||o)&&(E(i,e.message,r.message),!n))return b(w[p].message),w}if(f&&!_&&zp(t)){const{value:e,message:r}=um(f);if(rm(e)&&!t.match(e)&&(w[p]={type:Pp,message:r,ref:o,...A(Pp,r)},!n))return b(r),w}if(h)if(em(h)){const e=cm(await h(t),y);if(e&&(w[p]={...e,...A(Lp,e.message)},!n))return b(e.message),w}else if(gp(h)){let e={};for(const r in h){if(!Bp(e)&&!n)break;const i=cm(await h[r](t),y,r);i&&(e={...i,...A(r,i.message)},b(i.message),n&&(w[p]=e))}if(!Bp(e)&&(w[p]={ref:y,...e},!n))return w}return b(!0),w};var fm=e=>({isOnSubmit:!e||e===Ep,isOnBlur:e===_p,isOnChange:e===Ap,isOnAll:e===kp,isOnTouch:e===Cp});function hm(e){for(const t in e)if(!wp(e[t]))return!1;return!0}function pm(e,t){const n=qp(t)?[t]:Kp(t),r=1==n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=wp(e)?r++:e[t[r++]];return e}(e,n),i=n[n.length-1];let o;r&&delete r[i];for(let t=0;t<n.slice(0,-1).length;t++){let r,i=-1;const a=n.slice(0,-(t+1)),s=a.length-1;for(t>0&&(o=e);++i<a.length;){const t=a[i];r=r?r[t]:e[t],s===i&&(gp(r)&&Bp(r)||Array.isArray(r)&&hm(r))&&(o?delete o[t]:delete e[t]),o=r}}return e}function mm(){let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}}var gm=e=>pp(e)||!mp(e);function vm(e,t){if(gm(e)||gm(t))return e===t;if(hp(e)&&hp(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const n=e[i];if(!r.includes(i))return!1;if("ref"!==i){const e=t[i];if(hp(n)&&hp(e)||gp(n)&&gp(e)||Array.isArray(n)&&Array.isArray(e)?!vm(n,e):n!==e)return!1}}return!0}var ym=e=>{const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},bm=e=>"select-multiple"===e.type,wm=e=>ym(e)&&e.isConnected,xm=e=>{for(const t in e)if(em(e[t]))return!0;return!1};function Sm(e,t={}){const n=Array.isArray(e);if(gp(e)||n)for(const n in e)Array.isArray(e[n])||gp(e[n])&&!xm(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Sm(e[n],t[n])):pp(e[n])||(t[n]=!0);return t}function Mm(e,t,n){const r=Array.isArray(e);if(gp(e)||r)for(const r in e)Array.isArray(e[r])||gp(e[r])&&!xm(e[r])?wp(t)||gm(n[r])?n[r]=Array.isArray(e[r])?Sm(e[r],[]):{...Sm(e[r])}:Mm(e[r],pp(t)?{}:t[r],n[r]):vm(e[r],t[r])?delete n[r]:n[r]=!0;return n}var _m=(e,t)=>Mm(e,t,Sm(t)),Am=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>wp(e)?e:t?""===e?NaN:e?+e:e:n&&zp(e)?new Date(e):r?r(e):e;function Em(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return $p(t)?t.files:nm(t)?lm(e.refs).value:bm(t)?[...t.selectedOptions].map((({value:e})=>e)):fp(t)?am(e.refs).value:Am(wp(t.value)?e.ref.value:t.value,e)}var Cm=e=>wp(e)?e:rm(e)?e.source:gp(e)?rm(e.value)?e.value.source:e.value:e;function km(e,t,n){const r=xp(e,n);if(r||qp(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),o=xp(t,r),a=xp(e,r);if(o&&!Array.isArray(o)&&n!==r)return{name:n};if(a&&a.type)return{name:r,error:a};i.pop()}return{name:n}}const Tm={mode:Ep,reValidateMode:Ap,shouldFocusError:!0};function Im(e={}){let t,n={...Tm,...e},r={submitCount:0,isDirty:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},i={},o=Wp(n.defaultValues)||{},a=n.shouldUnregister?{}:Wp(o),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c=0,u={};const d={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={watch:mm(),array:mm(),state:mm()},h=fm(n.mode),p=fm(n.reValidateMode),m=n.criteriaMode===kp,g=async()=>{let e=!1;return d.isValid&&(e=n.resolver?Bp((await w()).errors):await x(i,!0),e!==r.isValid&&(r.isValid=e,f.state.next({isValid:e}))),e},v=(e,t,n,r)=>{const l=xp(i,e);if(l){const i=xp(a,e,wp(n)?xp(o,e):n);wp(i)||r&&r.defaultChecked||t?Yp(a,e,t?i:Em(l._f)):_(e,i),s.mount&&g()}},y=(e,t,n,i,a)=>{let s=!1,l=!1;const c={name:e};if(d.isDirty&&(l=r.isDirty,r.isDirty=c.isDirty=S(),s=l!==c.isDirty),d.dirtyFields&&(!n||i)){l=xp(r.dirtyFields,e);const n=vm(xp(o,e),t);n?pm(r.dirtyFields,e):Yp(r.dirtyFields,e,!0),c.dirtyFields=r.dirtyFields,s=s||l!==!n}if(n){const t=xp(r.touchedFields,e);t||(Yp(r.touchedFields,e,n),c.touchedFields=r.touchedFields,s=s||d.touchedFields&&t!==n)}return s&&a&&f.state.next(c),s?c:{}},b=(n,i,o,a)=>{const s=xp(r.errors,n),l=d.isValid&&Zp(i)&&r.isValid!==i;var h;if(e.delayError&&o?(h=()=>((e,t)=>{Yp(r.errors,e,t),f.state.next({errors:r.errors})})(n,o),t=e=>{clearTimeout(c),c=window.setTimeout(h,e)},t(e.delayError)):(clearTimeout(c),t=null,o?Yp(r.errors,n,o):pm(r.errors,n)),(o?!vm(s,o):s)||!Bp(a)||l){const e={...a,...l&&Zp(i)?{isValid:i}:{},errors:r.errors,name:n};r={...r,...e},f.state.next(e)}u[n]--,d.isValidating&&!Object.values(u).some((e=>e))&&(f.state.next({isValidating:!1}),u={})},w=async e=>n.resolver?await n.resolver({...a},n.context,((e,t,n,r)=>{const i={};for(const n of e){const e=xp(t,n);e&&Yp(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}})(e||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation)):{},x=async(e,t,i={valid:!0})=>{for(const o in e){const s=e[o];if(s){const{_f:e,...o}=s;if(e){const o=l.array.has(e.name),c=await dm(s,xp(a,e.name),m,n.shouldUseNativeValidation,o);if(c[e.name]&&(i.valid=!1,t))break;!t&&(xp(c,e.name)?o?Xp(r.errors,c,e.name):Yp(r.errors,e.name,c[e.name]):pm(r.errors,e.name))}o&&await x(o,t,i)}}return i.valid},S=(e,t)=>(e&&t&&Yp(a,e,t),!vm(T(),o)),M=(e,t,n)=>Hp(e,l,{...s.mount?a:wp(t)?o:zp(e)?{[e]:t}:t},n),_=(e,t,n={})=>{const r=xp(i,e);let o=t;if(r){const n=r._f;n&&(!n.disabled&&Yp(a,e,Am(t,n)),o=Vp&&ym(n.ref)&&pp(t)?"":t,bm(n.ref)?[...n.ref.options].forEach((e=>e.selected=o.includes(e.value))):n.refs?fp(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find((t=>t===e.value)):o===e.value))):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach((e=>e.checked=e.value===o)):$p(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||f.watch.next({name:e})))}(n.shouldDirty||n.shouldTouch)&&y(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&k(e)},A=(e,t,n)=>{for(const r in t){const o=t[r],a=`${e}.${r}`,s=xp(i,a);!l.array.has(e)&&gm(o)&&(!s||s._f)||hp(o)?_(a,o,n):A(a,o,n)}},E=(e,t,n={})=>{const s=xp(i,e),c=l.array.has(e),u=Wp(t);Yp(a,e,u),c?(f.array.next({name:e,values:a}),(d.isDirty||d.dirtyFields)&&n.shouldDirty&&(r.dirtyFields=_m(o,a),f.state.next({name:e,dirtyFields:r.dirtyFields,isDirty:S(e,u)}))):!s||s._f||pp(u)?_(e,u,n):A(e,u,n),Qp(e,l)&&f.state.next({}),f.watch.next({name:e})},C=async e=>{const o=e.target;let s=o.name;const c=xp(i,s);if(c){let x,S;const M=o.type?Em(c._f):vp(e),_=e.type===Sp||e.type===Mp,A=!((v=c._f).mount&&(v.required||v.min||v.max||v.maxLength||v.minLength||v.pattern||v.validate)||n.resolver||xp(r.errors,s)||c._f.deps)||((e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e))(_,xp(r.touchedFields,s),r.isSubmitted,p,h),E=Qp(s,l,_);Yp(a,s,M),_?(c._f.onBlur&&c._f.onBlur(e),t&&t(0)):c._f.onChange&&c._f.onChange(e);const C=y(s,M,_,!1),T=!Bp(C)||E;if(!_&&f.watch.next({name:s,type:e.type}),A)return d.isValid&&g(),T&&f.state.next({name:s,...E?{}:C});if(!_&&E&&f.state.next({}),u[s]=u[s]?u[s]+1:1,f.state.next({isValidating:!0}),n.resolver){const{errors:e}=await w([s]),t=km(r.errors,i,s),n=km(e,i,t.name||s);x=n.error,s=n.name,S=Bp(e)}else x=(await dm(c,xp(a,s),m,n.shouldUseNativeValidation))[s],g();c._f.deps&&k(c._f.deps),b(s,S,x,C)}var v},k=async(e,t={})=>{let o,a;const s=Fp(e);if(f.state.next({isValidating:!0}),n.resolver){const t=await(async e=>{const{errors:t}=await w();if(e)for(const n of e){const e=xp(t,n);e?Yp(r.errors,n,e):pm(r.errors,n)}else r.errors=t;return t})(wp(e)?e:s);o=Bp(t),a=e?!s.some((e=>xp(t,e))):o}else e?(a=(await Promise.all(s.map((async e=>{const t=xp(i,e);return await x(t&&t._f?{[e]:t}:t)})))).every(Boolean),(a||r.isValid)&&g()):a=o=await x(i);return f.state.next({...!zp(e)||d.isValid&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors,isValidating:!1}),t.shouldFocus&&!a&&Jp(i,(e=>e&&xp(r.errors,e)),e?s:l.mount),a},T=e=>{const t={...o,...s.mount?a:{}};return wp(e)?t:zp(e)?xp(t,e):e.map((e=>xp(t,e)))},I=(e,t)=>({invalid:!!xp((t||r).errors,e),isDirty:!!xp((t||r).dirtyFields,e),isTouched:!!xp((t||r).touchedFields,e),error:xp((t||r).errors,e)}),O=(e,t={})=>{for(const s of e?Fp(e):l.mount)l.mount.delete(s),l.array.delete(s),xp(i,s)&&(t.keepValue||(pm(i,s),pm(a,s)),!t.keepError&&pm(r.errors,s),!t.keepDirty&&pm(r.dirtyFields,s),!t.keepTouched&&pm(r.touchedFields,s),!n.shouldUnregister&&!t.keepDefaultValue&&pm(o,s));f.watch.next({}),f.state.next({...r,...t.keepDirty?{isDirty:S()}:{}}),!t.keepIsValid&&g()},R=(e,t={})=>{let r=xp(i,e);const c=Zp(t.disabled);return Yp(i,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),r?c&&Yp(a,e,t.disabled?void 0:xp(a,e,Em(r._f))):v(e,!0,t.value),{...c?{disabled:t.disabled}:{},...n.shouldUseNativeValidation?{required:!!t.required,min:Cm(t.min),max:Cm(t.max),minLength:Cm(t.minLength),maxLength:Cm(t.maxLength),pattern:Cm(t.pattern)}:{},name:e,onChange:C,onBlur:C,ref:a=>{if(a){R(e,t),r=xp(i,e);const n=wp(a.value)&&a.querySelectorAll&&a.querySelectorAll("input,select,textarea")[0]||a,s=(e=>nm(e)||fp(e))(n),l=r._f.refs||[];if(s?l.find((e=>e===n)):n===r._f.ref)return;Yp(i,e,{_f:{...r._f,...s?{refs:[...l.filter(wm),n,...Array.isArray(xp(o,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),v(e,!1,void 0,n)}else r=xp(i,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!yp(l.array,e)||!s.action)&&l.unMount.add(e)}}},P=()=>n.shouldFocusError&&Jp(i,(e=>e&&xp(r.errors,e)),l.mount);return{control:{register:R,unregister:O,getFieldState:I,_executeSchema:w,_focusError:P,_getWatch:M,_getDirty:S,_updateValid:g,_removeUnmounted:()=>{for(const e of l.unMount){const t=xp(i,e);t&&(t._f.refs?t._f.refs.every((e=>!wm(e))):!wm(t._f.ref))&&O(e)}l.unMount=new Set},_updateFieldArray:(e,t=[],n,l,c=!0,u=!0)=>{if(l&&n){if(s.action=!0,u&&Array.isArray(xp(i,e))){const t=n(xp(i,e),l.argA,l.argB);c&&Yp(i,e,t)}if(u&&Array.isArray(xp(r.errors,e))){const t=n(xp(r.errors,e),l.argA,l.argB);c&&Yp(r.errors,e,t),((e,t)=>{!bp(xp(e,t)).length&&pm(e,t)})(r.errors,e)}if(d.touchedFields&&u&&Array.isArray(xp(r.touchedFields,e))){const t=n(xp(r.touchedFields,e),l.argA,l.argB);c&&Yp(r.touchedFields,e,t)}d.dirtyFields&&(r.dirtyFields=_m(o,a)),f.state.next({isDirty:S(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Yp(a,e,t)},_getFieldArray:t=>bp(xp(s.mount?a:o,t,e.shouldUnregister?xp(o,t,[]):[])),_subjects:f,_proxyFormState:d,get _fields(){return i},get _formValues(){return a},get _stateFlags(){return s},set _stateFlags(e){s=e},get _defaultValues(){return o},get _names(){return l},set _names(e){l=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:k,register:R,handleSubmit:(e,t)=>async o=>{o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let s=!0,l=Wp(a);f.state.next({isSubmitting:!0});try{if(n.resolver){const{errors:e,values:t}=await w();r.errors=e,l=t}else await x(i);Bp(r.errors)?(f.state.next({errors:{},isSubmitting:!0}),await e(l,o)):(t&&await t({...r.errors},o),P())}catch(e){throw s=!1,e}finally{r.isSubmitted=!0,f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Bp(r.errors)&&s,submitCount:r.submitCount+1,errors:r.errors})}},watch:(e,t)=>em(e)?f.watch.subscribe({next:n=>e(M(void 0,t),n)}):M(e,t,!0),setValue:E,getValues:T,reset:(t,n)=>((t,n={})=>{const c=t||o,u=Wp(c),h=t&&!Bp(t)?u:o;if(n.keepDefaultValues||(o=c),!n.keepValues){if(n.keepDirtyValues)for(const e of l.mount)xp(r.dirtyFields,e)?Yp(h,e,xp(a,e)):E(e,xp(h,e));else{if(Vp&&wp(t))for(const e of l.mount){const t=xp(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(ym(e)){const t=e.closest("form");if(t){t.reset();break}}}}i={}}a=e.shouldUnregister?n.keepDefaultValues?Wp(o):{}:u,f.array.next({values:h}),f.watch.next({values:h})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!d.isValid||!!n.keepIsValid,s.watch=!!e.shouldUnregister,f.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:n.keepDirty||n.keepDirtyValues?r.isDirty:!(!n.keepDefaultValues||vm(t,o)),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:n.keepDirty||n.keepDirtyValues?r.dirtyFields:n.keepDefaultValues&&t?_m(o,t):{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})})(em(t)?t(a):t,n),resetField:(e,t={})=>{xp(i,e)&&(wp(t.defaultValue)?E(e,xp(o,e)):(E(e,t.defaultValue),Yp(o,e,t.defaultValue)),t.keepTouched||pm(r.touchedFields,e),t.keepDirty||(pm(r.dirtyFields,e),r.isDirty=t.defaultValue?S(e,xp(o,e)):S()),t.keepError||(pm(r.errors,e),d.isValid&&g()),f.state.next({...r}))},clearErrors:e=>{e?Fp(e).forEach((e=>pm(r.errors,e))):r.errors={},f.state.next({errors:r.errors})},unregister:O,setError:(e,t,n)=>{const o=(xp(i,e,{_f:{}})._f||{}).ref;Yp(r.errors,e,{...t,ref:o}),f.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},setFocus:(e,t={})=>{const n=xp(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:I}}function Om(e={}){const t=r(u).useRef(),[n,i]=r(u).useState({isDirty:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:e.defaultValues});t.current||(t.current={...Im(e),formState:n});const o=t.current.control;return o._options=e,Up({subject:o._subjects.state,callback:r(u).useCallback((e=>{jp(e,o._proxyFormState,!0)&&(o._formState={...o._formState,...e},i({...o._formState}))}),[o])}),r(u).useEffect((()=>{o._stateFlags.mount||(o._proxyFormState.isValid&&o._updateValid(),o._stateFlags.mount=!0),o._stateFlags.watch&&(o._stateFlags.watch=!1,o._subjects.state.next({})),o._removeUnmounted()})),r(u).useEffect((()=>{n.submitCount&&o._focusError()}),[o,n.submitCount]),t.current.formState=Dp(n,o),t.current}var Rm=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:[(0,s.jsx)("path",{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}),(0,s.jsx)("path",{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"})]});var Pm=({pwdOrTokens:e,setPwdOrTokens:t,onFinish:n,minimumNumberOfRecoveryTokens:r=1,showTokens:i=!0,openModal:o=!1,withModal:a=!1})=>{var l;const{t:c}=Ce(),{register:d,handleSubmit:f,formState:{errors:h},setError:p}=Om(),[m,g]=(0,u.useState)(1),[v,y]=(0,u.useState)(!!e),b=(0,s.jsxs)("form",{name:"memoriAuth",onSubmit:f((t=>{var i,o,a;"password"===e&&!(null===(i=t.password)||void 0===i?void 0:i.length)||"tokens"===e&&(((null===(o=null==t?void 0:t.tokens)||void 0===o?void 0:o.length)||0)<r||!(null===(a=null==t?void 0:t.tokens)||void 0===a?void 0:a.every((e=>e.length))))?p("tokens",{type:"minLength",message:"Tokens"}):n&&n(t).then((()=>{y(!1)}))})),className:"memori-auth-widget--form",children:[("password"===e||!i)&&(0,s.jsxs)("fieldset",{className:"memori-auth-widget--password-fieldset",children:[(0,s.jsxs)("label",{children:["Password:"," ",(0,s.jsx)("input",{className:"memori-auth-widget--input",required:!0,type:"password",placeholder:"Password",...d("password",{required:!0})})]}),i&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("hr",{}),(0,s.jsx)(Qd,{outlined:!0,onClick:()=>t("tokens"),children:c("auth.useRecoveryTokens")||"Recovery tokens"})]})]}),"tokens"===e&&i&&(0,s.jsxs)("fieldset",{className:"memori-auth-widget--tokens-fieldset",name:"tokens",children:[(0,s.jsxs)("legend",{children:[c("auth.tokens"),": "]}),(w=m,Array.from({length:w},((e,t)=>t))).map((e=>(0,s.jsx)("label",{className:"memori-auth-widget--token",children:(0,s.jsx)("input",{type:"password",className:"memori-auth-widget--input",placeholder:"Recovery token",required:!0,autoComplete:"off",...d(`tokens.${e}`,{required:!0})})},e))),(0,s.jsx)(Qd,{onClick:()=>g((e=>e+1)),className:"memori-auth-widget--token-add",icon:(0,s.jsx)(Rm,{}),children:c("auth.addToken")||"Add token"}),(0,s.jsx)("hr",{}),(0,s.jsx)(Qd,{outlined:!0,onClick:()=>t("password"),children:c("auth.usePassword")||"Password"})]}),"minLength"===(null===(l=h.tokens)||void 0===l?void 0:l.type)&&(0,s.jsxs)("div",{className:"memori-auth-widget--error",children:[c("auth.atLeast")||"At least"," ",r]}),(0,s.jsx)(Qd,{htmlType:"submit",primary:!0,className:"memori-auth-widget--submit",children:c("confirm")||"Submit"})]});var w;return a?(0,s.jsx)(dp,{open:o||v,title:c("auth.title")||"Authentication",onClose:()=>t(null),closable:!1,children:b}):b};u=a("85Hg2"),Kd=a("4IUwl"),u=a("85Hg2");const Nm=()=>{let e=!1;if("maxTouchPoints"in navigator)e=navigator.maxTouchPoints>0;else if("msMaxTouchPoints"in navigator)e=navigator.msMaxTouchPoints>0;else{const n=window&&"matchMedia"in window&&matchMedia("(pointer:coarse)");if(n&&"(pointer:coarse)"===n.media)e=!!n.matches;else if("orientation"in window)e=!0;else{var t=null===navigator||void 0===navigator?void 0:navigator.userAgent;e=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(t)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(t)}}return e},Lm=()=>{var e;let t=(null===(e=null===navigator||void 0===navigator?void 0:navigator.userAgentData)||void 0===e?void 0:e.platform)||(null===navigator||void 0===navigator?void 0:navigator.platform)||"unknown",n=(null===navigator||void 0===navigator?void 0:navigator.userAgent)||"unknown";return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(t)||n.includes("Mac")&&"ontouchend"in document};const Dm=e=>e.slice(0,e.length/2).trim().toLowerCase()===e.slice(e.length/2+1).trim().toLowerCase()?e.slice(0,e.length/2):e,Bm=e=>e.replaceAll(/[^\p{L}\p{N}\p{P}\p{Z}^$\n]/gu,"").trim(),jm=({type:e,resourceURI:t,sessionID:n,baseURL:r="",apiURL:i=""})=>{let o="cover"===e?`${r}/images/memoriCover.png`:`${r}/images/memoriAvatar.png?v=20231208`;try{return t&&0!==t.length?t.includes("memoriai/memory")&&!t.includes("memori-ai-session-id")&&n?`${t}?memori-ai-session-id=${n}`:(t.startsWith("https://")||t.startsWith("http://"))&&(new URL(t).hostname.includes("memori.ai")||new URL(t).hostname.includes("aclambda.online"))?`${t}${t.endsWith("/")||!n?"":"/"}${n||""}`:t.startsWith("cloud://")?`${(null==i?void 0:i.replace(/v2/,"v1"))||""}/CloudAsset/${t.replace("cloud://","")}`:t.startsWith("guid://")?`${(null==i?void 0:i.replace(/v2/,"v1"))||""}/GuidAsset/${t.replace("guid://","")}`:t||o:o}catch(e){return t||o}};Kd=a("4IUwl");var Fm=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M858.5 763.6a374 374 0 0 0-80.6-119.5 375.63 375.63 0 0 0-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 0 0-80.6 119.5A371.7 371.7 0 0 0 136 901.8a8 8 0 0 0 8 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 0 0 8-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"})});var Um=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",className:e,"aria-label":t,children:(0,s.jsxs)("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",children:[(0,s.jsx)("path",{fillRule:"evenodd",d:"M0 4a4 4 0 014-4h16a4 4 0 014 4v16a4 4 0 01-4 4H4a4 4 0 01-4-4zm4-2.4A2.4 2.4 0 001.6 4v16A2.4 2.4 0 004 22.4h16a2.4 2.4 0 002.4-2.4V4A2.4 2.4 0 0020 1.6z",clipRule:"evenodd"}),(0,s.jsx)("path",{fillRule:"evenodd",d:"M9.715 8.442a.798.798 0 00-1.43 0l-3.2 6.4a.799.799 0 101.431.716l.579-1.158h3.811l.578 1.158a.8.8 0 001.431-.716zm.391 4.358L9 10.589 7.894 12.8z",clipRule:"evenodd"}),(0,s.jsx)("path",{fillRule:"evenodd",d:"M17 8c.552 0 1 .358 1 .8v6.4c0 .442-.448.8-1 .8s-1-.358-1-.8V8.8c0-.442.448-.8 1-.8z",clipRule:"evenodd"})]})});Kd=a("4IUwl");var zm=({content:e,className:t,align:n="right",disabled:i=!1,visible:o=!1,children:a})=>(0,s.jsxs)("div",{className:r(Kd)("memori-tooltip",`memori-tooltip--align-${n}`,t,{"memori-tooltip--disabled":i,"memori-tooltip--visible":o}),children:[(0,s.jsx)("div",{className:"memori-tooltip--content",children:e}),(0,s.jsx)("div",{className:"memori-tooltip--trigger",children:a})]});u=a("85Hg2"),u=a("85Hg2");var Hm=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Hm||{});function Vm(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=null!=r?r:-1,o=(()=>{switch(e.focus){case 0:return n.findIndex((e=>!t.resolveDisabled(e)));case 1:{let e=n.slice().reverse().findIndex(((e,n,r)=>!(-1!==i&&r.length-n-1>=i)&&!t.resolveDisabled(e)));return-1===e?e:n.length-1-e}case 2:return n.findIndex(((e,n)=>!(n<=i)&&!t.resolveDisabled(e)));case 3:{let e=n.slice().reverse().findIndex((e=>!t.resolveDisabled(e)));return-1===e?e:n.length-1-e}case 4:return n.findIndex((n=>t.resolveId(n)===e.id));case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}})();return-1===o?r:o}u=a("85Hg2");function Wm({container:e,accept:t,walk:n,enabled:r=!0}){let i=(0,u.useRef)(t),o=(0,u.useRef)(n);(0,u.useEffect)((()=>{i.current=t,o.current=n}),[t,n]),pf((()=>{if(!e||!r)return;let t=rh(e);if(!t)return;let n=i.current,a=o.current,s=Object.assign((e=>n(e)),{acceptNode:n}),l=t.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,s,!1);for(;l.nextNode();)a(l.currentNode)}),[e,r,i,o])}u=a("85Hg2");function Gm(e){var t;if(e.type)return e.type;let n=null!=(t=e.as)?t:"button";return"string"==typeof n&&"button"===n.toLowerCase()?"button":void 0}function qm(e,t){let[n,r]=(0,u.useState)((()=>Gm(e)));return pf((()=>{r(Gm(e))}),[e.type,e.as]),pf((()=>{n||!t.current||t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")}),[n,t]),n}var Km=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Km||{}),Ym=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Ym||{}),Jm=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(Jm||{});function Qm(e,t=(e=>e)){let n=null!==e.activeItemIndex?e.items[e.activeItemIndex]:null,r=mh(t(e.items.slice()),(e=>e.dataRef.current.domRef.current)),i=n?r.indexOf(n):null;return-1===i&&(i=null),{items:r,activeItemIndex:i}}let Xm={1:e=>1===e.menuState?e:{...e,activeItemIndex:null,menuState:1},0:e=>0===e.menuState?e:{...e,menuState:0},2:(e,t)=>{var n;let r=Qm(e),i=Vm(t,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:i,activationTrigger:null!=(n=t.trigger)?n:1}},3:(e,t)=>{let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeItemIndex?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find((e=>{var t;return(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))&&!e.dataRef.current.disabled})),o=i?e.items.indexOf(i):-1;return-1===o||o===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:o,activationTrigger:1}},4:e=>""===e.searchQuery?e:{...e,searchQuery:"",searchActiveItemIndex:null},5:(e,t)=>{let n=Qm(e,(e=>[...e,{id:t.id,dataRef:t.dataRef}]));return{...e,...n}},6:(e,t)=>{let n=Qm(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...n,activationTrigger:1}}},Zm=(0,u.createContext)(null);function $m(e){let t=(0,u.useContext)(Zm);if(null===t){let t=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,$m),t}return t}function eg(e,t){return Xd(t.type,Xm,e,t)}Zm.displayName="MenuContext";let tg=u.Fragment,ng=af((function(e,t){let n=(0,u.useReducer)(eg,{menuState:1,buttonRef:(0,u.createRef)(),itemsRef:(0,u.createRef)(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:i,itemsRef:o,buttonRef:a},s]=n,l=Sf(t);Yh([a,o],((e,t)=>{var n;s({type:1}),dh(t,uh.Loose)||(e.preventDefault(),null==(n=a.current)||n.focus())}),0===i);let c=bf((()=>{s({type:1})})),d=(0,u.useMemo)((()=>({open:0===i,close:c})),[i,c]),f=e,h={ref:l};return r(u).createElement(Zm.Provider,{value:n},r(u).createElement(ff,{value:Xd(i,{0:uf.Open,1:uf.Closed})},nf({ourProps:h,theirProps:f,slot:d,defaultTag:tg,name:"Menu"})))})),rg=af((function(e,t){var n;let[r,i]=$m("Menu.Button"),o=Sf(r.buttonRef,t),a=`headlessui-menu-button-${eh()}`,s=Of(),l=bf((e=>{switch(e.key){case Jf.Space:case Jf.Enter:case Jf.ArrowDown:e.preventDefault(),e.stopPropagation(),i({type:0}),s.nextFrame((()=>i({type:2,focus:Hm.First})));break;case Jf.ArrowUp:e.preventDefault(),e.stopPropagation(),i({type:0}),s.nextFrame((()=>i({type:2,focus:Hm.Last})))}})),c=bf((e=>{if(e.key===Jf.Space)e.preventDefault()})),d=bf((t=>{if(Qf(t.currentTarget))return t.preventDefault();e.disabled||(0===r.menuState?(i({type:1}),s.nextFrame((()=>{var e;return null==(e=r.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))):(t.preventDefault(),i({type:0})))})),f=(0,u.useMemo)((()=>({open:0===r.menuState})),[r]),h=e;return nf({ourProps:{ref:o,id:a,type:qm(e,r.buttonRef),"aria-haspopup":!0,"aria-controls":null==(n=r.itemsRef.current)?void 0:n.id,"aria-expanded":e.disabled?void 0:0===r.menuState,onKeyDown:l,onKeyUp:c,onClick:d},theirProps:h,slot:f,defaultTag:"button",name:"Menu.Button"})})),ig=ef.RenderStrategy|ef.Static,og=af((function(e,t){var n,r;let[i,o]=$m("Menu.Items"),a=Sf(i.itemsRef,t),s=xh(i.itemsRef),l=`headlessui-menu-items-${eh()}`,c=Of(),d=df(),f=null!==d?d===uf.Open:0===i.menuState;(0,u.useEffect)((()=>{let e=i.itemsRef.current;!e||0===i.menuState&&e!==(null==s?void 0:s.activeElement)&&e.focus({preventScroll:!0})}),[i.menuState,i.itemsRef,s]),Wm({container:i.itemsRef.current,enabled:0===i.menuState,accept:e=>"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let h=bf((e=>{var t,n;switch(c.dispose(),e.key){case Jf.Space:if(""!==i.searchQuery)return e.preventDefault(),e.stopPropagation(),o({type:3,value:e.key});case Jf.Enter:if(e.preventDefault(),e.stopPropagation(),o({type:1}),null!==i.activeItemIndex){let{dataRef:e}=i.items[i.activeItemIndex];null==(n=null==(t=e.current)?void 0:t.domRef.current)||n.click()}fh(i.buttonRef.current);break;case Jf.ArrowDown:return e.preventDefault(),e.stopPropagation(),o({type:2,focus:Hm.Next});case Jf.ArrowUp:return e.preventDefault(),e.stopPropagation(),o({type:2,focus:Hm.Previous});case Jf.Home:case Jf.PageUp:return e.preventDefault(),e.stopPropagation(),o({type:2,focus:Hm.First});case Jf.End:case Jf.PageDown:return e.preventDefault(),e.stopPropagation(),o({type:2,focus:Hm.Last});case Jf.Escape:e.preventDefault(),e.stopPropagation(),o({type:1}),Af().nextFrame((()=>{var e;return null==(e=i.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case Jf.Tab:e.preventDefault(),e.stopPropagation(),o({type:1}),Af().nextFrame((()=>{gh(i.buttonRef.current,e.shiftKey?ah.Previous:ah.Next)}));break;default:1===e.key.length&&(o({type:3,value:e.key}),c.setTimeout((()=>o({type:4})),350))}})),p=bf((e=>{if(e.key===Jf.Space)e.preventDefault()})),m=(0,u.useMemo)((()=>({open:0===i.menuState})),[i]),g=e;return nf({ourProps:{"aria-activedescendant":null===i.activeItemIndex||null==(n=i.items[i.activeItemIndex])?void 0:n.id,"aria-labelledby":null==(r=i.buttonRef.current)?void 0:r.id,id:l,onKeyDown:h,onKeyUp:p,role:"menu",tabIndex:0,ref:a},theirProps:g,slot:m,defaultTag:"div",features:ig,visible:f,name:"Menu.Items"})})),ag=u.Fragment,sg=af((function(e,t){let{disabled:n=!1,...r}=e,[i,o]=$m("Menu.Item"),a=`headlessui-menu-item-${eh()}`,s=null!==i.activeItemIndex&&i.items[i.activeItemIndex].id===a,l=(0,u.useRef)(null),c=Sf(t,l);pf((()=>{if(0!==i.menuState||!s||0===i.activationTrigger)return;let e=Af();return e.requestAnimationFrame((()=>{var e,t;null==(t=null==(e=l.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})),e.dispose}),[l,s,i.menuState,i.activationTrigger,i.activeItemIndex]);let d=(0,u.useRef)({disabled:n,domRef:l});pf((()=>{d.current.disabled=n}),[d,n]),pf((()=>{var e,t;d.current.textValue=null==(t=null==(e=l.current)?void 0:e.textContent)?void 0:t.toLowerCase()}),[d,l]),pf((()=>(o({type:5,id:a,dataRef:d}),()=>o({type:6,id:a}))),[d,a]);let f=bf((()=>{o({type:1})})),h=bf((e=>{if(n)return e.preventDefault();o({type:1}),fh(i.buttonRef.current)})),p=bf((()=>{if(n)return o({type:2,focus:Hm.Nothing});o({type:2,focus:Hm.Specific,id:a})})),m=bf((()=>{n||s||o({type:2,focus:Hm.Specific,id:a,trigger:0})})),g=bf((()=>{n||!s||o({type:2,focus:Hm.Nothing})})),v=(0,u.useMemo)((()=>({active:s,disabled:n,close:f})),[s,n,f]);return nf({ourProps:{id:a,ref:c,role:"menuitem",tabIndex:!0===n?void 0:-1,"aria-disabled":!0===n||void 0,disabled:void 0,onClick:h,onFocus:p,onPointerMove:m,onMouseMove:m,onPointerLeave:g,onMouseLeave:g},theirProps:r,slot:v,defaultTag:ag,name:"Menu.Item"})})),lg=Object.assign(ng,{Button:rg,Items:og,Item:sg});var cg=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:e,"aria-label":t,children:[(0,s.jsx)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),(0,s.jsx)("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H5.17l-.59.59-.58.58V4h16v12zm-9-4h2v2h-2zm0-6h2v4h-2z"})]});const ug={"it-IT":"Non è quello che ti ho chiesto","fr-FR":"Ce n'est pas ce que je t'ai demandé","en-GB":"It's not what I asked"},dg={"it-IT":"La risposta non era corretta","fr-FR":"La réponse n'était pas correcte","en-GB":"The answer was not correct"},fg={"it-IT":"Non mi è piaciuta la risposta","fr-FR":"Je n'ai pas aimé la réponse","en-GB":"I didn't like the answer"};var hg=({memori:e,className:t,onNegativeClick:n,toggle:i=!1,dropdown:o=!1})=>{const[a,l]=(0,u.useState)(),c="it-IT"===e.culture?"it-IT":"fr-FR"===e.culture?"fr-FR":"en-GB",d=ug[c],f=dg[c],h=fg[c];return(0,s.jsx)("div",{className:"memori-chat--feedback"+(t?` ${t}`:""),children:o?(0,s.jsxs)(lg,{as:"div",className:"memori-chat--feedback-menu",children:[(0,s.jsx)(lg.Button,{as:r(u).Fragment,children:(0,s.jsx)(Qd,{ghost:!0,shape:"circle",title:"Feedback",className:"memori-chat--feedback-menu-button",disabled:!!a,icon:(0,s.jsx)(cg,{className:a?"memori-chat--feedback-clicked":void 0})})}),(0,s.jsx)(Kf,{as:r(u).Fragment,enter:"transition ease-out duration-200",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,s.jsx)(lg.Items,{className:"memori-chat--feedback-menu-items",children:(0,s.jsxs)("div",{className:"memori-chat--feedback-menu-items-container",children:[(0,s.jsx)(lg.Item,{children:({active:e})=>(0,s.jsx)("button",{className:"memori-chat--feedback-menu-item"+(e?" memori-chat--feedback-menu-item-active":""),onClick:()=>{l("up"===a&&i?void 0:"up")},children:h})},"ok"),(0,s.jsx)(lg.Item,{children:({active:e})=>(0,s.jsx)("button",{className:"memori-chat--feedback-menu-item"+(e?" memori-chat--feedback-menu-item-active":""),onClick:()=>{l("down"===a&&i?void 0:"down"),n(d)},children:f})},"no")]})})})]}):(0,s.jsx)(zm,{align:"left",content:"Feedback",children:(0,s.jsx)(Qd,{title:"Feedback",onClick:()=>{l("down"===a&&i?void 0:"down"),n(d)},ghost:!0,shape:"circle",icon:(0,s.jsx)(cg,{className:a?"memori-chat--feedback-clicked":void 0})})})})};var pg=({message:e,memori:t,tenant:n,baseUrl:i,apiUrl:o,showFeedback:a,simulateUserPrompt:l,showAIicon:c=!0,isFirst:u=!1,user:d,userAvatar:f,experts:h})=>{var p,m,g,v,y,b,w,x;const{t:S}=Ce();return(0,s.jsxs)(s.Fragment,{children:[(e.initial||u)&&(0,s.jsx)("div",{className:"memori-chat--bubble-initial"}),(0,s.jsxs)(Kf,{show:!0,appear:!0,as:"div",className:r(Kd)("memori-chat--bubble-container",{"memori-chat--bubble-from-user":!!e.fromUser,"memori-chat--with-addon":e.generatedByAI&&c||a&&l}),children:[!e.fromUser&&(0,s.jsxs)(Kf.Child,{as:"picture",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),title:(null===(p=e.emitter)||void 0===p?void 0:p.length)&&t.enableBoardOfExperts?e.emitter:t.name,children:[(0,s.jsx)("source",{src:(null===(m=e.emitter)||void 0===m?void 0:m.length)&&t.enableBoardOfExperts&&(null==h?void 0:h.find((t=>t.name===e.emitter)))?`${o}/api/v1/memoriai/memori/avatar/${null===(g=h.find((t=>t.name===e.emitter)))||void 0===g?void 0:g.expertMemoriID}`:jm({type:"avatar",tenantID:null==n?void 0:n.id,resourceURI:t.avatarURL,baseURL:i,apiURL:o})}),(0,s.jsx)("img",{className:"memori-chat--bubble-avatar-img",alt:(null===(v=e.emitter)||void 0===v?void 0:v.length)&&t.enableBoardOfExperts?e.emitter:t.name,src:(null===(y=e.emitter)||void 0===y?void 0:y.length)&&t.enableBoardOfExperts&&(null==h?void 0:h.find((t=>t.name===e.emitter)))?`${o}/api/v1/memoriai/memori/avatar/${null===(b=h.find((t=>t.name===e.emitter)))||void 0===b?void 0:b.expertMemoriID}`:t.avatarURL&&t.avatarURL.length>0?jm({type:"avatar",tenantID:null==n?void 0:n.id,resourceURI:t.avatarURL,baseURL:i,apiURL:o}):jm({tenantID:null==n?void 0:n.id,type:"avatar",baseURL:i||"https://app.twincreator.com",apiURL:o})})]}),(0,s.jsxs)(Kf.Child,{as:"div",className:r(Kd)("memori-chat--bubble",{"memori-chat--user-bubble":!!e.fromUser,"memori-chat--with-addon":e.generatedByAI&&c||a&&l,"memori-chat--ai-generated":e.generatedByAI&&c,"memori-chat--with-feedback":a}),enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-09 translate-x-"+(e.fromUser?"30":"-30"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-09 translate-x-"+(e.fromUser?"30":"-30"),children:[(e.translatedText||e.text).split(/\r\n|\r|\n/).map(((e,t)=>(0,s.jsx)("p",{children:e},t))),(e.generatedByAI&&c||a&&l)&&(0,s.jsxs)("div",{className:"memori-chat--bubble-addon",children:[a&&!!l&&(0,s.jsx)(hg,{memori:t,className:"memori-chat--bubble-feedback",dropdown:!0,onNegativeClick:e=>{e&&l(e)}}),e.generatedByAI&&c&&(0,s.jsx)(zm,{align:"left",content:S("generatedByAI"),className:"memori-chat--bubble-ai-icon",children:(0,s.jsx)("span",{children:(0,s.jsx)(Um,{title:S("generatedByAI")||void 0})})})]})]}),e.fromUser&&(0,s.jsx)(s.Fragment,{children:f&&"string"==typeof f||!f&&(null===(w=null==d?void 0:d.avatarURL)||void 0===w?void 0:w.length)?(0,s.jsx)(Kf.Child,{as:"picture",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),children:(0,s.jsx)("img",{className:"memori-chat--bubble-avatar-img",alt:null!==(x=null==d?void 0:d.userName)&&void 0!==x?x:"User",src:null!=f?f:null==d?void 0:d.avatarURL})}):f?(0,s.jsx)(Kf.Child,{as:"div",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),children:f}):(0,s.jsx)(Kf.Child,{as:"div",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),children:(0,s.jsx)(Fm,{})})})]})]})};u=a("85Hg2"),u=a("85Hg2");var mg,gg=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M574 665.4a8.03 8.03 0 0 0-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 0 0-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 0 0 0 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 0 0 0 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 0 0-11.3 0L372.3 598.7a8.03 8.03 0 0 0 0 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"})}),vg=(Kd=a("4IUwl"),{});mg=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function n(e,n){var r=e.el,i=e.elStyle,o=e.elHeight,a=e.rowsLimit,s=e.rowsWrapped,l=e.options,c=e.buffer,u=c;if(s===a+1)return t({},e);var d=c,f=s,h=o;return r.innerHTML=u=c.length?""+c+l.delimiter+n+l.replaceStr:""+n+l.replaceStr,parseFloat(i.height)>parseFloat(o)&&(f++,h=i.height,f===a+1)?(r.innerHTML=u="."===d[d.length-1]&&"..."===l.replaceStr?d+"..":""+d+l.replaceStr,t({},e,{elHeight:h,rowsWrapped:f})):(r.innerHTML=u=d.length?""+d+l.delimiter+n:""+n,t({},e,{buffer:u,elHeight:h,rowsWrapped:f}))}e.disableResponsive=function(e){window.removeEventListener("resize",e)},e.ellipsis=function e(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a={replaceStr:"...",responsive:!1,debounceDelay:250,delimiter:" "},s=t({},a,o),l=r&&(r instanceof NodeList?r:1===r.nodeType?[r]:document.querySelectorAll(r)),c=[],u=0;u<l.length;u++){var d=l[u];c[u]=d.innerHTML;var f=d.innerHTML.split(s.delimiter);d.innerHTML="";var h=window.getComputedStyle(d);f.reduce(n,{el:d,buffer:d.innerHTML,elStyle:h,elHeight:0,rowsLimit:i,rowsWrapped:0,options:s})}if(s.responsive){var p=!1,m=window.innerWidth,g=function(){if(window.innerWidth!==m){m=window.innerWidth;for(var n=0;n<l.length;n++)l[n].innerHTML=c[n];e(r,i,t({},o,{responsive:!1}))}},v=function(){clearTimeout(p),p=setTimeout(g,s.debounceDelay)};return window.addEventListener("resize",v),v}}},"function"==typeof define&&define.amd?define(["exports"],mg):mg(vg);Kd=a("4IUwl");var yg=({loading:e=!1,className:t,title:n,description:i,cover:o,hoverable:a=!1,children:l})=>(0,s.jsx)("div",{className:r(Kd)("memori-card",t,{"memori-card--loading":e,"memori-card--with-cover":o,"memori-card--hoverable":a}),children:(0,s.jsxs)(cp,{spinning:e,children:[o&&(0,s.jsx)("div",{className:"memori-card--cover",children:o}),(0,s.jsxs)("div",{className:"memori-card--content",children:[n&&(0,s.jsx)("h3",{className:"memori-card--title",children:n}),i&&(0,s.jsx)("p",{className:"memori-card--description",children:i}),(0,s.jsx)("div",{className:"memori-card--children",children:l})]})]})});const bg=({isChild:e=!1,item:t,baseUrl:n,onLinkPreviewInfo:i,descriptionOneLine:o=!1})=>{var a,l,c,d;const[f,h]=(0,u.useState)(null),p=(null===(a=t.url)||void 0===a?void 0:a.startsWith("http"))||!t.url||0===(null===(l=t.url)||void 0===l?void 0:l.length)?t.url:`https://${t.url}`;(0,u.useEffect)((()=>{var e,r;let o=(null===(e=t.url)||void 0===e?void 0:e.startsWith("http"))||!t.url||0===(null===(r=t.url)||void 0===r?void 0:r.length)?t.url:`https://${t.url}`;o&&o!==(null==f?void 0:f.urlKey)&&(async(e,t)=>{try{const n=await fetch(`${t||"https://app.twincreator.com"}/api/linkpreview/${encodeURIComponent(e)}`);return await n.json()}catch(e){return console.error("getSiteInfo",e),null}})(o,n).then((e=>{h(e?{...e,urlKey:o}:null),i&&e&&i(e)}))}),[null==t?void 0:t.url,n,i]);const m=t.title&&t.title.length>0?t.title:null==f?void 0:f.title,g=null==f?void 0:f.description,v=null==f?void 0:f.video,y=null!==(c=null==f?void 0:f.image)&&void 0!==c?c:null===(d=null==f?void 0:f.images)||void 0===d?void 0:d[0];return(0,u.useEffect)((()=>{setTimeout((()=>{(0,vg.ellipsis)(".memori-link-item--card .memori-card--description",3,{responsive:!0})}),300)}),[g,t.mediumID]),(0,s.jsx)("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:r(Kd)("memori-link-item--link",{"memori-link-item--link--child":e}),onClick:t=>{e||(t.preventDefault(),t.stopPropagation(),window.open(p,"_blank",`toolbar=yes,top=${.1*window.innerHeight},left=${.1*window.innerWidth},width=${.8*window.innerWidth},height=${.8*window.innerHeight}`))},children:(0,s.jsx)(yg,{hoverable:!0,className:r(Kd)("memori-link-item--card",{"memori-link-item--card-description-oneline":o,"memori-link-item--card-has-image":y,"memori-link-item--card-has-video":v}),cover:v?(0,s.jsx)("iframe",{width:"100%",height:"100%",src:v,title:"Video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}):y?(0,s.jsx)("img",{className:"memori-link-item--card-cover-img",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==",srcSet:y.includes("data:image")?void 0:y,alt:t.title}):(0,s.jsx)("div",{className:"memori-link-item--card-cover-icon",children:(0,s.jsx)(gg,{className:"memori-link-item--icon"})}),title:m,description:g})})};var wg=({items:e,baseUrl:t,descriptionOneLine:n=!1,onLinkPreviewInfo:r})=>(0,s.jsx)(Kf,{appear:!0,show:!0,as:"div",className:"memori-link-items",children:(0,s.jsx)("div",{className:"memori-link-items--grid",children:e.map(((e,i)=>(0,s.jsx)(Kf.Child,{as:"div",className:"memori-link-item",enter:"ease-out duration-500 delay-"+100*i,enterFrom:"opacity-0 scale-95",enterTo:"opacity-1 scale-100",leave:"ease-in duration-300",leaveFrom:"opacity-1 scale-100",leaveTo:"opacity-0 scale-95",children:(0,s.jsx)(bg,{item:e,baseUrl:t,descriptionOneLine:n,onLinkPreviewInfo:r})},e.mediumID)))})});u=a("85Hg2");const xg=["va bene","no grazie","si","no","sì","arrivederci","non c'entrava","non mi è piaciuto"],Sg=async(e,t,n,r)=>{var i;const o=xg.indexOf(e.toLowerCase())>-1?"IT":null==n?void 0:n.toUpperCase(),a=await fetch(`${r||"https://app.twincreator.com"}/api/translate?text=${encodeURIComponent(e)}&target_lang=${t.toUpperCase()}${o?`&source_lang=${o}`:""}`,{method:"GET",headers:{Accept:"*/*"}}),s=await a.json();return null===(i=null==s?void 0:s.translations)||void 0===i?void 0:i[0]},Mg=[{value:"IT",label:"Italiano"},{value:"EN",label:"English"},{value:"DE",label:"Deutsch"},{value:"ES",label:"Español"},{value:"FR",label:"Français"},{value:"PT",label:"Português"},{value:"UK",label:"Українська"},{value:"RU",label:"Русский"},{value:"PL",label:"Polski"},{value:"FI",label:"Suomi"}],_g=["image/jpeg","image/png","image/jpg","image/gif","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/pdf","video/mp4","video/avi","audio/mpeg3","audio/wav","audio/mpeg","video/mpeg","model/gltf-binary"],Ag="👤",Eg=[{name:"text",lang:"text",mimeType:"text/plain",monacoLang:"plaintext",executable:!0},{name:"javascript/jsx",lang:"jsx",mimeType:"text/javascript",monacoLang:"javascript",executable:!0},{name:"typescript/tsx",lang:"tsx",mimeType:"text/ecmascript",monacoLang:"typescript",executable:!0},{name:"json",lang:"json",mimeType:"application/json",monacoLang:"json",executable:!0},{name:"css",lang:"scss",mimeType:"text/css",monacoLang:"css",executable:!0},{name:"html/xml",lang:"tsx",mimeType:"application/xml",monacoLang:"xml"},{name:"bash",lang:"bash",mimeType:"application/x-sh",monacoLang:"shell"},{name:"python",lang:"python",mimeType:"text/x-python",monacoLang:"python"},{name:"cpp/csharp",lang:"cpp",mimeType:"text/x-c++src",monacoLang:"cpp"},{name:"php",lang:"php",mimeType:"application/x-php",monacoLang:"php"},{name:"ruby",lang:"ruby",mimeType:"text/x-ruby",monacoLang:"ruby"},{name:"sql",lang:"sql",mimeType:"text/x-sql",monacoLang:"sql"}];u=a("85Hg2");var Cg=({src:e,poster:t,alt:n=""})=>((0,u.useEffect)((()=>{const e=document.createElement("script");return e.src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js",e.type="module",document.head.appendChild(e),()=>{document.head.removeChild(e)}}),[]),(0,s.jsx)("div",{className:"model-viewer",children:(0,s.jsx)("model-viewer",{src:e,"ios-src":"",poster:t,alt:n,"shadow-intensity":"1","disable-zoom":!0,"camera-controls":!0,autoplay:!0})}));var kg=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"})}),Tg={};function Ig(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}(Tg=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Ig(o,r,i,a,s,"next",e)}function s(e){Ig(o,r,i,a,s,"throw",e)}a(void 0)}))}}).__esModule=!0,Tg.default=Tg;var Og={};function Rg(){return Og=Rg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Og.__esModule=!0,Og.default=Og,Rg.apply(this,arguments)}(Og=Rg).__esModule=!0,Og.default=Og;var Pg={};(Pg=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}).__esModule=!0,Pg.default=Pg;var Ng={},Lg={},Dg=a("7h3ED").default,Bg={},jg=a("7h3ED").default;function Fg(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,Lg(r.key),r)}}(Bg=function(e,t){if("object"!==jg(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==jg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}).__esModule=!0,Bg.default=Bg,(Lg=function(e){var t=Bg(e,"string");return"symbol"===Dg(t)?t:String(t)}).__esModule=!0,Lg.default=Lg,(Ng=function(e,t,n){return t&&Fg(e.prototype,t),n&&Fg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}).__esModule=!0,Ng.default=Ng;var Ug={},zg={};function Hg(e,t){return zg=Hg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zg.__esModule=!0,zg.default=zg,Hg(e,t)}(zg=Hg).__esModule=!0,zg.default=zg,(Ug=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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zg(e,t)}).__esModule=!0,Ug.default=Ug;var Vg={},Wg=a("7h3ED").default,Gg={};(Gg=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}).__esModule=!0,Gg.default=Gg,(Vg=function(e,t){if(t&&("object"===Wg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Gg(e)}).__esModule=!0,Vg.default=Vg;var qg={};function Kg(e){return qg=Kg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qg.__esModule=!0,qg.default=qg,Kg(e)}(qg=Kg).__esModule=!0,qg.default=qg;var Yg={};(Yg=function(e,t,n){return(t=Lg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}).__esModule=!0,Yg.default=Yg;var Jg,Qg=a("6EIcq")();Jg=Qg;try{regeneratorRuntime=Qg}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=Qg:Function("r","regeneratorRuntime = r")(Qg)}u=a("85Hg2");var Xg={},Zg={};(Zg=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}).__esModule=!0,Zg.default=Zg,(Xg=function(e,t){if(null==e)return{};var n,r,i=Zg(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}).__esModule=!0,Xg.default=Xg;var $g={},ev={},tv={};(tv=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}).__esModule=!0,tv.default=tv,(ev=function(e){if(Array.isArray(e))return tv(e)}).__esModule=!0,ev.default=ev;var nv={};(nv=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}).__esModule=!0,nv.default=nv;var rv={};rv=function(e,t){if(e){if("string"==typeof e)return tv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tv(e,t):void 0}},rv.__esModule=!0,rv.default=rv;var iv={};(iv=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}).__esModule=!0,iv.default=iv,($g=function(e){return ev(e)||nv(e)||rv(e)||iv()}).__esModule=!0,$g.default=$g;u=a("85Hg2"),u=a("85Hg2");function ov(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function av(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ov(Object(n),!0).forEach((function(t){r(Yg)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ov(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var sv={};function lv(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return sv[r]||(sv[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),sv[r]}function cv(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=e.filter((function(e){return"token"!==e})),i=lv(r);return i.reduce((function(e,t){return av(av({},e),n[t])}),t)}function uv(e){return e.join(" ")}function dv(e){var t=e.node,n=e.stylesheet,i=e.style,o=void 0===i?{}:i,a=e.useInlineStyles,s=e.key,l=t.properties,c=t.type,d=t.tagName,f=t.value;if("text"===c)return f;if(d){var h,p=function(e,t){var n=0;return function(r){return n+=1,r.map((function(r,i){return dv({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})}))}}(n,a);if(a){var m=Object.keys(n).reduce((function(e,t){return t.split(".").forEach((function(t){e.includes(t)||e.push(t)})),e}),[]),g=l.className&&l.className.includes("token")?["token"]:[],v=l.className&&g.concat(l.className.filter((function(e){return!m.includes(e)})));h=av(av({},l),{},{className:uv(v)||void 0,style:cv(l.className,Object.assign({},l.style,o),n)})}else h=av(av({},l),{},{className:uv(l.className)});var y=p(t.children);return r(u).createElement(d,r(Og)({key:s},h),y)}}var fv=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function hv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hv(Object(n),!0).forEach((function(t){r(Yg)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var mv=/\n/g;function gv(e){var t=e.codeString,n=e.codeStyle,i=e.containerStyle,o=void 0===i?{float:"left",paddingRight:"10px"}:i,a=e.numberStyle,s=void 0===a?{}:a,l=e.startingLineNumber;return r(u).createElement("code",{style:Object.assign({},n,o)},function(e){var t=e.lines,n=e.startingLineNumber,i=e.style;return t.map((function(e,t){var o=t+n;return r(u).createElement("span",{key:"line-".concat(t),className:"react-syntax-highlighter-line-number",style:"function"==typeof i?i(o):i},"".concat(o,"\n"))}))}({lines:t.replace(/\n$/,"").split("\n"),style:s,startingLineNumber:l}))}function vv(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function yv(e,t,n){var r,i={display:"inline-block",minWidth:(r=n,"".concat(r.toString().length,".25em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},o="function"==typeof e?e(t):e;return pv(pv({},i),o)}function bv(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,o=e.showInlineLineNumbers,a=e.lineProps,s=void 0===a?{}:a,l=e.className,c=void 0===l?[]:l,u=e.showLineNumbers,d=e.wrapLongLines,f="function"==typeof s?s(n):s;if(f.className=c,n&&o){var h=yv(r,n,i);t.unshift(vv(n,h))}return d&u&&(f.style=pv(pv({},f.style),{},{display:"flex"})),{type:"element",tagName:"span",properties:f,children:t}}function wv(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=0;i<e.length;i++){var o=e[i];if("text"===o.type)n.push(bv({children:[o],className:r($g)(new Set(t))}));else if(o.children){var a=t.concat(o.properties.className);wv(o.children,a).forEach((function(e){return n.push(e)}))}}return n}function xv(e,t,n,r,i,o,a,s,l){var c,u=wv(e.value),d=[],f=-1,h=0;function p(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return bv({children:e,lineNumber:t,lineNumberStyle:s,largestLineNumber:a,showInlineLineNumbers:i,lineProps:n,className:o,showLineNumbers:r,wrapLongLines:l})}function m(e,t){if(r&&t&&i){var n=yv(s,t,a);e.unshift(vv(t,n))}return e}function g(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||r.length>0?p(e,n,r):m(e,n)}for(var v=function(){var e=u[h],t=e.children[0].value;if(t.match(mv)){var n=t.split("\n");n.forEach((function(t,i){var a=r&&d.length+o,s={type:"text",value:"".concat(t,"\n")};if(0===i){var l=g(u.slice(f+1,h).concat(bv({children:[s],className:e.properties.className})),a);d.push(l)}else if(i===n.length-1){var c=u[h+1]&&u[h+1].children&&u[h+1].children[0],p={type:"text",value:"".concat(t)};if(c){var m=bv({children:[p],className:e.properties.className});u.splice(h+1,0,m)}else{var v=g([p],a,e.properties.className);d.push(v)}}else{var y=g([s],a,e.properties.className);d.push(y)}})),f=h}h++};h<u.length;)v();if(f!==u.length-1){var y=u.slice(f+1,u.length);if(y&&y.length){var b=g(y,r&&d.length+o);d.push(b)}}return t?d:(c=[]).concat.apply(c,d)}function Sv(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map((function(e,t){return dv({node:e,stylesheet:n,useInlineStyles:r,key:"code-segement".concat(t)})}))}function Mv(e){return e&&void 0!==e.highlightAuto}function _v(e,t){return function(n){var i=n.language,o=n.children,a=n.style,s=void 0===a?t:a,l=n.customStyle,c=void 0===l?{}:l,d=n.codeTagProps,f=void 0===d?{className:i?"language-".concat(i):void 0,style:pv(pv({},s['code[class*="language-"]']),s['code[class*="language-'.concat(i,'"]')])}:d,h=n.useInlineStyles,p=void 0===h||h,m=n.showLineNumbers,g=void 0!==m&&m,v=n.showInlineLineNumbers,y=void 0===v||v,b=n.startingLineNumber,w=void 0===b?1:b,x=n.lineNumberContainerStyle,S=n.lineNumberStyle,M=void 0===S?{}:S,_=n.wrapLines,A=n.wrapLongLines,E=void 0!==A&&A,C=n.lineProps,k=void 0===C?{}:C,T=n.renderer,I=n.PreTag,O=void 0===I?"pre":I,R=n.CodeTag,P=void 0===R?"code":R,N=n.code,L=void 0===N?(Array.isArray(o)?o[0]:o)||"":N,D=n.astGenerator,B=r(Xg)(n,fv);D=D||e;var j=g?r(u).createElement(gv,{containerStyle:x,codeStyle:f.style||{},numberStyle:M,startingLineNumber:w,codeString:L}):null,F=s.hljs||s['pre[class*="language-"]']||{backgroundColor:"#fff"},U=Mv(D)?"hljs":"prismjs",z=p?Object.assign({},B,{style:Object.assign({},F,c)}):Object.assign({},B,{className:B.className?"".concat(U," ").concat(B.className):U,style:Object.assign({},c)});if(f.style=pv(pv({},f.style),{},E?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"}),!D)return r(u).createElement(O,z,j,r(u).createElement(P,f,L));(void 0===_&&T||E)&&(_=!0),T=T||Sv;var H=[{type:"text",value:L}],V=function(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(Mv(t)){var o=function(e,t){return-1!==e.listLanguages().indexOf(t)}(t,n);return"text"===n?{value:i,language:"text"}:o?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:i}}catch(e){return{value:i}}}({astGenerator:D,language:i,code:L,defaultCodeValue:H});null===V.language&&(V.value=H);var W=xv(V,_,k,g,y,w,V.value.length+w,M,E);return r(u).createElement(O,z,r(u).createElement(P,f,!y&&j,T({rows:W,stylesheet:s,useInlineStyles:p})))}}function Av(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=r(qg)(e);if(t){var o=r(qg)(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return r(Vg)(this,n)}}var Ev,Cv,kv,Tv,Iv,Ov,Rv,Pv=function(e,t){return function(){var n=r(Tg)(r(Jg).mark((function n(i){var o;return r(Jg).wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t();case 2:o=n.sent,i(e,o.default||o);case 4:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()},Nv={abap:Pv("abap",(function(){return a("bwHpE")})),abnf:Pv("abnf",(function(){return a("daD87")})),actionscript:Pv("actionscript",(function(){return a("lpEgO")})),ada:Pv("ada",(function(){return a("1sGW9")})),agda:Pv("agda",(function(){return a("e9VyR")})),al:Pv("al",(function(){return a("kMFSe")})),antlr4:Pv("antlr4",(function(){return a("8HlsP")})),apacheconf:Pv("apacheconf",(function(){return a("isFCh")})),apex:Pv("apex",(function(){return a("gUXVM")})),apl:Pv("apl",(function(){return a("2L15v")})),applescript:Pv("applescript",(function(){return a("8XyFT")})),aql:Pv("aql",(function(){return a("gFWTI")})),arduino:Pv("arduino",(function(){return a("jI3VB")})),arff:Pv("arff",(function(){return a("6uYTH")})),asciidoc:Pv("asciidoc",(function(){return a("gdYKH")})),asm6502:Pv("asm6502",(function(){return a("ahFLg")})),asmatmel:Pv("asmatmel",(function(){return a("4irIu")})),aspnet:Pv("aspnet",(function(){return a("yDC6n")})),autohotkey:Pv("autohotkey",(function(){return a("a4xpy")})),autoit:Pv("autoit",(function(){return a("iNSix")})),avisynth:Pv("avisynth",(function(){return a("kEBnk")})),avroIdl:Pv("avroIdl",(function(){return a("lzthi")})),bash:Pv("bash",(function(){return Promise.resolve(a("3aDLI"))})),basic:Pv("basic",(function(){return a("cxDu6")})),batch:Pv("batch",(function(){return a("6zDll")})),bbcode:Pv("bbcode",(function(){return a("bPS87")})),bicep:Pv("bicep",(function(){return a("8dy5f")})),birb:Pv("birb",(function(){return a("3vHrY")})),bison:Pv("bison",(function(){return a("bCjBS")})),bnf:Pv("bnf",(function(){return a("4NqDW")})),brainfuck:Pv("brainfuck",(function(){return a("4s0KX")})),brightscript:Pv("brightscript",(function(){return a("jTsQ4")})),bro:Pv("bro",(function(){return a("5lMc2")})),bsl:Pv("bsl",(function(){return a("jBYxC")})),c:Pv("c",(function(){return Promise.resolve(a("lyZgY"))})),cfscript:Pv("cfscript",(function(){return a("coZDy")})),chaiscript:Pv("chaiscript",(function(){return a("e1zEN")})),cil:Pv("cil",(function(){return a("crKoM")})),clike:Pv("clike",(function(){return a("4kO9t")})),clojure:Pv("clojure",(function(){return a("01SpB")})),cmake:Pv("cmake",(function(){return a("9yG4p")})),cobol:Pv("cobol",(function(){return a("967Hn")})),coffeescript:Pv("coffeescript",(function(){return a("7Yi6H")})),concurnas:Pv("concurnas",(function(){return a("5tXmX")})),coq:Pv("coq",(function(){return a("ektdr")})),cpp:Pv("cpp",(function(){return Promise.resolve(a("lR39A"))})),crystal:Pv("crystal",(function(){return a("8gt4L")})),csharp:Pv("csharp",(function(){return a("7K6eJ")})),cshtml:Pv("cshtml",(function(){return a("cVu4i")})),csp:Pv("csp",(function(){return a("ecKo1")})),cssExtras:Pv("cssExtras",(function(){return a("gnpv8")})),css:Pv("css",(function(){return a("jx0H8")})),csv:Pv("csv",(function(){return a("f9kmW")})),cypher:Pv("cypher",(function(){return a("lojor")})),d:Pv("d",(function(){return a("6Qa0U")})),dart:Pv("dart",(function(){return a("74K1B")})),dataweave:Pv("dataweave",(function(){return a("93H6c")})),dax:Pv("dax",(function(){return a("cf9Y9")})),dhall:Pv("dhall",(function(){return a("f6UWv")})),diff:Pv("diff",(function(){return a("klPVo")})),django:Pv("django",(function(){return a("jfxe9")})),dnsZoneFile:Pv("dnsZoneFile",(function(){return a("5aMz5")})),docker:Pv("docker",(function(){return a("kOauC")})),dot:Pv("dot",(function(){return a("btE6k")})),ebnf:Pv("ebnf",(function(){return a("aT88c")})),editorconfig:Pv("editorconfig",(function(){return a("jWOl8")})),eiffel:Pv("eiffel",(function(){return a("kHJaX")})),ejs:Pv("ejs",(function(){return a("frfnA")})),elixir:Pv("elixir",(function(){return a("hcrJ2")})),elm:Pv("elm",(function(){return a("jd271")})),erb:Pv("erb",(function(){return a("gczXL")})),erlang:Pv("erlang",(function(){return a("FsabW")})),etlua:Pv("etlua",(function(){return a("9DI9l")})),excelFormula:Pv("excelFormula",(function(){return a("3QVue")})),factor:Pv("factor",(function(){return a("ltNCT")})),falselang:Pv("falselang",(function(){return a("g0Q6p")})),firestoreSecurityRules:Pv("firestoreSecurityRules",(function(){return a("ukA2V")})),flow:Pv("flow",(function(){return a("e5prn")})),fortran:Pv("fortran",(function(){return a("gIEL6")})),fsharp:Pv("fsharp",(function(){return a("3wQkt")})),ftl:Pv("ftl",(function(){return a("7ZVWs")})),gap:Pv("gap",(function(){return a("hOFj6")})),gcode:Pv("gcode",(function(){return a("95BzQ")})),gdscript:Pv("gdscript",(function(){return a("iul6t")})),gedcom:Pv("gedcom",(function(){return a("e0qJM")})),gherkin:Pv("gherkin",(function(){return a("2SHak")})),git:Pv("git",(function(){return a("l6VFH")})),glsl:Pv("glsl",(function(){return a("cEMfJ")})),gml:Pv("gml",(function(){return a("8UVTr")})),gn:Pv("gn",(function(){return a("kvibD")})),goModule:Pv("goModule",(function(){return a("icqjF")})),go:Pv("go",(function(){return a("jLkg8")})),graphql:Pv("graphql",(function(){return a("aYGNi")})),groovy:Pv("groovy",(function(){return a("4bTmH")})),haml:Pv("haml",(function(){return a("h2A6V")})),handlebars:Pv("handlebars",(function(){return a("79YVJ")})),haskell:Pv("haskell",(function(){return a("bsiLW")})),haxe:Pv("haxe",(function(){return a("94Kdj")})),hcl:Pv("hcl",(function(){return a("9CheR")})),hlsl:Pv("hlsl",(function(){return a("h3dqW")})),hoon:Pv("hoon",(function(){return a("9WbsW")})),hpkp:Pv("hpkp",(function(){return a("GiPN3")})),hsts:Pv("hsts",(function(){return a("eaSn9")})),http:Pv("http",(function(){return a("1uj7b")})),ichigojam:Pv("ichigojam",(function(){return a("ge562")})),icon:Pv("icon",(function(){return a("lVHUf")})),icuMessageFormat:Pv("icuMessageFormat",(function(){return a("aYoUL")})),idris:Pv("idris",(function(){return a("1RVAE")})),iecst:Pv("iecst",(function(){return a("bi7Dr")})),ignore:Pv("ignore",(function(){return a("cq0Pi")})),inform7:Pv("inform7",(function(){return a("31K4E")})),ini:Pv("ini",(function(){return a("l05OZ")})),io:Pv("io",(function(){return a("6bY1b")})),j:Pv("j",(function(){return a("1ebDS")})),java:Pv("java",(function(){return a("iEZZI")})),javadoc:Pv("javadoc",(function(){return a("aHy5a")})),javadoclike:Pv("javadoclike",(function(){return a("5f3rE")})),javascript:Pv("javascript",(function(){return a("7JDFI")})),javastacktrace:Pv("javastacktrace",(function(){return a("gdCGE")})),jexl:Pv("jexl",(function(){return a("cqMb9")})),jolie:Pv("jolie",(function(){return a("cEDX4")})),jq:Pv("jq",(function(){return a("kEWsh")})),jsExtras:Pv("jsExtras",(function(){return a("74PI8")})),jsTemplates:Pv("jsTemplates",(function(){return a("30TPr")})),jsdoc:Pv("jsdoc",(function(){return a("9DH5c")})),json:Pv("json",(function(){return Promise.resolve(a("l1Rj1"))})),json5:Pv("json5",(function(){return a("920rv")})),jsonp:Pv("jsonp",(function(){return a("9AwS1")})),jsstacktrace:Pv("jsstacktrace",(function(){return a("bYXMr")})),jsx:Pv("jsx",(function(){return Promise.resolve(a("6ho3O"))})),julia:Pv("julia",(function(){return a("g0ibH")})),keepalived:Pv("keepalived",(function(){return a("2hdnH")})),keyman:Pv("keyman",(function(){return a("cIufI")})),kotlin:Pv("kotlin",(function(){return a("c26dU")})),kumir:Pv("kumir",(function(){return a("iYAha")})),kusto:Pv("kusto",(function(){return a("9z1oX")})),latex:Pv("latex",(function(){return a("lCPLU")})),latte:Pv("latte",(function(){return a("c9oN0")})),less:Pv("less",(function(){return a("hA3V9")})),lilypond:Pv("lilypond",(function(){return a("hpHTA")})),liquid:Pv("liquid",(function(){return a("kpZTm")})),lisp:Pv("lisp",(function(){return a("chgK5")})),livescript:Pv("livescript",(function(){return a("2gdiv")})),llvm:Pv("llvm",(function(){return a("jUeFO")})),log:Pv("log",(function(){return a("3BFSQ")})),lolcode:Pv("lolcode",(function(){return a("lG9br")})),lua:Pv("lua",(function(){return a("cVGpd")})),magma:Pv("magma",(function(){return a("4LVzY")})),makefile:Pv("makefile",(function(){return a("2NviD")})),markdown:Pv("markdown",(function(){return a("jUFCF")})),markupTemplating:Pv("markupTemplating",(function(){return Promise.resolve(a("t3W0d"))})),markup:Pv("markup",(function(){return a("5hIXu")})),matlab:Pv("matlab",(function(){return a("kPAC0")})),maxscript:Pv("maxscript",(function(){return a("gHOJy")})),mel:Pv("mel",(function(){return a("9mj6e")})),mermaid:Pv("mermaid",(function(){return a("kozw5")})),mizar:Pv("mizar",(function(){return a("2bN6W")})),mongodb:Pv("mongodb",(function(){return a("eHKWX")})),monkey:Pv("monkey",(function(){return a("7Fh0C")})),moonscript:Pv("moonscript",(function(){return a("hDXwC")})),n1ql:Pv("n1ql",(function(){return a("j9bkC")})),n4js:Pv("n4js",(function(){return a("eTmBF")})),nand2tetrisHdl:Pv("nand2tetrisHdl",(function(){return a("ezjCf")})),naniscript:Pv("naniscript",(function(){return a("VxHk1")})),nasm:Pv("nasm",(function(){return a("ly95T")})),neon:Pv("neon",(function(){return a("7Fk34")})),nevod:Pv("nevod",(function(){return a("3U8Qv")})),nginx:Pv("nginx",(function(){return a("c6qVk")})),nim:Pv("nim",(function(){return a("1JdCk")})),nix:Pv("nix",(function(){return a("jcstS")})),nsis:Pv("nsis",(function(){return a("kEJqW")})),objectivec:Pv("objectivec",(function(){return a("lUP8A")})),ocaml:Pv("ocaml",(function(){return a("lhTAD")})),opencl:Pv("opencl",(function(){return a("8rxKO")})),openqasm:Pv("openqasm",(function(){return a("ib0uL")})),oz:Pv("oz",(function(){return a("csCUS")})),parigp:Pv("parigp",(function(){return a("2DkHE")})),parser:Pv("parser",(function(){return a("2cp75")})),pascal:Pv("pascal",(function(){return a("fViVl")})),pascaligo:Pv("pascaligo",(function(){return a("9Uuxa")})),pcaxis:Pv("pcaxis",(function(){return a("jUdnN")})),peoplecode:Pv("peoplecode",(function(){return a("l8w4e")})),perl:Pv("perl",(function(){return a("aX7dM")})),phpExtras:Pv("phpExtras",(function(){return a("3cMZl")})),php:Pv("php",(function(){return Promise.resolve(a("5li5P"))})),phpdoc:Pv("phpdoc",(function(){return a("bDyJN")})),plsql:Pv("plsql",(function(){return a("cPuMN")})),powerquery:Pv("powerquery",(function(){return a("jE1gU")})),powershell:Pv("powershell",(function(){return a("k7t0j")})),processing:Pv("processing",(function(){return a("jr8hV")})),prolog:Pv("prolog",(function(){return a("hpuat")})),promql:Pv("promql",(function(){return a("ckXC5")})),properties:Pv("properties",(function(){return a("fAh6P")})),protobuf:Pv("protobuf",(function(){return a("R6WqB")})),psl:Pv("psl",(function(){return a("Al65w")})),pug:Pv("pug",(function(){return a("dxbNS")})),puppet:Pv("puppet",(function(){return a("lrSuh")})),pure:Pv("pure",(function(){return a("6DKQK")})),purebasic:Pv("purebasic",(function(){return a("7ZkSb")})),purescript:Pv("purescript",(function(){return a("dBTYx")})),python:Pv("python",(function(){return Promise.resolve(a("kiy5M"))})),q:Pv("q",(function(){return a("4FXyy")})),qml:Pv("qml",(function(){return a("2zZFj")})),qore:Pv("qore",(function(){return a("iCK1Y")})),qsharp:Pv("qsharp",(function(){return a("dvH9H")})),r:Pv("r",(function(){return a("lQqRt")})),racket:Pv("racket",(function(){return a("eHKmq")})),reason:Pv("reason",(function(){return a("kkeLT")})),regex:Pv("regex",(function(){return a("llX50")})),rego:Pv("rego",(function(){return a("9hKdZ")})),renpy:Pv("renpy",(function(){return a("cJgw5")})),rest:Pv("rest",(function(){return a("867DK")})),rip:Pv("rip",(function(){return a("3Odjx")})),roboconf:Pv("roboconf",(function(){return a("gQ0Us")})),robotframework:Pv("robotframework",(function(){return a("bLCgx")})),ruby:Pv("ruby",(function(){return Promise.resolve(a("ch1PX"))})),rust:Pv("rust",(function(){return a("cInT8")})),sas:Pv("sas",(function(){return a("iz7eP")})),sass:Pv("sass",(function(){return a("hrDC3")})),scala:Pv("scala",(function(){return a("ub8Bf")})),scheme:Pv("scheme",(function(){return a("7NAAt")})),scss:Pv("scss",(function(){return Promise.resolve(a("fU6a0"))})),shellSession:Pv("shellSession",(function(){return a("7kKCv")})),smali:Pv("smali",(function(){return a("2lkCb")})),smalltalk:Pv("smalltalk",(function(){return a("4280y")})),smarty:Pv("smarty",(function(){return a("4hXYK")})),sml:Pv("sml",(function(){return a("jh2E8")})),solidity:Pv("solidity",(function(){return a("dTdF2")})),solutionFile:Pv("solutionFile",(function(){return a("iI5tm")})),soy:Pv("soy",(function(){return a("aoU5C")})),sparql:Pv("sparql",(function(){return a("ggrvb")})),splunkSpl:Pv("splunkSpl",(function(){return a("8LhCX")})),sqf:Pv("sqf",(function(){return a("3tDsu")})),sql:Pv("sql",(function(){return Promise.resolve(a("bnDV9"))})),squirrel:Pv("squirrel",(function(){return a("bxaUV")})),stan:Pv("stan",(function(){return a("dBqrq")})),stylus:Pv("stylus",(function(){return a("JlHVK")})),swift:Pv("swift",(function(){return a("c7NBs")})),systemd:Pv("systemd",(function(){return a("jprZl")})),t4Cs:Pv("t4Cs",(function(){return a("edsMI")})),t4Templating:Pv("t4Templating",(function(){return a("bS9Wa")})),t4Vb:Pv("t4Vb",(function(){return a("gYk20")})),tap:Pv("tap",(function(){return a("byv7d")})),tcl:Pv("tcl",(function(){return a("lUAIZ")})),textile:Pv("textile",(function(){return a("7J2LO")})),toml:Pv("toml",(function(){return a("eXtdM")})),tremor:Pv("tremor",(function(){return a("vyajH")})),tsx:Pv("tsx",(function(){return Promise.resolve(a("7cTnl"))})),tt2:Pv("tt2",(function(){return a("8XOOm")})),turtle:Pv("turtle",(function(){return a("1XvLQ")})),twig:Pv("twig",(function(){return a("i9Fpp")})),typescript:Pv("typescript",(function(){return Promise.resolve(a("fzL8k"))})),typoscript:Pv("typoscript",(function(){return a("kKk69")})),unrealscript:Pv("unrealscript",(function(){return a("jgq8Y")})),uorazor:Pv("uorazor",(function(){return a("dsZ00")})),uri:Pv("uri",(function(){return a("fqJRp")})),v:Pv("v",(function(){return a("bgfyB")})),vala:Pv("vala",(function(){return a("68x4q")})),vbnet:Pv("vbnet",(function(){return a("eUhQs")})),velocity:Pv("velocity",(function(){return a("fPNdV")})),verilog:Pv("verilog",(function(){return a("2fM1V")})),vhdl:Pv("vhdl",(function(){return a("hNF6q")})),vim:Pv("vim",(function(){return a("75TCr")})),visualBasic:Pv("visualBasic",(function(){return a("fc93z")})),warpscript:Pv("warpscript",(function(){return a("jgHlG")})),wasm:Pv("wasm",(function(){return a("dVZkI")})),webIdl:Pv("webIdl",(function(){return a("9Jnxv")})),wiki:Pv("wiki",(function(){return a("1Gimo")})),wolfram:Pv("wolfram",(function(){return a("4SyRT")})),wren:Pv("wren",(function(){return a("gaIVs")})),xeora:Pv("xeora",(function(){return a("lagad")})),xmlDoc:Pv("xmlDoc",(function(){return a("9DNYE")})),xojo:Pv("xojo",(function(){return a("ksF4f")})),xquery:Pv("xquery",(function(){return a("gXxHJ")})),yaml:Pv("yaml",(function(){return a("6rk3j")})),yang:Pv("yang",(function(){return a("kTyrQ")})),zig:Pv("zig",(function(){return a("d3mFC")}))},Lv=(Cv=(Ev={loader:function(){return a("bB2YF").then((function(e){return e.default||e}))},isLanguageRegistered:function(e,t){return e.registered(t)},languageLoaders:Nv,registerLanguage:function(e,t,n){return e.register(n)}}).loader,kv=Ev.isLanguageRegistered,Tv=Ev.registerLanguage,Iv=Ev.languageLoaders,Ov=Ev.noAsyncLoadingLanguages,Rv=function(e){r(Ug)(i,e);var t,n=Av(i);function i(){return r(Pg)(this,i),n.apply(this,arguments)}return r(Ng)(i,[{key:"componentDidUpdate",value:function(){!i.isRegistered(this.props.language)&&Iv&&this.loadLanguage()}},{key:"componentDidMount",value:function(){var e=this;i.astGeneratorPromise||i.loadAstGenerator(),i.astGenerator||i.astGeneratorPromise.then((function(){e.forceUpdate()})),!i.isRegistered(this.props.language)&&Iv&&this.loadLanguage()}},{key:"loadLanguage",value:function(){var e=this,t=this.props.language;"text"!==t&&i.loadLanguage(t).then((function(){return e.forceUpdate()})).catch((function(){}))}},{key:"normalizeLanguage",value:function(e){return i.isSupportedLanguage(e)?e:"text"}},{key:"render",value:function(){return r(u).createElement(i.highlightInstance,r(Og)({},this.props,{language:this.normalizeLanguage(this.props.language),astGenerator:i.astGenerator}))}}],[{key:"preload",value:function(){return i.loadAstGenerator()}},{key:"loadLanguage",value:(t=r(Tg)(r(Jg).mark((function e(t){var n;return r(Jg).wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof(n=Iv[t])){e.next=5;break}return e.abrupt("return",n(i.registerLanguage));case 5:throw new Error("Language ".concat(t," not supported"));case 6:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"isSupportedLanguage",value:function(e){return i.isRegistered(e)||"function"==typeof Iv[e]}},{key:"loadAstGenerator",value:function(){return i.astGeneratorPromise=Cv().then((function(e){i.astGenerator=e,Tv&&i.languages.forEach((function(t,n){return Tv(e,n,t)}))})),i.astGeneratorPromise}}]),i}(r(u).PureComponent),r(Yg)(Rv,"astGenerator",null),r(Yg)(Rv,"highlightInstance",_v(null,{})),r(Yg)(Rv,"astGeneratorPromise",null),r(Yg)(Rv,"languages",new Map),r(Yg)(Rv,"supportedLanguages",Ev.supportedLanguages||Object.keys(Iv||{})),r(Yg)(Rv,"isRegistered",(function(e){if(Ov)return!0;if(!Tv)throw new Error("Current syntax highlighter doesn't support registration of languages");return Rv.astGenerator?kv(Rv.astGenerator,e):Rv.languages.has(e)})),r(Yg)(Rv,"registerLanguage",(function(e,t){if(!Tv)throw new Error("Current syntax highlighter doesn't support registration of languages");if(Rv.astGenerator)return Tv(Rv.astGenerator,e,t);Rv.languages.set(e,t)})),Rv),Dv={},Bv={};(Bv=function(e){return e&&e.__esModule?e:{default:e}}).__esModule=!0,Bv.default=Bv,Object.defineProperty(Dv,"__esModule",{value:!0}),Object.defineProperty(Dv,"a11yDark",{enumerable:!0,get:function(){return qv.default}}),Object.defineProperty(Dv,"atomDark",{enumerable:!0,get:function(){return Kv.default}}),Object.defineProperty(Dv,"base16AteliersulphurpoolLight",{enumerable:!0,get:function(){return Yv.default}}),Object.defineProperty(Dv,"cb",{enumerable:!0,get:function(){return Jv.default}}),Object.defineProperty(Dv,"coldarkCold",{enumerable:!0,get:function(){return Qv.default}}),Object.defineProperty(Dv,"coldarkDark",{enumerable:!0,get:function(){return Xv.default}}),Object.defineProperty(Dv,"coy",{enumerable:!0,get:function(){return jv.default}}),Object.defineProperty(Dv,"coyWithoutShadows",{enumerable:!0,get:function(){return Zv.default}}),Object.defineProperty(Dv,"darcula",{enumerable:!0,get:function(){return $v.default}}),Object.defineProperty(Dv,"dark",{enumerable:!0,get:function(){return Fv.default}}),Object.defineProperty(Dv,"dracula",{enumerable:!0,get:function(){return ey.default}}),Object.defineProperty(Dv,"duotoneDark",{enumerable:!0,get:function(){return ty.default}}),Object.defineProperty(Dv,"duotoneEarth",{enumerable:!0,get:function(){return ny.default}}),Object.defineProperty(Dv,"duotoneForest",{enumerable:!0,get:function(){return ry.default}}),Object.defineProperty(Dv,"duotoneLight",{enumerable:!0,get:function(){return iy.default}}),Object.defineProperty(Dv,"duotoneSea",{enumerable:!0,get:function(){return oy.default}}),Object.defineProperty(Dv,"duotoneSpace",{enumerable:!0,get:function(){return ay.default}}),Object.defineProperty(Dv,"funky",{enumerable:!0,get:function(){return Uv.default}}),Object.defineProperty(Dv,"ghcolors",{enumerable:!0,get:function(){return sy.default}}),Object.defineProperty(Dv,"gruvboxDark",{enumerable:!0,get:function(){return ly.default}}),Object.defineProperty(Dv,"gruvboxLight",{enumerable:!0,get:function(){return cy.default}}),Object.defineProperty(Dv,"holiTheme",{enumerable:!0,get:function(){return uy.default}}),Object.defineProperty(Dv,"hopscotch",{enumerable:!0,get:function(){return dy.default}}),Object.defineProperty(Dv,"lucario",{enumerable:!0,get:function(){return fy.default}}),Object.defineProperty(Dv,"materialDark",{enumerable:!0,get:function(){return hy.default}}),Object.defineProperty(Dv,"materialLight",{enumerable:!0,get:function(){return py.default}}),Object.defineProperty(Dv,"materialOceanic",{enumerable:!0,get:function(){return my.default}}),Object.defineProperty(Dv,"nightOwl",{enumerable:!0,get:function(){return gy.default}}),Object.defineProperty(Dv,"nord",{enumerable:!0,get:function(){return vy.default}}),Object.defineProperty(Dv,"okaidia",{enumerable:!0,get:function(){return zv.default}}),Object.defineProperty(Dv,"oneDark",{enumerable:!0,get:function(){return yy.default}}),Object.defineProperty(Dv,"oneLight",{enumerable:!0,get:function(){return by.default}}),Object.defineProperty(Dv,"pojoaque",{enumerable:!0,get:function(){return wy.default}}),Object.defineProperty(Dv,"prism",{enumerable:!0,get:function(){return Gv.default}}),Object.defineProperty(Dv,"shadesOfPurple",{enumerable:!0,get:function(){return xy.default}}),Object.defineProperty(Dv,"solarizedDarkAtom",{enumerable:!0,get:function(){return Sy.default}}),Object.defineProperty(Dv,"solarizedlight",{enumerable:!0,get:function(){return Hv.default}}),Object.defineProperty(Dv,"synthwave84",{enumerable:!0,get:function(){return My.default}}),Object.defineProperty(Dv,"tomorrow",{enumerable:!0,get:function(){return Vv.default}}),Object.defineProperty(Dv,"twilight",{enumerable:!0,get:function(){return Wv.default}}),Object.defineProperty(Dv,"vs",{enumerable:!0,get:function(){return _y.default}}),Object.defineProperty(Dv,"vscDarkPlus",{enumerable:!0,get:function(){return Ay.default}}),Object.defineProperty(Dv,"xonokai",{enumerable:!0,get:function(){return Ey.default}}),Object.defineProperty(Dv,"zTouch",{enumerable:!0,get:function(){return Cy.default}});var jv=Bv(a("jcF8U")),Fv=Bv(a("3Tppx")),Uv=Bv(a("dBuK7")),zv=Bv(a("eEjWK")),Hv=Bv(a("awG2g")),Vv=Bv(a("2oFzQ")),Wv=Bv(a("4Au6Q")),Gv=Bv(a("dAPqs")),qv=Bv(a("8eAql")),Kv=Bv(a("cv2QE")),Yv=Bv(a("h5I9g")),Jv=Bv(a("i4C5w")),Qv=Bv(a("3kFKo")),Xv=Bv(a("17zK0")),Zv=Bv(a("5Avqr")),$v=Bv(a("1jHMv")),ey=Bv(a("7Q8CE")),ty=Bv(a("jKUos")),ny=Bv(a("Uzm4J")),ry=Bv(a("7yfkN")),iy=Bv(a("lT2l1")),oy=Bv(a("fZ9um")),ay=Bv(a("1MoQL")),sy=Bv(a("4uys7")),ly=Bv(a("kaYsk")),cy=Bv(a("kN6Vu")),uy=Bv(a("2Z6pG")),dy=Bv(a("4jQJK")),fy=Bv(a("bpXw0")),hy=Bv(a("i4S8s")),py=Bv(a("5bNr4")),my=Bv(a("5ZYWT")),gy=Bv(a("ihJCU")),vy=Bv(a("8iIbg")),yy=Bv(a("424u7")),by=Bv(a("jPiNI")),wy=Bv(a("OHVOA")),xy=Bv(a("2OKTL")),Sy=Bv(a("2Mg8H")),My=Bv(a("9Kud0")),_y=Bv(a("eCrmR")),Ay=Bv(a("8UhcQ")),Ey=Bv(a("dtU9z")),Cy=Bv(a("4xtLO")),ky={};Object.defineProperty(ky,"__esModule",{value:!0}),ky.default=void 0;var Ty=Bv(a("7cTnl")).default;ky.default=Ty;var Iy={};Object.defineProperty(Iy,"__esModule",{value:!0}),Iy.default=void 0;var Oy=Bv(a("l1Rj1")).default;Iy.default=Oy;var Ry={};Object.defineProperty(Ry,"__esModule",{value:!0}),Ry.default=void 0;var Py=Bv(a("fU6a0")).default;Ry.default=Py;var Ny={};Object.defineProperty(Ny,"__esModule",{value:!0}),Ny.default=void 0;var Ly=Bv(a("3aDLI")).default;Ny.default=Ly;var Dy={};Object.defineProperty(Dy,"__esModule",{value:!0}),Dy.default=void 0;var By=Bv(a("kiy5M")).default;Dy.default=By;var jy={};Object.defineProperty(jy,"__esModule",{value:!0}),jy.default=void 0;var Fy=Bv(a("lR39A")).default;jy.default=Fy;var Uy={};Object.defineProperty(Uy,"__esModule",{value:!0}),Uy.default=void 0;var zy=Bv(a("5li5P")).default;Uy.default=zy;var Hy={};Object.defineProperty(Hy,"__esModule",{value:!0}),Hy.default=void 0;var Vy=Bv(a("ch1PX")).default;Hy.default=Vy;var Wy={};Object.defineProperty(Wy,"__esModule",{value:!0}),Wy.default=void 0;var Gy=Bv(a("bnDV9")).default;Wy.default=Gy,Lv.registerLanguage("tsx",r(ky)),Lv.registerLanguage("json",r(Iy)),Lv.registerLanguage("scss",r(Ry)),Lv.registerLanguage("bash",r(Ny)),Lv.registerLanguage("python",r(Dy)),Lv.registerLanguage("cpp",r(jy)),Lv.registerLanguage("php",r(Uy)),Lv.registerLanguage("ruby",r(Hy)),Lv.registerLanguage("sql",r(Wy));var qy=({medium:e,className:t,preview:n=!1})=>{var r,i,o,a;const{t:l}=Ce();return(0,s.jsxs)("div",{className:"memori-snippet",children:[(0,s.jsxs)("div",{className:"memori-snippet--content",children:[(0,s.jsx)(Lv,{"aria-labelledby":`#snippet-${e.mediumID}`,className:t,style:Dv.atomDark,showLineNumbers:!0,language:null!==(i=null===(r=Eg.find((t=>e.mimeType===t.mimeType)))||void 0===r?void 0:r.lang)&&void 0!==i?i:"text",children:(null===(o=e.content)||void 0===o?void 0:o.length)&&e.content.length>200&&n?`${e.content.slice(0,200)}\n...`:`${e.content}`}),(0,s.jsx)(Qd,{padded:!1,ghost:!0,className:"memori-snippet--copy-button",title:l("copy")||"Copy",icon:(0,s.jsx)(kg,{}),onClick:()=>{var t;return navigator.clipboard.writeText(null!==(t=e.content)&&void 0!==t?t:"")}})]}),!!(null===(a=e.title)||void 0===a?void 0:a.length)&&(0,s.jsx)("p",{id:`snippet-${e.mediumID}`,className:"memori-snippet--caption",children:e.title})]})};var Ky=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z"})});var Yy=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z"})});var Jy=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494zM514.1 580.1l-61.8-102.4c-2.2-3.6-6.1-5.8-10.3-5.8h-38.4c-2.3 0-4.5.6-6.4 1.9-5.6 3.5-7.3 10.9-3.7 16.6l82.3 130.4-83.4 132.8a12.04 12.04 0 0 0 10.2 18.4h34.5c4.2 0 8-2.2 10.2-5.7L510 664.8l62.3 101.4c2.2 3.6 6.1 5.7 10.2 5.7H620c2.3 0 4.5-.7 6.5-1.9 5.6-3.6 7.2-11 3.6-16.6l-84-130.4 85.3-132.5a12.04 12.04 0 0 0-10.1-18.5h-35.7c-4.2 0-8.1 2.2-10.3 5.8l-61.2 102.3z"})});var Qy=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494zM528.1 472h-32.2c-5.5 0-10.3 3.7-11.6 9.1L434.6 680l-46.1-198.7c-1.3-5.4-6.1-9.3-11.7-9.3h-35.4a12.02 12.02 0 0 0-11.6 15.1l74.2 276c1.4 5.2 6.2 8.9 11.6 8.9h32c5.4 0 10.2-3.6 11.6-8.9l52.8-197 52.8 197c1.4 5.2 6.2 8.9 11.6 8.9h31.8c5.4 0 10.2-3.6 11.6-8.9l74.4-276a12.04 12.04 0 0 0-11.6-15.1H647c-5.6 0-10.4 3.9-11.7 9.3l-45.8 199.1-49.8-199.3c-1.3-5.4-6.1-9.1-11.6-9.1z"})});const Xy=({isChild:e=!1,item:t,sessionID:n,tenantID:r,preview:i=!1,baseURL:o,apiURL:a,onClick:l,customMediaRenderer:c})=>{const u=jm({resourceURI:t.url,sessionID:n,tenantID:r,baseURL:o,apiURL:a}),d=null==c?void 0:c(t.mimeType);if(d)return d;switch(t.mimeType){case"image/jpeg":case"image/png":case"image/jpg":case"image/gif":return(0,s.jsx)("a",{className:"memori-media-item--link",href:u,onClick:n=>{e&&n.preventDefault(),l&&(n.preventDefault(),l(t.mediumID))},target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(yg,{hoverable:!0,className:"memori-media-item--card memori-media-item--image",cover:(0,s.jsxs)("picture",{className:"memori-media-item--figure",children:[!i&&(0,s.jsx)("source",{srcSet:[u,t.url,t.content].join(", "),type:t.mimeType}),(0,s.jsx)("img",{alt:t.title,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=="}),t.title&&(0,s.jsx)("figcaption",{className:"memori-media-item--figure-caption",children:t.title})]})})});case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return(0,s.jsx)("a",{className:"memori-media-item--link",href:u,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(yg,{hoverable:!0,cover:(0,s.jsx)(Qy,{className:"memori-media-item--icon"}),title:t.title})});case"application/vnd.ms-excel":case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return(0,s.jsx)("a",{className:"memori-media-item--link",href:u,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(yg,{hoverable:!0,cover:(0,s.jsx)(Jy,{className:"memori-media-item--icon"}),title:t.title})});case"application/pdf":return(0,s.jsx)("a",{className:"memori-media-item--link",href:u,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(yg,{hoverable:!0,cover:(0,s.jsx)(Yy,{className:"memori-media-item--icon"}),title:t.title})});case"video/mp4":case"video/avi":case"video/mpeg":return(0,s.jsx)("a",{className:"memori-media-item--link",href:u,onClick:n=>{e&&n.preventDefault(),l&&(n.preventDefault(),l(t.mediumID))},target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(yg,{hoverable:!0,cover:(0,s.jsx)("video",{style:{width:"100%",height:"100%"},controls:!0,src:u,title:t.title}),title:t.title})});case"audio/mpeg3":case"audio/wav":case"audio/mpeg":return(0,s.jsx)("a",{className:"memori-media-item--link",href:u,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(yg,{hoverable:!0,cover:(0,s.jsx)("audio",{style:{width:"100%",height:"100%"},controls:!0,src:u}),title:t.title})});case"model/gltf-binary":return(0,s.jsx)(Cg,{src:u,alt:"",poster:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=="});default:return(0,s.jsx)("a",{className:"memori-media-item--link",href:u,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(yg,{hoverable:!0,cover:(0,s.jsx)(Ky,{className:"memori-media-item--icon"}),title:t.title})})}};var Zy=(0,u.memo)((({items:e,sessionID:t,tenantID:n,translateTo:r,baseURL:i,apiURL:o,customMediaRenderer:a})=>{const[l,c]=(0,u.useState)(e),[d,f]=(0,u.useState)(),h=(0,u.useCallback)((async()=>{if(!r)return;const t=await Promise.all((null!=e?e:[]).map((async e=>{var t;if(!e.title)return e;try{const n=await Sg(e.title,r);return{...e,title:null!==(t=n.text)&&void 0!==t?t:e.title}}catch(t){return console.error(t),e}})));c(t)}),[r,e]);return(0,u.useEffect)((()=>{r&&h()}),[r,h]),(0,s.jsxs)(Kf,{appear:!0,show:!0,as:"div",className:"memori-media-items",children:[(0,s.jsx)("div",{className:"memori-media-items--grid",children:l.filter((e=>{var t;return!(null===(t=e.properties)||void 0===t?void 0:t.executable)&&!Eg.map((e=>e.mimeType)).includes(e.mimeType)})).sort(((e,t)=>e.creationTimestamp>t.creationTimestamp?1:e.creationTimestamp<t.creationTimestamp?-1:0)).map(((e,r)=>(0,s.jsx)(Kf.Child,{as:"div",className:"memori-media-item",enter:"ease-out duration-500 delay-"+100*r,enterFrom:"opacity-0 scale-95",enterTo:"opacity-1 scale-100",leave:"ease-in duration-300",leaveFrom:"opacity-1 scale-100",leaveTo:"opacity-0 scale-95",children:(0,s.jsx)(Xy,{isChild:!0,sessionID:t,tenantID:n,baseURL:i,apiURL:o,onClick:e=>{f(l.find((t=>t.mediumID===e)))},item:{...e,title:e.title,url:e.url,content:e.content},customMediaRenderer:a})},e.url+"&index="+r)))}),l.filter((e=>{var t;return!(null===(t=e.properties)||void 0===t?void 0:t.executable)&&Eg.map((e=>e.mimeType)).includes(e.mimeType)})).map((e=>(0,s.jsx)(Kf.Child,{as:"div",className:"memori-media-item--snippet",enter:"ease-out duration-500",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-1 translate-y-0",leave:"ease-in duration-300",leaveFrom:"opacity-1",leaveTo:"opacity-0",children:(0,s.jsx)(qy,{medium:e},e.mediumID)},e.mediumID))),l.filter((e=>{var t;return"text/css"===e.mimeType&&!!(null===(t=e.properties)||void 0===t?void 0:t.executable)})).map((e=>(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:e.content||""}},e.mediumID))),(null==d?void 0:d.mediumID)&&(0,s.jsx)(dp,{width:"100%",widthMd:"100%",className:"memori-media-item--modal",open:!!d,onClose:()=>f(void 0),footer:null,children:(0,s.jsx)(Xy,{isChild:!0,sessionID:t,tenantID:n,baseURL:i,apiURL:o,item:{...d,title:d.title,url:d.url,content:d.content},customMediaRenderer:a})})]})}));Kd=a("4IUwl");var $y=(0,u.memo)((({hints:e=[],links:t=[],media:n=[],simulateUserPrompt:i=(()=>{}),sessionID:o,baseUrl:a,apiUrl:l,translateTo:c,customMediaRenderer:d})=>{const{t:f}=Ce(),[h,p]=(0,u.useState)(!0),[m,g]=(0,u.useState)(6);return(0,u.useEffect)((()=>{p(!0)}),[e]),(0,s.jsxs)("div",{className:"memori-media-widget",children:[(null==n?void 0:n.length)>0&&(0,s.jsx)(Zy,{items:n,sessionID:o,translateTo:c,baseURL:a,apiURL:l,customMediaRenderer:d}),(null==t?void 0:t.length)>0&&(0,s.jsx)(wg,{items:t,baseUrl:a}),(null==e?void 0:e.length)>0&&h&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Kf,{appear:!0,show:!0,as:"ul",className:"memori-media--hints",children:e.slice(0,m).map(((e,t)=>(0,s.jsx)(Kf.Child,{as:"li",enter:"ease-out duration-500",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-1 translate-y-0",leave:"ease-in duration-300",leaveFrom:"opacity-1",leaveTo:"opacity-0",children:(0,s.jsx)(Qd,{className:r(Kd)("memori-media--hint"),primary:!0,onClick:()=>{i(e.originalText,e.text),p(!1)},onTouchEnd:()=>{i(e.originalText,e.text),p(!1)},children:e.text},e.text+t)},e.text+t)))}),e.length>m&&(0,s.jsx)("div",{className:"memori-hints--show-more",children:(0,s.jsx)(Qd,{className:"memori-hints--show-more-button",id:"showMoreHints",onClick:()=>g(m+6),children:f("expand")||"Expand"})})]})]})}));Kd=a("4IUwl");var eb=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 1 0 0-176 88 88 0 0 0 0 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z"})});var tb=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0 0 12.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0 0 12.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 0 0 174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"})});var nb=({attachmentsMenuOpen:e,setAttachmentsMenuOpen:t,disabled:n=!1,authToken:i})=>(0,s.jsxs)(lg,{as:"div",className:"memori-upload-menu",children:[(0,s.jsx)(lg.Button,{disabled:n,className:r(Kd)("memori-button","memori-button--circle","memori-button--icon-only","memori-share-button--button","memori--conversation-button"),children:(0,s.jsx)("div",{className:"memori-button--icon",children:(0,s.jsx)(tb,{})})}),(0,s.jsxs)(lg.Items,{as:"ul",className:"memori-menu--overlay",children:[(0,s.jsx)(lg.Item,{as:"li",className:"memori-menu--li",children:(0,s.jsx)(Qd,{className:"memori-menu--button",ghost:!0,icon:(0,s.jsx)(gg,{}),outlined:"link"===e,onClick:()=>t("link"),children:"Link"})}),!!(null==i?void 0:i.length)&&(0,s.jsx)(lg.Item,{children:(0,s.jsx)(Qd,{className:"memori-menu--button",ghost:!0,icon:(0,s.jsx)(eb,{}),outlined:"media"===e,onClick:()=>t("media"),children:"Media"})})]})]});u=a("85Hg2"),u=a("85Hg2");function rb(e=0){let[t,n]=(0,u.useState)(e),r=(0,u.useCallback)((e=>n((t=>t|e))),[t]),i=(0,u.useCallback)((e=>Boolean(t&e)),[t]),o=(0,u.useCallback)((e=>n((t=>t&~e))),[n]),a=(0,u.useCallback)((e=>n((t=>t^e))),[n]);return{addFlag:r,hasFlag:i,removeFlag:o,toggleFlag:a}}let ib=(0,(u=a("85Hg2")).createContext)(null);function ob(){let e=(0,u.useContext)(ib);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,ob),e}return e}function ab(){let[e,t]=(0,u.useState)([]);return[e.length>0?e.join(" "):void 0,(0,u.useMemo)((()=>function(e){let n=bf((e=>(t((t=>[...t,e])),()=>t((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),i=(0,u.useMemo)((()=>({register:n,slot:e.slot,name:e.name,props:e.props})),[n,e.slot,e.name,e.props]);return r(u).createElement(ib.Provider,{value:i},e.children)}),[t])]}let sb=af((function(e,t){let{passive:n=!1,...r}=e,i=ob(),o=`headlessui-label-${eh()}`,a=Sf(t);pf((()=>i.register(o)),[o,i.register]);let s={ref:a,...i.props,id:o};return n&&("onClick"in s&&delete s.onClick,"onClick"in r&&delete r.onClick),nf({ourProps:s,theirProps:r,slot:i.slot||{},defaultTag:"label",name:i.name||"Label"})}));function lb(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))ub(n,cb(t,r),i);return n}function cb(e,t){return e?e+"["+t+"]":t}function ub(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())ub(e,cb(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):"boolean"==typeof n?e.push([t,n?"1":"0"]):"string"==typeof n?e.push([t,n]):"number"==typeof n?e.push([t,`${n}`]):null==n?e.push([t,""]):lb(n,t,e)}function db(e){var t;let n=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(n)for(let e of n.elements)if("INPUT"===e.tagName&&"submit"===e.type||"BUTTON"===e.tagName&&"submit"===e.type||"INPUT"===e.nodeName&&"image"===e.type)return void e.click()}u=a("85Hg2");function fb(e,t,n){let[r,i]=(0,u.useState)(n),o=void 0!==e,a=(0,u.useRef)(o),s=(0,u.useRef)(!1),l=(0,u.useRef)(!1);return!o||a.current||s.current?!o&&a.current&&!l.current&&(l.current=!0,a.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(s.current=!0,a.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[o?e:r,bf((e=>(o||i(e),null==t?void 0:t(e))))]}var hb,pb=((hb=pb||{})[hb.RegisterOption=0]="RegisterOption",hb[hb.UnregisterOption=1]="UnregisterOption",hb);let mb={0(e,t){let n=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:mh(n,(e=>e.element.current))}},1(e,t){let n=e.options.slice(),r=e.options.findIndex((e=>e.id===t.id));return-1===r?e:(n.splice(r,1),{...e,options:n})}},gb=(0,u.createContext)(null);function vb(e){let t=(0,u.useContext)(gb);if(null===t){let t=new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,vb),t}return t}function yb(e,t){return Xd(t.type,mb,e,t)}gb.displayName="RadioGroupContext";let bb=af((function(e,t){let{value:n,defaultValue:i,name:o,onChange:a,by:s=((e,t)=>e===t),disabled:l=!1,...c}=e,d=bf("string"==typeof s?(e,t)=>{let n=s;return(null==e?void 0:e[n])===(null==t?void 0:t[n])}:s),[f,h]=(0,u.useReducer)(yb,{options:[]}),p=f.options,[m,g]=ab(),[v,y]=Hh(),b=`headlessui-radiogroup-${eh()}`,w=(0,u.useRef)(null),x=Sf(w,t),[S,M]=fb(n,a,i),_=(0,u.useMemo)((()=>p.find((e=>!e.propsRef.current.disabled))),[p]),A=(0,u.useMemo)((()=>p.some((e=>d(e.propsRef.current.value,S)))),[p,S]),E=bf((e=>{var t;if(l||d(e,S))return!1;let n=null==(t=p.find((t=>d(t.propsRef.current.value,e))))?void 0:t.propsRef.current;return(null==n||!n.disabled)&&(null==M||M(e),!0)}));Wm({container:w.current,accept:e=>"radio"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let C=bf((e=>{let t=w.current;if(!t)return;let n=rh(t),r=p.filter((e=>!1===e.propsRef.current.disabled)).map((e=>e.element.current));switch(e.key){case Jf.Enter:db(e.currentTarget);break;case Jf.ArrowLeft:case Jf.ArrowUp:if(e.preventDefault(),e.stopPropagation(),vh(r,ah.Previous|ah.WrapAround)===sh.Success){let e=p.find((e=>e.element.current===(null==n?void 0:n.activeElement)));e&&E(e.propsRef.current.value)}break;case Jf.ArrowRight:case Jf.ArrowDown:if(e.preventDefault(),e.stopPropagation(),vh(r,ah.Next|ah.WrapAround)===sh.Success){let e=p.find((e=>e.element.current===(null==n?void 0:n.activeElement)));e&&E(e.propsRef.current.value)}break;case Jf.Space:{e.preventDefault(),e.stopPropagation();let t=p.find((e=>e.element.current===(null==n?void 0:n.activeElement)));t&&E(t.propsRef.current.value)}}})),k=bf((e=>(h({type:0,...e}),()=>h({type:1,id:e.id})))),T=(0,u.useMemo)((()=>({registerOption:k,firstOption:_,containsCheckedOption:A,change:E,disabled:l,value:S,compare:d})),[k,_,A,E,l,S,d]),I={ref:x,id:b,role:"radiogroup","aria-labelledby":m,"aria-describedby":v,onKeyDown:C},O=(0,u.useMemo)((()=>({value:S})),[S]);return r(u).createElement(y,{name:"RadioGroup.Description"},r(u).createElement(g,{name:"RadioGroup.Label"},r(u).createElement(gb.Provider,{value:T},null!=o&&null!=S&&lb({[o]:S}).map((([e,t])=>r(u).createElement(nh,{features:th.Hidden,...sf({key:e,as:"input",type:"radio",checked:null!=t,hidden:!0,readOnly:!0,name:e,value:t})}))),nf({ourProps:I,theirProps:c,slot:O,defaultTag:"div",name:"RadioGroup"}))))}));var wb=(e=>(e[e.Empty=1]="Empty",e[e.Active=2]="Active",e))(wb||{});let xb=af((function(e,t){let n=(0,u.useRef)(null),i=Sf(n,t),o=`headlessui-radiogroup-option-${eh()}`,[a,s]=ab(),[l,c]=Hh(),{addFlag:d,removeFlag:f,hasFlag:h}=rb(1),{value:p,disabled:m=!1,...g}=e,v=(0,u.useRef)({value:p,disabled:m});pf((()=>{v.current.value=p}),[p,v]),pf((()=>{v.current.disabled=m}),[m,v]);let{registerOption:y,disabled:b,change:w,firstOption:x,containsCheckedOption:S,value:M,compare:_}=vb("RadioGroup.Option");pf((()=>y({id:o,element:n,propsRef:v})),[o,y,n,e]);let A=bf((e=>{var t;if(Qf(e.currentTarget))return e.preventDefault();!w(p)||(d(2),null==(t=n.current)||t.focus())})),E=bf((e=>{if(Qf(e.currentTarget))return e.preventDefault();d(2)})),C=bf((()=>f(2))),k=(null==x?void 0:x.id)===o,T=b||m,I=_(M,p),O={ref:i,id:o,role:"radio","aria-checked":I?"true":"false","aria-labelledby":a,"aria-describedby":l,"aria-disabled":!!T||void 0,tabIndex:T?-1:I||!S&&k?0:-1,onClick:T?void 0:A,onFocus:T?void 0:E,onBlur:T?void 0:C},R=(0,u.useMemo)((()=>({checked:I,disabled:T,active:h(2)})),[I,T,h]);return r(u).createElement(c,{name:"RadioGroup.Description"},r(u).createElement(s,{name:"RadioGroup.Label"},nf({ourProps:O,theirProps:g,slot:R,defaultTag:"div",name:"RadioGroup.Option"})))})),Sb=Object.assign(bb,{Option:xb,Label:sb,Description:Vh});Kd=a("4IUwl");var Mb=({sendOnEnter:e,setSendOnEnter:t})=>{const{t:n}=Ce();return(0,s.jsxs)(lg,{as:"div",className:"memori-send-on-enter-menu",children:[(0,s.jsx)(lg.Button,{className:r(Kd)("memori-button","memori-button--circle","memori-button--icon-only","memori-share-button--button","memori--conversation-button"),children:(0,s.jsx)("div",{className:"memori-button--icon",children:(0,s.jsx)("span",{style:{display:"block",width:"1rem",height:"1rem"},children:"…"})})}),(0,s.jsx)(lg.Items,{className:"memori-menu--overlay",children:(0,s.jsxs)(Sb,{value:e,onChange:t,children:[(0,s.jsx)(Sb.Option,{value:"keypress",className:"memori-menu--option",children:({checked:e})=>(0,s.jsx)(lg.Item,{children:(0,s.jsx)(Qd,{className:"memori-menu--button",ghost:!0,outlined:e,icon:(0,s.jsx)("span",{className:"memori-menu--icon",children:e?"✓":""}),children:n("widget.sendOnKeypress")})})}),(0,s.jsx)(Sb.Option,{value:"click",className:"memori-menu--option",children:({checked:e})=>(0,s.jsx)(lg.Item,{children:(0,s.jsx)(Qd,{className:"memori-menu--button",ghost:!0,outlined:e,icon:(0,s.jsx)("span",{className:"memori-menu--icon",children:e?"✓":""}),children:n("widget.sendOnClick")})})})]})})]})};u=a("85Hg2"),Kd=a("4IUwl");var _b=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 0 0 0 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0 0 13.5-4.7L863.9 169a7.9 7.9 0 0 0-8.9-8.9zM416.6 562.3a8.03 8.03 0 0 0-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 0 0-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z"})});var Ab=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 0 0-11.3 0l-42.4 42.3a8.03 8.03 0 0 0 0 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 0 0 4.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 0 0 0 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 0 0 391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 0 0-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 0 0-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 0 0-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z"})});var Eb=({disabled:e=!1,value:t,onChange:n,onPressEnter:i,onFocus:o,onBlur:a})=>{const{t:l}=Ce(),[c,d]=(0,u.useState)(!1);return(0,s.jsx)("div",{"data-testid":"chat-textarea",className:r(Kd)("memori-chat-textarea",{"memori-chat-textarea--expanded":c,"memori-chat-textarea--disabled":e}),children:(0,s.jsxs)("div",{className:"memori-chat-textarea--inner",children:[(0,s.jsx)("textarea",{className:"memori-chat-textarea--input",disabled:e,value:t,onChange:e=>{n(e.target.value)},onKeyDownCapture:e=>{"Enter"===e.key&&!e.shiftKey&&i&&i(e)},onFocus:o,onBlur:a}),(0,s.jsx)("div",{className:"memori-chat-textarea--expand",children:(0,s.jsx)(Qd,{className:r(Kd)("memori-chat-textarea--expand-button"),onClick:()=>d(!c),padded:!1,ghost:!0,title:c?l("collapse")||"Collapse":l("expand")||"Expand",icon:c?(0,s.jsx)(Ab,{}):(0,s.jsx)(_b,{})})})]})})};var Cb=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2-8.5 2.1-13.8 10.7-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"})});u=a("85Hg2");var kb=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"})});Kd=a("4IUwl");var Tb=({listening:e,stopAudio:t,startListening:n,stopListening:i})=>{const{t:o}=Ce(),[a,l]=(0,u.useState)(),c=(0,u.useRef)(null),d=e=>{e.preventDefault(),l(o("write_and_speak.holdToSpeak")||"Hold to record"),c.current||(c.current=setTimeout((()=>{t(),l(o("write_and_speak.releaseToEndListening")||"Release to end listening"),n()}),300))},f=()=>{c.current&&(clearTimeout(c.current),c.current=null),i(),l(void 0)};return(0,u.useEffect)((()=>()=>f()),[]),(0,s.jsx)(zm,{visible:!!a,content:(0,s.jsx)("span",{children:a||o("write_and_speak.pressAndHoldToSpeak")||"Press and hold to speak"}),align:"topLeft",className:"memori-mic-btn-tooltip",children:(0,s.jsx)(Qd,{primary:!0,className:r(Kd)("memori-chat-inputs--mic",{"memori-chat-inputs--mic--listening":e}),title:e?o("write_and_speak.micButtonPopoverListening")||"Listening":o("write_and_speak.micButtonPopover")||"Start listening",onMouseDown:d,onTouchStart:d,onMouseUp:f,onMouseLeave:f,onTouchEnd:f,shape:"circle",icon:(0,s.jsx)(kb,{})})})};Kd=a("4IUwl");var Ib=({dialogState:e,instruct:t=!1,sendOnEnter:n="click",setSendOnEnter:i,attachmentsMenuOpen:o,setAttachmentsMenuOpen:a,userMessage:l="",onChangeUserMessage:c,sendMessage:u,onTextareaFocus:d,onTextareaBlur:f,onTextareaPressEnter:h,showMicrophone:p=!1,microphoneMode:m="HOLD_TO_TALK",listening:g=!1,stopAudio:v,startListening:y,stopListening:b,authToken:w})=>{const{t:x}=Ce();return(0,s.jsxs)("fieldset",{id:"chat-fieldset",className:"memori-chat-inputs",disabled:"X2a"===(null==e?void 0:e.state)||"X3"===(null==e?void 0:e.state),children:[(t||(null==e?void 0:e.acceptsMedia))&&(0,s.jsx)(nb,{attachmentsMenuOpen:o,setAttachmentsMenuOpen:a,authToken:w,disabled:!(null==e?void 0:e.acceptsMedia)}),(0,s.jsx)(Mb,{sendOnEnter:n,setSendOnEnter:i}),(0,s.jsx)(Eb,{value:l,onChange:c,onPressEnter:h,onFocus:d,onBlur:f,disabled:["R2","R3","R4","R5","G3","X3"].includes((null==e?void 0:e.state)||"")}),(0,s.jsx)(Qd,{shape:"circle",primary:!!(null==l?void 0:l.length),disabled:!l||0===l.length,className:"memori-chat-inputs--send",onClick:()=>{u(l),v(),speechSynthesis.speak(new SpeechSynthesisUtterance(""))},title:x("send")||"Send",icon:(0,s.jsx)(Cb,{})}),p&&"HOLD_TO_TALK"===m&&(0,s.jsx)(Tb,{listening:g,startListening:y,stopListening:()=>{b(),(null==l?void 0:l.length)&&u(l)},stopAudio:v}),p&&"CONTINUOUS"===m&&(0,s.jsx)(Qd,{primary:!0,className:r(Kd)("memori-chat-inputs--mic",{"memori-chat-inputs--mic--listening":g}),title:g?x("write_and_speak.micButtonPopoverListening")||"Listening":x("write_and_speak.micButtonPopover")||"Start listening",onClick:()=>{g?b():(v(),y())},shape:"circle",icon:(0,s.jsx)(kb,{})})]})};u=a("85Hg2");const Ob=" ",Rb={en:["Generating an accurate and fancy response...","Generating a response that will blow your mind...","Generating a response that will make you smile...","Thinking of a response...","Thinking of a response that will make you smile...","Gathering my thoughts...","Gathering my thoughts to give you a response..."],it:["Sto generando una risposta accurata e fantasiosa...","Sto generando una risposta che ti farà impazzire...","Sto generando una risposta che ti farà sorridere...","Sto pensando ad una risposta...","Sto pensando ad una risposta che ti farà sorridere...","Sto raccogliendo i miei pensieri...","Sto raccogliendo i miei pensieri per darti una risposta..."]};var Pb=({useDefaultSentences:e=!1,lang:t="en",sentence:n})=>{const[r,i]=(0,u.useState)(n?`${n.endsWith("...")?n:`${n}...`}${Ob}`:""),[o,a]=(0,u.useState)("");return(0,u.useEffect)((()=>{const s=setInterval((()=>{const s=r[o.length];void 0!==s&&r.length>0?a((e=>e+s)):!n&&e&&(a(""),i(Rb[t][Math.floor(Math.random()*Rb[t].length)]+Ob))}),50);return()=>clearInterval(s)})),(0,s.jsx)("div",{className:"memori-chat--bubble",children:(0,s.jsxs)("div",{className:"memori-chat--bubble-typing",children:[(0,s.jsxs)("div",{id:"wave",children:[(0,s.jsx)("span",{className:"dot"}),(0,s.jsx)("span",{className:"dot"}),(0,s.jsx)("span",{className:"dot"})]}),r.length>0&&(0,s.jsx)("p",{children:o})]})})};var Nb=(0,u.memo)((({memori:e,tenant:t,sessionID:n,baseUrl:i,apiUrl:o,translateTo:a,memoriTyping:l,typingText:c,showTypingText:d=!1,history:f=[],authToken:h,dialogState:p,simulateUserPrompt:m,showDates:g=!1,showContextPerLine:v=!1,showAIicon:y=!0,selectReceiverTag:b,preview:w=!1,instruct:x=!1,showInputs:S=!0,showMicrophone:M=!1,microphoneMode:_="HOLD_TO_TALK",sendOnEnter:A,setSendOnEnter:E,attachmentsMenuOpen:C,setAttachmentsMenuOpen:k,userMessage:T="",onChangeUserMessage:I,sendMessage:O,listening:R,isPlayingAudio:P,stopAudio:N,startListening:L,stopListening:D,resetTranscript:B,customMediaRenderer:j,user:F,userAvatar:U,experts:z})=>{var H,V,W,G,q;const K=()=>{setTimeout((()=>{var e,t,n;null===(e=document.querySelector(".memori-chat--content"))||void 0===e||e.scrollTo(0,null!==(n=null===(t=document.querySelector(".memori-chat--content"))||void 0===t?void 0:t.scrollHeight)&&void 0!==n?n:0)}),200)};(0,u.useEffect)((()=>{!w&&K()}),[f,w]);return(0,s.jsxs)("div",{className:r(Kd)("memori-chat--wrapper",{"memori-chat-wrapper--translate":a}),id:"chat-wrapper",lang:null==a?void 0:a.toUpperCase(),"data-memori-lang":null!==(G=null===(W=null===(V=null===(H=e.culture)||void 0===H?void 0:H.split("-"))||void 0===V?void 0:V[0])||void 0===W?void 0:W.toUpperCase())&&void 0!==G?G:"EN",children:[(0,s.jsx)("div",{className:r(Kd)("memori-chat--history",{"memori-chat--history-touch":Nm()}),children:(0,s.jsxs)("div",{className:r(Kd)("memori-chat--content",{"memori-chat--content-touch":Nm()}),children:[(0,s.jsx)("div",{className:r(Kd)("memori-chat--cover"),style:{backgroundImage:`url("${jm({type:"cover",tenantID:null==t?void 0:t.id,resourceURI:e.coverURL,baseURL:i,apiURL:o})}"), url("${jm({type:"cover",tenantID:null==t?void 0:t.id,baseURL:i||"https://app.twincreator.com",apiURL:o})}")`}}),f.map(((l,c)=>{var d,h,b,w;return(0,s.jsxs)(r(u).Fragment,{children:[(0,s.jsx)(pg,{isFirst:0===c,message:l,memori:e,tenant:t,baseUrl:i,apiUrl:o,simulateUserPrompt:m,showAIicon:y,showFeedback:c===f.length-1&&!l.fromUser&&(null==p?void 0:p.acceptsFeedback),user:F,userAvatar:U,experts:z}),g&&!!l.timestamp&&(0,s.jsx)("small",{className:"memori-chat--timestamp "+(l.fromUser?"text-right":"text-left"),children:new Intl.DateTimeFormat("it",{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(l.timestamp.endsWith("Z")?l.timestamp:`${l.timestamp}Z`))}),v&&!!Object.keys(null!==(d=l.contextVars)&&void 0!==d?d:{}).length&&(0,s.jsx)("div",{className:"memori-chat--context-vars",children:Object.keys(null!==(h=l.contextVars)&&void 0!==h?h:{}).map((e=>{var t,n,r;return"-"===(null===(t=l.contextVars)||void 0===t?void 0:t[e])?(0,s.jsx)("div",{className:"memori-chat--context-tag memori-chat--context-tag-canceled",children:(0,s.jsx)("span",{className:"memori-chat--context-tag-text",children:e})},e):"✔️"===(null===(n=l.contextVars)||void 0===n?void 0:n[e])?(0,s.jsx)("div",{className:"memori-chat--context-tag",children:(0,s.jsx)("span",{className:"memori-chat--context-tag-text",children:e})},e):(0,s.jsx)("div",{className:"memori-chat--context-tag",children:(0,s.jsxs)("span",{className:"memori-chat--context-tag-text",children:[e,": ",null===(r=l.contextVars)||void 0===r?void 0:r[e]]})},e)}))}),(0,s.jsx)($y,{simulateUserPrompt:m,media:null===(b=null==l?void 0:l.media)||void 0===b?void 0:b.filter((e=>"text/html"!==e.mimeType&&"text/plain"!==e.mimeType)),links:null===(w=null==l?void 0:l.media)||void 0===w?void 0:w.filter((e=>"text/html"===e.mimeType)),sessionID:n,baseUrl:i,apiUrl:o,translateTo:a,customMediaRenderer:j})]},c)})),(null==p?void 0:p.hints)&&p.hints.length>0&&(0,s.jsx)($y,{simulateUserPrompt:m,hints:p.translatedHints?p.translatedHints:p.hints.map((e=>({text:e,originalText:e})))}),!!l&&(0,s.jsx)(Pb,{useDefaultSentences:d,lang:a&&"it"===a.toLowerCase()?"it":"en",sentence:c},c),(0,s.jsx)("div",{id:"end-messages-ref"})]})}),"X3"===(null==p?void 0:p.state)&&n&&(0,s.jsx)("div",{className:"memori-chat--known-tags",children:Object.keys(null!==(q=p.knownTags)&&void 0!==q?q:{}).filter((t=>t!==e.giverTag)).map((e=>{var t;return(0,s.jsx)(Qd,{icon:(0,s.jsx)("span",{className:"memori-chat--known-tag-icon",children:e}),className:"memori-chat--known-tag",onClick:()=>b(e),children:null===(t=p.knownTags)||void 0===t?void 0:t[e]},e)}))}),S&&(0,s.jsx)(Ib,{userMessage:T,onChangeUserMessage:I,dialogState:p,instruct:x,authToken:h,sendMessage:O,microphoneMode:_,sendOnEnter:A,setSendOnEnter:E,attachmentsMenuOpen:C,setAttachmentsMenuOpen:k,onTextareaPressEnter:()=>{"keypress"===A&&(null==T?void 0:T.length)>0&&(D(),O(T),I(""),B())},onTextareaFocus:()=>{var e,t,n,r;D(),Nm()&&window.innerWidth<=768&&(null===(t=null===(e=document.getElementById("chat-wrapper"))||void 0===e?void 0:e.classList)||void 0===t||t.add("chat-focused"),null===(r=null===(n=document.querySelector(".memori.memori-widget"))||void 0===n?void 0:n.classList)||void 0===r||r.add("chat-focused"),setTimeout((()=>{K()}),300))},onTextareaBlur:()=>{var e,t,n,r,i;(null===(t=null===(e=document.getElementById("chat-wrapper"))||void 0===e?void 0:e.classList)||void 0===t?void 0:t.contains("chat-focused"))&&(null===(n=document.getElementById("chat-wrapper"))||void 0===n||n.classList.remove("chat-focused"),null===(i=null===(r=document.querySelector(".memori.memori-widget"))||void 0===r?void 0:r.classList)||void 0===i||i.remove("chat-focused"),K())},startListening:L,stopListening:D,stopAudio:N,listening:R,isPlayingAudio:P,showMicrophone:M})]})}));u=a("85Hg2");var Lb=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:[(0,s.jsx)("path",{d:"M140 188h584v164h76V144c0-17.7-14.3-32-32-32H96c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h544v-76H140V188z"}),(0,s.jsx)("path",{d:"M414.3 256h-60.6c-3.4 0-6.4 2.2-7.6 5.4L219 629.4c-.3.8-.4 1.7-.4 2.6 0 4.4 3.6 8 8 8h55.1c3.4 0 6.4-2.2 7.6-5.4L322 540h196.2L422 261.4c-1.3-3.2-4.3-5.4-7.7-5.4zm12.4 228h-85.5L384 360.2 426.7 484zM936 528H800v-93c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v93H592c-13.3 0-24 10.7-24 24v176c0 13.3 10.7 24 24 24h136v152c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V752h136c13.3 0 24-10.7 24-24V552c0-13.3-10.7-24-24-24zM728 680h-88v-80h88v80zm160 0h-88v-80h88v80z"})]});var Db=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"})});var Bb=({memoriName:e,blockedUntil:t,showGiverInfo:n=!1,showTitle:r=!1,marginLeft:i=!1})=>{const{t:o}=Ce(),a=new Date(t);return a>new Date?(0,s.jsx)(zm,{className:"blocked-memori-badge--tooltip",content:(0,s.jsxs)(s.Fragment,{children:[!n&&o("memoriBlockedAnon",{name:e,date:new Intl.DateTimeFormat("it",{day:"numeric",month:"long",year:"numeric"}).format(a)}),n&&o("memoriBlockedUntil",{date:new Intl.DateTimeFormat("it",{day:"numeric",month:"long",year:"numeric"}).format(a)}),n&&` ${o("memoriBlockedReasonExceedChats")}`,n&&(0,s.jsx)("br",{}),n&&`\n${o("memoriBlockedGiverHelper")}`]}),children:(0,s.jsxs)("div",{className:"blocked-memori-badge--wrapper",children:[(0,s.jsx)("div",{className:"blocked-memori-badge "+(i?" margin-left":""),children:(0,s.jsx)(Db,{className:"blocked-memori-badge--icon"})}),r&&(0,s.jsx)("span",{className:"blocked-memori-badge--title",children:o("memoriBlockedTitle")})]})}):null};var jb=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",width:"20",height:"16",viewBox:"0 0 640 512",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M211.2 96a64 64 0 10-128 0 64 64 0 10128 0zM32 256c0 17.7 14.3 32 32 32h85.6c10.1-39.4 38.6-71.5 75.8-86.6-9.7-6-21.2-9.4-33.4-9.4H96c-35.3 0-64 28.7-64 64zm461.6 32H576c17.7 0 32-14.3 32-32 0-35.3-28.7-64-64-64h-96c-11.7 0-22.7 3.1-32.1 8.6 38.1 14.8 67.4 47.3 77.7 87.4zm-102.4-61.6c-6.9-1.6-14.2-2.4-21.6-2.4h-96c-8.5 0-16.7 1.1-24.5 3.1-30.8 8.1-55.6 31.1-66.1 60.9-3.5 10-5.5 20.8-5.5 32 0 17.7 14.3 32 32 32h224c17.7 0 32-14.3 32-32 0-11.2-1.9-22-5.5-32-10.8-30.7-36.8-54.2-68.9-61.6zM563.2 96a64 64 0 10-128 0 64 64 0 10128 0zm-241.6 96a80 80 0 100-160 80 80 0 100 160zM32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32h576c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"})});u=a("85Hg2");var Fb=({forceStatus:e,provider:t})=>{var n;const{t:r}=Ce(),[i,o]=(0,u.useState)(null!=e?e:"none"),a=(e=>{switch(e){case"DEFAULT":case"OpenAI":return{getStatus:async()=>{var e;const t=await fetch("https://status.openai.com/api/v2/summary.json");return null!==(e=(await t.json()).status.indicator)&&void 0!==e?e:"none"},statusPage:"https://status.openai.com/"};default:return{getStatus:async()=>"none",statusPage:""}}})(t);return(0,u.useEffect)((()=>{e||a.getStatus().then((e=>o(e)))}),[e,t]),"none"!==i?(0,s.jsx)(zm,{className:"memori--completion-provider-status--tooltip",align:"topLeft",content:(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{children:r("completionProviderDown",{provider:null!=t?t:r("completionProviderFallbackName")})}),!!(null===(n=a.statusPage)||void 0===n?void 0:n.length)&&(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:a.statusPage,rel:"noopener noreferrer",target:"_blank",children:r("completionProviderCheckStatusPage")})})]}),children:(0,s.jsx)(Db,{className:"memori--completion-provider-status--icon"})}):null};var Ub=({memori:e,tenant:t,gamificationLevel:n,language:r,userLang:i,setUserLang:o,baseUrl:a,apiUrl:l,position:c,openPositionDrawer:d,integrationConfig:f,instruct:h=!1,clickedStart:p,onClickStart:m,initializeTTS:g,_TEST_forceProviderStatus:v})=>{var y,b;const{t:w,i18n:x}=Ce(),[S,M]=(0,u.useState)(e.description),[_,A]=(0,u.useState)(!0);return(0,u.useEffect)((()=>{var t,n,i,o,s,l;(null!==(n=null===(t=x.language)||void 0===t?void 0:t.toUpperCase())&&void 0!==n?n:"IT")!==(null!==(i=null==r?void 0:r.toUpperCase())&&void 0!==i?i:"IT")&&(null===(o=e.description)||void 0===o?void 0:o.length)&&Sg(e.description,null!==(l=null===(s=x.language)||void 0===s?void 0:s.toUpperCase())&&void 0!==l?l:"IT",r,a).then((e=>{M(e.text)})).catch(console.error)}),[x.language,r,e.description,a]),(0,s.jsxs)("div",{className:"memori--start-panel",children:[(0,s.jsxs)("div",{className:"memori--cover",style:{backgroundImage:`url("${jm({type:"cover",tenantID:null==t?void 0:t.id,resourceURI:e.coverURL,baseURL:a,apiURL:l})}"), url("${jm({type:"cover",tenantID:null==t?void 0:t.id,baseURL:a,apiURL:l})}")`},children:[!!(null===(y=null==n?void 0:n.badge)||void 0===y?void 0:y.length)&&!e.enableBoardOfExperts&&(0,s.jsx)("div",{className:"memori--gamification-badge",children:(0,s.jsx)(zm,{align:"left",content:`${w("gamification.level")} ${n.badge}, ${n.points} ${w("gamification.points")}`,children:(0,s.jsx)("span",{"aria-label":`${w("gamification.level")} ${n.badge}, ${n.points} ${w("gamification.points")}`,children:n.badge})})}),!!e.enableCompletions&&!e.enableBoardOfExperts&&(0,s.jsx)("div",{className:"memori--completions-enabled",children:(0,s.jsx)(zm,{align:"left",content:w("completionsEnabled"),children:(0,s.jsx)("span",{"aria-label":w("completionsEnabled")||"Completions",children:(0,s.jsx)(Um,{})})})}),!!e.enableBoardOfExperts&&(0,s.jsx)("div",{className:"memori--board-of-experts",children:(0,s.jsx)(zm,{align:"left",content:w("boardOfExperts"),children:(0,s.jsx)("span",{"aria-label":w("boardOfExperts")||"Board of Experts",children:(0,s.jsx)(jb,{})})})}),!!e.nsfw&&(0,s.jsx)("div",{className:"memori--nsfw",children:(0,s.jsx)(zm,{align:"left",content:w("nsfw"),children:(0,s.jsx)("span",{title:w("nsfw")||"NSFW",children:"🔞"})})})]}),(0,s.jsxs)("picture",{className:"memori--avatar",children:[(0,s.jsx)("source",{src:null!==(b=e.avatarURL)&&void 0!==b?b:jm({type:"avatar",tenantID:null==t?void 0:t.id,resourceURI:e.avatarURL,baseURL:a,apiURL:l})}),(0,s.jsx)("img",{alt:e.name,src:e.avatarURL&&e.avatarURL.length>0?jm({type:"avatar",tenantID:null==t?void 0:t.id,resourceURI:e.avatarURL,baseURL:a,apiURL:l}):jm({type:"avatar",tenantID:null==t?void 0:t.id,baseURL:a,apiURL:l})})]}),(0,s.jsx)("h2",{className:"memori--title",children:e.name}),e.needsPosition&&!c&&(0,s.jsxs)("div",{className:"memori--needsPosition",children:[(0,s.jsx)("p",{children:w("write_and_speak.requirePosition")}),(0,s.jsx)(Qd,{primary:!0,onClick:()=>d(),className:"memori--start-button",children:w("widget.position")})]}),(e.needsPosition&&c||!e.needsPosition)&&(0,s.jsxs)("div",{className:"memori--description",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"memori--description-text",children:S&&_?S:e.description}),S!==e.description&&(0,s.jsx)(Qd,{ghost:!0,className:"memori--translation-toggle",icon:(0,s.jsx)(Lb,{}),onClick:()=>{A((e=>!e))},children:w(_?"showOriginalText":"showTranslatedText")})]}),(null==f?void 0:f.multilanguage)&&!h&&(0,s.jsxs)("div",{className:"memori--language-chooser",children:[(0,s.jsx)("label",{id:"user-lang-pref-label",htmlFor:"user-lang-pref",children:w("write_and_speak.iWantToTalkToIn",{name:e.name})}),(0,s.jsx)("select",{id:"user-lang-pref",className:"memori-select--button",value:(null!=i?i:x.language).toUpperCase(),"aria-labelledby":"user-lang-pref-label",onChange:e=>{o(e.target.value)},children:Mg.map((e=>(0,s.jsx)("option",{value:e.value,"aria-label":e.label,children:e.label},e.value)))})]}),(0,s.jsx)(Qd,{primary:!0,disabled:!!e.blockedUntil&&!e.isGiver,loading:p,onClick:e=>{try{window.speechSynthesis.speak(new SpeechSynthesisUtterance(""))}catch(e){console.error(e)}g&&g(),m&&m()},className:"memori--start-button",children:w("write_and_speak."+(h?"instructButton":"tryMeButton"))}),(0,s.jsx)(Fb,{provider:e.completionProvider,forceStatus:v}),(0,s.jsx)("p",{className:"memori--start-description",children:w(h?"write_and_speak.pageInstructExplanation":"write_and_speak.pageTryMeExplanation")}),!!e.blockedUntil&&(0,s.jsx)(Bb,{memoriName:e.name,blockedUntil:e.blockedUntil,showGiverInfo:e.isGiver,showTitle:!0,marginLeft:!0})]})]})},zb=(u=a("85Hg2"),u=a("85Hg2"),{}),Hb={};(Hb=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}).__esModule=!0,Hb.default=Hb,(zb=function(e,t){if(null==e)return{};var n,r,i=Hb(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}).__esModule=!0,zb.default=zb;u=a("85Hg2");var Vb=["forwardedRef"];function Wb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wb(Object(n),!0).forEach((function(t){r(Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class qb extends u.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){console.error("Uncaught error:",e,t)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,s.jsxs)("div",{style:{background:"rgba(255, 255, 255, 0.4)",color:"#000",padding:"2rem",borderRadius:"10px"},children:[(0,s.jsx)("h2",{children:this.props.t("error.generic")}),(0,s.jsx)(Qd,{primary:!0,onClick:()=>this.setState({hasError:!1}),children:this.props.t("error.tryAgain")||"Try again"})]}):this.props.children}}var Kb=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){function i(i){var o=i.forwardedRef,a=r(zb)(i,Vb),s=Ce(e,Gb(Gb({},a),{},{keyPrefix:t.keyPrefix})),l=r(q)(s,3),c=l[0],d=l[1],f=l[2],h=Gb(Gb({},a),{},{t:c,i18n:d,tReady:f});return t.withRef&&o?h.ref=o:!t.withRef&&o&&(h.forwardedRef=o),(0,u.createElement)(n,h)}i.displayName="withI18nextTranslation(".concat(Me(n),")"),i.WrappedComponent=n;return t.withRef?(0,u.forwardRef)((function(e,t){return(0,u.createElement)(i,Object.assign({},e,{forwardedRef:t}))})):i}}(["common"])(qb),Yb=(u=a("85Hg2"),u=a("85Hg2"),{});e(Yb,"REVISION",(()=>Jb)),e(Yb,"MOUSE",(()=>Qb)),e(Yb,"TOUCH",(()=>Xb)),e(Yb,"CullFaceNone",(()=>Zb)),e(Yb,"CullFaceBack",(()=>$b)),e(Yb,"CullFaceFront",(()=>ew)),e(Yb,"CullFaceFrontBack",(()=>tw)),e(Yb,"BasicShadowMap",(()=>nw)),e(Yb,"PCFShadowMap",(()=>rw)),e(Yb,"PCFSoftShadowMap",(()=>iw)),e(Yb,"VSMShadowMap",(()=>ow)),e(Yb,"FrontSide",(()=>aw)),e(Yb,"BackSide",(()=>sw)),e(Yb,"DoubleSide",(()=>lw)),e(Yb,"NoBlending",(()=>cw)),e(Yb,"NormalBlending",(()=>uw)),e(Yb,"AdditiveBlending",(()=>dw)),e(Yb,"SubtractiveBlending",(()=>fw)),e(Yb,"MultiplyBlending",(()=>hw)),e(Yb,"CustomBlending",(()=>pw)),e(Yb,"AddEquation",(()=>mw)),e(Yb,"SubtractEquation",(()=>gw)),e(Yb,"ReverseSubtractEquation",(()=>vw)),e(Yb,"MinEquation",(()=>yw)),e(Yb,"MaxEquation",(()=>bw)),e(Yb,"ZeroFactor",(()=>ww)),e(Yb,"OneFactor",(()=>xw)),e(Yb,"SrcColorFactor",(()=>Sw)),e(Yb,"OneMinusSrcColorFactor",(()=>Mw)),e(Yb,"SrcAlphaFactor",(()=>_w)),e(Yb,"OneMinusSrcAlphaFactor",(()=>Aw)),e(Yb,"DstAlphaFactor",(()=>Ew)),e(Yb,"OneMinusDstAlphaFactor",(()=>Cw)),e(Yb,"DstColorFactor",(()=>kw)),e(Yb,"OneMinusDstColorFactor",(()=>Tw)),e(Yb,"SrcAlphaSaturateFactor",(()=>Iw)),e(Yb,"NeverDepth",(()=>Ow)),e(Yb,"AlwaysDepth",(()=>Rw)),e(Yb,"LessDepth",(()=>Pw)),e(Yb,"LessEqualDepth",(()=>Nw)),e(Yb,"EqualDepth",(()=>Lw)),e(Yb,"GreaterEqualDepth",(()=>Dw)),e(Yb,"GreaterDepth",(()=>Bw)),e(Yb,"NotEqualDepth",(()=>jw)),e(Yb,"MultiplyOperation",(()=>Fw)),e(Yb,"MixOperation",(()=>Uw)),e(Yb,"AddOperation",(()=>zw)),e(Yb,"NoToneMapping",(()=>Hw)),e(Yb,"LinearToneMapping",(()=>Vw)),e(Yb,"ReinhardToneMapping",(()=>Ww)),e(Yb,"CineonToneMapping",(()=>Gw)),e(Yb,"ACESFilmicToneMapping",(()=>qw)),e(Yb,"CustomToneMapping",(()=>Kw)),e(Yb,"UVMapping",(()=>Yw)),e(Yb,"CubeReflectionMapping",(()=>Jw)),e(Yb,"CubeRefractionMapping",(()=>Qw)),e(Yb,"EquirectangularReflectionMapping",(()=>Xw)),e(Yb,"EquirectangularRefractionMapping",(()=>Zw)),e(Yb,"CubeUVReflectionMapping",(()=>$w)),e(Yb,"RepeatWrapping",(()=>ex)),e(Yb,"ClampToEdgeWrapping",(()=>tx)),e(Yb,"MirroredRepeatWrapping",(()=>nx)),e(Yb,"NearestFilter",(()=>rx)),e(Yb,"NearestMipmapNearestFilter",(()=>ix)),e(Yb,"NearestMipMapNearestFilter",(()=>ox)),e(Yb,"NearestMipmapLinearFilter",(()=>ax)),e(Yb,"NearestMipMapLinearFilter",(()=>sx)),e(Yb,"LinearFilter",(()=>lx)),e(Yb,"LinearMipmapNearestFilter",(()=>cx)),e(Yb,"LinearMipMapNearestFilter",(()=>ux)),e(Yb,"LinearMipmapLinearFilter",(()=>dx)),e(Yb,"LinearMipMapLinearFilter",(()=>fx)),e(Yb,"UnsignedByteType",(()=>hx)),e(Yb,"ByteType",(()=>px)),e(Yb,"ShortType",(()=>mx)),e(Yb,"UnsignedShortType",(()=>gx)),e(Yb,"IntType",(()=>vx)),e(Yb,"UnsignedIntType",(()=>yx)),e(Yb,"FloatType",(()=>bx)),e(Yb,"HalfFloatType",(()=>wx)),e(Yb,"UnsignedShort4444Type",(()=>xx)),e(Yb,"UnsignedShort5551Type",(()=>Sx)),e(Yb,"UnsignedInt248Type",(()=>Mx)),e(Yb,"AlphaFormat",(()=>_x)),e(Yb,"RGBFormat",(()=>Ax)),e(Yb,"RGBAFormat",(()=>Ex)),e(Yb,"LuminanceFormat",(()=>Cx)),e(Yb,"LuminanceAlphaFormat",(()=>kx)),e(Yb,"DepthFormat",(()=>Tx)),e(Yb,"DepthStencilFormat",(()=>Ix)),e(Yb,"RedFormat",(()=>Ox)),e(Yb,"RedIntegerFormat",(()=>Rx)),e(Yb,"RGFormat",(()=>Px)),e(Yb,"RGIntegerFormat",(()=>Nx)),e(Yb,"RGBAIntegerFormat",(()=>Lx)),e(Yb,"RGB_S3TC_DXT1_Format",(()=>Dx)),e(Yb,"RGBA_S3TC_DXT1_Format",(()=>Bx)),e(Yb,"RGBA_S3TC_DXT3_Format",(()=>jx)),e(Yb,"RGBA_S3TC_DXT5_Format",(()=>Fx)),e(Yb,"RGB_PVRTC_4BPPV1_Format",(()=>Ux)),e(Yb,"RGB_PVRTC_2BPPV1_Format",(()=>zx)),e(Yb,"RGBA_PVRTC_4BPPV1_Format",(()=>Hx)),e(Yb,"RGBA_PVRTC_2BPPV1_Format",(()=>Vx)),e(Yb,"RGB_ETC1_Format",(()=>Wx)),e(Yb,"RGB_ETC2_Format",(()=>Gx)),e(Yb,"RGBA_ETC2_EAC_Format",(()=>qx)),e(Yb,"RGBA_ASTC_4x4_Format",(()=>Kx)),e(Yb,"RGBA_ASTC_5x4_Format",(()=>Yx)),e(Yb,"RGBA_ASTC_5x5_Format",(()=>Jx)),e(Yb,"RGBA_ASTC_6x5_Format",(()=>Qx)),e(Yb,"RGBA_ASTC_6x6_Format",(()=>Xx)),e(Yb,"RGBA_ASTC_8x5_Format",(()=>Zx)),e(Yb,"RGBA_ASTC_8x6_Format",(()=>$x)),e(Yb,"RGBA_ASTC_8x8_Format",(()=>eS)),e(Yb,"RGBA_ASTC_10x5_Format",(()=>tS)),e(Yb,"RGBA_ASTC_10x6_Format",(()=>nS)),e(Yb,"RGBA_ASTC_10x8_Format",(()=>rS)),e(Yb,"RGBA_ASTC_10x10_Format",(()=>iS)),e(Yb,"RGBA_ASTC_12x10_Format",(()=>oS)),e(Yb,"RGBA_ASTC_12x12_Format",(()=>aS)),e(Yb,"RGBA_BPTC_Format",(()=>sS)),e(Yb,"LoopOnce",(()=>lS)),e(Yb,"LoopRepeat",(()=>cS)),e(Yb,"LoopPingPong",(()=>uS)),e(Yb,"InterpolateDiscrete",(()=>dS)),e(Yb,"InterpolateLinear",(()=>fS)),e(Yb,"InterpolateSmooth",(()=>hS)),e(Yb,"ZeroCurvatureEnding",(()=>pS)),e(Yb,"ZeroSlopeEnding",(()=>mS)),e(Yb,"WrapAroundEnding",(()=>gS)),e(Yb,"NormalAnimationBlendMode",(()=>vS)),e(Yb,"AdditiveAnimationBlendMode",(()=>yS)),e(Yb,"TrianglesDrawMode",(()=>bS)),e(Yb,"TriangleStripDrawMode",(()=>wS)),e(Yb,"TriangleFanDrawMode",(()=>xS)),e(Yb,"LinearEncoding",(()=>SS)),e(Yb,"sRGBEncoding",(()=>MS)),e(Yb,"BasicDepthPacking",(()=>_S)),e(Yb,"RGBADepthPacking",(()=>AS)),e(Yb,"TangentSpaceNormalMap",(()=>ES)),e(Yb,"ObjectSpaceNormalMap",(()=>CS)),e(Yb,"NoColorSpace",(()=>kS)),e(Yb,"SRGBColorSpace",(()=>TS)),e(Yb,"LinearSRGBColorSpace",(()=>IS)),e(Yb,"ZeroStencilOp",(()=>OS)),e(Yb,"KeepStencilOp",(()=>RS)),e(Yb,"ReplaceStencilOp",(()=>PS)),e(Yb,"IncrementStencilOp",(()=>NS)),e(Yb,"DecrementStencilOp",(()=>LS)),e(Yb,"IncrementWrapStencilOp",(()=>DS)),e(Yb,"DecrementWrapStencilOp",(()=>BS)),e(Yb,"InvertStencilOp",(()=>jS)),e(Yb,"NeverStencilFunc",(()=>FS)),e(Yb,"LessStencilFunc",(()=>US)),e(Yb,"EqualStencilFunc",(()=>zS)),e(Yb,"LessEqualStencilFunc",(()=>HS)),e(Yb,"GreaterStencilFunc",(()=>VS)),e(Yb,"NotEqualStencilFunc",(()=>WS)),e(Yb,"GreaterEqualStencilFunc",(()=>GS)),e(Yb,"AlwaysStencilFunc",(()=>qS)),e(Yb,"StaticDrawUsage",(()=>KS)),e(Yb,"DynamicDrawUsage",(()=>YS)),e(Yb,"StreamDrawUsage",(()=>JS)),e(Yb,"StaticReadUsage",(()=>QS)),e(Yb,"DynamicReadUsage",(()=>XS)),e(Yb,"StreamReadUsage",(()=>ZS)),e(Yb,"StaticCopyUsage",(()=>$S)),e(Yb,"DynamicCopyUsage",(()=>eM)),e(Yb,"StreamCopyUsage",(()=>tM)),e(Yb,"GLSL1",(()=>nM)),e(Yb,"GLSL3",(()=>rM)),e(Yb,"_SRGBAFormat",(()=>iM)),e(Yb,"EventDispatcher",(()=>oM)),e(Yb,"MathUtils",(()=>bM)),e(Yb,"Vector2",(()=>wM)),e(Yb,"Matrix3",(()=>xM)),e(Yb,"ColorManagement",(()=>TM)),e(Yb,"Color",(()=>DM)),e(Yb,"ImageUtils",(()=>jM)),e(Yb,"Source",(()=>FM)),e(Yb,"Texture",(()=>HM)),e(Yb,"Vector4",(()=>VM)),e(Yb,"WebGLRenderTarget",(()=>WM)),e(Yb,"DataArrayTexture",(()=>GM)),e(Yb,"WebGLArrayRenderTarget",(()=>qM)),e(Yb,"Data3DTexture",(()=>KM)),e(Yb,"WebGL3DRenderTarget",(()=>YM)),e(Yb,"WebGLMultipleRenderTargets",(()=>JM)),e(Yb,"Quaternion",(()=>QM)),e(Yb,"Vector3",(()=>XM)),e(Yb,"Box3",(()=>e_)),e(Yb,"Sphere",(()=>b_)),e(Yb,"Ray",(()=>C_)),e(Yb,"Matrix4",(()=>k_)),e(Yb,"Euler",(()=>j_)),e(Yb,"Layers",(()=>F_)),e(Yb,"Object3D",(()=>$_)),e(Yb,"Triangle",(()=>uA)),e(Yb,"Material",(()=>fA)),e(Yb,"MeshBasicMaterial",(()=>hA)),e(Yb,"BufferAttribute",(()=>gA)),e(Yb,"Int8BufferAttribute",(()=>vA)),e(Yb,"Uint8BufferAttribute",(()=>yA)),e(Yb,"Uint8ClampedBufferAttribute",(()=>bA)),e(Yb,"Int16BufferAttribute",(()=>wA)),e(Yb,"Uint16BufferAttribute",(()=>xA)),e(Yb,"Int32BufferAttribute",(()=>SA)),e(Yb,"Uint32BufferAttribute",(()=>MA)),e(Yb,"Float16BufferAttribute",(()=>_A)),e(Yb,"Float32BufferAttribute",(()=>AA)),e(Yb,"Float64BufferAttribute",(()=>EA)),e(Yb,"BufferGeometry",(()=>NA)),e(Yb,"Mesh",(()=>ZA)),e(Yb,"BoxGeometry",(()=>eE)),e(Yb,"UniformsUtils",(()=>rE)),e(Yb,"ShaderMaterial",(()=>iE)),e(Yb,"Camera",(()=>oE)),e(Yb,"PerspectiveCamera",(()=>aE)),e(Yb,"CubeCamera",(()=>lE)),e(Yb,"CubeTexture",(()=>cE)),e(Yb,"WebGLCubeRenderTarget",(()=>uE)),e(Yb,"Plane",(()=>pE)),e(Yb,"Frustum",(()=>vE)),e(Yb,"PlaneGeometry",(()=>wE)),e(Yb,"ShaderChunk",(()=>xE)),e(Yb,"UniformsLib",(()=>SE)),e(Yb,"ShaderLib",(()=>ME)),e(Yb,"OrthographicCamera",(()=>IE)),e(Yb,"PMREMGenerator",(()=>FE)),e(Yb,"MeshDepthMaterial",(()=>Lk)),e(Yb,"MeshDistanceMaterial",(()=>Dk)),e(Yb,"WebGLUtils",(()=>Uk)),e(Yb,"ArrayCamera",(()=>zk)),e(Yb,"Group",(()=>Hk)),e(Yb,"DepthTexture",(()=>Gk)),e(Yb,"WebGLRenderer",(()=>Jk)),e(Yb,"WebGL1Renderer",(()=>Qk)),e(Yb,"FogExp2",(()=>Xk)),e(Yb,"Fog",(()=>Zk)),e(Yb,"Scene",(()=>$k)),e(Yb,"InterleavedBuffer",(()=>eT)),e(Yb,"InterleavedBufferAttribute",(()=>nT)),e(Yb,"SpriteMaterial",(()=>rT)),e(Yb,"Sprite",(()=>vT)),e(Yb,"LOD",(()=>xT)),e(Yb,"SkinnedMesh",(()=>CT)),e(Yb,"Bone",(()=>kT)),e(Yb,"DataTexture",(()=>TT)),e(Yb,"Skeleton",(()=>RT)),e(Yb,"InstancedBufferAttribute",(()=>PT)),e(Yb,"InstancedMesh",(()=>jT)),e(Yb,"LineBasicMaterial",(()=>FT)),e(Yb,"Line",(()=>GT)),e(Yb,"LineSegments",(()=>YT)),e(Yb,"LineLoop",(()=>JT)),e(Yb,"PointsMaterial",(()=>QT)),e(Yb,"Points",(()=>tI)),e(Yb,"VideoTexture",(()=>rI)),e(Yb,"FramebufferTexture",(()=>iI)),e(Yb,"CompressedTexture",(()=>oI)),e(Yb,"CanvasTexture",(()=>aI)),e(Yb,"Curve",(()=>sI)),e(Yb,"EllipseCurve",(()=>lI)),e(Yb,"ArcCurve",(()=>cI)),e(Yb,"CatmullRomCurve3",(()=>mI)),e(Yb,"CubicBezierCurve",(()=>bI)),e(Yb,"CubicBezierCurve3",(()=>wI)),e(Yb,"LineCurve",(()=>xI)),e(Yb,"LineCurve3",(()=>SI)),e(Yb,"QuadraticBezierCurve",(()=>MI)),e(Yb,"QuadraticBezierCurve3",(()=>_I)),e(Yb,"SplineCurve",(()=>AI)),e(Yb,"CurvePath",(()=>CI)),e(Yb,"Path",(()=>kI)),e(Yb,"LatheGeometry",(()=>TI)),e(Yb,"CapsuleGeometry",(()=>II)),e(Yb,"CircleGeometry",(()=>OI)),e(Yb,"CylinderGeometry",(()=>RI)),e(Yb,"ConeGeometry",(()=>PI)),e(Yb,"PolyhedronGeometry",(()=>NI)),e(Yb,"DodecahedronGeometry",(()=>LI)),e(Yb,"EdgesGeometry",(()=>UI)),e(Yb,"Shape",(()=>zI)),e(Yb,"ShapeUtils",(()=>hO)),e(Yb,"ExtrudeGeometry",(()=>gO)),e(Yb,"IcosahedronGeometry",(()=>yO)),e(Yb,"OctahedronGeometry",(()=>bO)),e(Yb,"RingGeometry",(()=>wO)),e(Yb,"ShapeGeometry",(()=>xO)),e(Yb,"SphereGeometry",(()=>SO)),e(Yb,"TetrahedronGeometry",(()=>MO)),e(Yb,"TorusGeometry",(()=>_O)),e(Yb,"TorusKnotGeometry",(()=>AO)),e(Yb,"TubeGeometry",(()=>EO)),e(Yb,"WireframeGeometry",(()=>CO)),e(Yb,"ShadowMaterial",(()=>IO)),e(Yb,"RawShaderMaterial",(()=>OO)),e(Yb,"MeshStandardMaterial",(()=>RO)),e(Yb,"MeshPhysicalMaterial",(()=>PO)),e(Yb,"MeshPhongMaterial",(()=>NO)),e(Yb,"MeshToonMaterial",(()=>LO)),e(Yb,"MeshNormalMaterial",(()=>DO)),e(Yb,"MeshLambertMaterial",(()=>BO)),e(Yb,"MeshMatcapMaterial",(()=>jO)),e(Yb,"LineDashedMaterial",(()=>FO)),e(Yb,"AnimationUtils",(()=>qO)),e(Yb,"Interpolant",(()=>KO)),e(Yb,"CubicInterpolant",(()=>YO)),e(Yb,"LinearInterpolant",(()=>JO)),e(Yb,"DiscreteInterpolant",(()=>QO)),e(Yb,"KeyframeTrack",(()=>XO)),e(Yb,"BooleanKeyframeTrack",(()=>ZO)),e(Yb,"ColorKeyframeTrack",(()=>$O)),e(Yb,"NumberKeyframeTrack",(()=>eR)),e(Yb,"QuaternionLinearInterpolant",(()=>tR)),e(Yb,"QuaternionKeyframeTrack",(()=>nR)),e(Yb,"StringKeyframeTrack",(()=>rR)),e(Yb,"VectorKeyframeTrack",(()=>iR)),e(Yb,"AnimationClip",(()=>oR)),e(Yb,"Cache",(()=>sR)),e(Yb,"LoadingManager",(()=>lR)),e(Yb,"DefaultLoadingManager",(()=>cR)),e(Yb,"Loader",(()=>uR)),e(Yb,"FileLoader",(()=>hR)),e(Yb,"AnimationLoader",(()=>pR)),e(Yb,"CompressedTextureLoader",(()=>mR)),e(Yb,"ImageLoader",(()=>gR)),e(Yb,"CubeTextureLoader",(()=>vR)),e(Yb,"DataTextureLoader",(()=>yR)),e(Yb,"TextureLoader",(()=>bR)),e(Yb,"Light",(()=>wR)),e(Yb,"HemisphereLight",(()=>xR)),e(Yb,"SpotLight",(()=>CR)),e(Yb,"PointLight",(()=>RR)),e(Yb,"DirectionalLight",(()=>NR)),e(Yb,"AmbientLight",(()=>LR)),e(Yb,"RectAreaLight",(()=>DR)),e(Yb,"SphericalHarmonics3",(()=>BR)),e(Yb,"LightProbe",(()=>jR)),e(Yb,"MaterialLoader",(()=>FR)),e(Yb,"LoaderUtils",(()=>UR)),e(Yb,"InstancedBufferGeometry",(()=>zR)),e(Yb,"BufferGeometryLoader",(()=>HR)),e(Yb,"ObjectLoader",(()=>VR)),e(Yb,"ImageBitmapLoader",(()=>KR)),e(Yb,"AudioContext",(()=>JR)),e(Yb,"AudioLoader",(()=>QR)),e(Yb,"HemisphereLightProbe",(()=>XR)),e(Yb,"AmbientLightProbe",(()=>ZR)),e(Yb,"StereoCamera",(()=>nP)),e(Yb,"Clock",(()=>rP)),e(Yb,"AudioListener",(()=>cP)),e(Yb,"Audio",(()=>uP)),e(Yb,"PositionalAudio",(()=>mP)),e(Yb,"AudioAnalyser",(()=>gP)),e(Yb,"PropertyMixer",(()=>vP)),e(Yb,"PropertyBinding",(()=>_P)),e(Yb,"AnimationObjectGroup",(()=>AP)),e(Yb,"AnimationMixer",(()=>kP)),e(Yb,"Uniform",(()=>TP)),e(Yb,"UniformsGroup",(()=>OP)),e(Yb,"InstancedInterleavedBuffer",(()=>RP)),e(Yb,"GLBufferAttribute",(()=>PP)),e(Yb,"Raycaster",(()=>NP)),e(Yb,"Spherical",(()=>BP)),e(Yb,"Cylindrical",(()=>jP)),e(Yb,"Box2",(()=>UP)),e(Yb,"Line3",(()=>VP)),e(Yb,"SpotLightHelper",(()=>GP)),e(Yb,"SkeletonHelper",(()=>JP)),e(Yb,"PointLightHelper",(()=>XP)),e(Yb,"HemisphereLightHelper",(()=>tN)),e(Yb,"GridHelper",(()=>nN)),e(Yb,"PolarGridHelper",(()=>rN)),e(Yb,"DirectionalLightHelper",(()=>sN)),e(Yb,"CameraHelper",(()=>uN)),e(Yb,"BoxHelper",(()=>hN)),e(Yb,"Box3Helper",(()=>pN)),e(Yb,"PlaneHelper",(()=>mN)),e(Yb,"ArrowHelper",(()=>bN)),e(Yb,"AxesHelper",(()=>wN)),e(Yb,"ShapePath",(()=>xN)),e(Yb,"DataUtils",(()=>_N)),e(Yb,"ImmediateRenderObject",(()=>AN)),e(Yb,"WebGLMultisampleRenderTarget",(()=>EN)),e(Yb,"DataTexture2DArray",(()=>CN)),e(Yb,"DataTexture3D",(()=>kN)),e(Yb,"BoxBufferGeometry",(()=>TN)),e(Yb,"CapsuleBufferGeometry",(()=>IN)),e(Yb,"CircleBufferGeometry",(()=>ON)),e(Yb,"ConeBufferGeometry",(()=>RN)),e(Yb,"CylinderBufferGeometry",(()=>PN)),e(Yb,"DodecahedronBufferGeometry",(()=>NN)),e(Yb,"ExtrudeBufferGeometry",(()=>LN)),e(Yb,"IcosahedronBufferGeometry",(()=>DN)),e(Yb,"LatheBufferGeometry",(()=>BN)),e(Yb,"OctahedronBufferGeometry",(()=>jN)),e(Yb,"PlaneBufferGeometry",(()=>FN)),e(Yb,"PolyhedronBufferGeometry",(()=>UN)),e(Yb,"RingBufferGeometry",(()=>zN)),e(Yb,"ShapeBufferGeometry",(()=>HN)),e(Yb,"SphereBufferGeometry",(()=>VN)),e(Yb,"TetrahedronBufferGeometry",(()=>WN)),e(Yb,"TorusBufferGeometry",(()=>GN)),e(Yb,"TorusKnotBufferGeometry",(()=>qN)),e(Yb,"TubeBufferGeometry",(()=>KN));
97
+ r.version="2.29.4",i(Jn),r.fn=lo,r.min=$n,r.max=er,r.now=tr,r.utc=p,r.unix=co,r.months=vo,r.isDate=d,r.locale=mn,r.invalid=y,r.duration=kr,r.isMoment=M,r.weekdays=bo,r.parseZone=uo,r.localeData=yn,r.isDuration=sr,r.monthsShort=yo,r.weekdaysMin=xo,r.defineLocale=gn,r.updateLocale=vn,r.locales=bn,r.weekdaysShort=wo,r.normalizeUnits=re,r.relativeTimeRounding=ia,r.relativeTimeThreshold=oa,r.calendarFormat=zr,r.prototype=lo,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()})),a("juxiN").register(JSON.parse('{"adfgW":"index.js","cmazm":"abap.bc6c1a94.js","jPTA1":"abnf.a3fdbafa.js","jdWNC":"actionscript.59d9b9ea.js","2CBqg":"ada.7ae8a3a8.js","3wHhO":"agda.c22a72e2.js","kFVdl":"al.43edf93f.js","3V4RR":"antlr4.fab93bd9.js","ksX9L":"apacheconf.1ea6f6bc.js","3N81M":"apex.5f5d0b00.js","lBh32":"apl.f0e0255a.js","1cOI2":"applescript.f8873ad2.js","hwV5I":"aql.0596cd74.js","cxQUy":"arduino.8a10351d.js","h8XDs":"arff.b6eba224.js","1glOK":"asciidoc.3591554e.js","5YI5Q":"asm6502.eb3baf93.js","5aM2c":"asmatmel.93b67168.js","aKcNk":"aspnet.a154be94.js","bYGuI":"csharp.60bc2788.js","4ffJ6":"autohotkey.dc99c6b5.js","6o8gr":"autoit.7bd54007.js","d0QlI":"avisynth.506bbdad.js","1vpfH":"avro-idl.ab78e3d7.js","d78C2":"basic.09310972.js","1V5ou":"batch.5c48c918.js","h9qnw":"bbcode.4e0cb2f2.js","eluAn":"bicep.e394696d.js","jD2Yh":"birb.54766d79.js","3ligT":"bison.2c2552ab.js","cSnAi":"bnf.ec556d42.js","gmloY":"brainfuck.4e81eb1d.js","77rtQ":"brightscript.3c7cc723.js","hfFki":"bro.8db28f8a.js","8SYqo":"bsl.260fabfb.js","i4HkI":"cfscript.92c90b90.js","1rBYK":"chaiscript.76481f4b.js","gQYEz":"cil.622792d1.js","bq2uf":"clike.36346267.js","h7tza":"clojure.9da4900e.js","aK2oY":"cmake.234b57e3.js","3V5TZ":"cobol.2e8bd2ea.js","72v5N":"coffeescript.261b318a.js","lNJYg":"concurnas.9d189a8c.js","cHo4f":"coq.917e2a53.js","7GKmU":"crystal.d23925f3.js","a5f4n":"cshtml.92086949.js","2nOzn":"csp.9b5dd573.js","iZH8k":"css-extras.7f3088a6.js","3V9km":"css.fb6f00e3.js","7TCh4":"csv.06af3522.js","8MqYl":"cypher.6af6e534.js","6Oo3A":"d.303192e5.js","6ks0D":"dart.6fb62874.js","huqsT":"dataweave.e97ef31d.js","YtcLG":"dax.013d5e9a.js","1s9Hz":"dhall.d5ee83ba.js","b677V":"diff.9ef56ea8.js","ak2pO":"django.13b0bb49.js","8LDFZ":"dns-zone-file.189b08c5.js","1awLf":"docker.1da9769e.js","9dPYr":"dot.8dca92f3.js","e2ZjS":"ebnf.58c0fa63.js","9h8KW":"editorconfig.9c7b63a5.js","4SWgd":"eiffel.090bab86.js","6HmuU":"ejs.0ee535c3.js","2KAkF":"elixir.dc192ee6.js","jPV3v":"elm.c88782bd.js","agNrQ":"erb.55ec7cf0.js","9BmS2":"erlang.956455fa.js","fqf1c":"etlua.79f6dba5.js","cgMSr":"lua.88c0a077.js","92McF":"excel-formula.d0dd1424.js","juFxG":"factor.e311ca38.js","1dWPh":"false.a93fe44c.js","2k0b2":"firestore-security-rules.4ea155d7.js","dvL1Q":"flow.96e0f48a.js","5oumN":"fortran.0811bc79.js","fP8jO":"fsharp.0119d0fd.js","7L6sP":"ftl.c5671dbe.js","2ujce":"gap.b0574953.js","hzgIA":"gcode.29260c31.js","5MUDD":"gdscript.545f127b.js","ghckm":"gedcom.d53f8a81.js","ian9z":"gherkin.0c5a099f.js","dsuH3":"git.2d89a25c.js","dvV8S":"glsl.0bf837a6.js","6BDWE":"gml.04204c1b.js","btSYt":"gn.cbb4c3be.js","j94Lr":"go-module.2bebc9b8.js","207xG":"go.cc49e5b2.js","iQ4Nh":"graphql.3d658adb.js","9E9pJ":"groovy.3e5836cd.js","hLXUt":"haml.9a056759.js","5ob5h":"handlebars.8c13dfe6.js","1nDhS":"haskell.3c80aa72.js","kQehe":"haxe.40a1dc98.js","1sziu":"hcl.84488f47.js","28Tam":"hlsl.323b0c17.js","awNOU":"hoon.df16cb45.js","eeLMI":"hpkp.9c950797.js","gjEKw":"hsts.0440ab7b.js","3bCJ7":"http.96d5f1c1.js","id4YZ":"ichigojam.c0bd16f5.js","5TKHe":"icon.439feb9f.js","eijPh":"icu-message-format.e96f6551.js","lv8gR":"idris.d3811412.js","bW8K3":"iecst.3fdbbc52.js","b8EBv":"ignore.00726ce9.js","jOS96":"inform7.65978ef5.js","dn3Yf":"ini.1cbb0515.js","iUSU6":"io.e628fd7e.js","6wbwo":"j.b959d174.js","5qA0j":"java.0ffd8069.js","hdx4d":"javadoc.b99752ae.js","jRMSs":"javadoclike.8cc3d825.js","l2DRD":"javascript.fe729813.js","cpOeo":"javastacktrace.cc22fb4b.js","fSVrK":"jexl.2cce5cc0.js","03mi8":"jolie.d8f352cd.js","j6YjP":"jq.65b95777.js","6JQIv":"js-extras.7d041902.js","5nVrm":"js-templates.a3463d0b.js","9gPZY":"jsdoc.0c5cc4d3.js","8q0xA":"json5.b9de5531.js","fIx8j":"jsonp.eefdc553.js","a3ur7":"jsstacktrace.8d3a2b71.js","bKtxi":"julia.679e1c74.js","9vqI0":"keepalived.e694c167.js","lDUCl":"keyman.d1406200.js","gcEXq":"kotlin.fd040b34.js","cxxOt":"kumir.b2072cfc.js","b8NIc":"kusto.98546fcc.js","iXz7U":"latex.ecc17a0d.js","9nRbn":"latte.18295a4f.js","lWxq2":"less.a8a986ab.js","7dEcL":"lilypond.0423d709.js","ck7Ll":"scheme.4039466f.js","hI3m3":"liquid.533f073c.js","7qpQZ":"lisp.b075bd53.js","8Cm1D":"livescript.2b19fb05.js","9sT8D":"llvm.6b74465d.js","gQkTU":"log.b74346d6.js","86y52":"lolcode.0fbc730a.js","6bXdx":"magma.bbb66246.js","hDIxO":"makefile.bf1a7653.js","4wRUQ":"markdown.4a5510a8.js","66rgq":"markup.973a8c4c.js","iAx9A":"matlab.caaa1e9f.js","5SXMq":"maxscript.58a0bf4d.js","gnQ55":"mel.c5da9d2e.js","8G54S":"mermaid.ced53190.js","gfXsu":"mizar.4e6d6035.js","7nZsb":"mongodb.5c4e0cf9.js","hUs37":"monkey.9be800f3.js","fKqwA":"moonscript.fc782589.js","luHXo":"n1ql.7f05115f.js","j0sqX":"n4js.318f41b7.js","avS2d":"nand2tetris-hdl.be3bb656.js","8fNUI":"naniscript.ec3afc9a.js","6PKtR":"nasm.1ee2623a.js","2LUGi":"neon.1d5a4ec8.js","esMLb":"nevod.6908715c.js","jQ8dR":"nginx.404fbeb4.js","1kuW2":"nim.36bf497b.js","7YxPR":"nix.3af3b6b2.js","b1EPY":"nsis.94e1fb71.js","j169M":"objectivec.49a6b342.js","1b4qw":"ocaml.c5fca1eb.js","c0JxA":"opencl.4194613a.js","54ivl":"openqasm.4b589cb3.js","kYO5l":"oz.498e9cbd.js","811Qi":"parigp.ed6a3789.js","gXO52":"parser.3329b2ab.js","4SQCy":"pascal.82aebbcf.js","9KuwN":"pascaligo.4bbd3a85.js","eM7TR":"pcaxis.e636466e.js","6w6GH":"peoplecode.32e124c6.js","eQPpI":"perl.7d72d7fd.js","b83gb":"php-extras.9606406b.js","l8BPM":"phpdoc.617f8af6.js","2cVRv":"plsql.482f8da9.js","gOyA3":"powerquery.486ee359.js","1BYb4":"powershell.856a4dd0.js","lIwm5":"processing.2c7d4403.js","cHCln":"prolog.812b5c86.js","d460J":"promql.8e6b9da4.js","lAnQP":"properties.40afd4d0.js","dG8OA":"protobuf.84963e3e.js","eRbDh":"psl.9c32166c.js","27W0o":"pug.54462c11.js","75Y4h":"puppet.2646aef5.js","kgGGG":"pure.a10bd6b4.js","hFuIq":"purebasic.629b75cd.js","db2yj":"purescript.216751ba.js","8ZppB":"q.b46a94a4.js","iFM89":"qml.bd71f711.js","7FNJV":"qore.d7e006f8.js","6AsUF":"qsharp.7bab07d1.js","7Xrsp":"r.3036c5c0.js","dh9BI":"racket.b867dd29.js","8pRTf":"reason.405183ad.js","kUbHD":"regex.aa4684b4.js","bNx4l":"rego.61da6b5d.js","jbksA":"renpy.ff0ce389.js","gP26j":"rest.91bee177.js","6FCYh":"rip.33f479a4.js","lEjxk":"roboconf.0ba2e9bf.js","c8BOJ":"robotframework.72ccad61.js","elAoE":"rust.9a35cb62.js","eDL1o":"sas.b3b3be64.js","gIQMB":"sass.165275f3.js","i7Y8T":"scala.a51a6234.js","OzRer":"shell-session.c47a7880.js","hZA2W":"smali.46e3f703.js","gT51y":"smalltalk.fb31e155.js","2OoIP":"smarty.abd6973e.js","33hrk":"sml.6d8c2545.js","3uuqi":"solidity.80562c5b.js","kHJvD":"solution-file.30e00f5f.js","6iiDq":"soy.46a7ec1f.js","2TkEp":"sparql.dbb56be0.js","eirDq":"turtle.b8836781.js","jmDes":"splunk-spl.149146f6.js","81dr7":"sqf.ea070acb.js","i4XqC":"squirrel.1efaf6f3.js","1zw3p":"stan.6efb4565.js","kfIG2":"stylus.d4d41ca4.js","dksml":"swift.ea86fdd0.js","4w3mZ":"systemd.df819c28.js","6b6p1":"t4-cs.b3eaa646.js","budu0":"t4-templating.db399052.js","7RUUk":"t4-vb.082c208c.js","2cwdT":"vbnet.ac572fcc.js","fBA7X":"tap.82e5520b.js","gqbYu":"yaml.3d0bf472.js","lCVk7":"tcl.fffb53bb.js","aKXaK":"textile.20ae1d45.js","ks7hU":"toml.69754057.js","kCJbl":"tremor.262b95d4.js","iZ71n":"tt2.f07906cb.js","5mLLA":"twig.a95c4964.js","i9AIa":"typoscript.3dbd38d9.js","iHNMy":"unrealscript.e5c3fc1d.js","bKWLJ":"uorazor.cf3ed6dc.js","2XcAn":"uri.59c4e10c.js","enDcg":"v.fe8e0874.js","db4Ta":"vala.386e6270.js","cmaSk":"velocity.9a0ffb21.js","29RKO":"verilog.4308f028.js","4aBVG":"vhdl.ca8ee4c0.js","6Jrfy":"vim.897929a5.js","kNyzl":"visual-basic.bc36aaac.js","4LJ5s":"warpscript.6d00b50f.js","6Ocza":"wasm.029f651e.js","hvPGO":"web-idl.97fc763d.js","lS90V":"wiki.1179d7f8.js","9LY8Y":"wolfram.7017e6a0.js","bFBdJ":"wren.d4121438.js","iskNq":"xeora.cce693be.js","ek7X7":"xml-doc.025d4193.js","hwA94":"xojo.843f212e.js","f8rnQ":"xquery.50701bd4.js","3Q9qv":"yang.2c70775f.js","a0Oht":"zig.e33efe11.js","dnGOp":"core.ade097c7.js"}'));var s;s=a("9Hk4c");var l,c=a("2BCLI"),u=a("85Hg2");l=a("bG9xl")();const d=e=>e?new URL(e.startsWith("http")?e:`https://${e}`).origin:"https://backend.memori.ai";var f=a("dCyaf");const h=(e,t)=>r(f)(`${t.apiUrl}${e}`,{...t,body:(null==t?void 0:t.body)?JSON.stringify(t.body):void 0,mode:"cors",credentials:"include",headers:{"Content-Type":"application/json",...null==t?void 0:t.headers}}).then((e=>(null==t?void 0:t.text)?e.text():e.json()));var p=e=>({getTenantPublicMemoriList:t=>h(`/TenantPublicMemori/${encodeURIComponent(t)}`,{apiUrl:e}),getTenantMetaverseMemoriList:t=>h(`/TenantMetaverseMemori/${encodeURIComponent(t)}`,{apiUrl:e}),getPublicMemoriList:t=>h(`/PublicMemori/${t}`,{apiUrl:e}),getAllMemori:t=>h(`/AllMemori/${t}`,{apiUrl:e}),getUserByIDMemoriList:(t,n,r)=>h(`/UserMemoriByID/${t}/${n}${r?`/${r}`:""}`,{apiUrl:e}),getUserMemoriList:(t,n,r)=>h(`/UserMemori/${t}/${n}${r?`/${r}`:""}`,{apiUrl:e}),getMemoriList:t=>h(`/Memori/${t}`,{apiUrl:e}),getSharedMemoriList:t=>h(`/SharedMemori/${t}`,{apiUrl:e}),getTenantCategories:t=>h(`/TenantMemoriCategories/${encodeURIComponent(t)}`,{apiUrl:e}),getMemoriConfigs:t=>h(`/MemoriConfigs/${t}`,{apiUrl:e}),createMemori:(t,n)=>h(`/Memori/${t}`,{apiUrl:e,body:n,method:"POST"}),updateMemori:(t,n)=>h(`/Memori/${t}/${n.memoriID}`,{apiUrl:e,body:n,method:"PATCH"}),deleteMemori:(t,n)=>h(`/Memori/${t}`,{apiUrl:e,body:n,method:"DELETE"}),getMemoriById:(t,n)=>h(`/Memori/${t}/${n}`,{apiUrl:e}),getMemoriByUserAndId:(t,n,r,i)=>h(`/MemoriById/${t}/${n}/${r}${i?`/${i}`:""}`,{apiUrl:e}),getMemori:(t,n,r,i)=>h(`/Memori/${encodeURIComponent(t)}/${encodeURIComponent(n)}/${encodeURIComponent(r)}/${null!=i?i:""}`,{apiUrl:e}),getMemoriSessions:(t,n,r,i)=>h(`/MemoriSessions/${t}/${n}${r?`/${r}`:""}${r&&i?`/${i}`:""}`,{apiUrl:e}),transferMemori:(t,n)=>h(`/TransferMemori/${t}`,{apiUrl:e,body:n,method:"POST"}),memoriContentUpdated:(t,n)=>h(`/MemoriContentUpdated/${t}/${n}`,{apiUrl:e,method:"POST"})}),m=e=>({userSignUp:t=>h("/User",{apiUrl:e,body:t,method:"POST"}),userConfirmSignUp:t=>h("/UserConfirm",{apiUrl:e,body:t,method:"POST"}),userLogin:t=>h("/Login",{apiUrl:e,body:t,method:"POST"}),userLogout:t=>h(`/Logout/${t}`,{apiUrl:e,method:"POST"}),getUser:(t,n)=>h(`/User/${t}/${n}`,{apiUrl:e}),getUsersList:t=>h(`/Users/${t}`,{apiUrl:e}),deleteUser:(t,n)=>h(`/User/${t}/${n}`,{apiUrl:e,method:"DELETE"}),updateUser:(t,n,r)=>h(`/User/${t}/${n}`,{apiUrl:e,method:"PATCH",body:r}),resetPassword:t=>h("/ResetPassword",{apiUrl:e,body:t,method:"POST"}),resetConfirm:t=>h("/ResetConfirm",{apiUrl:e,body:t,method:"POST"}),recoverUsername:t=>h("/RecoverUsername",{apiUrl:e,body:t,method:"POST"}),getTenantConfig:t=>h(`/Tenant/${t}`,{apiUrl:e}),resendVerificationCode:t=>h("/ResendVerificationCode",{apiUrl:e,body:t,method:"POST"}),createUser:(t,n)=>h(`/User/${t}`,{apiUrl:e,body:n,method:"POST"})}),g=e=>({getMemoriIntegrationsList:(t,n)=>h(`/Integrations/${t}/${n}`,{apiUrl:e}),getAllIntegrationsList:t=>h(`/AllIntegrations/${t}`,{apiUrl:e}),getIntegration:(t,n)=>h(`/Integration/${t}/${n}`,{apiUrl:e}),deleteIntegration:(t,n)=>h(`/Integration/${t}/${n}`,{apiUrl:e,method:"DELETE"}),createIntegration:(t,n)=>h(`/Integration/${t}`,{apiUrl:e,method:"POST",body:n}),updateIntegration:(t,n,r)=>h(`/Integration/${t}/${n}`,{apiUrl:e,method:"PATCH",body:r})}),v=e=>({getUploadAssetURL:(t,n,r)=>`${e}/Asset/${t}${n?`/${n}`:""}${r?`/${r}`:""}`,uploadAsset:async(t,n,r,i,o)=>{const a=new FormData,s=await fetch(n),l=await s.blob();a.append(t,l,t);const c=await fetch(`${e}/Asset/${r}${i?`/${i}`:""}${o?`/${o}`:""}`,{method:"POST",body:a});return await c.json()},getAsset:(t,n)=>h(`/Asset/${t}/${n}`,{apiUrl:e,method:"GET"}),updateAsset:(t,n,r)=>h(`/Asset/${t}/${n.split("/").reverse()[0]}`,{apiUrl:e,method:"PATCH",body:r}),deleteAsset:(t,n)=>h(`/Asset/${t}/${n.split("/").reverse()[0]}`,{apiUrl:e,method:"DELETE"})}),y=e=>({getSentInvitations:t=>h(`/SentInvitations/${t}`,{apiUrl:e}),getMemoriInvitations:(t,n)=>h(`/MemoriInvitations/${t}/${n}`,{apiUrl:e}),getReceivedInvitations:t=>h(`/ReceivedInvitations/${t}`,{apiUrl:e}),getAllInvitations:t=>h(`/AllInvitations/${t}`,{apiUrl:e}),getInvitation:(t,n)=>h(`/Invitation/${t}/${n}`,{apiUrl:e}),updateInvitation:(t,n)=>h(`/Invitation/${t}/${n.invitationID}`,{apiUrl:e,method:"PATCH",body:n}),deleteInvitation:(t,n)=>h(`/Invitation/${t}/${n}`,{apiUrl:e,method:"DELETE"}),acceptInvitation:(t,n)=>h(`/AcceptInvitation/${t}/${n}`,{apiUrl:e,method:"POST"}),rejectInvitation:(t,n)=>h(`/RejectInvitation/${t}/${n}`,{apiUrl:e,method:"POST"}),sendInvitation:(t,n)=>h(`/SendInvitation/${t}`,{apiUrl:e,method:"POST",body:n})}),b=e=>({getTenantConsumptionLogs:(t,n,r,i,o)=>h(`/TenantConsumptionLogs/${t}/${n}/${r}${i?`/${i}`:""}${i&&o?`/${o}`:""}`,{apiUrl:e}),getUserConsumptionLogs:(t,n,r,i,o)=>h(`/UserConsumptionLogs/${t}/${n}/${r}${i?`/${i}`:""}${i&&o?`/${o}`:""}`,{apiUrl:e}),getMemoriConsumptionLogs:(t,n,r,i,o)=>h(`/MemoriConsumptionLogs/${t}/${n}/${r}${i?`/${i}`:""}${i&&o?`/${o}`:""}`,{apiUrl:e})}),w=e=>({getTenantNotifications:t=>h(`/TenantNotifications/${t}`,{apiUrl:e}),getUserNotifications:t=>h(`/UserNotifications/${t}`,{apiUrl:e})}),x=e=>({importCSV:async(t,n,r,i)=>h(`/ImportExport/ImportCSV/${t}/${n}`,{apiUrl:e,method:"POST",body:{rows:r,...i}}),importTXT:async(t,n,r,i)=>h(`/ImportExport/ImportTXT/${t}/${n}`,{apiUrl:e,method:"POST",body:{rows:r,...i}}),importProcesses:async t=>h(`/ImportExport/ImportProcesses/${t}`,{apiUrl:e,method:"GET"}),importStatus:async(t,n)=>h(`/ImportExport/ImportStatus/${t}/${n}`,{apiUrl:e,method:"GET"}),stopImport:async(t,n)=>h(`/ImportExport/StopImport/${t}/${n}`,{apiUrl:e,method:"POST"}),exportCSV:async(t,n,r,i)=>h(`/ImportExport/ExportCSV/${t}/${n}`,{apiUrl:e,method:"POST",body:{csvSpecs:r,password:i},text:!0}),exportJSONL:async(t,n,r,i)=>h(`/ImportExport/ExportJSONL/${t}/${n}`,{apiUrl:e,method:"POST",body:{jsonlSpecs:r,password:i},text:!0})});var S=e=>({asset:v(e),memori:p(e),user:m(e),integration:g(e),invitation:y(e),consumptionLogs:b(e),notifications:w(e),importExport:x(e),...v(e),...p(e),...m(e),...g(e),...y(e),...b(e),...w(e),...x(e)}),M=e=>({getCorrelationPairs:async(t,n,r)=>h(`/CorrelationPairs/${t}${n?`/${n}${r?`/${r}`:""}`:""}`,{method:"GET",apiUrl:e}),postCorrelationPair:async(t,n)=>h(`/CorrelationPair/${t}`,{method:"POST",apiUrl:e,body:n}),deleteCorrelationPair:async(t,n)=>h(`/CorrelationPair/${t}/${n}`,{method:"DELETE",apiUrl:e})}),_=e=>({postTextEnteredEvent:async({sessionId:t,text:n})=>h(`/TextEnteredEvent/${t}`,{method:"POST",apiUrl:e,body:{text:n}}),postPlaceChangedEvent:async({sessionId:t,placeName:n,latitude:r,longitude:i,uncertaintyKm:o})=>h(`/PlaceChangedEvent/${t}`,{method:"POST",apiUrl:e,body:{placeName:n,latitude:r,longitude:i,uncertaintyKm:o}}),postDateChangedEvent:async t=>h(`/DateChangedEvent/${t}`,{method:"POST",apiUrl:e}),postTagChangedEvent:async(t,n)=>h(`/TagChangedEvent/${t}`,{method:"POST",apiUrl:e,body:{tag:n}}),postTimeoutEvent:async t=>h(`/TimeoutEvent/${t}`,{method:"POST",apiUrl:e}),postMediumSelectedEvent:async(t,n)=>h(`/MediumSelectedEvent/${t}`,{method:"POST",apiUrl:e,body:{medium:n}}),postDateSelectedEvent:async t=>h(`/DateSelectedEvent/${t}`,{method:"GET",apiUrl:e}),postPlaceSelectedEvent:async t=>h(`/PlaceSelectedEvent/${t}`,{method:"GET",apiUrl:e}),postTagSelectedEvent:async t=>h(`/TagSelectedEvent/${t}`,{method:"GET",apiUrl:e})}),A=e=>({getIntents:async t=>h(`/Intents/${t}`,{method:"GET",apiUrl:e}),getIntent:async(t,n)=>h(`/Intent/${t}/${n}`,{method:"GET",apiUrl:e}),patchIntent:async(t,n)=>h(`/Intent/${t}/${n.intentID}`,{method:"PATCH",apiUrl:e,body:n}),deleteIntent:async(t,n)=>h(`/Intent/${t}/${n}`,{method:"DELETE",apiUrl:e}),createIntent:async(t,n)=>h(`/Intent/${t}`,{method:"POST",apiUrl:e,body:n}),getIntentSlots:async t=>h(`/IntentSlots/${t}`,{method:"GET",apiUrl:e}),getIntentSlot:async(t,n)=>h(`/IntentSlot/${t}/${n}`,{method:"GET",apiUrl:e}),patchIntentSlot:async(t,n)=>h(`/IntentSlot/${t}/${n.intentSlotID}`,{method:"PATCH",apiUrl:e,body:n}),deleteIntentSlot:async(t,n)=>h(`/IntentSlot/${t}/${n}`,{method:"DELETE",apiUrl:e}),createIntentSlot:async(t,n)=>h(`/IntentSlot/${t}`,{method:"POST",apiUrl:e,body:n})}),E=e=>({getLocalizationKeys:async t=>h(`/LocalizationKeys/${t}`,{method:"GET",apiUrl:e}),getLocalizationKey:async(t,n)=>h(`/LocalizationKey/${t}/${n}`,{method:"GET",apiUrl:e}),deleteLocalizationKey:async(t,n)=>h(`/LocalizationKey/${t}/${n}`,{method:"DELETE",apiUrl:e}),postLocalizationKey:async(t,n)=>h(`/LocalizationKey/${t}`,{method:"POST",apiUrl:e,body:n}),patchLocalizationKey:async(t,n)=>h(`/LocalizationKey/${t}`,{method:"PATCH",apiUrl:e,body:n})}),C=e=>({getMedia:async(t,n)=>h(`/Media/${t}/${n}`,{method:"GET",apiUrl:e}),deleteMedia:async(t,n)=>h(`/Media/${t}/${n}`,{method:"DELETE",apiUrl:e}),getMedium:async(t,n,r)=>h(`/Medium/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),patchMedium:async(t,n,r)=>h(`/Medium/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),deleteMedium:(t,n,r)=>h(`/Medium/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),postMedium:async(t,n)=>h(`/Medium/${t}/${n}`,{method:"GET",apiUrl:e})}),k=e=>({getMemories:async(t,n)=>h(`/Memories/${t}${n?`/${n}`:""}`,{method:"GET",apiUrl:e}),getMemoriesPaginated:async(t,n,r,i)=>h(`/Memories/${t}/${n}/${r}${i?`/${i}`:""}`,{method:"GET",apiUrl:e}),getMemory:async(t,n)=>h(`/Memory/${t}/${n}`,{method:"GET",apiUrl:e}),patchMemory:async(t,n)=>h(`/Memory/${t}/${n.memoryID}`,{method:"PATCH",apiUrl:e,body:n}),deleteMemory:async(t,n)=>h(`/Memory/${t}/${n}`,{method:"DELETE",apiUrl:e}),postMemory:async(t,n)=>h(`/Memory/${t}`,{method:"POST",apiUrl:e,body:n}),getMemoryAccess:async(t,n)=>h(`/MemoryAccess/${t}/${n}`,{method:"GET",apiUrl:e})}),T=e=>({getWordVector:async(t,n)=>h(`/WordVector/${t}/${n}`,{method:"GET",apiUrl:e}),getSimilarWords:async(t,n)=>h(`/SimilarWords/${t}/${n}`,{method:"GET",apiUrl:e}),guessLanguage:async(t,n)=>h(`/GuessLanguage/${t}`,{method:"POST",apiUrl:e,body:{text:n}}),computeSimilarity:async(t,n,r,i,o)=>h(`/ComputeSimilarity/${t}`,{method:"POST",apiUrl:e,body:{referenceText:n,referenceTextType:r,comparisonText:i,comparisonTextType:o}}),checkWords:async(t,n)=>h(`/CheckWords/${t}`,{method:"POST",apiUrl:e,body:{text:n}})}),I=e=>({getPeople:async t=>h(`/People/${t}`,{method:"GET",apiUrl:e}),getPerson:async(t,n)=>h(`/Person/${t}/${n}`,{method:"GET",apiUrl:e}),patchPerson:async(t,n)=>h(`/Person/${t}/${n.personID}`,{method:"PATCH",body:n,apiUrl:e}),deletePerson:async(t,n)=>h(`/Person/${t}/${n}`,{method:"DELETE",apiUrl:e}),postPerson:async(t,n)=>h(`/Person/${t}`,{method:"POST",body:n,apiUrl:e})}),O=e=>({getPromptedQuestions:async t=>h(`/PromptedQuestions/${t}`,{method:"GET",apiUrl:e}),getPromptedQuestion:async(t,n)=>h(`/PromptedQuestion/${t}/${n}`,{method:"GET",apiUrl:e}),patchPromptedQuestion:async(t,n)=>h(`/PromptedQuestion/${t}/${n}`,{method:"GET",apiUrl:e}),deletePromptedQuestion:async(t,n)=>h(`/PromptedQuestion/${t}/${n}`,{method:"GET",apiUrl:e}),postPromptedQuestion:async t=>h(`/PromptedQuestion/${t}`,{method:"GET",apiUrl:e})}),R=e=>({searchMemory:async(t,n)=>h(`/Search/${t}`,{method:"POST",body:n,apiUrl:e}),postRandom:async t=>h(`/Random/${t}`,{method:"POST",apiUrl:e}),postHints:async t=>h(`/Hints/${t}`,{method:"GET",apiUrl:e})}),P=e=>({initSession:async t=>h("/Session",{method:"POST",body:t,apiUrl:e}),getSession:async t=>h(`/Session/${t}`,{method:"GET",apiUrl:e}),deleteSession:async t=>h(`/Session/${t}`,{method:"DELETE",apiUrl:e})}),N=e=>({getStatistics:async t=>h(`/Statistics/${t}`,{method:"GET",apiUrl:e}),getContentQualityIndexes:async t=>h(`/ContentQualityIndexes/${t}`,{method:"GET",apiUrl:e}),getTextQualityIndexes:async t=>h(`/TextQualityIndexes/${t}`,{method:"GET",apiUrl:e}),getEventLogs:async(t,n,r)=>h(`/EventLogs/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),getMemoryEventLogs:async(t,n,r,i)=>h(`/EventLogs/${t}/${n}/${r}/${i}`,{method:"GET",apiUrl:e}),getIntentEventLogs:async(t,n,r,i)=>h(`/EventLogs/${t}/${n}/${r}/${i}`,{method:"GET",apiUrl:e})}),L=e=>({getUnansweredQuestions:async t=>h(`/UnansweredQuestions/${t}`,{method:"GET",apiUrl:e}),getUnansweredQuestionsPaginated:async(t,n,r)=>h(`/UnansweredQuestions/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),postUnansweredQuestion:async(t,n)=>h(`/UnansweredQuestion/${t}`,{method:"POST",apiUrl:e,body:n}),deleteUnansweredQuestion:async(t,n)=>h(`/UnansweredQuestion/${t}/${n}`,{method:"DELETE",apiUrl:e})}),D=e=>({getContextVars:async t=>h(`/ContextVars/${t}`,{method:"GET",apiUrl:e}),getContextVarNames:async t=>h(`/ContextVarNames/${t}`,{method:"GET",apiUrl:e}),getContextVarValues:async(t,n)=>h(`/ContextVarValues/${t}/${n}`,{method:"GET",apiUrl:e})}),B=e=>({getCustomWords:async t=>h(`/CustomWords/${t}`,{method:"GET",apiUrl:e}),getCustomWord:async(t,n)=>h(`/CustomWord/${t}/${n}`,{method:"GET",apiUrl:e}),deleteCustomWord:async(t,n)=>h(`/CustomWord/${t}/${n}`,{method:"DELETE",apiUrl:e}),postCustomWord:async(t,n)=>h(`/CustomWord/${t}`,{method:"POST",apiUrl:e,body:n}),patchCustomWord:async(t,n)=>h(`/CustomWord/${t}/${n.customWordID}`,{method:"PATCH",apiUrl:e,body:n})}),j=e=>({getChatLogs:async(t,n,r)=>h(`/ChatLogs/${t}${n?`/${n}`:""}${n&&r?`/${r}`:""}`,{method:"GET",apiUrl:e}),getSessionChatLogs:async(t,n)=>h(`/SessionChatLogs/${t}/${n}`,{method:"GET",apiUrl:e}),deleteChatLogs:async(t,n,r)=>h(`/ChatLogs/${t}${n?`/${n}`:""}${n&&r?`/${r}`:""}`,{method:"DELETE",apiUrl:e}),deleteChatLog:async(t,n)=>h(`/ChatLog/${t}/${n}`,{method:"DELETE",apiUrl:e})}),F=e=>({getExpertReferences:async t=>h(`/ExpertReferences/${t}`,{method:"GET",apiUrl:e}),getExpertReferencesPaginated:async(t,n,r)=>h(`/ExpertReferences/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),getExpertReference:async(t,n)=>h(`/ExpertReference/${t}/${n}`,{method:"GET",apiUrl:e}),updateExpertReference:async(t,n)=>h(`/ExpertReference/${t}/${n.expertID}`,{method:"PATCH",apiUrl:e,body:n}),createExpertReference:async(t,n)=>h(`/ExpertReference/${t}`,{method:"POST",apiUrl:e,body:n}),deleteExpertReference:async(t,n)=>h(`/ExpertReference/${t}/${n}`,{method:"DELETE",apiUrl:e})}),U=e=>({correlationPairs:M(e),...M(e),dialog:_(e),..._(e),intents:A(e),...A(e),localizationKeys:E(e),...E(e),media:C(e),...C(e),memories:k(e),...k(e),nlp:T(e),...T(e),people:I(e),...I(e),promptedQuestions:O(e),...O(e),search:R(e),...R(e),session:P(e),...P(e),stats:N(e),...N(e),unansweredQuestions:L(e),...L(e),contextVars:D(e),...D(e),customDictionary:B(e),...B(e),chatLogs:j(e),...j(e),expertReferences:F(e),...F(e)}),z={};e(z,"allowedMediaTypes",(()=>H)),e(z,"anonTag",(()=>V));const H=["image/jpeg","image/png","image/jpg","image/gif","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/pdf","video/mp4","video/avi","audio/mpeg3","audio/wav","audio/mpeg","video/mpeg","model/gltf-binary"],V="👤";var W=e=>({getResourceUrl:({type:t,resourceURI:n,sessionID:r,baseURL:i="https://app.twincreator.com"})=>{let o="cover"===t?`${i}/images/memoriCover.png`:`${i}/images/memoriAvatar.png`;return n&&0!==n.length?n.includes("memoriai/memory")?`${n}?memori-ai-session-id=${r}`:n.startsWith("https://")||n.startsWith("http://")?`${n}${r?`/${r}`:""}`:n.startsWith("cloud://")?`${e.replace(/v2/,"v1")}/CloudAsset/${n.replace("cloud://","")}`:n.startsWith("guid://")?`${e.replace(/v2/,"v1")}/GuidAsset/${n.replace("guid://","")}`:o:o}});var G=e=>{const t=d(e),n=`${t}/memori/v2`,r=`${t}/api/v2`;return{backend:S(r),...U(n),constants:{...z,HOSTNAME:t,BACKEND_URL:r,ENGINE_URL:n},asset:W(r)}},q=(u=a("85Hg2"),{}),K={};(K=function(e){if(Array.isArray(e))return e}).__esModule=!0,K.default=K;var Y={};(Y=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}).__esModule=!0,Y.default=Y;var J={},Q={};(Q=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}).__esModule=!0,Q.default=Q,J=function(e,t){if(e){if("string"==typeof e)return Q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q(e,t):void 0}},J.__esModule=!0,J.default=J;var X={};(X=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}).__esModule=!0,X.default=X,(q=function(e,t){return K(e)||Y(e,t)||J(e,t)||X()}).__esModule=!0,q.default=q;var Z={},$={},ee={};function te(e){return ee=te="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},ee.__esModule=!0,ee.default=ee,te(e)}(ee=te).__esModule=!0,ee.default=ee;var ne=ee.default,re={},ie=ee.default;(re=function(e,t){if("object"!==ie(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==ie(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}).__esModule=!0,re.default=re,($=function(e){var t=re(e,"string");return"symbol"===ne(t)?t:String(t)}).__esModule=!0,$.default=$,(Z=function(e,t,n){return(t=$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}).__esModule=!0,Z.default=Z;u=a("85Hg2");var oe={};(oe=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}).__esModule=!0,oe.default=oe;var ae={};function se(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)}}(ae=function(e,t,n){return t&&se(e.prototype,t),n&&se(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}).__esModule=!0,ae.default=ae;u=a("85Hg2");var le=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ce={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},ue=function(e){return ce[e]};var de,fe={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(le,ue)}},he=(0,u.createContext)();function pe(){return fe}var me=function(){function e(){r(oe)(this,e),this.usedNamespaces={}}return r(ae)(e,[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function ge(){return de}function ve(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"string"==typeof n[0]&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var ye={};function be(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&ye[t[0]]||("string"==typeof t[0]&&(ye[t[0]]=new Date),ve.apply(void 0,t))}function we(e,t,n){e.loadNamespaces(t,(function(){if(e.isInitialized)n();else{e.on("initialized",(function t(){setTimeout((function(){e.off("initialized",t)}),0),n()}))}}))}function xe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.languages[0],i=!!t.options&&t.options.fallbackLng,o=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e))&&(!!t.hasResourceBundle(r,e)||(!(t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages))||!(!a(r,e)||i&&!a(o,e))))}function Se(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t.languages||!t.languages.length)return be("i18n.languages were undefined or empty",t.languages),!0;var r=void 0!==t.options.ignoreJSONStructure;return r?t.hasLoadedNamespace(e,{precheck:function(t,r){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):xe(e,t,n)}function Me(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){r(Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ee=function(e,t){var n=(0,u.useRef)();return(0,u.useEffect)((function(){n.current=t?n.current:e}),[e,t]),n.current};function Ce(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.i18n,i=(0,u.useContext)(he)||{},o=i.i18n,a=i.defaultNS,s=n||o||ge();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new me),!s){be("You will need to pass in an i18next instance by using initReactI18next");var l=function(e){return Array.isArray(e)?e[e.length-1]:e},c=[l,{},!1];return c.t=l,c.i18n={},c.ready=!1,c}s.options.react&&void 0!==s.options.react.wait&&be("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var d=Ae(Ae(Ae({},pe()),s.options.react),t),f=d.useSuspense,h=d.keyPrefix,p=e||a||s.options&&s.options.defaultNS;p="string"==typeof p?[p]:p||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(p);var m=(s.isInitialized||s.initializedStoreOnce)&&p.every((function(e){return Se(e,s,d)}));function g(){return s.getFixedT(null,"fallback"===d.nsMode?p:p[0],h)}var v=(0,u.useState)(g),y=r(q)(v,2),b=y[0],w=y[1],x=p.join(),S=Ee(x),M=(0,u.useRef)(!0);(0,u.useEffect)((function(){var e=d.bindI18n,t=d.bindI18nStore;function n(){M.current&&w(g)}return M.current=!0,m||f||we(s,p,(function(){M.current&&w(g)})),m&&S&&S!==x&&M.current&&w(g),e&&s&&s.on(e,n),t&&s&&s.store.on(t,n),function(){M.current=!1,e&&s&&e.split(" ").forEach((function(e){return s.off(e,n)})),t&&s&&t.split(" ").forEach((function(e){return s.store.off(e,n)}))}}),[s,x]);var _=(0,u.useRef)(!0);(0,u.useEffect)((function(){M.current&&!_.current&&w(g),_.current=!1}),[s,h]);var A=[b,s,m];if(A.t=b,A.i18n=s,A.ready=m,m)return A;if(!m&&!f)return A;throw new Promise((function(e){we(s,p,(function(){e()}))}))}var ke={};!function(e,t,n,r){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(t),a=i(n),s=i(r),l=function(e,t,n){return{endTime:t,insertTime:n,type:"exponentialRampToValue",value:e}},c=function(e,t,n){return{endTime:t,insertTime:n,type:"linearRampToValue",value:e}},u=function(e,t){return{startTime:t,type:"setValue",value:e}},d=function(e,t,n){return{duration:n,startTime:t,type:"setValueCurve",values:e}},f=function(e,t,n){var r=n.startTime,i=n.target,o=n.timeConstant;return i+(t-i)*Math.exp((r-e)/o)},h=function(e){return"exponentialRampToValue"===e.type},p=function(e){return"linearRampToValue"===e.type},m=function(e){return h(e)||p(e)},g=function(e){return"setValue"===e.type},v=function(e){return"setValueCurve"===e.type},y=function e(t,n,r,i){var o=t[n];return void 0===o?i:m(o)||g(o)?o.value:v(o)?o.values[o.values.length-1]:f(r,e(t,n-1,o.startTime,i),o)},b=function(e,t,n,r,i){return void 0===n?[r.insertTime,i]:m(n)?[n.endTime,n.value]:g(n)?[n.startTime,n.value]:v(n)?[n.startTime+n.duration,n.values[n.values.length-1]]:[n.startTime,y(e,t-1,n.startTime,i)]},w=function(e){return"cancelAndHold"===e.type},x=function(e){return"cancelScheduledValues"===e.type},S=function(e){return w(e)||x(e)?e.cancelTime:h(e)||p(e)?e.endTime:e.startTime},M=function(e,t,n,r){var i=r.endTime,o=r.value;return n===o?o:0<n&&0<o||n<0&&o<0?n*Math.pow(o/n,(e-t)/(i-t)):0},_=function(e,t,n,r){return n+(e-t)/(r.endTime-t)*(r.value-n)},A=function(e,t){var n=Math.floor(t),r=Math.ceil(t);return n===r?e[n]:(1-(t-n))*e[n]+(1-(r-t))*e[r]},E=function(e,t){var n=t.duration,r=t.startTime,i=t.values,o=(e-r)/n*(i.length-1);return A(i,o)},C=function(e){return"setTarget"===e.type},k=function(e){function t(e){a.default(this,t),this._automationEvents=[],this._currenTime=0,this._defaultValue=e}return s.default(t,[{key:e,value:function(){return this._automationEvents[Symbol.iterator]()}},{key:"add",value:function(e){var t=S(e);if(w(e)||x(e)){var n=this._automationEvents.findIndex((function(n){return x(e)&&v(n)?n.startTime+n.duration>=t:S(n)>=t})),r=this._automationEvents[n];if(-1!==n&&(this._automationEvents=this._automationEvents.slice(0,n)),w(e)){var i=this._automationEvents[this._automationEvents.length-1];if(void 0!==r&&m(r)){if(C(i))throw new Error("The internal list is malformed.");var o=v(i)?i.startTime+i.duration:S(i),a=v(i)?i.values[i.values.length-1]:i.value,s=h(r)?M(t,o,a,r):_(t,o,a,r),f=h(r)?l(s,t,this._currenTime):c(s,t,this._currenTime);this._automationEvents.push(f)}void 0!==i&&C(i)&&this._automationEvents.push(u(this.getValue(t),t)),void 0!==i&&v(i)&&i.startTime+i.duration>t&&(this._automationEvents[this._automationEvents.length-1]=d(new Float32Array([6,7]),i.startTime,t-i.startTime))}}else{var g=this._automationEvents.findIndex((function(e){return S(e)>t})),y=-1===g?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[g-1];if(void 0!==y&&v(y)&&S(y)+y.duration>t)return!1;var b=h(e)?l(e.value,e.endTime,this._currenTime):p(e)?c(e.value,t,this._currenTime):e;if(-1===g)this._automationEvents.push(b);else{if(v(e)&&t+e.duration>S(this._automationEvents[g]))return!1;this._automationEvents.splice(g,0,b)}}return!0}},{key:"flush",value:function(e){var t=this._automationEvents.findIndex((function(t){return S(t)>e}));if(t>1){var n=this._automationEvents.slice(t-1),r=n[0];C(r)&&n.unshift(u(y(this._automationEvents,t-2,r.startTime,this._defaultValue),r.startTime)),this._automationEvents=n}}},{key:"getValue",value:function(e){if(0===this._automationEvents.length)return this._defaultValue;var t=this._automationEvents.findIndex((function(t){return S(t)>e})),n=this._automationEvents[t],r=(-1===t?this._automationEvents.length:t)-1,i=this._automationEvents[r];if(void 0!==i&&C(i)&&(void 0===n||!m(n)||n.insertTime>e))return f(e,y(this._automationEvents,r-1,i.startTime,this._defaultValue),i);if(void 0!==i&&g(i)&&(void 0===n||!m(n)))return i.value;if(void 0!==i&&v(i)&&(void 0===n||!m(n)||i.startTime+i.duration>e))return e<i.startTime+i.duration?E(e,i):i.values[i.values.length-1];if(void 0!==i&&m(i)&&(void 0===n||!m(n)))return i.value;if(void 0!==n&&h(n)){var a=b(this._automationEvents,r,i,n,this._defaultValue),s=o.default(a,2),l=s[0],c=s[1];return M(e,l,c,n)}if(void 0!==n&&p(n)){var u=b(this._automationEvents,r,i,n,this._defaultValue),d=o.default(u,2),w=d[0],x=d[1];return _(e,w,x,n)}return this._defaultValue}}]),t}(Symbol.iterator),T=function(e){return{cancelTime:e,type:"cancelAndHold"}},I=function(e){return{cancelTime:e,type:"cancelScheduledValues"}},O=function(e,t){return{endTime:t,type:"exponentialRampToValue",value:e}},R=function(e,t){return{endTime:t,type:"linearRampToValue",value:e}},P=function(e,t,n){return{startTime:t,target:e,timeConstant:n,type:"setTarget"}};e.AutomationEventList=k,e.createCancelAndHoldAutomationEvent=T,e.createCancelScheduledValuesAutomationEvent=I,e.createExponentialRampToValueAutomationEvent=O,e.createLinearRampToValueAutomationEvent=R,e.createSetTargetAutomationEvent=P,e.createSetValueAutomationEvent=u,e.createSetValueCurveAutomationEvent=d,Object.defineProperty(e,"__esModule",{value:!0})}(ke,a("kagof"),a("4qTFT"),a("9uC66"));const Te=new WeakSet,Ie=new WeakMap,Oe=new WeakMap,Re=new WeakMap,Pe=new WeakMap,Ne=new WeakMap,Le=new WeakMap,De=new WeakMap,Be=new WeakMap,je=new WeakMap,Fe={construct:()=>Fe},Ue=e=>{try{new new Proxy(e,Fe)}catch{return!1}return!0},ze=/^import(?:(?:[\s]+[\w]+|(?:[\s]+[\w]+[\s]*,)?[\s]*\{[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?(?:[\s]*,[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?)*[\s]*}|(?:[\s]+[\w]+[\s]*,)?[\s]*\*[\s]+as[\s]+[\w]+)[\s]+from)?(?:[\s]*)("([^"\\]|\\.)+"|'([^'\\]|\\.)+')(?:[\s]*);?/,He=(e,t)=>{const n=[];let r=e.replace(/^[\s]+/,""),i=r.match(ze);for(;null!==i;){const e=i[1].slice(1,-1),o=i[0].replace(/([\s]+)?;?$/,"").replace(e,new URL(e,t).toString());n.push(o),r=r.slice(i[0].length).replace(/^[\s]+/,""),i=r.match(ze)}return[n.join(";"),r]},Ve=e=>{if(void 0!==e&&!Array.isArray(e))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},We=e=>{if(!Ue(e))throw new TypeError("The given value for processorCtor should be a constructor.");if(null===e.prototype||"object"!=typeof e.prototype)throw new TypeError("The given value for processorCtor should have a prototype.")},Ge=(e,t)=>{const n=e.get(t);if(void 0===n)throw new Error("A value with the given key could not be found.");return n},qe=(e,t)=>{const n=Array.from(e).filter(t);if(n.length>1)throw Error("More than one element was found.");if(0===n.length)throw Error("No element was found.");const[r]=n;return e.delete(r),r},Ke=(e,t,n,r)=>{const i=Ge(e,t),o=qe(i,(e=>e[0]===n&&e[1]===r));return 0===i.size&&e.delete(t),o},Ye=e=>Ge(Le,e),Je=e=>{if(Te.has(e))throw new Error("The AudioNode is already stored.");Te.add(e),Ye(e).forEach((e=>e(!0)))},Qe=e=>"port"in e,Xe=e=>{if(!Te.has(e))throw new Error("The AudioNode is not stored.");Te.delete(e),Ye(e).forEach((e=>e(!1)))},Ze=(e,t)=>{!Qe(e)&&t.every((e=>0===e.size))&&Xe(e)},$e={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},et=(e,t)=>e.context===t,tt=e=>{try{e.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},nt=()=>new DOMException("","IndexSizeError"),rt=e=>{var t;e.getChannelData=(t=e.getChannelData,n=>{try{return t.call(e,n)}catch(e){if(12===e.code)throw nt();throw e}})},it={numberOfChannels:1},ot=-34028234663852886e22,at=34028234663852886e22,st=e=>Te.has(e),lt={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},ct=e=>"playbackRate"in e,ut=e=>"frequency"in e&&"gain"in e,dt=e=>"offset"in e,ft=e=>!("frequency"in e)&&"gain"in e,ht=e=>"detune"in e&&"frequency"in e,pt=e=>"pan"in e,mt=e=>Ge(Ie,e),gt=e=>Ge(Re,e),vt=(e,t)=>{const{activeInputs:n}=mt(e);n.forEach((n=>n.forEach((([n])=>{t.includes(e)||vt(n,[...t,e])}))));const r=ct(e)?[e.playbackRate]:Qe(e)?Array.from(e.parameters.values()):ut(e)?[e.Q,e.detune,e.frequency,e.gain]:dt(e)?[e.offset]:ft(e)?[e.gain]:ht(e)?[e.detune,e.frequency]:pt(e)?[e.pan]:[];for(const e of r){const n=gt(e);void 0!==n&&n.activeInputs.forEach((([e])=>vt(e,t)))}st(e)&&Xe(e)},yt=e=>{vt(e.destination,[])},bt=e=>void 0===e||"number"==typeof e||"string"==typeof e&&("balanced"===e||"interactive"===e||"playback"===e),wt=e=>"context"in e,xt=e=>wt(e[0]),St=(e,t,n,r)=>{for(const t of e)if(n(t)){if(r)return!1;throw Error("The set contains at least one similar element.")}return e.add(t),!0},Mt=(e,t,[n,r],i)=>{St(e,[t,n,r],(e=>e[0]===t&&e[1]===n),i)},_t=(e,[t,n,r],i)=>{const o=e.get(t);void 0===o?e.set(t,new Set([[n,r]])):St(o,[n,r],(e=>e[0]===n),i)},At=e=>"inputs"in e,Et=(e,t,n,r)=>{if(At(t)){const i=t.inputs[r];return e.connect(i,n,0),[i,n,0]}return e.connect(t,n,r),[t,n,r]},Ct=(e,t,n)=>{for(const r of e)if(r[0]===t&&r[1]===n)return e.delete(r),r;return null},kt=(e,t,n)=>qe(e,(e=>e[0]===t&&e[1]===n)),Tt=(e,t)=>{if(!Ye(e).delete(t))throw new Error("Missing the expected event listener.")},It=(e,t,n)=>{const r=Ge(e,t),i=qe(r,(e=>e[0]===n));return 0===r.size&&e.delete(t),i},Ot=(e,t,n,r)=>{At(t)?e.disconnect(t.inputs[r],n,0):e.disconnect(t,n,r)},Rt=e=>Ge(Oe,e),Pt=e=>Ge(Pe,e),Nt=e=>De.has(e),Lt=e=>!Te.has(e),Dt=(e,t)=>new Promise((n=>{if(null!==t)n(!0);else{const t=e.createScriptProcessor(256,1,1),r=e.createGain(),i=e.createBuffer(1,2,44100),o=i.getChannelData(0);o[0]=1,o[1]=1;const a=e.createBufferSource();a.buffer=i,a.loop=!0,a.connect(t).connect(e.destination),a.connect(r),a.disconnect(r),t.onaudioprocess=r=>{const i=r.inputBuffer.getChannelData(0);Array.prototype.some.call(i,(e=>1===e))?n(!0):n(!1),a.stop(),t.onaudioprocess=null,a.disconnect(t),t.disconnect(e.destination)},a.start()}})),Bt=(e,t)=>{const n=new Map;for(const t of e)for(const e of t){const t=n.get(e);n.set(e,void 0===t?1:t+1)}n.forEach(((e,n)=>t(n,e)))},jt=e=>"context"in e,Ft=e=>{const t=new Map;var n,r;e.connect=(n=e.connect.bind(e),(e,r=0,i=0)=>{const o=jt(e)?n(e,r,i):n(e,r),a=t.get(e);return void 0===a?t.set(e,[{input:i,output:r}]):a.every((e=>e.input!==i||e.output!==r))&&a.push({input:i,output:r}),o}),e.disconnect=(r=e.disconnect,(n,i,o)=>{if(r.apply(e),void 0===n)t.clear();else if("number"==typeof n)for(const[e,r]of t){const i=r.filter((e=>e.output!==n));0===i.length?t.delete(e):t.set(e,i)}else if(t.has(n))if(void 0===i)t.delete(n);else{const e=t.get(n);if(void 0!==e){const r=e.filter((e=>e.output!==i&&(e.input!==o||void 0===o)));0===r.length?t.delete(n):t.set(n,r)}}for(const[n,r]of t)r.forEach((t=>{jt(n)?e.connect(n,t.output,t.input):e.connect(n,t.output)}))})},Ut=(e,t,n,r)=>{const{activeInputs:i,passiveInputs:o}=gt(t),{outputs:a}=mt(e),s=Ye(e),l=a=>{const s=Rt(e),l=Pt(t);if(a){const t=It(o,e,n);Mt(i,e,t,!1),r||Nt(e)||s.connect(l,n)}else{const t=kt(i,e,n);_t(o,t,!1),r||Nt(e)||s.disconnect(l,n)}};return!!St(a,[t,n],(e=>e[0]===t&&e[1]===n),!0)&&(s.add(l),st(e)?Mt(i,e,[n,l],!0):_t(o,[e,n,l],!0),!0)},zt=(e,t,n,r,i)=>{const[o,a]=((e,t,n,r)=>{const{activeInputs:i,passiveInputs:o}=mt(t),a=Ct(i[r],e,n);if(null===a)return[Ke(o,e,n,r)[2],!1];return[a[2],!0]})(e,n,r,i);if(null!==o&&(Tt(e,o),!a||t||Nt(e)||Ot(Rt(e),Rt(n),r,i)),st(n)){const{activeInputs:e}=mt(n);Ze(n,e)}},Ht=(e,t,n,r)=>{const[i,o]=((e,t,n)=>{const{activeInputs:r,passiveInputs:i}=gt(t),o=Ct(r,e,n);if(null===o)return[It(i,e,n)[1],!1];return[o[2],!0]})(e,n,r);null!==i&&(Tt(e,i),!o||t||Nt(e)||Rt(e).disconnect(Pt(n),r))};class Vt{constructor(e){this._map=new Map(e)}get size(){return this._map.size}entries(){return this._map.entries()}forEach(e,t=null){return this._map.forEach(((n,r)=>e.call(t,n,r,this)))}get(e){return this._map.get(e)}has(e){return this._map.has(e)}keys(){return this._map.keys()}values(){return this._map.values()}}const Wt={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,parameterData:{},processorOptions:{}};function Gt(e,t,n,r,i){if("function"==typeof e.copyFromChannel)0===t[n].byteLength&&(t[n]=new Float32Array(128)),e.copyFromChannel(t[n],r,i);else{const o=e.getChannelData(r);if(0===t[n].byteLength)t[n]=o.slice(i,i+128);else{const e=new Float32Array(o.buffer,i*Float32Array.BYTES_PER_ELEMENT,128);t[n].set(e)}}}const qt=(e,t,n,r,i)=>{"function"==typeof e.copyToChannel?0!==t[n].byteLength&&e.copyToChannel(t[n],r,i):0!==t[n].byteLength&&e.getChannelData(r).set(t[n],i)},Kt=(e,t)=>{const n=[];for(let r=0;r<e;r+=1){const e=[],i="number"==typeof t?t:t[r];for(let t=0;t<i;t+=1)e.push(new Float32Array(128));n.push(e)}return n},Yt=(e,t)=>{const n=Ge(je,e),r=Rt(t);return Ge(n,r)},Jt=async(e,t,n,r,i,o,a)=>{const s=null===t?128*Math.ceil(e.context.length/128):t.length,l=r.channelCount*r.numberOfInputs,c=i.reduce(((e,t)=>e+t),0),u=0===c?null:n.createBuffer(c,s,n.sampleRate);if(void 0===o)throw new Error("Missing the processor constructor.");const d=mt(e),f=await Yt(n,e),h=Kt(r.numberOfInputs,r.channelCount),p=Kt(r.numberOfOutputs,i),m=Array.from(e.parameters.keys()).reduce(((e,t)=>({...e,[t]:new Float32Array(128)})),{});for(let c=0;c<s;c+=128){if(r.numberOfInputs>0&&null!==t)for(let e=0;e<r.numberOfInputs;e+=1)for(let n=0;n<r.channelCount;n+=1)Gt(t,h[e],n,n,c);void 0!==o.parameterDescriptors&&null!==t&&o.parameterDescriptors.forEach((({name:e},n)=>{Gt(t,m,e,l+n,c)}));for(let e=0;e<r.numberOfInputs;e+=1)for(let t=0;t<i[e];t+=1)0===p[e][t].byteLength&&(p[e][t]=new Float32Array(128));try{const e=h.map(((e,t)=>0===d.activeInputs[t].size?[]:e)),t=a(c/n.sampleRate,n.sampleRate,(()=>f.process(e,p,m)));if(null!==u)for(let e=0,t=0;e<r.numberOfOutputs;e+=1){for(let n=0;n<i[e];n+=1)qt(u,p[e],n,t+n,c);t+=i[e]}if(!t)break}catch(t){e.dispatchEvent(new ErrorEvent("processorerror",{colno:t.colno,filename:t.filename,lineno:t.lineno,message:t.message}));break}}return u},Qt={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},Xt={channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6},Zt={channelCount:6,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:6},$t={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},en={buffer:null,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",disableNormalization:!1},tn=e=>{const{port1:t,port2:n}=new MessageChannel;return new Promise((r=>{const i=()=>{n.onmessage=null,t.close(),n.close(),r()};n.onmessage=()=>i();try{t.postMessage(e,[e])}finally{i()}}))},nn={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},rn=e=>"delayTime"in e,on=(e,t,n)=>{const r=t[n];if(void 0===r)throw e();return r},an={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},sn={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},ln=()=>new DOMException("","InvalidStateError"),cn=()=>new DOMException("","InvalidAccessError"),un=e=>{var t;e.getFrequencyResponse=(t=e.getFrequencyResponse,(n,r,i)=>{if(n.length!==r.length||r.length!==i.length)throw cn();return t.call(e,n,r,i)})},dn={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},fn=(e,t,n,r,i,o,a,s,l,c,u)=>{const d=c.length;let f=s;for(let s=0;s<d;s+=1){let d=n[0]*c[s];for(let t=1;t<i;t+=1){const r=f-t&l-1;d+=n[t]*o[r],d-=e[t]*a[r]}for(let e=i;e<r;e+=1)d+=n[e]*o[f-e&l-1];for(let n=i;n<t;n+=1)d-=e[n]*a[f-n&l-1];o[f]=c[s],a[f]=d,f=f+1&l-1,u[s]=d}return f},hn={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers"},pn=e=>{const t=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const n=e.decodeAudioData(t.buffer,(()=>{}));return void 0!==n&&(n.catch((()=>{})),!0)}catch{}return!1},mn={numberOfChannels:1},gn=(e,t,n)=>{const r=t[n];void 0!==r&&r!==e[n]&&(e[n]=r)},vn=(e,t)=>{gn(e,t,"channelCount"),gn(e,t,"channelCountMode"),gn(e,t,"channelInterpretation")},yn=e=>"function"==typeof e.getFloatTimeDomainData,bn=(e,t,n)=>{const r=t[n];void 0!==r&&r!==e[n].value&&(e[n].value=r)},wn=e=>{e.start=(t=>{let n=!1;return(r=0,i=0,o)=>{if(n)throw ln();t.call(e,r,i,o),n=!0}})(e.start)},xn=e=>{var t;e.start=(t=e.start,(n=0,r=0,i)=>{if("number"==typeof i&&i<0||r<0||n<0)throw new RangeError("The parameters can't be negative.");t.call(e,n,r,i)})},Sn=e=>{var t;e.stop=(t=e.stop,(n=0)=>{if(n<0)throw new RangeError("The parameter can't be negative.");t.call(e,n)})},Mn=e=>{const{port1:t}=new MessageChannel;try{t.postMessage(e)}finally{t.close()}},_n=(e,t)=>null===e?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(e*t))))),An=e=>new Promise(((t,n)=>{const{port1:r,port2:i}=new MessageChannel;r.onmessage=({data:e})=>{r.close(),i.close(),t(e)},r.onmessageerror=({data:e})=>{r.close(),i.close(),n(e)},i.postMessage(e)})),En=async(e,t)=>new e(await An(t)),Cn=(e,t,n,r)=>{let i=je.get(e);void 0===i&&(i=new WeakMap,je.set(e,i));const o=En(n,r);return i.set(t,o),o},kn=(e,t)=>{const n=e.createBiquadFilter();return vn(n,t),bn(n,t,"Q"),bn(n,t,"detune"),bn(n,t,"frequency"),bn(n,t,"gain"),gn(n,t,"type"),n},Tn=e=>{const t=e.numberOfOutputs;Object.defineProperty(e,"channelCount",{get:()=>t,set:e=>{if(e!==t)throw ln()}}),Object.defineProperty(e,"channelCountMode",{get:()=>"explicit",set:e=>{if("explicit"!==e)throw ln()}}),Object.defineProperty(e,"channelInterpretation",{get:()=>"discrete",set:e=>{if("discrete"!==e)throw ln()}})},In=(e,t)=>{const n=e.createChannelSplitter(t.numberOfOutputs);return vn(n,t),Tn(n),n},On=(e,t)=>(e.connect=t.connect.bind(t),e.disconnect=t.disconnect.bind(t),e),Rn=(e,t)=>{const n=e.createDelay(t.maxDelayTime);return vn(n,t),bn(n,t,"delayTime"),n},Pn=(e,t)=>{const n=e.createGain();return vn(n,t),bn(n,t,"gain"),n};function Nn(e,t){const n=t[0]*t[0]+t[1]*t[1];return[(e[0]*t[0]+e[1]*t[1])/n,(e[1]*t[0]-e[0]*t[1])/n]}function Ln(e,t){let n=[0,0];for(let o=e.length-1;o>=0;o-=1)i=t,n=[(r=n)[0]*i[0]-r[1]*i[1],r[0]*i[1]+r[1]*i[0]],n[0]+=e[o];var r,i;return n}const Dn=(e,t,n,r)=>e.createScriptProcessor(t,n,r),Bn=()=>new DOMException("","NotSupportedError"),jn={numberOfChannels:1},Fn={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,periodicWave:void 0,type:"sine"},Un={channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",coneInnerAngle:360,coneOuterAngle:360,coneOuterGain:0,distanceModel:"inverse",maxDistance:1e4,orientationX:1,orientationY:0,orientationZ:0,panningModel:"equalpower",positionX:0,positionY:0,positionZ:0,refDistance:1,rolloffFactor:1},zn={disableNormalization:!1},Hn={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},Vn=()=>new DOMException("","UnknownError"),Wn={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},Gn=(e,t,n)=>void 0===e.copyFromChannel?e.getChannelData(n)[0]:(e.copyFromChannel(t,n),t[0]),qn=e=>{if(null===e)return!1;const t=e.length;return t%2!=0?0!==e[Math.floor(t/2)]:e[t/2-1]+e[t/2]!==0},Kn=(e,t,n,r)=>{let i=e;for(;!i.hasOwnProperty(t);)i=Object.getPrototypeOf(i);const{get:o,set:a}=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(e,t,{get:n(o),set:r(a)})},Yn=(e,t,n)=>{try{e.setValueAtTime(t,n)}catch(r){if(9!==r.code)throw r;Yn(e,t,n+1e-7)}},Jn=e=>{const t=e.createOscillator();try{t.start(-1)}catch(e){return e instanceof RangeError}return!1},Qn=e=>{const t=e.createBuffer(1,1,44100),n=e.createBufferSource();n.buffer=t,n.start(),n.stop();try{return n.stop(),!0}catch{return!1}},Xn=e=>{const t=e.createOscillator();try{t.stop(-1)}catch(e){return e instanceof RangeError}return!1},Zn=(e,t)=>{const n=t.createGain();e.connect(n);const r=(i=e.disconnect,()=>{i.call(e,n),e.removeEventListener("ended",r)});var i;e.addEventListener("ended",r),On(e,n),e.stop=(t=>{let r=!1;return(i=0)=>{if(r)try{t.call(e,i)}catch{n.gain.setValueAtTime(0,i)}else t.call(e,i),r=!0}})(e.stop)},$n=(e,t)=>n=>{const r={value:e};return Object.defineProperties(n,{currentTarget:r,target:r}),"function"==typeof t?t.call(e,n):t.handleEvent.call(e,n)},er=(tr=St,(e,t,[n,r,i],o)=>{tr(e[r],[t,n,i],(e=>e[0]===t&&e[1]===n),o)});var tr;const nr=(e=>(t,n,[r,i,o],a)=>{const s=t.get(r);void 0===s?t.set(r,new Set([[i,n,o]])):e(s,[i,n,o],(e=>e[0]===i&&e[1]===n),a)})(St),rr=(ir=qe,(e,t,n,r)=>ir(e[r],(e=>e[0]===t&&e[1]===n)));var ir;const or=new WeakMap,ar=(sr=or,e=>{var t;return null!==(t=sr.get(e))&&void 0!==t?t:0});var sr;const lr=(cr=new Map,ur=new WeakMap,(e,t)=>{const n=ur.get(e);if(void 0!==n)return n;const r=cr.get(e);if(void 0!==r)return r;try{const n=t();return n instanceof Promise?(cr.set(e,n),n.catch((()=>!1)).then((t=>(cr.delete(e),ur.set(e,t),t)))):(ur.set(e,n),n)}catch{return ur.set(e,!1),!1}});var cr,ur;const dr="undefined"==typeof window?null:window,fr=(hr=lr,pr=nt,(e,t)=>{const n=e.createAnalyser();if(vn(n,t),!(t.maxDecibels>t.minDecibels))throw pr();return gn(n,t,"fftSize"),gn(n,t,"maxDecibels"),gn(n,t,"minDecibels"),gn(n,t,"smoothingTimeConstant"),hr(yn,(()=>yn(n)))||(e=>{e.getFloatTimeDomainData=t=>{const n=new Uint8Array(t.length);e.getByteTimeDomainData(n);const r=Math.max(n.length,e.fftSize);for(let e=0;e<r;e+=1)t[e]=.0078125*(n[e]-128);return t}})(n),n});var hr,pr;const mr=(gr=mt,e=>{const t=gr(e);if(null===t.renderer)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return t.renderer});var gr;const vr=((e,t,n)=>async(r,i,o)=>{const a=e(r);await Promise.all(a.activeInputs.map(((e,a)=>Array.from(e).map((async([e,s])=>{const l=t(e),c=await l.render(e,i),u=r.context.destination;n(e)||r===u&&n(r)||c.connect(o,s,a)})))).reduce(((e,t)=>[...e,...t]),[]))})(mt,mr,Nt),yr=(br=fr,wr=Rt,xr=vr,()=>{const e=new WeakMap;return{render(t,n){const r=e.get(n);return void 0!==r?Promise.resolve(r):(async(t,n)=>{let r=wr(t);if(!et(r,n)){const e={channelCount:r.channelCount,channelCountMode:r.channelCountMode,channelInterpretation:r.channelInterpretation,fftSize:r.fftSize,maxDecibels:r.maxDecibels,minDecibels:r.minDecibels,smoothingTimeConstant:r.smoothingTimeConstant};r=br(n,e)}return e.set(n,r),await xr(t,n,r),r})(t,n)}}});var br,wr,xr;const Sr=(Mr=Ne,e=>{const t=Mr.get(e);if(void 0===t)throw ln();return t});var Mr;const _r=(e=>null===e?null:e.hasOwnProperty("OfflineAudioContext")?e.OfflineAudioContext:e.hasOwnProperty("webkitOfflineAudioContext")?e.webkitOfflineAudioContext:null)(dr),Ar=(Er=_r,e=>null!==Er&&e instanceof Er);var Er;const Cr=new WeakMap,kr=(Tr=$n,class{constructor(e){this._nativeEventTarget=e,this._listeners=new WeakMap}addEventListener(e,t,n){if(null!==t){let r=this._listeners.get(t);void 0===r&&(r=Tr(this,t),"function"==typeof t&&this._listeners.set(t,r)),this._nativeEventTarget.addEventListener(e,r,n)}}dispatchEvent(e){return this._nativeEventTarget.dispatchEvent(e)}removeEventListener(e,t,n){const r=null===t?void 0:this._listeners.get(t);this._nativeEventTarget.removeEventListener(e,void 0===r?null:r,n)}});var Tr;const Ir=(e=>null===e?null:e.hasOwnProperty("AudioContext")?e.AudioContext:e.hasOwnProperty("webkitAudioContext")?e.webkitAudioContext:null)(dr),Or=(Rr=Ir,e=>null!==Rr&&e instanceof Rr);var Rr;const Pr=(e=>t=>null!==e&&"function"==typeof e.AudioNode&&t instanceof e.AudioNode)(dr),Nr=(e=>t=>null!==e&&"function"==typeof e.AudioParam&&t instanceof e.AudioParam)(dr),Lr=(e=>null===e?null:e.hasOwnProperty("AudioWorkletNode")?e.AudioWorkletNode:null)(dr),Dr=((e,t,n,r,i,o,a,s,l,c,u,d,f,h,p,m)=>class extends c{constructor(t,r,i,o){super(i),this._context=t,this._nativeAudioNode=i;const a=u(t);d(a)&&!0!==n(Dt,(()=>Dt(a,m)))&&Ft(i),Oe.set(this,i),Le.set(this,new Set),"closed"!==t.state&&r&&Je(this),e(this,o,i)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(e){this._nativeAudioNode.channelCount=e}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(e){this._nativeAudioNode.channelCountMode=e}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(e){this._nativeAudioNode.channelInterpretation=e}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(e,n=0,s=0){if(n<0||n>=this._nativeAudioNode.numberOfOutputs)throw i();const c=u(this._context),d=p(c);if(f(e)||h(e))throw o();if(wt(e)){const i=Rt(e);try{const t=Et(this._nativeAudioNode,i,n,s),r=Lt(this);(d||r)&&this._nativeAudioNode.disconnect(...t),"closed"!==this.context.state&&!r&&Lt(e)&&Je(e)}catch(e){if(12===e.code)throw o();throw e}if(t(this,e,n,s,d)){const t=l([this],e);Bt(t,r(d))}return e}const m=Pt(e);if("playbackRate"===m.name&&1024===m.maxValue)throw a();try{this._nativeAudioNode.connect(m,n),(d||Lt(this))&&this._nativeAudioNode.disconnect(m,n)}catch(e){if(12===e.code)throw o();throw e}if(Ut(this,e,n,d)){const t=l([this],e);Bt(t,r(d))}}disconnect(e,t,n){let r;const a=u(this._context),c=p(a);if(void 0===e)r=((e,t)=>{const n=mt(e),r=[];for(const i of n.outputs)xt(i)?zt(e,t,...i):Ht(e,t,...i),r.push(i[0]);return n.outputs.clear(),r})(this,c);else if("number"==typeof e){if(e<0||e>=this.numberOfOutputs)throw i();r=((e,t,n)=>{const r=mt(e),i=[];for(const o of r.outputs)o[1]===n&&(xt(o)?zt(e,t,...o):Ht(e,t,...o),i.push(o[0]),r.outputs.delete(o));return i})(this,c,e)}else{if(void 0!==t&&(t<0||t>=this.numberOfOutputs))throw i();if(wt(e)&&void 0!==n&&(n<0||n>=e.numberOfInputs))throw i();if(r=((e,t,n,r,i)=>{const o=mt(e);return Array.from(o.outputs).filter((e=>!(e[0]!==n||void 0!==r&&e[1]!==r||void 0!==i&&e[2]!==i))).map((n=>(xt(n)?zt(e,t,...n):Ht(e,t,...n),o.outputs.delete(n),n[0])))})(this,c,e,t,n),0===r.length)throw o()}for(const e of r){const t=l([this],e);Bt(t,s)}}})((Br=Ie,(e,t,n)=>{const r=[];for(let e=0;e<n.numberOfInputs;e+=1)r.push(new Set);Br.set(e,{activeInputs:r,outputs:new Set,passiveInputs:new WeakMap,renderer:t})}),((e,t,n,r,i,o,a,s,l,c,u,d,f)=>{const h=new WeakMap;return(p,m,g,v,y)=>{const{activeInputs:b,passiveInputs:w}=o(m),{outputs:x}=o(p),S=s(p),M=o=>{const s=l(m),c=l(p);if(o){const t=Ke(w,p,g,v);e(b,p,t,!1),y||d(p)||n(c,s,g,v),f(m)&&Je(m)}else{const e=r(b,p,g,v);t(w,v,e,!1),y||d(p)||i(c,s,g,v);const n=a(m);if(0===n)u(m)&&Ze(m,b);else{const e=h.get(m);void 0!==e&&clearTimeout(e),h.set(m,setTimeout((()=>{u(m)&&Ze(m,b)}),1e3*n))}}};return!!c(x,[m,g,v],(e=>e[0]===m&&e[1]===g&&e[2]===v),!0)&&(S.add(M),u(p)?e(b,p,[g,v,M],!0):t(w,v,[p,g,M],!0),!0)}})(er,nr,Et,rr,Ot,mt,ar,Ye,Rt,St,st,Nt,Lt),lr,((e,t,n,r,i,o)=>a=>(s,l)=>{const c=e.get(s);if(void 0===c){if(!a&&o(s)){const e=r(s),{outputs:o}=n(s);for(const n of o)if(xt(n)){const i=r(n[0]);t(e,i,n[1],n[2])}else{const t=i(n[0]);e.disconnect(t,n[1])}}e.set(s,l)}else e.set(s,c+l)})(De,Ot,mt,Rt,Pt,st),nt,cn,Bn,((e,t,n,r,i,o,a,s)=>(l,c)=>{const u=t.get(l);if(void 0===u)throw new Error("Missing the expected cycle count.");const d=o(l.context),f=s(d);if(u===c){if(t.delete(l),!f&&a(l)){const t=r(l),{outputs:o}=n(l);for(const n of o)if(xt(n)){const i=r(n[0]);e(t,i,n[1],n[2])}else{const e=i(n[0]);t.connect(e,n[1])}}}else t.set(l,u-c)})(Et,De,mt,Rt,Pt,Sr,st,Ar),((e,t,n)=>function r(i,o){const a=wt(o)?o:n(e,o);if(rn(a))return[];if(i[0]===a)return[i];if(i.includes(a))return[];const{outputs:s}=t(a);return Array.from(s).map((e=>r([...i,a],e[0]))).reduce(((e,t)=>e.concat(t)),[])})(Cr,mt,Ge),kr,Sr,Or,Pr,Nr,Ar,Lr);var Br;const jr=((e,t,n,r,i,o)=>class extends e{constructor(e,n){const a=i(e),s={...$e,...n},l=r(a,s);super(e,!1,l,o(a)?t():null),this._nativeAnalyserNode=l}get fftSize(){return this._nativeAnalyserNode.fftSize}set fftSize(e){this._nativeAnalyserNode.fftSize=e}get frequencyBinCount(){return this._nativeAnalyserNode.frequencyBinCount}get maxDecibels(){return this._nativeAnalyserNode.maxDecibels}set maxDecibels(e){const t=this._nativeAnalyserNode.maxDecibels;if(this._nativeAnalyserNode.maxDecibels=e,!(e>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=t,n()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(e){const t=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=e,!(this._nativeAnalyserNode.maxDecibels>e))throw this._nativeAnalyserNode.minDecibels=t,n()}get smoothingTimeConstant(){return this._nativeAnalyserNode.smoothingTimeConstant}set smoothingTimeConstant(e){this._nativeAnalyserNode.smoothingTimeConstant=e}getByteFrequencyData(e){this._nativeAnalyserNode.getByteFrequencyData(e)}getByteTimeDomainData(e){this._nativeAnalyserNode.getByteTimeDomainData(e)}getFloatFrequencyData(e){this._nativeAnalyserNode.getFloatFrequencyData(e)}getFloatTimeDomainData(e){this._nativeAnalyserNode.getFloatTimeDomainData(e)}})(Dr,yr,nt,fr,Sr,Ar),Fr=new WeakSet,Ur=(e=>null===e?null:e.hasOwnProperty("AudioBuffer")?e.AudioBuffer:null)(dr),zr=(Hr=new Uint32Array(1),e=>(Hr[0]=e,Hr[0]));var Hr;const Vr=((e,t)=>n=>{n.copyFromChannel=(r,i,o=0)=>{const a=e(o),s=e(i);if(s>=n.numberOfChannels)throw t();const l=n.length,c=n.getChannelData(s),u=r.length;for(let e=a<0?-a:0;e+a<l&&e<u;e+=1)r[e]=c[e+a]},n.copyToChannel=(r,i,o=0)=>{const a=e(o),s=e(i);if(s>=n.numberOfChannels)throw t();const l=n.length,c=n.getChannelData(s),u=r.length;for(let e=a<0?-a:0;e+a<l&&e<u;e+=1)c[e+a]=r[e]}})(zr,nt),Wr=(Gr=zr,e=>{var t,n;e.copyFromChannel=(t=e.copyFromChannel,(n,r,i=0)=>{const o=Gr(i),a=Gr(r);if(o<e.length)return t.call(e,n,a,o)}),e.copyToChannel=(n=e.copyToChannel,(t,r,i=0)=>{const o=Gr(i),a=Gr(r);if(o<e.length)return n.call(e,t,a,o)})});var Gr;const qr=((e,t,n,r,i,o,a,s)=>{let l=null;return class c{constructor(c){if(null===i)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:u,numberOfChannels:d,sampleRate:f}={...it,...c};null===l&&(l=new i(1,1,44100));const h=null!==r&&t(o,o)?new r({length:u,numberOfChannels:d,sampleRate:f}):l.createBuffer(d,u,f);if(0===h.numberOfChannels)throw n();return"function"!=typeof h.copyFromChannel?(a(h),rt(h)):t(tt,(()=>tt(h)))||s(h),e.add(h),h}static[Symbol.hasInstance](t){return null!==t&&"object"==typeof t&&Object.getPrototypeOf(t)===c.prototype||e.has(t)}}})(Fr,lr,Bn,Ur,_r,(Kr=Ur,()=>{if(null===Kr)return!1;try{new Kr({length:1,sampleRate:44100})}catch{return!1}return!0}),Vr,Wr);var Kr;const Yr=(Jr=Pn,(e,t)=>{const n=Jr(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});t.connect(n).connect(e.destination);const r=()=>{t.removeEventListener("ended",r),t.disconnect(n),n.disconnect()};t.addEventListener("ended",r)});var Jr;const Qr=(Xr=mr,Zr=gt,$r=Nt,async(e,t,n)=>{const r=Zr(e);await Promise.all(Array.from(r.activeInputs).map((async([e,r])=>{const i=Xr(e),o=await i.render(e,t);$r(e)||o.connect(n,r)})))});var Xr,Zr,$r;const ei=(ti=Qr,(e,t,n)=>ti(t,e,n));var ti;const ni=((e,t,n,r,i,o,a,s,l,c,u)=>(d,f)=>{const h=d.createBufferSource();return vn(h,f),bn(h,f,"playbackRate"),gn(h,f,"buffer"),gn(h,f,"loop"),gn(h,f,"loopEnd"),gn(h,f,"loopStart"),t(n,(()=>n(d)))||wn(h),t(r,(()=>r(d)))||l(h),t(i,(()=>i(d)))||c(h,d),t(o,(()=>o(d)))||xn(h),t(a,(()=>a(d)))||u(h,d),t(s,(()=>s(d)))||Sn(h),e(d,h),h})(Yr,lr,(e=>{const t=e.createBufferSource();t.start();try{t.start()}catch{return!0}return!1}),(e=>{const t=e.createBufferSource(),n=e.createBuffer(1,1,44100);t.buffer=n;try{t.start(0,1)}catch{return!1}return!0}),(e=>{const t=e.createBufferSource();t.start();try{t.stop()}catch{return!1}return!0}),Jn,Qn,Xn,(e=>{var t;e.start=(t=e.start,(n=0,r=0,i)=>{const o=e.buffer,a=null===o?r:Math.min(o.duration,r);null!==o&&a>o.duration-.5/e.context.sampleRate?t.call(e,n,0,0):t.call(e,n,a,i)})}),(ri=Kn,(e,t)=>{const n=t.createBuffer(1,1,44100);null===e.buffer&&(e.buffer=n),ri(e,"buffer",(t=>()=>{const r=t.call(e);return r===n?null:r}),(t=>r=>t.call(e,null===r?n:r)))}),Zn);var ri;const ii=((e,t)=>(n,r,i)=>(e(r).replay(i),t(r,n,i)))((e=>t=>{const n=e(t);if(null===n.renderer)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return n.renderer})(gt),Qr),oi=((e,t,n,r,i)=>()=>{const o=new WeakMap;let a=null,s=null;return{set start(e){a=e},set stop(e){s=e},render(l,c){const u=o.get(c);return void 0!==u?Promise.resolve(u):(async(l,c)=>{let u=n(l);const d=et(u,c);if(!d){const e={buffer:u.buffer,channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,loop:u.loop,loopEnd:u.loopEnd,loopStart:u.loopStart,playbackRate:u.playbackRate.value};u=t(c,e),null!==a&&u.start(...a),null!==s&&u.stop(s)}return o.set(c,u),d?await e(c,l.playbackRate,u.playbackRate):await r(c,l.playbackRate,u.playbackRate),await i(l,c,u),u})(l,c)}}})(ei,ni,Rt,ii,vr),ai=((e,t,n,r,i,o,a,s,l,c,u,d,f)=>(h,p,m,g=null,v=null)=>{const y=new(0,ke.AutomationEventList)(m.defaultValue),b=p?r(y):null,w={get defaultValue(){return m.defaultValue},get maxValue(){return null===g?m.maxValue:g},get minValue(){return null===v?m.minValue:v},get value(){return m.value},set value(e){m.value=e,w.setValueAtTime(e,h.context.currentTime)},cancelAndHoldAtTime(e){if("function"==typeof m.cancelAndHoldAtTime)null===b&&y.flush(h.context.currentTime),y.add(i(e)),m.cancelAndHoldAtTime(e);else{const t=Array.from(y).pop();null===b&&y.flush(h.context.currentTime),y.add(i(e));const n=Array.from(y).pop();m.cancelScheduledValues(e),t!==n&&void 0!==n&&("exponentialRampToValue"===n.type?m.exponentialRampToValueAtTime(n.value,n.endTime):"linearRampToValue"===n.type?m.linearRampToValueAtTime(n.value,n.endTime):"setValue"===n.type?m.setValueAtTime(n.value,n.startTime):"setValueCurve"===n.type&&m.setValueCurveAtTime(n.values,n.startTime,n.duration))}return w},cancelScheduledValues:e=>(null===b&&y.flush(h.context.currentTime),y.add(o(e)),m.cancelScheduledValues(e),w),exponentialRampToValueAtTime(e,t){if(0===e)throw new RangeError;if(!Number.isFinite(t)||t<0)throw new RangeError;return null===b&&y.flush(h.context.currentTime),y.add(a(e,t)),m.exponentialRampToValueAtTime(e,t),w},linearRampToValueAtTime:(e,t)=>(null===b&&y.flush(h.context.currentTime),y.add(s(e,t)),m.linearRampToValueAtTime(e,t),w),setTargetAtTime:(e,t,n)=>(null===b&&y.flush(h.context.currentTime),y.add(l(e,t,n)),m.setTargetAtTime(e,t,n),w),setValueAtTime:(e,t)=>(null===b&&y.flush(h.context.currentTime),y.add(c(e,t)),m.setValueAtTime(e,t),w),setValueCurveAtTime(e,t,n){const r=e instanceof Float32Array?e:new Float32Array(e);if(null!==d&&"webkitAudioContext"===d.name){const e=t+n,i=h.context.sampleRate,o=Math.ceil(t*i),a=Math.floor(e*i),s=a-o,l=new Float32Array(s);for(let e=0;e<s;e+=1){const a=(r.length-1)/n*((o+e)/i-t),s=Math.floor(a),c=Math.ceil(a);l[e]=s===c?r[s]:(1-(a-s))*r[s]+(1-(c-a))*r[c]}null===b&&y.flush(h.context.currentTime),y.add(u(l,t,n)),m.setValueCurveAtTime(l,t,n);const c=a/i;c<e&&f(w,l[l.length-1],c),f(w,r[r.length-1],e)}else null===b&&y.flush(h.context.currentTime),y.add(u(r,t,n)),m.setValueCurveAtTime(r,t,n);return w}};return n.set(w,m),t.set(w,h),e(w,b),w})((si=Re,(e,t)=>{si.set(e,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:t})}),Cr,Pe,(e=>({replay(t){for(const n of e)if("exponentialRampToValue"===n.type){const{endTime:e,value:r}=n;t.exponentialRampToValueAtTime(r,e)}else if("linearRampToValue"===n.type){const{endTime:e,value:r}=n;t.linearRampToValueAtTime(r,e)}else if("setTarget"===n.type){const{startTime:e,target:r,timeConstant:i}=n;t.setTargetAtTime(r,e,i)}else if("setValue"===n.type){const{startTime:e,value:r}=n;t.setValueAtTime(r,e)}else{if("setValueCurve"!==n.type)throw new Error("Can't apply an unknown automation.");{const{duration:e,startTime:r,values:i}=n;t.setValueCurveAtTime(i,r,e)}}}})),ke.createCancelAndHoldAutomationEvent,ke.createCancelScheduledValuesAutomationEvent,ke.createExponentialRampToValueAutomationEvent,ke.createLinearRampToValueAutomationEvent,ke.createSetTargetAutomationEvent,ke.createSetValueAutomationEvent,ke.createSetValueCurveAutomationEvent,Ir,Yn);var si;const li=((e,t,n,r,i,o,a,s)=>class extends e{constructor(e,r){const s=o(e),l={...lt,...r},c=i(s,l),u=a(s),d=u?t():null;super(e,!1,c,d),this._audioBufferSourceNodeRenderer=d,this._isBufferNullified=!1,this._isBufferSet=null!==l.buffer,this._nativeAudioBufferSourceNode=c,this._onended=null,this._playbackRate=n(this,u,c.playbackRate,at,ot)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(e){if(this._nativeAudioBufferSourceNode.buffer=e,null!==e){if(this._isBufferSet)throw r();this._isBufferSet=!0}}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(e){this._nativeAudioBufferSourceNode.loop=e}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(e){this._nativeAudioBufferSourceNode.loopEnd=e}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(e){this._nativeAudioBufferSourceNode.loopStart=e}get onended(){return this._onended}set onended(e){const t="function"==typeof e?s(this,e):null;this._nativeAudioBufferSourceNode.onended=t;const n=this._nativeAudioBufferSourceNode.onended;this._onended=null!==n&&n===t?e:n}get playbackRate(){return this._playbackRate}start(e=0,t=0,n){if(this._nativeAudioBufferSourceNode.start(e,t,n),null!==this._audioBufferSourceNodeRenderer&&(this._audioBufferSourceNodeRenderer.start=void 0===n?[e,t]:[e,t,n]),"closed"!==this.context.state){Je(this);const e=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",e),st(this)&&Xe(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",e)}}stop(e=0){this._nativeAudioBufferSourceNode.stop(e),null!==this._audioBufferSourceNodeRenderer&&(this._audioBufferSourceNodeRenderer.stop=e)}})(Dr,oi,ai,ln,ni,Sr,Ar,$n),ci=((e,t,n,r,i,o,a,s)=>class extends e{constructor(e,n){const r=o(e),l=a(r),c=i(r,n,l);super(e,!1,c,l?t(s):null),this._isNodeOfNativeOfflineAudioContext=l,this._nativeAudioDestinationNode=c}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(e){if(this._isNodeOfNativeOfflineAudioContext)throw r();if(e>this._nativeAudioDestinationNode.maxChannelCount)throw n();this._nativeAudioDestinationNode.channelCount=e}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(e){if(this._isNodeOfNativeOfflineAudioContext)throw r();this._nativeAudioDestinationNode.channelCountMode=e}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}})(Dr,(e=>{const t=new WeakMap;return{render(n,r){const i=t.get(r);return void 0!==i?Promise.resolve(i):(async(n,r)=>{const i=r.destination;return t.set(r,i),await e(n,r,i),i})(n,r)}}}),nt,ln,((e,t)=>(n,r,i)=>{const o=n.destination;if(o.channelCount!==r)try{o.channelCount=r}catch{}i&&"explicit"!==o.channelCountMode&&(o.channelCountMode="explicit"),0===o.maxChannelCount&&Object.defineProperty(o,"maxChannelCount",{value:r});const a=e(n,{channelCount:r,channelCountMode:o.channelCountMode,channelInterpretation:o.channelInterpretation,gain:1});return t(a,"channelCount",(e=>()=>e.call(a)),(e=>t=>{e.call(a,t);try{o.channelCount=t}catch(e){if(t>o.maxChannelCount)throw e}})),t(a,"channelCountMode",(e=>()=>e.call(a)),(e=>t=>{e.call(a,t),o.channelCountMode=t})),t(a,"channelInterpretation",(e=>()=>e.call(a)),(e=>t=>{e.call(a,t),o.channelInterpretation=t})),Object.defineProperty(a,"maxChannelCount",{get:()=>o.maxChannelCount}),a.connect(o),a})(Pn,Kn),Sr,Ar,vr),ui=((e,t,n,r,i)=>()=>{const o=new WeakMap;return{render(a,s){const l=o.get(s);return void 0!==l?Promise.resolve(l):(async(a,s)=>{let l=n(a);const c=et(l,s);if(!c){const e={Q:l.Q.value,channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,detune:l.detune.value,frequency:l.frequency.value,gain:l.gain.value,type:l.type};l=t(s,e)}return o.set(s,l),c?(await e(s,a.Q,l.Q),await e(s,a.detune,l.detune),await e(s,a.frequency,l.frequency),await e(s,a.gain,l.gain)):(await r(s,a.Q,l.Q),await r(s,a.detune,l.detune),await r(s,a.frequency,l.frequency),await r(s,a.gain,l.gain)),await i(a,s,l),l})(a,s)}}})(ei,kn,Rt,ii,vr),di=(e=>(t,n)=>e.set(t,n))(or),fi=(hi=Dr,pi=ai,mi=ui,gi=cn,vi=kn,yi=Sr,bi=Ar,wi=di,class extends hi{constructor(e,t){const n=yi(e),r={...Qt,...t},i=vi(n,r),o=bi(n);super(e,!1,i,o?mi():null),this._Q=pi(this,o,i.Q,at,ot),this._detune=pi(this,o,i.detune,1200*Math.log2(at),-1200*Math.log2(at)),this._frequency=pi(this,o,i.frequency,e.sampleRate/2,0),this._gain=pi(this,o,i.gain,40*Math.log10(at),ot),this._nativeBiquadFilterNode=i,wi(this,1)}get detune(){return this._detune}get frequency(){return this._frequency}get gain(){return this._gain}get Q(){return this._Q}get type(){return this._nativeBiquadFilterNode.type}set type(e){this._nativeBiquadFilterNode.type=e}getFrequencyResponse(e,t,n){try{this._nativeBiquadFilterNode.getFrequencyResponse(e,t,n)}catch(e){if(11===e.code)throw gi();throw e}if(e.length!==t.length||t.length!==n.length)throw gi()}});var hi,pi,mi,gi,vi,yi,bi,wi;const xi=((e,t)=>(n,r,i)=>{const o=new Set;var a,s;return n.connect=(a=n.connect,(i,s=0,l=0)=>{const c=0===o.size;if(t(i))return a.call(n,i,s,l),e(o,[i,s,l],(e=>e[0]===i&&e[1]===s&&e[2]===l),!0),c&&r(),i;a.call(n,i,s),e(o,[i,s],(e=>e[0]===i&&e[1]===s),!0),c&&r()}),n.disconnect=(s=n.disconnect,(e,r,a)=>{const l=o.size>0;if(void 0===e)s.apply(n),o.clear();else if("number"==typeof e){s.call(n,e);for(const t of o)t[1]===e&&o.delete(t)}else{t(e)?s.call(n,e,r,a):s.call(n,e,r);for(const t of o)t[0]!==e||void 0!==r&&t[1]!==r||void 0!==a&&t[2]!==a||o.delete(t)}const c=0===o.size;l&&c&&i()}),n})(St,Pr),Si=(Mi=ln,_i=xi,(e,t)=>{t.channelCount=1,t.channelCountMode="explicit",Object.defineProperty(t,"channelCount",{get:()=>1,set:()=>{throw Mi()}}),Object.defineProperty(t,"channelCountMode",{get:()=>"explicit",set:()=>{throw Mi()}});const n=e.createBufferSource();_i(t,(()=>{const e=t.numberOfInputs;for(let r=0;r<e;r+=1)n.connect(t,0,r)}),(()=>n.disconnect(t)))});var Mi,_i;const Ai=((e,t)=>(n,r)=>{const i=n.createChannelMerger(r.numberOfInputs);return null!==e&&"webkitAudioContext"===e.name&&t(n,i),vn(i,r),i})(Ir,Si),Ei=((e,t,n)=>()=>{const r=new WeakMap;return{render(i,o){const a=r.get(o);return void 0!==a?Promise.resolve(a):(async(i,o)=>{let a=t(i);if(!et(a,o)){const t={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfInputs:a.numberOfInputs};a=e(o,t)}return r.set(o,a),await n(i,o,a),a})(i,o)}}})(Ai,Rt,vr),Ci=((e,t,n,r,i)=>class extends e{constructor(e,o){const a=r(e),s={...Xt,...o};super(e,!1,n(a,s),i(a)?t():null)}})(Dr,Ei,Ai,Sr,Ar),ki=((e,t,n)=>()=>{const r=new WeakMap;return{render(i,o){const a=r.get(o);return void 0!==a?Promise.resolve(a):(async(i,o)=>{let a=t(i);if(!et(a,o)){const t={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfOutputs:a.numberOfOutputs};a=e(o,t)}return r.set(o,a),await n(i,o,a),a})(i,o)}}})(In,Rt,vr),Ti=((e,t,n,r,i,o)=>class extends e{constructor(e,a){const s=r(e),l=o({...Zt,...a});super(e,!1,n(s,l),i(s)?t():null)}})(Dr,ki,In,Sr,Ar,(e=>({...e,channelCount:e.numberOfOutputs}))),Ii=((e,t,n,r)=>(i,{offset:o,...a})=>{const s=i.createBuffer(1,2,44100),l=t(i,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),c=n(i,{...a,gain:o}),u=s.getChannelData(0);u[0]=1,u[1]=1,l.buffer=s,l.loop=!0;const d={get bufferSize(){},get channelCount(){return c.channelCount},set channelCount(e){c.channelCount=e},get channelCountMode(){return c.channelCountMode},set channelCountMode(e){c.channelCountMode=e},get channelInterpretation(){return c.channelInterpretation},set channelInterpretation(e){c.channelInterpretation=e},get context(){return c.context},get inputs(){return[]},get numberOfInputs(){return l.numberOfInputs},get numberOfOutputs(){return c.numberOfOutputs},get offset(){return c.gain},get onended(){return l.onended},set onended(e){l.onended=e},addEventListener:(...e)=>l.addEventListener(e[0],e[1],e[2]),dispatchEvent:(...e)=>l.dispatchEvent(e[0]),removeEventListener:(...e)=>l.removeEventListener(e[0],e[1],e[2]),start(e=0){l.start.call(l,e)},stop(e=0){l.stop.call(l,e)}};return e(i,l),r(On(d,c),(()=>l.connect(c)),(()=>l.disconnect(c)))})(Yr,ni,Pn,xi),Oi=((e,t,n,r,i)=>(o,a)=>{if(void 0===o.createConstantSource)return n(o,a);const s=o.createConstantSource();return vn(s,a),bn(s,a,"offset"),t(r,(()=>r(o)))||xn(s),t(i,(()=>i(o)))||Sn(s),e(o,s),s})(Yr,lr,Ii,Jn,Xn),Ri=((e,t,n,r,i)=>()=>{const o=new WeakMap;let a=null,s=null;return{set start(e){a=e},set stop(e){s=e},render(l,c){const u=o.get(c);return void 0!==u?Promise.resolve(u):(async(l,c)=>{let u=n(l);const d=et(u,c);if(!d){const e={channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,offset:u.offset.value};u=t(c,e),null!==a&&u.start(a),null!==s&&u.stop(s)}return o.set(c,u),d?await e(c,l.offset,u.offset):await r(c,l.offset,u.offset),await i(l,c,u),u})(l,c)}}})(ei,Oi,Rt,ii,vr),Pi=((e,t,n,r,i,o,a)=>class extends e{constructor(e,a){const s=i(e),l={...$t,...a},c=r(s,l),u=o(s),d=u?n():null;super(e,!1,c,d),this._constantSourceNodeRenderer=d,this._nativeConstantSourceNode=c,this._offset=t(this,u,c.offset,at,ot),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(e){const t="function"==typeof e?a(this,e):null;this._nativeConstantSourceNode.onended=t;const n=this._nativeConstantSourceNode.onended;this._onended=null!==n&&n===t?e:n}start(e=0){if(this._nativeConstantSourceNode.start(e),null!==this._constantSourceNodeRenderer&&(this._constantSourceNodeRenderer.start=e),"closed"!==this.context.state){Je(this);const e=()=>{this._nativeConstantSourceNode.removeEventListener("ended",e),st(this)&&Xe(this)};this._nativeConstantSourceNode.addEventListener("ended",e)}}stop(e=0){this._nativeConstantSourceNode.stop(e),null!==this._constantSourceNodeRenderer&&(this._constantSourceNodeRenderer.stop=e)}})(Dr,ai,Ri,Oi,Sr,Ar,$n),Ni=((e,t)=>(n,r)=>{const i=n.createConvolver();if(vn(i,r),r.disableNormalization===i.normalize&&(i.normalize=!r.disableNormalization),gn(i,r,"buffer"),r.channelCount>2)throw e();if(t(i,"channelCount",(e=>()=>e.call(i)),(t=>n=>{if(n>2)throw e();return t.call(i,n)})),"max"===r.channelCountMode)throw e();return t(i,"channelCountMode",(e=>()=>e.call(i)),(t=>n=>{if("max"===n)throw e();return t.call(i,n)})),i})(Bn,Kn),Li=((e,t,n)=>()=>{const r=new WeakMap;return{render(i,o){const a=r.get(o);return void 0!==a?Promise.resolve(a):(async(i,o)=>{let a=t(i);if(!et(a,o)){const t={buffer:a.buffer,channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,disableNormalization:!a.normalize};a=e(o,t)}return r.set(o,a),At(a)?await n(i,o,a.inputs[0]):await n(i,o,a),a})(i,o)}}})(Ni,Rt,vr),Di=((e,t,n,r,i,o)=>class extends e{constructor(e,a){const s=r(e),l={...en,...a},c=n(s,l);super(e,!1,c,i(s)?t():null),this._isBufferNullified=!1,this._nativeConvolverNode=c,null!==l.buffer&&o(this,l.buffer.duration)}get buffer(){return this._isBufferNullified?null:this._nativeConvolverNode.buffer}set buffer(e){if(this._nativeConvolverNode.buffer=e,null===e&&null!==this._nativeConvolverNode.buffer){const e=this._nativeConvolverNode.context;this._nativeConvolverNode.buffer=e.createBuffer(1,1,e.sampleRate),this._isBufferNullified=!0,o(this,0)}else this._isBufferNullified=!1,o(this,null===this._nativeConvolverNode.buffer?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(e){this._nativeConvolverNode.normalize=e}})(Dr,Li,Ni,Sr,Ar,di),Bi=((e,t,n,r,i)=>o=>{const a=new WeakMap;return{render(s,l){const c=a.get(l);return void 0!==c?Promise.resolve(c):(async(s,l)=>{let c=n(s);const u=et(c,l);if(!u){const e={channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,delayTime:c.delayTime.value,maxDelayTime:o};c=t(l,e)}return a.set(l,c),u?await e(l,s.delayTime,c.delayTime):await r(l,s.delayTime,c.delayTime),await i(s,l,c),c})(s,l)}}})(ei,Rn,Rt,ii,vr),ji=((e,t,n,r,i,o,a)=>class extends e{constructor(e,s){const l=i(e),c={...nn,...s},u=r(l,c),d=o(l);super(e,!1,u,d?n(c.maxDelayTime):null),this._delayTime=t(this,d,u.delayTime),a(this,c.maxDelayTime)}get delayTime(){return this._delayTime}})(Dr,ai,Bi,Rn,Sr,Ar,di),Fi=(Ui=Bn,(e,t)=>{const n=e.createDynamicsCompressor();if(vn(n,t),t.channelCount>2)throw Ui();if("max"===t.channelCountMode)throw Ui();return bn(n,t,"attack"),bn(n,t,"knee"),bn(n,t,"ratio"),bn(n,t,"release"),bn(n,t,"threshold"),n});var Ui;const zi=((e,t,n,r,i)=>()=>{const o=new WeakMap;return{render(a,s){const l=o.get(s);return void 0!==l?Promise.resolve(l):(async(a,s)=>{let l=n(a);const c=et(l,s);if(!c){const e={attack:l.attack.value,channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,knee:l.knee.value,ratio:l.ratio.value,release:l.release.value,threshold:l.threshold.value};l=t(s,e)}return o.set(s,l),c?(await e(s,a.attack,l.attack),await e(s,a.knee,l.knee),await e(s,a.ratio,l.ratio),await e(s,a.release,l.release),await e(s,a.threshold,l.threshold)):(await r(s,a.attack,l.attack),await r(s,a.knee,l.knee),await r(s,a.ratio,l.ratio),await r(s,a.release,l.release),await r(s,a.threshold,l.threshold)),await i(a,s,l),l})(a,s)}}})(ei,Fi,Rt,ii,vr),Hi=((e,t,n,r,i,o,a,s)=>class extends e{constructor(e,i){const l=o(e),c={...an,...i},u=r(l,c),d=a(l);super(e,!1,u,d?n():null),this._attack=t(this,d,u.attack),this._knee=t(this,d,u.knee),this._nativeDynamicsCompressorNode=u,this._ratio=t(this,d,u.ratio),this._release=t(this,d,u.release),this._threshold=t(this,d,u.threshold),s(this,.006)}get attack(){return this._attack}get channelCount(){return this._nativeDynamicsCompressorNode.channelCount}set channelCount(e){const t=this._nativeDynamicsCompressorNode.channelCount;if(this._nativeDynamicsCompressorNode.channelCount=e,e>2)throw this._nativeDynamicsCompressorNode.channelCount=t,i()}get channelCountMode(){return this._nativeDynamicsCompressorNode.channelCountMode}set channelCountMode(e){const t=this._nativeDynamicsCompressorNode.channelCountMode;if(this._nativeDynamicsCompressorNode.channelCountMode=e,"max"===e)throw this._nativeDynamicsCompressorNode.channelCountMode=t,i()}get knee(){return this._knee}get ratio(){return this._ratio}get reduction(){return"number"==typeof this._nativeDynamicsCompressorNode.reduction.value?this._nativeDynamicsCompressorNode.reduction.value:this._nativeDynamicsCompressorNode.reduction}get release(){return this._release}get threshold(){return this._threshold}})(Dr,ai,zi,Fi,Bn,Sr,Ar,di),Vi=((e,t,n,r,i)=>()=>{const o=new WeakMap;return{render(a,s){const l=o.get(s);return void 0!==l?Promise.resolve(l):(async(a,s)=>{let l=n(a);const c=et(l,s);if(!c){const e={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,gain:l.gain.value};l=t(s,e)}return o.set(s,l),c?await e(s,a.gain,l.gain):await r(s,a.gain,l.gain),await i(a,s,l),l})(a,s)}}})(ei,Pn,Rt,ii,vr),Wi=((e,t,n,r,i,o)=>class extends e{constructor(e,a){const s=i(e),l={...sn,...a},c=r(s,l),u=o(s);super(e,!1,c,u?n():null),this._gain=t(this,u,c.gain,at,ot)}get gain(){return this._gain}})(Dr,ai,Vi,Pn,Sr,Ar),Gi=((e,t,n,r)=>(i,o,{channelCount:a,channelCountMode:s,channelInterpretation:l,feedback:c,feedforward:u})=>{const d=_n(o,i.sampleRate),f=c instanceof Float64Array?c:new Float64Array(c),h=u instanceof Float64Array?u:new Float64Array(u),p=f.length,m=h.length,g=Math.min(p,m);if(0===p||p>20)throw r();if(0===f[0])throw t();if(0===m||m>20)throw r();if(0===h[0])throw t();if(1!==f[0]){for(let e=0;e<m;e+=1)h[e]/=f[0];for(let e=1;e<p;e+=1)f[e]/=f[0]}const v=n(i,d,a,a);v.channelCount=a,v.channelCountMode=s,v.channelInterpretation=l;const y=[],b=[],w=[];for(let e=0;e<a;e+=1){y.push(0);const e=new Float32Array(32),t=new Float32Array(32);e.fill(0),t.fill(0),b.push(e),w.push(t)}v.onaudioprocess=e=>{const t=e.inputBuffer,n=e.outputBuffer,r=t.numberOfChannels;for(let e=0;e<r;e+=1){const r=t.getChannelData(e),i=n.getChannelData(e);y[e]=fn(f,p,h,m,g,b[e],w[e],y[e],32,r,i)}};const x=i.sampleRate/2;return On({get bufferSize(){return d},get channelCount(){return v.channelCount},set channelCount(e){v.channelCount=e},get channelCountMode(){return v.channelCountMode},set channelCountMode(e){v.channelCountMode=e},get channelInterpretation(){return v.channelInterpretation},set channelInterpretation(e){v.channelInterpretation=e},get context(){return v.context},get inputs(){return[v]},get numberOfInputs(){return v.numberOfInputs},get numberOfOutputs(){return v.numberOfOutputs},addEventListener:(...e)=>v.addEventListener(e[0],e[1],e[2]),dispatchEvent:(...e)=>v.dispatchEvent(e[0]),getFrequencyResponse(t,n,r){if(t.length!==n.length||n.length!==r.length)throw e();const i=t.length;for(let e=0;e<i;e+=1){const i=-Math.PI*(t[e]/x),o=[Math.cos(i),Math.sin(i)],a=Nn(Ln(h,o),Ln(f,o));n[e]=Math.sqrt(a[0]*a[0]+a[1]*a[1]),r[e]=Math.atan2(a[1],a[0])}},removeEventListener:(...e)=>v.removeEventListener(e[0],e[1],e[2])},v)})(cn,ln,Dn,Bn),qi=((e,t,n,r)=>i=>e(pn,(()=>pn(i)))?Promise.resolve(e(r,r)).then((e=>{if(!e){const e=n(i,512,0,1);i.oncomplete=()=>{e.onaudioprocess=null,e.disconnect()},e.onaudioprocess=()=>i.currentTime,e.connect(i.destination)}return i.startRendering()})):new Promise((e=>{const n=t(i,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});i.oncomplete=t=>{n.disconnect(),e(t.renderedBuffer)},n.connect(i.destination),i.startRendering()})))(lr,Pn,Dn,((e,t)=>()=>{if(null===t)return Promise.resolve(!1);const n=new t(1,1,44100),r=e(n,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise((e=>{n.oncomplete=()=>{r.disconnect(),e(0!==n.currentTime)},n.startRendering()}))})(Pn,_r)),Ki=((e,t,n,r,i)=>(o,a)=>{const s=new WeakMap;let l=null;const c=async(c,u)=>{let d=null,f=t(c);const h=et(f,u);if(void 0===u.createIIRFilter?d=e(u,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):h||(f=u.createIIRFilter(a,o)),s.set(u,null===d?f:d),null!==d){if(null===l){if(null===n)throw new Error("Missing the native OfflineAudioContext constructor.");const e=new n(c.context.destination.channelCount,c.context.length,u.sampleRate);l=(async()=>{await r(c,e,e.destination);return((e,t,n,r)=>{const i=n instanceof Float64Array?n:new Float64Array(n),o=r instanceof Float64Array?r:new Float64Array(r),a=i.length,s=o.length,l=Math.min(a,s);if(1!==i[0]){for(let e=0;e<a;e+=1)o[e]/=i[0];for(let e=1;e<s;e+=1)i[e]/=i[0]}const c=new Float32Array(32),u=new Float32Array(32),d=t.createBuffer(e.numberOfChannels,e.length,e.sampleRate),f=e.numberOfChannels;for(let t=0;t<f;t+=1){const n=e.getChannelData(t),r=d.getChannelData(t);c.fill(0),u.fill(0),fn(i,a,o,s,l,c,u,0,32,n,r)}return d})(await i(e),u,o,a)})()}const e=await l;return d.buffer=e,d.start(0),d}return await r(c,u,f),f};return{render(e,t){const n=s.get(t);return void 0!==n?Promise.resolve(n):c(e,t)}}})(ni,Rt,_r,vr,qi),Yi=(Ji=Gi,(e,t,n)=>{if(void 0===e.createIIRFilter)return Ji(e,t,n);const r=e.createIIRFilter(n.feedforward,n.feedback);return vn(r,n),r});var Ji;const Qi=((e,t,n,r,i,o)=>class extends e{constructor(e,a){const s=r(e),l=i(s),c={...dn,...a},u=t(s,l?null:e.baseLatency,c);super(e,!1,u,l?n(c.feedback,c.feedforward):null),un(u),this._nativeIIRFilterNode=u,o(this,1)}getFrequencyResponse(e,t,n){return this._nativeIIRFilterNode.getFrequencyResponse(e,t,n)}})(Dr,Yi,Ki,Sr,Ar,di),Xi=((e,t,n,r,i,o,a,s)=>(l,c)=>{const u=c.listener,{forwardX:d,forwardY:f,forwardZ:h,positionX:p,positionY:m,positionZ:g,upX:v,upY:y,upZ:b}=void 0===u.forwardX?(()=>{const d=new Float32Array(1),f=t(c,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),h=a(c);let p=!1,m=[0,0,-1,0,1,0],g=[0,0,0];const v=()=>{if(p)return;p=!0;const e=r(c,256,9,0);e.onaudioprocess=({inputBuffer:e})=>{const t=[o(e,d,0),o(e,d,1),o(e,d,2),o(e,d,3),o(e,d,4),o(e,d,5)];t.some(((e,t)=>e!==m[t]))&&(u.setOrientation(...t),m=t);const n=[o(e,d,6),o(e,d,7),o(e,d,8)];n.some(((e,t)=>e!==g[t]))&&(u.setPosition(...n),g=n)},f.connect(e)},y=e=>t=>{t!==m[e]&&(m[e]=t,u.setOrientation(...m))},b=e=>t=>{t!==g[e]&&(g[e]=t,u.setPosition(...g))},w=(t,r,o)=>{const a=n(c,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:r});a.connect(f,0,t),a.start(),Object.defineProperty(a.offset,"defaultValue",{get:()=>r});const u=e({context:l},h,a.offset,at,ot);var d,p,m,g,y,b,w;return s(u,"value",(e=>()=>e.call(u)),(e=>t=>{try{e.call(u,t)}catch(e){if(9!==e.code)throw e}v(),h&&o(t)})),u.cancelAndHoldAtTime=(d=u.cancelAndHoldAtTime,h?()=>{throw i()}:(...e)=>{const t=d.apply(u,e);return v(),t}),u.cancelScheduledValues=(p=u.cancelScheduledValues,h?()=>{throw i()}:(...e)=>{const t=p.apply(u,e);return v(),t}),u.exponentialRampToValueAtTime=(m=u.exponentialRampToValueAtTime,h?()=>{throw i()}:(...e)=>{const t=m.apply(u,e);return v(),t}),u.linearRampToValueAtTime=(g=u.linearRampToValueAtTime,h?()=>{throw i()}:(...e)=>{const t=g.apply(u,e);return v(),t}),u.setTargetAtTime=(y=u.setTargetAtTime,h?()=>{throw i()}:(...e)=>{const t=y.apply(u,e);return v(),t}),u.setValueAtTime=(b=u.setValueAtTime,h?()=>{throw i()}:(...e)=>{const t=b.apply(u,e);return v(),t}),u.setValueCurveAtTime=(w=u.setValueCurveAtTime,h?()=>{throw i()}:(...e)=>{const t=w.apply(u,e);return v(),t}),u};return{forwardX:w(0,0,y(0)),forwardY:w(1,0,y(1)),forwardZ:w(2,-1,y(2)),positionX:w(6,0,b(0)),positionY:w(7,0,b(1)),positionZ:w(8,0,b(2)),upX:w(3,0,y(3)),upY:w(4,1,y(4)),upZ:w(5,0,y(5))}})():u;return{get forwardX(){return d},get forwardY(){return f},get forwardZ(){return h},get positionX(){return p},get positionY(){return m},get positionZ(){return g},get upX(){return v},get upY(){return y},get upZ(){return b}}})(ai,Ai,Oi,Dn,Bn,Gn,Ar,Kn),Zi=new WeakMap,$i=((e,t,n,r,i,o)=>class extends n{constructor(n,o){super(n),this._nativeContext=n,Ne.set(this,n),r(n)&&i.set(n,new Set),this._destination=new e(this,o),this._listener=t(this,n),this._onstatechange=null}get currentTime(){return this._nativeContext.currentTime}get destination(){return this._destination}get listener(){return this._listener}get onstatechange(){return this._onstatechange}set onstatechange(e){const t="function"==typeof e?o(this,e):null;this._nativeContext.onstatechange=t;const n=this._nativeContext.onstatechange;this._onstatechange=null!==n&&n===t?e:n}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}})(ci,Xi,kr,Ar,Zi,$n),eo=((e,t,n,r,i,o)=>(a,s)=>{const l=a.createOscillator();return vn(l,s),bn(l,s,"detune"),bn(l,s,"frequency"),void 0!==s.periodicWave?l.setPeriodicWave(s.periodicWave):gn(l,s,"type"),t(n,(()=>n(a)))||xn(l),t(r,(()=>r(a)))||o(l,a),t(i,(()=>i(a)))||Sn(l),e(a,l),l})(Yr,lr,Jn,Qn,Xn,Zn),to=((e,t,n,r,i)=>()=>{const o=new WeakMap;let a=null,s=null,l=null;return{set periodicWave(e){a=e},set start(e){s=e},set stop(e){l=e},render(c,u){const d=o.get(u);return void 0!==d?Promise.resolve(d):(async(c,u)=>{let d=n(c);const f=et(d,u);if(!f){const e={channelCount:d.channelCount,channelCountMode:d.channelCountMode,channelInterpretation:d.channelInterpretation,detune:d.detune.value,frequency:d.frequency.value,periodicWave:null===a?void 0:a,type:d.type};d=t(u,e),null!==s&&d.start(s),null!==l&&d.stop(l)}return o.set(u,d),f?(await e(u,c.detune,d.detune),await e(u,c.frequency,d.frequency)):(await r(u,c.detune,d.detune),await r(u,c.frequency,d.frequency)),await i(c,u,d),d})(c,u)}}})(ei,eo,Rt,ii,vr),no=((e,t,n,r,i,o,a)=>class extends e{constructor(e,a){const s=i(e),l={...Fn,...a},c=n(s,l),u=o(s),d=u?r():null,f=e.sampleRate/2;super(e,!1,c,d),this._detune=t(this,u,c.detune,153600,-153600),this._frequency=t(this,u,c.frequency,f,-f),this._nativeOscillatorNode=c,this._onended=null,this._oscillatorNodeRenderer=d,null!==this._oscillatorNodeRenderer&&void 0!==l.periodicWave&&(this._oscillatorNodeRenderer.periodicWave=l.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(e){const t="function"==typeof e?a(this,e):null;this._nativeOscillatorNode.onended=t;const n=this._nativeOscillatorNode.onended;this._onended=null!==n&&n===t?e:n}get type(){return this._nativeOscillatorNode.type}set type(e){this._nativeOscillatorNode.type=e,null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.periodicWave=null)}setPeriodicWave(e){this._nativeOscillatorNode.setPeriodicWave(e),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.periodicWave=e)}start(e=0){if(this._nativeOscillatorNode.start(e),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.start=e),"closed"!==this.context.state){Je(this);const e=()=>{this._nativeOscillatorNode.removeEventListener("ended",e),st(this)&&Xe(this)};this._nativeOscillatorNode.addEventListener("ended",e)}}stop(e=0){this._nativeOscillatorNode.stop(e),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.stop=e)}})(Dr,ai,eo,to,Sr,Ar,$n),ro=(io=ni,(e,t)=>{const n=io(e,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),r=e.createBuffer(1,2,44100);return n.buffer=r,n.loop=!0,n.connect(t),n.start(),()=>{n.stop(),n.disconnect(t)}});var io;const oo=((e,t,n,r,i)=>(o,{curve:a,oversample:s,...l})=>{const c=o.createWaveShaper(),u=o.createWaveShaper();vn(c,l),vn(u,l);const d=n(o,{...l,gain:1}),f=n(o,{...l,gain:-1}),h=n(o,{...l,gain:1}),p=n(o,{...l,gain:-1});let m=null,g=!1,v=null;const y={get bufferSize(){},get channelCount(){return c.channelCount},set channelCount(e){d.channelCount=e,f.channelCount=e,c.channelCount=e,h.channelCount=e,u.channelCount=e,p.channelCount=e},get channelCountMode(){return c.channelCountMode},set channelCountMode(e){d.channelCountMode=e,f.channelCountMode=e,c.channelCountMode=e,h.channelCountMode=e,u.channelCountMode=e,p.channelCountMode=e},get channelInterpretation(){return c.channelInterpretation},set channelInterpretation(e){d.channelInterpretation=e,f.channelInterpretation=e,c.channelInterpretation=e,h.channelInterpretation=e,u.channelInterpretation=e,p.channelInterpretation=e},get context(){return c.context},get curve(){return v},set curve(n){if(null!==n&&n.length<2)throw t();if(null===n)c.curve=n,u.curve=n;else{const e=n.length,t=new Float32Array(e+2-e%2),r=new Float32Array(e+2-e%2);t[0]=n[0],r[0]=-n[e-1];const i=Math.ceil((e+1)/2),o=(e+1)/2-1;for(let a=1;a<i;a+=1){const s=a/i*o,l=Math.floor(s),c=Math.ceil(s);t[a]=l===c?n[l]:(1-(s-l))*n[l]+(1-(c-s))*n[c],r[a]=l===c?-n[e-1-l]:-(1-(s-l))*n[e-1-l]-(1-(c-s))*n[e-1-c]}t[i]=e%2==1?n[i-1]:(n[i-2]+n[i-1])/2,c.curve=t,u.curve=r}v=n,g&&(r(v)&&null===m?m=e(o,d):null!==m&&(m(),m=null))},get inputs(){return[d]},get numberOfInputs(){return c.numberOfInputs},get numberOfOutputs(){return c.numberOfOutputs},get oversample(){return c.oversample},set oversample(e){c.oversample=e,u.oversample=e},addEventListener:(...e)=>d.addEventListener(e[0],e[1],e[2]),dispatchEvent:(...e)=>d.dispatchEvent(e[0]),removeEventListener:(...e)=>d.removeEventListener(e[0],e[1],e[2])};null!==a&&(y.curve=a instanceof Float32Array?a:new Float32Array(a)),s!==y.oversample&&(y.oversample=s);return i(On(y,h),(()=>{d.connect(c).connect(h),d.connect(f).connect(u).connect(p).connect(h),g=!0,r(v)&&(m=e(o,d))}),(()=>{d.disconnect(c),c.disconnect(h),d.disconnect(f),f.disconnect(u),u.disconnect(p),p.disconnect(h),g=!1,null!==m&&(m(),m=null)}))})(ro,ln,Pn,qn,xi),ao=((e,t,n,r,i,o,a)=>(s,l)=>{const c=s.createWaveShaper();if(null!==o&&"webkitAudioContext"===o.name&&void 0===s.createGain().gain.automationRate)return n(s,l);vn(c,l);const u=null===l.curve||l.curve instanceof Float32Array?l.curve:new Float32Array(l.curve);if(null!==u&&u.length<2)throw t();gn(c,{curve:u},"curve"),gn(c,l,"oversample");let d=null,f=!1;a(c,"curve",(e=>()=>e.call(c)),(t=>n=>(t.call(c,n),f&&(r(n)&&null===d?d=e(s,c):r(n)||null===d||(d(),d=null)),n)));return i(c,(()=>{f=!0,r(c.curve)&&(d=e(s,c))}),(()=>{f=!1,null!==d&&(d(),d=null)}))})(ro,ln,oo,qn,xi,Ir,Kn),so=((e,t,n,r,i,o,a,s,l,c)=>(u,{coneInnerAngle:d,coneOuterAngle:f,coneOuterGain:h,distanceModel:p,maxDistance:m,orientationX:g,orientationY:v,orientationZ:y,panningModel:b,positionX:w,positionY:x,positionZ:S,refDistance:M,rolloffFactor:_,...A})=>{const E=u.createPanner();if(A.channelCount>2)throw a();if("max"===A.channelCountMode)throw a();vn(E,A);const C={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},k=n(u,{...C,channelInterpretation:"speakers",numberOfInputs:6}),T=r(u,{...A,gain:1}),I=r(u,{...C,gain:1}),O=r(u,{...C,gain:0}),R=r(u,{...C,gain:0}),P=r(u,{...C,gain:0}),N=r(u,{...C,gain:0}),L=r(u,{...C,gain:0}),D=i(u,256,6,1),B=o(u,{...C,curve:new Float32Array([1,1]),oversample:"none"});let j=[g,v,y],F=[w,x,S];const U=new Float32Array(1);D.onaudioprocess=({inputBuffer:e})=>{const t=[l(e,U,0),l(e,U,1),l(e,U,2)];t.some(((e,t)=>e!==j[t]))&&(E.setOrientation(...t),j=t);const n=[l(e,U,3),l(e,U,4),l(e,U,5)];n.some(((e,t)=>e!==F[t]))&&(E.setPosition(...n),F=n)},Object.defineProperty(O.gain,"defaultValue",{get:()=>0}),Object.defineProperty(R.gain,"defaultValue",{get:()=>0}),Object.defineProperty(P.gain,"defaultValue",{get:()=>0}),Object.defineProperty(N.gain,"defaultValue",{get:()=>0}),Object.defineProperty(L.gain,"defaultValue",{get:()=>0});const z={get bufferSize(){},get channelCount(){return E.channelCount},set channelCount(e){if(e>2)throw a();T.channelCount=e,E.channelCount=e},get channelCountMode(){return E.channelCountMode},set channelCountMode(e){if("max"===e)throw a();T.channelCountMode=e,E.channelCountMode=e},get channelInterpretation(){return E.channelInterpretation},set channelInterpretation(e){T.channelInterpretation=e,E.channelInterpretation=e},get coneInnerAngle(){return E.coneInnerAngle},set coneInnerAngle(e){E.coneInnerAngle=e},get coneOuterAngle(){return E.coneOuterAngle},set coneOuterAngle(e){E.coneOuterAngle=e},get coneOuterGain(){return E.coneOuterGain},set coneOuterGain(e){if(e<0||e>1)throw t();E.coneOuterGain=e},get context(){return E.context},get distanceModel(){return E.distanceModel},set distanceModel(e){E.distanceModel=e},get inputs(){return[T]},get maxDistance(){return E.maxDistance},set maxDistance(e){if(e<0)throw new RangeError;E.maxDistance=e},get numberOfInputs(){return E.numberOfInputs},get numberOfOutputs(){return E.numberOfOutputs},get orientationX(){return I.gain},get orientationY(){return O.gain},get orientationZ(){return R.gain},get panningModel(){return E.panningModel},set panningModel(e){E.panningModel=e},get positionX(){return P.gain},get positionY(){return N.gain},get positionZ(){return L.gain},get refDistance(){return E.refDistance},set refDistance(e){if(e<0)throw new RangeError;E.refDistance=e},get rolloffFactor(){return E.rolloffFactor},set rolloffFactor(e){if(e<0)throw new RangeError;E.rolloffFactor=e},addEventListener:(...e)=>T.addEventListener(e[0],e[1],e[2]),dispatchEvent:(...e)=>T.dispatchEvent(e[0]),removeEventListener:(...e)=>T.removeEventListener(e[0],e[1],e[2])};d!==z.coneInnerAngle&&(z.coneInnerAngle=d),f!==z.coneOuterAngle&&(z.coneOuterAngle=f),h!==z.coneOuterGain&&(z.coneOuterGain=h),p!==z.distanceModel&&(z.distanceModel=p),m!==z.maxDistance&&(z.maxDistance=m),g!==z.orientationX.value&&(z.orientationX.value=g),v!==z.orientationY.value&&(z.orientationY.value=v),y!==z.orientationZ.value&&(z.orientationZ.value=y),b!==z.panningModel&&(z.panningModel=b),w!==z.positionX.value&&(z.positionX.value=w),x!==z.positionY.value&&(z.positionY.value=x),S!==z.positionZ.value&&(z.positionZ.value=S),M!==z.refDistance&&(z.refDistance=M),_!==z.rolloffFactor&&(z.rolloffFactor=_),1===j[0]&&0===j[1]&&0===j[2]||E.setOrientation(...j),0===F[0]&&0===F[1]&&0===F[2]||E.setPosition(...F);return c(On(z,E),(()=>{T.connect(E),e(T,B,0,0),B.connect(I).connect(k,0,0),B.connect(O).connect(k,0,1),B.connect(R).connect(k,0,2),B.connect(P).connect(k,0,3),B.connect(N).connect(k,0,4),B.connect(L).connect(k,0,5),k.connect(D).connect(u.destination)}),(()=>{T.disconnect(E),s(T,B,0,0),B.disconnect(I),I.disconnect(k),B.disconnect(O),O.disconnect(k),B.disconnect(R),R.disconnect(k),B.disconnect(P),P.disconnect(k),B.disconnect(N),N.disconnect(k),B.disconnect(L),L.disconnect(k),k.disconnect(D),D.disconnect(u.destination)}))})(Et,ln,Ai,Pn,Dn,ao,Bn,Ot,Gn,xi),lo=(co=so,(e,t)=>{const n=e.createPanner();return void 0===n.orientationX?co(e,t):(vn(n,t),bn(n,t,"orientationX"),bn(n,t,"orientationY"),bn(n,t,"orientationZ"),bn(n,t,"positionX"),bn(n,t,"positionY"),bn(n,t,"positionZ"),gn(n,t,"coneInnerAngle"),gn(n,t,"coneOuterAngle"),gn(n,t,"coneOuterGain"),gn(n,t,"distanceModel"),gn(n,t,"maxDistance"),gn(n,t,"panningModel"),gn(n,t,"refDistance"),gn(n,t,"rolloffFactor"),n)});var co;const uo=((e,t,n,r,i,o,a,s,l,c)=>()=>{const u=new WeakMap;let d=null;return{render(f,h){const p=u.get(h);return void 0!==p?Promise.resolve(p):(async(f,h)=>{let p=null,m=o(f);const g={channelCount:m.channelCount,channelCountMode:m.channelCountMode,channelInterpretation:m.channelInterpretation},v={...g,coneInnerAngle:m.coneInnerAngle,coneOuterAngle:m.coneOuterAngle,coneOuterGain:m.coneOuterGain,distanceModel:m.distanceModel,maxDistance:m.maxDistance,panningModel:m.panningModel,refDistance:m.refDistance,rolloffFactor:m.rolloffFactor},y=et(m,h);if("bufferSize"in m)p=r(h,{...g,gain:1});else if(!y){const e={...v,orientationX:m.orientationX.value,orientationY:m.orientationY.value,orientationZ:m.orientationZ.value,positionX:m.positionX.value,positionY:m.positionY.value,positionZ:m.positionZ.value};m=i(h,e)}if(u.set(h,null===p?m:p),null!==p){if(null===d){if(null===a)throw new Error("Missing the native OfflineAudioContext constructor.");const e=new a(6,f.context.length,h.sampleRate),r=t(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6});r.connect(e.destination),d=(async()=>{const t=await Promise.all([f.orientationX,f.orientationY,f.orientationZ,f.positionX,f.positionY,f.positionZ].map((async(t,r)=>{const i=n(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:0===r?1:0});return await s(e,t,i.offset),i})));for(let e=0;e<6;e+=1)t[e].connect(r,0,e),t[e].start(0);return c(e)})()}const e=await d,o=r(h,{...g,gain:1});await l(f,h,o);const u=[];for(let t=0;t<e.numberOfChannels;t+=1)u.push(e.getChannelData(t));let m=[u[0][0],u[1][0],u[2][0]],y=[u[3][0],u[4][0],u[5][0]],b=r(h,{...g,gain:1}),w=i(h,{...v,orientationX:m[0],orientationY:m[1],orientationZ:m[2],positionX:y[0],positionY:y[1],positionZ:y[2]});o.connect(b).connect(w.inputs[0]),w.connect(p);for(let t=128;t<e.length;t+=128){const e=[u[0][t],u[1][t],u[2][t]],n=[u[3][t],u[4][t],u[5][t]];if(e.some(((e,t)=>e!==m[t]))||n.some(((e,t)=>e!==y[t]))){m=e,y=n;const a=t/h.sampleRate;b.gain.setValueAtTime(0,a),b=r(h,{...g,gain:0}),w=i(h,{...v,orientationX:m[0],orientationY:m[1],orientationZ:m[2],positionX:y[0],positionY:y[1],positionZ:y[2]}),b.gain.setValueAtTime(1,a),o.connect(b).connect(w.inputs[0]),w.connect(p)}}return p}return y?(await e(h,f.orientationX,m.orientationX),await e(h,f.orientationY,m.orientationY),await e(h,f.orientationZ,m.orientationZ),await e(h,f.positionX,m.positionX),await e(h,f.positionY,m.positionY),await e(h,f.positionZ,m.positionZ)):(await s(h,f.orientationX,m.orientationX),await s(h,f.orientationY,m.orientationY),await s(h,f.orientationZ,m.orientationZ),await s(h,f.positionX,m.positionX),await s(h,f.positionY,m.positionY),await s(h,f.positionZ,m.positionZ)),At(m)?await l(f,h,m.inputs[0]):await l(f,h,m),m})(f,h)}}})(ei,Ai,Oi,Pn,lo,Rt,_r,ii,vr,qi),fo=((e,t,n,r,i,o,a)=>class extends e{constructor(e,s){const l=i(e),c={...Un,...s},u=n(l,c),d=o(l);super(e,!1,u,d?r():null),this._nativePannerNode=u,this._orientationX=t(this,d,u.orientationX,at,ot),this._orientationY=t(this,d,u.orientationY,at,ot),this._orientationZ=t(this,d,u.orientationZ,at,ot),this._positionX=t(this,d,u.positionX,at,ot),this._positionY=t(this,d,u.positionY,at,ot),this._positionZ=t(this,d,u.positionZ,at,ot),a(this,1)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(e){this._nativePannerNode.coneInnerAngle=e}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(e){this._nativePannerNode.coneOuterAngle=e}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(e){this._nativePannerNode.coneOuterGain=e}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(e){this._nativePannerNode.distanceModel=e}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(e){this._nativePannerNode.maxDistance=e}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(e){this._nativePannerNode.panningModel=e}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(e){this._nativePannerNode.refDistance=e}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(e){this._nativePannerNode.rolloffFactor=e}})(Dr,ai,lo,uo,Sr,Ar,di),ho=(e=>(t,{disableNormalization:n,imag:r,real:i})=>{const o=r instanceof Float32Array?r:new Float32Array(r),a=i instanceof Float32Array?i:new Float32Array(i),s=t.createPeriodicWave(a,o,{disableNormalization:n});if(Array.from(r).length<2)throw e();return s})(nt),po=((e,t,n,r)=>class i{constructor(i,o){const a=t(i),s=r({...zn,...o}),l=e(a,s);return n.add(l),l}static[Symbol.hasInstance](e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===i.prototype||n.has(e)}})(ho,Sr,new WeakSet,(e=>{const{imag:t,real:n}=e;return void 0===t?void 0===n?{...e,imag:[0,0],real:[0,0]}:{...e,imag:Array.from(n,(()=>0)),real:n}:void 0===n?{...e,imag:t,real:Array.from(t,(()=>0))}:{...e,imag:t,real:n}})),mo=((e,t,n,r,i,o)=>{const a=16385,s=new Float32Array([1,1]),l=Math.PI/2,c={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},u={...c,oversample:"none"},d=(e,o,d,f,h)=>{if(1===o)return((e,t,i,o)=>{const d=new Float32Array(a),f=new Float32Array(a);for(let e=0;e<a;e+=1){const t=e/16384*l;d[e]=Math.cos(t),f[e]=Math.sin(t)}const h=n(e,{...c,gain:0}),p=r(e,{...u,curve:d}),m=r(e,{...u,curve:s}),g=n(e,{...c,gain:0}),v=r(e,{...u,curve:f});return{connectGraph(){t.connect(h),t.connect(void 0===m.inputs?m:m.inputs[0]),t.connect(g),m.connect(i),i.connect(void 0===p.inputs?p:p.inputs[0]),i.connect(void 0===v.inputs?v:v.inputs[0]),p.connect(h.gain),v.connect(g.gain),h.connect(o,0,0),g.connect(o,0,1)},disconnectGraph(){t.disconnect(h),t.disconnect(void 0===m.inputs?m:m.inputs[0]),t.disconnect(g),m.disconnect(i),i.disconnect(void 0===p.inputs?p:p.inputs[0]),i.disconnect(void 0===v.inputs?v:v.inputs[0]),p.disconnect(h.gain),v.disconnect(g.gain),h.disconnect(o,0,0),g.disconnect(o,0,1)}}})(e,d,f,h);if(2===o)return((e,i,o,d)=>{const f=new Float32Array(a),h=new Float32Array(a),p=new Float32Array(a),m=new Float32Array(a),g=Math.floor(8192.5);for(let e=0;e<a;e+=1)if(e>g){const t=(e-g)/(16384-g)*l;f[e]=Math.cos(t),h[e]=Math.sin(t),p[e]=0,m[e]=1}else{const t=e/(16384-g)*l;f[e]=1,h[e]=0,p[e]=Math.cos(t),m[e]=Math.sin(t)}const v=t(e,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),y=n(e,{...c,gain:0}),b=r(e,{...u,curve:f}),w=n(e,{...c,gain:0}),x=r(e,{...u,curve:h}),S=r(e,{...u,curve:s}),M=n(e,{...c,gain:0}),_=r(e,{...u,curve:p}),A=n(e,{...c,gain:0}),E=r(e,{...u,curve:m});return{connectGraph(){i.connect(v),i.connect(void 0===S.inputs?S:S.inputs[0]),v.connect(y,0),v.connect(w,0),v.connect(M,1),v.connect(A,1),S.connect(o),o.connect(void 0===b.inputs?b:b.inputs[0]),o.connect(void 0===x.inputs?x:x.inputs[0]),o.connect(void 0===_.inputs?_:_.inputs[0]),o.connect(void 0===E.inputs?E:E.inputs[0]),b.connect(y.gain),x.connect(w.gain),_.connect(M.gain),E.connect(A.gain),y.connect(d,0,0),M.connect(d,0,0),w.connect(d,0,1),A.connect(d,0,1)},disconnectGraph(){i.disconnect(v),i.disconnect(void 0===S.inputs?S:S.inputs[0]),v.disconnect(y,0),v.disconnect(w,0),v.disconnect(M,1),v.disconnect(A,1),S.disconnect(o),o.disconnect(void 0===b.inputs?b:b.inputs[0]),o.disconnect(void 0===x.inputs?x:x.inputs[0]),o.disconnect(void 0===_.inputs?_:_.inputs[0]),o.disconnect(void 0===E.inputs?E:E.inputs[0]),b.disconnect(y.gain),x.disconnect(w.gain),_.disconnect(M.gain),E.disconnect(A.gain),y.disconnect(d,0,0),M.disconnect(d,0,0),w.disconnect(d,0,1),A.disconnect(d,0,1)}}})(e,d,f,h);throw i()};return(t,{channelCount:r,channelCountMode:a,pan:s,...l})=>{if("max"===a)throw i();const c=e(t,{...l,channelCount:1,channelCountMode:a,numberOfInputs:2}),u=n(t,{...l,channelCount:r,channelCountMode:a,gain:1}),f=n(t,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:s});let{connectGraph:h,disconnectGraph:p}=d(t,r,u,f,c);Object.defineProperty(f.gain,"defaultValue",{get:()=>0}),Object.defineProperty(f.gain,"maxValue",{get:()=>1}),Object.defineProperty(f.gain,"minValue",{get:()=>-1});const m={get bufferSize(){},get channelCount(){return u.channelCount},set channelCount(e){u.channelCount!==e&&(g&&p(),({connectGraph:h,disconnectGraph:p}=d(t,e,u,f,c)),g&&h()),u.channelCount=e},get channelCountMode(){return u.channelCountMode},set channelCountMode(e){if("clamped-max"===e||"max"===e)throw i();u.channelCountMode=e},get channelInterpretation(){return u.channelInterpretation},set channelInterpretation(e){u.channelInterpretation=e},get context(){return u.context},get inputs(){return[u]},get numberOfInputs(){return u.numberOfInputs},get numberOfOutputs(){return u.numberOfOutputs},get pan(){return f.gain},addEventListener:(...e)=>u.addEventListener(e[0],e[1],e[2]),dispatchEvent:(...e)=>u.dispatchEvent(e[0]),removeEventListener:(...e)=>u.removeEventListener(e[0],e[1],e[2])};let g=!1;return o(On(m,c),(()=>{h(),g=!0}),(()=>{p(),g=!1}))}})(Ai,In,Pn,ao,Bn,xi),go=((e,t)=>(n,r)=>{const i=r.channelCountMode;if("clamped-max"===i)throw t();if(void 0===n.createStereoPanner)return e(n,r);const o=n.createStereoPanner();return vn(o,r),bn(o,r,"pan"),Object.defineProperty(o,"channelCountMode",{get:()=>i,set:e=>{if(e!==i)throw t()}}),o})(mo,Bn),vo=((e,t,n,r,i)=>()=>{const o=new WeakMap;return{render(a,s){const l=o.get(s);return void 0!==l?Promise.resolve(l):(async(a,s)=>{let l=n(a);const c=et(l,s);if(!c){const e={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,pan:l.pan.value};l=t(s,e)}return o.set(s,l),c?await e(s,a.pan,l.pan):await r(s,a.pan,l.pan),At(l)?await i(a,s,l.inputs[0]):await i(a,s,l),l})(a,s)}}})(ei,go,Rt,ii,vr),yo=((e,t,n,r,i,o)=>class extends e{constructor(e,a){const s=i(e),l={...Hn,...a},c=n(s,l),u=o(s);super(e,!1,c,u?r():null),this._pan=t(this,u,c.pan)}get pan(){return this._pan}})(Dr,ai,go,vo,Sr,Ar),bo=((e,t,n)=>()=>{const r=new WeakMap;return{render(i,o){const a=r.get(o);return void 0!==a?Promise.resolve(a):(async(i,o)=>{let a=t(i);if(!et(a,o)){const t={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,curve:a.curve,oversample:a.oversample};a=e(o,t)}return r.set(o,a),At(a)?await n(i,o,a.inputs[0]):await n(i,o,a),a})(i,o)}}})(ao,Rt,vr),wo=((e,t,n,r,i,o,a)=>class extends e{constructor(e,t){const s=i(e),l={...Wn,...t},c=n(s,l);super(e,!0,c,o(s)?r():null),this._isCurveNullified=!1,this._nativeWaveShaperNode=c,a(this,1)}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(e){if(null===e)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(e.length<2)throw t();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=e}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(e){this._nativeWaveShaperNode.oversample=e}})(Dr,ln,ao,bo,Sr,Ar,di),xo=(e=>null!==e&&e.isSecureContext)(dr),So=(e=>(t,n,r)=>{Object.defineProperties(e,{currentFrame:{configurable:!0,get:()=>Math.round(t*n)},currentTime:{configurable:!0,get:()=>t}});try{return r()}finally{null!==e&&(delete e.currentFrame,delete e.currentTime)}})(dr),Mo=new WeakMap,_o=((e,t)=>n=>{let r=e.get(n);if(void 0!==r)return r;if(null===t)throw new Error("Missing the native OfflineAudioContext constructor.");return r=new t(1,1,44100),e.set(n,r),r})(Mo,_r),Ao=xo?((e,t,n,r,i,o,a,s,l,c,u,d,f)=>{let h=0;return(p,m,g={credentials:"omit"})=>{const v=u.get(p);if(void 0!==v&&v.has(m))return Promise.resolve();const y=c.get(p);if(void 0!==y){const e=y.get(m);if(void 0!==e)return e}const b=o(p),w=void 0===b.audioWorklet?i(m).then((([e,t])=>{const[r,i]=He(e,t);return n(`${r};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${i}\n})})(window,'_AWGS')`)})).then((()=>{const e=f._AWGS.pop();if(void 0===e)throw new SyntaxError;r(b.currentTime,b.sampleRate,(()=>e(class{},void 0,((e,n)=>{if(""===e.trim())throw t();const r=Be.get(b);if(void 0!==r){if(r.has(e))throw t();We(n),Ve(n.parameterDescriptors),r.set(e,n)}else We(n),Ve(n.parameterDescriptors),Be.set(b,new Map([[e,n]]))}),b.sampleRate,void 0,void 0)))})):Promise.all([i(m),Promise.resolve(e(d,d))]).then((([[e,t],n])=>{const r=h+1;h=r;const[i,o]=He(e,t),c=new Blob([`${i};((AudioWorkletProcessor,registerProcessor)=>{${o}\n})(${n?"AudioWorkletProcessor":"class extends AudioWorkletProcessor {__b=new WeakSet();constructor(){super();(p=>p.postMessage=(q=>(m,t)=>q.call(p,m,t?t.filter(u=>!this.__b.has(u)):t))(p.postMessage))(this.port)}}"},(n,p)=>registerProcessor(n,class extends p{${n?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));"}process(i,o,p){${n?"":"i.forEach(this.__c);o.forEach(this.__c);this.__c(Object.values(p));"}return super.process(i.map(j=>j.some(k=>k.length===0)?[]:j),o,p)}}));registerProcessor('__sac${r}',class extends AudioWorkletProcessor{process(){return !1}})`],{type:"application/javascript; charset=utf-8"}),u=URL.createObjectURL(c);return b.audioWorklet.addModule(u,g).then((()=>{if(s(b))return b;const e=a(b);return e.audioWorklet.addModule(u,g).then((()=>e))})).then((e=>{if(null===l)throw new SyntaxError;try{new l(e,`__sac${r}`)}catch{throw new SyntaxError}})).finally((()=>URL.revokeObjectURL(u)))}));return void 0===y?c.set(p,new Map([[m,w]])):y.set(m,w),w.then((()=>{const e=u.get(p);void 0===e?u.set(p,new Set([m])):e.add(m)})).finally((()=>{const e=c.get(p);void 0!==e&&e.delete(m)})),w}})(lr,Bn,(e=>t=>new Promise(((n,r)=>{if(null===e)return void r(new SyntaxError);const i=e.document.head;if(null===i)r(new SyntaxError);else{const o=e.document.createElement("script"),a=new Blob([t],{type:"application/javascript"}),s=URL.createObjectURL(a),l=e.onerror,c=()=>{e.onerror=l,URL.revokeObjectURL(s)};e.onerror=(t,n,i,o,a)=>n===s||n===e.location.href&&1===i&&1===o?(c(),r(a),!1):null!==l?l(t,n,i,o,a):void 0,o.onerror=()=>{c(),r(new SyntaxError)},o.onload=()=>{c(),n()},o.src=s,o.type="module",i.appendChild(o)}})))(dr),So,(Eo=()=>new DOMException("","AbortError"),async e=>{try{const t=await fetch(e);if(t.ok)return[await t.text(),t.url]}catch{}throw Eo()}),Sr,_o,Ar,Lr,new WeakMap,new WeakMap,((e,t)=>async()=>{if(null===e)return!0;if(null===t)return!1;const n=new Blob(['class A extends AudioWorkletProcessor{process(i){this.port.postMessage(i,[i[0][0].buffer])}}registerProcessor("a",A)'],{type:"application/javascript; charset=utf-8"}),r=new t(1,128,44100),i=URL.createObjectURL(n);let o=!1,a=!1;try{await r.audioWorklet.addModule(i);const t=new e(r,"a",{numberOfOutputs:0}),n=r.createOscillator();t.port.onmessage=()=>o=!0,t.onprocessorerror=()=>a=!0,n.connect(t),n.start(0),await r.startRendering()}catch{}finally{URL.revokeObjectURL(i)}return o&&!a})(Lr,_r),dr):void 0;var Eo;const Co=((e,t)=>n=>e(n)||t(n))(Or,Ar),ko=((e,t,n,r,i,o,a,s,l,c,u)=>(d,f)=>{const h=a(d)?d:o(d);if(i.has(f)){const e=n();return Promise.reject(e)}try{i.add(f)}catch{}return t(l,(()=>l(h)))?h.decodeAudioData(f).then((n=>(tn(f).catch((()=>{})),t(s,(()=>s(n)))||u(n),e.add(n),n))):new Promise(((t,n)=>{const i=async()=>{try{await tn(f)}catch{}},o=e=>{n(e),i()};try{h.decodeAudioData(f,(n=>{"function"!=typeof n.copyFromChannel&&(c(n),rt(n)),e.add(n),i().then((()=>t(n)))}),(e=>{o(null===e?r():e)}))}catch(e){o(e)}}))})(Fr,lr,(()=>new DOMException("","DataCloneError")),(()=>new DOMException("","EncodingError")),new WeakSet,Sr,Co,tt,pn,Vr,Wr),To=(Io=Ao,Oo=jr,Ro=qr,Po=li,No=fi,Lo=Ci,Do=Ti,Bo=Pi,jo=Di,Fo=ko,Uo=ji,zo=Hi,Ho=Wi,Vo=Qi,Wo=$i,Go=no,qo=fo,Ko=po,Yo=yo,Jo=wo,class extends Wo{constructor(e,t){super(e,t),this._nativeContext=e,this._audioWorklet=void 0===Io?void 0:{addModule:(e,t)=>Io(this,e,t)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new Oo(this)}createBiquadFilter(){return new No(this)}createBuffer(e,t,n){return new Ro({length:t,numberOfChannels:e,sampleRate:n})}createBufferSource(){return new Po(this)}createChannelMerger(e=6){return new Lo(this,{numberOfInputs:e})}createChannelSplitter(e=6){return new Do(this,{numberOfOutputs:e})}createConstantSource(){return new Bo(this)}createConvolver(){return new jo(this)}createDelay(e=1){return new Uo(this,{maxDelayTime:e})}createDynamicsCompressor(){return new zo(this)}createGain(){return new Ho(this)}createIIRFilter(e,t){return new Vo(this,{feedback:t,feedforward:e})}createOscillator(){return new Go(this)}createPanner(){return new qo(this)}createPeriodicWave(e,t,n={disableNormalization:!1}){return new Ko(this,{...n,imag:t,real:e})}createStereoPanner(){return new Yo(this)}createWaveShaper(){return new Jo(this)}decodeAudioData(e,t,n){return Fo(this._nativeContext,e).then((e=>("function"==typeof t&&t(e),e)),(e=>{throw"function"==typeof n&&n(e),e}))}});var Io,Oo,Ro,Po,No,Lo,Do,Bo,jo,Fo,Uo,zo,Ho,Vo,Wo,Go,qo,Ko,Yo,Jo;const Qo=((e,t,n,r)=>class extends e{constructor(e,i){const o=n(e),a=t(o,i);if(r(o))throw TypeError();super(e,!0,a,null),this._nativeMediaElementAudioSourceNode=a}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}})(Dr,((e,t)=>e.createMediaElementSource(t.mediaElement)),Sr,Ar),Xo=((e,t,n,r)=>class extends e{constructor(e,i){const o=n(e);if(r(o))throw new TypeError;const a={...hn,...i},s=t(o,a);super(e,!1,s,null),this._nativeMediaStreamAudioDestinationNode=s}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}})(Dr,((e,t)=>{const n=e.createMediaStreamDestination();return vn(n,t),1===n.numberOfOutputs&&Object.defineProperty(n,"numberOfOutputs",{get:()=>0}),n}),Sr,Ar),Zo=((e,t,n,r)=>class extends e{constructor(e,i){const o=n(e),a=t(o,i);if(r(o))throw new TypeError;super(e,!0,a,null),this._nativeMediaStreamAudioSourceNode=a}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}})(Dr,((e,{mediaStream:t})=>{const n=t.getAudioTracks();n.sort(((e,t)=>e.id<t.id?-1:e.id>t.id?1:0));const r=n.slice(0,1),i=e.createMediaStreamSource(new MediaStream(r));return Object.defineProperty(i,"mediaStream",{value:t}),i}),Sr,Ar),$o=((e,t)=>(n,{mediaStreamTrack:r})=>{if("function"==typeof n.createMediaStreamTrackSource)return n.createMediaStreamTrackSource(r);const i=new MediaStream([r]),o=n.createMediaStreamSource(i);if("audio"!==r.kind)throw e();if(t(n))throw new TypeError;return o})(ln,Ar),ea=((e,t,n)=>class extends e{constructor(e,r){const i=n(e);super(e,!0,t(i,r),null)}})(Dr,$o,Sr),ta=((e,t,n,r,i,o,a,s,l)=>class extends e{constructor(e={}){if(null===l)throw new Error("Missing the native AudioContext constructor.");let t;try{t=new l(e)}catch(e){if(12===e.code&&"sampleRate is not in range"===e.message)throw n();throw e}if(null===t)throw r();if(!bt(e.latencyHint))throw new TypeError(`The provided value '${e.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`);if(void 0!==e.sampleRate&&t.sampleRate!==e.sampleRate)throw n();super(t,2);const{latencyHint:i}=e,{sampleRate:o}=t;if(this._baseLatency="number"==typeof t.baseLatency?t.baseLatency:"balanced"===i?512/o:"interactive"===i||void 0===i?256/o:"playback"===i?1024/o:128*Math.max(2,Math.min(128,Math.round(i*o/128)))/o,this._nativeAudioContext=t,"webkitAudioContext"===l.name?(this._nativeGainNode=t.createGain(),this._nativeOscillatorNode=t.createOscillator(),this._nativeGainNode.gain.value=1e-37,this._nativeOscillatorNode.connect(this._nativeGainNode).connect(t.destination),this._nativeOscillatorNode.start()):(this._nativeGainNode=null,this._nativeOscillatorNode=null),this._state=null,"running"===t.state){this._state="suspended";const e=()=>{"suspended"===this._state&&(this._state=null),t.removeEventListener("statechange",e)};t.addEventListener("statechange",e)}}get baseLatency(){return this._baseLatency}get state(){return null!==this._state?this._state:this._nativeAudioContext.state}close(){return"closed"===this.state?this._nativeAudioContext.close().then((()=>{throw t()})):("suspended"===this._state&&(this._state=null),this._nativeAudioContext.close().then((()=>{null!==this._nativeGainNode&&null!==this._nativeOscillatorNode&&(this._nativeOscillatorNode.stop(),this._nativeGainNode.disconnect(),this._nativeOscillatorNode.disconnect()),yt(this)})))}createMediaElementSource(e){return new i(this,{mediaElement:e})}createMediaStreamDestination(){return new o(this)}createMediaStreamSource(e){return new a(this,{mediaStream:e})}createMediaStreamTrackSource(e){return new s(this,{mediaStreamTrack:e})}resume(){return"suspended"===this._state?new Promise(((e,t)=>{const n=()=>{this._nativeAudioContext.removeEventListener("statechange",n),"running"===this._nativeAudioContext.state?e():this.resume().then(e,t)};this._nativeAudioContext.addEventListener("statechange",n)})):this._nativeAudioContext.resume().catch((e=>{if(void 0===e||15===e.code)throw t();throw e}))}suspend(){return this._nativeAudioContext.suspend().catch((e=>{if(void 0===e)throw t();throw e}))}})(To,ln,Bn,Vn,Qo,Xo,Zo,ea,Ir),na=(ra=Zi,e=>{const t=ra.get(e);if(void 0===t)throw new Error("The context has no set of AudioWorkletNodes.");return t});var ra;const ia=(oa=na,(e,t)=>{oa(e).add(t)});var oa;const aa=(e=>(t,n,r=0,i=0)=>{const o=t[r];if(void 0===o)throw e();return jt(n)?o.connect(n,0,i):o.connect(n,0)})(nt),sa=(e=>(t,n)=>{e(t).delete(n)})(na),la=(e=>(t,n,r,i=0)=>void 0===n?t.forEach((e=>e.disconnect())):"number"==typeof n?on(e,t,n).disconnect():jt(n)?void 0===r?t.forEach((e=>e.disconnect(n))):void 0===i?on(e,t,r).disconnect(n,0):on(e,t,r).disconnect(n,0,i):void 0===r?t.forEach((e=>e.disconnect(n))):on(e,t,r).disconnect(n,0))(nt),ca=new WeakMap,ua=(da=ca,fa=Ge,e=>fa(da,e));var da,fa;const ha=((e,t,n,r,i,o,a,s,l,c,u,d,f)=>(h,p,m,g)=>{if(0===g.numberOfInputs&&0===g.numberOfOutputs)throw l();const v=Array.isArray(g.outputChannelCount)?g.outputChannelCount:Array.from(g.outputChannelCount);if(v.some((e=>e<1)))throw l();if(v.length!==g.numberOfOutputs)throw t();if("explicit"!==g.channelCountMode)throw l();const y=g.channelCount*g.numberOfInputs,b=v.reduce(((e,t)=>e+t),0),w=void 0===m.parameterDescriptors?0:m.parameterDescriptors.length;if(y+w>6||b>6)throw l();const x=new MessageChannel,S=[],M=[];for(let e=0;e<g.numberOfInputs;e+=1)S.push(a(h,{channelCount:g.channelCount,channelCountMode:g.channelCountMode,channelInterpretation:g.channelInterpretation,gain:1})),M.push(i(h,{channelCount:g.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:g.channelCount}));const _=[];if(void 0!==m.parameterDescriptors)for(const{defaultValue:e,maxValue:t,minValue:n,name:r}of m.parameterDescriptors){const i=o(h,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:void 0!==g.parameterData[r]?g.parameterData[r]:void 0===e?0:e});Object.defineProperties(i.offset,{defaultValue:{get:()=>void 0===e?0:e},maxValue:{get:()=>void 0===t?at:t},minValue:{get:()=>void 0===n?ot:n}}),_.push(i)}const A=r(h,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,y+w)}),E=_n(p,h.sampleRate),C=s(h,E,y+w,Math.max(1,b)),k=i(h,{channelCount:Math.max(1,b),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,b)}),T=[];for(let e=0;e<g.numberOfOutputs;e+=1)T.push(r(h,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:v[e]}));for(let e=0;e<g.numberOfInputs;e+=1){S[e].connect(M[e]);for(let t=0;t<g.channelCount;t+=1)M[e].connect(A,t,e*g.channelCount+t)}const I=new Vt(void 0===m.parameterDescriptors?[]:m.parameterDescriptors.map((({name:e},t)=>{const n=_[t];return n.connect(A,0,y+t),n.start(0),[e,n.offset]})));A.connect(C);let O=g.channelInterpretation,R=null;const P=0===g.numberOfOutputs?[C]:T,N={get bufferSize(){return E},get channelCount(){return g.channelCount},set channelCount(e){throw n()},get channelCountMode(){return g.channelCountMode},set channelCountMode(e){throw n()},get channelInterpretation(){return O},set channelInterpretation(e){for(const t of S)t.channelInterpretation=e;O=e},get context(){return C.context},get inputs(){return S},get numberOfInputs(){return g.numberOfInputs},get numberOfOutputs(){return g.numberOfOutputs},get onprocessorerror(){return R},set onprocessorerror(e){"function"==typeof R&&N.removeEventListener("processorerror",R),R="function"==typeof e?e:null,"function"==typeof R&&N.addEventListener("processorerror",R)},get parameters(){return I},get port(){return x.port2},addEventListener:(...e)=>C.addEventListener(e[0],e[1],e[2]),connect:e.bind(null,P),disconnect:c.bind(null,P),dispatchEvent:(...e)=>C.dispatchEvent(e[0]),removeEventListener:(...e)=>C.removeEventListener(e[0],e[1],e[2])},L=new Map;var D,B;x.port1.addEventListener=(D=x.port1.addEventListener,(...e)=>{if("message"===e[0]){const t="function"==typeof e[1]?e[1]:"object"==typeof e[1]&&null!==e[1]&&"function"==typeof e[1].handleEvent?e[1].handleEvent:null;if(null!==t){const n=L.get(e[1]);void 0!==n?e[1]=n:(e[1]=e=>{u(h.currentTime,h.sampleRate,(()=>t(e)))},L.set(t,e[1]))}}return D.call(x.port1,e[0],e[1],e[2])}),x.port1.removeEventListener=(B=x.port1.removeEventListener,(...e)=>{if("message"===e[0]){const t=L.get(e[1]);void 0!==t&&(L.delete(e[1]),e[1]=t)}return B.call(x.port1,e[0],e[1],e[2])});let j=null;Object.defineProperty(x.port1,"onmessage",{get:()=>j,set:e=>{"function"==typeof j&&x.port1.removeEventListener("message",j),j="function"==typeof e?e:null,"function"==typeof j&&(x.port1.addEventListener("message",j),x.port1.start())}}),m.prototype.port=x.port1;let F=null;Cn(h,N,m,g).then((e=>F=e));const U=Kt(g.numberOfInputs,g.channelCount),z=Kt(g.numberOfOutputs,v),H=void 0===m.parameterDescriptors?[]:m.parameterDescriptors.reduce(((e,{name:t})=>({...e,[t]:new Float32Array(128)})),{});let V=!0;const W=()=>{g.numberOfOutputs>0&&C.disconnect(k);for(let e=0,t=0;e<g.numberOfOutputs;e+=1){const n=T[e];for(let r=0;r<v[e];r+=1)k.disconnect(n,t+r,r);t+=v[e]}},G=new Map;C.onaudioprocess=({inputBuffer:e,outputBuffer:t})=>{if(null!==F){const n=d(N);for(let r=0;r<E;r+=128){for(let t=0;t<g.numberOfInputs;t+=1)for(let n=0;n<g.channelCount;n+=1)Gt(e,U[t],n,n,r);void 0!==m.parameterDescriptors&&m.parameterDescriptors.forEach((({name:t},n)=>{Gt(e,H,t,y+n,r)}));for(let e=0;e<g.numberOfInputs;e+=1)for(let t=0;t<v[e];t+=1)0===z[e][t].byteLength&&(z[e][t]=new Float32Array(128));try{const e=U.map(((e,t)=>{if(n[t].size>0)return G.set(t,E/128),e;const r=G.get(t);return void 0===r?[]:(e.every((e=>e.every((e=>0===e))))&&(1===r?G.delete(t):G.set(t,r-1)),e)})),i=u(h.currentTime+r/h.sampleRate,h.sampleRate,(()=>F.process(e,z,H)));V=i;for(let e=0,n=0;e<g.numberOfOutputs;e+=1){for(let i=0;i<v[e];i+=1)qt(t,z[e],i,n+i,r);n+=v[e]}}catch(e){V=!1,N.dispatchEvent(new ErrorEvent("processorerror",{colno:e.colno,filename:e.filename,lineno:e.lineno,message:e.message}))}if(!V){for(let e=0;e<g.numberOfInputs;e+=1){S[e].disconnect(M[e]);for(let t=0;t<g.channelCount;t+=1)M[r].disconnect(A,t,e*g.channelCount+t)}if(void 0!==m.parameterDescriptors){const e=m.parameterDescriptors.length;for(let t=0;t<e;t+=1){const e=_[t];e.disconnect(A,0,y+t),e.stop()}}A.disconnect(C),C.onaudioprocess=null,q?W():J();break}}}};let q=!1;const K=a(h,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0}),Y=()=>C.connect(K).connect(h.destination),J=()=>{C.disconnect(K),K.disconnect()};return Y(),f(N,(()=>{if(V){J(),g.numberOfOutputs>0&&C.connect(k);for(let e=0,t=0;e<g.numberOfOutputs;e+=1){const n=T[e];for(let r=0;r<v[e];r+=1)k.connect(n,t+r,r);t+=v[e]}}q=!0}),(()=>{V&&(Y(),W()),q=!1}))})(aa,nt,ln,Ai,In,Oi,Pn,Dn,Bn,la,So,ua,xi),pa=((e,t,n,r,i)=>(o,a,s,l,c,u)=>{if(null!==s)try{const t=new s(o,l,u),r=new Map;let a=null;if(Object.defineProperties(t,{channelCount:{get:()=>u.channelCount,set:()=>{throw e()}},channelCountMode:{get:()=>"explicit",set:()=>{throw e()}},onprocessorerror:{get:()=>a,set:e=>{"function"==typeof a&&t.removeEventListener("processorerror",a),a="function"==typeof e?e:null,"function"==typeof a&&t.addEventListener("processorerror",a)}}}),t.addEventListener=(f=t.addEventListener,(...e)=>{if("processorerror"===e[0]){const t="function"==typeof e[1]?e[1]:"object"==typeof e[1]&&null!==e[1]&&"function"==typeof e[1].handleEvent?e[1].handleEvent:null;if(null!==t){const n=r.get(e[1]);void 0!==n?e[1]=n:(e[1]=n=>{"error"===n.type?(Object.defineProperties(n,{type:{value:"processorerror"}}),t(n)):t(new ErrorEvent(e[0],{...n}))},r.set(t,e[1]))}}return f.call(t,"error",e[1],e[2]),f.call(t,...e)}),t.removeEventListener=(d=t.removeEventListener,(...e)=>{if("processorerror"===e[0]){const t=r.get(e[1]);void 0!==t&&(r.delete(e[1]),e[1]=t)}return d.call(t,"error",e[1],e[2]),d.call(t,e[0],e[1],e[2])}),0!==u.numberOfOutputs){const e=n(o,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});t.connect(e).connect(o.destination);return i(t,(()=>e.disconnect()),(()=>e.connect(o.destination)))}return t}catch(e){if(11===e.code)throw r();throw e}var d,f;if(void 0===c)throw r();return Mn(u),t(o,a,c,u)})(ln,ha,Pn,Bn,xi),ma=((e,t,n,r,i,o,a,s,l,c,u,d,f,h,p,m)=>(g,v,y)=>{const b=new WeakMap;let w=null;return{render(x,S){s(S,x);const M=b.get(S);return void 0!==M?Promise.resolve(M):(async(s,x)=>{let S=u(s),M=null;const _=et(S,x),A=Array.isArray(v.outputChannelCount)?v.outputChannelCount:Array.from(v.outputChannelCount);if(null===d){const e=A.reduce(((e,t)=>e+t),0),n=i(x,{channelCount:Math.max(1,e),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,e)}),o=[];for(let e=0;e<s.numberOfOutputs;e+=1)o.push(r(x,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:A[e]}));const c=a(x,{channelCount:v.channelCount,channelCountMode:v.channelCountMode,channelInterpretation:v.channelInterpretation,gain:1});c.connect=t.bind(null,o),c.disconnect=l.bind(null,o),M=[n,o,c]}else _||(S=new d(x,g));if(b.set(x,null===M?S:M[2]),null!==M){if(null===w){if(void 0===y)throw new Error("Missing the processor constructor.");if(null===f)throw new Error("Missing the native OfflineAudioContext constructor.");const e=s.channelCount*s.numberOfInputs,t=void 0===y.parameterDescriptors?0:y.parameterDescriptors.length,n=e+t,l=async()=>{const l=new f(n,128*Math.ceil(s.context.length/128),x.sampleRate),c=[],u=[];for(let e=0;e<v.numberOfInputs;e+=1)c.push(a(l,{channelCount:v.channelCount,channelCountMode:v.channelCountMode,channelInterpretation:v.channelInterpretation,gain:1})),u.push(i(l,{channelCount:v.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:v.channelCount}));const d=await Promise.all(Array.from(s.parameters.values()).map((async e=>{const t=o(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:e.value});return await h(l,e,t.offset),t}))),g=r(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,e+t)});for(let e=0;e<v.numberOfInputs;e+=1){c[e].connect(u[e]);for(let t=0;t<v.channelCount;t+=1)u[e].connect(g,t,e*v.channelCount+t)}for(const[t,n]of d.entries())n.connect(g,0,e+t),n.start(0);return g.connect(l.destination),await Promise.all(c.map((e=>p(s,l,e)))),m(l)};w=Jt(s,0===n?null:await l(),x,v,A,y,c)}const e=await w,t=n(x,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),[l,u,d]=M;null!==e&&(t.buffer=e,t.start(0)),t.connect(l);for(let e=0,t=0;e<s.numberOfOutputs;e+=1){const n=u[e];for(let r=0;r<A[e];r+=1)l.connect(n,t+r,r);t+=A[e]}return d}if(_)for(const[t,n]of s.parameters.entries())await e(x,n,S.parameters.get(t));else for(const[e,t]of s.parameters.entries())await h(x,t,S.parameters.get(e));return await p(s,x,S),S})(x,S)}}})(ei,aa,ni,Ai,In,Oi,Pn,sa,la,So,Rt,Lr,_r,ii,vr,qi),ga=(va=Mo,e=>va.get(e));var va;const ya=(e=>(t,n)=>{e.set(t,n)})(ca),ba=(xo&&((e,t,n,r,i,o,a,s,l,c,u,d,f,h)=>{})(ia,Dr,ai,ma,pa,mt,ga,Sr,Ar,Lr,(e=>({...e,outputChannelCount:void 0!==e.outputChannelCount?e.outputChannelCount:1===e.numberOfInputs&&1===e.numberOfOutputs?[e.channelCount]:Array.from({length:e.numberOfOutputs},(()=>1))})),ya,(e=>{const{port1:t,port2:n}=new MessageChannel;try{t.postMessage(e)}finally{t.close(),n.close()}}),$n),((e,t,n,r,i)=>{})(ln,Bn,Vn,$i,Ir),((e,t)=>(n,r,i)=>{if(null===t)throw new Error("Missing the native OfflineAudioContext constructor.");try{return new t(n,r,i)}catch(t){if("SyntaxError"===t.name)throw e();throw t}})(Bn,_r)),wa=((e,t,n,r,i,o,a,s)=>(l,c)=>n(l).render(l,c).then((()=>Promise.all(Array.from(r(c)).map((e=>n(e).render(e,c)))))).then((()=>i(c))).then((n=>("function"!=typeof n.copyFromChannel?(a(n),rt(n)):t(o,(()=>o(n)))||s(n),e.add(n),n))))(Fr,lr,mr,na,qi,tt,Vr,Wr);xa=Oe,Sa=Pr;var xa,Sa;Ma=Pe,_a=Nr;var Ma,_a;var Aa,Ea=new Uint8Array(16);function Ca(){if(!Aa&&!(Aa="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Aa(Ea)}var ka=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Ta=function(e){return"string"==typeof e&&ka.test(e)},Ia=[],Oa=0;Oa<256;++Oa)Ia.push((Oa+256).toString(16).substr(1));var Ra=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Ia[e[t+0]]+Ia[e[t+1]]+Ia[e[t+2]]+Ia[e[t+3]]+"-"+Ia[e[t+4]]+Ia[e[t+5]]+"-"+Ia[e[t+6]]+Ia[e[t+7]]+"-"+Ia[e[t+8]]+Ia[e[t+9]]+"-"+Ia[e[t+10]]+Ia[e[t+11]]+Ia[e[t+12]]+Ia[e[t+13]]+Ia[e[t+14]]+Ia[e[t+15]]).toLowerCase();if(!Ta(n))throw TypeError("Stringified UUID is invalid");return n};var Pa=function(e,t,n){var r=(e=e||{}).random||(e.rng||Ca)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return Ra(r)};const Na=()=>Pa(),La=()=>Na().replace(new RegExp("-","g"),"").toUpperCase();var Da,Ba,ja,Fa,Ua,za,Ha,Va;(Ba=Da||(Da={}))[Ba.Debug=0]="Debug",Ba[Ba.Info=1]="Info",Ba[Ba.Warning=2]="Warning",Ba[Ba.Error=3]="Error";class Wa{constructor(e,t){this.privName=e,this.privEventId=La(),this.privEventTime=(new Date).toISOString(),this.privEventType=t,this.privMetadata={}}get name(){return this.privName}get eventId(){return this.privEventId}get eventTime(){return this.privEventTime}get eventType(){return this.privEventType}get metadata(){return this.privMetadata}}class Ga extends Wa{constructor(e,t,n=Da.Info){super(e,n),this.privAudioSourceId=t}get audioSourceId(){return this.privAudioSourceId}}class qa extends Ga{constructor(e){super("AudioSourceInitializingEvent",e)}}class Ka extends Ga{constructor(e){super("AudioSourceReadyEvent",e)}}class Ya extends Ga{constructor(e){super("AudioSourceOffEvent",e)}}class Ja extends Ga{constructor(e,t){super("AudioSourceErrorEvent",e,Da.Error),this.privError=t}get error(){return this.privError}}class Qa extends Ga{constructor(e,t,n){super(e,t),this.privAudioNodeId=n}get audioNodeId(){return this.privAudioNodeId}}class Xa extends Qa{constructor(e,t){super("AudioStreamNodeAttachingEvent",e,t)}}class Za extends Qa{constructor(e,t){super("AudioStreamNodeAttachedEvent",e,t)}}class $a extends Qa{constructor(e,t){super("AudioStreamNodeDetachedEvent",e,t)}}class es extends Qa{constructor(e,t,n){super("AudioStreamNodeErrorEvent",e,t),this.privError=n}get error(){return this.privError}}class ts extends Wa{constructor(e,t,n=Da.Info){super(e,n),this.privJsonResult=t}get jsonString(){return this.privJsonResult}}class ns extends Wa{constructor(e,t,n=Da.Info){super(e,n),this.privConnectionId=t}get connectionId(){return this.privConnectionId}}class rs extends ns{constructor(e,t,n){super("ConnectionStartEvent",e),this.privUri=t,this.privHeaders=n}get uri(){return this.privUri}get headers(){return this.privHeaders}}class is extends ns{constructor(e,t){super("ConnectionEstablishedEvent",e)}}class os extends ns{constructor(e,t,n){super("ConnectionClosedEvent",e,Da.Debug),this.privReason=n,this.privStatusCode=t}get reason(){return this.privReason}get statusCode(){return this.privStatusCode}}class as extends ns{constructor(e,t,n){super("ConnectionErrorEvent",e,Da.Debug),this.privMessage=t,this.privType=n}get message(){return this.privMessage}get type(){return this.privType}}class ss extends ns{constructor(e,t,n){super("ConnectionEstablishErrorEvent",e,Da.Error),this.privStatusCode=t,this.privReason=n}get reason(){return this.privReason}get statusCode(){return this.privStatusCode}}class ls extends ns{constructor(e,t,n){super("ConnectionMessageReceivedEvent",e),this.privNetworkReceivedTime=t,this.privMessage=n}get networkReceivedTime(){return this.privNetworkReceivedTime}get message(){return this.privMessage}}class cs extends ns{constructor(e,t,n){super("ConnectionMessageSentEvent",e),this.privNetworkSentTime=t,this.privMessage=n}get networkSentTime(){return this.privNetworkSentTime}get message(){return this.privMessage}}class us extends Error{constructor(e){super(e),this.name="ArgumentNull",this.message=e}}class ds extends Error{constructor(e){super(e),this.name="InvalidOperation",this.message=e}}class fs extends Error{constructor(e,t){super(t),this.name=e+"ObjectDisposed",this.message=t}}(Fa=ja||(ja={}))[Fa.Text=0]="Text",Fa[Fa.Binary=1]="Binary";class hs{constructor(e,t,n,r){if(this.privBody=null,e===ja.Text&&t&&"string"!=typeof t)throw new ds("Payload must be a string");if(e===ja.Binary&&t&&!(t instanceof ArrayBuffer))throw new ds("Payload must be ArrayBuffer");switch(this.privMessageType=e,this.privBody=t,this.privHeaders=n||{},this.privId=r||La(),this.messageType){case ja.Binary:this.privSize=null!==this.binaryBody?this.binaryBody.byteLength:0;break;case ja.Text:this.privSize=this.textBody.length}}get messageType(){return this.privMessageType}get headers(){return this.privHeaders}get body(){return this.privBody}get textBody(){if(this.privMessageType===ja.Binary)throw new ds("Not supported for binary message");return this.privBody}get binaryBody(){if(this.privMessageType===ja.Text)throw new ds("Not supported for text message");return this.privBody}get id(){return this.privId}}class ps{constructor(e,t){this.privStatusCode=e,this.privReason=t}get statusCode(){return this.privStatusCode}get reason(){return this.privReason}}class ms{constructor(e){this.privEventListeners={},this.privIsDisposed=!1,this.onEvent=e=>{if(this.isDisposed())throw new fs("EventSource");if(this.metadata)for(const t in this.metadata)t&&e.metadata&&(e.metadata[t]||(e.metadata[t]=this.metadata[t]));for(const t in this.privEventListeners)t&&this.privEventListeners[t]&&this.privEventListeners[t](e)},this.attach=e=>{const t=La();return this.privEventListeners[t]=e,{detach:()=>(delete this.privEventListeners[t],Promise.resolve())}},this.attachListener=e=>this.attach(e.onEvent),this.isDisposed=()=>this.privIsDisposed,this.dispose=()=>{this.privEventListeners=null,this.privIsDisposed=!0},this.privMetadata=e}get metadata(){return this.privMetadata}}class gs{static get instance(){return gs.privInstance}}gs.privInstance=new ms,gs.setEventSource=e=>{if(!e)throw new us("eventSource");gs.privInstance=e},(za=Ua||(Ua={}))[za.None=0]="None",za[za.Connected=1]="Connected",za[za.Connecting=2]="Connecting",za[za.Disconnected=3]="Disconnected",(Va=Ha||(Ha={}))[Va.None=0]="None",Va[Va.Resolved=1]="Resolved",Va[Va.Rejected=2]="Rejected";class vs{constructor(){this.resolve=e=>(this.privResolve(e),this),this.reject=e=>(this.privReject(e),this),this.privPromise=new Promise(((e,t)=>{this.privResolve=e,this.privReject=t}))}get promise(){return this.privPromise}}function ys(e,t,n){e.then((e=>{try{t&&t(e)}catch(e){if(n)try{if(e instanceof Error){const t=e;n(t.name+": "+t.message)}else n(e)}catch(e){}}}),(e=>{if(n)try{if(e instanceof Error){const t=e;n(t.name+": "+t.message)}else n(e)}catch(e){}}))}var bs={};e(bs,"Queue",(()=>_s),(e=>_s=e));class ws{constructor(e){if(this.privSubscriptionIdCounter=0,this.privAddSubscriptions={},this.privRemoveSubscriptions={},this.privDisposedSubscriptions={},this.privDisposeReason=null,this.get=e=>(this.throwIfDisposed(),this.privList[e]),this.first=()=>this.get(0),this.last=()=>this.get(this.length()-1),this.add=e=>{this.throwIfDisposed(),this.insertAt(this.privList.length,e)},this.insertAt=(e,t)=>{this.throwIfDisposed(),0===e?this.privList.unshift(t):e===this.privList.length?this.privList.push(t):this.privList.splice(e,0,t),this.triggerSubscriptions(this.privAddSubscriptions)},this.removeFirst=()=>(this.throwIfDisposed(),this.removeAt(0)),this.removeLast=()=>(this.throwIfDisposed(),this.removeAt(this.length()-1)),this.removeAt=e=>(this.throwIfDisposed(),this.remove(e,1)[0]),this.remove=(e,t)=>{this.throwIfDisposed();const n=this.privList.splice(e,t);return this.triggerSubscriptions(this.privRemoveSubscriptions),n},this.clear=()=>{this.throwIfDisposed(),this.remove(0,this.length())},this.length=()=>(this.throwIfDisposed(),this.privList.length),this.onAdded=e=>{this.throwIfDisposed();const t=this.privSubscriptionIdCounter++;return this.privAddSubscriptions[t]=e,{detach:()=>(delete this.privAddSubscriptions[t],Promise.resolve())}},this.onRemoved=e=>{this.throwIfDisposed();const t=this.privSubscriptionIdCounter++;return this.privRemoveSubscriptions[t]=e,{detach:()=>(delete this.privRemoveSubscriptions[t],Promise.resolve())}},this.onDisposed=e=>{this.throwIfDisposed();const t=this.privSubscriptionIdCounter++;return this.privDisposedSubscriptions[t]=e,{detach:()=>(delete this.privDisposedSubscriptions[t],Promise.resolve())}},this.join=e=>(this.throwIfDisposed(),this.privList.join(e)),this.toArray=()=>{const e=Array();return this.privList.forEach((t=>{e.push(t)})),e},this.any=e=>(this.throwIfDisposed(),e?this.where(e).length()>0:this.length()>0),this.all=e=>(this.throwIfDisposed(),this.where(e).length()===this.length()),this.forEach=e=>{this.throwIfDisposed();for(let t=0;t<this.length();t++)e(this.privList[t],t)},this.select=e=>{this.throwIfDisposed();const t=[];for(let n=0;n<this.privList.length;n++)t.push(e(this.privList[n],n));return new ws(t)},this.where=e=>{this.throwIfDisposed();const t=new ws;for(let n=0;n<this.privList.length;n++)e(this.privList[n],n)&&t.add(this.privList[n]);return t},this.orderBy=e=>{this.throwIfDisposed();const t=this.toArray().sort(e);return new ws(t)},this.orderByDesc=e=>(this.throwIfDisposed(),this.orderBy(((t,n)=>e(n,t)))),this.clone=()=>(this.throwIfDisposed(),new ws(this.toArray())),this.concat=e=>(this.throwIfDisposed(),new ws(this.privList.concat(e.toArray()))),this.concatArray=e=>(this.throwIfDisposed(),new ws(this.privList.concat(e))),this.isDisposed=()=>null==this.privList,this.dispose=e=>{this.isDisposed()||(this.privDisposeReason=e,this.privList=null,this.privAddSubscriptions=null,this.privRemoveSubscriptions=null,this.triggerSubscriptions(this.privDisposedSubscriptions))},this.throwIfDisposed=()=>{if(this.isDisposed())throw new fs("List",this.privDisposeReason)},this.triggerSubscriptions=e=>{if(e)for(const t in e)t&&e[t]()},this.privList=[],e)for(const t of e)this.privList.push(t)}}var xs,Ss,Ms=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};(Ss=xs||(xs={}))[Ss.Dequeue=0]="Dequeue",Ss[Ss.Peek=1]="Peek";class _s{constructor(e){this.privPromiseStore=new ws,this.privIsDrainInProgress=!1,this.privIsDisposing=!1,this.privDisposeReason=null,this.enqueue=e=>{this.throwIfDispose(),this.enqueueFromPromise(new Promise(((t,n)=>{t(e)})))},this.enqueueFromPromise=e=>{this.throwIfDispose(),e.then((e=>{this.privList.add(e)}),(e=>{}))},this.dequeue=()=>{this.throwIfDispose();const e=new vs;return this.privSubscribers&&(this.privSubscribers.add({deferral:e,type:xs.Dequeue}),this.drain()),e.promise},this.peek=()=>{this.throwIfDispose();const e=new vs;return this.privSubscribers&&(this.privSubscribers.add({deferral:e,type:xs.Peek}),this.drain()),e.promise},this.length=()=>(this.throwIfDispose(),this.privList.length()),this.isDisposed=()=>null==this.privSubscribers,this.drain=()=>{if(!this.privIsDrainInProgress&&!this.privIsDisposing){this.privIsDrainInProgress=!0;const e=this.privSubscribers,t=this.privList;if(e&&t){for(;t.length()>0&&e.length()>0&&!this.privIsDisposing;){const n=e.removeFirst();if(n.type===xs.Peek)n.deferral.resolve(t.first());else{const e=t.removeFirst();n.deferral.resolve(e)}}this.privSubscribers===e&&(this.privSubscribers=e),this.privList===t&&(this.privList=t)}this.privIsDrainInProgress=!1}},this.throwIfDispose=()=>{if(this.isDisposed()){if(this.privDisposeReason)throw new ds(this.privDisposeReason);throw new fs("Queue")}if(this.privIsDisposing)throw new ds("Queue disposing")},this.privList=e||new ws,this.privDetachables=[],this.privSubscribers=new ws,this.privDetachables.push(this.privList.onAdded(this.drain))}drainAndDispose(e,t){return Ms(this,void 0,void 0,(function*(){if(!this.isDisposed()&&!this.privIsDisposing){this.privDisposeReason=t,this.privIsDisposing=!0;const n=this.privSubscribers;if(n){for(;n.length()>0;){n.removeFirst().deferral.resolve(void 0)}this.privSubscribers===n&&(this.privSubscribers=n)}for(const e of this.privDetachables)yield e.detach();if(this.privPromiseStore.length()>0&&e){const t=[];return this.privPromiseStore.toArray().forEach((e=>{t.push(e)})),Promise.all(t).finally((()=>{this.privSubscribers=null,this.privList.forEach(((t,n)=>{e(t)})),this.privList=null})).then()}this.privSubscribers=null,this.privList=null}}))}dispose(e){return Ms(this,void 0,void 0,(function*(){yield this.drainAndDispose(null,e)}))}}class As{constructor(e,t,n){if(this.privPayload=null,!t)throw new us("payload");if(e===ja.Binary&&"ArrayBuffer"!==t.__proto__.constructor.name)throw new ds("Payload must be ArrayBuffer");if(e===ja.Text&&"string"!=typeof t)throw new ds("Payload must be a string");this.privMessageType=e,this.privPayload=t,this.privId=n||La()}get messageType(){return this.privMessageType}get payload(){return this.privPayload}get textContent(){if(this.privMessageType===ja.Binary)throw new ds("Not supported for binary message");return this.privPayload}get binaryContent(){if(this.privMessageType===ja.Text)throw new ds("Not supported for text message");return this.privPayload}get id(){return this.privId}}class Es{constructor(e,t){this.encode=e=>{const t=this.downSampleAudioFrame(e,this.privActualSampleRate,this.privDesiredSampleRate);if(!t)return null;const n=2*t.length,r=new ArrayBuffer(n),i=new DataView(r);return this.floatTo16BitPCM(i,0,t),r},this.setString=(e,t,n)=>{for(let r=0;r<n.length;r++)e.setUint8(t+r,n.charCodeAt(r))},this.floatTo16BitPCM=(e,t,n)=>{for(let r=0;r<n.length;r++,t+=2){const i=Math.max(-1,Math.min(1,n[r]));e.setInt16(t,i<0?32768*i:32767*i,!0)}},this.downSampleAudioFrame=(e,t,n)=>{if(!e)return null;if(n===t||n>t)return e;const r=t/n,i=Math.round(e.length/r),o=new Float32Array(i);let a=0,s=0;for(;s<i;){const t=Math.round((s+1)*r);let n=0,i=0;for(;a<t&&a<e.length;)n+=e[a++],i++;o[s++]=n/i}return o},this.privActualSampleRate=e,this.privDesiredSampleRate=t}}var Cs={};e(Cs,"Stream",(()=>Os),(e=>Os=e));var ks,Ts,Is=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class Os{constructor(e){this.privIsWriteEnded=!1,this.privIsReadEnded=!1,this.read=()=>{if(this.privIsReadEnded)throw new ds("Stream read has already finished");return this.privReaderQueue.dequeue().then((e=>Is(this,void 0,void 0,(function*(){return(void 0===e||e.isEnd)&&(yield this.privReaderQueue.dispose("End of stream reached")),e}))))},this.readEnded=()=>{this.privIsReadEnded||(this.privIsReadEnded=!0,this.privReaderQueue=new(0,bs.Queue))},this.throwIfClosed=()=>{if(this.privIsWriteEnded)throw new ds("Stream closed")},this.privId=e||La(),this.privReaderQueue=new(0,bs.Queue)}get isClosed(){return this.privIsWriteEnded}get isReadEnded(){return this.privIsReadEnded}get id(){return this.privId}close(){this.privIsWriteEnded||(this.writeStreamChunk({buffer:null,isEnd:!0,timeReceived:Date.now()}),this.privIsWriteEnded=!0)}writeStreamChunk(e){if(this.throwIfClosed(),!this.privReaderQueue.isDisposed())try{this.privReaderQueue.enqueue(e)}catch(e){}}}(Ts=ks||(ks={}))[Ts.Success=0]="Success",Ts[Ts.Error=1]="Error";class Rs extends Cs.Stream{constructor(e,t){super(t),this.privTargetChunkSize=e,this.privNextBufferReadyBytes=0}writeStreamChunk(e){if(e.isEnd||0===this.privNextBufferReadyBytes&&e.buffer.byteLength===this.privTargetChunkSize)return void super.writeStreamChunk(e);let t=0;for(;t<e.buffer.byteLength;){void 0===this.privNextBufferToWrite&&(this.privNextBufferToWrite=new ArrayBuffer(this.privTargetChunkSize),this.privNextBufferStartTime=e.timeReceived);const n=Math.min(e.buffer.byteLength-t,this.privTargetChunkSize-this.privNextBufferReadyBytes),r=new Uint8Array(this.privNextBufferToWrite),i=new Uint8Array(e.buffer.slice(t,n+t));r.set(i,this.privNextBufferReadyBytes),this.privNextBufferReadyBytes+=n,t+=n,this.privNextBufferReadyBytes===this.privTargetChunkSize&&(super.writeStreamChunk({buffer:this.privNextBufferToWrite,isEnd:!1,timeReceived:this.privNextBufferStartTime}),this.privNextBufferReadyBytes=0,this.privNextBufferToWrite=void 0)}}close(){0===this.privNextBufferReadyBytes||this.isClosed||super.writeStreamChunk({buffer:this.privNextBufferToWrite.slice(0,this.privNextBufferReadyBytes),isEnd:!1,timeReceived:this.privNextBufferStartTime}),super.close()}}class Ps{}Ps.workerTimers=null,Ps.clearTimeout=e=>Ps.timers().clearTimeout(e),Ps.setTimeout=(e,t)=>Ps.timers().setTimeout(e,t),Ps.load=e=>{const t=new Map([[0,()=>{}]]),n=new Map,r=new Worker(e);r.addEventListener("message",(({data:e})=>{if(Ps.isCallNotification(e)){const{params:{timerId:r}}=e,i=t.get(r);if("number"==typeof i){const e=n.get(i);if(void 0===e||e!==r)throw new Error("The timer is in an undefined state.")}else{if(void 0===i)throw new Error("The timer is in an undefined state.");i(),t.delete(r)}}else{if(!Ps.isClearResponse(e)){const{error:{message:t}}=e;throw new Error(t)}{const{id:r}=e,i=n.get(r);if(void 0===i)throw new Error("The timer is in an undefined state.");n.delete(r),t.delete(i)}}}));return{clearTimeout:e=>{const i=Math.random();n.set(i,e),t.set(e,i),r.postMessage({id:i,method:"clear",params:{timerId:e}})},setTimeout:(e,n)=>{const i=Math.random();return t.set(i,e),r.postMessage({id:null,method:"set",params:{delay:n,now:performance.now(),timerId:i}}),i}}},Ps.loadWorkerTimers=()=>()=>{if(null!==Ps.workerTimers)return Ps.workerTimers;const e=new Blob(['!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=14)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return d}));const r=new Map,o=new Map,i=e=>{const t=r.get(e);if(void 0===t)throw new Error(\'There is no interval scheduled with the given id "\'.concat(e,\'".\'));clearTimeout(t),r.delete(e)},u=e=>{const t=o.get(e);if(void 0===t)throw new Error(\'There is no timeout scheduled with the given id "\'.concat(e,\'".\'));clearTimeout(t),o.delete(e)},f=(e,t)=>{let n,r;if("performance"in self){const o=performance.now();n=o,r=e-Math.max(0,o-t)}else n=Date.now(),r=e;return{expected:n+r,remainingDelay:r}},c=(e,t,n,r)=>{const o="performance"in self?performance.now():Date.now();o>n?postMessage({id:null,method:"call",params:{timerId:t}}):e.set(t,setTimeout(c,n-o,e,t,n))},a=(e,t,n)=>{const{expected:o,remainingDelay:i}=f(e,n);r.set(t,setTimeout(c,i,r,t,o))},d=(e,t,n)=>{const{expected:r,remainingDelay:i}=f(e,n);o.set(t,setTimeout(c,i,o,t,r))}},function(e,t,n){"use strict";n.r(t);var r=n(2);for(var o in r)"default"!==o&&function(e){n.d(t,e,(function(){return r[e]}))}(o);var i=n(3);for(var o in i)"default"!==o&&function(e){n.d(t,e,(function(){return i[e]}))}(o);var u=n(4);for(var o in u)"default"!==o&&function(e){n.d(t,e,(function(){return u[e]}))}(o);var f=n(5);for(var o in f)"default"!==o&&function(e){n.d(t,e,(function(){return f[e]}))}(o);var c=n(6);for(var o in c)"default"!==o&&function(e){n.d(t,e,(function(){return c[e]}))}(o);var a=n(7);for(var o in a)"default"!==o&&function(e){n.d(t,e,(function(){return a[e]}))}(o);var d=n(8);for(var o in d)"default"!==o&&function(e){n.d(t,e,(function(){return d[e]}))}(o);var s=n(9);for(var o in s)"default"!==o&&function(e){n.d(t,e,(function(){return s[e]}))}(o)},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.r(t);var r=n(11);for(var o in r)"default"!==o&&function(e){n.d(t,e,(function(){return r[e]}))}(o);var i=n(12);for(var o in i)"default"!==o&&function(e){n.d(t,e,(function(){return i[e]}))}(o);var u=n(13);for(var o in u)"default"!==o&&function(e){n.d(t,e,(function(){return u[e]}))}(o)},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(1);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);var u=n(10);for(var i in u)"default"!==i&&function(e){n.d(t,e,(function(){return u[e]}))}(i);addEventListener("message",({data:e})=>{try{if("clear"===e.method){const{id:t,params:{timerId:n}}=e;Object(r.b)(n),postMessage({error:null,id:t})}else{if("set"!==e.method)throw new Error(\'The given method "\'.concat(e.method,\'" is not supported\'));{const{params:{delay:t,now:n,timerId:o}}=e;Object(r.d)(t,o,n)}}}catch(t){postMessage({error:{message:t.message},id:e.id,result:null})}})}]);'],{type:"application/javascript; charset=utf-8"}),t=URL.createObjectURL(e);return Ps.workerTimers=Ps.load(t),Ps.workerTimers.setTimeout((()=>URL.revokeObjectURL(t)),0),Ps.workerTimers},Ps.timers=Ps.loadWorkerTimers(),Ps.isCallNotification=e=>void 0!==e.method&&"call"===e.method,Ps.isClearResponse=e=>null===e.error&&"number"==typeof e.id;class Ns extends Wa{constructor(e,t,n){super(e,t),this.privSignature=n}}class Ls extends Ns{constructor(e){super("OCSPMemoryCacheHitEvent",Da.Debug,e)}}class Ds extends Ns{constructor(e){super("OCSPCacheMissEvent",Da.Debug,e)}}class Bs extends Ns{constructor(e){super("OCSPDiskCacheHitEvent",Da.Debug,e)}}class js extends Ns{constructor(e){super("OCSPCacheUpdateNeededEvent",Da.Debug,e)}}class Fs extends Ns{constructor(e){super("OCSPMemoryCacheStoreEvent",Da.Debug,e)}}class Us extends Ns{constructor(e){super("OCSPDiskCacheStoreEvent",Da.Debug,e)}}class zs extends Ns{constructor(e){super("OCSPCacheUpdateCompleteEvent",Da.Debug,e)}}class Hs extends Ns{constructor(){super("OCSPStapleReceivedEvent",Da.Debug,"")}}class Vs extends Ns{constructor(e,t){super("OCSPCacheEntryExpiredEvent",Da.Debug,e),this.privExpireTime=t}}class Ws extends Ns{constructor(e,t,n){super("OCSPCacheEntryNeedsRefreshEvent",Da.Debug,e),this.privExpireTime=n,this.privStartTime=t}}class Gs extends Ns{constructor(e,t,n){super("OCSPCacheHitEvent",Da.Debug,e),this.privExpireTime=n,this.privExpireTimeString=new Date(n).toLocaleDateString(),this.privStartTime=t,this.privStartTimeString=new Date(t).toLocaleTimeString()}}class qs extends Ns{constructor(e,t){super("OCSPVerificationFailedEvent",Da.Debug,e),this.privError=t}}class Ks extends Ns{constructor(e,t){super("OCSPCacheFetchErrorEvent",Da.Debug,e),this.privError=t}}class Ys extends Ns{constructor(e){super("OCSPResponseRetrievedEvent",Da.Debug,e)}}class Js extends Ns{constructor(e,t){super("OCSPCacheUpdateErrorEvent",Da.Debug,e),this.privError=t}}class Qs extends Wa{constructor(e){super("BackgroundEvent",Da.Error),this.privError=e}get error(){return this.privError}}var Xs={};e(Xs,"MicAudioSource",(()=>mu),(e=>mu=e));class Zs{}Zs.AuthKey="Ocp-Apim-Subscription-Key",Zs.ConnectionId="X-ConnectionId",Zs.ContentType="Content-Type",Zs.CustomCommandsAppId="X-CommandsAppId",Zs.Path="Path",Zs.RequestId="X-RequestId",Zs.RequestStreamId="X-StreamId",Zs.RequestTimestamp="X-Timestamp";class $s{constructor(e,t){this.privHeaderName=e,this.privToken=t}get headerName(){return this.privHeaderName}get token(){return this.privToken}}class el{constructor(e){if(this.fetch=e=>Promise.resolve(this.privAuthInfo),this.fetchOnExpiry=e=>Promise.resolve(this.privAuthInfo),!e)throw new us("subscriptionKey");this.privAuthInfo=new $s(Zs.AuthKey,e)}}const tl="Authorization";class nl{constructor(e,t){if(this.fetch=e=>this.privFetchCallback(e).then((e=>new $s(tl,nl.privTokenPrefix+e))),this.fetchOnExpiry=e=>this.privFetchOnExpiryCallback(e).then((e=>new $s(tl,nl.privTokenPrefix+e))),!e)throw new us("fetchCallback");if(!t)throw new us("fetchOnExpiryCallback");this.privFetchCallback=e,this.privFetchOnExpiryCallback=t}}nl.privTokenPrefix="bearer ";var rl,il,ol,al,sl,ll,cl={};e(cl,"ServiceRecognizerBase",(()=>Sl),(e=>Sl=e)),(il=rl||(rl={}))[il.Error=0]="Error",il[il.EndOfStream=1]="EndOfStream",(al=ol||(ol={}))[al.NoError=0]="NoError",al[al.AuthenticationFailure=1]="AuthenticationFailure",al[al.BadRequestParameters=2]="BadRequestParameters",al[al.TooManyRequests=3]="TooManyRequests",al[al.ConnectionFailure=4]="ConnectionFailure",al[al.ServiceTimeout=5]="ServiceTimeout",al[al.ServiceError=6]="ServiceError",al[al.RuntimeError=7]="RuntimeError",al[al.Forbidden=8]="Forbidden",(ll=sl||(sl={}))[ll.SpeechServiceConnection_Key=0]="SpeechServiceConnection_Key",ll[ll.SpeechServiceConnection_Endpoint=1]="SpeechServiceConnection_Endpoint",ll[ll.SpeechServiceConnection_Region=2]="SpeechServiceConnection_Region",ll[ll.SpeechServiceAuthorization_Token=3]="SpeechServiceAuthorization_Token",ll[ll.SpeechServiceAuthorization_Type=4]="SpeechServiceAuthorization_Type",ll[ll.SpeechServiceConnection_EndpointId=5]="SpeechServiceConnection_EndpointId",ll[ll.SpeechServiceConnection_TranslationToLanguages=6]="SpeechServiceConnection_TranslationToLanguages",ll[ll.SpeechServiceConnection_TranslationVoice=7]="SpeechServiceConnection_TranslationVoice",ll[ll.SpeechServiceConnection_TranslationFeatures=8]="SpeechServiceConnection_TranslationFeatures",ll[ll.SpeechServiceConnection_IntentRegion=9]="SpeechServiceConnection_IntentRegion",ll[ll.SpeechServiceConnection_ProxyHostName=10]="SpeechServiceConnection_ProxyHostName",ll[ll.SpeechServiceConnection_ProxyPort=11]="SpeechServiceConnection_ProxyPort",ll[ll.SpeechServiceConnection_ProxyUserName=12]="SpeechServiceConnection_ProxyUserName",ll[ll.SpeechServiceConnection_ProxyPassword=13]="SpeechServiceConnection_ProxyPassword",ll[ll.SpeechServiceConnection_RecoMode=14]="SpeechServiceConnection_RecoMode",ll[ll.SpeechServiceConnection_RecoLanguage=15]="SpeechServiceConnection_RecoLanguage",ll[ll.Speech_SessionId=16]="Speech_SessionId",ll[ll.SpeechServiceConnection_SynthLanguage=17]="SpeechServiceConnection_SynthLanguage",ll[ll.SpeechServiceConnection_SynthVoice=18]="SpeechServiceConnection_SynthVoice",ll[ll.SpeechServiceConnection_SynthOutputFormat=19]="SpeechServiceConnection_SynthOutputFormat",ll[ll.SpeechServiceConnection_AutoDetectSourceLanguages=20]="SpeechServiceConnection_AutoDetectSourceLanguages",ll[ll.SpeechServiceResponse_RequestDetailedResultTrueFalse=21]="SpeechServiceResponse_RequestDetailedResultTrueFalse",ll[ll.SpeechServiceResponse_RequestProfanityFilterTrueFalse=22]="SpeechServiceResponse_RequestProfanityFilterTrueFalse",ll[ll.SpeechServiceResponse_JsonResult=23]="SpeechServiceResponse_JsonResult",ll[ll.SpeechServiceResponse_JsonErrorDetails=24]="SpeechServiceResponse_JsonErrorDetails",ll[ll.CancellationDetails_Reason=25]="CancellationDetails_Reason",ll[ll.CancellationDetails_ReasonText=26]="CancellationDetails_ReasonText",ll[ll.CancellationDetails_ReasonDetailedText=27]="CancellationDetails_ReasonDetailedText",ll[ll.LanguageUnderstandingServiceResponse_JsonResult=28]="LanguageUnderstandingServiceResponse_JsonResult",ll[ll.SpeechServiceConnection_Url=29]="SpeechServiceConnection_Url",ll[ll.SpeechServiceConnection_InitialSilenceTimeoutMs=30]="SpeechServiceConnection_InitialSilenceTimeoutMs",ll[ll.SpeechServiceConnection_EndSilenceTimeoutMs=31]="SpeechServiceConnection_EndSilenceTimeoutMs",ll[ll.SpeechServiceConnection_EnableAudioLogging=32]="SpeechServiceConnection_EnableAudioLogging",ll[ll.SpeechServiceResponse_ProfanityOption=33]="SpeechServiceResponse_ProfanityOption",ll[ll.SpeechServiceResponse_PostProcessingOption=34]="SpeechServiceResponse_PostProcessingOption",ll[ll.SpeechServiceResponse_RequestWordLevelTimestamps=35]="SpeechServiceResponse_RequestWordLevelTimestamps",ll[ll.SpeechServiceResponse_StablePartialResultThreshold=36]="SpeechServiceResponse_StablePartialResultThreshold",ll[ll.SpeechServiceResponse_OutputFormatOption=37]="SpeechServiceResponse_OutputFormatOption",ll[ll.SpeechServiceResponse_TranslationRequestStablePartialResult=38]="SpeechServiceResponse_TranslationRequestStablePartialResult",ll[ll.Conversation_ApplicationId=39]="Conversation_ApplicationId",ll[ll.Conversation_DialogType=40]="Conversation_DialogType",ll[ll.Conversation_Initial_Silence_Timeout=41]="Conversation_Initial_Silence_Timeout",ll[ll.Conversation_From_Id=42]="Conversation_From_Id",ll[ll.Conversation_Conversation_Id=43]="Conversation_Conversation_Id",ll[ll.Conversation_Custom_Voice_Deployment_Ids=44]="Conversation_Custom_Voice_Deployment_Ids",ll[ll.Conversation_Speech_Activity_Template=45]="Conversation_Speech_Activity_Template",ll[ll.Conversation_Request_Bot_Status_Messages=46]="Conversation_Request_Bot_Status_Messages",ll[ll.Conversation_Agent_Connection_Id=47]="Conversation_Agent_Connection_Id",ll[ll.SpeechServiceConnection_Host=48]="SpeechServiceConnection_Host",ll[ll.ConversationTranslator_Host=49]="ConversationTranslator_Host",ll[ll.ConversationTranslator_Name=50]="ConversationTranslator_Name",ll[ll.ConversationTranslator_CorrelationId=51]="ConversationTranslator_CorrelationId",ll[ll.ConversationTranslator_Token=52]="ConversationTranslator_Token",ll[ll.PronunciationAssessment_ReferenceText=53]="PronunciationAssessment_ReferenceText",ll[ll.PronunciationAssessment_GradingSystem=54]="PronunciationAssessment_GradingSystem",ll[ll.PronunciationAssessment_Granularity=55]="PronunciationAssessment_Granularity",ll[ll.PronunciationAssessment_EnableMiscue=56]="PronunciationAssessment_EnableMiscue",ll[ll.PronunciationAssessment_Json=57]="PronunciationAssessment_Json",ll[ll.PronunciationAssessment_Params=58]="PronunciationAssessment_Params",ll[ll.SpeakerRecognition_Api_Version=59]="SpeakerRecognition_Api_Version";class ul{constructor(e){this.privSessionId=e}get sessionId(){return this.privSessionId}}class dl extends ul{constructor(e,t){super(t),this.privOffset=e}get offset(){return this.privOffset}}class fl extends hs{constructor(e,t,n,r,i,o,a,s){if(!t)throw new us("path");if(!n)throw new us("requestId");const l={};if(l[Zs.Path]=t,l[Zs.RequestId]=n,l[Zs.RequestTimestamp]=(new Date).toISOString(),r&&(l[Zs.ContentType]=r),o&&(l[Zs.RequestStreamId]=o),a)for(const e in a)e&&(l[e]=a[e]);s?super(e,i,l,s):super(e,i,l),this.privPath=t,this.privRequestId=n,this.privContentType=r,this.privStreamId=o,this.privAdditionalHeaders=a}get path(){return this.privPath}get requestId(){return this.privRequestId}get contentType(){return this.privContentType}get streamId(){return this.privStreamId}get additionalHeaders(){return this.privAdditionalHeaders}}fl.fromConnectionMessage=e=>{let t=null,n=null,r=null,i=null,o=null;const a={};if(e.headers)for(const s in e.headers)s&&(s.toLowerCase()===Zs.Path.toLowerCase()?t=e.headers[s]:s.toLowerCase()===Zs.RequestId.toLowerCase()?n=e.headers[s]:s.toLowerCase()===Zs.RequestTimestamp.toLowerCase()?i=e.headers[s]:s.toLowerCase()===Zs.ContentType.toLowerCase()?r=e.headers[s]:s.toLowerCase()===Zs.RequestStreamId.toLowerCase()?o=e.headers[s]:a[s]=e.headers[s]);return new fl(e.messageType,t,n,r,e.body,o,a,e.id)};var hl,pl,ml,gl,vl,yl,bl,wl,xl=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class Sl{constructor(e,t,n,r,i){if(this.privSetTimeout=setTimeout,this.privIsLiveAudio=!1,this.recognizeOverride=void 0,this.disconnectOverride=void 0,this.receiveMessageOverride=void 0,this.sendSpeechContext=e=>{const t=this.speechContext.toJSON();if(this.privRequestSession.onSpeechContext(),t)return e.send(new fl(ja.Text,"speech.context",this.privRequestSession.requestId,"application/json",t))},this.sendPrePayloadJSONOverride=void 0,this.postConnectImplOverride=void 0,this.configConnectionOverride=void 0,this.sendSpeechServiceConfig=(e,t,n)=>{if(!0!==Sl.telemetryDataEnabled){const e={context:{system:JSON.parse(n).context.system}};n=JSON.stringify(e)}if("true"===this.privRecognizerConfig.parameters.getProperty("TranscriptionService_SingleChannel","false").toLowerCase()){const e=JSON.parse(n);e.context.DisableReferenceChannel="True",e.context.MicSpec="1_0_0",n=JSON.stringify(e)}if(n)return e.send(new fl(ja.Text,"speech.config",t.requestId,"application/json",n))},!e)throw new us("authentication");if(!t)throw new us("connectionFactory");if(!n)throw new us("audioSource");if(!r)throw new us("recognizerConfig");this.privMustReportEndOfStream=!1,this.privAuthentication=e,this.privConnectionFactory=t,this.privAudioSource=n,this.privRecognizerConfig=r,this.privIsDisposed=!1,this.privRecognizer=i,this.privRequestSession=new(0,ic.RequestSession)(this.privAudioSource.id()),this.privConnectionEvents=new ms,this.privServiceEvents=new ms,this.privDynamicGrammar=new xc,this.privSpeechContext=new wc(this.privDynamicGrammar),this.privAgentConfig=new Fc,"undefined"!=typeof Blob&&"undefined"!=typeof Worker&&(this.privSetTimeout=Ps.setTimeout),this.connectionEvents.attach((e=>xl(this,void 0,void 0,(function*(){if("ConnectionClosedEvent"===e.name){const t=e;(1003===t.statusCode||1007===t.statusCode||1002===t.statusCode||4e3===t.statusCode||this.privRequestSession.numConnectionAttempts>this.privRecognizerConfig.maxRetryCount)&&(yield this.cancelRecognitionLocal(rl.Error,1007===t.statusCode?ol.BadRequestParameters:ol.ConnectionFailure,t.reason+" websocket error code: "+t.statusCode))}}))))}get audioSource(){return this.privAudioSource}get speechContext(){return this.privSpeechContext}get dynamicGrammar(){return this.privDynamicGrammar}get agentConfig(){return this.privAgentConfig}set conversationTranslatorToken(e){this.privRecognizerConfig.parameters.setProperty(sl.ConversationTranslator_Token,e)}set authentication(e){this.privAuthentication=this.authentication}isDisposed(){return this.privIsDisposed}dispose(e){return xl(this,void 0,void 0,(function*(){if(this.privIsDisposed=!0,this.privConnectionConfigurationPromise)try{const t=yield this.privConnectionConfigurationPromise;yield t.dispose(e)}catch(e){return}}))}get connectionEvents(){return this.privConnectionEvents}get serviceEvents(){return this.privServiceEvents}get recognitionMode(){return this.privRecognizerConfig.recognitionMode}recognize(e,t,n){return xl(this,void 0,void 0,(function*(){if(void 0!==this.recognizeOverride)return this.recognizeOverride(e,t,n);this.privConnectionConfigurationPromise=null,this.privRecognizerConfig.recognitionMode=e,this.privSuccessCallback=t,this.privErrorCallback=n,this.privRequestSession.startNewRecognition(),this.privRequestSession.listenForServiceTelemetry(this.privAudioSource.events);const r=this.connectImpl();let i;try{const e=yield this.audioSource.attach(this.privRequestSession.audioNodeId),t=yield this.audioSource.format,n=yield this.audioSource.deviceInfo;this.privIsLiveAudio=n.type&&n.type===bl.Microphones,i=new ed(e,t.avgBytesPerSec),yield this.privRequestSession.onAudioSourceAttachCompleted(i,!1),this.privRecognizerConfig.SpeechServiceConfig.Context.audio={source:n}}catch(e){throw yield this.privRequestSession.onStopRecognizing(),e}try{yield r}catch(e){return void(yield this.cancelRecognitionLocal(rl.Error,ol.ConnectionFailure,e))}const o=new ul(this.privRequestSession.sessionId);this.privRecognizer.sessionStarted&&this.privRecognizer.sessionStarted(this.privRecognizer,o);this.receiveMessage();this.sendAudio(i).catch((e=>xl(this,void 0,void 0,(function*(){yield this.cancelRecognitionLocal(rl.Error,ol.RuntimeError,e)}))))}))}stopRecognizing(){return xl(this,void 0,void 0,(function*(){if(this.privRequestSession.isRecognizing)try{yield this.audioSource.turnOff(),yield this.sendFinalAudio(),yield this.privRequestSession.onStopRecognizing(),yield this.privRequestSession.turnCompletionPromise}finally{yield this.privRequestSession.dispose()}}))}connect(){return xl(this,void 0,void 0,(function*(){return yield this.connectImpl(),Promise.resolve()}))}connectAsync(e,t){this.connectImpl().then((n=>{try{e&&e()}catch(e){t&&t(e)}}),(e=>{try{t&&t(e)}catch(e){}}))}disconnect(){return xl(this,void 0,void 0,(function*(){yield this.cancelRecognitionLocal(rl.Error,ol.NoError,"Disconnecting"),void 0!==this.disconnectOverride&&(yield this.disconnectOverride());try{yield(yield this.privConnectionPromise).dispose()}catch(e){}this.privConnectionPromise=null}))}sendMessage(e){}sendNetworkMessage(e,t){return xl(this,void 0,void 0,(function*(){const n="string"==typeof t?ja.Text:ja.Binary,r="string"==typeof t?"application/json":"";return(yield this.fetchConnection()).send(new fl(n,e,this.privRequestSession.requestId,r,t))}))}set activityTemplate(e){this.privActivityTemplate=e}get activityTemplate(){return this.privActivityTemplate}sendTelemetryData(){return xl(this,void 0,void 0,(function*(){const e=this.privRequestSession.getTelemetry();if(!0!==Sl.telemetryDataEnabled||this.privIsDisposed||null===e)return;if(Sl.telemetryData)try{Sl.telemetryData(e)}catch(e){}const t=yield this.fetchConnection();yield t.send(new fl(ja.Text,"telemetry",this.privRequestSession.requestId,"application/json",e))}))}cancelRecognitionLocal(e,t,n){return xl(this,void 0,void 0,(function*(){this.privRequestSession.isRecognizing&&(yield this.privRequestSession.onStopRecognizing(),this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,e,t,n))}))}receiveMessage(){return xl(this,void 0,void 0,(function*(){try{if(this.privIsDisposed)return;let e=yield this.fetchConnection();const t=yield e.read();if(void 0!==this.receiveMessageOverride)return this.receiveMessageOverride();if(!t)return this.privRequestSession.isRecognizing?this.receiveMessage():void 0;this.privServiceHasSentMessage=!0;const n=fl.fromConnectionMessage(t);if(n.requestId.toLowerCase()===this.privRequestSession.requestId.toLowerCase())switch(n.path.toLowerCase()){case"turn.start":this.privMustReportEndOfStream=!0,this.privRequestSession.onServiceTurnStartResponse();break;case"speech.startdetected":const t=ql.fromJSON(n.textBody),r=new dl(t.Offset,this.privRequestSession.sessionId);this.privRecognizer.speechStartDetected&&this.privRecognizer.speechStartDetected(this.privRecognizer,r);break;case"speech.enddetected":let i;i=n.textBody.length>0?n.textBody:"{ Offset: 0 }";const o=ql.fromJSON(i);this.privRecognizerConfig.isContinuousRecognition&&this.privRequestSession.onServiceRecognized(o.Offset+this.privRequestSession.currentTurnAudioOffset);const a=new dl(o.Offset+this.privRequestSession.currentTurnAudioOffset,this.privRequestSession.sessionId);this.privRecognizer.speechEndDetected&&this.privRecognizer.speechEndDetected(this.privRecognizer,a);break;case"turn.end":yield this.sendTelemetryData(),this.privRequestSession.isSpeechEnded&&this.privMustReportEndOfStream&&(this.privMustReportEndOfStream=!1,yield this.cancelRecognitionLocal(rl.EndOfStream,ol.NoError,void 0));const s=new ul(this.privRequestSession.sessionId);if(yield this.privRequestSession.onServiceTurnEndResponse(this.privRecognizerConfig.isContinuousRecognition),!this.privRecognizerConfig.isContinuousRecognition||this.privRequestSession.isSpeechEnded||!this.privRequestSession.isRecognizing)return void(this.privRecognizer.sessionStopped&&this.privRecognizer.sessionStopped(this.privRecognizer,s));e=yield this.fetchConnection(),yield this.sendPrePayloadJSON(e);break;default:(yield this.processTypeSpecificMessages(n))||this.privServiceEvents&&this.serviceEvents.onEvent(new ts(n.path.toLowerCase(),n.textBody))}return this.receiveMessage()}catch(e){return null}}))}sendPrePayloadJSON(e){return xl(this,void 0,void 0,(function*(){if(void 0!==this.sendPrePayloadJSONOverride)return this.sendPrePayloadJSONOverride(e);yield this.sendSpeechContext(e),yield this.sendWaveHeader(e)}))}sendWaveHeader(e){return xl(this,void 0,void 0,(function*(){const t=yield this.audioSource.format;return e.send(new fl(ja.Binary,"audio",this.privRequestSession.requestId,"audio/x-wav",t.header))}))}connectImpl(){return this.privConnectionPromise?this.privConnectionPromise.then((e=>e.state()===Ua.Disconnected?(this.privConnectionId=null,this.privConnectionPromise=null,this.privServiceHasSentMessage=!1,this.connectImpl()):this.privConnectionPromise),(e=>(this.privConnectionId=null,this.privConnectionPromise=null,this.privServiceHasSentMessage=!1,this.connectImpl()))):(this.privConnectionPromise=this.retryableConnect(),this.privConnectionPromise.catch((()=>{})),void 0!==this.postConnectImplOverride?this.postConnectImplOverride(this.privConnectionPromise):this.privConnectionPromise)}fetchConnection(){return xl(this,void 0,void 0,(function*(){return this.privConnectionConfigurationPromise?this.privConnectionConfigurationPromise.then((e=>e.state()===Ua.Disconnected?(this.privConnectionId=null,this.privConnectionConfigurationPromise=null,this.privServiceHasSentMessage=!1,this.fetchConnection()):this.privConnectionConfigurationPromise),(e=>(this.privConnectionId=null,this.privConnectionConfigurationPromise=null,this.privServiceHasSentMessage=!1,this.fetchConnection()))):(this.privConnectionConfigurationPromise=this.configureConnection(),yield this.privConnectionConfigurationPromise)}))}sendAudio(e){return xl(this,void 0,void 0,(function*(){const t=yield this.audioSource.format;let n=Date.now();const r=this.privRecognizerConfig.parameters.getProperty("SPEECH-TransmitLengthBeforThrottleMs","5000"),i=t.avgBytesPerSec/1e3*parseInt(r,10),o=this.privRequestSession.recogNumber,a=()=>xl(this,void 0,void 0,(function*(){if(!this.privIsDisposed&&!this.privRequestSession.isSpeechEnded&&this.privRequestSession.isRecognizing&&this.privRequestSession.recogNumber===o){const r=yield this.fetchConnection(),s=yield e.read();if(this.privRequestSession.isSpeechEnded)return;let l,c;if(!s||s.isEnd?(l=null,c=0):(l=s.buffer,this.privRequestSession.onAudioSent(l.byteLength),c=i>=this.privRequestSession.bytesSent?0:Math.max(0,n-Date.now())),0!==c&&(yield this.delay(c)),null!==l&&(n=Date.now()+1e3*l.byteLength/(2*t.avgBytesPerSec)),!this.privIsDisposed&&!this.privRequestSession.isSpeechEnded&&this.privRequestSession.isRecognizing&&this.privRequestSession.recogNumber===o){if(r.send(new fl(ja.Binary,"audio",this.privRequestSession.requestId,null,l)).catch((()=>{this.privRequestSession.onServiceTurnEndResponse(this.privRecognizerConfig.isContinuousRecognition).catch((()=>{}))})),!(null==s?void 0:s.isEnd))return a();this.privIsLiveAudio||this.privRequestSession.onSpeechEnded()}}}));return a()}))}retryableConnect(){return xl(this,void 0,void 0,(function*(){let e=!1;this.privAuthFetchEventId=La();const t=this.privRequestSession.sessionId;this.privConnectionId=void 0!==t?t:La(),this.privRequestSession.onPreConnectionStart(this.privAuthFetchEventId,this.privConnectionId);let n=0,r="";for(;this.privRequestSession.numConnectionAttempts<=this.privRecognizerConfig.maxRetryCount;){const t=e?this.privAuthentication.fetchOnExpiry(this.privAuthFetchEventId):this.privAuthentication.fetch(this.privAuthFetchEventId),i=yield t;yield this.privRequestSession.onAuthCompleted(!1);const o=this.privConnectionFactory.create(this.privRecognizerConfig,i,this.privConnectionId);this.privRequestSession.listenForServiceTelemetry(o.events),o.events.attach((e=>{this.connectionEvents.onEvent(e)}));const a=yield o.open();if(200===a.statusCode)return yield this.privRequestSession.onConnectionEstablishCompleted(a.statusCode),Promise.resolve(o);1006===a.statusCode&&(e=!0),n=a.statusCode,r=a.reason,this.privRequestSession.onRetryConnection()}return yield this.privRequestSession.onConnectionEstablishCompleted(n,r),Promise.reject(`Unable to contact server. StatusCode: ${n}, ${this.privRecognizerConfig.parameters.getProperty(sl.SpeechServiceConnection_Endpoint)} Reason: ${r}`)}))}delay(e){return new Promise(((t,n)=>{this.privSetTimeout(t,e)}))}writeBufferToConsole(e){let t="Buffer Size: ";if(null===e)t+="null";else{const n=new Uint8Array(e);t+=e.byteLength+"\r\n";for(let r=0;r<e.byteLength;r++)t+=n[r].toString(16).padStart(2,"0")+" "}console.info(t)}sendFinalAudio(){return xl(this,void 0,void 0,(function*(){const e=yield this.fetchConnection();yield e.send(new fl(ja.Binary,"audio",this.privRequestSession.requestId,null,null))}))}configureConnection(){return xl(this,void 0,void 0,(function*(){const e=yield this.connectImpl();return void 0!==this.configConnectionOverride?this.configConnectionOverride(e):(yield this.sendSpeechServiceConfig(e,this.privRequestSession,this.privRecognizerConfig.SpeechServiceConfig.serialize()),yield this.sendPrePayloadJSON(e),e)}))}}Sl.telemetryDataEnabled=!0,(pl=hl||(hl={}))[pl.Interactive=0]="Interactive",pl[pl.Conversation=1]="Conversation",pl[pl.Dictation=2]="Dictation",(gl=ml||(ml={}))[gl.Simple=0]="Simple",gl[gl.Detailed=1]="Detailed";class Ml{constructor(e,t){this.privRecognitionMode=hl.Interactive,this.privSpeechServiceConfig=e||new _l(new Al(null)),this.privParameters=t,this.privMaxRetryCount=parseInt(t.getProperty("SPEECH-Error-MaxRetryCount","4"),10)}get parameters(){return this.privParameters}get recognitionMode(){return this.privRecognitionMode}set recognitionMode(e){this.privRecognitionMode=e,this.privRecognitionActivityTimeout=e===hl.Interactive?8e3:25e3,this.privSpeechServiceConfig.Recognition=hl[e]}get SpeechServiceConfig(){return this.privSpeechServiceConfig}get recognitionActivityTimeout(){return this.privRecognitionActivityTimeout}get isContinuousRecognition(){return this.privRecognitionMode!==hl.Interactive}get autoDetectSourceLanguages(){return this.parameters.getProperty(sl.SpeechServiceConnection_AutoDetectSourceLanguages,void 0)}get maxRetryCount(){return this.privMaxRetryCount}}class _l{constructor(e){this.serialize=()=>JSON.stringify(this,((e,t)=>{if(t&&"object"==typeof t){const e={};for(const n in t)Object.hasOwnProperty.call(t,n)&&(e[n&&n.charAt(0).toLowerCase()+n.substring(1)]=t[n]);return e}return t})),this.context=e}get Context(){return this.context}get Recognition(){return this.recognition}set Recognition(e){this.recognition=e.toLowerCase()}}class Al{constructor(e){this.system=new El,this.os=e}}class El{constructor(){this.name="SpeechSDK",this.version="1.20.0",this.build="JavaScript",this.lang="JavaScript"}}class Cl{constructor(e,t,n){this.platform=e,this.name=t,this.version=n}}(yl=vl||(vl={})).Bluetooth="Bluetooth",yl.Wired="Wired",yl.WiFi="WiFi",yl.Cellular="Cellular",yl.InBuilt="InBuilt",yl.Unknown="Unknown",(wl=bl||(bl={})).Phone="Phone",wl.Speaker="Speaker",wl.Car="Car",wl.Headset="Headset",wl.Thermostat="Thermostat",wl.Microphones="Microphones",wl.Deskphone="Deskphone",wl.RemoteControl="RemoteControl",wl.Unknown="Unknown",wl.File="File",wl.Stream="Stream";class kl{constructor(){this.toConnectionMessage=e=>{const t=new vs;try{if(e.messageType===ja.Text){const n=e.textContent;let r={},i=null;if(n){const e=n.split("\r\n\r\n");e&&e.length>0&&(r=this.parseHeaders(e[0]),e.length>1&&(i=e[1]))}t.resolve(new hs(e.messageType,i,r,e.id))}else if(e.messageType===ja.Binary){const n=e.binaryContent;let r={},i=null;if(!n||n.byteLength<2)throw new Error("Invalid binary message format. Header length missing.");const o=new DataView(n),a=o.getInt16(0);if(n.byteLength<a+2)throw new Error("Invalid binary message format. Header content missing.");let s="";for(let e=0;e<a;e++)s+=String.fromCharCode(o.getInt8(e+2));r=this.parseHeaders(s),n.byteLength>a+2&&(i=n.slice(2+a)),t.resolve(new hs(e.messageType,i,r,e.id))}}catch(e){t.reject(`Error formatting the message. Error: ${e}`)}return t.promise},this.fromConnectionMessage=e=>{const t=new vs;try{if(e.messageType===ja.Text){const n=`${this.makeHeaders(e)}\r\n${e.textBody?e.textBody:""}`;t.resolve(new As(ja.Text,n,e.id))}else if(e.messageType===ja.Binary){const n=this.makeHeaders(e),r=e.binaryBody,i=this.stringToArrayBuffer(n),o=new Int8Array(i),a=o.byteLength,s=new Int8Array(2+a+(r?r.byteLength:0));if(s[0]=a>>8&255,s[1]=255&a,s.set(o,2),r){const e=new Int8Array(r);s.set(e,2+a)}const l=s.buffer;t.resolve(new As(ja.Binary,l,e.id))}}catch(e){t.reject(`Error formatting the message. ${e}`)}return t.promise},this.makeHeaders=e=>{let t="";if(e.headers)for(const n in e.headers)n&&(t+=`${n}: ${e.headers[n]}\r\n`);return t},this.parseHeaders=e=>{const t={};if(e){const n=e.match(/[^\r\n]+/g);if(t)for(const e of n)if(e){const n=e.indexOf(":"),r=n>0?e.substr(0,n).trim().toLowerCase():e,i=n>0&&e.length>n+1?e.substr(n+1).trim():"";t[r]=i}}return t},this.stringToArrayBuffer=e=>{const t=new ArrayBuffer(e.length),n=new DataView(t);for(let t=0;t<e.length;t++)n.setUint8(t,e.charCodeAt(t));return t}}}var Tl,Il,Ol,Rl,Pl,Nl,Ll,Dl;(Il=Tl||(Tl={}))[Il.Simple=0]="Simple",Il[Il.Detailed=1]="Detailed";class Bl{}Bl.BotId="botid",Bl.CustomSpeechDeploymentId="cid",Bl.CustomVoiceDeploymentId="deploymentId",Bl.EnableAudioLogging="storeAudio",Bl.EnableLanguageId="lidEnabled",Bl.EnableWordLevelTimestamps="wordLevelTimestamps",Bl.EndSilenceTimeoutMs="endSilenceTimeoutMs",Bl.Format="format",Bl.InitialSilenceTimeoutMs="initialSilenceTimeoutMs",Bl.Language="language",Bl.Profanity="profanity",Bl.RequestBotStatusMessages="enableBotMessageStatus",Bl.StableIntermediateThreshold="stableIntermediateThreshold",Bl.StableTranslation="stableTranslation",Bl.TestHooks="testhooks";class jl{static getHostSuffix(e){if(e){if(e.toLowerCase().startsWith("china"))return".azure.cn";if(e.toLowerCase().startsWith("usgov"))return".azure.us"}return".microsoft.com"}setCommonUrlParams(e,t,n){this.setUrlParameter(sl.SpeechServiceConnection_EnableAudioLogging,Bl.EnableAudioLogging,e,t,n),this.setUrlParameter(sl.SpeechServiceResponse_RequestWordLevelTimestamps,Bl.EnableWordLevelTimestamps,e,t,n),this.setUrlParameter(sl.SpeechServiceResponse_ProfanityOption,Bl.Profanity,e,t,n),this.setUrlParameter(sl.SpeechServiceConnection_InitialSilenceTimeoutMs,Bl.InitialSilenceTimeoutMs,e,t,n),this.setUrlParameter(sl.SpeechServiceConnection_EndSilenceTimeoutMs,Bl.EndSilenceTimeoutMs,e,t,n),this.setUrlParameter(sl.SpeechServiceResponse_StablePartialResultThreshold,Bl.StableIntermediateThreshold,e,t,n);const r=JSON.parse(e.parameters.getProperty(fu,"{}"));Object.keys(r).forEach(((e,n,i)=>{t[e]=r[e]}))}setUrlParameter(e,t,n,r,i){const o=n.parameters.getProperty(e,void 0);!o||i&&-1!==i.search(t)||(r[t]=o.toLocaleLowerCase())}}class Fl extends jl{constructor(){super(...arguments),this.interactiveRelativeUri="/speech/recognition/interactive/cognitiveservices/v1",this.conversationRelativeUri="/speech/recognition/conversation/cognitiveservices/v1",this.dictationRelativeUri="/speech/recognition/dictation/cognitiveservices/v1",this.create=(e,t,n)=>{let r=e.parameters.getProperty(sl.SpeechServiceConnection_Endpoint,void 0);const i=e.parameters.getProperty(sl.SpeechServiceConnection_Region,void 0),o=jl.getHostSuffix(i),a=e.parameters.getProperty(sl.SpeechServiceConnection_Host,"wss://"+i+".stt.speech"+o),s={},l=e.parameters.getProperty(sl.SpeechServiceConnection_EndpointId,void 0),c=e.parameters.getProperty(sl.SpeechServiceConnection_RecoLanguage,void 0);if(l?r&&-1!==r.search(Bl.CustomSpeechDeploymentId)||(s[Bl.CustomSpeechDeploymentId]=l):c&&(r&&-1!==r.search(Bl.Language)||(s[Bl.Language]=c)),r&&-1!==r.search(Bl.Format)||(s[Bl.Format]=e.parameters.getProperty(uu,Tl[Tl.Simple]).toLowerCase()),void 0!==e.autoDetectSourceLanguages&&(s[Bl.EnableLanguageId]="true"),this.setCommonUrlParams(e,s,r),!r)switch(e.recognitionMode){case hl.Conversation:r="true"===e.parameters.getProperty(hu,"false")?a+this.dictationRelativeUri:a+this.conversationRelativeUri;break;case hl.Dictation:r=a+this.dictationRelativeUri;break;default:r=a+this.interactiveRelativeUri}const u={};void 0!==t.token&&""!==t.token&&(u[t.headerName]=t.token),u[Zs.ConnectionId]=n,e.parameters.setProperty(sl.SpeechServiceConnection_Url,r);const d="true"===e.parameters.getProperty("SPEECH-EnableWebsocketCompression","false");return new(0,wu.WebsocketConnection)(r,s,u,new kl,nd.fromRecognizerConfig(e),d,n)}}}class Ul{constructor(){this.synthesisUri="/cognitiveservices/websocket/v1",this.create=(e,t,n)=>{let r=e.parameters.getProperty(sl.SpeechServiceConnection_Endpoint,void 0);const i=e.parameters.getProperty(sl.SpeechServiceConnection_Region,void 0),o=jl.getHostSuffix(i),a=e.parameters.getProperty(sl.SpeechServiceConnection_EndpointId,void 0),s=void 0===a?"tts":"voice",l=e.parameters.getProperty(sl.SpeechServiceConnection_Host,"wss://"+i+"."+s+".speech"+o);r||(r=l+this.synthesisUri);const c={};void 0!==t.token&&""!==t.token&&(c[t.headerName]=t.token),c[Zs.ConnectionId]=n,void 0!==a&&(c[Bl.CustomVoiceDeploymentId]=a),e.parameters.setProperty(sl.SpeechServiceConnection_Url,r);const u="true"===e.parameters.getProperty("SPEECH-EnableWebsocketCompression","false");return new(0,wu.WebsocketConnection)(r,{},c,new kl,nd.fromParameters(e.parameters),u,n)}}}(Rl=Ol||(Ol={}))[Rl.NoMatch=0]="NoMatch",Rl[Rl.Canceled=1]="Canceled",Rl[Rl.RecognizingSpeech=2]="RecognizingSpeech",Rl[Rl.RecognizedSpeech=3]="RecognizedSpeech",Rl[Rl.RecognizedKeyword=4]="RecognizedKeyword",Rl[Rl.RecognizingIntent=5]="RecognizingIntent",Rl[Rl.RecognizedIntent=6]="RecognizedIntent",Rl[Rl.TranslatingSpeech=7]="TranslatingSpeech",Rl[Rl.TranslatedSpeech=8]="TranslatedSpeech",Rl[Rl.SynthesizingAudio=9]="SynthesizingAudio",Rl[Rl.SynthesizingAudioCompleted=10]="SynthesizingAudioCompleted",Rl[Rl.SynthesizingAudioStarted=11]="SynthesizingAudioStarted",Rl[Rl.EnrollingVoiceProfile=12]="EnrollingVoiceProfile",Rl[Rl.EnrolledVoiceProfile=13]="EnrolledVoiceProfile",Rl[Rl.RecognizedSpeakers=14]="RecognizedSpeakers",Rl[Rl.RecognizedSpeaker=15]="RecognizedSpeaker",Rl[Rl.ResetVoiceProfile=16]="ResetVoiceProfile",Rl[Rl.DeletedVoiceProfile=17]="DeletedVoiceProfile",Rl[Rl.VoicesListRetrieved=18]="VoicesListRetrieved";class zl{static implTranslateRecognitionResult(e){let t=Ol.Canceled;switch(e){case Ll.Success:t=Ol.RecognizedSpeech;break;case Ll.NoMatch:case Ll.InitialSilenceTimeout:case Ll.BabbleTimeout:case Ll.EndOfDictation:t=Ol.NoMatch;break;case Ll.Error:case Ll.BadRequest:case Ll.Forbidden:default:t=Ol.Canceled}return t}static implTranslateCancelResult(e){let t=rl.EndOfStream;switch(e){case Ll.Success:case Ll.EndOfDictation:case Ll.NoMatch:t=rl.EndOfStream;break;case Ll.InitialSilenceTimeout:case Ll.BabbleTimeout:case Ll.Error:case Ll.BadRequest:case Ll.Forbidden:default:t=rl.Error}return t}static implTranslateCancelErrorCode(e){let t=ol.NoError;switch(e){case Ll.Error:t=ol.ServiceError;break;case Ll.TooManyRequests:t=ol.TooManyRequests;break;case Ll.BadRequest:t=ol.BadRequestParameters;break;case Ll.Forbidden:t=ol.Forbidden;break;default:t=ol.NoError}return t}static implTranslateErrorDetails(e){let t="The speech service encountered an internal error and could not continue.";switch(e){case ol.Forbidden:t="The recognizer is using a free subscription that ran out of quota.";break;case ol.BadRequestParameters:t="Invalid parameter or unsupported audio format in the request.";break;case ol.TooManyRequests:t="The number of parallel requests exceeded the number of allowed concurrent transcriptions."}return t}}(Nl=Pl||(Pl={}))[Nl.Success=0]="Success",Nl[Nl.SynthesisEnd=1]="SynthesisEnd",Nl[Nl.Error=2]="Error",(Dl=Ll||(Ll={}))[Dl.Success=0]="Success",Dl[Dl.NoMatch=1]="NoMatch",Dl[Dl.InitialSilenceTimeout=2]="InitialSilenceTimeout",Dl[Dl.BabbleTimeout=3]="BabbleTimeout",Dl[Dl.Error=4]="Error",Dl[Dl.EndOfDictation=5]="EndOfDictation",Dl[Dl.TooManyRequests=6]="TooManyRequests",Dl[Dl.BadRequest=7]="BadRequest",Dl[Dl.Forbidden=8]="Forbidden";class Hl{static throwIfNullOrUndefined(e,t){if(null==e)throw new Error("throwIfNullOrUndefined:"+t)}static throwIfNull(e,t){if(null===e)throw new Error("throwIfNull:"+t)}static throwIfNullOrWhitespace(e,t){if(Hl.throwIfNullOrUndefined(e,t),(""+e).trim().length<1)throw new Error("throwIfNullOrWhitespace:"+t)}static throwIfDisposed(e){if(e)throw new Error("the object is already disposed")}static throwIfArrayEmptyOrWhitespace(e,t){if(Hl.throwIfNullOrUndefined(e,t),0===e.length)throw new Error("throwIfArrayEmptyOrWhitespace:"+t);for(const n of e)Hl.throwIfNullOrWhitespace(n,t)}static throwIfFileDoesNotExist(e,t){Hl.throwIfNullOrWhitespace(e,t)}static throwIfNotUndefined(e,t){if(void 0!==e)throw new Error("throwIfNotUndefined:"+t)}}class Vl{constructor(){this.privKeys=[],this.privValues=[]}getProperty(e,t){let n;n="string"==typeof e?e:sl[e];for(let e=0;e<this.privKeys.length;e++)if(this.privKeys[e]===n)return this.privValues[e];return t}setProperty(e,t){let n;n="string"==typeof e?e:sl[e];for(let e=0;e<this.privKeys.length;e++)if(this.privKeys[e]===n)return void(this.privValues[e]=t);this.privKeys.push(n),this.privValues.push(t)}clone(){const e=new Vl;for(let t=0;t<this.privKeys.length;t++)e.privKeys.push(this.privKeys[t]),e.privValues.push(this.privValues[t]);return e}mergeTo(e){this.privKeys.forEach((t=>{if(void 0===e.getProperty(t,void 0)){const n=this.getProperty(t);e.setProperty(t,n)}}))}get keys(){return this.privKeys}}class Wl{constructor(e,t,n,r,i,o,a,s,l,c){this.privResultId=e,this.privReason=t,this.privText=n,this.privDuration=r,this.privOffset=i,this.privLanguage=o,this.privLanguageDetectionConfidence=a,this.privErrorDetails=s,this.privJson=l,this.privProperties=c}get resultId(){return this.privResultId}get reason(){return this.privReason}get text(){return this.privText}get duration(){return this.privDuration}get offset(){return this.privOffset}get language(){return this.privLanguage}get languageDetectionConfidence(){return this.privLanguageDetectionConfidence}get errorDetails(){return this.privErrorDetails}get json(){return this.privJson}get properties(){return this.privProperties}}class Gl extends Wl{constructor(e,t,n,r,i,o,a,s,l,c,u){super(e,t,n,r,i,o,a,l,c,u),this.privSpeakerId=s}get speakerId(){return this.privSpeakerId}}class ql{constructor(e){this.privSpeechStartDetected=JSON.parse(e)}static fromJSON(e){return new ql(e)}get Offset(){return this.privSpeechStartDetected.Offset}}class Kl{constructor(e){this.privSpeechHypothesis=JSON.parse(e)}static fromJSON(e){return new Kl(e)}get Text(){return this.privSpeechHypothesis.Text}get Offset(){return this.privSpeechHypothesis.Offset}get Duration(){return this.privSpeechHypothesis.Duration}get Language(){return void 0===this.privSpeechHypothesis.PrimaryLanguage?void 0:this.privSpeechHypothesis.PrimaryLanguage.Language}get LanguageDetectionConfidence(){return void 0===this.privSpeechHypothesis.PrimaryLanguage?void 0:this.privSpeechHypothesis.PrimaryLanguage.Confidence}get SpeakerId(){return this.privSpeechHypothesis.SpeakerId}}var Yl={};e(Yl,"SpeechServiceRecognizer",(()=>$l),(e=>$l=e));class Jl extends dl{constructor(e,t,n){super(t,n),this.privResult=e}get result(){return this.privResult}}class Ql extends dl{constructor(e,t,n,r,i){super(r,i),this.privReason=e,this.privErrorDetails=t,this.privErrorCode=n}get reason(){return this.privReason}get errorCode(){return this.privErrorCode}get errorDetails(){return this.privErrorDetails}}class Xl extends Ql{}var Zl=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class $l extends cl.ServiceRecognizerBase{constructor(e,t,n,r,i){if(super(e,t,n,r,i),this.privSpeechRecognizer=i,void 0!==r.autoDetectSourceLanguages){const e=r.autoDetectSourceLanguages.split(",");this.privSpeechContext.setSection("languageId",{languages:e,onSuccess:{action:"Recognize"},onUnknown:{action:"None"}}),this.privSpeechContext.setSection("phraseOutput",{interimResults:{resultType:"Auto"},phraseResults:{resultType:"Always"}})}}processTypeSpecificMessages(e){return Zl(this,void 0,void 0,(function*(){let t;const n=new Vl;n.setProperty(sl.SpeechServiceResponse_JsonResult,e.textBody);let r=!1;switch(e.path.toLowerCase()){case"speech.hypothesis":case"speech.fragment":const i=Kl.fromJSON(e.textBody),o=i.Offset+this.privRequestSession.currentTurnAudioOffset;t=new Gl(this.privRequestSession.requestId,Ol.RecognizingSpeech,i.Text,i.Duration,o,i.Language,i.LanguageDetectionConfidence,void 0,void 0,e.textBody,n),this.privRequestSession.onHypothesis(o);const a=new Jl(t,i.Duration,this.privRequestSession.sessionId);if(this.privSpeechRecognizer.recognizing)try{this.privSpeechRecognizer.recognizing(this.privSpeechRecognizer,a)}catch(e){}r=!0;break;case"speech.phrase":const s=tc.fromJSON(e.textBody),l=zl.implTranslateRecognitionResult(s.RecognitionStatus);if(this.privRequestSession.onPhraseRecognized(this.privRequestSession.currentTurnAudioOffset+s.Offset+s.Duration),Ol.Canceled===l){const e=zl.implTranslateCancelResult(s.RecognitionStatus),t=zl.implTranslateCancelErrorCode(s.RecognitionStatus);yield this.cancelRecognitionLocal(e,t,zl.implTranslateErrorDetails(t))}else{if(!this.privRequestSession.isSpeechEnded||l!==Ol.NoMatch||s.RecognitionStatus===Ll.InitialSilenceTimeout){if(this.privRecognizerConfig.parameters.getProperty(uu)===Tl[Tl.Simple])t=new Gl(this.privRequestSession.requestId,l,s.DisplayText,s.Duration,s.Offset+this.privRequestSession.currentTurnAudioOffset,s.Language,s.LanguageDetectionConfidence,void 0,void 0,e.textBody,n);else{const r=ec.fromJSON(e.textBody),i=r.Offset+this.privRequestSession.currentTurnAudioOffset,o=r.getJsonWithCorrectedOffsets(i);t=new Gl(this.privRequestSession.requestId,l,r.RecognitionStatus===Ll.Success?r.NBest[0].Display:void 0,r.Duration,i,r.Language,r.LanguageDetectionConfidence,void 0,void 0,o,n)}const r=new Jl(t,t.offset,this.privRequestSession.sessionId);if(this.privSpeechRecognizer.recognized)try{this.privSpeechRecognizer.recognized(this.privSpeechRecognizer,r)}catch(e){}}if(this.privSuccessCallback){try{this.privSuccessCallback(t)}catch(e){this.privErrorCallback&&this.privErrorCallback(e)}this.privSuccessCallback=void 0,this.privErrorCallback=void 0}}r=!0}return r}))}cancelRecognition(e,t,n,r,i){const o=new Vl;if(o.setProperty(du,ol[r]),this.privSpeechRecognizer.canceled){const t=new Xl(n,i,r,void 0,e);try{this.privSpeechRecognizer.canceled(this.privSpeechRecognizer,t)}catch(e){}}if(this.privSuccessCallback){const e=new Gl(t,Ol.Canceled,void 0,void 0,void 0,void 0,void 0,void 0,i,void 0,o);try{this.privSuccessCallback(e),this.privSuccessCallback=void 0}catch(e){}}}}class ec{constructor(e){this.privDetailedSpeechPhrase=JSON.parse(e),this.privDetailedSpeechPhrase.RecognitionStatus=Ll[this.privDetailedSpeechPhrase.RecognitionStatus]}static fromJSON(e){return new ec(e)}getJsonWithCorrectedOffsets(e){if(this.privDetailedSpeechPhrase.NBest){let t;for(const e of this.privDetailedSpeechPhrase.NBest)if(e.Words&&e.Words[0]){t=e.Words[0].Offset;break}if(t&&t<e){const n=e-t;for(const e of this.privDetailedSpeechPhrase.NBest)if(e.Words)for(const t of e.Words)t.Offset+=n}}return JSON.stringify(this.privDetailedSpeechPhrase)}get RecognitionStatus(){return this.privDetailedSpeechPhrase.RecognitionStatus}get NBest(){return this.privDetailedSpeechPhrase.NBest}get Duration(){return this.privDetailedSpeechPhrase.Duration}get Offset(){return this.privDetailedSpeechPhrase.Offset}get Language(){return void 0===this.privDetailedSpeechPhrase.PrimaryLanguage?void 0:this.privDetailedSpeechPhrase.PrimaryLanguage.Language}get LanguageDetectionConfidence(){return void 0===this.privDetailedSpeechPhrase.PrimaryLanguage?void 0:this.privDetailedSpeechPhrase.PrimaryLanguage.Confidence}get Text(){return this.privDetailedSpeechPhrase.NBest&&this.privDetailedSpeechPhrase.NBest[0]?this.privDetailedSpeechPhrase.NBest[0].Display:this.privDetailedSpeechPhrase.DisplayText}get SpeakerId(){return this.privDetailedSpeechPhrase.SpeakerId}}class tc{constructor(e){this.privSimpleSpeechPhrase=JSON.parse(e),this.privSimpleSpeechPhrase.RecognitionStatus=Ll[this.privSimpleSpeechPhrase.RecognitionStatus]}static fromJSON(e){return new tc(e)}get RecognitionStatus(){return this.privSimpleSpeechPhrase.RecognitionStatus}get DisplayText(){return this.privSimpleSpeechPhrase.DisplayText}get Offset(){return this.privSimpleSpeechPhrase.Offset}get Duration(){return this.privSimpleSpeechPhrase.Duration}get Language(){return void 0===this.privSimpleSpeechPhrase.PrimaryLanguage?void 0:this.privSimpleSpeechPhrase.PrimaryLanguage.Language}get LanguageDetectionConfidence(){return void 0===this.privSimpleSpeechPhrase.PrimaryLanguage?void 0:this.privSimpleSpeechPhrase.PrimaryLanguage.Confidence}get SpeakerId(){return this.privSimpleSpeechPhrase.SpeakerId}}var nc,rc,ic={};e(ic,"RequestSession",(()=>bc),(e=>bc=e));class oc extends Wa{constructor(e,t,n,r=Da.Info){super(e,r),this.privRequestId=t,this.privSessionId=n}get requestId(){return this.privRequestId}get sessionId(){return this.privSessionId}}class ac extends oc{constructor(e,t,n,r){super("RecognitionTriggeredEvent",e,t),this.privAudioSourceId=n,this.privAudioNodeId=r}get audioSourceId(){return this.privAudioSourceId}get audioNodeId(){return this.privAudioNodeId}}class sc extends oc{constructor(e,t,n,r){super("ListeningStartedEvent",e,t),this.privAudioSourceId=n,this.privAudioNodeId=r}get audioSourceId(){return this.privAudioSourceId}get audioNodeId(){return this.privAudioNodeId}}class lc extends oc{constructor(e,t,n){super("ConnectingToServiceEvent",e,n),this.privAuthFetchEventid=t}get authFetchEventid(){return this.privAuthFetchEventid}}class cc extends oc{constructor(e,t,n,r,i){super("RecognitionStartedEvent",e,i),this.privAudioSourceId=t,this.privAudioNodeId=n,this.privAuthFetchEventId=r}get audioSourceId(){return this.privAudioSourceId}get audioNodeId(){return this.privAudioNodeId}get authFetchEventId(){return this.privAuthFetchEventId}}(rc=nc||(nc={}))[rc.Success=0]="Success",rc[rc.AudioSourceError=1]="AudioSourceError",rc[rc.AudioSourceTimeout=2]="AudioSourceTimeout",rc[rc.AuthTokenFetchError=3]="AuthTokenFetchError",rc[rc.AuthTokenFetchTimeout=4]="AuthTokenFetchTimeout",rc[rc.UnAuthorized=5]="UnAuthorized",rc[rc.ConnectTimeout=6]="ConnectTimeout",rc[rc.ConnectError=7]="ConnectError",rc[rc.ClientRecognitionActivityTimeout=8]="ClientRecognitionActivityTimeout",rc[rc.UnknownError=9]="UnknownError";class uc{constructor(e,t,n){this.privIsDisposed=!1,this.privListeningTriggerMetric=null,this.privMicMetric=null,this.privConnectionEstablishMetric=null,this.onEvent=e=>{if(!this.privIsDisposed&&(e instanceof ac&&e.requestId===this.privRequestId&&(this.privListeningTriggerMetric={End:e.eventTime,Name:"ListeningTrigger",Start:e.eventTime}),e instanceof Xa&&e.audioSourceId===this.privAudioSourceId&&e.audioNodeId===this.privAudioNodeId&&(this.privMicStartTime=e.eventTime),e instanceof Za&&e.audioSourceId===this.privAudioSourceId&&e.audioNodeId===this.privAudioNodeId&&(this.privMicStartTime=e.eventTime),e instanceof Ja&&e.audioSourceId===this.privAudioSourceId&&(this.privMicMetric||(this.privMicMetric={End:e.eventTime,Error:e.error,Name:"Microphone",Start:this.privMicStartTime})),e instanceof es&&e.audioSourceId===this.privAudioSourceId&&e.audioNodeId===this.privAudioNodeId&&(this.privMicMetric||(this.privMicMetric={End:e.eventTime,Error:e.error,Name:"Microphone",Start:this.privMicStartTime})),e instanceof $a&&e.audioSourceId===this.privAudioSourceId&&e.audioNodeId===this.privAudioNodeId&&(this.privMicMetric||(this.privMicMetric={End:e.eventTime,Name:"Microphone",Start:this.privMicStartTime})),e instanceof lc&&e.requestId===this.privRequestId&&(this.privConnectionId=e.sessionId),e instanceof rs&&e.connectionId===this.privConnectionId&&(this.privConnectionStartTime=e.eventTime),e instanceof is&&e.connectionId===this.privConnectionId&&(this.privConnectionEstablishMetric||(this.privConnectionEstablishMetric={End:e.eventTime,Id:this.privConnectionId,Name:"Connection",Start:this.privConnectionStartTime})),e instanceof ss&&e.connectionId===this.privConnectionId&&(this.privConnectionEstablishMetric||(this.privConnectionEstablishMetric={End:e.eventTime,Error:this.getConnectionError(e.statusCode),Id:this.privConnectionId,Name:"Connection",Start:this.privConnectionStartTime})),e instanceof ls&&e.connectionId===this.privConnectionId&&e.message&&e.message.headers&&e.message.headers.path)){this.privReceivedMessages[e.message.headers.path]||(this.privReceivedMessages[e.message.headers.path]=new Array);const t=50;this.privReceivedMessages[e.message.headers.path].length<t&&this.privReceivedMessages[e.message.headers.path].push(e.networkReceivedTime)}},this.getTelemetry=()=>{const e=new Array;this.privListeningTriggerMetric&&e.push(this.privListeningTriggerMetric),this.privMicMetric&&e.push(this.privMicMetric),this.privConnectionEstablishMetric&&e.push(this.privConnectionEstablishMetric),this.privPhraseLatencies.length>0&&e.push({PhraseLatencyMs:this.privPhraseLatencies}),this.privHypothesisLatencies.length>0&&e.push({FirstHypothesisLatencyMs:this.privHypothesisLatencies});const t={Metrics:e,ReceivedMessages:this.privReceivedMessages},n=JSON.stringify(t);return this.privReceivedMessages={},this.privListeningTriggerMetric=null,this.privMicMetric=null,this.privConnectionEstablishMetric=null,this.privPhraseLatencies=[],this.privHypothesisLatencies=[],n},this.dispose=()=>{this.privIsDisposed=!0},this.getConnectionError=e=>{switch(e){case 400:case 1002:case 1003:case 1005:case 1007:case 1008:case 1009:return"BadRequest";case 401:return"Unauthorized";case 403:return"Forbidden";case 503:case 1001:return"ServerUnavailable";case 500:case 1011:return"ServerError";case 408:case 504:return"Timeout";default:return"statuscode:"+e.toString()}},this.privRequestId=e,this.privAudioSourceId=t,this.privAudioNodeId=n,this.privReceivedMessages={},this.privPhraseLatencies=[],this.privHypothesisLatencies=[]}phraseReceived(e){e>0&&this.privPhraseLatencies.push(Date.now()-e)}hypothesisReceived(e){e>0&&this.privHypothesisLatencies.push(Date.now()-e)}get hasTelemetry(){return 0!==Object.keys(this.privReceivedMessages).length||null!==this.privListeningTriggerMetric||null!==this.privMicMetric||null!==this.privConnectionEstablishMetric||0!==this.privPhraseLatencies.length||0!==this.privHypothesisLatencies.length}}var dc,fc,hc,pc,mc,gc,vc,yc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class bc{constructor(e){this.privIsDisposed=!1,this.privDetachables=new Array,this.privIsAudioNodeDetached=!1,this.privIsRecognizing=!1,this.privIsSpeechEnded=!1,this.privTurnStartAudioOffset=0,this.privLastRecoOffset=0,this.privHypothesisReceived=!1,this.privBytesSent=0,this.privRecogNumber=0,this.privInTurn=!1,this.privConnectionAttempts=0,this.onPreConnectionStart=(e,t)=>{this.privAuthFetchEventId=e,this.privSessionId=t,this.onEvent(new lc(this.privRequestId,this.privAuthFetchEventId,this.privSessionId))},this.onSpeechContext=()=>{this.privRequestId=La()},this.onServiceTurnStartResponse=()=>{this.privTurnDeferral&&this.privInTurn&&(this.privTurnDeferral.reject("Another turn started before current completed."),this.privTurnDeferral.promise.then().catch((()=>{}))),this.privInTurn=!0,this.privTurnDeferral=new vs},this.getTelemetry=()=>this.privServiceTelemetryListener.hasTelemetry?this.privServiceTelemetryListener.getTelemetry():null,this.onEvent=e=>{this.privServiceTelemetryListener&&this.privServiceTelemetryListener.onEvent(e),gs.instance.onEvent(e)},this.privAudioSourceId=e,this.privRequestId=La(),this.privAudioNodeId=La(),this.privTurnDeferral=new vs,this.privTurnDeferral.resolve()}get sessionId(){return this.privSessionId}get requestId(){return this.privRequestId}get audioNodeId(){return this.privAudioNodeId}get turnCompletionPromise(){return this.privTurnDeferral.promise}get isSpeechEnded(){return this.privIsSpeechEnded}get isRecognizing(){return this.privIsRecognizing}get currentTurnAudioOffset(){return this.privTurnStartAudioOffset}get recogNumber(){return this.privRecogNumber}get numConnectionAttempts(){return this.privConnectionAttempts}get bytesSent(){return this.privBytesSent}listenForServiceTelemetry(e){this.privServiceTelemetryListener&&this.privDetachables.push(e.attachListener(this.privServiceTelemetryListener))}startNewRecognition(){this.privIsSpeechEnded=!1,this.privIsRecognizing=!0,this.privTurnStartAudioOffset=0,this.privLastRecoOffset=0,this.privRecogNumber++,this.privServiceTelemetryListener=new uc(this.privRequestId,this.privAudioSourceId,this.privAudioNodeId),this.onEvent(new ac(this.requestId,this.privSessionId,this.privAudioSourceId,this.privAudioNodeId))}onAudioSourceAttachCompleted(e,t,n){return yc(this,void 0,void 0,(function*(){this.privAudioNode=e,this.privIsAudioNodeDetached=!1,t?yield this.onComplete():this.onEvent(new sc(this.privRequestId,this.privSessionId,this.privAudioSourceId,this.privAudioNodeId))}))}onAuthCompleted(e,t){return yc(this,void 0,void 0,(function*(){e&&(yield this.onComplete())}))}onConnectionEstablishCompleted(e,t){return yc(this,void 0,void 0,(function*(){if(200===e)return this.onEvent(new cc(this.requestId,this.privAudioSourceId,this.privAudioNodeId,this.privAuthFetchEventId,this.privSessionId)),this.privAudioNode&&this.privAudioNode.replay(),this.privTurnStartAudioOffset=this.privLastRecoOffset,void(this.privBytesSent=0);403===e&&(yield this.onComplete())}))}onServiceTurnEndResponse(e){return yc(this,void 0,void 0,(function*(){this.privTurnDeferral.resolve(),!e||this.isSpeechEnded?(yield this.onComplete(),this.privInTurn=!1):(this.privTurnStartAudioOffset=this.privLastRecoOffset,this.privAudioNode.replay())}))}onHypothesis(e){this.privHypothesisReceived||(this.privHypothesisReceived=!0,this.privServiceTelemetryListener.hypothesisReceived(this.privAudioNode.findTimeAtOffset(e)))}onPhraseRecognized(e){this.privServiceTelemetryListener.phraseReceived(this.privAudioNode.findTimeAtOffset(e)),this.onServiceRecognized(e)}onServiceRecognized(e){this.privLastRecoOffset=e,this.privHypothesisReceived=!1,this.privAudioNode.shrinkBuffers(e),this.privConnectionAttempts=0}onAudioSent(e){this.privBytesSent+=e}onRetryConnection(){this.privConnectionAttempts++}dispose(e){var t;return yc(this,void 0,void 0,(function*(){if(!this.privIsDisposed){this.privIsDisposed=!0;for(const e of this.privDetachables)yield e.detach();null===(t=this.privServiceTelemetryListener)||void 0===t||t.dispose(),this.privIsRecognizing=!1}}))}onStopRecognizing(){return yc(this,void 0,void 0,(function*(){yield this.onComplete()}))}onSpeechEnded(){this.privIsSpeechEnded=!0}onComplete(){return yc(this,void 0,void 0,(function*(){this.privIsRecognizing&&(this.privIsRecognizing=!1,yield this.detachAudioNode())}))}detachAudioNode(){return yc(this,void 0,void 0,(function*(){this.privIsAudioNodeDetached||(this.privIsAudioNodeDetached=!0,this.privAudioNode&&(yield this.privAudioNode.detach()))}))}}class wc{constructor(e){this.privContext={},this.privDynamicGrammar=e}setSection(e,t){this.privContext[e]=t}setPronunciationAssessmentParams(e){void 0===this.privContext.phraseDetection&&(this.privContext.phraseDetection={enrichment:{pronunciationAssessment:{}}}),this.privContext.phraseDetection.enrichment.pronunciationAssessment=JSON.parse(e),void 0===this.privContext.phraseOutput&&(this.privContext.phraseOutput={detailed:{options:[]},format:{}}),this.privContext.phraseOutput.format="Detailed",this.privContext.phraseOutput.detailed.options.push("PronunciationAssessment"),-1===this.privContext.phraseOutput.detailed.options.indexOf("WordTimings")&&this.privContext.phraseOutput.detailed.options.push("WordTimings"),-1===this.privContext.phraseOutput.detailed.options.indexOf("SNR")&&this.privContext.phraseOutput.detailed.options.push("SNR")}toJSON(){const e=this.privDynamicGrammar.generateGrammarObject();this.setSection("dgi",e);return JSON.stringify(this.privContext)}}class xc{addPhrase(e){this.privPhrases||(this.privPhrases=[]),e instanceof Array?this.privPhrases=this.privPhrases.concat(e):this.privPhrases.push(e)}clearPhrases(){this.privPhrases=void 0}addReferenceGrammar(e){this.privGrammars||(this.privGrammars=[]),e instanceof Array?this.privGrammars=this.privGrammars.concat(e):this.privGrammars.push(e)}clearGrammars(){this.privGrammars=void 0}generateGrammarObject(){if(void 0===this.privGrammars&&void 0===this.privPhrases)return;const e={};if(e.ReferenceGrammars=this.privGrammars,void 0!==this.privPhrases&&0!==this.privPhrases.length){const t=[];this.privPhrases.forEach(((e,n,r)=>{t.push({Text:e})})),e.Groups=[{Type:"Generic",Items:t}]}return e}}(fc=dc||(dc={}))[fc.Raw8Khz8BitMonoMULaw=0]="Raw8Khz8BitMonoMULaw",fc[fc.Riff16Khz16KbpsMonoSiren=1]="Riff16Khz16KbpsMonoSiren",fc[fc.Audio16Khz16KbpsMonoSiren=2]="Audio16Khz16KbpsMonoSiren",fc[fc.Audio16Khz32KBitRateMonoMp3=3]="Audio16Khz32KBitRateMonoMp3",fc[fc.Audio16Khz128KBitRateMonoMp3=4]="Audio16Khz128KBitRateMonoMp3",fc[fc.Audio16Khz64KBitRateMonoMp3=5]="Audio16Khz64KBitRateMonoMp3",fc[fc.Audio24Khz48KBitRateMonoMp3=6]="Audio24Khz48KBitRateMonoMp3",fc[fc.Audio24Khz96KBitRateMonoMp3=7]="Audio24Khz96KBitRateMonoMp3",fc[fc.Audio24Khz160KBitRateMonoMp3=8]="Audio24Khz160KBitRateMonoMp3",fc[fc.Raw16Khz16BitMonoTrueSilk=9]="Raw16Khz16BitMonoTrueSilk",fc[fc.Riff16Khz16BitMonoPcm=10]="Riff16Khz16BitMonoPcm",fc[fc.Riff8Khz16BitMonoPcm=11]="Riff8Khz16BitMonoPcm",fc[fc.Riff24Khz16BitMonoPcm=12]="Riff24Khz16BitMonoPcm",fc[fc.Riff8Khz8BitMonoMULaw=13]="Riff8Khz8BitMonoMULaw",fc[fc.Raw16Khz16BitMonoPcm=14]="Raw16Khz16BitMonoPcm",fc[fc.Raw24Khz16BitMonoPcm=15]="Raw24Khz16BitMonoPcm",fc[fc.Raw8Khz16BitMonoPcm=16]="Raw8Khz16BitMonoPcm",fc[fc.Ogg16Khz16BitMonoOpus=17]="Ogg16Khz16BitMonoOpus",fc[fc.Ogg24Khz16BitMonoOpus=18]="Ogg24Khz16BitMonoOpus",fc[fc.Raw48Khz16BitMonoPcm=19]="Raw48Khz16BitMonoPcm",fc[fc.Riff48Khz16BitMonoPcm=20]="Riff48Khz16BitMonoPcm",fc[fc.Audio48Khz96KBitRateMonoMp3=21]="Audio48Khz96KBitRateMonoMp3",fc[fc.Audio48Khz192KBitRateMonoMp3=22]="Audio48Khz192KBitRateMonoMp3",fc[fc.Ogg48Khz16BitMonoOpus=23]="Ogg48Khz16BitMonoOpus",fc[fc.Webm16Khz16BitMonoOpus=24]="Webm16Khz16BitMonoOpus",fc[fc.Webm24Khz16BitMonoOpus=25]="Webm24Khz16BitMonoOpus",fc[fc.Raw24Khz16BitMonoTrueSilk=26]="Raw24Khz16BitMonoTrueSilk",fc[fc.Raw8Khz8BitMonoALaw=27]="Raw8Khz8BitMonoALaw",fc[fc.Riff8Khz8BitMonoALaw=28]="Riff8Khz8BitMonoALaw",fc[fc.Webm24Khz16Bit24KbpsMonoOpus=29]="Webm24Khz16Bit24KbpsMonoOpus",fc[fc.Audio16Khz16Bit32KbpsMonoOpus=30]="Audio16Khz16Bit32KbpsMonoOpus",fc[fc.Audio24Khz16Bit48KbpsMonoOpus=31]="Audio24Khz16Bit48KbpsMonoOpus",fc[fc.Audio24Khz16Bit24KbpsMonoOpus=32]="Audio24Khz16Bit24KbpsMonoOpus",(pc=hc||(hc={}))[pc.PCM=1]="PCM",pc[pc.MuLaw=2]="MuLaw",pc[pc.Siren=3]="Siren",pc[pc.MP3=4]="MP3",pc[pc.SILKSkype=5]="SILKSkype",pc[pc.OGG_OPUS=6]="OGG_OPUS",pc[pc.WEBM_OPUS=7]="WEBM_OPUS",pc[pc.ALaw=8]="ALaw",pc[pc.FLAC=9]="FLAC",pc[pc.OPUS=10]="OPUS";class Sc{static getDefaultInputFormat(){return Mc.getDefaultInputFormat()}static getWaveFormat(e,t,n,r){return new Mc(e,t,n,r)}static getWaveFormatPCM(e,t,n){return new Mc(e,t,n)}}class Mc extends Sc{constructor(e=16e3,t=16,n=1,r=hc.PCM){super(),this.setString=(e,t,n)=>{for(let r=0;r<n.length;r++)e.setUint8(t+r,n.charCodeAt(r))};let i=!0;switch(r){case hc.PCM:this.formatTag=1;break;case hc.ALaw:this.formatTag=6;break;case hc.MuLaw:this.formatTag=7;break;default:i=!1}if(this.bitsPerSample=t,this.samplesPerSec=e,this.channels=n,this.avgBytesPerSec=this.samplesPerSec*this.channels*(this.bitsPerSample/8),this.blockAlign=this.channels*Math.max(this.bitsPerSample,8),i){this.privHeader=new ArrayBuffer(44);const e=new DataView(this.privHeader);this.setString(e,0,"RIFF"),e.setUint32(4,0,!0),this.setString(e,8,"WAVEfmt "),e.setUint32(16,16,!0),e.setUint16(20,this.formatTag,!0),e.setUint16(22,this.channels,!0),e.setUint32(24,this.samplesPerSec,!0),e.setUint32(28,this.avgBytesPerSec,!0),e.setUint16(32,this.channels*(this.bitsPerSample/8),!0),e.setUint16(34,this.bitsPerSample,!0),this.setString(e,36,"data"),e.setUint32(40,0,!0)}}static getDefaultInputFormat(){return new Mc}static getAudioContext(e){const t=window.AudioContext||window.webkitAudioContext||!1;if(t)return void 0!==e&&navigator.mediaDevices.getSupportedConstraints().sampleRate?new t({sampleRate:e}):new t;throw new Error("Browser does not support Web Audio API (AudioContext is not available).")}close(){}get header(){return this.privHeader}}class _c extends Mc{constructor(e,t,n,r,i,o,a,s,l){super(n,o,t,e),this.formatTag=e,this.avgBytesPerSec=r,this.blockAlign=i,this.priAudioFormatString=a,this.priRequestAudioFormatString=s,this.priHasHeader=l}static fromSpeechSynthesisOutputFormat(e){return void 0===e?_c.getDefaultOutputFormat():_c.fromSpeechSynthesisOutputFormatString(_c.SpeechSynthesisOutputFormatToString[e])}static fromSpeechSynthesisOutputFormatString(e){switch(e){case"raw-8khz-8bit-mono-mulaw":return new _c(hc.MuLaw,1,8e3,8e3,1,8,e,e,!1);case"riff-16khz-16kbps-mono-siren":return new _c(hc.Siren,1,16e3,2e3,40,0,e,"audio-16khz-16kbps-mono-siren",!0);case"audio-16khz-16kbps-mono-siren":return new _c(hc.Siren,1,16e3,2e3,40,0,e,e,!1);case"audio-16khz-32kbitrate-mono-mp3":return new _c(hc.MP3,1,16e3,4096,2,16,e,e,!1);case"audio-16khz-128kbitrate-mono-mp3":return new _c(hc.MP3,1,16e3,16384,2,16,e,e,!1);case"audio-16khz-64kbitrate-mono-mp3":return new _c(hc.MP3,1,16e3,8192,2,16,e,e,!1);case"audio-24khz-48kbitrate-mono-mp3":return new _c(hc.MP3,1,24e3,6144,2,16,e,e,!1);case"audio-24khz-96kbitrate-mono-mp3":return new _c(hc.MP3,1,24e3,12288,2,16,e,e,!1);case"audio-24khz-160kbitrate-mono-mp3":return new _c(hc.MP3,1,24e3,20480,2,16,e,e,!1);case"raw-16khz-16bit-mono-truesilk":return new _c(hc.SILKSkype,1,16e3,32e3,2,16,e,e,!1);case"riff-8khz-16bit-mono-pcm":return new _c(hc.PCM,1,8e3,16e3,2,16,e,"raw-8khz-16bit-mono-pcm",!0);case"riff-24khz-16bit-mono-pcm":return new _c(hc.PCM,1,24e3,48e3,2,16,e,"raw-24khz-16bit-mono-pcm",!0);case"riff-8khz-8bit-mono-mulaw":return new _c(hc.MuLaw,1,8e3,8e3,1,8,e,"raw-8khz-8bit-mono-mulaw",!0);case"raw-16khz-16bit-mono-pcm":return new _c(hc.PCM,1,16e3,32e3,2,16,e,"raw-16khz-16bit-mono-pcm",!1);case"raw-24khz-16bit-mono-pcm":return new _c(hc.PCM,1,24e3,48e3,2,16,e,"raw-24khz-16bit-mono-pcm",!1);case"raw-8khz-16bit-mono-pcm":return new _c(hc.PCM,1,8e3,16e3,2,16,e,"raw-8khz-16bit-mono-pcm",!1);case"ogg-16khz-16bit-mono-opus":return new _c(hc.OGG_OPUS,1,16e3,8192,2,16,e,e,!1);case"ogg-24khz-16bit-mono-opus":return new _c(hc.OGG_OPUS,1,24e3,8192,2,16,e,e,!1);case"raw-48khz-16bit-mono-pcm":return new _c(hc.PCM,1,48e3,96e3,2,16,e,"raw-48khz-16bit-mono-pcm",!1);case"riff-48khz-16bit-mono-pcm":return new _c(hc.PCM,1,48e3,96e3,2,16,e,"raw-48khz-16bit-mono-pcm",!0);case"audio-48khz-96kbitrate-mono-mp3":return new _c(hc.MP3,1,48e3,12288,2,16,e,e,!1);case"audio-48khz-192kbitrate-mono-mp3":return new _c(hc.MP3,1,48e3,24576,2,16,e,e,!1);case"ogg-48khz-16bit-mono-opus":return new _c(hc.OGG_OPUS,1,48e3,12e3,2,16,e,e,!1);case"webm-16khz-16bit-mono-opus":return new _c(hc.WEBM_OPUS,1,16e3,4e3,2,16,e,e,!1);case"webm-24khz-16bit-mono-opus":return new _c(hc.WEBM_OPUS,1,24e3,6e3,2,16,e,e,!1);case"webm-24khz-16bit-24kbps-mono-opus":return new _c(hc.WEBM_OPUS,1,24e3,3e3,2,16,e,e,!1);case"audio-16khz-16bit-32kbps-mono-opus":return new _c(hc.OPUS,1,16e3,4e3,2,16,e,e,!1);case"audio-24khz-16bit-48kbps-mono-opus":return new _c(hc.OPUS,1,24e3,6e3,2,16,e,e,!1);case"audio-24khz-16bit-24kbps-mono-opus":return new _c(hc.OPUS,1,24e3,3e3,2,16,e,e,!1);case"audio-24khz-16bit-mono-flac":return new _c(hc.FLAC,1,24e3,24e3,2,16,e,e,!1);case"audio-48khz-16bit-mono-flac":return new _c(hc.FLAC,1,48e3,3e4,2,16,e,e,!1);case"raw-24khz-16bit-mono-truesilk":return new _c(hc.SILKSkype,1,24e3,48e3,2,16,e,e,!1);case"raw-8khz-8bit-mono-alaw":return new _c(hc.ALaw,1,8e3,8e3,1,8,e,e,!1);case"riff-8khz-8bit-mono-alaw":return new _c(hc.ALaw,1,8e3,8e3,1,8,e,"raw-8khz-8bit-mono-alaw",!0);default:return new _c(hc.PCM,1,16e3,32e3,2,16,"riff-16khz-16bit-mono-pcm","raw-16khz-16bit-mono-pcm",!0)}}static getDefaultOutputFormat(){return _c.fromSpeechSynthesisOutputFormatString("undefined"!=typeof window?"audio-24khz-48kbitrate-mono-mp3":"riff-16khz-16bit-mono-pcm")}get hasHeader(){return this.priHasHeader}get header(){if(this.hasHeader)return this.privHeader}updateHeader(e){if(this.priHasHeader){new DataView(this.privHeader).setUint32(40,e,!0)}}get requestAudioFormatString(){return this.priRequestAudioFormatString}}_c.SpeechSynthesisOutputFormatToString={[dc.Raw8Khz8BitMonoMULaw]:"raw-8khz-8bit-mono-mulaw",[dc.Riff16Khz16KbpsMonoSiren]:"riff-16khz-16kbps-mono-siren",[dc.Audio16Khz16KbpsMonoSiren]:"audio-16khz-16kbps-mono-siren",[dc.Audio16Khz32KBitRateMonoMp3]:"audio-16khz-32kbitrate-mono-mp3",[dc.Audio16Khz128KBitRateMonoMp3]:"audio-16khz-128kbitrate-mono-mp3",[dc.Audio16Khz64KBitRateMonoMp3]:"audio-16khz-64kbitrate-mono-mp3",[dc.Audio24Khz48KBitRateMonoMp3]:"audio-24khz-48kbitrate-mono-mp3",[dc.Audio24Khz96KBitRateMonoMp3]:"audio-24khz-96kbitrate-mono-mp3",[dc.Audio24Khz160KBitRateMonoMp3]:"audio-24khz-160kbitrate-mono-mp3",[dc.Raw16Khz16BitMonoTrueSilk]:"raw-16khz-16bit-mono-truesilk",[dc.Riff16Khz16BitMonoPcm]:"riff-16khz-16bit-mono-pcm",[dc.Riff8Khz16BitMonoPcm]:"riff-8khz-16bit-mono-pcm",[dc.Riff24Khz16BitMonoPcm]:"riff-24khz-16bit-mono-pcm",[dc.Riff8Khz8BitMonoMULaw]:"riff-8khz-8bit-mono-mulaw",[dc.Raw16Khz16BitMonoPcm]:"raw-16khz-16bit-mono-pcm",[dc.Raw24Khz16BitMonoPcm]:"raw-24khz-16bit-mono-pcm",[dc.Raw8Khz16BitMonoPcm]:"raw-8khz-16bit-mono-pcm",[dc.Ogg16Khz16BitMonoOpus]:"ogg-16khz-16bit-mono-opus",[dc.Ogg24Khz16BitMonoOpus]:"ogg-24khz-16bit-mono-opus",[dc.Raw48Khz16BitMonoPcm]:"raw-48khz-16bit-mono-pcm",[dc.Riff48Khz16BitMonoPcm]:"riff-48khz-16bit-mono-pcm",[dc.Audio48Khz96KBitRateMonoMp3]:"audio-48khz-96kbitrate-mono-mp3",[dc.Audio48Khz192KBitRateMonoMp3]:"audio-48khz-192kbitrate-mono-mp3",[dc.Ogg48Khz16BitMonoOpus]:"ogg-48khz-16bit-mono-opus",[dc.Webm16Khz16BitMonoOpus]:"webm-16khz-16bit-mono-opus",[dc.Webm24Khz16BitMonoOpus]:"webm-24khz-16bit-mono-opus",[dc.Webm24Khz16Bit24KbpsMonoOpus]:"webm-24khz-16bit-24kbps-mono-opus",[dc.Raw24Khz16BitMonoTrueSilk]:"raw-24khz-16bit-mono-truesilk",[dc.Raw8Khz8BitMonoALaw]:"raw-8khz-8bit-mono-alaw",[dc.Riff8Khz8BitMonoALaw]:"riff-8khz-8bit-mono-alaw",[dc.Audio16Khz16Bit32KbpsMonoOpus]:"audio-16khz-16bit-32kbps-mono-opus",[dc.Audio24Khz16Bit48KbpsMonoOpus]:"audio-24khz-16bit-48kbps-mono-opus",[dc.Audio24Khz16Bit24KbpsMonoOpus]:"audio-24khz-16bit-24kbps-mono-opus"},(gc=mc||(mc={}))[gc.Masked=0]="Masked",gc[gc.Removed=1]="Removed",gc[gc.Raw=2]="Raw";class Ac{constructor(){}static fromSubscription(e,t){Hl.throwIfNullOrWhitespace(e,"subscriptionKey"),Hl.throwIfNullOrWhitespace(t,"region");const n=new Ec;return n.setProperty(sl.SpeechServiceConnection_Region,t),n.setProperty(sl.SpeechServiceConnection_IntentRegion,t),n.setProperty(sl.SpeechServiceConnection_Key,e),n}static fromEndpoint(e,t){Hl.throwIfNull(e,"endpoint");const n=new Ec;return n.setProperty(sl.SpeechServiceConnection_Endpoint,e.href),void 0!==t&&n.setProperty(sl.SpeechServiceConnection_Key,t),n}static fromHost(e,t){Hl.throwIfNull(e,"hostName");const n=new Ec;return n.setProperty(sl.SpeechServiceConnection_Host,e.protocol+"//"+e.hostname+(""===e.port?"":":"+e.port)),void 0!==t&&n.setProperty(sl.SpeechServiceConnection_Key,t),n}static fromAuthorizationToken(e,t){Hl.throwIfNull(e,"authorizationToken"),Hl.throwIfNullOrWhitespace(t,"region");const n=new Ec;return n.setProperty(sl.SpeechServiceConnection_Region,t),n.setProperty(sl.SpeechServiceConnection_IntentRegion,t),n.authorizationToken=e,n}close(){}}class Ec extends Ac{constructor(){super(),this.privProperties=new Vl,this.speechRecognitionLanguage="en-US",this.outputFormat=Tl.Simple}get properties(){return this.privProperties}get endPoint(){return new URL(this.privProperties.getProperty(sl.SpeechServiceConnection_Endpoint))}get subscriptionKey(){return this.privProperties.getProperty(sl.SpeechServiceConnection_Key)}get region(){return this.privProperties.getProperty(sl.SpeechServiceConnection_Region)}get authorizationToken(){return this.privProperties.getProperty(sl.SpeechServiceAuthorization_Token)}set authorizationToken(e){this.privProperties.setProperty(sl.SpeechServiceAuthorization_Token,e)}get speechRecognitionLanguage(){return this.privProperties.getProperty(sl.SpeechServiceConnection_RecoLanguage)}set speechRecognitionLanguage(e){this.privProperties.setProperty(sl.SpeechServiceConnection_RecoLanguage,e)}get autoDetectSourceLanguages(){return this.privProperties.getProperty(sl.SpeechServiceConnection_AutoDetectSourceLanguages)}set autoDetectSourceLanguages(e){this.privProperties.setProperty(sl.SpeechServiceConnection_AutoDetectSourceLanguages,e)}get outputFormat(){return Tl[this.privProperties.getProperty(uu,void 0)]}set outputFormat(e){this.privProperties.setProperty(uu,Tl[e])}get endpointId(){return this.privProperties.getProperty(sl.SpeechServiceConnection_EndpointId)}set endpointId(e){this.privProperties.setProperty(sl.SpeechServiceConnection_EndpointId,e)}setProperty(e,t){Hl.throwIfNull(t,"value"),this.privProperties.setProperty(e,t)}getProperty(e,t){return this.privProperties.getProperty(e,t)}setProxy(e,t,n,r){this.setProperty(sl[sl.SpeechServiceConnection_ProxyHostName],e),this.setProperty(sl[sl.SpeechServiceConnection_ProxyPort],t),this.setProperty(sl[sl.SpeechServiceConnection_ProxyUserName],n),this.setProperty(sl[sl.SpeechServiceConnection_ProxyPassword],r)}setServiceProperty(e,t,n){const r=JSON.parse(this.privProperties.getProperty(fu,"{}"));r[e]=t,this.privProperties.setProperty(fu,JSON.stringify(r))}setProfanity(e){this.privProperties.setProperty(sl.SpeechServiceResponse_ProfanityOption,mc[e])}enableAudioLogging(){this.privProperties.setProperty(sl.SpeechServiceConnection_EnableAudioLogging,"true")}requestWordLevelTimestamps(){this.privProperties.setProperty(sl.SpeechServiceResponse_RequestWordLevelTimestamps,"true")}enableDictation(){this.privProperties.setProperty(hu,"true")}clone(){const e=new Ec;return e.privProperties=this.privProperties.clone(),e}get speechSynthesisLanguage(){return this.privProperties.getProperty(sl.SpeechServiceConnection_SynthLanguage)}set speechSynthesisLanguage(e){this.privProperties.setProperty(sl.SpeechServiceConnection_SynthLanguage,e)}get speechSynthesisVoiceName(){return this.privProperties.getProperty(sl.SpeechServiceConnection_SynthVoice)}set speechSynthesisVoiceName(e){this.privProperties.setProperty(sl.SpeechServiceConnection_SynthVoice,e)}get speechSynthesisOutputFormat(){return dc[this.privProperties.getProperty(sl.SpeechServiceConnection_SynthOutputFormat,void 0)]}set speechSynthesisOutputFormat(e){this.privProperties.setProperty(sl.SpeechServiceConnection_SynthOutputFormat,dc[e])}}class Cc{constructor(){}set applicationId(e){}}Cc.DialogTypes=((vc=class{}).BotFramework="bot_framework",vc.CustomCommands="custom_commands",vc);var kc={};e(kc,"AudioOutputStream",(()=>Rc),(e=>Rc=e)),e(kc,"PullAudioOutputStream",(()=>Pc),(e=>Pc=e)),e(kc,"PullAudioOutputStreamImpl",(()=>Nc),(e=>Nc=e)),e(kc,"PushAudioOutputStream",(()=>Lc),(e=>Lc=e)),e(kc,"PushAudioOutputStreamImpl",(()=>Dc),(e=>Dc=e));var Tc,Ic,Oc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class Rc{constructor(){}static createPullStream(){return Pc.create()}}class Pc extends Rc{static create(){return new Nc}}class Nc extends Pc{constructor(){super(),this.privId=La(),this.privStream=new(0,Cs.Stream)}set format(e){null==e&&(this.privFormat=_c.getDefaultOutputFormat()),this.privFormat=e}get format(){return this.privFormat}get isClosed(){return this.privStream.isClosed}id(){return this.privId}read(e){return Oc(this,void 0,void 0,(function*(){const t=new Int8Array(e);let n=0;if(void 0!==this.privLastChunkView){if(this.privLastChunkView.length>e.byteLength)return t.set(this.privLastChunkView.slice(0,e.byteLength)),this.privLastChunkView=this.privLastChunkView.slice(e.byteLength),Promise.resolve(e.byteLength);t.set(this.privLastChunkView),n=this.privLastChunkView.length,this.privLastChunkView=void 0}for(;n<e.byteLength&&!this.privStream.isReadEnded;){const r=yield this.privStream.read();if(void 0===r||r.isEnd)yield this.privStream.readEnded();else{let i;r.buffer.byteLength>e.byteLength-n?(i=r.buffer.slice(0,e.byteLength-n),this.privLastChunkView=new Int8Array(r.buffer.slice(e.byteLength-n))):i=r.buffer,t.set(new Int8Array(i),n),n+=i.byteLength}}return n}))}write(e){Hl.throwIfNullOrUndefined(this.privStream,"must set format before writing"),this.privStream.writeStreamChunk({buffer:e,isEnd:!1,timeReceived:Date.now()})}close(){this.privStream.close()}}class Lc extends Rc{constructor(){super()}static create(e){return new Dc(e)}}class Dc extends Lc{constructor(e){super(),this.privId=La(),this.privCallback=e}set format(e){}write(e){this.privCallback.write&&this.privCallback.write(e)}close(){this.privCallback.close&&this.privCallback.close()}id(){return this.privId}}(Ic=Tc||(Tc={}))[Ic.None=0]="None",Ic[Ic.TextToSpeechAudio=1]="TextToSpeechAudio";var Bc,jc;class Fc{toJsonString(){return JSON.stringify(this.iPrivConfig)}get(){return this.iPrivConfig}set(e){this.iPrivConfig=e}}(jc=Bc||(Bc={})).WordBoundary="WordBoundary",jc.Bookmark="Bookmark",jc.Viseme="Viseme";class Uc{constructor(e){this.privSynthesisAudioMetadata=JSON.parse(e)}static fromJSON(e){return new Uc(e)}get Metadata(){return this.privSynthesisAudioMetadata.Metadata}}var zc={};e(zc,"SynthesisTurn",(()=>au),(e=>au=e));var Hc={};e(Hc,"SynthesisAdapterBase",(()=>Qc),(e=>Qc=e));class Vc{constructor(e){this.privResult=e}get result(){return this.privResult}}class Wc{constructor(e,t,n,r){this.privResultId=e,this.privReason=t,this.privErrorDetails=n,this.privProperties=r}get resultId(){return this.privResultId}get reason(){return this.privReason}get errorDetails(){return this.privErrorDetails}get properties(){return this.privProperties}}class Gc extends Wc{constructor(e,t,n,r,i){super(e,t,r,i),this.privAudioData=n}get audioData(){return this.privAudioData}}class qc{constructor(e,t,n,r){this.privAudioOffset=e,this.privText=t,this.privWordLength=n,this.privTextOffset=r}get audioOffset(){return this.privAudioOffset}get text(){return this.privText}get wordLength(){return this.privWordLength}get textOffset(){return this.privTextOffset}}class Kc{constructor(e,t){this.privAudioOffset=e,this.privText=t}get audioOffset(){return this.privAudioOffset}get text(){return this.privText}}class Yc{constructor(e,t,n){this.privAudioOffset=e,this.privVisemeId=t,this.privAnimation=n}get audioOffset(){return this.privAudioOffset}get visemeId(){return this.privVisemeId}get animation(){return this.privAnimation}}var Jc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class Qc{constructor(e,t,n,r,i){if(this.speakOverride=void 0,this.receiveMessageOverride=void 0,this.connectImplOverride=void 0,this.configConnectionOverride=void 0,this.sendSynthesisContext=e=>{const t=this.synthesisContext.toJSON();if(t)return e.send(new fl(ja.Text,"synthesis.context",this.privSynthesisTurn.requestId,"application/json",t))},this.sendSpeechServiceConfig=(e,t)=>{if(t)return e.send(new fl(ja.Text,"speech.config",this.privSynthesisTurn.requestId,"application/json",t))},this.sendSsmlMessage=(e,t,n)=>e.send(new fl(ja.Text,"ssml",n,"application/ssml+xml",t)),!e)throw new us("authentication");if(!t)throw new us("connectionFactory");if(!n)throw new us("synthesizerConfig");this.privAuthentication=e,this.privConnectionFactory=t,this.privSynthesizerConfig=n,this.privIsDisposed=!1,this.privSpeechSynthesizer=r,this.privSessionAudioDestination=i,this.privSynthesisTurn=new(0,zc.SynthesisTurn),this.privConnectionEvents=new ms,this.privServiceEvents=new ms,this.privSynthesisContext=new cu(this.privSpeechSynthesizer),this.privAgentConfig=new Fc,this.connectionEvents.attach((e=>{if("ConnectionClosedEvent"===e.name){const t=e;1e3!==t.statusCode&&this.cancelSynthesisLocal(rl.Error,1007===t.statusCode?ol.BadRequestParameters:ol.ConnectionFailure,t.reason+" websocket error code: "+t.statusCode)}}))}get synthesisContext(){return this.privSynthesisContext}get agentConfig(){return this.privAgentConfig}get connectionEvents(){return this.privConnectionEvents}get serviceEvents(){return this.privServiceEvents}set activityTemplate(e){this.privActivityTemplate=e}get activityTemplate(){return this.privActivityTemplate}set audioOutputFormat(e){this.privAudioOutputFormat=e,this.privSynthesisTurn.audioOutputFormat=e,void 0!==this.privSessionAudioDestination&&(this.privSessionAudioDestination.format=e),void 0!==this.synthesisContext&&(this.synthesisContext.audioOutputFormat=e)}static addHeader(e,t){if(!t.hasHeader)return e;t.updateHeader(e.byteLength);const n=new Uint8Array(e.byteLength+t.header.byteLength);return n.set(new Uint8Array(t.header),0),n.set(new Uint8Array(e),t.header.byteLength),n.buffer}isDisposed(){return this.privIsDisposed}dispose(e){return Jc(this,void 0,void 0,(function*(){if(this.privIsDisposed=!0,void 0!==this.privSessionAudioDestination&&this.privSessionAudioDestination.close(),this.privConnectionConfigurationPromise){const t=yield this.privConnectionConfigurationPromise;yield t.dispose(e)}}))}connect(){return Jc(this,void 0,void 0,(function*(){yield this.connectImpl()}))}sendNetworkMessage(e,t){return Jc(this,void 0,void 0,(function*(){const n="string"==typeof t?ja.Text:ja.Binary,r="string"==typeof t?"application/json":"";return(yield this.fetchConnection()).send(new fl(n,e,this.privSynthesisTurn.requestId,r,t))}))}Speak(e,t,n,r,i,o){return Jc(this,void 0,void 0,(function*(){let a;if(a=t?e:this.privSpeechSynthesizer.buildSsml(e),void 0!==this.speakOverride)return this.speakOverride(a,n,r,i);this.privSuccessCallback=r,this.privErrorCallback=i,this.privSynthesisTurn.startNewSynthesis(n,e,t,o);try{yield this.connectImpl();const e=yield this.fetchConnection();yield this.sendSynthesisContext(e),yield this.sendSsmlMessage(e,a,n);const t=new Vc(new Gc(n,Ol.SynthesizingAudioStarted));this.privSpeechSynthesizer.synthesisStarted&&this.privSpeechSynthesizer.synthesisStarted(this.privSpeechSynthesizer,t);this.receiveMessage()}catch(e){return this.cancelSynthesisLocal(rl.Error,ol.ConnectionFailure,e),Promise.reject(e)}}))}cancelSynthesis(e,t,n,r){const i=new Vl;i.setProperty(du,ol[n]);const o=new Gc(e,Ol.Canceled,void 0,r,i);if(this.privSpeechSynthesizer.SynthesisCanceled){const e=new Vc(o);try{this.privSpeechSynthesizer.SynthesisCanceled(this.privSpeechSynthesizer,e)}catch(e){}}if(this.privSuccessCallback)try{this.privSuccessCallback(o)}catch(e){}}cancelSynthesisLocal(e,t,n){this.privSynthesisTurn.isSynthesizing&&(this.privSynthesisTurn.onStopSynthesizing(),this.cancelSynthesis(this.privSynthesisTurn.requestId,e,t,n))}processTypeSpecificMessages(e,t,n){return!0}receiveMessage(){return Jc(this,void 0,void 0,(function*(){try{const e=yield this.fetchConnection(),t=yield e.read();if(void 0!==this.receiveMessageOverride)return this.receiveMessageOverride();if(this.privIsDisposed)return;if(!t)return this.privSynthesisTurn.isSynthesizing?this.receiveMessage():void 0;this.privServiceHasSentMessage=!0;const n=fl.fromConnectionMessage(t);if(n.requestId.toLowerCase()===this.privSynthesisTurn.requestId.toLowerCase())switch(n.path.toLowerCase()){case"turn.start":this.privSynthesisTurn.onServiceTurnStartResponse();break;case"response":this.privSynthesisTurn.onServiceResponseMessage(n.textBody);break;case"audio":if(this.privSynthesisTurn.streamId.toLowerCase()===n.streamId.toLowerCase()&&n.binaryBody){if(this.privSynthesisTurn.onAudioChunkReceived(n.binaryBody),this.privSpeechSynthesizer.synthesizing)try{const e=Qc.addHeader(n.binaryBody,this.privSynthesisTurn.audioOutputFormat),t=new Vc(new Gc(this.privSynthesisTurn.requestId,Ol.SynthesizingAudio,e));this.privSpeechSynthesizer.synthesizing(this.privSpeechSynthesizer,t)}catch(e){}void 0!==this.privSessionAudioDestination&&this.privSessionAudioDestination.write(n.binaryBody)}break;case"audio.metadata":const e=Uc.fromJSON(n.textBody).Metadata;for(const t of e)switch(t.Type){case Bc.WordBoundary:this.privSynthesisTurn.onWordBoundaryEvent(t.Data.text.Text);const e=new qc(t.Data.Offset,t.Data.text.Text,t.Data.text.Length,this.privSynthesisTurn.currentTextOffset);if(this.privSpeechSynthesizer.wordBoundary)try{this.privSpeechSynthesizer.wordBoundary(this.privSpeechSynthesizer,e)}catch(e){}break;case Bc.Bookmark:const n=new Kc(t.Data.Offset,t.Data.Bookmark);if(this.privSpeechSynthesizer.bookmarkReached)try{this.privSpeechSynthesizer.bookmarkReached(this.privSpeechSynthesizer,n)}catch(e){}break;case Bc.Viseme:if(this.privSynthesisTurn.onVisemeMetadataReceived(t),t.Data.IsLastAnimation){const e=new Yc(t.Data.Offset,t.Data.VisemeId,this.privSynthesisTurn.getAndClearVisemeAnimation());if(this.privSpeechSynthesizer.visemeReceived)try{this.privSpeechSynthesizer.visemeReceived(this.privSpeechSynthesizer,e)}catch(e){}}}break;case"turn.end":let t;this.privSynthesisTurn.onServiceTurnEndResponse();try{const e=yield this.privSynthesisTurn.getAllReceivedAudioWithHeader();t=new Gc(this.privSynthesisTurn.requestId,Ol.SynthesizingAudioCompleted,e),this.privSuccessCallback&&this.privSuccessCallback(t)}catch(e){this.privErrorCallback&&this.privErrorCallback(e)}if(this.privSpeechSynthesizer.synthesisCompleted)try{this.privSpeechSynthesizer.synthesisCompleted(this.privSpeechSynthesizer,new Vc(t))}catch(e){}break;default:this.processTypeSpecificMessages(n)||this.privServiceEvents&&this.serviceEvents.onEvent(new ts(n.path.toLowerCase(),n.textBody))}return this.receiveMessage()}catch(e){}}))}connectImpl(e=!1){if(this.privConnectionPromise)return this.privConnectionPromise.then((e=>e.state()===Ua.Disconnected?(this.privConnectionId=null,this.privConnectionPromise=null,this.privServiceHasSentMessage=!1,this.connectImpl()):this.privConnectionPromise),(e=>(this.privConnectionId=null,this.privConnectionPromise=null,this.privServiceHasSentMessage=!1,this.connectImpl())));this.privAuthFetchEventId=La(),this.privConnectionId=La(),this.privSynthesisTurn.onPreConnectionStart(this.privAuthFetchEventId,this.privConnectionId);const t=e?this.privAuthentication.fetchOnExpiry(this.privAuthFetchEventId):this.privAuthentication.fetch(this.privAuthFetchEventId);return this.privConnectionPromise=t.then((t=>Jc(this,void 0,void 0,(function*(){yield this.privSynthesisTurn.onAuthCompleted(!1);const n=this.privConnectionFactory.create(this.privSynthesizerConfig,t,this.privConnectionId);n.events.attach((e=>{this.connectionEvents.onEvent(e)}));const r=yield n.open();return 200===r.statusCode?(yield this.privSynthesisTurn.onConnectionEstablishCompleted(r.statusCode),Promise.resolve(n)):403!==r.statusCode||e?(yield this.privSynthesisTurn.onConnectionEstablishCompleted(r.statusCode,r.reason),Promise.reject(`Unable to contact server. StatusCode: ${r.statusCode}, ${this.privSynthesizerConfig.parameters.getProperty(sl.SpeechServiceConnection_Endpoint)} Reason: ${r.reason}`)):this.connectImpl(!0)}))),(e=>Jc(this,void 0,void 0,(function*(){throw yield this.privSynthesisTurn.onAuthCompleted(!0,e),new Error(e)})))),this.privConnectionPromise.catch((()=>{})),this.privConnectionPromise}fetchConnection(){return Jc(this,void 0,void 0,(function*(){return this.privConnectionConfigurationPromise?this.privConnectionConfigurationPromise.then((e=>e.state()===Ua.Disconnected?(this.privConnectionId=null,this.privConnectionConfigurationPromise=null,this.privServiceHasSentMessage=!1,this.fetchConnection()):this.privConnectionConfigurationPromise),(e=>(this.privConnectionId=null,this.privConnectionConfigurationPromise=null,this.privServiceHasSentMessage=!1,this.fetchConnection()))):(this.privConnectionConfigurationPromise=this.configureConnection(),yield this.privConnectionConfigurationPromise)}))}configureConnection(){return Jc(this,void 0,void 0,(function*(){const e=yield this.connectImpl();return void 0!==this.configConnectionOverride?this.configConnectionOverride(e):(yield this.sendSpeechServiceConfig(e,this.privSynthesizerConfig.SpeechServiceConfig.serialize()),e)}))}}Qc.telemetryDataEnabled=!0;class Xc extends Wa{constructor(e,t,n=Da.Info){super(e,n),this.privRequestId=t}get requestId(){return this.privRequestId}}class Zc extends Xc{constructor(e,t,n){super("SynthesisTriggeredEvent",e),this.privSessionAudioDestinationId=t,this.privTurnAudioDestinationId=n}get audioSessionDestinationId(){return this.privSessionAudioDestinationId}get audioTurnDestinationId(){return this.privTurnAudioDestinationId}}class $c extends Xc{constructor(e,t){super("ConnectingToSynthesisServiceEvent",e),this.privAuthFetchEventId=t}get authFetchEventId(){return this.privAuthFetchEventId}}class eu extends Xc{constructor(e,t){super("SynthesisStartedEvent",e),this.privAuthFetchEventId=t}get authFetchEventId(){return this.privAuthFetchEventId}}var tu,nu,ru,iu,ou=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class au{constructor(){this.privIsDisposed=!1,this.privIsSynthesizing=!1,this.privIsSynthesisEnded=!1,this.privBytesReceived=0,this.privInTurn=!1,this.privTextOffset=0,this.privNextSearchTextIndex=0,this.onPreConnectionStart=(e,t)=>{this.privAuthFetchEventId=e,this.onEvent(new $c(this.privRequestId,this.privAuthFetchEventId))},this.onAuthCompleted=(e,t)=>{e&&this.onComplete()},this.onConnectionEstablishCompleted=(e,t)=>{if(200===e)return this.onEvent(new eu(this.requestId,this.privAuthFetchEventId)),void(this.privBytesReceived=0);403===e&&this.onComplete()},this.onServiceResponseMessage=e=>{const t=JSON.parse(e);this.streamId=t.audio.streamId},this.onServiceTurnEndResponse=()=>{this.privInTurn=!1,this.privTurnDeferral.resolve(),this.onComplete()},this.onServiceTurnStartResponse=()=>{this.privTurnDeferral&&this.privInTurn&&(this.privTurnDeferral.reject("Another turn started before current completed."),this.privTurnDeferral.promise.then().catch((()=>{}))),this.privInTurn=!0,this.privTurnDeferral=new vs},this.dispose=e=>{this.privIsDisposed||(this.privIsDisposed=!0)},this.onEvent=e=>{gs.instance.onEvent(e)},this.onComplete=()=>{this.privIsSynthesizing&&(this.privIsSynthesizing=!1,this.privIsSynthesisEnded=!0,this.privAudioOutputStream.close(),this.privInTurn=!1,void 0!==this.privTurnAudioDestination&&(this.privTurnAudioDestination.close(),this.privTurnAudioDestination=void 0))},this.privRequestId=La(),this.privTurnDeferral=new vs,this.privTurnDeferral.resolve()}get requestId(){return this.privRequestId}get streamId(){return this.privStreamId}set streamId(e){this.privStreamId=e}get audioOutputFormat(){return this.privAudioOutputFormat}set audioOutputFormat(e){this.privAudioOutputFormat=e}get turnCompletionPromise(){return this.privTurnDeferral.promise}get isSynthesisEnded(){return this.privIsSynthesisEnded}get isSynthesizing(){return this.privIsSynthesizing}get currentTextOffset(){return this.privTextOffset}get bytesReceived(){return this.privBytesReceived}getAllReceivedAudio(){return ou(this,void 0,void 0,(function*(){return this.privReceivedAudio?Promise.resolve(this.privReceivedAudio):this.privIsSynthesisEnded?(yield this.readAllAudioFromStream(),Promise.resolve(this.privReceivedAudio)):null}))}getAllReceivedAudioWithHeader(){return ou(this,void 0,void 0,(function*(){if(this.privReceivedAudioWithHeader)return this.privReceivedAudioWithHeader;if(!this.privIsSynthesisEnded)return null;if(this.audioOutputFormat.hasHeader){const e=yield this.getAllReceivedAudio();return this.privReceivedAudioWithHeader=Hc.SynthesisAdapterBase.addHeader(e,this.audioOutputFormat),this.privReceivedAudioWithHeader}return this.getAllReceivedAudio()}))}startNewSynthesis(e,t,n,r){this.privIsSynthesisEnded=!1,this.privIsSynthesizing=!0,this.privRequestId=e,this.privRawText=t,this.privIsSSML=n,this.privAudioOutputStream=new(0,kc.PullAudioOutputStreamImpl),this.privAudioOutputStream.format=this.privAudioOutputFormat,this.privReceivedAudio=null,this.privReceivedAudioWithHeader=null,this.privBytesReceived=0,this.privTextOffset=0,this.privNextSearchTextIndex=0,this.privPartialVisemeAnimation="",void 0!==r&&(this.privTurnAudioDestination=r,this.privTurnAudioDestination.format=this.privAudioOutputFormat),this.onEvent(new Zc(this.requestId,void 0,void 0===r?void 0:r.id()))}onAudioChunkReceived(e){this.isSynthesizing&&(this.privAudioOutputStream.write(e),this.privBytesReceived+=e.byteLength,void 0!==this.privTurnAudioDestination&&this.privTurnAudioDestination.write(e))}onWordBoundaryEvent(e){this.updateTextOffset(e)}onVisemeMetadataReceived(e){void 0!==e.Data.AnimationChunk&&(this.privPartialVisemeAnimation+=e.Data.AnimationChunk)}onStopSynthesizing(){this.onComplete()}getAndClearVisemeAnimation(){const e=this.privPartialVisemeAnimation;return this.privPartialVisemeAnimation="",e}updateTextOffset(e){this.privTextOffset>=0&&(this.privTextOffset=this.privRawText.indexOf(e,this.privNextSearchTextIndex),this.privTextOffset>=0&&(this.privNextSearchTextIndex=this.privTextOffset+e.length),this.privIsSSML&&this.privRawText.indexOf("<",this.privTextOffset+1)>this.privRawText.indexOf(">",this.privTextOffset+1)&&this.updateTextOffset(e))}readAllAudioFromStream(){return ou(this,void 0,void 0,(function*(){if(this.privIsSynthesisEnded){this.privReceivedAudio=new ArrayBuffer(this.bytesReceived);try{yield this.privAudioOutputStream.read(this.privReceivedAudio)}catch(e){this.privReceivedAudio=new ArrayBuffer(0)}}}))}}class su{constructor(e){let t=e.parameters.getProperty(sl.SpeechServiceConnection_Endpoint,void 0);if(!t){const n=e.parameters.getProperty(sl.SpeechServiceConnection_Region,"westus"),r=jl.getHostSuffix(n);t=e.parameters.getProperty(sl.SpeechServiceConnection_Host,`https://${n}.tts.speech${r}`)}this.privUri=`${t}/cognitiveservices/voices/list`;const n=fd.requestOptions;n.headers[fd.configParams.subscriptionKey]=e.parameters.getProperty(sl.SpeechServiceConnection_Key,void 0),this.privRestAdapter=new(0,rd.RestMessageAdapter)(n)}getVoicesList(e){return this.privRestAdapter.setHeaders(Zs.ConnectionId,e),this.privRestAdapter.request(rd.RestRequestType.Get,this.privUri)}}(nu=tu||(tu={}))[nu.Standard=0]="Standard",nu[nu.Custom=1]="Custom";class lu{constructor(e,t){this.privSynthesisServiceType=tu.Standard,this.privSpeechServiceConfig=e||new _l(new Al(null)),this.privParameters=t}get parameters(){return this.privParameters}get synthesisServiceType(){return this.privSynthesisServiceType}set synthesisServiceType(e){this.privSynthesisServiceType=e}get SpeechServiceConfig(){return this.privSpeechServiceConfig}}class cu{constructor(e){this.privContext={},this.privSpeechSynthesizer=e}setSection(e,t){this.privContext[e]=t}set audioOutputFormat(e){this.privAudioOutputFormat=e}toJSON(){const e=this.buildSynthesisContext();return this.setSection("synthesis",e),JSON.stringify(this.privContext)}buildSynthesisContext(){return{audio:{metadataOptions:{bookmarkEnabled:!!this.privSpeechSynthesizer.bookmarkReached,sentenceBoundaryEnabled:!1,visemeEnabled:!!this.privSpeechSynthesizer.visemeReceived,wordBoundaryEnabled:!!this.privSpeechSynthesizer.wordBoundary},outputFormat:this.privAudioOutputFormat.requestAudioFormatString},language:{autoDetection:this.privSpeechSynthesizer.autoDetectSourceLanguage}}}}(iu=ru||(ru={}))[iu.TextIndependentIdentification=0]="TextIndependentIdentification",iu[iu.TextDependentVerification=1]="TextDependentVerification",iu[iu.TextIndependentVerification=2]="TextIndependentVerification";const uu="OutputFormat",du="CancellationErrorCode",fu="ServiceProperties",hu="ForceDictation";var pu=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class mu{constructor(e,t,n,r){this.privRecorder=e,this.deviceId=t,this.privStreams={},this.turnOn=()=>{if(this.privInitializeDeferral)return this.privInitializeDeferral.promise;this.privInitializeDeferral=new vs;try{this.createAudioContext()}catch(e){if(e instanceof Error){const t=e;this.privInitializeDeferral.reject(t.name+": "+t.message)}else this.privInitializeDeferral.reject(e);return this.privInitializeDeferral.promise}const e=window.navigator;let t=e.getUserMedia||e.webkitGetUserMedia||e.mozGetUserMedia||e.msGetUserMedia;if(e.mediaDevices&&(t=(t,n,r)=>{e.mediaDevices.getUserMedia(t).then(n).catch(r)}),t){const e=()=>{this.onEvent(new qa(this.privId)),this.privMediaStream&&this.privMediaStream.active?(this.onEvent(new Ka(this.privId)),this.privInitializeDeferral.resolve()):t({audio:!this.deviceId||{deviceId:this.deviceId},video:!1},(e=>{this.privMediaStream=e,this.onEvent(new Ka(this.privId)),this.privInitializeDeferral.resolve()}),(e=>{const t=`Error occurred during microphone initialization: ${e}`;this.privInitializeDeferral.reject(t),this.onEvent(new Ja(this.privId,t))}))};"suspended"===this.privContext.state?this.privContext.resume().then(e).catch((e=>{this.privInitializeDeferral.reject(`Failed to initialize audio context: ${e}`)})):e()}else{const e="Browser does not support getUserMedia.";this.privInitializeDeferral.reject(e),this.onEvent(new Ja(e,""))}return this.privInitializeDeferral.promise},this.id=()=>this.privId,this.attach=e=>(this.onEvent(new Xa(this.privId,e)),this.listen(e).then((t=>(this.onEvent(new Za(this.privId,e)),{detach:()=>pu(this,void 0,void 0,(function*(){return t.readEnded(),delete this.privStreams[e],this.onEvent(new $a(this.privId,e)),this.turnOff()})),id:()=>e,read:()=>t.read()})))),this.detach=e=>{e&&this.privStreams[e]&&(this.privStreams[e].close(),delete this.privStreams[e],this.onEvent(new $a(this.privId,e)))},this.listen=e=>pu(this,void 0,void 0,(function*(){yield this.turnOn();const t=new Rs(this.privOutputChunkSize,e);this.privStreams[e]=t;try{this.privRecorder.record(this.privContext,this.privMediaStream,t)}catch(t){throw this.onEvent(new es(this.privId,e,t)),t}return t})),this.onEvent=e=>{this.privEvents.onEvent(e),gs.instance.onEvent(e)},this.createAudioContext=()=>{this.privContext||(this.privContext=Mc.getAudioContext(mu.AUDIOFORMAT.samplesPerSec))},this.privOutputChunkSize=mu.AUDIOFORMAT.avgBytesPerSec/10,this.privId=n||La(),this.privEvents=new ms,this.privMediaStream=r||null,this.privIsClosing=!1}get format(){return Promise.resolve(mu.AUDIOFORMAT)}get blob(){return Promise.reject("Not implemented for Mic input")}turnOff(){return pu(this,void 0,void 0,(function*(){for(const e in this.privStreams)if(e){const t=this.privStreams[e];t&&t.close()}this.onEvent(new Ya(this.privId)),this.privInitializeDeferral&&(yield this.privInitializeDeferral,this.privInitializeDeferral=null),yield this.destroyAudioContext()}))}get events(){return this.privEvents}get deviceInfo(){return this.getMicrophoneLabel().then((e=>({bitspersample:mu.AUDIOFORMAT.bitsPerSample,channelcount:mu.AUDIOFORMAT.channels,connectivity:vl.Unknown,manufacturer:"Speech SDK",model:e,samplerate:mu.AUDIOFORMAT.samplesPerSec,type:bl.Microphones})))}setProperty(e,t){if("MICROPHONE-WorkletSourceUrl"!==e)throw new Error("Property '"+e+"' is not supported on Microphone.");this.privRecorder.setWorkletUrl(t)}getMicrophoneLabel(){const e="microphone";if(void 0!==this.privMicrophoneLabel)return Promise.resolve(this.privMicrophoneLabel);if(void 0===this.privMediaStream||!this.privMediaStream.active)return Promise.resolve(e);this.privMicrophoneLabel=e;const t=this.privMediaStream.getTracks()[0].getSettings().deviceId;if(void 0===t)return Promise.resolve(this.privMicrophoneLabel);const n=new vs;return navigator.mediaDevices.enumerateDevices().then((e=>{for(const n of e)if(n.deviceId===t){this.privMicrophoneLabel=n.label;break}n.resolve(this.privMicrophoneLabel)}),(()=>n.resolve(this.privMicrophoneLabel))),n.promise}destroyAudioContext(){return pu(this,void 0,void 0,(function*(){if(!this.privContext)return;this.privRecorder.releaseMediaResources(this.privContext);let e=!1;"close"in this.privContext&&(e=!0),e?this.privIsClosing||(this.privIsClosing=!0,yield this.privContext.close(),this.privContext=null,this.privIsClosing=!1):null!==this.privContext&&"running"===this.privContext.state&&(yield this.privContext.suspend())}))}}mu.AUDIOFORMAT=Sc.getDefaultInputFormat();var gu={};e(gu,"FileAudioSource",(()=>yu),(e=>yu=e));var vu=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class yu{constructor(e,t,n){this.privStreams={},this.privHeaderEnd=44,this.turnOn=()=>{if(this.privFilename.lastIndexOf(".wav")!==this.privFilename.length-4){const e=this.privFilename+" is not supported. Only WAVE files are allowed at the moment.";return this.onEvent(new Ja(e,"")),Promise.reject(e)}this.onEvent(new qa(this.privId)),this.onEvent(new Ka(this.privId))},this.id=()=>this.privId,this.attach=e=>vu(this,void 0,void 0,(function*(){this.onEvent(new Xa(this.privId,e));const t=yield this.upload(e);return this.onEvent(new Za(this.privId,e)),Promise.resolve({detach:()=>vu(this,void 0,void 0,(function*(){t.readEnded(),delete this.privStreams[e],this.onEvent(new $a(this.privId,e)),yield this.turnOff()})),id:()=>e,read:()=>t.read()})})),this.detach=e=>{e&&this.privStreams[e]&&(this.privStreams[e].close(),delete this.privStreams[e],this.onEvent(new $a(this.privId,e)))},this.turnOff=()=>{for(const e in this.privStreams)if(e){const t=this.privStreams[e];t&&!t.isClosed&&t.close()}return this.onEvent(new Ya(this.privId)),Promise.resolve()},this.onEvent=e=>{this.privEvents.onEvent(e),gs.instance.onEvent(e)},this.privId=n||La(),this.privEvents=new ms,this.privSource=e,"undefined"!=typeof window&&"undefined"!=typeof Blob&&this.privSource instanceof Blob?this.privFilename=e.name:this.privFilename=t||"unknown.wav",this.privAudioFormatPromise=this.readHeader()}get format(){return this.privAudioFormatPromise}get blob(){return Promise.resolve(this.privSource)}get events(){return this.privEvents}get deviceInfo(){return this.privAudioFormatPromise.then((e=>Promise.resolve({bitspersample:e.bitsPerSample,channelcount:e.channels,connectivity:vl.Unknown,manufacturer:"Speech SDK",model:"File",samplerate:e.samplesPerSec,type:bl.File})))}readHeader(){const e=this.privSource.slice(0,512),t=new vs,n=e=>{const n=new DataView(e),r=e=>String.fromCharCode(n.getUint8(e),n.getUint8(e+1),n.getUint8(e+2),n.getUint8(e+3));if("RIFF"!==r(0))return void t.reject("Invalid WAV header in file, RIFF was not found");if("WAVE"!==r(8)||"fmt "!==r(12))return void t.reject("Invalid WAV header in file, WAVEfmt was not found");const i=n.getInt32(16,!0),o=n.getUint16(22,!0),a=n.getUint32(24,!0),s=n.getUint16(34,!0);let l=36+Math.max(i-16,0);for(;"data"!==r(l);l+=2)if(l>504)return void t.reject("Invalid WAV header in file, data block was not found");this.privHeaderEnd=l+8,t.resolve(Sc.getWaveFormatPCM(a,s,o))};if("undefined"!=typeof window&&"undefined"!=typeof Blob&&e instanceof Blob){const t=new FileReader;t.onload=e=>{const t=e.target.result;n(t)},t.readAsArrayBuffer(e)}else{const t=e;n(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength))}return t.promise}upload(e){return vu(this,void 0,void 0,(function*(){const t=t=>{const n=`Error occurred while processing '${this.privFilename}'. ${t}`;throw this.onEvent(new es(this.privId,e,n)),new Error(n)};try{yield this.turnOn();const n=yield this.privAudioFormatPromise,r=new Rs(n.avgBytesPerSec/10,e);this.privStreams[e]=r;const i=this.privSource.slice(this.privHeaderEnd),o=e=>{r.isClosed||(r.writeStreamChunk({buffer:e,isEnd:!1,timeReceived:Date.now()}),r.close())};if("undefined"!=typeof window&&"undefined"!=typeof Blob&&i instanceof Blob){const e=new FileReader;e.onerror=e=>{t(e.toString())},e.onload=e=>{const t=e.target.result;o(t)},e.readAsArrayBuffer(i)}else{const e=i;o(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength))}return r}catch(e){t(e)}}))}}class bu{constructor(e){this.record=(e,t,n)=>{const r=new Es(e.sampleRate,16e3);let i=!0;const o=e.createMediaStreamSource(t);if(!this.privSpeechProcessorScript){const e=new Blob(["class SP extends AudioWorkletProcessor {\n constructor(options) {\n super(options);\n }\n process(inputs, outputs) {\n const input = inputs[0];\n const output = [];\n for (let channel = 0; channel < input.length; channel += 1) {\n output[channel] = input[channel];\n }\n this.port.postMessage(output[0]);\n return true;\n }\n }\n registerProcessor('speech-processor', SP);"],{type:"application/javascript; charset=utf-8"});this.privSpeechProcessorScript=URL.createObjectURL(e)}const a=()=>{const a=(()=>{let t=0;try{return e.createScriptProcessor(t,1,1)}catch(n){t=2048;let r=e.sampleRate;for(;t<16384&&r>=32e3;)t<<=1,r>>=1;return e.createScriptProcessor(t,1,1)}})();a.onaudioprocess=e=>{const t=e.inputBuffer.getChannelData(0);if(n&&!n.isClosed){const e=r.encode(t);e&&(n.writeStreamChunk({buffer:e,isEnd:!1,timeReceived:Date.now()}),i=!1)}},o.connect(a),a.connect(e.destination),this.privMediaResources={scriptProcessorNode:a,source:o,stream:t}};if(this.privSpeechProcessorScript&&e.audioWorklet)e.audioWorklet.addModule(this.privSpeechProcessorScript).then((()=>{const a=new AudioWorkletNode(e,"speech-processor");a.port.onmessage=e=>{const t=e.data;if(n&&!n.isClosed){const e=r.encode(t);e&&(n.writeStreamChunk({buffer:e,isEnd:!1,timeReceived:Date.now()}),i=!1)}},o.connect(a),a.connect(e.destination),this.privMediaResources={scriptProcessorNode:a,source:o,stream:t}})).catch((()=>{a()}));else try{a()}catch(e){throw new Error(`Unable to start audio worklet node for PCMRecorder: ${e}`)}},this.releaseMediaResources=e=>{this.privMediaResources&&(this.privMediaResources.scriptProcessorNode&&(this.privMediaResources.scriptProcessorNode.disconnect(e.destination),this.privMediaResources.scriptProcessorNode=null),this.privMediaResources.source&&(this.privMediaResources.source.disconnect(),this.privStopInputOnRelease&&this.privMediaResources.stream.getTracks().forEach((e=>e.stop())),this.privMediaResources.source=null))},this.privStopInputOnRelease=e}setWorkletUrl(e){this.privSpeechProcessorScript=e}}var wu={};e(wu,"WebsocketConnection",(()=>$u),(e=>$u=e));var xu={};e(xu,"WebsocketMessageAdapter",(()=>Xu),(e=>Xu=e));var Su=a("1DJXa"),Mu={};e(Mu,"CertCheckAgent",(()=>Ju),(e=>Ju=e));var _u,Au;Su=a("1DJXa");Au=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e};var Eu,Cu,ku={};e(ku,"stringify",(()=>Eu),(e=>Eu=e)),e(ku,"parse",(()=>Cu),(e=>Cu=e));var Tu=Object.prototype.hasOwnProperty;function Iu(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function Ou(e){try{return encodeURIComponent(e)}catch(e){return null}}Eu=function(e,t){t=t||"";var n,r,i=[];for(r in"string"!=typeof t&&(t="?"),e)if(Tu.call(e,r)){if((n=e[r])||null!=n&&!isNaN(n)||(n=""),r=Ou(r),n=Ou(n),null===r||null===n)continue;i.push(r+"="+n)}return i.length?t+i.join("&"):""},Cu=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,r={};t=n.exec(e);){var i=Iu(t[1]),o=Iu(t[2]);null===i||null===o||i in r||(r[i]=o)}return r};var Ru=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,Pu=/[\n\r\t]/g,Nu=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,Lu=/:\d+$/,Du=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,Bu=/^[a-zA-Z]:/;function ju(e){return(e||"").toString().replace(Ru,"")}var Fu=[["#","hash"],["?","query"],function(e,t){return Hu(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],Uu={hash:1,query:1};function zu(e){var n,r=("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{}).location||{},i={},o=typeof(e=e||r);if("blob:"===e.protocol)i=new Wu(unescape(e.pathname),{});else if("string"===o)for(n in i=new Wu(e,{}),Uu)delete i[n];else if("object"===o){for(n in e)n in Uu||(i[n]=e[n]);void 0===i.slashes&&(i.slashes=Nu.test(e.href))}return i}function Hu(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function Vu(e,t){e=(e=ju(e)).replace(Pu,""),t=t||{};var n,r=Du.exec(e),i=r[1]?r[1].toLowerCase():"",o=!!r[2],a=!!r[3],s=0;return o?a?(n=r[2]+r[3]+r[4],s=r[2].length+r[3].length):(n=r[2]+r[4],s=r[2].length):a?(n=r[3]+r[4],s=r[3].length):n=r[4],"file:"===i?s>=2&&(n=n.slice(2)):Hu(i)?n=r[4]:i?o&&(n=n.slice(2)):s>=2&&Hu(t.protocol)&&(n=r[4]),{protocol:i,slashes:o||Hu(i),slashesCount:s,rest:n}}function Wu(e,t,n){if(e=(e=ju(e)).replace(Pu,""),!(this instanceof Wu))return new Wu(e,t,n);var r,i,o,a,s,l,c=Fu.slice(),u=typeof t,d=this,f=0;for("object"!==u&&"string"!==u&&(n=t,t=null),n&&"function"!=typeof n&&(n=ku.parse),r=!(i=Vu(e||"",t=zu(t))).protocol&&!i.slashes,d.slashes=i.slashes||r&&t.slashes,d.protocol=i.protocol||t.protocol||"",e=i.rest,("file:"===i.protocol&&(2!==i.slashesCount||Bu.test(e))||!i.slashes&&(i.protocol||i.slashesCount<2||!Hu(d.protocol)))&&(c[3]=[/(.*)/,"pathname"]);f<c.length;f++)"function"!=typeof(a=c[f])?(o=a[0],l=a[1],o!=o?d[l]=e:"string"==typeof o?~(s="@"===o?e.lastIndexOf(o):e.indexOf(o))&&("number"==typeof a[2]?(d[l]=e.slice(0,s),e=e.slice(s+a[2])):(d[l]=e.slice(s),e=e.slice(0,s))):(s=o.exec(e))&&(d[l]=s[1],e=e.slice(0,s.index)),d[l]=d[l]||r&&a[3]&&t[l]||"",a[4]&&(d[l]=d[l].toLowerCase())):e=a(e,d);n&&(d.query=n(d.query)),r&&t.slashes&&"/"!==d.pathname.charAt(0)&&(""!==d.pathname||""!==t.pathname)&&(d.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,i=n[r-1],o=!1,a=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),a++):a&&(0===r&&(o=!0),n.splice(r,1),a--);return o&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(d.pathname,t.pathname)),"/"!==d.pathname.charAt(0)&&Hu(d.protocol)&&(d.pathname="/"+d.pathname),Au(d.port,d.protocol)||(d.host=d.hostname,d.port=""),d.username=d.password="",d.auth&&(~(s=d.auth.indexOf(":"))?(d.username=d.auth.slice(0,s),d.username=encodeURIComponent(decodeURIComponent(d.username)),d.password=d.auth.slice(s+1),d.password=encodeURIComponent(decodeURIComponent(d.password))):d.username=encodeURIComponent(decodeURIComponent(d.auth)),d.auth=d.password?d.username+":"+d.password:d.username),d.origin="file:"!==d.protocol&&Hu(d.protocol)&&d.host?d.protocol+"//"+d.host:"null",d.href=d.toString()}Wu.prototype={set:function(e,t,n){var r=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||ku.parse)(t)),r[e]=t;break;case"port":r[e]=t,Au(t,r.protocol)?t&&(r.host=r.hostname+":"+t):(r.host=r.hostname,r[e]="");break;case"hostname":r[e]=t,r.port&&(t+=":"+r.port),r.host=t;break;case"host":r[e]=t,Lu.test(t)?(t=t.split(":"),r.port=t.pop(),r.hostname=t.join(":")):(r.hostname=t,r.port="");break;case"protocol":r.protocol=t.toLowerCase(),r.slashes=!n;break;case"pathname":case"hash":if(t){var i="pathname"===e?"/":"#";r[e]=t.charAt(0)!==i?i+t:t}else r[e]=t;break;case"username":case"password":r[e]=encodeURIComponent(t);break;case"auth":var o=t.indexOf(":");~o?(r.username=t.slice(0,o),r.username=encodeURIComponent(decodeURIComponent(r.username)),r.password=t.slice(o+1),r.password=encodeURIComponent(decodeURIComponent(r.password))):r.username=encodeURIComponent(decodeURIComponent(t))}for(var a=0;a<Fu.length;a++){var s=Fu[a];s[4]&&(r[s[1]]=r[s[1]].toLowerCase())}return r.auth=r.password?r.username+":"+r.password:r.username,r.origin="file:"!==r.protocol&&Hu(r.protocol)&&r.host?r.protocol+"//"+r.host:"null",r.href=r.toString(),r},toString:function(e){e&&"function"==typeof e||(e=ku.stringify);var t,n=this,r=n.host,i=n.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var o=i+(n.protocol&&n.slashes||Hu(n.protocol)?"//":"");return n.username?(o+=n.username,n.password&&(o+=":"+n.password),o+="@"):n.password?(o+=":"+n.password,o+="@"):"file:"!==n.protocol&&Hu(n.protocol)&&!r&&"/"!==n.pathname&&(o+="@"),(":"===r[r.length-1]||Lu.test(n.hostname)&&!n.port)&&(r+=":"),o+=r+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(o+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(o+=n.hash),o}},Wu.extractProtocol=Vu,Wu.location=zu,Wu.trimLeft=ju,Wu.qs=ku,_u=Wu;var Gu=a("5U18c"),qu=(Su=a("1DJXa"),Su=a("1DJXa"),Su=a("1DJXa"),Su=a("1DJXa"),a("ePtPP")),Ku=a("bqBrJ").Buffer,Yu=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class Ju{constructor(e){e&&(this.privProxyInfo=e),Ju.privDiskCache||(Ju.privDiskCache=new(r(Su))("microsoft-cognitiveservices-speech-sdk-cache",{supportBuffer:!0,location:void 0}))}static forceReinitDiskCache(){Ju.privDiskCache=void 0,Ju.privMemCache={}}GetAgent(e){const t=new(r(Su).Agent)(this.CreateConnection);if(void 0!==this.privProxyInfo&&void 0!==this.privProxyInfo.HostName&&this.privProxyInfo.Port>0){t["privProxyInfo"]=this.privProxyInfo}return t}static GetProxyAgent(e){const t={host:e.HostName,port:e.Port};e.UserName?t.headers={"Proxy-Authentication":"Basic "+new Ku(e.UserName+":"+(void 0===e.Password)?"":e.Password).toString("base64")}:t.headers={},t.headers.requestOCSP="true";return new(r(Su))(t)}static OCSPCheck(e,t){return Yu(this,void 0,void 0,(function*(){let n,r,i=!1;const o=yield e;o.cork();const a=o;return new Promise(((e,s)=>{o.on("OCSPResponse",(e=>{e&&(this.onEvent(new Hs),r=e)})),o.on("error",(e=>{i||(i=!0,o.destroy(),s(e))})),a.on("secure",(()=>Yu(this,void 0,void 0,(function*(){const l=a.getPeerCertificate(!0);try{const a=yield this.GetIssuer(l);n=Gu.request.generate(l.raw,a.raw);const s=n.id.toString("hex");if(!r){const e=yield Ju.GetResponseFromCache(s,n,t);r=e}yield this.VerifyOCSPResponse(r,n,t),o.uncork(),i=!0,e(o)}catch(e){o.destroy(),i=!0,s(e)}}))))}))}))}static GetIssuer(e){return e.issuerCertificate?Promise.resolve(e.issuerCertificate):new Promise(((t,n)=>{new Gu.Agent({}).fetchIssuer(e,null,((e,r)=>{e?n(e):t(r)}))}))}static GetResponseFromCache(e,t,n){return Yu(this,void 0,void 0,(function*(){let r=Ju.privMemCache[e];if(r&&this.onEvent(new Ls(e)),!r)try{const t=yield Ju.privDiskCache.get(e);t.isCached&&(Ju.onEvent(new Bs(e)),Ju.StoreMemoryCacheEntry(e,t.value),r=t.value)}catch(e){r=null}if(!r)return r;try{const i=Gu.utils.parseResponse(r).value.tbsResponseData;if(i.responses.length<1)return void this.onEvent(new Ks(e,"Not enough data in cached response"));const o=i.responses[0].thisUpdate,a=i.responses[0].nextUpdate;if(a<Date.now()+this.testTimeOffset-6e4)this.onEvent(new Vs(e,a)),r=null;else{const r=Math.min(864e5,(a-o)/2);a-(Date.now()+this.testTimeOffset)<r?(this.onEvent(new Ws(e,o,a)),this.UpdateCache(t,n).catch((t=>{this.onEvent(new Js(e,t.toString()))}))):this.onEvent(new Gs(e,o,a))}}catch(t){this.onEvent(new Ks(e,t)),r=null}return r||this.onEvent(new Ds(e)),r}))}static VerifyOCSPResponse(e,t,n){return Yu(this,void 0,void 0,(function*(){let r=e;t.certID.toString("hex");return r||(r=yield Ju.GetOCSPResponse(t,n)),new Promise(((i,o)=>{Gu.verify({request:t,response:r},((a,s)=>{a?(Ju.onEvent(new qs(t.id.toString("hex"),a)),e?this.VerifyOCSPResponse(null,t,n).then((()=>{i()}),(e=>{o(e)})):o(a)):(e||Ju.StoreCacheEntry(t.id.toString("hex"),r),i())}))}))}))}static UpdateCache(e,t){return Yu(this,void 0,void 0,(function*(){const n=e.id.toString("hex");this.onEvent(new js(n));const r=yield this.GetOCSPResponse(e,t);this.StoreCacheEntry(n,r),this.onEvent(new zs(e.id.toString("hex")))}))}static StoreCacheEntry(e,t){this.StoreMemoryCacheEntry(e,t),this.StoreDiskCacheEntry(e,t)}static StoreMemoryCacheEntry(e,t){this.privMemCache[e]=t,this.onEvent(new Fs(e))}static StoreDiskCacheEntry(e,t){this.privDiskCache.set(e,t).then((()=>{this.onEvent(new Us(e))}))}static GetOCSPResponse(e,t){let n={};if(t){const e=Ju.GetProxyAgent(t);n.agent=e}return new Promise(((t,i)=>{Gu.utils.getAuthorityInfo(e.cert,"1.3.6.1.5.5.7.48.1",((o,a)=>{if(o)return void i(o);const s=r(_u)(a);s.path=s.pathname,n=Object.assign(Object.assign({},n),s),Gu.utils.getResponse(n,e.data,((n,r)=>{n?i(n):(this.onEvent(new Ys(e.certID.toString("hex"))),t(r))}))}))}))}CreateConnection(e,t){const n=void 0!==qu&&t.secureEndpoint;let r;if(t=Object.assign(Object.assign({},t),{requestOCSP:!Ju.forceDisableOCSPStapling,servername:t.host}),this.privProxyInfo){const n=Ju.GetProxyAgent(this.privProxyInfo);r=new Promise(((r,i)=>{n.callback(e,t,((e,t)=>{e?i(e):r(t)}))}))}else r=(t.secureEndpoint,Promise.resolve(Su.connect(t)));return n?Ju.OCSPCheck(r,this.privProxyInfo):r}}Ju.testTimeOffset=0,Ju.forceDisableOCSPStapling=!1,Ju.privMemCache={},Ju.onEvent=e=>{gs.instance.onEvent(e)};var Qu=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class Xu{constructor(e,t,n,i,o,a){if(this.open=()=>{if(this.privConnectionState===Ua.Disconnected)return Promise.reject(`Cannot open a connection that is in ${this.privConnectionState} state`);if(this.privConnectionEstablishDeferral)return this.privConnectionEstablishDeferral.promise;this.privConnectionEstablishDeferral=new vs,this.privCertificateValidatedDeferral=new vs,this.privConnectionState=Ua.Connecting;try{if("undefined"==typeof WebSocket||Xu.forceNpmWebSocket){const e={headers:this.privHeaders,perMessageDeflate:this.privEnableCompression};this.privCertificateValidatedDeferral.resolve();const t=new(0,Mu.CertCheckAgent)(this.proxyInfo);e.agent=t.GetAgent();let n=new URL(this.privUri).protocol;"wss:"===(null==n?void 0:n.toLocaleLowerCase())?n="https:":"ws:"===(null==n?void 0:n.toLocaleLowerCase())&&(n="http:"),e.agent.protocol=n,this.privWebsocketClient=new(r(Su))(this.privUri,e)}else this.privCertificateValidatedDeferral.resolve(),this.privWebsocketClient=new WebSocket(this.privUri);this.privWebsocketClient.binaryType="arraybuffer",this.privReceivingMessageQueue=new(0,bs.Queue),this.privDisconnectDeferral=new vs,this.privSendMessageQueue=new(0,bs.Queue),this.processSendQueue().catch((e=>{gs.instance.onEvent(new Qs(e))}))}catch(e){return this.privConnectionEstablishDeferral.resolve(new ps(500,e)),this.privConnectionEstablishDeferral.promise}return this.onEvent(new rs(this.privConnectionId,this.privUri)),this.privWebsocketClient.onopen=e=>{this.privCertificateValidatedDeferral.promise.then((()=>{this.privConnectionState=Ua.Connected,this.onEvent(new is(this.privConnectionId)),this.privConnectionEstablishDeferral.resolve(new ps(200,""))}),(e=>{this.privConnectionEstablishDeferral.reject(e)}))},this.privWebsocketClient.onerror=e=>{this.onEvent(new as(this.privConnectionId,e.message,e.type)),this.privLastErrorReceived=e.message},this.privWebsocketClient.onclose=e=>{this.privConnectionState===Ua.Connecting?(this.privConnectionState=Ua.Disconnected,this.privConnectionEstablishDeferral.resolve(new ps(e.code,e.reason+" "+this.privLastErrorReceived))):(this.privConnectionState=Ua.Disconnected,this.privWebsocketClient=null,this.onEvent(new os(this.privConnectionId,e.code,e.reason))),this.onClose(e.code,e.reason).catch((e=>{gs.instance.onEvent(new Qs(e))}))},this.privWebsocketClient.onmessage=e=>{const t=(new Date).toISOString();if(this.privConnectionState===Ua.Connected){const n=new vs;if(this.privReceivingMessageQueue.enqueueFromPromise(n.promise),e.data instanceof ArrayBuffer){const r=new As(ja.Binary,e.data);this.privMessageFormatter.toConnectionMessage(r).then((e=>{this.onEvent(new ls(this.privConnectionId,t,e)),n.resolve(e)}),(e=>{n.reject(`Invalid binary message format. Error: ${e}`)}))}else{const r=new As(ja.Text,e.data);this.privMessageFormatter.toConnectionMessage(r).then((e=>{this.onEvent(new ls(this.privConnectionId,t,e)),n.resolve(e)}),(e=>{n.reject(`Invalid text message format. Error: ${e}`)}))}}},this.privConnectionEstablishDeferral.promise},this.send=e=>{if(this.privConnectionState!==Ua.Connected)return Promise.reject(`Cannot send on connection that is in ${Ua[this.privConnectionState]} state`);const t=new vs,n=new vs;return this.privSendMessageQueue.enqueueFromPromise(n.promise),this.privMessageFormatter.fromConnectionMessage(e).then((r=>{n.resolve({Message:e,RawWebsocketMessage:r,sendStatusDeferral:t})}),(e=>{n.reject(`Error formatting the message. ${e}`)})),t.promise},this.read=()=>this.privConnectionState!==Ua.Connected?Promise.reject(`Cannot read on connection that is in ${this.privConnectionState} state`):this.privReceivingMessageQueue.dequeue(),this.close=e=>this.privWebsocketClient?(this.privConnectionState!==Ua.Disconnected&&this.privWebsocketClient.close(1e3,e||"Normal closure by client"),this.privDisconnectDeferral.promise):Promise.resolve(),this.sendRawMessage=e=>{try{return e?(this.onEvent(new cs(this.privConnectionId,(new Date).toISOString(),e.Message)),this.isWebsocketOpen?(this.privWebsocketClient.send(e.RawWebsocketMessage.payload),Promise.resolve()):Promise.reject("websocket send error: Websocket not ready "+this.privConnectionId+" "+e.Message.id+" "+(new Error).stack)):Promise.resolve()}catch(e){return Promise.reject(`websocket send error: ${e}`)}},this.onEvent=e=>{this.privConnectionEvents.onEvent(e),gs.instance.onEvent(e)},!e)throw new us("uri");if(!n)throw new us("messageFormatter");this.proxyInfo=i,this.privConnectionEvents=new ms,this.privConnectionId=t,this.privMessageFormatter=n,this.privConnectionState=Ua.None,this.privUri=e,this.privHeaders=o,this.privEnableCompression=a,this.privHeaders[Zs.ConnectionId]=this.privConnectionId,this.privLastErrorReceived=""}get state(){return this.privConnectionState}get events(){return this.privConnectionEvents}onClose(e,t){return Qu(this,void 0,void 0,(function*(){const n=`Connection closed. ${e}: ${t}`;this.privConnectionState=Ua.Disconnected,this.privDisconnectDeferral.resolve(),yield this.privReceivingMessageQueue.drainAndDispose((e=>{}),n),yield this.privSendMessageQueue.drainAndDispose((e=>{e.sendStatusDeferral.reject(n)}),n)}))}processSendQueue(){return Qu(this,void 0,void 0,(function*(){for(;;){const e=this.privSendMessageQueue.dequeue(),t=yield e;if(!t)return;try{yield this.sendRawMessage(t),t.sendStatusDeferral.resolve()}catch(e){t.sendStatusDeferral.reject(e)}}}))}get isWebsocketOpen(){return this.privWebsocketClient&&this.privWebsocketClient.readyState===this.privWebsocketClient.OPEN}}Xu.forceNpmWebSocket=!1;var Zu=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class $u{constructor(e,t,n,r,i,o=!1,a){if(this.privIsDisposed=!1,this.isDisposed=()=>this.privIsDisposed,this.state=()=>this.privConnectionMessageAdapter.state,this.open=()=>this.privConnectionMessageAdapter.open(),this.send=e=>this.privConnectionMessageAdapter.send(e),this.read=()=>this.privConnectionMessageAdapter.read(),!e)throw new us("uri");if(!r)throw new us("messageFormatter");this.privMessageFormatter=r;let s="",l=0;if(t)for(const n in t)if(n){s+=0===l&&-1===e.indexOf("?")?"?":"&";s+=`${n}=${encodeURIComponent(t[n])}`,l++}if(n)for(const t in n)if(t){s+=0===l&&-1===e.indexOf("?")?"?":"&";s+=`${t}=${encodeURIComponent(n[t])}`,l++}this.privUri=e+s,this.privId=a||La(),this.privConnectionMessageAdapter=new(0,xu.WebsocketMessageAdapter)(this.privUri,this.id,this.privMessageFormatter,i,n,o)}dispose(){return Zu(this,void 0,void 0,(function*(){this.privIsDisposed=!0,this.privConnectionMessageAdapter&&(yield this.privConnectionMessageAdapter.close())}))}get id(){return this.privId}get events(){return this.privConnectionMessageAdapter.events}}class ed{constructor(e,t){this.privBuffers=[],this.privReplayOffset=0,this.privLastShrinkOffset=0,this.privBufferStartOffset=0,this.privBufferSerial=0,this.privBufferedBytes=0,this.privReplay=!1,this.privLastChunkAcquiredTime=0,this.id=()=>this.privAudioNode.id(),this.privAudioNode=e,this.privBytesPerSecond=t}read(){if(this.privReplay&&0!==this.privBuffers.length){const e=this.privReplayOffset-this.privBufferStartOffset;let t=Math.round(e*this.privBytesPerSecond*1e-7);0!=t%2&&t++;let n=0;for(;n<this.privBuffers.length&&t>=this.privBuffers[n].chunk.buffer.byteLength;)t-=this.privBuffers[n++].chunk.buffer.byteLength;if(n<this.privBuffers.length){const e=this.privBuffers[n].chunk.buffer.slice(t);return this.privReplayOffset+=e.byteLength/this.privBytesPerSecond*1e7,n===this.privBuffers.length-1&&(this.privReplay=!1),Promise.resolve({buffer:e,isEnd:!1,timeReceived:this.privBuffers[n].chunk.timeReceived})}}return this.privAudioNode.read().then((e=>(e&&e.buffer&&(this.privBuffers.push(new td(e,this.privBufferSerial++,this.privBufferedBytes)),this.privBufferedBytes+=e.buffer.byteLength),e)))}detach(){return this.privBuffers=void 0,this.privAudioNode.detach()}replay(){this.privBuffers&&0!==this.privBuffers.length&&(this.privReplay=!0,this.privReplayOffset=this.privLastShrinkOffset)}shrinkBuffers(e){if(void 0===this.privBuffers||0===this.privBuffers.length)return;this.privLastShrinkOffset=e;const t=e-this.privBufferStartOffset;let n=Math.round(t*this.privBytesPerSecond*1e-7),r=0;for(;r<this.privBuffers.length&&n>=this.privBuffers[r].chunk.buffer.byteLength;)n-=this.privBuffers[r++].chunk.buffer.byteLength;this.privBufferStartOffset=Math.round(e-n/this.privBytesPerSecond*1e7),this.privBuffers=this.privBuffers.slice(r)}findTimeAtOffset(e){if(e<this.privBufferStartOffset||void 0===this.privBuffers)return 0;for(const t of this.privBuffers){const n=t.byteOffset/this.privBytesPerSecond*1e7,r=n+t.chunk.buffer.byteLength/this.privBytesPerSecond*1e7;if(e>=n&&e<=r)return t.chunk.timeReceived}return 0}}class td{constructor(e,t,n){this.chunk=e,this.serial=t,this.byteOffset=n}}class nd{constructor(e,t,n,r){this.privProxyHostName=e,this.privProxyPort=t,this.privProxyUserName=n,this.privProxyPassword=r}static fromParameters(e){return new nd(e.getProperty(sl.SpeechServiceConnection_ProxyHostName),parseInt(e.getProperty(sl.SpeechServiceConnection_ProxyPort),10),e.getProperty(sl.SpeechServiceConnection_ProxyUserName),e.getProperty(sl.SpeechServiceConnection_ProxyPassword))}static fromRecognizerConfig(e){return this.fromParameters(e.parameters)}get HostName(){return this.privProxyHostName}get Port(){return this.privProxyPort}get UserName(){return this.privProxyUserName}get Password(){return this.privProxyPassword}}var rd={};e(rd,"RestRequestType",(()=>ld),(e=>ld=e)),e(rd,"RestMessageAdapter",(()=>dd),(e=>dd=e));var id,od;const ad=new Set(["json","buffer","string"]);od=e=>(...t)=>{const n=new Set;let r,i,o,a="";return t.forEach((e=>{if("string"==typeof e)if(e.toUpperCase()===e){if(r){throw new Error(`Can't set method to ${e}, already set to ${r}.`)}r=e}else if(e.startsWith("http:")||e.startsWith("https:"))a=e;else{if(!ad.has(e))throw new Error(`Unknown encoding, ${e}`);i=e}else if("number"==typeof e)n.add(e);else{if("object"!=typeof e)throw new Error("Unknown type: "+typeof e);if(Array.isArray(e)||e instanceof Set)e.forEach((e=>n.add(e)));else{if(o)throw new Error("Cannot set headers twice.");o=e}}})),r||(r="GET"),0===n.size&&n.add(200),e(n,r,i,o,a)};class sd extends Error{constructor(e,...t){let n;super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,sd),this.name="StatusError",this.message=e.statusMessage,this.statusCode=e.status,this.res=e,this.json=e.json.bind(e),this.text=e.text.bind(e),this.arrayBuffer=e.arrayBuffer.bind(e);Object.defineProperty(this,"responseBody",{get:()=>(n||(n=this.arrayBuffer()),n)}),this.headers={};for(const[t,n]of e.headers.entries())this.headers[t.toLowerCase()]=n}}id=od(((e,t,n,r,i)=>async(o,a,s={})=>{o=i+(o||"");let l=new URL(o);if(r||(r={}),l.username&&(r.Authorization="Basic "+btoa(l.username+":"+l.password),l=new URL(l.protocol+"//"+l.host+l.pathname+l.search)),"https:"!==l.protocol&&"http:"!==l.protocol)throw new Error(`Unknown protocol, ${l.protocol}`);if(a)if(a instanceof ArrayBuffer||ArrayBuffer.isView(a)||"string"==typeof a);else{if("object"!=typeof a)throw new Error("Unknown body type.");a=JSON.stringify(a),r["Content-Type"]="application/json"}s=new Headers({...r||{},...s});const c=await fetch(l,{method:t,headers:s,body:a});if(c.statusCode=c.status,!e.has(c.status))throw new sd(c);return"json"===n?c.json():"buffer"===n?c.arrayBuffer():"string"===n?c.text():c}));var ld,cd,ud=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};(cd=ld||(ld={})).Get="GET",cd.Post="POST",cd.Delete="DELETE",cd.File="file";class dd{constructor(e){if(!e)throw new us("configParams");this.privHeaders=e.headers,this.privIgnoreCache=e.ignoreCache}static extractHeaderValue(e,t){let n="";try{const r=t.trim().split(/[\r\n]+/),i={};r.forEach((e=>{const t=e.split(": "),n=t.shift().toLowerCase(),r=t.join(": ");i[n]=r})),n=i[e.toLowerCase()]}catch(e){}return n}set options(e){this.privHeaders=e.headers,this.privIgnoreCache=e.ignoreCache}setHeaders(e,t){this.privHeaders[e]=t}request(e,t,n={},i=null,o=null){const a=new vs,s=e===ld.File?"POST":e,l=(e,t={})=>{const n=e;return{data:JSON.stringify(t),headers:JSON.stringify(e.headers),json:t,ok:e.statusCode>=200&&e.statusCode<300,status:e.statusCode,statusText:t.error?t.error.message:n.statusText?n.statusText:n.statusMessage}},c=i=>{r(id)(t,s,this.privHeaders,200,201,202,204,400,401,402,403,404)(""===this.queryParams(n)?"":"?"+this.queryParams(n),i).then((t=>ud(this,void 0,void 0,(function*(){if(e===ld.Delete||204===t.statusCode)a.resolve(l(t));else try{const e=yield t.json();a.resolve(l(t,e))}catch(e){a.resolve(l(t))}})))).catch((e=>{a.reject(e)}))};if(this.privIgnoreCache&&(this.privHeaders["Cache-Control"]="no-cache"),e===ld.File&&o){const e="multipart/form-data";this.privHeaders["content-type"]=e,this.privHeaders["Content-Type"]=e,"undefined"!=typeof Blob&&o instanceof Blob?(e=>{const t=new FileReader;return t.readAsArrayBuffer(e),new Promise((e=>{t.onloadend=()=>{e(t.result)}}))})(o).then((e=>{c(e)})).catch((e=>{a.reject(e)})):c(o)}else e===ld.Post&&i&&(this.privHeaders["content-type"]="application/json",this.privHeaders["Content-Type"]="application/json"),c(i);return a.promise}withQuery(e,t={}){const n=this.queryParams(t);return n?e+(-1===e.indexOf("?")?"?":"&")+n:e}queryParams(e={}){return Object.keys(e).map((t=>encodeURIComponent(t)+"="+encodeURIComponent(e[t]))).join("&")}}class fd{static get requestOptions(){return fd.privDefaultRequestOptions}static get configParams(){return fd.privDefaultParams}static get restErrors(){return fd.privRestErrors}}fd.privDefaultRequestOptions={headers:{Accept:"application/json"},ignoreCache:!1,timeout:1e4},fd.privRestErrors={authInvalidSubscriptionKey:"You must specify either an authentication token to use, or a Cognitive Speech subscription key.",authInvalidSubscriptionRegion:"You must specify the Cognitive Speech region to use.",invalidArgs:"Required input not found: {arg}.",invalidCreateJoinConversationResponse:"Creating/Joining conversation failed with HTTP {status}.",invalidParticipantRequest:"The requested participant was not found.",permissionDeniedConnect:"Required credentials not found.",permissionDeniedConversation:"Invalid operation: only the host can {command} the conversation.",permissionDeniedParticipant:"Invalid operation: only the host can {command} a participant.",permissionDeniedSend:"Invalid operation: the conversation is not in a connected state.",permissionDeniedStart:"Invalid operation: there is already an active conversation."},fd.privDefaultParams={apiVersion:"api-version",authorization:"Authorization",clientAppId:"X-ClientAppId",contentTypeKey:"Content-Type",correlationId:"X-CorrelationId",languageCode:"language",nickname:"nickname",profanity:"profanity",requestId:"X-RequestId",roomId:"roomid",sessionToken:"token",subscriptionKey:"Ocp-Apim-Subscription-Key",subscriptionRegion:"Ocp-Apim-Subscription-Region",token:"X-CapitoToken"};class hd{}var pd={};e(pd,"AudioInputStream",(()=>vd),(e=>vd=e)),e(pd,"PullAudioInputStreamImpl",(()=>xd),(e=>xd=e));var md=a("bqBrJ").Buffer,gd=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class vd{constructor(){}static createPushStream(e){return yd.create(e)}static createPullStream(e,t){return wd.create(e,t)}}class yd extends vd{static create(e){return new bd(e)}}class bd extends yd{constructor(e){super(),this.onEvent=e=>{this.privEvents.onEvent(e),gs.instance.onEvent(e)},this.privFormat=void 0===e?Mc.getDefaultInputFormat():e,this.privEvents=new ms,this.privId=La(),this.privStream=new Rs(this.privFormat.avgBytesPerSec/10)}get format(){return Promise.resolve(this.privFormat)}write(e){this.privStream.writeStreamChunk({buffer:e,isEnd:!1,timeReceived:Date.now()})}close(){this.privStream.close()}id(){return this.privId}get blob(){return this.attach("id").then((e=>{const t=[];let n=md.from("");const r=()=>e.read().then((e=>!e||e.isEnd?"undefined"!=typeof XMLHttpRequest&&"undefined"!=typeof Blob?Promise.resolve(new Blob(t)):Promise.resolve(md.from(n)):("undefined"!=typeof Blob?t.push(e.buffer):n=md.concat([n,this.toBuffer(e.buffer)]),r())));return r()}))}turnOn(){this.onEvent(new qa(this.privId)),this.onEvent(new Ka(this.privId))}attach(e){return gd(this,void 0,void 0,(function*(){this.onEvent(new Xa(this.privId,e)),yield this.turnOn();const t=this.privStream;return this.onEvent(new Za(this.privId,e)),{detach:()=>gd(this,void 0,void 0,(function*(){return this.onEvent(new $a(this.privId,e)),this.turnOff()})),id:()=>e,read:()=>t.read()}}))}detach(e){this.onEvent(new $a(this.privId,e))}turnOff(){}get events(){return this.privEvents}get deviceInfo(){return Promise.resolve({bitspersample:this.privFormat.bitsPerSample,channelcount:this.privFormat.channels,connectivity:vl.Unknown,manufacturer:"Speech SDK",model:"PushStream",samplerate:this.privFormat.samplesPerSec,type:bl.Stream})}toBuffer(e){const t=md.alloc(e.byteLength),n=new Uint8Array(e);for(let e=0;e<t.length;++e)t[e]=n[e];return t}}class wd extends vd{constructor(){super()}static create(e,t){return new xd(e,t)}}class xd extends wd{constructor(e,t){super(),this.onEvent=e=>{this.privEvents.onEvent(e),gs.instance.onEvent(e)},this.privFormat=void 0===t?Sc.getDefaultInputFormat():t,this.privEvents=new ms,this.privId=La(),this.privCallback=e,this.privIsClosed=!1,this.privBufferSize=this.privFormat.avgBytesPerSec/10}get format(){return Promise.resolve(this.privFormat)}close(){this.privIsClosed=!0,this.privCallback.close()}id(){return this.privId}get blob(){return Promise.reject("Not implemented")}turnOn(){this.onEvent(new qa(this.privId)),this.onEvent(new Ka(this.privId))}attach(e){return gd(this,void 0,void 0,(function*(){return this.onEvent(new Xa(this.privId,e)),yield this.turnOn(),this.onEvent(new Za(this.privId,e)),{detach:()=>(this.privCallback.close(),this.onEvent(new $a(this.privId,e)),this.turnOff()),id:()=>e,read:()=>{let e,t=0;for(;t<this.privBufferSize;){const n=new ArrayBuffer(this.privBufferSize-t),r=this.privCallback.read(n);if(void 0===e)e=n;else{new Int8Array(e).set(new Int8Array(n),t)}if(0===r)break;t+=r}return Promise.resolve({buffer:e.slice(0,t),isEnd:this.privIsClosed||0===t,timeReceived:Date.now()})}}}))}detach(e){this.onEvent(new $a(this.privId,e))}turnOff(){}get events(){return this.privEvents}get deviceInfo(){return Promise.resolve({bitspersample:this.privFormat.bitsPerSample,channelcount:this.privFormat.channels,connectivity:vl.Unknown,manufacturer:"Speech SDK",model:"PullStream",samplerate:this.privFormat.samplesPerSec,type:bl.Stream})}}var Sd={};e(Sd,"SpeakerAudioDestination",(()=>Ad),(e=>Ad=e));var Md=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const _d={[hc.PCM]:"audio/wav",[hc.MuLaw]:"audio/x-wav",[hc.MP3]:"audio/mpeg",[hc.OGG_OPUS]:"audio/ogg",[hc.WEBM_OPUS]:"audio/webm; codecs=opus",[hc.ALaw]:"audio/x-wav",[hc.FLAC]:"audio/flac"};class Ad{constructor(e){this.privPlaybackStarted=!1,this.privAppendingToBuffer=!1,this.privMediaSourceOpened=!1,this.privBytesReceived=0,this.privId=e||La(),this.privIsPaused=!1,this.privIsClosed=!1}id(){return this.privId}write(e,t,n){void 0!==this.privAudioBuffer?(this.privAudioBuffer.push(e),this.updateSourceBuffer().then((()=>{t&&t()}),(e=>{n&&n(e)}))):void 0!==this.privAudioOutputStream&&(this.privAudioOutputStream.write(e),this.privBytesReceived+=e.byteLength)}close(e,t){if(this.privIsClosed=!0,void 0!==this.privSourceBuffer)this.handleSourceBufferUpdateEnd().then((()=>{e&&e()}),(e=>{t&&t(e)}));else if(void 0!==this.privAudioOutputStream)if(this.privFormat.formatTag!==hc.PCM&&this.privFormat.formatTag!==hc.MuLaw&&this.privFormat.formatTag!==hc.ALaw||!1!==this.privFormat.hasHeader){let n=new ArrayBuffer(this.privBytesReceived);this.privAudioOutputStream.read(n).then((r=>{n=Hc.SynthesisAdapterBase.addHeader(n,this.privFormat);const i=new Blob([n],{type:_d[this.privFormat.formatTag]});this.privAudio.src=window.URL.createObjectURL(i),this.notifyPlayback().then((()=>{e&&e()}),(e=>{t&&t(e)}))}),(e=>{t&&t(e)}))}else console.warn("Play back is not supported for raw PCM, mulaw or alaw format without header."),this.onAudioEnd&&this.onAudioEnd(this);else this.onAudioEnd&&this.onAudioEnd(this)}set format(e){if("undefined"!=typeof AudioContext||void 0!==window.webkitAudioContext){this.privFormat=e;const t=_d[this.privFormat.formatTag];void 0===t?console.warn(`Unknown mimeType for format ${hc[this.privFormat.formatTag]}; playback is not supported.`):"undefined"!=typeof MediaSource&&MediaSource.isTypeSupported(t)?(this.privAudio=new Audio,this.privAudioBuffer=[],this.privMediaSource=new MediaSource,this.privAudio.src=URL.createObjectURL(this.privMediaSource),this.privAudio.load(),this.privMediaSource.onsourceopen=e=>{this.privMediaSourceOpened=!0,this.privMediaSource.duration=1800,this.privSourceBuffer=this.privMediaSource.addSourceBuffer(t),this.privSourceBuffer.onupdate=e=>{this.updateSourceBuffer().catch((e=>{gs.instance.onEvent(new Qs(e))}))},this.privSourceBuffer.onupdateend=e=>{this.handleSourceBufferUpdateEnd().catch((e=>{gs.instance.onEvent(new Qs(e))}))},this.privSourceBuffer.onupdatestart=e=>{this.privAppendingToBuffer=!1}},this.updateSourceBuffer().catch((e=>{gs.instance.onEvent(new Qs(e))}))):(console.warn(`Format ${hc[this.privFormat.formatTag]} could not be played by MSE, streaming playback is not enabled.`),this.privAudioOutputStream=new(0,kc.PullAudioOutputStreamImpl),this.privAudioOutputStream.format=this.privFormat,this.privAudio=new Audio)}}get volume(){return this.privAudio.volume}set volume(e){this.privAudio.volume=e}mute(){this.privAudio.muted=!0}unmute(){this.privAudio.muted=!1}get isClosed(){return this.privIsClosed}get currentTime(){return void 0!==this.privAudio?this.privAudio.currentTime:-1}pause(){this.privIsPaused||void 0===this.privAudio||(this.privAudio.pause(),this.privIsPaused=!0)}resume(e,t){this.privIsPaused&&void 0!==this.privAudio&&(this.privAudio.play().then((()=>{e&&e()}),(e=>{t&&t(e)})),this.privIsPaused=!1)}get internalAudio(){return this.privAudio}updateSourceBuffer(){return Md(this,void 0,void 0,(function*(){if(void 0!==this.privAudioBuffer&&this.privAudioBuffer.length>0&&this.sourceBufferAvailable()){this.privAppendingToBuffer=!0;const e=this.privAudioBuffer.shift();try{this.privSourceBuffer.appendBuffer(e)}catch(t){return this.privAudioBuffer.unshift(e),void console.log("buffer filled, pausing addition of binaries until space is made")}yield this.notifyPlayback()}else this.canEndStream()&&(yield this.handleSourceBufferUpdateEnd())}))}handleSourceBufferUpdateEnd(){return Md(this,void 0,void 0,(function*(){this.canEndStream()&&this.sourceBufferAvailable()&&(this.privMediaSource.endOfStream(),yield this.notifyPlayback())}))}notifyPlayback(){return Md(this,void 0,void 0,(function*(){this.privPlaybackStarted||void 0===this.privAudio||(this.privPlaybackStarted=!0,this.onAudioStart&&this.onAudioStart(this),this.privAudio.onended=()=>{this.onAudioEnd&&this.onAudioEnd(this)},this.privIsPaused||(yield this.privAudio.play()))}))}canEndStream(){return this.isClosed&&void 0!==this.privSourceBuffer&&0===this.privAudioBuffer.length&&this.privMediaSourceOpened&&!this.privAppendingToBuffer&&"open"===this.privMediaSource.readyState}sourceBufferAvailable(){return void 0!==this.privSourceBuffer&&!this.privSourceBuffer.updating}}class Ed{}Su=a("1DJXa");class Cd{constructor(e){this.id=()=>this.privId,Hl.throwIfNullOrUndefined(Su.openSync,"\nFile System access not available, please use Push or PullAudioOutputStream"),this.privFd=Su.openSync(e,"w")}set format(e){Hl.throwIfNotUndefined(this.privAudioFormat,"format is already set"),this.privAudioFormat=e;let t=0;this.privAudioFormat.hasHeader&&(t=this.privAudioFormat.header.byteLength),void 0!==this.privFd&&(this.privWriteStream=Su.createWriteStream("",{fd:this.privFd,start:t,autoClose:!1}))}write(e){Hl.throwIfNullOrUndefined(this.privAudioFormat,"must set format before writing."),void 0!==this.privWriteStream&&this.privWriteStream.write(new Uint8Array(e.slice(0)))}close(){void 0!==this.privFd&&(this.privWriteStream.on("finish",(()=>{this.privAudioFormat.hasHeader&&(this.privAudioFormat.updateHeader(this.privWriteStream.bytesWritten),Su.writeSync(this.privFd,new Int8Array(this.privAudioFormat.header),0,this.privAudioFormat.header.byteLength,0)),Su.closeSync(this.privFd),this.privFd=void 0})),this.privWriteStream.end())}}class kd{static fromDefaultMicrophoneInput(){const e=new bu(!0);return new Td(new(0,Xs.MicAudioSource)(e))}static fromMicrophoneInput(e){const t=new bu(!0);return new Td(new(0,Xs.MicAudioSource)(t,e))}static fromWavFileInput(e,t="unnamedBuffer.wav"){return new Td(new(0,gu.FileAudioSource)(e,t))}static fromStreamInput(e){if(e instanceof hd)return new Td(new(0,pd.PullAudioInputStreamImpl)(e));if(e instanceof pd.AudioInputStream)return new Td(e);if("undefined"!=typeof MediaStream&&e instanceof MediaStream){const t=new bu(!1);return new Td(new(0,Xs.MicAudioSource)(t,null,null,e))}throw new Error("Not Supported Type")}static fromDefaultSpeakerOutput(){return new Id(new(0,Sd.SpeakerAudioDestination))}static fromSpeakerOutput(e){if(void 0===e)return kd.fromDefaultSpeakerOutput();if(e instanceof Sd.SpeakerAudioDestination)return new Id(e);throw new Error("Not Supported Type")}static fromAudioFileOutput(e){return new Id(new Cd(e))}static fromStreamOutput(e){if(e instanceof Ed)return new Id(new(0,kc.PushAudioOutputStreamImpl)(e));if(e instanceof kc.PushAudioOutputStream)return new Id(e);if(e instanceof kc.PullAudioOutputStream)return new Id(e);throw new Error("Not Supported Type")}}class Td extends kd{constructor(e){super(),this.privSource=e}get format(){return this.privSource.format}close(e,t){this.privSource.turnOff().then((()=>{e&&e()}),(e=>{t&&t(e)}))}id(){return this.privSource.id()}get blob(){return this.privSource.blob}turnOn(){return this.privSource.turnOn()}attach(e){return this.privSource.attach(e)}detach(e){return this.privSource.detach(e)}turnOff(){return this.privSource.turnOff()}get events(){return this.privSource.events}setProperty(e,t){if(Hl.throwIfNull(t,"value"),void 0===this.privSource.setProperty)throw new Error("This AudioConfig instance does not support setting properties.");this.privSource.setProperty(e,t)}getProperty(e,t){if(void 0!==this.privSource.getProperty)return this.privSource.getProperty(e,t);throw new Error("This AudioConfig instance does not support getting properties.")}get deviceInfo(){return this.privSource.deviceInfo}}class Id extends kd{constructor(e){super(),this.privDestination=e}set format(e){this.privDestination.format=e}write(e){this.privDestination.write(e)}close(){this.privDestination.close()}id(){return this.privDestination.id()}setProperty(e,t){throw new Error("This AudioConfig instance does not support setting properties.")}getProperty(e,t){throw new Error("This AudioConfig instance does not support getting properties.")}}var Od={};e(Od,"SpeechRecognizer",(()=>Dd),(e=>Dd=e));var Rd={};e(Rd,"Recognizer",(()=>Nd),(e=>Nd=e));var Pd=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class Nd{constructor(e,t,n){this.audioConfig=void 0!==e?e:kd.fromDefaultMicrophoneInput(),this.privDisposed=!1,this.privProperties=t.clone(),this.privConnectionFactory=n,this.implCommonRecognizerSetup()}close(e,t){Hl.throwIfDisposed(this.privDisposed),ys(this.dispose(!0),e,t)}get internalData(){return this.privReco}dispose(e){return Pd(this,void 0,void 0,(function*(){this.privDisposed||(this.privDisposed=!0,e&&this.privReco&&(yield this.privReco.audioSource.turnOff(),yield this.privReco.dispose()))}))}static get telemetryEnabled(){return cl.ServiceRecognizerBase.telemetryDataEnabled}static enableTelemetry(e){cl.ServiceRecognizerBase.telemetryDataEnabled=e}implCommonRecognizerSetup(){let e="undefined"!=typeof window?"Browser":"Node",t="unknown",n="unknown";"undefined"!=typeof navigator&&(e=e+"/"+navigator.platform,t=navigator.userAgent,n=navigator.appVersion);const r=this.createRecognizerConfig(new _l(new Al(new Cl(e,t,n))));this.privReco=this.createServiceRecognizer(Nd.getAuthFromProperties(this.privProperties),this.privConnectionFactory,this.audioConfig,r)}recognizeOnceAsyncImpl(e){return Pd(this,void 0,void 0,(function*(){Hl.throwIfDisposed(this.privDisposed);const t=new vs;yield this.implRecognizerStop(),yield this.privReco.recognize(e,t.resolve,t.reject);const n=yield t.promise;return yield this.implRecognizerStop(),n}))}startContinuousRecognitionAsyncImpl(e){return Pd(this,void 0,void 0,(function*(){Hl.throwIfDisposed(this.privDisposed),yield this.implRecognizerStop(),yield this.privReco.recognize(e,void 0,void 0)}))}stopContinuousRecognitionAsyncImpl(){return Pd(this,void 0,void 0,(function*(){Hl.throwIfDisposed(this.privDisposed),yield this.implRecognizerStop()}))}implRecognizerStop(){return Pd(this,void 0,void 0,(function*(){this.privReco&&(yield this.privReco.stopRecognizing())}))}static getAuthFromProperties(e){const t=e.getProperty(sl.SpeechServiceConnection_Key,void 0);return t&&""!==t?new el(t):new nl((t=>{const n=e.getProperty(sl.SpeechServiceAuthorization_Token,void 0);return Promise.resolve(n)}),(t=>{const n=e.getProperty(sl.SpeechServiceAuthorization_Token,void 0);return Promise.resolve(n)}))}}var Ld=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class Dd extends Rd.Recognizer{constructor(e,t){const n=e;Hl.throwIfNull(n,"speechConfig"),Hl.throwIfNullOrWhitespace(n.properties.getProperty(sl.SpeechServiceConnection_RecoLanguage),sl[sl.SpeechServiceConnection_RecoLanguage]),super(t,n.properties,new Fl),this.privDisposedRecognizer=!1}static FromConfig(e,t,n){const r=e;t.properties.mergeTo(r.properties);return new Dd(e,n)}get endpointId(){return Hl.throwIfDisposed(this.privDisposedRecognizer),this.properties.getProperty(sl.SpeechServiceConnection_EndpointId,"00000000-0000-0000-0000-000000000000")}get authorizationToken(){return this.properties.getProperty(sl.SpeechServiceAuthorization_Token)}set authorizationToken(e){Hl.throwIfNullOrWhitespace(e,"token"),this.properties.setProperty(sl.SpeechServiceAuthorization_Token,e)}get speechRecognitionLanguage(){return Hl.throwIfDisposed(this.privDisposedRecognizer),this.properties.getProperty(sl.SpeechServiceConnection_RecoLanguage)}get outputFormat(){return Hl.throwIfDisposed(this.privDisposedRecognizer),this.properties.getProperty(uu,Tl[Tl.Simple])===Tl[Tl.Simple]?Tl.Simple:Tl.Detailed}get properties(){return this.privProperties}recognizeOnceAsync(e,t){ys(this.recognizeOnceAsyncImpl(hl.Interactive),e,t)}startContinuousRecognitionAsync(e,t){ys(this.startContinuousRecognitionAsyncImpl(hl.Conversation),e,t)}stopContinuousRecognitionAsync(e,t){ys(this.stopContinuousRecognitionAsyncImpl(),e,t)}startKeywordRecognitionAsync(e,t,n){Hl.throwIfNull(e,"model"),n&&n("Not yet implemented.")}stopKeywordRecognitionAsync(e,t){e&&e()}close(e,t){Hl.throwIfDisposed(this.privDisposedRecognizer),ys(this.dispose(!0),e,t)}dispose(e){const t=Object.create(null,{dispose:{get:()=>super.dispose}});return Ld(this,void 0,void 0,(function*(){this.privDisposedRecognizer||(e&&(this.privDisposedRecognizer=!0,yield this.implRecognizerStop()),yield t.dispose.call(this,e))}))}createRecognizerConfig(e){return new Ml(e,this.properties)}createServiceRecognizer(e,t,n,r){return new(0,Yl.SpeechServiceRecognizer)(e,t,n,r,this)}}var Bd,jd,Fd,Ud,zd={};e(zd,"SpeechSynthesizer",(()=>Gd),(e=>Gd=e)),(jd=Bd||(Bd={}))[jd.Unknown=0]="Unknown",jd[jd.Female=1]="Female",jd[jd.Male=2]="Male",(Ud=Fd||(Fd={}))[Ud.OnlineNeural=1]="OnlineNeural",Ud[Ud.OnlineStandard=2]="OnlineStandard",Ud[Ud.OfflineNeural=3]="OfflineNeural",Ud[Ud.OfflineStandard=4]="OfflineStandard";class Hd{constructor(e){if(this.privStyleList=[],this.privVoicePath="",e&&(this.privName=e.Name,this.privLocale=e.Locale,this.privShortName=e.ShortName,this.privLocalName=e.LocalName,this.privVoiceType=e.VoiceType.endsWith("Standard")?Fd.OnlineStandard:Fd.OnlineNeural,this.privGender="Male"===e.Gender?Bd.Male:"Female"===e.Gender?Bd.Female:Bd.Unknown,e.StyleList&&Array.isArray(e.StyleList)))for(const t of e.StyleList)this.privStyleList.push(t)}get name(){return this.privName}get locale(){return this.privLocale}get shortName(){return this.privShortName}get localName(){return this.privLocalName}get gender(){return this.privGender}get voiceType(){return this.privVoiceType}get styleList(){return this.privStyleList}get voicePath(){return this.privVoicePath}}class Vd extends Wc{constructor(e,t){if(Array.isArray(t)){super(e,Ol.VoicesListRetrieved,void 0,new Vl),this.privVoices=[];for(const e of t)this.privVoices.push(new Hd(e))}else super(e,Ol.Canceled,t.errorDetails?t.errorDetails:"Error information unavailable",new Vl)}get voices(){return this.privVoices}}var Wd=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class Gd{constructor(e,t){const n=e;Hl.throwIfNull(n,"speechConfig"),null!==t&&(this.audioConfig=void 0===t?"undefined"==typeof window?void 0:kd.fromDefaultSpeakerOutput():t),this.privProperties=n.properties.clone(),this.privDisposed=!1,this.privSynthesizing=!1,this.privConnectionFactory=new Ul,this.synthesisRequestQueue=new(0,bs.Queue),this.implCommonSynthesizeSetup()}get authorizationToken(){return this.properties.getProperty(sl.SpeechServiceAuthorization_Token)}set authorizationToken(e){Hl.throwIfNullOrWhitespace(e,"token"),this.properties.setProperty(sl.SpeechServiceAuthorization_Token,e)}get properties(){return this.privProperties}get autoDetectSourceLanguage(){return"OpenRange"===this.properties.getProperty(sl.SpeechServiceConnection_AutoDetectSourceLanguages)}static FromConfig(e,t,n){const r=e;return t.properties.mergeTo(r.properties),new Gd(e,n)}buildSsml(e){const t={"af-ZA":"af-ZA-AdriNeural","am-ET":"am-ET-AmehaNeural","ar-AE":"ar-AE-FatimaNeural","ar-BH":"ar-BH-AliNeural","ar-DZ":"ar-DZ-AminaNeural","ar-EG":"ar-EG-SalmaNeural","ar-IQ":"ar-IQ-BasselNeural","ar-JO":"ar-JO-SanaNeural","ar-KW":"ar-KW-FahedNeural","ar-LY":"ar-LY-ImanNeural","ar-MA":"ar-MA-JamalNeural","ar-QA":"ar-QA-AmalNeural","ar-SA":"ar-SA-HamedNeural","ar-SY":"ar-SY-AmanyNeural","ar-TN":"ar-TN-HediNeural","ar-YE":"ar-YE-MaryamNeural","bg-BG":"bg-BG-BorislavNeural","bn-BD":"bn-BD-NabanitaNeural","ca-ES":"ca-ES-JoanaNeural","cs-CZ":"cs-CZ-AntoninNeural","cy-GB":"cy-GB-AledNeural","da-DK":"da-DK-ChristelNeural","de-AT":"de-AT-IngridNeural","de-CH":"de-CH-JanNeural","de-DE":"de-DE-KatjaNeural","el-GR":"el-GR-AthinaNeural","en-AU":"en-AU-NatashaNeural","en-CA":"en-CA-ClaraNeural","en-GB":"en-GB-LibbyNeural","en-HK":"en-HK-SamNeural","en-IE":"en-IE-ConnorNeural","en-IN":"en-IN-NeerjaNeural","en-KE":"en-KE-AsiliaNeural","en-NG":"en-NG-AbeoNeural","en-NZ":"en-NZ-MitchellNeural","en-PH":"en-PH-JamesNeural","en-SG":"en-SG-LunaNeural","en-TZ":"en-TZ-ElimuNeural","en-US":"en-US-JennyNeural","en-ZA":"en-ZA-LeahNeural","es-AR":"es-AR-ElenaNeural","es-BO":"es-BO-MarceloNeural","es-CL":"es-CL-CatalinaNeural","es-CO":"es-CO-GonzaloNeural","es-CR":"es-CR-JuanNeural","es-CU":"es-CU-BelkysNeural","es-DO":"es-DO-EmilioNeural","es-EC":"es-EC-AndreaNeural","es-ES":"es-ES-AlvaroNeural","es-GQ":"es-GQ-JavierNeural","es-GT":"es-GT-AndresNeural","es-HN":"es-HN-CarlosNeural","es-MX":"es-MX-DaliaNeural","es-NI":"es-NI-FedericoNeural","es-PA":"es-PA-MargaritaNeural","es-PE":"es-PE-AlexNeural","es-PR":"es-PR-KarinaNeural","es-PY":"es-PY-MarioNeural","es-SV":"es-SV-LorenaNeural","es-US":"es-US-AlonsoNeural","es-UY":"es-UY-MateoNeural","es-VE":"es-VE-PaolaNeural","et-EE":"et-EE-AnuNeural","fa-IR":"fa-IR-DilaraNeural","fi-FI":"fi-FI-SelmaNeural","fil-PH":"fil-PH-AngeloNeural","fr-BE":"fr-BE-CharlineNeural","fr-CA":"fr-CA-SylvieNeural","fr-CH":"fr-CH-ArianeNeural","fr-FR":"fr-FR-DeniseNeural","ga-IE":"ga-IE-ColmNeural","gl-ES":"gl-ES-RoiNeural","gu-IN":"gu-IN-DhwaniNeural","he-IL":"he-IL-AvriNeural","hi-IN":"hi-IN-MadhurNeural","hr-HR":"hr-HR-GabrijelaNeural","hu-HU":"hu-HU-NoemiNeural","id-ID":"id-ID-ArdiNeural","it-IT":"it-IT-IsabellaNeural","ja-JP":"ja-JP-NanamiNeural","jv-ID":"jv-ID-DimasNeural","km-KH":"km-KH-PisethNeural","ko-KR":"ko-KR-SunHiNeural","lt-LT":"lt-LT-LeonasNeural","lv-LV":"lv-LV-EveritaNeural","mr-IN":"mr-IN-AarohiNeural","ms-MY":"ms-MY-OsmanNeural","mt-MT":"mt-MT-GraceNeural","my-MM":"my-MM-NilarNeural","nb-NO":"nb-NO-PernilleNeural","nl-BE":"nl-BE-ArnaudNeural","nl-NL":"nl-NL-ColetteNeural","pl-PL":"pl-PL-AgnieszkaNeural","pt-BR":"pt-BR-FranciscaNeural","pt-PT":"pt-PT-DuarteNeural","ro-RO":"ro-RO-AlinaNeural","ru-RU":"ru-RU-SvetlanaNeural","sk-SK":"sk-SK-LukasNeural","sl-SI":"sl-SI-PetraNeural","so-SO":"so-SO-MuuseNeural","su-ID":"su-ID-JajangNeural","sv-SE":"sv-SE-SofieNeural","sw-KE":"sw-KE-RafikiNeural","sw-TZ":"sw-TZ-DaudiNeural","ta-IN":"ta-IN-PallaviNeural","ta-LK":"ta-LK-KumarNeural","ta-SG":"ta-SG-AnbuNeural","te-IN":"te-IN-MohanNeural","th-TH":"th-TH-PremwadeeNeural","tr-TR":"tr-TR-AhmetNeural","uk-UA":"uk-UA-OstapNeural","ur-IN":"ur-IN-GulNeural","ur-PK":"ur-PK-AsadNeural","uz-UZ":"uz-UZ-MadinaNeural","vi-VN":"vi-VN-HoaiMyNeural","zh-CN":"zh-CN-XiaoxiaoNeural","zh-HK":"zh-HK-HiuMaanNeural","zh-TW":"zh-TW-HsiaoChenNeural","zu-ZA":"zu-ZA-ThandoNeural"};let n=this.properties.getProperty(sl.SpeechServiceConnection_SynthLanguage,"en-US"),r=this.properties.getProperty(sl.SpeechServiceConnection_SynthVoice,""),i=Gd.XMLEncode(e);return this.autoDetectSourceLanguage?n="en-US":r=r||t[n],r&&(i=`<voice name='${r}'>${i}</voice>`),i=`<speak version='1.0' xmlns='http://www.w3.org/2001/10/synthesis' xmlns:mstts='http://www.w3.org/2001/mstts' xmlns:emo='http://www.w3.org/2009/10/emotionml' xml:lang='${n}'>${i}</speak>`,i}speakTextAsync(e,t,n,r){this.speakImpl(e,!1,t,n,r)}speakSsmlAsync(e,t,n,r){this.speakImpl(e,!0,t,n,r)}getVoicesAsync(e=""){return Wd(this,void 0,void 0,(function*(){return this.getVoices(e)}))}close(e,t){Hl.throwIfDisposed(this.privDisposed),ys(this.dispose(!0),e,t)}get internalData(){return this.privAdapter}dispose(e){return Wd(this,void 0,void 0,(function*(){this.privDisposed||(e&&this.privAdapter&&(yield this.privAdapter.dispose()),this.privDisposed=!0)}))}createSynthesizerConfig(e){return new lu(e,this.privProperties)}createSynthesisAdapter(e,t,n,r){return new(0,Hc.SynthesisAdapterBase)(e,t,r,this,this.audioConfig)}implCommonSynthesizeSetup(){let e="undefined"!=typeof window?"Browser":"Node",t="unknown",n="unknown";"undefined"!=typeof navigator&&(e=e+"/"+navigator.platform,t=navigator.userAgent,n=navigator.appVersion);const r=this.createSynthesizerConfig(new _l(new Al(new Cl(e,t,n)))),i=this.privProperties.getProperty(sl.SpeechServiceConnection_Key,void 0),o=i&&""!==i?new el(i):new nl((e=>{const t=this.privProperties.getProperty(sl.SpeechServiceAuthorization_Token,void 0);return Promise.resolve(t)}),(e=>{const t=this.privProperties.getProperty(sl.SpeechServiceAuthorization_Token,void 0);return Promise.resolve(t)}));this.privAdapter=this.createSynthesisAdapter(o,this.privConnectionFactory,this.audioConfig,r),this.privAdapter.audioOutputFormat=_c.fromSpeechSynthesisOutputFormat(dc[this.properties.getProperty(sl.SpeechServiceConnection_SynthOutputFormat,void 0)]),this.privRestAdapter=new su(r)}speakImpl(e,t,n,r,i){try{Hl.throwIfDisposed(this.privDisposed);const o=La();let a;a=i instanceof Ed?new(0,kc.PushAudioOutputStreamImpl)(i):i instanceof kc.PullAudioOutputStream?i:void 0!==i?new Cd(i):void 0,this.synthesisRequestQueue.enqueue(new qd(o,e,t,(e=>{if(this.privSynthesizing=!1,n)try{n(e)}catch(e){r&&r(e)}n=void 0,this.adapterSpeak().catch((()=>{}))}),(e=>{r&&r(e)}),a)),this.adapterSpeak().catch((()=>{}))}catch(e){if(r)if(e instanceof Error){const t=e;r(t.name+": "+t.message)}else r(e);this.dispose(!0).catch((()=>{}))}}getVoices(e){return Wd(this,void 0,void 0,(function*(){const t=La(),n=yield this.privRestAdapter.getVoicesList(t);if(n.ok&&Array.isArray(n.json)){let r=n.json;return e&&e.length>0&&(r=r.filter((t=>!!t.Locale&&t.Locale.toLowerCase()===e.toLowerCase()))),new Vd(t,r)}return new Vd(t,{errorDetails:`Error: ${n.status}: ${n.statusText}`})}))}adapterSpeak(){return Wd(this,void 0,void 0,(function*(){if(!this.privDisposed&&!this.privSynthesizing){this.privSynthesizing=!0;const e=yield this.synthesisRequestQueue.dequeue();return this.privAdapter.Speak(e.text,e.isSSML,e.requestId,e.cb,e.err,e.dataStream)}}))}static XMLEncode(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}}class qd{constructor(e,t,n,r,i,o){this.requestId=e,this.text=t,this.isSSML=n,this.cb=r,this.err=i,this.dataStream=o}}var Kd=a("4IUwl");var Yd={error:console.error,info:console.info,success:console.log};u=a("85Hg2"),Kd=a("4IUwl"),Kd=a("4IUwl");var Jd=({className:e,title:t,loading:n=!0})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:r(Kd)(e,{"memori-loading-icon":n}),"aria-label":t,children:(0,s.jsx)("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"})});var Qd=({primary:e=!1,outlined:t=!1,ghost:n=!1,padded:i=!0,shape:o="rounded",danger:a=!1,loading:l=!1,disabled:c=!1,block:u=!1,icon:d,className:f,title:h,id:p,htmlType:m,onClick:g,onMouseDown:v,onMouseUp:y,onMouseLeave:b,onTouchStart:w,onTouchEnd:x,children:S})=>(0,s.jsxs)("button",{id:p,type:m,onClick:g,onMouseDown:v,onMouseUp:y,onMouseLeave:b,onTouchStart:w,onTouchEnd:x,title:h,disabled:l||c,className:r(Kd)("memori-button",{"memori-button--primary":e,"memori-button--outlined":t,"memori-button--ghost":n,"memori-button--square":"square"===o,"memori-button--rounded":"rounded"===o,"memori-button--circle":"circle"===o,"memori-button--padded":i,"memori-button--block":u,"memori-button--with-icon":(d||l)&&S,"memori-button--icon-only":(d||l)&&!S,"memori-button--danger":a,"memori-button--loading":l},f),children:[d&&!l&&(0,s.jsx)("span",{className:"memori-button--icon",children:d}),l&&(0,s.jsx)("span",{className:"memori-button--icon loading-icon",children:(0,s.jsx)(Jd,{loading:!0})}),S]});u=a("85Hg2"),u=a("85Hg2"),u=a("85Hg2");function Xd(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Xd),r}var Zd,$d,ef=(($d=ef||{})[$d.None=0]="None",$d[$d.RenderStrategy=1]="RenderStrategy",$d[$d.Static=2]="Static",$d),tf=((Zd=tf||{})[Zd.Unmount=0]="Unmount",Zd[Zd.Hidden=1]="Hidden",Zd);function nf({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:a}){let s=of(t,e);if(o)return rf(s,n,r,a);let l=null!=i?i:0;if(2&l){let{static:e=!1,...t}=s;if(e)return rf(t,n,r,a)}if(1&l){let{unmount:e=!0,...t}=s;return Xd(e?0:1,{0:()=>null,1:()=>rf({...t,hidden:!0,style:{display:"none"}},n,r,a)})}return rf(s,n,r,a)}function rf(e,t={},n,r){let{as:i=n,children:o,refName:a="ref",...s}=lf(e,["unmount","static"]),l=void 0!==e.ref?{[a]:e.ref}:{},c="function"==typeof o?o(t):o;s.className&&"function"==typeof s.className&&(s.className=s.className(t));let d={};if(t){let e=!1,n=[];for(let[r,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&n.push(r);e&&(d["data-headlessui-state"]=n.join(" "))}if(i===u.Fragment&&Object.keys(sf(s)).length>0){if(!(0,u.isValidElement)(c)||Array.isArray(c)&&c.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(s).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));return(0,u.cloneElement)(c,Object.assign({},of(c.props,sf(lf(s,["ref"]))),d,l,function(...e){return{ref:e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}}(c.ref,l.ref)))}return(0,u.createElement)(i,Object.assign({},lf(s,["ref"]),i!==u.Fragment&&l,i!==u.Fragment&&d),c)}function of(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map((e=>[e,void 0]))));for(let e in n)Object.assign(t,{[e](t,...r){let i=n[e];for(let e of i){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function af(e){var t;return Object.assign((0,u.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function sf(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function lf(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}let cf=(0,(u=a("85Hg2")).createContext)(null);cf.displayName="OpenClosedContext";var uf=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(uf||{});function df(){return(0,u.useContext)(cf)}function ff({value:e,children:t}){return r(u).createElement(cf.Provider,{value:e},t)}u=a("85Hg2"),u=a("85Hg2");const hf="undefined"==typeof window||"undefined"==typeof document;let pf=hf?u.useEffect:u.useLayoutEffect;function mf(){let e=(0,u.useRef)(!1);return pf((()=>(e.current=!0,()=>{e.current=!1})),[]),e}u=a("85Hg2");function gf(e){let t=(0,u.useRef)(e);return pf((()=>{t.current=e}),[e]),t}u=a("85Hg2");let vf={serverHandoffComplete:!1};function yf(){let[e,t]=(0,u.useState)(vf.serverHandoffComplete);return(0,u.useEffect)((()=>{!0!==e&&t(!0)}),[e]),(0,u.useEffect)((()=>{!1===vf.serverHandoffComplete&&(vf.serverHandoffComplete=!0)}),[]),e}u=a("85Hg2"),u=a("85Hg2");let bf=function(e){let t=gf(e);return r(u).useCallback(((...e)=>t.current(...e)),[t])},wf=Symbol();function xf(e,t=!0){return Object.assign(e,{[wf]:t})}function Sf(...e){let t=(0,u.useRef)(e);(0,u.useEffect)((()=>{t.current=e}),[e]);let n=bf((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[wf])))?void 0:n}function Mf(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function _f(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function Af(){let e=[],t=[],n={enqueue(e){t.push(e)},addEventListener:(e,t,r,i)=>(e.addEventListener(t,r,i),n.add((()=>e.removeEventListener(t,r,i)))),requestAnimationFrame(...e){let t=requestAnimationFrame(...e);return n.add((()=>cancelAnimationFrame(t)))},nextFrame:(...e)=>n.requestAnimationFrame((()=>n.requestAnimationFrame(...e))),setTimeout(...e){let t=setTimeout(...e);return n.add((()=>clearTimeout(t)))},microTask(...e){let t={current:!0};return _f((()=>{t.current&&e[0]()})),n.add((()=>{t.current=!1}))},add:t=>(e.push(t),()=>{let n=e.indexOf(t);if(n>=0){let[t]=e.splice(n,1);t()}}),dispose(){for(let t of e.splice(0))t()},async workQueue(){for(let e of t.splice(0))await e()}};return n}function Ef(e,...t){e&&t.length>0&&e.classList.add(...t)}function Cf(e,...t){e&&t.length>0&&e.classList.remove(...t)}var kf,Tf=((kf=Tf||{}).Ended="ended",kf.Cancelled="cancelled",kf);function If(e,t,n,r){let i=n?"enter":"leave",o=Af(),a=void 0!==r?Mf(r):()=>{};"enter"===i&&(e.removeAttribute("hidden"),e.style.display="");let s=Xd(i,{enter:()=>t.enter,leave:()=>t.leave}),l=Xd(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=Xd(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Cf(e,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Ef(e,...s,...c),o.nextFrame((()=>{Cf(e,...c),Ef(e,...l),function(e,t){let n=Af();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[o,a]=[r,i].map((e=>{let[t=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,t)=>t-e));return t}));if(o+a!==0){let r=[];r.push(n.addEventListener(e,"transitionrun",(i=>{i.target===i.currentTarget&&(r.splice(0).forEach((e=>e())),r.push(n.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(t("ended"),r.splice(0).forEach((e=>e())))})),n.addEventListener(e,"transitioncancel",(e=>{e.target===e.currentTarget&&(t("cancelled"),r.splice(0).forEach((e=>e())))}))))})))}else t("ended");n.add((()=>t("cancelled"))),n.dispose}(e,(n=>("ended"===n&&(Cf(e,...s),Ef(e,...t.entered)),a(n))))})),o.dispose}function Of(){let[e]=(0,u.useState)(Af);return(0,u.useEffect)((()=>()=>e.dispose()),[e]),e}function Rf({container:e,direction:t,classes:n,onStart:r,onStop:i}){let o=mf(),a=Of(),s=gf(t);pf((()=>{let t=Af();a.add(t.dispose);let l=e.current;if(l&&"idle"!==s.current&&o.current)return t.dispose(),r.current(s.current),t.add(If(l,n.current,"enter"===s.current,(e=>{t.dispose(),Xd(e,{[Tf.Ended](){i.current(s.current)},[Tf.Cancelled]:()=>{}})}))),t.dispose}),[t])}function Pf(e=""){return e.split(" ").filter((e=>e.trim().length>1))}let Nf=(0,(u=a("85Hg2")).createContext)(null);Nf.displayName="TransitionContext";var Lf,Df=((Lf=Df||{}).Visible="visible",Lf.Hidden="hidden",Lf);let Bf=(0,u.createContext)(null);function jf(e){return"children"in e?jf(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function Ff(e,t){let n=gf(e),r=(0,u.useRef)([]),i=mf(),o=Of(),a=bf(((e,t=tf.Hidden)=>{let a=r.current.findIndex((({el:t})=>t===e));-1!==a&&(Xd(t,{[tf.Unmount](){r.current.splice(a,1)},[tf.Hidden](){r.current[a].state="hidden"}}),o.microTask((()=>{var e;!jf(r)&&i.current&&(null==(e=n.current)||e.call(n))})))})),s=bf((e=>{let t=r.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>a(e,tf.Unmount)})),l=(0,u.useRef)([]),c=(0,u.useRef)(Promise.resolve()),d=(0,u.useRef)({enter:[],leave:[],idle:[]}),f=bf(((e,n,r)=>{l.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter((([t])=>t!==e))),null==t||t.chains.current[n].push([e,new Promise((e=>{l.current.push(e)}))]),null==t||t.chains.current[n].push([e,new Promise((e=>{Promise.all(d.current[n].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===n?c.current=c.current.then((()=>null==t?void 0:t.wait.current)).then((()=>r(n))):r(n)})),h=bf(((e,t,n)=>{Promise.all(d.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=l.current.shift())||e()})).then((()=>n(t)))}));return(0,u.useMemo)((()=>({children:r,register:s,unregister:a,onStart:f,onStop:h,wait:c,chains:d})),[s,a,r,f,h,d,c])}function Uf(){}Bf.displayName="NestingContext";let zf=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Hf(e){var t;let n={};for(let r of zf)n[r]=null!=(t=e[r])?t:Uf;return n}let Vf=ef.RenderStrategy,Wf=af((function(e,t){let{beforeEnter:n,afterEnter:i,beforeLeave:o,afterLeave:a,enter:s,enterFrom:l,enterTo:c,entered:d,leave:f,leaveFrom:h,leaveTo:p,...m}=e,g=(0,u.useRef)(null),v=Sf(g,t),y=m.unmount?tf.Unmount:tf.Hidden,{show:b,appear:w,initial:x}=function(){let e=(0,u.useContext)(Nf);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[S,M]=(0,u.useState)(b?"visible":"hidden"),_=function(){let e=(0,u.useContext)(Bf);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:A,unregister:E}=_,C=(0,u.useRef)(null);(0,u.useEffect)((()=>A(g)),[A,g]),(0,u.useEffect)((()=>{if(y===tf.Hidden&&g.current)return b&&"visible"!==S?void M("visible"):Xd(S,{hidden:()=>E(g),visible:()=>A(g)})}),[S,g,A,E,b,y]);let k=gf({enter:Pf(s),enterFrom:Pf(l),enterTo:Pf(c),entered:Pf(d),leave:Pf(f),leaveFrom:Pf(h),leaveTo:Pf(p)}),T=function(e){let t=(0,u.useRef)(Hf(e));return(0,u.useEffect)((()=>{t.current=Hf(e)}),[e]),t}({beforeEnter:n,afterEnter:i,beforeLeave:o,afterLeave:a}),I=yf();(0,u.useEffect)((()=>{if(I&&"visible"===S&&null===g.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[g,S,I]);let O=x&&!w,R=!I||O||C.current===b?"idle":b?"enter":"leave",P=bf((e=>Xd(e,{enter:()=>T.current.beforeEnter(),leave:()=>T.current.beforeLeave(),idle:()=>{}}))),N=bf((e=>Xd(e,{enter:()=>T.current.afterEnter(),leave:()=>T.current.afterLeave(),idle:()=>{}}))),L=Ff((()=>{M("hidden"),E(g)}),_);Rf({container:g,classes:k,direction:R,onStart:gf((e=>{L.onStart(g,e,P)})),onStop:gf((e=>{L.onStop(g,e,N),"leave"===e&&!jf(L)&&(M("hidden"),E(g))}))}),(0,u.useEffect)((()=>{!O||(y===tf.Hidden?C.current=null:C.current=b)}),[b,O,S]);let D=m,B={ref:v};return r(u).createElement(Bf.Provider,{value:L},r(u).createElement(ff,{value:Xd(S,{visible:uf.Open,hidden:uf.Closed})},nf({ourProps:B,theirProps:D,defaultTag:"div",features:Vf,visible:"visible"===S,name:"Transition.Child"})))})),Gf=af((function(e,t){let{show:n,appear:i=!1,unmount:o,...a}=e,s=(0,u.useRef)(null),l=Sf(s,t);yf();let c=df();if(void 0===n&&null!==c&&(n=Xd(c,{[uf.Open]:!0,[uf.Closed]:!1})),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,f]=(0,u.useState)(n?"visible":"hidden"),h=Ff((()=>{f("hidden")})),[p,m]=(0,u.useState)(!0),g=(0,u.useRef)([n]);pf((()=>{!1!==p&&g.current[g.current.length-1]!==n&&(g.current.push(n),m(!1))}),[g,n]);let v=(0,u.useMemo)((()=>({show:n,appear:i,initial:p})),[n,i,p]);(0,u.useEffect)((()=>{if(n)f("visible");else if(jf(h)){let e=s.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&f("hidden")}else f("hidden")}),[n,h]);let y={unmount:o};return r(u).createElement(Bf.Provider,{value:h},r(u).createElement(Nf.Provider,{value:v},nf({ourProps:{...y,as:u.Fragment,children:r(u).createElement(Wf,{ref:l,...y,...a})},theirProps:{},defaultTag:u.Fragment,features:Vf,visible:"visible"===d,name:"Transition"})))})),qf=af((function(e,t){let n=null!==(0,u.useContext)(Nf),i=null!==df();return r(u).createElement(r(u).Fragment,null,!n&&i?r(u).createElement(Gf,{ref:t,...e}):r(u).createElement(Wf,{ref:t,...e}))})),Kf=Object.assign(Gf,{Child:qf,Root:Gf});u=a("85Hg2");var Yf,Jf=((Yf=Jf||{}).Space=" ",Yf.Enter="Enter",Yf.Escape="Escape",Yf.Backspace="Backspace",Yf.Delete="Delete",Yf.ArrowLeft="ArrowLeft",Yf.ArrowUp="ArrowUp",Yf.ArrowRight="ArrowRight",Yf.ArrowDown="ArrowDown",Yf.Home="Home",Yf.End="End",Yf.PageUp="PageUp",Yf.PageDown="PageDown",Yf.Tab="Tab",Yf);function Qf(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}var Xf;u=a("85Hg2");let Zf=0;function $f(){return++Zf}let eh=null!=(Xf=r(u).useId)?Xf:function(){let e=yf(),[t,n]=r(u).useState(e?$f:null);return pf((()=>{null===t&&n($f())}),[t]),null!=t?""+t:void 0};u=a("85Hg2");var th=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(th||{});let nh=af((function(e,t){let{features:n=1,...r}=e;return nf({ourProps:{ref:t,"aria-hidden":2==(2&n)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...4==(4&n)&&2!=(2&n)&&{display:"none"}}},theirProps:r,slot:{},defaultTag:"div",name:"Hidden"})}));function rh(e){return hf?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let ih=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var oh,ah=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(ah||{}),sh=((oh=sh||{})[oh.Error=0]="Error",oh[oh.Overflow=1]="Overflow",oh[oh.Success=2]="Success",oh[oh.Underflow=3]="Underflow",oh),lh=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(lh||{});function ch(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(ih))}var uh=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(uh||{});function dh(e,t=0){var n;return e!==(null==(n=rh(e))?void 0:n.body)&&Xd(t,{0:()=>e.matches(ih),1(){let t=e;for(;null!==t;){if(t.matches(ih))return!0;t=t.parentElement}return!1}})}function fh(e){let t=rh(e);Af().nextFrame((()=>{t&&!dh(t.activeElement,0)&&hh(e)}))}function hh(e){null==e||e.focus({preventScroll:!0})}let ph=["textarea","input"].join(",");function mh(e,t=(e=>e)){return e.slice().sort(((e,n)=>{let r=t(e),i=t(n);if(null===r||null===i)return 0;let o=r.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}function gh(e,t){return vh(ch(),t,!0,e)}function vh(e,t,n=!0,r=null){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,o=Array.isArray(e)?n?mh(e):e:ch(e);r=null!=r?r:i.activeElement;let a,s=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,o.indexOf(r))-1;if(4&t)return Math.max(0,o.indexOf(r))+1;if(8&t)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=32&t?{preventScroll:!0}:{},u=0,d=o.length;do{if(u>=d||u+d<=0)return 0;let e=l+u;if(16&t)e=(e+d)%d;else{if(e<0)return 3;if(e>=d)return 1}a=o[e],null==a||a.focus(c),u+=s}while(a!==i.activeElement);return 6&t&&function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,ph))&&n}(a)&&a.select(),a.hasAttribute("tabindex")||a.setAttribute("tabindex","0"),2}u=a("85Hg2"),u=a("85Hg2");function yh(e,t,n){let r=gf(t);(0,u.useEffect)((()=>{function t(e){r.current(e)}return window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)}),[e,n])}var bh=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(bh||{});function wh(){let e=(0,u.useRef)(0);return yh("keydown",(t=>{"Tab"===t.key&&(e.current=t.shiftKey?1:0)}),!0),e}u=a("85Hg2");function xh(...e){return(0,u.useMemo)((()=>rh(...e)),[...e])}u=a("85Hg2");function Sh(e,t,n,r){let i=gf(n);(0,u.useEffect)((()=>{function n(e){i.current(e)}return(e=null!=e?e:window).addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}),[e,t,r])}u=a("85Hg2");function Mh(e,t){let n=(0,u.useRef)([]),r=bf(e);(0,u.useEffect)((()=>{let e=[...n.current];for(let[i,o]of t.entries())if(n.current[i]!==o){let i=r(t,e);return n.current=t,i}}),[r,...t])}var _h=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(_h||{});let Ah=Object.assign(af((function(e,t){let n=(0,u.useRef)(null),i=Sf(n,t),{initialFocus:o,containers:a,features:s=30,...l}=e;yf()||(s=1);let c=xh(n);!function({ownerDocument:e},t){let n=(0,u.useRef)(null);Sh(null==e?void 0:e.defaultView,"focusout",(e=>{!t||n.current||(n.current=e.target)}),!0),Mh((()=>{t||((null==e?void 0:e.activeElement)===(null==e?void 0:e.body)&&hh(n.current),n.current=null)}),[t]);let r=(0,u.useRef)(!1);(0,u.useEffect)((()=>(r.current=!1,()=>{r.current=!0,_f((()=>{!r.current||(hh(n.current),n.current=null)}))})),[])}({ownerDocument:c},Boolean(16&s));let d=function({ownerDocument:e,container:t,initialFocus:n},r){let i=(0,u.useRef)(null),o=mf();return Mh((()=>{if(!r)return;let a=t.current;!a||_f((()=>{if(!o.current)return;let t=null==e?void 0:e.activeElement;if(null!=n&&n.current){if((null==n?void 0:n.current)===t)return void(i.current=t)}else if(a.contains(t))return void(i.current=t);null!=n&&n.current?hh(n.current):vh(a,ah.First)===sh.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),i.current=null==e?void 0:e.activeElement}))}),[r]),i}({ownerDocument:c,container:n,initialFocus:o},Boolean(2&s));!function({ownerDocument:e,container:t,containers:n,previousActiveElement:r},i){let o=mf();Sh(null==e?void 0:e.defaultView,"focus",(e=>{if(!i||!o.current)return;let a=new Set(null==n?void 0:n.current);a.add(t);let s=r.current;if(!s)return;let l=e.target;l&&l instanceof HTMLElement?function(e,t){var n;for(let r of e)if(null!=(n=r.current)&&n.contains(t))return!0;return!1}(a,l)?(r.current=l,hh(l)):(e.preventDefault(),e.stopPropagation(),hh(s)):hh(r.current)}),!0)}({ownerDocument:c,container:n,containers:a,previousActiveElement:d},Boolean(8&s));let f=wh(),h=bf((()=>{let e=n.current;!e||Xd(f.current,{[bh.Forwards]:()=>vh(e,ah.First),[bh.Backwards]:()=>vh(e,ah.Last)})})),p={ref:i};return r(u).createElement(r(u).Fragment,null,Boolean(4&s)&&r(u).createElement(nh,{as:"button",type:"button",onFocus:h,features:th.Focusable}),nf({ourProps:p,theirProps:l,defaultTag:"div",name:"FocusTrap"}),Boolean(4&s)&&r(u).createElement(nh,{as:"button",type:"button",onFocus:h,features:th.Focusable}))})),{features:_h});let Eh=new Set,Ch=new Map;function kh(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function Th(e){let t=Ch.get(e);!t||(null===t["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}function Ih(e,t=!0){pf((()=>{if(!t||!e.current)return;let n=e.current,r=rh(n);if(r){Eh.add(n);for(let e of Ch.keys())e.contains(n)&&(Th(e),Ch.delete(e));return r.querySelectorAll("body > *").forEach((e=>{if(e instanceof HTMLElement){for(let t of Eh)if(e.contains(t))return;1===Eh.size&&(Ch.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),kh(e))}})),()=>{if(Eh.delete(n),Eh.size>0)r.querySelectorAll("body > *").forEach((e=>{if(e instanceof HTMLElement&&!Ch.has(e)){for(let t of Eh)if(e.contains(t))return;Ch.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),kh(e)}}));else for(let e of Ch.keys())Th(e),Ch.delete(e)}}}),[t])}u=a("85Hg2"),c=a("2BCLI");let Oh=(0,(u=a("85Hg2")).createContext)(!1);function Rh(e){return r(u).createElement(Oh.Provider,{value:e.force},e.children)}function Ph(e){let t=(0,u.useContext)(Oh),n=(0,u.useContext)(Bh),r=xh(e),[i,o]=(0,u.useState)((()=>{if(!t&&null!==n||hf)return null;let e=null==r?void 0:r.getElementById("headlessui-portal-root");if(e)return e;if(null===r)return null;let i=r.createElement("div");return i.setAttribute("id","headlessui-portal-root"),r.body.appendChild(i)}));return(0,u.useEffect)((()=>{null!==i&&(null!=r&&r.body.contains(i)||null==r||r.body.appendChild(i))}),[i,r]),(0,u.useEffect)((()=>{t||null!==n&&o(n.current)}),[n,o,t]),i}let Nh=u.Fragment,Lh=af((function(e,t){let n=e,r=(0,u.useRef)(null),i=Sf(xf((e=>{r.current=e})),t),o=xh(r),a=Ph(r),[s]=(0,u.useState)((()=>{var e;return hf?null:null!=(e=null==o?void 0:o.createElement("div"))?e:null})),l=yf(),d=(0,u.useRef)(!1);return pf((()=>{if(d.current=!1,a&&s)return a.contains(s)||(s.setAttribute("data-headlessui-portal",""),a.appendChild(s)),()=>{d.current=!0,_f((()=>{var e;!d.current||!a||!s||(a.removeChild(s),a.childNodes.length<=0&&(null==(e=a.parentElement)||e.removeChild(a)))}))}}),[a,s]),l&&a&&s?(0,c.createPortal)(nf({ourProps:{ref:i},theirProps:n,defaultTag:Nh,name:"Portal"}),s):null})),Dh=u.Fragment,Bh=(0,u.createContext)(null),jh=af((function(e,t){let{target:n,...i}=e,o={ref:Sf(t)};return r(u).createElement(Bh.Provider,{value:n},nf({ourProps:o,theirProps:i,defaultTag:Dh,name:"Popover.Group"}))})),Fh=Object.assign(Lh,{Group:jh});let Uh=(0,(u=a("85Hg2")).createContext)(null);function zh(){let e=(0,u.useContext)(Uh);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,zh),e}return e}function Hh(){let[e,t]=(0,u.useState)([]);return[e.length>0?e.join(" "):void 0,(0,u.useMemo)((()=>function(e){let n=bf((e=>(t((t=>[...t,e])),()=>t((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),i=(0,u.useMemo)((()=>({register:n,slot:e.slot,name:e.name,props:e.props})),[n,e.slot,e.name,e.props]);return r(u).createElement(Uh.Provider,{value:i},e.children)}),[t])]}let Vh=af((function(e,t){let n=zh(),r=`headlessui-description-${eh()}`,i=Sf(t);pf((()=>n.register(r)),[r,n.register]);let o=e;return nf({ourProps:{ref:i,...n.props,id:r},theirProps:o,slot:n.slot||{},defaultTag:"p",name:n.name||"Description"})}));let Wh=(0,(u=a("85Hg2")).createContext)((()=>{}));Wh.displayName="StackContext";var Gh=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Gh||{});function qh({children:e,onUpdate:t,type:n,element:i,enabled:o}){let a=(0,u.useContext)(Wh),s=bf(((...e)=>{null==t||t(...e),a(...e)}));return pf((()=>{let e=void 0===o||!0===o;return e&&s(0,n,i),()=>{e&&s(1,n,i)}}),[s,n,i,o]),r(u).createElement(Wh.Provider,{value:s},e)}u=a("85Hg2"),u=a("85Hg2");function Kh(e,t,n){let r=gf(t);(0,u.useEffect)((()=>{function t(e){r.current(e)}return document.addEventListener(e,t,n),()=>document.removeEventListener(e,t,n)}),[e,n])}function Yh(e,t,n=!0){let r=(0,u.useRef)(!1);function i(n,i){if(!r.current||n.defaultPrevented)return;let o=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e),a=i(n);if(null!==a&&a.getRootNode().contains(a)){for(let e of o){if(null===e)continue;let t=e instanceof HTMLElement?e:e.current;if(null!=t&&t.contains(a))return}return!dh(a,uh.Loose)&&-1!==a.tabIndex&&n.preventDefault(),t(n,a)}}(0,u.useEffect)((()=>{requestAnimationFrame((()=>{r.current=n}))}),[n]);let o=(0,u.useRef)(null);Kh("mousedown",(e=>{var t,n;r.current&&(o.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)}),!0),Kh("click",(e=>{!o.current||(i(e,(()=>o.current)),o.current=null)}),!0),Kh("blur",(e=>i(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}var Jh=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Jh||{}),Qh=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Qh||{});let Xh={0:(e,t)=>e.titleId===t.id?e:{...e,titleId:t.id}},Zh=(0,u.createContext)(null);function $h(e){let t=(0,u.useContext)(Zh);if(null===t){let t=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,$h),t}return t}function ep(e,t){(0,u.useEffect)((()=>{var n;if(!t||!e)return;let r=Af();function i(e,t,n){let i=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),r.add((()=>{Object.assign(e.style,{[t]:i})}))}let o=e.documentElement,a=(null!=(n=e.defaultView)?n:window).innerWidth-o.clientWidth;if(i(o,"overflow","hidden"),a>0){i(o,"paddingRight",`${a-(o.clientWidth-o.offsetWidth)}px`)}if(/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0){let e=window.pageYOffset;i(o,"position","fixed"),i(o,"marginTop",`-${e}px`),i(o,"width","100%"),r.add((()=>window.scrollTo(0,e)))}return r.dispose}),[e,t])}function tp(e,t){return Xd(t.type,Xh,e,t)}Zh.displayName="DialogContext";let np=ef.RenderStrategy|ef.Static,rp=af((function(e,t){let{open:n,onClose:i,initialFocus:o,__demoMode:a=!1,...s}=e,[l,c]=(0,u.useState)(0),d=df();void 0===n&&null!==d&&(n=Xd(d,{[uf.Open]:!0,[uf.Closed]:!1}));let f=(0,u.useRef)(new Set),h=(0,u.useRef)(null),p=Sf(h,t),m=(0,u.useRef)(null),g=xh(h),v=e.hasOwnProperty("open")||null!==d,y=e.hasOwnProperty("onClose");if(!v&&!y)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!v)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!y)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof n)throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${n}`);if("function"!=typeof i)throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${i}`);let b=n?0:1,[w,x]=(0,u.useReducer)(tp,{titleId:null,descriptionId:null,panelRef:(0,u.createRef)()}),S=bf((()=>i(!1))),M=bf((e=>x({type:0,id:e}))),_=!!yf()&&(!a&&0===b),A=l>1,E=null!==(0,u.useContext)(Zh),C=A?"parent":"leaf";Ih(h,!!A&&_),Yh((()=>{var e,t;return[...Array.from(null!=(e=null==g?void 0:g.querySelectorAll("body > *, [data-headlessui-portal]"))?e:[]).filter((e=>!(!(e instanceof HTMLElement)||e.contains(m.current)||w.panelRef.current&&e.contains(w.panelRef.current)))),null!=(t=w.panelRef.current)?t:h.current]}),S,_&&!A),Sh(null==g?void 0:g.defaultView,"keydown",(e=>{e.defaultPrevented||e.key===Jf.Escape&&0===b&&(A||(e.preventDefault(),e.stopPropagation(),S()))})),ep(g,0===b&&!E),(0,u.useEffect)((()=>{if(0!==b||!h.current)return;let e=new IntersectionObserver((e=>{for(let t of e)0===t.boundingClientRect.x&&0===t.boundingClientRect.y&&0===t.boundingClientRect.width&&0===t.boundingClientRect.height&&S()}));return e.observe(h.current),()=>e.disconnect()}),[b,h,S]);let[k,T]=Hh(),I=`headlessui-dialog-${eh()}`,O=(0,u.useMemo)((()=>[{dialogState:b,close:S,setTitleId:M},w]),[b,w,S,M]),R=(0,u.useMemo)((()=>({open:0===b})),[b]),P={ref:p,id:I,role:"dialog","aria-modal":0===b||void 0,"aria-labelledby":w.titleId,"aria-describedby":k};return r(u).createElement(qh,{type:"Dialog",enabled:0===b,element:h,onUpdate:bf(((e,t,n)=>{"Dialog"===t&&Xd(e,{[Gh.Add](){f.current.add(n),c((e=>e+1))},[Gh.Remove](){f.current.add(n),c((e=>e-1))}})}))},r(u).createElement(Rh,{force:!0},r(u).createElement(Fh,null,r(u).createElement(Zh.Provider,{value:O},r(u).createElement(Fh.Group,{target:h},r(u).createElement(Rh,{force:!1},r(u).createElement(T,{slot:R,name:"Dialog.Description"},r(u).createElement(Ah,{initialFocus:o,containers:f,features:_?Xd(C,{parent:Ah.features.RestoreFocus,leaf:Ah.features.All&~Ah.features.FocusLock}):Ah.features.None},nf({ourProps:P,theirProps:s,slot:R,defaultTag:"div",features:np,visible:0===b,name:"Dialog"})))))))),r(u).createElement(nh,{features:th.Hidden,ref:m}))})),ip=af((function(e,t){let[{dialogState:n,close:r}]=$h("Dialog.Overlay");return nf({ourProps:{ref:Sf(t),id:`headlessui-dialog-overlay-${eh()}`,"aria-hidden":!0,onClick:bf((e=>{if(e.target===e.currentTarget){if(Qf(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),r()}}))},theirProps:e,slot:(0,u.useMemo)((()=>({open:0===n})),[n]),defaultTag:"div",name:"Dialog.Overlay"})})),op=af((function(e,t){let[{dialogState:n},i]=$h("Dialog.Backdrop"),o=Sf(t),a=`headlessui-dialog-backdrop-${eh()}`;(0,u.useEffect)((()=>{if(null===i.panelRef.current)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")}),[i.panelRef]);let s=(0,u.useMemo)((()=>({open:0===n})),[n]);return r(u).createElement(Rh,{force:!0},r(u).createElement(Fh,null,nf({ourProps:{ref:o,id:a,"aria-hidden":!0},theirProps:e,slot:s,defaultTag:"div",name:"Dialog.Backdrop"})))})),ap=af((function(e,t){let[{dialogState:n},r]=$h("Dialog.Panel"),i=Sf(t,r.panelRef),o=`headlessui-dialog-panel-${eh()}`,a=(0,u.useMemo)((()=>({open:0===n})),[n]);return nf({ourProps:{ref:i,id:o,onClick:bf((e=>{e.stopPropagation()}))},theirProps:e,slot:a,defaultTag:"div",name:"Dialog.Panel"})})),sp=af((function(e,t){let[{dialogState:n,setTitleId:r}]=$h("Dialog.Title"),i=`headlessui-dialog-title-${eh()}`,o=Sf(t);(0,u.useEffect)((()=>(r(i),()=>r(null))),[i,r]);let a=(0,u.useMemo)((()=>({open:0===n})),[n]);return nf({ourProps:{ref:o,id:i},theirProps:e,slot:a,defaultTag:"h2",name:"Dialog.Title"})})),lp=Object.assign(rp,{Backdrop:op,Panel:ap,Overlay:ip,Title:sp,Description:Vh});Kd=a("4IUwl");var cp=({spinning:e=!1,primary:t=!1,className:n,children:i})=>(0,s.jsxs)("div",{className:r(Kd)("memori-spin",n,{"memori-spin--spinning":e,"memori-spin--primary":t}),children:[i,(0,s.jsx)("div",{className:"memori-spin--spinner",children:(0,s.jsx)(Jd,{loading:!0})})]});var up=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"})});Kd=a("4IUwl");var dp=({open:e=!1,onClose:t,className:n,title:i,description:o,children:a,footer:l,loading:c=!1,closable:d=!0,width:f="100%",widthMd:h="100%"})=>{const{t:p}=Ce();return(0,s.jsx)(Kf,{appear:!0,show:e,as:r(u).Fragment,children:(0,s.jsxs)(lp,{open:e,onClose:t,className:r(Kd)("memori-modal",n),children:[(0,s.jsx)(Kf.Child,{as:r(u).Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)("div",{className:"memori-modal--backdrop"})}),(0,s.jsx)("div",{className:"memori-modal--container",children:(0,s.jsx)("div",{className:"memori-modal--container-scrollable",children:(0,s.jsx)(Kf.Child,{as:r(u).Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:(0,s.jsxs)(lp.Panel,{className:"memori-modal--panel",children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n .memori-modal--panel {\n --memori-modal--width: ${f};\n --memori-modal--width-md: ${h};\n }\n `}}),d&&(0,s.jsx)("div",{className:"memori-modal--close",children:(0,s.jsx)(Qd,{ghost:!0,padded:!0,shape:"circle",icon:(0,s.jsx)(up,{}),title:p("close")||"Close",onClick:()=>t(!1)})}),(0,s.jsxs)(cp,{spinning:c,children:[i&&(0,s.jsx)(lp.Title,{className:"memori-modal--title",children:i}),o&&(0,s.jsx)(lp.Description,{className:"memori-modal--description",children:o}),a,l&&(0,s.jsx)("div",{className:"memori-modal--footer",children:l})]})]})})})})]})})},fp=(u=a("85Hg2"),e=>"checkbox"===e.type),hp=e=>e instanceof Date,pp=e=>null==e;const mp=e=>"object"==typeof e;var gp=e=>!pp(e)&&!Array.isArray(e)&&mp(e)&&!hp(e),vp=e=>gp(e)&&e.target?fp(e.target)?e.target.checked:e.target.value:e,yp=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),bp=e=>Array.isArray(e)?e.filter(Boolean):[],wp=e=>void 0===e,xp=(e,t,n)=>{if(!t||!gp(e))return n;const r=bp(t.split(/[,[\].]+?/)).reduce(((e,t)=>pp(e)?e:e[t]),e);return wp(r)||r===e?wp(e[t])?n:e[t]:r};const Sp="blur",Mp="focusout",_p="onBlur",Ap="onChange",Ep="onSubmit",Cp="onTouched",kp="all",Tp="max",Ip="min",Op="maxLength",Rp="minLength",Pp="pattern",Np="required",Lp="validate";r(u).createContext(null);var Dp=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const i=o;return t._proxyFormState[i]!==kp&&(t._proxyFormState[i]=!r||kp),n&&(n[i]=!0),e[i]}});return i},Bp=e=>gp(e)&&!Object.keys(e).length,jp=(e,t,n)=>{const{name:r,...i}=e;return Bp(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find((e=>t[e]===(!n||kp)))},Fp=e=>Array.isArray(e)?e:[e];function Up(e){const t=r(u).useRef(e);t.current=e,r(u).useEffect((()=>{const n=!e.disabled&&t.current.subject.subscribe({next:t.current.callback});return()=>{n&&n.unsubscribe()}}),[e.disabled])}var zp=e=>"string"==typeof e,Hp=(e,t,n,r)=>zp(e)?(r&&t.watch.add(e),xp(n,e)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),xp(n,e)))):(t.watchAll=!!r,n),Vp="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function Wp(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(Vp&&(e instanceof Blob||e instanceof FileList)||!n&&!gp(e))return e;if(t=n?[]:{},Array.isArray(e)||(e=>{const t=e.constructor&&e.constructor.prototype;return gp(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const n in e)t[n]=Wp(e[n]);else t=e}return t}var Gp=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},qp=e=>/^\w*$/.test(e),Kp=e=>bp(e.replace(/["|']|\]/g,"").split(/\.|\[/));function Yp(e,t,n){let r=-1;const i=qp(t)?[t]:Kp(t),o=i.length,a=o-1;for(;++r<o;){const t=i[r];let o=n;if(r!==a){const n=e[t];o=gp(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}e[t]=o,e=e[t]}return e}const Jp=(e,t,n)=>{for(const r of n||Object.keys(e)){const n=xp(e,r);if(n){const{_f:e,...r}=n;if(e&&t(e.name)){if(e.ref.focus){e.ref.focus();break}if(e.refs&&e.refs[0].focus){e.refs[0].focus();break}}else gp(r)&&Jp(r,t)}}};var Qp=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))))),Xp=(e,t,n)=>{const r=bp(xp(e,n));return Yp(r,"root",t[n]),Yp(e,n,r),e},Zp=e=>"boolean"==typeof e,$p=e=>"file"===e.type,em=e=>"function"==typeof e,tm=e=>zp(e)||r(u).isValidElement(e),nm=e=>"radio"===e.type,rm=e=>e instanceof RegExp;const im={value:!1,isValid:!1},om={value:!0,isValid:!0};var am=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!wp(e[0].attributes.value)?wp(e[0].value)||""===e[0].value?om:{value:e[0].value,isValid:!0}:om:im}return im};const sm={isValid:!1,value:null};var lm=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),sm):sm;function cm(e,t,n="validate"){if(tm(e)||Array.isArray(e)&&e.every(tm)||Zp(e)&&!e)return{type:n,message:tm(e)?e:"",ref:t}}var um=e=>gp(e)&&!rm(e)?e:{value:e,message:""},dm=async(e,t,n,r,i)=>{const{ref:o,refs:a,required:s,maxLength:l,minLength:c,min:u,max:d,pattern:f,validate:h,name:p,valueAsNumber:m,mount:g,disabled:v}=e._f;if(!g||v)return{};const y=a?a[0]:o,b=e=>{r&&y.reportValidity&&(y.setCustomValidity(Zp(e)?"":e||""),y.reportValidity())},w={},x=nm(o),S=fp(o),M=x||S,_=(m||$p(o))&&!o.value||""===t||Array.isArray(t)&&!t.length,A=Gp.bind(null,p,n,w),E=(e,t,n,r=Op,i=Rp)=>{const a=e?t:n;w[p]={type:e?r:i,message:a,ref:o,...A(e?r:i,a)}};if(i?!Array.isArray(t)||!t.length:s&&(!M&&(_||pp(t))||Zp(t)&&!t||S&&!am(a).isValid||x&&!lm(a).isValid)){const{value:e,message:t}=tm(s)?{value:!!s,message:s}:um(s);if(e&&(w[p]={type:Np,message:t,ref:y,...A(Np,t)},!n))return b(t),w}if(!(_||pp(u)&&pp(d))){let e,r;const i=um(d),a=um(u);if(pp(t)||isNaN(t)){const n=o.valueAsDate||new Date(t),s=e=>new Date((new Date).toDateString()+" "+e),l="time"==o.type,c="week"==o.type;zp(i.value)&&t&&(e=l?s(t)>s(i.value):c?t>i.value:n>new Date(i.value)),zp(a.value)&&t&&(r=l?s(t)<s(a.value):c?t<a.value:n<new Date(a.value))}else{const n=o.valueAsNumber||(t?+t:t);pp(i.value)||(e=n>i.value),pp(a.value)||(r=n<a.value)}if((e||r)&&(E(!!e,i.message,a.message,Tp,Ip),!n))return b(w[p].message),w}if((l||c)&&!_&&(zp(t)||i&&Array.isArray(t))){const e=um(l),r=um(c),i=!pp(e.value)&&t.length>e.value,o=!pp(r.value)&&t.length<r.value;if((i||o)&&(E(i,e.message,r.message),!n))return b(w[p].message),w}if(f&&!_&&zp(t)){const{value:e,message:r}=um(f);if(rm(e)&&!t.match(e)&&(w[p]={type:Pp,message:r,ref:o,...A(Pp,r)},!n))return b(r),w}if(h)if(em(h)){const e=cm(await h(t),y);if(e&&(w[p]={...e,...A(Lp,e.message)},!n))return b(e.message),w}else if(gp(h)){let e={};for(const r in h){if(!Bp(e)&&!n)break;const i=cm(await h[r](t),y,r);i&&(e={...i,...A(r,i.message)},b(i.message),n&&(w[p]=e))}if(!Bp(e)&&(w[p]={ref:y,...e},!n))return w}return b(!0),w};var fm=e=>({isOnSubmit:!e||e===Ep,isOnBlur:e===_p,isOnChange:e===Ap,isOnAll:e===kp,isOnTouch:e===Cp});function hm(e){for(const t in e)if(!wp(e[t]))return!1;return!0}function pm(e,t){const n=qp(t)?[t]:Kp(t),r=1==n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=wp(e)?r++:e[t[r++]];return e}(e,n),i=n[n.length-1];let o;r&&delete r[i];for(let t=0;t<n.slice(0,-1).length;t++){let r,i=-1;const a=n.slice(0,-(t+1)),s=a.length-1;for(t>0&&(o=e);++i<a.length;){const t=a[i];r=r?r[t]:e[t],s===i&&(gp(r)&&Bp(r)||Array.isArray(r)&&hm(r))&&(o?delete o[t]:delete e[t]),o=r}}return e}function mm(){let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}}var gm=e=>pp(e)||!mp(e);function vm(e,t){if(gm(e)||gm(t))return e===t;if(hp(e)&&hp(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const n=e[i];if(!r.includes(i))return!1;if("ref"!==i){const e=t[i];if(hp(n)&&hp(e)||gp(n)&&gp(e)||Array.isArray(n)&&Array.isArray(e)?!vm(n,e):n!==e)return!1}}return!0}var ym=e=>{const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},bm=e=>"select-multiple"===e.type,wm=e=>ym(e)&&e.isConnected,xm=e=>{for(const t in e)if(em(e[t]))return!0;return!1};function Sm(e,t={}){const n=Array.isArray(e);if(gp(e)||n)for(const n in e)Array.isArray(e[n])||gp(e[n])&&!xm(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Sm(e[n],t[n])):pp(e[n])||(t[n]=!0);return t}function Mm(e,t,n){const r=Array.isArray(e);if(gp(e)||r)for(const r in e)Array.isArray(e[r])||gp(e[r])&&!xm(e[r])?wp(t)||gm(n[r])?n[r]=Array.isArray(e[r])?Sm(e[r],[]):{...Sm(e[r])}:Mm(e[r],pp(t)?{}:t[r],n[r]):vm(e[r],t[r])?delete n[r]:n[r]=!0;return n}var _m=(e,t)=>Mm(e,t,Sm(t)),Am=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>wp(e)?e:t?""===e?NaN:e?+e:e:n&&zp(e)?new Date(e):r?r(e):e;function Em(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return $p(t)?t.files:nm(t)?lm(e.refs).value:bm(t)?[...t.selectedOptions].map((({value:e})=>e)):fp(t)?am(e.refs).value:Am(wp(t.value)?e.ref.value:t.value,e)}var Cm=e=>wp(e)?e:rm(e)?e.source:gp(e)?rm(e.value)?e.value.source:e.value:e;function km(e,t,n){const r=xp(e,n);if(r||qp(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),o=xp(t,r),a=xp(e,r);if(o&&!Array.isArray(o)&&n!==r)return{name:n};if(a&&a.type)return{name:r,error:a};i.pop()}return{name:n}}const Tm={mode:Ep,reValidateMode:Ap,shouldFocusError:!0};function Im(e={}){let t,n={...Tm,...e},r={submitCount:0,isDirty:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},i={},o=Wp(n.defaultValues)||{},a=n.shouldUnregister?{}:Wp(o),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c=0,u={};const d={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={watch:mm(),array:mm(),state:mm()},h=fm(n.mode),p=fm(n.reValidateMode),m=n.criteriaMode===kp,g=async()=>{let e=!1;return d.isValid&&(e=n.resolver?Bp((await w()).errors):await x(i,!0),e!==r.isValid&&(r.isValid=e,f.state.next({isValid:e}))),e},v=(e,t,n,r)=>{const l=xp(i,e);if(l){const i=xp(a,e,wp(n)?xp(o,e):n);wp(i)||r&&r.defaultChecked||t?Yp(a,e,t?i:Em(l._f)):_(e,i),s.mount&&g()}},y=(e,t,n,i,a)=>{let s=!1,l=!1;const c={name:e};if(d.isDirty&&(l=r.isDirty,r.isDirty=c.isDirty=S(),s=l!==c.isDirty),d.dirtyFields&&(!n||i)){l=xp(r.dirtyFields,e);const n=vm(xp(o,e),t);n?pm(r.dirtyFields,e):Yp(r.dirtyFields,e,!0),c.dirtyFields=r.dirtyFields,s=s||l!==!n}if(n){const t=xp(r.touchedFields,e);t||(Yp(r.touchedFields,e,n),c.touchedFields=r.touchedFields,s=s||d.touchedFields&&t!==n)}return s&&a&&f.state.next(c),s?c:{}},b=(n,i,o,a)=>{const s=xp(r.errors,n),l=d.isValid&&Zp(i)&&r.isValid!==i;var h;if(e.delayError&&o?(h=()=>((e,t)=>{Yp(r.errors,e,t),f.state.next({errors:r.errors})})(n,o),t=e=>{clearTimeout(c),c=window.setTimeout(h,e)},t(e.delayError)):(clearTimeout(c),t=null,o?Yp(r.errors,n,o):pm(r.errors,n)),(o?!vm(s,o):s)||!Bp(a)||l){const e={...a,...l&&Zp(i)?{isValid:i}:{},errors:r.errors,name:n};r={...r,...e},f.state.next(e)}u[n]--,d.isValidating&&!Object.values(u).some((e=>e))&&(f.state.next({isValidating:!1}),u={})},w=async e=>n.resolver?await n.resolver({...a},n.context,((e,t,n,r)=>{const i={};for(const n of e){const e=xp(t,n);e&&Yp(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}})(e||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation)):{},x=async(e,t,i={valid:!0})=>{for(const o in e){const s=e[o];if(s){const{_f:e,...o}=s;if(e){const o=l.array.has(e.name),c=await dm(s,xp(a,e.name),m,n.shouldUseNativeValidation,o);if(c[e.name]&&(i.valid=!1,t))break;!t&&(xp(c,e.name)?o?Xp(r.errors,c,e.name):Yp(r.errors,e.name,c[e.name]):pm(r.errors,e.name))}o&&await x(o,t,i)}}return i.valid},S=(e,t)=>(e&&t&&Yp(a,e,t),!vm(T(),o)),M=(e,t,n)=>Hp(e,l,{...s.mount?a:wp(t)?o:zp(e)?{[e]:t}:t},n),_=(e,t,n={})=>{const r=xp(i,e);let o=t;if(r){const n=r._f;n&&(!n.disabled&&Yp(a,e,Am(t,n)),o=Vp&&ym(n.ref)&&pp(t)?"":t,bm(n.ref)?[...n.ref.options].forEach((e=>e.selected=o.includes(e.value))):n.refs?fp(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find((t=>t===e.value)):o===e.value))):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach((e=>e.checked=e.value===o)):$p(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||f.watch.next({name:e})))}(n.shouldDirty||n.shouldTouch)&&y(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&k(e)},A=(e,t,n)=>{for(const r in t){const o=t[r],a=`${e}.${r}`,s=xp(i,a);!l.array.has(e)&&gm(o)&&(!s||s._f)||hp(o)?_(a,o,n):A(a,o,n)}},E=(e,t,n={})=>{const s=xp(i,e),c=l.array.has(e),u=Wp(t);Yp(a,e,u),c?(f.array.next({name:e,values:a}),(d.isDirty||d.dirtyFields)&&n.shouldDirty&&(r.dirtyFields=_m(o,a),f.state.next({name:e,dirtyFields:r.dirtyFields,isDirty:S(e,u)}))):!s||s._f||pp(u)?_(e,u,n):A(e,u,n),Qp(e,l)&&f.state.next({}),f.watch.next({name:e})},C=async e=>{const o=e.target;let s=o.name;const c=xp(i,s);if(c){let x,S;const M=o.type?Em(c._f):vp(e),_=e.type===Sp||e.type===Mp,A=!((v=c._f).mount&&(v.required||v.min||v.max||v.maxLength||v.minLength||v.pattern||v.validate)||n.resolver||xp(r.errors,s)||c._f.deps)||((e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e))(_,xp(r.touchedFields,s),r.isSubmitted,p,h),E=Qp(s,l,_);Yp(a,s,M),_?(c._f.onBlur&&c._f.onBlur(e),t&&t(0)):c._f.onChange&&c._f.onChange(e);const C=y(s,M,_,!1),T=!Bp(C)||E;if(!_&&f.watch.next({name:s,type:e.type}),A)return d.isValid&&g(),T&&f.state.next({name:s,...E?{}:C});if(!_&&E&&f.state.next({}),u[s]=u[s]?u[s]+1:1,f.state.next({isValidating:!0}),n.resolver){const{errors:e}=await w([s]),t=km(r.errors,i,s),n=km(e,i,t.name||s);x=n.error,s=n.name,S=Bp(e)}else x=(await dm(c,xp(a,s),m,n.shouldUseNativeValidation))[s],g();c._f.deps&&k(c._f.deps),b(s,S,x,C)}var v},k=async(e,t={})=>{let o,a;const s=Fp(e);if(f.state.next({isValidating:!0}),n.resolver){const t=await(async e=>{const{errors:t}=await w();if(e)for(const n of e){const e=xp(t,n);e?Yp(r.errors,n,e):pm(r.errors,n)}else r.errors=t;return t})(wp(e)?e:s);o=Bp(t),a=e?!s.some((e=>xp(t,e))):o}else e?(a=(await Promise.all(s.map((async e=>{const t=xp(i,e);return await x(t&&t._f?{[e]:t}:t)})))).every(Boolean),(a||r.isValid)&&g()):a=o=await x(i);return f.state.next({...!zp(e)||d.isValid&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors,isValidating:!1}),t.shouldFocus&&!a&&Jp(i,(e=>e&&xp(r.errors,e)),e?s:l.mount),a},T=e=>{const t={...o,...s.mount?a:{}};return wp(e)?t:zp(e)?xp(t,e):e.map((e=>xp(t,e)))},I=(e,t)=>({invalid:!!xp((t||r).errors,e),isDirty:!!xp((t||r).dirtyFields,e),isTouched:!!xp((t||r).touchedFields,e),error:xp((t||r).errors,e)}),O=(e,t={})=>{for(const s of e?Fp(e):l.mount)l.mount.delete(s),l.array.delete(s),xp(i,s)&&(t.keepValue||(pm(i,s),pm(a,s)),!t.keepError&&pm(r.errors,s),!t.keepDirty&&pm(r.dirtyFields,s),!t.keepTouched&&pm(r.touchedFields,s),!n.shouldUnregister&&!t.keepDefaultValue&&pm(o,s));f.watch.next({}),f.state.next({...r,...t.keepDirty?{isDirty:S()}:{}}),!t.keepIsValid&&g()},R=(e,t={})=>{let r=xp(i,e);const c=Zp(t.disabled);return Yp(i,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),r?c&&Yp(a,e,t.disabled?void 0:xp(a,e,Em(r._f))):v(e,!0,t.value),{...c?{disabled:t.disabled}:{},...n.shouldUseNativeValidation?{required:!!t.required,min:Cm(t.min),max:Cm(t.max),minLength:Cm(t.minLength),maxLength:Cm(t.maxLength),pattern:Cm(t.pattern)}:{},name:e,onChange:C,onBlur:C,ref:a=>{if(a){R(e,t),r=xp(i,e);const n=wp(a.value)&&a.querySelectorAll&&a.querySelectorAll("input,select,textarea")[0]||a,s=(e=>nm(e)||fp(e))(n),l=r._f.refs||[];if(s?l.find((e=>e===n)):n===r._f.ref)return;Yp(i,e,{_f:{...r._f,...s?{refs:[...l.filter(wm),n,...Array.isArray(xp(o,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),v(e,!1,void 0,n)}else r=xp(i,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!yp(l.array,e)||!s.action)&&l.unMount.add(e)}}},P=()=>n.shouldFocusError&&Jp(i,(e=>e&&xp(r.errors,e)),l.mount);return{control:{register:R,unregister:O,getFieldState:I,_executeSchema:w,_focusError:P,_getWatch:M,_getDirty:S,_updateValid:g,_removeUnmounted:()=>{for(const e of l.unMount){const t=xp(i,e);t&&(t._f.refs?t._f.refs.every((e=>!wm(e))):!wm(t._f.ref))&&O(e)}l.unMount=new Set},_updateFieldArray:(e,t=[],n,l,c=!0,u=!0)=>{if(l&&n){if(s.action=!0,u&&Array.isArray(xp(i,e))){const t=n(xp(i,e),l.argA,l.argB);c&&Yp(i,e,t)}if(u&&Array.isArray(xp(r.errors,e))){const t=n(xp(r.errors,e),l.argA,l.argB);c&&Yp(r.errors,e,t),((e,t)=>{!bp(xp(e,t)).length&&pm(e,t)})(r.errors,e)}if(d.touchedFields&&u&&Array.isArray(xp(r.touchedFields,e))){const t=n(xp(r.touchedFields,e),l.argA,l.argB);c&&Yp(r.touchedFields,e,t)}d.dirtyFields&&(r.dirtyFields=_m(o,a)),f.state.next({isDirty:S(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Yp(a,e,t)},_getFieldArray:t=>bp(xp(s.mount?a:o,t,e.shouldUnregister?xp(o,t,[]):[])),_subjects:f,_proxyFormState:d,get _fields(){return i},get _formValues(){return a},get _stateFlags(){return s},set _stateFlags(e){s=e},get _defaultValues(){return o},get _names(){return l},set _names(e){l=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:k,register:R,handleSubmit:(e,t)=>async o=>{o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let s=!0,l=Wp(a);f.state.next({isSubmitting:!0});try{if(n.resolver){const{errors:e,values:t}=await w();r.errors=e,l=t}else await x(i);Bp(r.errors)?(f.state.next({errors:{},isSubmitting:!0}),await e(l,o)):(t&&await t({...r.errors},o),P())}catch(e){throw s=!1,e}finally{r.isSubmitted=!0,f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Bp(r.errors)&&s,submitCount:r.submitCount+1,errors:r.errors})}},watch:(e,t)=>em(e)?f.watch.subscribe({next:n=>e(M(void 0,t),n)}):M(e,t,!0),setValue:E,getValues:T,reset:(t,n)=>((t,n={})=>{const c=t||o,u=Wp(c),h=t&&!Bp(t)?u:o;if(n.keepDefaultValues||(o=c),!n.keepValues){if(n.keepDirtyValues)for(const e of l.mount)xp(r.dirtyFields,e)?Yp(h,e,xp(a,e)):E(e,xp(h,e));else{if(Vp&&wp(t))for(const e of l.mount){const t=xp(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(ym(e)){const t=e.closest("form");if(t){t.reset();break}}}}i={}}a=e.shouldUnregister?n.keepDefaultValues?Wp(o):{}:u,f.array.next({values:h}),f.watch.next({values:h})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!d.isValid||!!n.keepIsValid,s.watch=!!e.shouldUnregister,f.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:n.keepDirty||n.keepDirtyValues?r.isDirty:!(!n.keepDefaultValues||vm(t,o)),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:n.keepDirty||n.keepDirtyValues?r.dirtyFields:n.keepDefaultValues&&t?_m(o,t):{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})})(em(t)?t(a):t,n),resetField:(e,t={})=>{xp(i,e)&&(wp(t.defaultValue)?E(e,xp(o,e)):(E(e,t.defaultValue),Yp(o,e,t.defaultValue)),t.keepTouched||pm(r.touchedFields,e),t.keepDirty||(pm(r.dirtyFields,e),r.isDirty=t.defaultValue?S(e,xp(o,e)):S()),t.keepError||(pm(r.errors,e),d.isValid&&g()),f.state.next({...r}))},clearErrors:e=>{e?Fp(e).forEach((e=>pm(r.errors,e))):r.errors={},f.state.next({errors:r.errors})},unregister:O,setError:(e,t,n)=>{const o=(xp(i,e,{_f:{}})._f||{}).ref;Yp(r.errors,e,{...t,ref:o}),f.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},setFocus:(e,t={})=>{const n=xp(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:I}}function Om(e={}){const t=r(u).useRef(),[n,i]=r(u).useState({isDirty:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:e.defaultValues});t.current||(t.current={...Im(e),formState:n});const o=t.current.control;return o._options=e,Up({subject:o._subjects.state,callback:r(u).useCallback((e=>{jp(e,o._proxyFormState,!0)&&(o._formState={...o._formState,...e},i({...o._formState}))}),[o])}),r(u).useEffect((()=>{o._stateFlags.mount||(o._proxyFormState.isValid&&o._updateValid(),o._stateFlags.mount=!0),o._stateFlags.watch&&(o._stateFlags.watch=!1,o._subjects.state.next({})),o._removeUnmounted()})),r(u).useEffect((()=>{n.submitCount&&o._focusError()}),[o,n.submitCount]),t.current.formState=Dp(n,o),t.current}var Rm=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:[(0,s.jsx)("path",{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}),(0,s.jsx)("path",{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"})]});var Pm=({pwdOrTokens:e,setPwdOrTokens:t,onFinish:n,minimumNumberOfRecoveryTokens:r=1,showTokens:i=!0,openModal:o=!1,withModal:a=!1})=>{var l;const{t:c}=Ce(),{register:d,handleSubmit:f,formState:{errors:h},setError:p}=Om(),[m,g]=(0,u.useState)(1),[v,y]=(0,u.useState)(!!e),b=(0,s.jsxs)("form",{name:"memoriAuth",onSubmit:f((t=>{var i,o,a;"password"===e&&!(null===(i=t.password)||void 0===i?void 0:i.length)||"tokens"===e&&(((null===(o=null==t?void 0:t.tokens)||void 0===o?void 0:o.length)||0)<r||!(null===(a=null==t?void 0:t.tokens)||void 0===a?void 0:a.every((e=>e.length))))?p("tokens",{type:"minLength",message:"Tokens"}):n&&n(t).then((()=>{y(!1)}))})),className:"memori-auth-widget--form",children:[("password"===e||!i)&&(0,s.jsxs)("fieldset",{className:"memori-auth-widget--password-fieldset",children:[(0,s.jsxs)("label",{children:["Password:"," ",(0,s.jsx)("input",{className:"memori-auth-widget--input",required:!0,type:"password",placeholder:"Password",...d("password",{required:!0})})]}),i&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("hr",{}),(0,s.jsx)(Qd,{outlined:!0,onClick:()=>t("tokens"),children:c("auth.useRecoveryTokens")||"Recovery tokens"})]})]}),"tokens"===e&&i&&(0,s.jsxs)("fieldset",{className:"memori-auth-widget--tokens-fieldset",name:"tokens",children:[(0,s.jsxs)("legend",{children:[c("auth.tokens"),": "]}),(w=m,Array.from({length:w},((e,t)=>t))).map((e=>(0,s.jsx)("label",{className:"memori-auth-widget--token",children:(0,s.jsx)("input",{type:"password",className:"memori-auth-widget--input",placeholder:"Recovery token",required:!0,autoComplete:"off",...d(`tokens.${e}`,{required:!0})})},e))),(0,s.jsx)(Qd,{onClick:()=>g((e=>e+1)),className:"memori-auth-widget--token-add",icon:(0,s.jsx)(Rm,{}),children:c("auth.addToken")||"Add token"}),(0,s.jsx)("hr",{}),(0,s.jsx)(Qd,{outlined:!0,onClick:()=>t("password"),children:c("auth.usePassword")||"Password"})]}),"minLength"===(null===(l=h.tokens)||void 0===l?void 0:l.type)&&(0,s.jsxs)("div",{className:"memori-auth-widget--error",children:[c("auth.atLeast")||"At least"," ",r]}),(0,s.jsx)(Qd,{htmlType:"submit",primary:!0,className:"memori-auth-widget--submit",children:c("confirm")||"Submit"})]});var w;return a?(0,s.jsx)(dp,{open:o||v,title:c("auth.title")||"Authentication",onClose:()=>t(null),closable:!1,children:b}):b};u=a("85Hg2"),Kd=a("4IUwl"),u=a("85Hg2");const Nm=()=>{let e=!1;if("maxTouchPoints"in navigator)e=navigator.maxTouchPoints>0;else if("msMaxTouchPoints"in navigator)e=navigator.msMaxTouchPoints>0;else{const n=window&&"matchMedia"in window&&matchMedia("(pointer:coarse)");if(n&&"(pointer:coarse)"===n.media)e=!!n.matches;else if("orientation"in window)e=!0;else{var t=null===navigator||void 0===navigator?void 0:navigator.userAgent;e=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(t)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(t)}}return e},Lm=()=>{var e;let t=(null===(e=null===navigator||void 0===navigator?void 0:navigator.userAgentData)||void 0===e?void 0:e.platform)||(null===navigator||void 0===navigator?void 0:navigator.platform)||"unknown",n=(null===navigator||void 0===navigator?void 0:navigator.userAgent)||"unknown";return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(t)||n.includes("Mac")&&"ontouchend"in document};const Dm=e=>e.slice(0,e.length/2).trim().toLowerCase()===e.slice(e.length/2+1).trim().toLowerCase()?e.slice(0,e.length/2):e,Bm=e=>e.replaceAll(/[^\p{L}\p{N}\p{P}\p{Z}^$\n]/gu,"").trim(),jm=({type:e,resourceURI:t,sessionID:n,baseURL:r="",apiURL:i=""})=>{let o="cover"===e?`${r}/images/memoriCover.png`:`${r}/images/memoriAvatar.png?v=20231208`;try{return t&&0!==t.length?t.includes("memoriai/memory")&&!t.includes("memori-ai-session-id")&&n?`${t}?memori-ai-session-id=${n}`:(t.startsWith("https://")||t.startsWith("http://"))&&(new URL(t).hostname.includes("memori.ai")||new URL(t).hostname.includes("aclambda.online"))?`${t}${t.endsWith("/")||!n?"":"/"}${n||""}`:t.startsWith("cloud://")?`${(null==i?void 0:i.replace(/v2/,"v1"))||""}/CloudAsset/${t.replace("cloud://","")}`:t.startsWith("guid://")?`${(null==i?void 0:i.replace(/v2/,"v1"))||""}/GuidAsset/${t.replace("guid://","")}`:t||o:o}catch(e){return t||o}};Kd=a("4IUwl");var Fm=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M858.5 763.6a374 374 0 0 0-80.6-119.5 375.63 375.63 0 0 0-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 0 0-80.6 119.5A371.7 371.7 0 0 0 136 901.8a8 8 0 0 0 8 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 0 0 8-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"})});var Um=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",className:e,"aria-label":t,children:(0,s.jsxs)("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",children:[(0,s.jsx)("path",{fillRule:"evenodd",d:"M0 4a4 4 0 014-4h16a4 4 0 014 4v16a4 4 0 01-4 4H4a4 4 0 01-4-4zm4-2.4A2.4 2.4 0 001.6 4v16A2.4 2.4 0 004 22.4h16a2.4 2.4 0 002.4-2.4V4A2.4 2.4 0 0020 1.6z",clipRule:"evenodd"}),(0,s.jsx)("path",{fillRule:"evenodd",d:"M9.715 8.442a.798.798 0 00-1.43 0l-3.2 6.4a.799.799 0 101.431.716l.579-1.158h3.811l.578 1.158a.8.8 0 001.431-.716zm.391 4.358L9 10.589 7.894 12.8z",clipRule:"evenodd"}),(0,s.jsx)("path",{fillRule:"evenodd",d:"M17 8c.552 0 1 .358 1 .8v6.4c0 .442-.448.8-1 .8s-1-.358-1-.8V8.8c0-.442.448-.8 1-.8z",clipRule:"evenodd"})]})});Kd=a("4IUwl");var zm=({content:e,className:t,align:n="right",disabled:i=!1,visible:o=!1,children:a})=>(0,s.jsxs)("div",{className:r(Kd)("memori-tooltip",`memori-tooltip--align-${n}`,t,{"memori-tooltip--disabled":i,"memori-tooltip--visible":o}),children:[(0,s.jsx)("div",{className:"memori-tooltip--content",children:e}),(0,s.jsx)("div",{className:"memori-tooltip--trigger",children:a})]});u=a("85Hg2"),u=a("85Hg2");var Hm=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Hm||{});function Vm(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=null!=r?r:-1,o=(()=>{switch(e.focus){case 0:return n.findIndex((e=>!t.resolveDisabled(e)));case 1:{let e=n.slice().reverse().findIndex(((e,n,r)=>!(-1!==i&&r.length-n-1>=i)&&!t.resolveDisabled(e)));return-1===e?e:n.length-1-e}case 2:return n.findIndex(((e,n)=>!(n<=i)&&!t.resolveDisabled(e)));case 3:{let e=n.slice().reverse().findIndex((e=>!t.resolveDisabled(e)));return-1===e?e:n.length-1-e}case 4:return n.findIndex((n=>t.resolveId(n)===e.id));case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}})();return-1===o?r:o}u=a("85Hg2");function Wm({container:e,accept:t,walk:n,enabled:r=!0}){let i=(0,u.useRef)(t),o=(0,u.useRef)(n);(0,u.useEffect)((()=>{i.current=t,o.current=n}),[t,n]),pf((()=>{if(!e||!r)return;let t=rh(e);if(!t)return;let n=i.current,a=o.current,s=Object.assign((e=>n(e)),{acceptNode:n}),l=t.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,s,!1);for(;l.nextNode();)a(l.currentNode)}),[e,r,i,o])}u=a("85Hg2");function Gm(e){var t;if(e.type)return e.type;let n=null!=(t=e.as)?t:"button";return"string"==typeof n&&"button"===n.toLowerCase()?"button":void 0}function qm(e,t){let[n,r]=(0,u.useState)((()=>Gm(e)));return pf((()=>{r(Gm(e))}),[e.type,e.as]),pf((()=>{n||!t.current||t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")}),[n,t]),n}var Km=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Km||{}),Ym=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Ym||{}),Jm=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(Jm||{});function Qm(e,t=(e=>e)){let n=null!==e.activeItemIndex?e.items[e.activeItemIndex]:null,r=mh(t(e.items.slice()),(e=>e.dataRef.current.domRef.current)),i=n?r.indexOf(n):null;return-1===i&&(i=null),{items:r,activeItemIndex:i}}let Xm={1:e=>1===e.menuState?e:{...e,activeItemIndex:null,menuState:1},0:e=>0===e.menuState?e:{...e,menuState:0},2:(e,t)=>{var n;let r=Qm(e),i=Vm(t,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:i,activationTrigger:null!=(n=t.trigger)?n:1}},3:(e,t)=>{let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeItemIndex?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find((e=>{var t;return(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))&&!e.dataRef.current.disabled})),o=i?e.items.indexOf(i):-1;return-1===o||o===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:o,activationTrigger:1}},4:e=>""===e.searchQuery?e:{...e,searchQuery:"",searchActiveItemIndex:null},5:(e,t)=>{let n=Qm(e,(e=>[...e,{id:t.id,dataRef:t.dataRef}]));return{...e,...n}},6:(e,t)=>{let n=Qm(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...n,activationTrigger:1}}},Zm=(0,u.createContext)(null);function $m(e){let t=(0,u.useContext)(Zm);if(null===t){let t=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,$m),t}return t}function eg(e,t){return Xd(t.type,Xm,e,t)}Zm.displayName="MenuContext";let tg=u.Fragment,ng=af((function(e,t){let n=(0,u.useReducer)(eg,{menuState:1,buttonRef:(0,u.createRef)(),itemsRef:(0,u.createRef)(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:i,itemsRef:o,buttonRef:a},s]=n,l=Sf(t);Yh([a,o],((e,t)=>{var n;s({type:1}),dh(t,uh.Loose)||(e.preventDefault(),null==(n=a.current)||n.focus())}),0===i);let c=bf((()=>{s({type:1})})),d=(0,u.useMemo)((()=>({open:0===i,close:c})),[i,c]),f=e,h={ref:l};return r(u).createElement(Zm.Provider,{value:n},r(u).createElement(ff,{value:Xd(i,{0:uf.Open,1:uf.Closed})},nf({ourProps:h,theirProps:f,slot:d,defaultTag:tg,name:"Menu"})))})),rg=af((function(e,t){var n;let[r,i]=$m("Menu.Button"),o=Sf(r.buttonRef,t),a=`headlessui-menu-button-${eh()}`,s=Of(),l=bf((e=>{switch(e.key){case Jf.Space:case Jf.Enter:case Jf.ArrowDown:e.preventDefault(),e.stopPropagation(),i({type:0}),s.nextFrame((()=>i({type:2,focus:Hm.First})));break;case Jf.ArrowUp:e.preventDefault(),e.stopPropagation(),i({type:0}),s.nextFrame((()=>i({type:2,focus:Hm.Last})))}})),c=bf((e=>{if(e.key===Jf.Space)e.preventDefault()})),d=bf((t=>{if(Qf(t.currentTarget))return t.preventDefault();e.disabled||(0===r.menuState?(i({type:1}),s.nextFrame((()=>{var e;return null==(e=r.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))):(t.preventDefault(),i({type:0})))})),f=(0,u.useMemo)((()=>({open:0===r.menuState})),[r]),h=e;return nf({ourProps:{ref:o,id:a,type:qm(e,r.buttonRef),"aria-haspopup":!0,"aria-controls":null==(n=r.itemsRef.current)?void 0:n.id,"aria-expanded":e.disabled?void 0:0===r.menuState,onKeyDown:l,onKeyUp:c,onClick:d},theirProps:h,slot:f,defaultTag:"button",name:"Menu.Button"})})),ig=ef.RenderStrategy|ef.Static,og=af((function(e,t){var n,r;let[i,o]=$m("Menu.Items"),a=Sf(i.itemsRef,t),s=xh(i.itemsRef),l=`headlessui-menu-items-${eh()}`,c=Of(),d=df(),f=null!==d?d===uf.Open:0===i.menuState;(0,u.useEffect)((()=>{let e=i.itemsRef.current;!e||0===i.menuState&&e!==(null==s?void 0:s.activeElement)&&e.focus({preventScroll:!0})}),[i.menuState,i.itemsRef,s]),Wm({container:i.itemsRef.current,enabled:0===i.menuState,accept:e=>"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let h=bf((e=>{var t,n;switch(c.dispose(),e.key){case Jf.Space:if(""!==i.searchQuery)return e.preventDefault(),e.stopPropagation(),o({type:3,value:e.key});case Jf.Enter:if(e.preventDefault(),e.stopPropagation(),o({type:1}),null!==i.activeItemIndex){let{dataRef:e}=i.items[i.activeItemIndex];null==(n=null==(t=e.current)?void 0:t.domRef.current)||n.click()}fh(i.buttonRef.current);break;case Jf.ArrowDown:return e.preventDefault(),e.stopPropagation(),o({type:2,focus:Hm.Next});case Jf.ArrowUp:return e.preventDefault(),e.stopPropagation(),o({type:2,focus:Hm.Previous});case Jf.Home:case Jf.PageUp:return e.preventDefault(),e.stopPropagation(),o({type:2,focus:Hm.First});case Jf.End:case Jf.PageDown:return e.preventDefault(),e.stopPropagation(),o({type:2,focus:Hm.Last});case Jf.Escape:e.preventDefault(),e.stopPropagation(),o({type:1}),Af().nextFrame((()=>{var e;return null==(e=i.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case Jf.Tab:e.preventDefault(),e.stopPropagation(),o({type:1}),Af().nextFrame((()=>{gh(i.buttonRef.current,e.shiftKey?ah.Previous:ah.Next)}));break;default:1===e.key.length&&(o({type:3,value:e.key}),c.setTimeout((()=>o({type:4})),350))}})),p=bf((e=>{if(e.key===Jf.Space)e.preventDefault()})),m=(0,u.useMemo)((()=>({open:0===i.menuState})),[i]),g=e;return nf({ourProps:{"aria-activedescendant":null===i.activeItemIndex||null==(n=i.items[i.activeItemIndex])?void 0:n.id,"aria-labelledby":null==(r=i.buttonRef.current)?void 0:r.id,id:l,onKeyDown:h,onKeyUp:p,role:"menu",tabIndex:0,ref:a},theirProps:g,slot:m,defaultTag:"div",features:ig,visible:f,name:"Menu.Items"})})),ag=u.Fragment,sg=af((function(e,t){let{disabled:n=!1,...r}=e,[i,o]=$m("Menu.Item"),a=`headlessui-menu-item-${eh()}`,s=null!==i.activeItemIndex&&i.items[i.activeItemIndex].id===a,l=(0,u.useRef)(null),c=Sf(t,l);pf((()=>{if(0!==i.menuState||!s||0===i.activationTrigger)return;let e=Af();return e.requestAnimationFrame((()=>{var e,t;null==(t=null==(e=l.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})),e.dispose}),[l,s,i.menuState,i.activationTrigger,i.activeItemIndex]);let d=(0,u.useRef)({disabled:n,domRef:l});pf((()=>{d.current.disabled=n}),[d,n]),pf((()=>{var e,t;d.current.textValue=null==(t=null==(e=l.current)?void 0:e.textContent)?void 0:t.toLowerCase()}),[d,l]),pf((()=>(o({type:5,id:a,dataRef:d}),()=>o({type:6,id:a}))),[d,a]);let f=bf((()=>{o({type:1})})),h=bf((e=>{if(n)return e.preventDefault();o({type:1}),fh(i.buttonRef.current)})),p=bf((()=>{if(n)return o({type:2,focus:Hm.Nothing});o({type:2,focus:Hm.Specific,id:a})})),m=bf((()=>{n||s||o({type:2,focus:Hm.Specific,id:a,trigger:0})})),g=bf((()=>{n||!s||o({type:2,focus:Hm.Nothing})})),v=(0,u.useMemo)((()=>({active:s,disabled:n,close:f})),[s,n,f]);return nf({ourProps:{id:a,ref:c,role:"menuitem",tabIndex:!0===n?void 0:-1,"aria-disabled":!0===n||void 0,disabled:void 0,onClick:h,onFocus:p,onPointerMove:m,onMouseMove:m,onPointerLeave:g,onMouseLeave:g},theirProps:r,slot:v,defaultTag:ag,name:"Menu.Item"})})),lg=Object.assign(ng,{Button:rg,Items:og,Item:sg});var cg=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:e,"aria-label":t,children:[(0,s.jsx)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),(0,s.jsx)("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H5.17l-.59.59-.58.58V4h16v12zm-9-4h2v2h-2zm0-6h2v4h-2z"})]});const ug={"it-IT":"Non è quello che ti ho chiesto","fr-FR":"Ce n'est pas ce que je t'ai demandé","en-GB":"It's not what I asked"},dg={"it-IT":"La risposta non era corretta","fr-FR":"La réponse n'était pas correcte","en-GB":"The answer was not correct"},fg={"it-IT":"Non mi è piaciuta la risposta","fr-FR":"Je n'ai pas aimé la réponse","en-GB":"I didn't like the answer"};var hg=({memori:e,className:t,onNegativeClick:n,toggle:i=!1,dropdown:o=!1})=>{const[a,l]=(0,u.useState)(),c="it-IT"===e.culture?"it-IT":"fr-FR"===e.culture?"fr-FR":"en-GB",d=ug[c],f=dg[c],h=fg[c];return(0,s.jsx)("div",{className:"memori-chat--feedback"+(t?` ${t}`:""),children:o?(0,s.jsxs)(lg,{as:"div",className:"memori-chat--feedback-menu",children:[(0,s.jsx)(lg.Button,{as:r(u).Fragment,children:(0,s.jsx)(Qd,{ghost:!0,shape:"circle",title:"Feedback",className:"memori-chat--feedback-menu-button",disabled:!!a,icon:(0,s.jsx)(cg,{className:a?"memori-chat--feedback-clicked":void 0})})}),(0,s.jsx)(Kf,{as:r(u).Fragment,enter:"transition ease-out duration-200",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,s.jsx)(lg.Items,{className:"memori-chat--feedback-menu-items",children:(0,s.jsxs)("div",{className:"memori-chat--feedback-menu-items-container",children:[(0,s.jsx)(lg.Item,{children:({active:e})=>(0,s.jsx)("button",{className:"memori-chat--feedback-menu-item"+(e?" memori-chat--feedback-menu-item-active":""),onClick:()=>{l("up"===a&&i?void 0:"up")},children:h})},"ok"),(0,s.jsx)(lg.Item,{children:({active:e})=>(0,s.jsx)("button",{className:"memori-chat--feedback-menu-item"+(e?" memori-chat--feedback-menu-item-active":""),onClick:()=>{l("down"===a&&i?void 0:"down"),n(d)},children:f})},"no")]})})})]}):(0,s.jsx)(zm,{align:"left",content:"Feedback",children:(0,s.jsx)(Qd,{title:"Feedback",onClick:()=>{l("down"===a&&i?void 0:"down"),n(d)},ghost:!0,shape:"circle",icon:(0,s.jsx)(cg,{className:a?"memori-chat--feedback-clicked":void 0})})})})};var pg=({message:e,memori:t,tenant:n,baseUrl:i,apiUrl:o,showFeedback:a,simulateUserPrompt:l,showAIicon:c=!0,isFirst:u=!1,user:d,userAvatar:f,experts:h})=>{var p,m,g,v,y,b;const{t:w}=Ce();return(0,s.jsxs)(s.Fragment,{children:[(e.initial||u)&&(0,s.jsx)("div",{className:"memori-chat--bubble-initial"}),(0,s.jsxs)(Kf,{show:!0,appear:!0,as:"div",className:r(Kd)("memori-chat--bubble-container",{"memori-chat--bubble-from-user":!!e.fromUser,"memori-chat--with-addon":e.generatedByAI&&c||a&&l}),children:[!e.fromUser&&(0,s.jsx)(Kf.Child,{as:"picture",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),title:(null===(p=e.emitter)||void 0===p?void 0:p.length)&&t.enableBoardOfExperts?e.emitter:t.name,children:(0,s.jsx)("img",{className:"memori-chat--bubble-avatar-img",alt:(null===(m=e.emitter)||void 0===m?void 0:m.length)&&t.enableBoardOfExperts?e.emitter:t.name,src:(null===(g=e.emitter)||void 0===g?void 0:g.length)&&t.enableBoardOfExperts&&(null==h?void 0:h.find((t=>t.name===e.emitter)))?`${o}/api/v1/memoriai/memori/avatar/${null===(v=h.find((t=>t.name===e.emitter)))||void 0===v?void 0:v.expertMemoriID}`:t.avatarURL&&t.avatarURL.length>0?jm({type:"avatar",tenantID:null==n?void 0:n.id,resourceURI:t.avatarURL,baseURL:i,apiURL:o}):jm({tenantID:null==n?void 0:n.id,type:"avatar",baseURL:i||"https://app.twincreator.com",apiURL:o}),onError:e=>{e.currentTarget.src=t.avatarURL&&t.avatarURL.length>0?jm({type:"avatar",tenantID:null==n?void 0:n.id,resourceURI:t.avatarURL,baseURL:i}):jm({tenantID:null==n?void 0:n.id,type:"avatar",baseURL:i}),e.currentTarget.onerror=null}})}),(0,s.jsxs)(Kf.Child,{as:"div",className:r(Kd)("memori-chat--bubble",{"memori-chat--user-bubble":!!e.fromUser,"memori-chat--with-addon":e.generatedByAI&&c||a&&l,"memori-chat--ai-generated":e.generatedByAI&&c,"memori-chat--with-feedback":a}),enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-09 translate-x-"+(e.fromUser?"30":"-30"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-09 translate-x-"+(e.fromUser?"30":"-30"),children:[(e.translatedText||e.text).split(/\r\n|\r|\n/).map(((e,t)=>(0,s.jsx)("p",{children:e},t))),(e.generatedByAI&&c||a&&l)&&(0,s.jsxs)("div",{className:"memori-chat--bubble-addon",children:[a&&!!l&&(0,s.jsx)(hg,{memori:t,className:"memori-chat--bubble-feedback",dropdown:!0,onNegativeClick:e=>{e&&l(e)}}),e.generatedByAI&&c&&(0,s.jsx)(zm,{align:"left",content:w("generatedByAI"),className:"memori-chat--bubble-ai-icon",children:(0,s.jsx)("span",{children:(0,s.jsx)(Um,{title:w("generatedByAI")||void 0})})})]})]}),e.fromUser&&(0,s.jsx)(s.Fragment,{children:f&&"string"==typeof f||!f&&(null===(y=null==d?void 0:d.avatarURL)||void 0===y?void 0:y.length)?(0,s.jsx)(Kf.Child,{as:"picture",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),children:(0,s.jsx)("img",{className:"memori-chat--bubble-avatar-img",alt:null!==(b=null==d?void 0:d.userName)&&void 0!==b?b:"User",src:null!=f?f:null==d?void 0:d.avatarURL})}):f?(0,s.jsx)(Kf.Child,{as:"div",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),children:f}):(0,s.jsx)(Kf.Child,{as:"div",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),children:(0,s.jsx)(Fm,{})})})]})]})};u=a("85Hg2"),u=a("85Hg2");var mg,gg=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M574 665.4a8.03 8.03 0 0 0-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 0 0-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 0 0 0 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 0 0 0 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 0 0-11.3 0L372.3 598.7a8.03 8.03 0 0 0 0 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"})}),vg=(Kd=a("4IUwl"),{});mg=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function n(e,n){var r=e.el,i=e.elStyle,o=e.elHeight,a=e.rowsLimit,s=e.rowsWrapped,l=e.options,c=e.buffer,u=c;if(s===a+1)return t({},e);var d=c,f=s,h=o;return r.innerHTML=u=c.length?""+c+l.delimiter+n+l.replaceStr:""+n+l.replaceStr,parseFloat(i.height)>parseFloat(o)&&(f++,h=i.height,f===a+1)?(r.innerHTML=u="."===d[d.length-1]&&"..."===l.replaceStr?d+"..":""+d+l.replaceStr,t({},e,{elHeight:h,rowsWrapped:f})):(r.innerHTML=u=d.length?""+d+l.delimiter+n:""+n,t({},e,{buffer:u,elHeight:h,rowsWrapped:f}))}e.disableResponsive=function(e){window.removeEventListener("resize",e)},e.ellipsis=function e(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a={replaceStr:"...",responsive:!1,debounceDelay:250,delimiter:" "},s=t({},a,o),l=r&&(r instanceof NodeList?r:1===r.nodeType?[r]:document.querySelectorAll(r)),c=[],u=0;u<l.length;u++){var d=l[u];c[u]=d.innerHTML;var f=d.innerHTML.split(s.delimiter);d.innerHTML="";var h=window.getComputedStyle(d);f.reduce(n,{el:d,buffer:d.innerHTML,elStyle:h,elHeight:0,rowsLimit:i,rowsWrapped:0,options:s})}if(s.responsive){var p=!1,m=window.innerWidth,g=function(){if(window.innerWidth!==m){m=window.innerWidth;for(var n=0;n<l.length;n++)l[n].innerHTML=c[n];e(r,i,t({},o,{responsive:!1}))}},v=function(){clearTimeout(p),p=setTimeout(g,s.debounceDelay)};return window.addEventListener("resize",v),v}}},"function"==typeof define&&define.amd?define(["exports"],mg):mg(vg);Kd=a("4IUwl");var yg=({loading:e=!1,className:t,title:n,description:i,cover:o,hoverable:a=!1,children:l})=>(0,s.jsx)("div",{className:r(Kd)("memori-card",t,{"memori-card--loading":e,"memori-card--with-cover":o,"memori-card--hoverable":a}),children:(0,s.jsxs)(cp,{spinning:e,children:[o&&(0,s.jsx)("div",{className:"memori-card--cover",children:o}),(0,s.jsxs)("div",{className:"memori-card--content",children:[n&&(0,s.jsx)("h3",{className:"memori-card--title",children:n}),i&&(0,s.jsx)("p",{className:"memori-card--description",children:i}),(0,s.jsx)("div",{className:"memori-card--children",children:l})]})]})});const bg=({isChild:e=!1,item:t,baseUrl:n,onLinkPreviewInfo:i,descriptionOneLine:o=!1})=>{var a,l,c,d;const[f,h]=(0,u.useState)(null),p=(null===(a=t.url)||void 0===a?void 0:a.startsWith("http"))||!t.url||0===(null===(l=t.url)||void 0===l?void 0:l.length)?t.url:`https://${t.url}`;(0,u.useEffect)((()=>{var e,r;let o=(null===(e=t.url)||void 0===e?void 0:e.startsWith("http"))||!t.url||0===(null===(r=t.url)||void 0===r?void 0:r.length)?t.url:`https://${t.url}`;o&&o!==(null==f?void 0:f.urlKey)&&(async(e,t)=>{try{const n=await fetch(`${t||"https://app.twincreator.com"}/api/linkpreview/${encodeURIComponent(e)}`);return await n.json()}catch(e){return console.error("getSiteInfo",e),null}})(o,n).then((e=>{h(e?{...e,urlKey:o}:null),i&&e&&i(e)}))}),[null==t?void 0:t.url,n,i]);const m=t.title&&t.title.length>0?t.title:null==f?void 0:f.title,g=null==f?void 0:f.description,v=null==f?void 0:f.video,y=null!==(c=null==f?void 0:f.image)&&void 0!==c?c:null===(d=null==f?void 0:f.images)||void 0===d?void 0:d[0];return(0,u.useEffect)((()=>{setTimeout((()=>{(0,vg.ellipsis)(".memori-link-item--card .memori-card--description",3,{responsive:!0})}),300)}),[g,t.mediumID]),(0,s.jsx)("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:r(Kd)("memori-link-item--link",{"memori-link-item--link--child":e}),onClick:t=>{e||(t.preventDefault(),t.stopPropagation(),window.open(p,"_blank",`toolbar=yes,top=${.1*window.innerHeight},left=${.1*window.innerWidth},width=${.8*window.innerWidth},height=${.8*window.innerHeight}`))},children:(0,s.jsx)(yg,{hoverable:!0,className:r(Kd)("memori-link-item--card",{"memori-link-item--card-description-oneline":o,"memori-link-item--card-has-image":y,"memori-link-item--card-has-video":v}),cover:v?(0,s.jsx)("iframe",{width:"100%",height:"100%",src:v,title:"Video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}):y?(0,s.jsx)("img",{className:"memori-link-item--card-cover-img",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==",srcSet:y.includes("data:image")?void 0:y,alt:t.title}):(0,s.jsx)("div",{className:"memori-link-item--card-cover-icon",children:(0,s.jsx)(gg,{className:"memori-link-item--icon"})}),title:m,description:g})})};var wg=({items:e,baseUrl:t,descriptionOneLine:n=!1,onLinkPreviewInfo:r})=>(0,s.jsx)(Kf,{appear:!0,show:!0,as:"div",className:"memori-link-items",children:(0,s.jsx)("div",{className:"memori-link-items--grid",children:e.map(((e,i)=>(0,s.jsx)(Kf.Child,{as:"div",className:"memori-link-item",enter:"ease-out duration-500 delay-"+100*i,enterFrom:"opacity-0 scale-95",enterTo:"opacity-1 scale-100",leave:"ease-in duration-300",leaveFrom:"opacity-1 scale-100",leaveTo:"opacity-0 scale-95",children:(0,s.jsx)(bg,{item:e,baseUrl:t,descriptionOneLine:n,onLinkPreviewInfo:r})},e.mediumID)))})});u=a("85Hg2");const xg=["va bene","no grazie","si","no","sì","arrivederci","non c'entrava","non mi è piaciuto"],Sg=async(e,t,n,r)=>{var i;const o=xg.indexOf(e.toLowerCase())>-1?"IT":null==n?void 0:n.toUpperCase(),a=await fetch(`${r||"https://app.twincreator.com"}/api/translate?text=${encodeURIComponent(e)}&target_lang=${t.toUpperCase()}${o?`&source_lang=${o}`:""}`,{method:"GET",headers:{Accept:"*/*"}}),s=await a.json();return null===(i=null==s?void 0:s.translations)||void 0===i?void 0:i[0]},Mg=[{value:"IT",label:"Italiano"},{value:"EN",label:"English"},{value:"DE",label:"Deutsch"},{value:"ES",label:"Español"},{value:"FR",label:"Français"},{value:"PT",label:"Português"},{value:"UK",label:"Українська"},{value:"RU",label:"Русский"},{value:"PL",label:"Polski"},{value:"FI",label:"Suomi"}],_g=["image/jpeg","image/png","image/jpg","image/gif","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/pdf","video/mp4","video/avi","audio/mpeg3","audio/wav","audio/mpeg","video/mpeg","model/gltf-binary"],Ag="👤",Eg=[{name:"text",lang:"text",mimeType:"text/plain",monacoLang:"plaintext",executable:!0},{name:"javascript/jsx",lang:"jsx",mimeType:"text/javascript",monacoLang:"javascript",executable:!0},{name:"typescript/tsx",lang:"tsx",mimeType:"text/ecmascript",monacoLang:"typescript",executable:!0},{name:"json",lang:"json",mimeType:"application/json",monacoLang:"json",executable:!0},{name:"css",lang:"scss",mimeType:"text/css",monacoLang:"css",executable:!0},{name:"html/xml",lang:"tsx",mimeType:"application/xml",monacoLang:"xml"},{name:"bash",lang:"bash",mimeType:"application/x-sh",monacoLang:"shell"},{name:"python",lang:"python",mimeType:"text/x-python",monacoLang:"python"},{name:"cpp/csharp",lang:"cpp",mimeType:"text/x-c++src",monacoLang:"cpp"},{name:"php",lang:"php",mimeType:"application/x-php",monacoLang:"php"},{name:"ruby",lang:"ruby",mimeType:"text/x-ruby",monacoLang:"ruby"},{name:"sql",lang:"sql",mimeType:"text/x-sql",monacoLang:"sql"}];u=a("85Hg2");var Cg=({src:e,poster:t,alt:n=""})=>((0,u.useEffect)((()=>{const e=document.createElement("script");return e.src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js",e.type="module",document.head.appendChild(e),()=>{document.head.removeChild(e)}}),[]),(0,s.jsx)("div",{className:"model-viewer",children:(0,s.jsx)("model-viewer",{src:e,"ios-src":"",poster:t,alt:n,"shadow-intensity":"1","disable-zoom":!0,"camera-controls":!0,autoplay:!0})}));var kg=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"})}),Tg={};function Ig(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}(Tg=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Ig(o,r,i,a,s,"next",e)}function s(e){Ig(o,r,i,a,s,"throw",e)}a(void 0)}))}}).__esModule=!0,Tg.default=Tg;var Og={};function Rg(){return Og=Rg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Og.__esModule=!0,Og.default=Og,Rg.apply(this,arguments)}(Og=Rg).__esModule=!0,Og.default=Og;var Pg={};(Pg=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}).__esModule=!0,Pg.default=Pg;var Ng={},Lg={},Dg=a("7h3ED").default,Bg={},jg=a("7h3ED").default;function Fg(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,Lg(r.key),r)}}(Bg=function(e,t){if("object"!==jg(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==jg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}).__esModule=!0,Bg.default=Bg,(Lg=function(e){var t=Bg(e,"string");return"symbol"===Dg(t)?t:String(t)}).__esModule=!0,Lg.default=Lg,(Ng=function(e,t,n){return t&&Fg(e.prototype,t),n&&Fg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}).__esModule=!0,Ng.default=Ng;var Ug={},zg={};function Hg(e,t){return zg=Hg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zg.__esModule=!0,zg.default=zg,Hg(e,t)}(zg=Hg).__esModule=!0,zg.default=zg,(Ug=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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zg(e,t)}).__esModule=!0,Ug.default=Ug;var Vg={},Wg=a("7h3ED").default,Gg={};(Gg=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}).__esModule=!0,Gg.default=Gg,(Vg=function(e,t){if(t&&("object"===Wg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Gg(e)}).__esModule=!0,Vg.default=Vg;var qg={};function Kg(e){return qg=Kg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qg.__esModule=!0,qg.default=qg,Kg(e)}(qg=Kg).__esModule=!0,qg.default=qg;var Yg={};(Yg=function(e,t,n){return(t=Lg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}).__esModule=!0,Yg.default=Yg;var Jg,Qg=a("6EIcq")();Jg=Qg;try{regeneratorRuntime=Qg}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=Qg:Function("r","regeneratorRuntime = r")(Qg)}u=a("85Hg2");var Xg={},Zg={};(Zg=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}).__esModule=!0,Zg.default=Zg,(Xg=function(e,t){if(null==e)return{};var n,r,i=Zg(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}).__esModule=!0,Xg.default=Xg;var $g={},ev={},tv={};(tv=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}).__esModule=!0,tv.default=tv,(ev=function(e){if(Array.isArray(e))return tv(e)}).__esModule=!0,ev.default=ev;var nv={};(nv=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}).__esModule=!0,nv.default=nv;var rv={};rv=function(e,t){if(e){if("string"==typeof e)return tv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tv(e,t):void 0}},rv.__esModule=!0,rv.default=rv;var iv={};(iv=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}).__esModule=!0,iv.default=iv,($g=function(e){return ev(e)||nv(e)||rv(e)||iv()}).__esModule=!0,$g.default=$g;u=a("85Hg2"),u=a("85Hg2");function ov(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function av(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ov(Object(n),!0).forEach((function(t){r(Yg)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ov(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var sv={};function lv(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return sv[r]||(sv[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),sv[r]}function cv(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=e.filter((function(e){return"token"!==e})),i=lv(r);return i.reduce((function(e,t){return av(av({},e),n[t])}),t)}function uv(e){return e.join(" ")}function dv(e){var t=e.node,n=e.stylesheet,i=e.style,o=void 0===i?{}:i,a=e.useInlineStyles,s=e.key,l=t.properties,c=t.type,d=t.tagName,f=t.value;if("text"===c)return f;if(d){var h,p=function(e,t){var n=0;return function(r){return n+=1,r.map((function(r,i){return dv({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})}))}}(n,a);if(a){var m=Object.keys(n).reduce((function(e,t){return t.split(".").forEach((function(t){e.includes(t)||e.push(t)})),e}),[]),g=l.className&&l.className.includes("token")?["token"]:[],v=l.className&&g.concat(l.className.filter((function(e){return!m.includes(e)})));h=av(av({},l),{},{className:uv(v)||void 0,style:cv(l.className,Object.assign({},l.style,o),n)})}else h=av(av({},l),{},{className:uv(l.className)});var y=p(t.children);return r(u).createElement(d,r(Og)({key:s},h),y)}}var fv=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function hv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hv(Object(n),!0).forEach((function(t){r(Yg)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var mv=/\n/g;function gv(e){var t=e.codeString,n=e.codeStyle,i=e.containerStyle,o=void 0===i?{float:"left",paddingRight:"10px"}:i,a=e.numberStyle,s=void 0===a?{}:a,l=e.startingLineNumber;return r(u).createElement("code",{style:Object.assign({},n,o)},function(e){var t=e.lines,n=e.startingLineNumber,i=e.style;return t.map((function(e,t){var o=t+n;return r(u).createElement("span",{key:"line-".concat(t),className:"react-syntax-highlighter-line-number",style:"function"==typeof i?i(o):i},"".concat(o,"\n"))}))}({lines:t.replace(/\n$/,"").split("\n"),style:s,startingLineNumber:l}))}function vv(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function yv(e,t,n){var r,i={display:"inline-block",minWidth:(r=n,"".concat(r.toString().length,".25em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},o="function"==typeof e?e(t):e;return pv(pv({},i),o)}function bv(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,o=e.showInlineLineNumbers,a=e.lineProps,s=void 0===a?{}:a,l=e.className,c=void 0===l?[]:l,u=e.showLineNumbers,d=e.wrapLongLines,f="function"==typeof s?s(n):s;if(f.className=c,n&&o){var h=yv(r,n,i);t.unshift(vv(n,h))}return d&u&&(f.style=pv(pv({},f.style),{},{display:"flex"})),{type:"element",tagName:"span",properties:f,children:t}}function wv(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=0;i<e.length;i++){var o=e[i];if("text"===o.type)n.push(bv({children:[o],className:r($g)(new Set(t))}));else if(o.children){var a=t.concat(o.properties.className);wv(o.children,a).forEach((function(e){return n.push(e)}))}}return n}function xv(e,t,n,r,i,o,a,s,l){var c,u=wv(e.value),d=[],f=-1,h=0;function p(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return bv({children:e,lineNumber:t,lineNumberStyle:s,largestLineNumber:a,showInlineLineNumbers:i,lineProps:n,className:o,showLineNumbers:r,wrapLongLines:l})}function m(e,t){if(r&&t&&i){var n=yv(s,t,a);e.unshift(vv(t,n))}return e}function g(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||r.length>0?p(e,n,r):m(e,n)}for(var v=function(){var e=u[h],t=e.children[0].value;if(t.match(mv)){var n=t.split("\n");n.forEach((function(t,i){var a=r&&d.length+o,s={type:"text",value:"".concat(t,"\n")};if(0===i){var l=g(u.slice(f+1,h).concat(bv({children:[s],className:e.properties.className})),a);d.push(l)}else if(i===n.length-1){var c=u[h+1]&&u[h+1].children&&u[h+1].children[0],p={type:"text",value:"".concat(t)};if(c){var m=bv({children:[p],className:e.properties.className});u.splice(h+1,0,m)}else{var v=g([p],a,e.properties.className);d.push(v)}}else{var y=g([s],a,e.properties.className);d.push(y)}})),f=h}h++};h<u.length;)v();if(f!==u.length-1){var y=u.slice(f+1,u.length);if(y&&y.length){var b=g(y,r&&d.length+o);d.push(b)}}return t?d:(c=[]).concat.apply(c,d)}function Sv(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map((function(e,t){return dv({node:e,stylesheet:n,useInlineStyles:r,key:"code-segement".concat(t)})}))}function Mv(e){return e&&void 0!==e.highlightAuto}function _v(e,t){return function(n){var i=n.language,o=n.children,a=n.style,s=void 0===a?t:a,l=n.customStyle,c=void 0===l?{}:l,d=n.codeTagProps,f=void 0===d?{className:i?"language-".concat(i):void 0,style:pv(pv({},s['code[class*="language-"]']),s['code[class*="language-'.concat(i,'"]')])}:d,h=n.useInlineStyles,p=void 0===h||h,m=n.showLineNumbers,g=void 0!==m&&m,v=n.showInlineLineNumbers,y=void 0===v||v,b=n.startingLineNumber,w=void 0===b?1:b,x=n.lineNumberContainerStyle,S=n.lineNumberStyle,M=void 0===S?{}:S,_=n.wrapLines,A=n.wrapLongLines,E=void 0!==A&&A,C=n.lineProps,k=void 0===C?{}:C,T=n.renderer,I=n.PreTag,O=void 0===I?"pre":I,R=n.CodeTag,P=void 0===R?"code":R,N=n.code,L=void 0===N?(Array.isArray(o)?o[0]:o)||"":N,D=n.astGenerator,B=r(Xg)(n,fv);D=D||e;var j=g?r(u).createElement(gv,{containerStyle:x,codeStyle:f.style||{},numberStyle:M,startingLineNumber:w,codeString:L}):null,F=s.hljs||s['pre[class*="language-"]']||{backgroundColor:"#fff"},U=Mv(D)?"hljs":"prismjs",z=p?Object.assign({},B,{style:Object.assign({},F,c)}):Object.assign({},B,{className:B.className?"".concat(U," ").concat(B.className):U,style:Object.assign({},c)});if(f.style=pv(pv({},f.style),{},E?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"}),!D)return r(u).createElement(O,z,j,r(u).createElement(P,f,L));(void 0===_&&T||E)&&(_=!0),T=T||Sv;var H=[{type:"text",value:L}],V=function(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(Mv(t)){var o=function(e,t){return-1!==e.listLanguages().indexOf(t)}(t,n);return"text"===n?{value:i,language:"text"}:o?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:i}}catch(e){return{value:i}}}({astGenerator:D,language:i,code:L,defaultCodeValue:H});null===V.language&&(V.value=H);var W=xv(V,_,k,g,y,w,V.value.length+w,M,E);return r(u).createElement(O,z,r(u).createElement(P,f,!y&&j,T({rows:W,stylesheet:s,useInlineStyles:p})))}}function Av(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=r(qg)(e);if(t){var o=r(qg)(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return r(Vg)(this,n)}}var Ev,Cv,kv,Tv,Iv,Ov,Rv,Pv=function(e,t){return function(){var n=r(Tg)(r(Jg).mark((function n(i){var o;return r(Jg).wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t();case 2:o=n.sent,i(e,o.default||o);case 4:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()},Nv={abap:Pv("abap",(function(){return a("bwHpE")})),abnf:Pv("abnf",(function(){return a("daD87")})),actionscript:Pv("actionscript",(function(){return a("lpEgO")})),ada:Pv("ada",(function(){return a("1sGW9")})),agda:Pv("agda",(function(){return a("e9VyR")})),al:Pv("al",(function(){return a("kMFSe")})),antlr4:Pv("antlr4",(function(){return a("8HlsP")})),apacheconf:Pv("apacheconf",(function(){return a("isFCh")})),apex:Pv("apex",(function(){return a("gUXVM")})),apl:Pv("apl",(function(){return a("2L15v")})),applescript:Pv("applescript",(function(){return a("8XyFT")})),aql:Pv("aql",(function(){return a("gFWTI")})),arduino:Pv("arduino",(function(){return a("jI3VB")})),arff:Pv("arff",(function(){return a("6uYTH")})),asciidoc:Pv("asciidoc",(function(){return a("gdYKH")})),asm6502:Pv("asm6502",(function(){return a("ahFLg")})),asmatmel:Pv("asmatmel",(function(){return a("4irIu")})),aspnet:Pv("aspnet",(function(){return a("yDC6n")})),autohotkey:Pv("autohotkey",(function(){return a("a4xpy")})),autoit:Pv("autoit",(function(){return a("iNSix")})),avisynth:Pv("avisynth",(function(){return a("kEBnk")})),avroIdl:Pv("avroIdl",(function(){return a("lzthi")})),bash:Pv("bash",(function(){return Promise.resolve(a("3aDLI"))})),basic:Pv("basic",(function(){return a("cxDu6")})),batch:Pv("batch",(function(){return a("6zDll")})),bbcode:Pv("bbcode",(function(){return a("bPS87")})),bicep:Pv("bicep",(function(){return a("8dy5f")})),birb:Pv("birb",(function(){return a("3vHrY")})),bison:Pv("bison",(function(){return a("bCjBS")})),bnf:Pv("bnf",(function(){return a("4NqDW")})),brainfuck:Pv("brainfuck",(function(){return a("4s0KX")})),brightscript:Pv("brightscript",(function(){return a("jTsQ4")})),bro:Pv("bro",(function(){return a("5lMc2")})),bsl:Pv("bsl",(function(){return a("jBYxC")})),c:Pv("c",(function(){return Promise.resolve(a("lyZgY"))})),cfscript:Pv("cfscript",(function(){return a("coZDy")})),chaiscript:Pv("chaiscript",(function(){return a("e1zEN")})),cil:Pv("cil",(function(){return a("crKoM")})),clike:Pv("clike",(function(){return a("4kO9t")})),clojure:Pv("clojure",(function(){return a("01SpB")})),cmake:Pv("cmake",(function(){return a("9yG4p")})),cobol:Pv("cobol",(function(){return a("967Hn")})),coffeescript:Pv("coffeescript",(function(){return a("7Yi6H")})),concurnas:Pv("concurnas",(function(){return a("5tXmX")})),coq:Pv("coq",(function(){return a("ektdr")})),cpp:Pv("cpp",(function(){return Promise.resolve(a("lR39A"))})),crystal:Pv("crystal",(function(){return a("8gt4L")})),csharp:Pv("csharp",(function(){return a("7K6eJ")})),cshtml:Pv("cshtml",(function(){return a("cVu4i")})),csp:Pv("csp",(function(){return a("ecKo1")})),cssExtras:Pv("cssExtras",(function(){return a("gnpv8")})),css:Pv("css",(function(){return a("jx0H8")})),csv:Pv("csv",(function(){return a("f9kmW")})),cypher:Pv("cypher",(function(){return a("lojor")})),d:Pv("d",(function(){return a("6Qa0U")})),dart:Pv("dart",(function(){return a("74K1B")})),dataweave:Pv("dataweave",(function(){return a("93H6c")})),dax:Pv("dax",(function(){return a("cf9Y9")})),dhall:Pv("dhall",(function(){return a("f6UWv")})),diff:Pv("diff",(function(){return a("klPVo")})),django:Pv("django",(function(){return a("jfxe9")})),dnsZoneFile:Pv("dnsZoneFile",(function(){return a("5aMz5")})),docker:Pv("docker",(function(){return a("kOauC")})),dot:Pv("dot",(function(){return a("btE6k")})),ebnf:Pv("ebnf",(function(){return a("aT88c")})),editorconfig:Pv("editorconfig",(function(){return a("jWOl8")})),eiffel:Pv("eiffel",(function(){return a("kHJaX")})),ejs:Pv("ejs",(function(){return a("frfnA")})),elixir:Pv("elixir",(function(){return a("hcrJ2")})),elm:Pv("elm",(function(){return a("jd271")})),erb:Pv("erb",(function(){return a("gczXL")})),erlang:Pv("erlang",(function(){return a("FsabW")})),etlua:Pv("etlua",(function(){return a("9DI9l")})),excelFormula:Pv("excelFormula",(function(){return a("3QVue")})),factor:Pv("factor",(function(){return a("ltNCT")})),falselang:Pv("falselang",(function(){return a("g0Q6p")})),firestoreSecurityRules:Pv("firestoreSecurityRules",(function(){return a("ukA2V")})),flow:Pv("flow",(function(){return a("e5prn")})),fortran:Pv("fortran",(function(){return a("gIEL6")})),fsharp:Pv("fsharp",(function(){return a("3wQkt")})),ftl:Pv("ftl",(function(){return a("7ZVWs")})),gap:Pv("gap",(function(){return a("hOFj6")})),gcode:Pv("gcode",(function(){return a("95BzQ")})),gdscript:Pv("gdscript",(function(){return a("iul6t")})),gedcom:Pv("gedcom",(function(){return a("e0qJM")})),gherkin:Pv("gherkin",(function(){return a("2SHak")})),git:Pv("git",(function(){return a("l6VFH")})),glsl:Pv("glsl",(function(){return a("cEMfJ")})),gml:Pv("gml",(function(){return a("8UVTr")})),gn:Pv("gn",(function(){return a("kvibD")})),goModule:Pv("goModule",(function(){return a("icqjF")})),go:Pv("go",(function(){return a("jLkg8")})),graphql:Pv("graphql",(function(){return a("aYGNi")})),groovy:Pv("groovy",(function(){return a("4bTmH")})),haml:Pv("haml",(function(){return a("h2A6V")})),handlebars:Pv("handlebars",(function(){return a("79YVJ")})),haskell:Pv("haskell",(function(){return a("bsiLW")})),haxe:Pv("haxe",(function(){return a("94Kdj")})),hcl:Pv("hcl",(function(){return a("9CheR")})),hlsl:Pv("hlsl",(function(){return a("h3dqW")})),hoon:Pv("hoon",(function(){return a("9WbsW")})),hpkp:Pv("hpkp",(function(){return a("GiPN3")})),hsts:Pv("hsts",(function(){return a("eaSn9")})),http:Pv("http",(function(){return a("1uj7b")})),ichigojam:Pv("ichigojam",(function(){return a("ge562")})),icon:Pv("icon",(function(){return a("lVHUf")})),icuMessageFormat:Pv("icuMessageFormat",(function(){return a("aYoUL")})),idris:Pv("idris",(function(){return a("1RVAE")})),iecst:Pv("iecst",(function(){return a("bi7Dr")})),ignore:Pv("ignore",(function(){return a("cq0Pi")})),inform7:Pv("inform7",(function(){return a("31K4E")})),ini:Pv("ini",(function(){return a("l05OZ")})),io:Pv("io",(function(){return a("6bY1b")})),j:Pv("j",(function(){return a("1ebDS")})),java:Pv("java",(function(){return a("iEZZI")})),javadoc:Pv("javadoc",(function(){return a("aHy5a")})),javadoclike:Pv("javadoclike",(function(){return a("5f3rE")})),javascript:Pv("javascript",(function(){return a("7JDFI")})),javastacktrace:Pv("javastacktrace",(function(){return a("gdCGE")})),jexl:Pv("jexl",(function(){return a("cqMb9")})),jolie:Pv("jolie",(function(){return a("cEDX4")})),jq:Pv("jq",(function(){return a("kEWsh")})),jsExtras:Pv("jsExtras",(function(){return a("74PI8")})),jsTemplates:Pv("jsTemplates",(function(){return a("30TPr")})),jsdoc:Pv("jsdoc",(function(){return a("9DH5c")})),json:Pv("json",(function(){return Promise.resolve(a("l1Rj1"))})),json5:Pv("json5",(function(){return a("920rv")})),jsonp:Pv("jsonp",(function(){return a("9AwS1")})),jsstacktrace:Pv("jsstacktrace",(function(){return a("bYXMr")})),jsx:Pv("jsx",(function(){return Promise.resolve(a("6ho3O"))})),julia:Pv("julia",(function(){return a("g0ibH")})),keepalived:Pv("keepalived",(function(){return a("2hdnH")})),keyman:Pv("keyman",(function(){return a("cIufI")})),kotlin:Pv("kotlin",(function(){return a("c26dU")})),kumir:Pv("kumir",(function(){return a("iYAha")})),kusto:Pv("kusto",(function(){return a("9z1oX")})),latex:Pv("latex",(function(){return a("lCPLU")})),latte:Pv("latte",(function(){return a("c9oN0")})),less:Pv("less",(function(){return a("hA3V9")})),lilypond:Pv("lilypond",(function(){return a("hpHTA")})),liquid:Pv("liquid",(function(){return a("kpZTm")})),lisp:Pv("lisp",(function(){return a("chgK5")})),livescript:Pv("livescript",(function(){return a("2gdiv")})),llvm:Pv("llvm",(function(){return a("jUeFO")})),log:Pv("log",(function(){return a("3BFSQ")})),lolcode:Pv("lolcode",(function(){return a("lG9br")})),lua:Pv("lua",(function(){return a("cVGpd")})),magma:Pv("magma",(function(){return a("4LVzY")})),makefile:Pv("makefile",(function(){return a("2NviD")})),markdown:Pv("markdown",(function(){return a("jUFCF")})),markupTemplating:Pv("markupTemplating",(function(){return Promise.resolve(a("t3W0d"))})),markup:Pv("markup",(function(){return a("5hIXu")})),matlab:Pv("matlab",(function(){return a("kPAC0")})),maxscript:Pv("maxscript",(function(){return a("gHOJy")})),mel:Pv("mel",(function(){return a("9mj6e")})),mermaid:Pv("mermaid",(function(){return a("kozw5")})),mizar:Pv("mizar",(function(){return a("2bN6W")})),mongodb:Pv("mongodb",(function(){return a("eHKWX")})),monkey:Pv("monkey",(function(){return a("7Fh0C")})),moonscript:Pv("moonscript",(function(){return a("hDXwC")})),n1ql:Pv("n1ql",(function(){return a("j9bkC")})),n4js:Pv("n4js",(function(){return a("eTmBF")})),nand2tetrisHdl:Pv("nand2tetrisHdl",(function(){return a("ezjCf")})),naniscript:Pv("naniscript",(function(){return a("VxHk1")})),nasm:Pv("nasm",(function(){return a("ly95T")})),neon:Pv("neon",(function(){return a("7Fk34")})),nevod:Pv("nevod",(function(){return a("3U8Qv")})),nginx:Pv("nginx",(function(){return a("c6qVk")})),nim:Pv("nim",(function(){return a("1JdCk")})),nix:Pv("nix",(function(){return a("jcstS")})),nsis:Pv("nsis",(function(){return a("kEJqW")})),objectivec:Pv("objectivec",(function(){return a("lUP8A")})),ocaml:Pv("ocaml",(function(){return a("lhTAD")})),opencl:Pv("opencl",(function(){return a("8rxKO")})),openqasm:Pv("openqasm",(function(){return a("ib0uL")})),oz:Pv("oz",(function(){return a("csCUS")})),parigp:Pv("parigp",(function(){return a("2DkHE")})),parser:Pv("parser",(function(){return a("2cp75")})),pascal:Pv("pascal",(function(){return a("fViVl")})),pascaligo:Pv("pascaligo",(function(){return a("9Uuxa")})),pcaxis:Pv("pcaxis",(function(){return a("jUdnN")})),peoplecode:Pv("peoplecode",(function(){return a("l8w4e")})),perl:Pv("perl",(function(){return a("aX7dM")})),phpExtras:Pv("phpExtras",(function(){return a("3cMZl")})),php:Pv("php",(function(){return Promise.resolve(a("5li5P"))})),phpdoc:Pv("phpdoc",(function(){return a("bDyJN")})),plsql:Pv("plsql",(function(){return a("cPuMN")})),powerquery:Pv("powerquery",(function(){return a("jE1gU")})),powershell:Pv("powershell",(function(){return a("k7t0j")})),processing:Pv("processing",(function(){return a("jr8hV")})),prolog:Pv("prolog",(function(){return a("hpuat")})),promql:Pv("promql",(function(){return a("ckXC5")})),properties:Pv("properties",(function(){return a("fAh6P")})),protobuf:Pv("protobuf",(function(){return a("R6WqB")})),psl:Pv("psl",(function(){return a("Al65w")})),pug:Pv("pug",(function(){return a("dxbNS")})),puppet:Pv("puppet",(function(){return a("lrSuh")})),pure:Pv("pure",(function(){return a("6DKQK")})),purebasic:Pv("purebasic",(function(){return a("7ZkSb")})),purescript:Pv("purescript",(function(){return a("dBTYx")})),python:Pv("python",(function(){return Promise.resolve(a("kiy5M"))})),q:Pv("q",(function(){return a("4FXyy")})),qml:Pv("qml",(function(){return a("2zZFj")})),qore:Pv("qore",(function(){return a("iCK1Y")})),qsharp:Pv("qsharp",(function(){return a("dvH9H")})),r:Pv("r",(function(){return a("lQqRt")})),racket:Pv("racket",(function(){return a("eHKmq")})),reason:Pv("reason",(function(){return a("kkeLT")})),regex:Pv("regex",(function(){return a("llX50")})),rego:Pv("rego",(function(){return a("9hKdZ")})),renpy:Pv("renpy",(function(){return a("cJgw5")})),rest:Pv("rest",(function(){return a("867DK")})),rip:Pv("rip",(function(){return a("3Odjx")})),roboconf:Pv("roboconf",(function(){return a("gQ0Us")})),robotframework:Pv("robotframework",(function(){return a("bLCgx")})),ruby:Pv("ruby",(function(){return Promise.resolve(a("ch1PX"))})),rust:Pv("rust",(function(){return a("cInT8")})),sas:Pv("sas",(function(){return a("iz7eP")})),sass:Pv("sass",(function(){return a("hrDC3")})),scala:Pv("scala",(function(){return a("ub8Bf")})),scheme:Pv("scheme",(function(){return a("7NAAt")})),scss:Pv("scss",(function(){return Promise.resolve(a("fU6a0"))})),shellSession:Pv("shellSession",(function(){return a("7kKCv")})),smali:Pv("smali",(function(){return a("2lkCb")})),smalltalk:Pv("smalltalk",(function(){return a("4280y")})),smarty:Pv("smarty",(function(){return a("4hXYK")})),sml:Pv("sml",(function(){return a("jh2E8")})),solidity:Pv("solidity",(function(){return a("dTdF2")})),solutionFile:Pv("solutionFile",(function(){return a("iI5tm")})),soy:Pv("soy",(function(){return a("aoU5C")})),sparql:Pv("sparql",(function(){return a("ggrvb")})),splunkSpl:Pv("splunkSpl",(function(){return a("8LhCX")})),sqf:Pv("sqf",(function(){return a("3tDsu")})),sql:Pv("sql",(function(){return Promise.resolve(a("bnDV9"))})),squirrel:Pv("squirrel",(function(){return a("bxaUV")})),stan:Pv("stan",(function(){return a("dBqrq")})),stylus:Pv("stylus",(function(){return a("JlHVK")})),swift:Pv("swift",(function(){return a("c7NBs")})),systemd:Pv("systemd",(function(){return a("jprZl")})),t4Cs:Pv("t4Cs",(function(){return a("edsMI")})),t4Templating:Pv("t4Templating",(function(){return a("bS9Wa")})),t4Vb:Pv("t4Vb",(function(){return a("gYk20")})),tap:Pv("tap",(function(){return a("byv7d")})),tcl:Pv("tcl",(function(){return a("lUAIZ")})),textile:Pv("textile",(function(){return a("7J2LO")})),toml:Pv("toml",(function(){return a("eXtdM")})),tremor:Pv("tremor",(function(){return a("vyajH")})),tsx:Pv("tsx",(function(){return Promise.resolve(a("7cTnl"))})),tt2:Pv("tt2",(function(){return a("8XOOm")})),turtle:Pv("turtle",(function(){return a("1XvLQ")})),twig:Pv("twig",(function(){return a("i9Fpp")})),typescript:Pv("typescript",(function(){return Promise.resolve(a("fzL8k"))})),typoscript:Pv("typoscript",(function(){return a("kKk69")})),unrealscript:Pv("unrealscript",(function(){return a("jgq8Y")})),uorazor:Pv("uorazor",(function(){return a("dsZ00")})),uri:Pv("uri",(function(){return a("fqJRp")})),v:Pv("v",(function(){return a("bgfyB")})),vala:Pv("vala",(function(){return a("68x4q")})),vbnet:Pv("vbnet",(function(){return a("eUhQs")})),velocity:Pv("velocity",(function(){return a("fPNdV")})),verilog:Pv("verilog",(function(){return a("2fM1V")})),vhdl:Pv("vhdl",(function(){return a("hNF6q")})),vim:Pv("vim",(function(){return a("75TCr")})),visualBasic:Pv("visualBasic",(function(){return a("fc93z")})),warpscript:Pv("warpscript",(function(){return a("jgHlG")})),wasm:Pv("wasm",(function(){return a("dVZkI")})),webIdl:Pv("webIdl",(function(){return a("9Jnxv")})),wiki:Pv("wiki",(function(){return a("1Gimo")})),wolfram:Pv("wolfram",(function(){return a("4SyRT")})),wren:Pv("wren",(function(){return a("gaIVs")})),xeora:Pv("xeora",(function(){return a("lagad")})),xmlDoc:Pv("xmlDoc",(function(){return a("9DNYE")})),xojo:Pv("xojo",(function(){return a("ksF4f")})),xquery:Pv("xquery",(function(){return a("gXxHJ")})),yaml:Pv("yaml",(function(){return a("6rk3j")})),yang:Pv("yang",(function(){return a("kTyrQ")})),zig:Pv("zig",(function(){return a("d3mFC")}))},Lv=(Cv=(Ev={loader:function(){return a("bB2YF").then((function(e){return e.default||e}))},isLanguageRegistered:function(e,t){return e.registered(t)},languageLoaders:Nv,registerLanguage:function(e,t,n){return e.register(n)}}).loader,kv=Ev.isLanguageRegistered,Tv=Ev.registerLanguage,Iv=Ev.languageLoaders,Ov=Ev.noAsyncLoadingLanguages,Rv=function(e){r(Ug)(i,e);var t,n=Av(i);function i(){return r(Pg)(this,i),n.apply(this,arguments)}return r(Ng)(i,[{key:"componentDidUpdate",value:function(){!i.isRegistered(this.props.language)&&Iv&&this.loadLanguage()}},{key:"componentDidMount",value:function(){var e=this;i.astGeneratorPromise||i.loadAstGenerator(),i.astGenerator||i.astGeneratorPromise.then((function(){e.forceUpdate()})),!i.isRegistered(this.props.language)&&Iv&&this.loadLanguage()}},{key:"loadLanguage",value:function(){var e=this,t=this.props.language;"text"!==t&&i.loadLanguage(t).then((function(){return e.forceUpdate()})).catch((function(){}))}},{key:"normalizeLanguage",value:function(e){return i.isSupportedLanguage(e)?e:"text"}},{key:"render",value:function(){return r(u).createElement(i.highlightInstance,r(Og)({},this.props,{language:this.normalizeLanguage(this.props.language),astGenerator:i.astGenerator}))}}],[{key:"preload",value:function(){return i.loadAstGenerator()}},{key:"loadLanguage",value:(t=r(Tg)(r(Jg).mark((function e(t){var n;return r(Jg).wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof(n=Iv[t])){e.next=5;break}return e.abrupt("return",n(i.registerLanguage));case 5:throw new Error("Language ".concat(t," not supported"));case 6:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"isSupportedLanguage",value:function(e){return i.isRegistered(e)||"function"==typeof Iv[e]}},{key:"loadAstGenerator",value:function(){return i.astGeneratorPromise=Cv().then((function(e){i.astGenerator=e,Tv&&i.languages.forEach((function(t,n){return Tv(e,n,t)}))})),i.astGeneratorPromise}}]),i}(r(u).PureComponent),r(Yg)(Rv,"astGenerator",null),r(Yg)(Rv,"highlightInstance",_v(null,{})),r(Yg)(Rv,"astGeneratorPromise",null),r(Yg)(Rv,"languages",new Map),r(Yg)(Rv,"supportedLanguages",Ev.supportedLanguages||Object.keys(Iv||{})),r(Yg)(Rv,"isRegistered",(function(e){if(Ov)return!0;if(!Tv)throw new Error("Current syntax highlighter doesn't support registration of languages");return Rv.astGenerator?kv(Rv.astGenerator,e):Rv.languages.has(e)})),r(Yg)(Rv,"registerLanguage",(function(e,t){if(!Tv)throw new Error("Current syntax highlighter doesn't support registration of languages");if(Rv.astGenerator)return Tv(Rv.astGenerator,e,t);Rv.languages.set(e,t)})),Rv),Dv={},Bv={};(Bv=function(e){return e&&e.__esModule?e:{default:e}}).__esModule=!0,Bv.default=Bv,Object.defineProperty(Dv,"__esModule",{value:!0}),Object.defineProperty(Dv,"a11yDark",{enumerable:!0,get:function(){return qv.default}}),Object.defineProperty(Dv,"atomDark",{enumerable:!0,get:function(){return Kv.default}}),Object.defineProperty(Dv,"base16AteliersulphurpoolLight",{enumerable:!0,get:function(){return Yv.default}}),Object.defineProperty(Dv,"cb",{enumerable:!0,get:function(){return Jv.default}}),Object.defineProperty(Dv,"coldarkCold",{enumerable:!0,get:function(){return Qv.default}}),Object.defineProperty(Dv,"coldarkDark",{enumerable:!0,get:function(){return Xv.default}}),Object.defineProperty(Dv,"coy",{enumerable:!0,get:function(){return jv.default}}),Object.defineProperty(Dv,"coyWithoutShadows",{enumerable:!0,get:function(){return Zv.default}}),Object.defineProperty(Dv,"darcula",{enumerable:!0,get:function(){return $v.default}}),Object.defineProperty(Dv,"dark",{enumerable:!0,get:function(){return Fv.default}}),Object.defineProperty(Dv,"dracula",{enumerable:!0,get:function(){return ey.default}}),Object.defineProperty(Dv,"duotoneDark",{enumerable:!0,get:function(){return ty.default}}),Object.defineProperty(Dv,"duotoneEarth",{enumerable:!0,get:function(){return ny.default}}),Object.defineProperty(Dv,"duotoneForest",{enumerable:!0,get:function(){return ry.default}}),Object.defineProperty(Dv,"duotoneLight",{enumerable:!0,get:function(){return iy.default}}),Object.defineProperty(Dv,"duotoneSea",{enumerable:!0,get:function(){return oy.default}}),Object.defineProperty(Dv,"duotoneSpace",{enumerable:!0,get:function(){return ay.default}}),Object.defineProperty(Dv,"funky",{enumerable:!0,get:function(){return Uv.default}}),Object.defineProperty(Dv,"ghcolors",{enumerable:!0,get:function(){return sy.default}}),Object.defineProperty(Dv,"gruvboxDark",{enumerable:!0,get:function(){return ly.default}}),Object.defineProperty(Dv,"gruvboxLight",{enumerable:!0,get:function(){return cy.default}}),Object.defineProperty(Dv,"holiTheme",{enumerable:!0,get:function(){return uy.default}}),Object.defineProperty(Dv,"hopscotch",{enumerable:!0,get:function(){return dy.default}}),Object.defineProperty(Dv,"lucario",{enumerable:!0,get:function(){return fy.default}}),Object.defineProperty(Dv,"materialDark",{enumerable:!0,get:function(){return hy.default}}),Object.defineProperty(Dv,"materialLight",{enumerable:!0,get:function(){return py.default}}),Object.defineProperty(Dv,"materialOceanic",{enumerable:!0,get:function(){return my.default}}),Object.defineProperty(Dv,"nightOwl",{enumerable:!0,get:function(){return gy.default}}),Object.defineProperty(Dv,"nord",{enumerable:!0,get:function(){return vy.default}}),Object.defineProperty(Dv,"okaidia",{enumerable:!0,get:function(){return zv.default}}),Object.defineProperty(Dv,"oneDark",{enumerable:!0,get:function(){return yy.default}}),Object.defineProperty(Dv,"oneLight",{enumerable:!0,get:function(){return by.default}}),Object.defineProperty(Dv,"pojoaque",{enumerable:!0,get:function(){return wy.default}}),Object.defineProperty(Dv,"prism",{enumerable:!0,get:function(){return Gv.default}}),Object.defineProperty(Dv,"shadesOfPurple",{enumerable:!0,get:function(){return xy.default}}),Object.defineProperty(Dv,"solarizedDarkAtom",{enumerable:!0,get:function(){return Sy.default}}),Object.defineProperty(Dv,"solarizedlight",{enumerable:!0,get:function(){return Hv.default}}),Object.defineProperty(Dv,"synthwave84",{enumerable:!0,get:function(){return My.default}}),Object.defineProperty(Dv,"tomorrow",{enumerable:!0,get:function(){return Vv.default}}),Object.defineProperty(Dv,"twilight",{enumerable:!0,get:function(){return Wv.default}}),Object.defineProperty(Dv,"vs",{enumerable:!0,get:function(){return _y.default}}),Object.defineProperty(Dv,"vscDarkPlus",{enumerable:!0,get:function(){return Ay.default}}),Object.defineProperty(Dv,"xonokai",{enumerable:!0,get:function(){return Ey.default}}),Object.defineProperty(Dv,"zTouch",{enumerable:!0,get:function(){return Cy.default}});var jv=Bv(a("jcF8U")),Fv=Bv(a("3Tppx")),Uv=Bv(a("dBuK7")),zv=Bv(a("eEjWK")),Hv=Bv(a("awG2g")),Vv=Bv(a("2oFzQ")),Wv=Bv(a("4Au6Q")),Gv=Bv(a("dAPqs")),qv=Bv(a("8eAql")),Kv=Bv(a("cv2QE")),Yv=Bv(a("h5I9g")),Jv=Bv(a("i4C5w")),Qv=Bv(a("3kFKo")),Xv=Bv(a("17zK0")),Zv=Bv(a("5Avqr")),$v=Bv(a("1jHMv")),ey=Bv(a("7Q8CE")),ty=Bv(a("jKUos")),ny=Bv(a("Uzm4J")),ry=Bv(a("7yfkN")),iy=Bv(a("lT2l1")),oy=Bv(a("fZ9um")),ay=Bv(a("1MoQL")),sy=Bv(a("4uys7")),ly=Bv(a("kaYsk")),cy=Bv(a("kN6Vu")),uy=Bv(a("2Z6pG")),dy=Bv(a("4jQJK")),fy=Bv(a("bpXw0")),hy=Bv(a("i4S8s")),py=Bv(a("5bNr4")),my=Bv(a("5ZYWT")),gy=Bv(a("ihJCU")),vy=Bv(a("8iIbg")),yy=Bv(a("424u7")),by=Bv(a("jPiNI")),wy=Bv(a("OHVOA")),xy=Bv(a("2OKTL")),Sy=Bv(a("2Mg8H")),My=Bv(a("9Kud0")),_y=Bv(a("eCrmR")),Ay=Bv(a("8UhcQ")),Ey=Bv(a("dtU9z")),Cy=Bv(a("4xtLO")),ky={};Object.defineProperty(ky,"__esModule",{value:!0}),ky.default=void 0;var Ty=Bv(a("7cTnl")).default;ky.default=Ty;var Iy={};Object.defineProperty(Iy,"__esModule",{value:!0}),Iy.default=void 0;var Oy=Bv(a("l1Rj1")).default;Iy.default=Oy;var Ry={};Object.defineProperty(Ry,"__esModule",{value:!0}),Ry.default=void 0;var Py=Bv(a("fU6a0")).default;Ry.default=Py;var Ny={};Object.defineProperty(Ny,"__esModule",{value:!0}),Ny.default=void 0;var Ly=Bv(a("3aDLI")).default;Ny.default=Ly;var Dy={};Object.defineProperty(Dy,"__esModule",{value:!0}),Dy.default=void 0;var By=Bv(a("kiy5M")).default;Dy.default=By;var jy={};Object.defineProperty(jy,"__esModule",{value:!0}),jy.default=void 0;var Fy=Bv(a("lR39A")).default;jy.default=Fy;var Uy={};Object.defineProperty(Uy,"__esModule",{value:!0}),Uy.default=void 0;var zy=Bv(a("5li5P")).default;Uy.default=zy;var Hy={};Object.defineProperty(Hy,"__esModule",{value:!0}),Hy.default=void 0;var Vy=Bv(a("ch1PX")).default;Hy.default=Vy;var Wy={};Object.defineProperty(Wy,"__esModule",{value:!0}),Wy.default=void 0;var Gy=Bv(a("bnDV9")).default;Wy.default=Gy,Lv.registerLanguage("tsx",r(ky)),Lv.registerLanguage("json",r(Iy)),Lv.registerLanguage("scss",r(Ry)),Lv.registerLanguage("bash",r(Ny)),Lv.registerLanguage("python",r(Dy)),Lv.registerLanguage("cpp",r(jy)),Lv.registerLanguage("php",r(Uy)),Lv.registerLanguage("ruby",r(Hy)),Lv.registerLanguage("sql",r(Wy));var qy=({medium:e,className:t,preview:n=!1})=>{var r,i,o,a;const{t:l}=Ce();return(0,s.jsxs)("div",{className:"memori-snippet",children:[(0,s.jsxs)("div",{className:"memori-snippet--content",children:[(0,s.jsx)(Lv,{"aria-labelledby":`#snippet-${e.mediumID}`,className:t,style:Dv.atomDark,showLineNumbers:!0,language:null!==(i=null===(r=Eg.find((t=>e.mimeType===t.mimeType)))||void 0===r?void 0:r.lang)&&void 0!==i?i:"text",children:(null===(o=e.content)||void 0===o?void 0:o.length)&&e.content.length>200&&n?`${e.content.slice(0,200)}\n...`:`${e.content}`}),(0,s.jsx)(Qd,{padded:!1,ghost:!0,className:"memori-snippet--copy-button",title:l("copy")||"Copy",icon:(0,s.jsx)(kg,{}),onClick:()=>{var t;return navigator.clipboard.writeText(null!==(t=e.content)&&void 0!==t?t:"")}})]}),!!(null===(a=e.title)||void 0===a?void 0:a.length)&&(0,s.jsx)("p",{id:`snippet-${e.mediumID}`,className:"memori-snippet--caption",children:e.title})]})};var Ky=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z"})});var Yy=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z"})});var Jy=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494zM514.1 580.1l-61.8-102.4c-2.2-3.6-6.1-5.8-10.3-5.8h-38.4c-2.3 0-4.5.6-6.4 1.9-5.6 3.5-7.3 10.9-3.7 16.6l82.3 130.4-83.4 132.8a12.04 12.04 0 0 0 10.2 18.4h34.5c4.2 0 8-2.2 10.2-5.7L510 664.8l62.3 101.4c2.2 3.6 6.1 5.7 10.2 5.7H620c2.3 0 4.5-.7 6.5-1.9 5.6-3.6 7.2-11 3.6-16.6l-84-130.4 85.3-132.5a12.04 12.04 0 0 0-10.1-18.5h-35.7c-4.2 0-8.1 2.2-10.3 5.8l-61.2 102.3z"})});var Qy=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494zM528.1 472h-32.2c-5.5 0-10.3 3.7-11.6 9.1L434.6 680l-46.1-198.7c-1.3-5.4-6.1-9.3-11.7-9.3h-35.4a12.02 12.02 0 0 0-11.6 15.1l74.2 276c1.4 5.2 6.2 8.9 11.6 8.9h32c5.4 0 10.2-3.6 11.6-8.9l52.8-197 52.8 197c1.4 5.2 6.2 8.9 11.6 8.9h31.8c5.4 0 10.2-3.6 11.6-8.9l74.4-276a12.04 12.04 0 0 0-11.6-15.1H647c-5.6 0-10.4 3.9-11.7 9.3l-45.8 199.1-49.8-199.3c-1.3-5.4-6.1-9.1-11.6-9.1z"})});const Xy=({isChild:e=!1,item:t,sessionID:n,tenantID:r,preview:i=!1,baseURL:o,apiURL:a,onClick:l,customMediaRenderer:c})=>{const u=jm({resourceURI:t.url,sessionID:n,tenantID:r,baseURL:o,apiURL:a}),d=null==c?void 0:c(t.mimeType);if(d)return d;switch(t.mimeType){case"image/jpeg":case"image/png":case"image/jpg":case"image/gif":return(0,s.jsx)("a",{className:"memori-media-item--link",href:u,onClick:n=>{e&&n.preventDefault(),l&&(n.preventDefault(),l(t.mediumID))},target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(yg,{hoverable:!0,className:"memori-media-item--card memori-media-item--image",cover:(0,s.jsxs)("picture",{className:"memori-media-item--figure",children:[!i&&(0,s.jsx)("source",{srcSet:[u,t.url,t.content].join(", "),type:t.mimeType}),(0,s.jsx)("img",{alt:t.title,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=="}),t.title&&(0,s.jsx)("figcaption",{className:"memori-media-item--figure-caption",children:t.title})]})})});case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return(0,s.jsx)("a",{className:"memori-media-item--link",href:u,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(yg,{hoverable:!0,cover:(0,s.jsx)(Qy,{className:"memori-media-item--icon"}),title:t.title})});case"application/vnd.ms-excel":case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return(0,s.jsx)("a",{className:"memori-media-item--link",href:u,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(yg,{hoverable:!0,cover:(0,s.jsx)(Jy,{className:"memori-media-item--icon"}),title:t.title})});case"application/pdf":return(0,s.jsx)("a",{className:"memori-media-item--link",href:u,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(yg,{hoverable:!0,cover:(0,s.jsx)(Yy,{className:"memori-media-item--icon"}),title:t.title})});case"video/mp4":case"video/avi":case"video/mpeg":return(0,s.jsx)("a",{className:"memori-media-item--link",href:u,onClick:n=>{e&&n.preventDefault(),l&&(n.preventDefault(),l(t.mediumID))},target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(yg,{hoverable:!0,cover:(0,s.jsx)("video",{style:{width:"100%",height:"100%"},controls:!0,src:u,title:t.title}),title:t.title})});case"audio/mpeg3":case"audio/wav":case"audio/mpeg":return(0,s.jsx)("a",{className:"memori-media-item--link",href:u,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(yg,{hoverable:!0,cover:(0,s.jsx)("audio",{style:{width:"100%",height:"100%"},controls:!0,src:u}),title:t.title})});case"model/gltf-binary":return(0,s.jsx)(Cg,{src:u,alt:"",poster:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=="});default:return(0,s.jsx)("a",{className:"memori-media-item--link",href:u,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(yg,{hoverable:!0,cover:(0,s.jsx)(Ky,{className:"memori-media-item--icon"}),title:t.title})})}};var Zy=(0,u.memo)((({items:e,sessionID:t,tenantID:n,translateTo:r,baseURL:i,apiURL:o,customMediaRenderer:a})=>{const[l,c]=(0,u.useState)(e),[d,f]=(0,u.useState)(),h=(0,u.useCallback)((async()=>{if(!r)return;const t=await Promise.all((null!=e?e:[]).map((async e=>{var t;if(!e.title)return e;try{const n=await Sg(e.title,r);return{...e,title:null!==(t=n.text)&&void 0!==t?t:e.title}}catch(t){return console.error(t),e}})));c(t)}),[r,e]);return(0,u.useEffect)((()=>{r&&h()}),[r,h]),(0,s.jsxs)(Kf,{appear:!0,show:!0,as:"div",className:"memori-media-items",children:[(0,s.jsx)("div",{className:"memori-media-items--grid",children:l.filter((e=>{var t;return!(null===(t=e.properties)||void 0===t?void 0:t.executable)&&!Eg.map((e=>e.mimeType)).includes(e.mimeType)})).sort(((e,t)=>e.creationTimestamp>t.creationTimestamp?1:e.creationTimestamp<t.creationTimestamp?-1:0)).map(((e,r)=>(0,s.jsx)(Kf.Child,{as:"div",className:"memori-media-item",enter:"ease-out duration-500 delay-"+100*r,enterFrom:"opacity-0 scale-95",enterTo:"opacity-1 scale-100",leave:"ease-in duration-300",leaveFrom:"opacity-1 scale-100",leaveTo:"opacity-0 scale-95",children:(0,s.jsx)(Xy,{isChild:!0,sessionID:t,tenantID:n,baseURL:i,apiURL:o,onClick:e=>{f(l.find((t=>t.mediumID===e)))},item:{...e,title:e.title,url:e.url,content:e.content},customMediaRenderer:a})},e.url+"&index="+r)))}),l.filter((e=>{var t;return!(null===(t=e.properties)||void 0===t?void 0:t.executable)&&Eg.map((e=>e.mimeType)).includes(e.mimeType)})).map((e=>(0,s.jsx)(Kf.Child,{as:"div",className:"memori-media-item--snippet",enter:"ease-out duration-500",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-1 translate-y-0",leave:"ease-in duration-300",leaveFrom:"opacity-1",leaveTo:"opacity-0",children:(0,s.jsx)(qy,{medium:e},e.mediumID)},e.mediumID))),l.filter((e=>{var t;return"text/css"===e.mimeType&&!!(null===(t=e.properties)||void 0===t?void 0:t.executable)})).map((e=>(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:e.content||""}},e.mediumID))),(null==d?void 0:d.mediumID)&&(0,s.jsx)(dp,{width:"100%",widthMd:"100%",className:"memori-media-item--modal",open:!!d,onClose:()=>f(void 0),footer:null,children:(0,s.jsx)(Xy,{isChild:!0,sessionID:t,tenantID:n,baseURL:i,apiURL:o,item:{...d,title:d.title,url:d.url,content:d.content},customMediaRenderer:a})})]})}));Kd=a("4IUwl");var $y=(0,u.memo)((({hints:e=[],links:t=[],media:n=[],simulateUserPrompt:i=(()=>{}),sessionID:o,baseUrl:a,apiUrl:l,translateTo:c,customMediaRenderer:d})=>{const{t:f}=Ce(),[h,p]=(0,u.useState)(!0),[m,g]=(0,u.useState)(6);return(0,u.useEffect)((()=>{p(!0)}),[e]),(0,s.jsxs)("div",{className:"memori-media-widget",children:[(null==n?void 0:n.length)>0&&(0,s.jsx)(Zy,{items:n,sessionID:o,translateTo:c,baseURL:a,apiURL:l,customMediaRenderer:d}),(null==t?void 0:t.length)>0&&(0,s.jsx)(wg,{items:t,baseUrl:a}),(null==e?void 0:e.length)>0&&h&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Kf,{appear:!0,show:!0,as:"ul",className:"memori-media--hints",children:e.slice(0,m).map(((e,t)=>(0,s.jsx)(Kf.Child,{as:"li",enter:"ease-out duration-500",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-1 translate-y-0",leave:"ease-in duration-300",leaveFrom:"opacity-1",leaveTo:"opacity-0",children:(0,s.jsx)(Qd,{className:r(Kd)("memori-media--hint"),primary:!0,onClick:()=>{i(e.originalText,e.text),p(!1)},onTouchEnd:()=>{i(e.originalText,e.text),p(!1)},children:e.text},e.text+t)},e.text+t)))}),e.length>m&&(0,s.jsx)("div",{className:"memori-hints--show-more",children:(0,s.jsx)(Qd,{className:"memori-hints--show-more-button",id:"showMoreHints",onClick:()=>g(m+6),children:f("expand")||"Expand"})})]})]})}));Kd=a("4IUwl");var eb=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 1 0 0-176 88 88 0 0 0 0 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z"})});var tb=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0 0 12.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0 0 12.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 0 0 174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"})});var nb=({attachmentsMenuOpen:e,setAttachmentsMenuOpen:t,disabled:n=!1,authToken:i})=>(0,s.jsxs)(lg,{as:"div",className:"memori-upload-menu",children:[(0,s.jsx)(lg.Button,{disabled:n,className:r(Kd)("memori-button","memori-button--circle","memori-button--icon-only","memori-share-button--button","memori--conversation-button"),children:(0,s.jsx)("div",{className:"memori-button--icon",children:(0,s.jsx)(tb,{})})}),(0,s.jsxs)(lg.Items,{as:"ul",className:"memori-menu--overlay",children:[(0,s.jsx)(lg.Item,{as:"li",className:"memori-menu--li",children:(0,s.jsx)(Qd,{className:"memori-menu--button",ghost:!0,icon:(0,s.jsx)(gg,{}),outlined:"link"===e,onClick:()=>t("link"),children:"Link"})}),!!(null==i?void 0:i.length)&&(0,s.jsx)(lg.Item,{children:(0,s.jsx)(Qd,{className:"memori-menu--button",ghost:!0,icon:(0,s.jsx)(eb,{}),outlined:"media"===e,onClick:()=>t("media"),children:"Media"})})]})]});u=a("85Hg2"),u=a("85Hg2");function rb(e=0){let[t,n]=(0,u.useState)(e),r=(0,u.useCallback)((e=>n((t=>t|e))),[t]),i=(0,u.useCallback)((e=>Boolean(t&e)),[t]),o=(0,u.useCallback)((e=>n((t=>t&~e))),[n]),a=(0,u.useCallback)((e=>n((t=>t^e))),[n]);return{addFlag:r,hasFlag:i,removeFlag:o,toggleFlag:a}}let ib=(0,(u=a("85Hg2")).createContext)(null);function ob(){let e=(0,u.useContext)(ib);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,ob),e}return e}function ab(){let[e,t]=(0,u.useState)([]);return[e.length>0?e.join(" "):void 0,(0,u.useMemo)((()=>function(e){let n=bf((e=>(t((t=>[...t,e])),()=>t((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),i=(0,u.useMemo)((()=>({register:n,slot:e.slot,name:e.name,props:e.props})),[n,e.slot,e.name,e.props]);return r(u).createElement(ib.Provider,{value:i},e.children)}),[t])]}let sb=af((function(e,t){let{passive:n=!1,...r}=e,i=ob(),o=`headlessui-label-${eh()}`,a=Sf(t);pf((()=>i.register(o)),[o,i.register]);let s={ref:a,...i.props,id:o};return n&&("onClick"in s&&delete s.onClick,"onClick"in r&&delete r.onClick),nf({ourProps:s,theirProps:r,slot:i.slot||{},defaultTag:"label",name:i.name||"Label"})}));function lb(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))ub(n,cb(t,r),i);return n}function cb(e,t){return e?e+"["+t+"]":t}function ub(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())ub(e,cb(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):"boolean"==typeof n?e.push([t,n?"1":"0"]):"string"==typeof n?e.push([t,n]):"number"==typeof n?e.push([t,`${n}`]):null==n?e.push([t,""]):lb(n,t,e)}function db(e){var t;let n=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(n)for(let e of n.elements)if("INPUT"===e.tagName&&"submit"===e.type||"BUTTON"===e.tagName&&"submit"===e.type||"INPUT"===e.nodeName&&"image"===e.type)return void e.click()}u=a("85Hg2");function fb(e,t,n){let[r,i]=(0,u.useState)(n),o=void 0!==e,a=(0,u.useRef)(o),s=(0,u.useRef)(!1),l=(0,u.useRef)(!1);return!o||a.current||s.current?!o&&a.current&&!l.current&&(l.current=!0,a.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(s.current=!0,a.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[o?e:r,bf((e=>(o||i(e),null==t?void 0:t(e))))]}var hb,pb=((hb=pb||{})[hb.RegisterOption=0]="RegisterOption",hb[hb.UnregisterOption=1]="UnregisterOption",hb);let mb={0(e,t){let n=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:mh(n,(e=>e.element.current))}},1(e,t){let n=e.options.slice(),r=e.options.findIndex((e=>e.id===t.id));return-1===r?e:(n.splice(r,1),{...e,options:n})}},gb=(0,u.createContext)(null);function vb(e){let t=(0,u.useContext)(gb);if(null===t){let t=new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,vb),t}return t}function yb(e,t){return Xd(t.type,mb,e,t)}gb.displayName="RadioGroupContext";let bb=af((function(e,t){let{value:n,defaultValue:i,name:o,onChange:a,by:s=((e,t)=>e===t),disabled:l=!1,...c}=e,d=bf("string"==typeof s?(e,t)=>{let n=s;return(null==e?void 0:e[n])===(null==t?void 0:t[n])}:s),[f,h]=(0,u.useReducer)(yb,{options:[]}),p=f.options,[m,g]=ab(),[v,y]=Hh(),b=`headlessui-radiogroup-${eh()}`,w=(0,u.useRef)(null),x=Sf(w,t),[S,M]=fb(n,a,i),_=(0,u.useMemo)((()=>p.find((e=>!e.propsRef.current.disabled))),[p]),A=(0,u.useMemo)((()=>p.some((e=>d(e.propsRef.current.value,S)))),[p,S]),E=bf((e=>{var t;if(l||d(e,S))return!1;let n=null==(t=p.find((t=>d(t.propsRef.current.value,e))))?void 0:t.propsRef.current;return(null==n||!n.disabled)&&(null==M||M(e),!0)}));Wm({container:w.current,accept:e=>"radio"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let C=bf((e=>{let t=w.current;if(!t)return;let n=rh(t),r=p.filter((e=>!1===e.propsRef.current.disabled)).map((e=>e.element.current));switch(e.key){case Jf.Enter:db(e.currentTarget);break;case Jf.ArrowLeft:case Jf.ArrowUp:if(e.preventDefault(),e.stopPropagation(),vh(r,ah.Previous|ah.WrapAround)===sh.Success){let e=p.find((e=>e.element.current===(null==n?void 0:n.activeElement)));e&&E(e.propsRef.current.value)}break;case Jf.ArrowRight:case Jf.ArrowDown:if(e.preventDefault(),e.stopPropagation(),vh(r,ah.Next|ah.WrapAround)===sh.Success){let e=p.find((e=>e.element.current===(null==n?void 0:n.activeElement)));e&&E(e.propsRef.current.value)}break;case Jf.Space:{e.preventDefault(),e.stopPropagation();let t=p.find((e=>e.element.current===(null==n?void 0:n.activeElement)));t&&E(t.propsRef.current.value)}}})),k=bf((e=>(h({type:0,...e}),()=>h({type:1,id:e.id})))),T=(0,u.useMemo)((()=>({registerOption:k,firstOption:_,containsCheckedOption:A,change:E,disabled:l,value:S,compare:d})),[k,_,A,E,l,S,d]),I={ref:x,id:b,role:"radiogroup","aria-labelledby":m,"aria-describedby":v,onKeyDown:C},O=(0,u.useMemo)((()=>({value:S})),[S]);return r(u).createElement(y,{name:"RadioGroup.Description"},r(u).createElement(g,{name:"RadioGroup.Label"},r(u).createElement(gb.Provider,{value:T},null!=o&&null!=S&&lb({[o]:S}).map((([e,t])=>r(u).createElement(nh,{features:th.Hidden,...sf({key:e,as:"input",type:"radio",checked:null!=t,hidden:!0,readOnly:!0,name:e,value:t})}))),nf({ourProps:I,theirProps:c,slot:O,defaultTag:"div",name:"RadioGroup"}))))}));var wb=(e=>(e[e.Empty=1]="Empty",e[e.Active=2]="Active",e))(wb||{});let xb=af((function(e,t){let n=(0,u.useRef)(null),i=Sf(n,t),o=`headlessui-radiogroup-option-${eh()}`,[a,s]=ab(),[l,c]=Hh(),{addFlag:d,removeFlag:f,hasFlag:h}=rb(1),{value:p,disabled:m=!1,...g}=e,v=(0,u.useRef)({value:p,disabled:m});pf((()=>{v.current.value=p}),[p,v]),pf((()=>{v.current.disabled=m}),[m,v]);let{registerOption:y,disabled:b,change:w,firstOption:x,containsCheckedOption:S,value:M,compare:_}=vb("RadioGroup.Option");pf((()=>y({id:o,element:n,propsRef:v})),[o,y,n,e]);let A=bf((e=>{var t;if(Qf(e.currentTarget))return e.preventDefault();!w(p)||(d(2),null==(t=n.current)||t.focus())})),E=bf((e=>{if(Qf(e.currentTarget))return e.preventDefault();d(2)})),C=bf((()=>f(2))),k=(null==x?void 0:x.id)===o,T=b||m,I=_(M,p),O={ref:i,id:o,role:"radio","aria-checked":I?"true":"false","aria-labelledby":a,"aria-describedby":l,"aria-disabled":!!T||void 0,tabIndex:T?-1:I||!S&&k?0:-1,onClick:T?void 0:A,onFocus:T?void 0:E,onBlur:T?void 0:C},R=(0,u.useMemo)((()=>({checked:I,disabled:T,active:h(2)})),[I,T,h]);return r(u).createElement(c,{name:"RadioGroup.Description"},r(u).createElement(s,{name:"RadioGroup.Label"},nf({ourProps:O,theirProps:g,slot:R,defaultTag:"div",name:"RadioGroup.Option"})))})),Sb=Object.assign(bb,{Option:xb,Label:sb,Description:Vh});Kd=a("4IUwl");var Mb=({sendOnEnter:e,setSendOnEnter:t})=>{const{t:n}=Ce();return(0,s.jsxs)(lg,{as:"div",className:"memori-send-on-enter-menu",children:[(0,s.jsx)(lg.Button,{className:r(Kd)("memori-button","memori-button--circle","memori-button--icon-only","memori-share-button--button","memori--conversation-button"),children:(0,s.jsx)("div",{className:"memori-button--icon",children:(0,s.jsx)("span",{style:{display:"block",width:"1rem",height:"1rem"},children:"…"})})}),(0,s.jsx)(lg.Items,{className:"memori-menu--overlay",children:(0,s.jsxs)(Sb,{value:e,onChange:t,children:[(0,s.jsx)(Sb.Option,{value:"keypress",className:"memori-menu--option",children:({checked:e})=>(0,s.jsx)(lg.Item,{children:(0,s.jsx)(Qd,{className:"memori-menu--button",ghost:!0,outlined:e,icon:(0,s.jsx)("span",{className:"memori-menu--icon",children:e?"✓":""}),children:n("widget.sendOnKeypress")})})}),(0,s.jsx)(Sb.Option,{value:"click",className:"memori-menu--option",children:({checked:e})=>(0,s.jsx)(lg.Item,{children:(0,s.jsx)(Qd,{className:"memori-menu--button",ghost:!0,outlined:e,icon:(0,s.jsx)("span",{className:"memori-menu--icon",children:e?"✓":""}),children:n("widget.sendOnClick")})})})]})})]})};u=a("85Hg2"),Kd=a("4IUwl");var _b=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 0 0 0 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0 0 13.5-4.7L863.9 169a7.9 7.9 0 0 0-8.9-8.9zM416.6 562.3a8.03 8.03 0 0 0-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 0 0-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z"})});var Ab=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 0 0-11.3 0l-42.4 42.3a8.03 8.03 0 0 0 0 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 0 0 4.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 0 0 0 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 0 0 391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 0 0-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 0 0-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 0 0-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z"})});var Eb=({disabled:e=!1,value:t,onChange:n,onPressEnter:i,onFocus:o,onBlur:a})=>{const{t:l}=Ce(),[c,d]=(0,u.useState)(!1);return(0,s.jsx)("div",{"data-testid":"chat-textarea",className:r(Kd)("memori-chat-textarea",{"memori-chat-textarea--expanded":c,"memori-chat-textarea--disabled":e}),children:(0,s.jsxs)("div",{className:"memori-chat-textarea--inner",children:[(0,s.jsx)("textarea",{className:"memori-chat-textarea--input",disabled:e,value:t,onChange:e=>{n(e.target.value)},onKeyDownCapture:e=>{"Enter"===e.key&&!e.shiftKey&&i&&i(e)},onFocus:o,onBlur:a}),(0,s.jsx)("div",{className:"memori-chat-textarea--expand",children:(0,s.jsx)(Qd,{className:r(Kd)("memori-chat-textarea--expand-button"),onClick:()=>d(!c),padded:!1,ghost:!0,title:c?l("collapse")||"Collapse":l("expand")||"Expand",icon:c?(0,s.jsx)(Ab,{}):(0,s.jsx)(_b,{})})})]})})};var Cb=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2-8.5 2.1-13.8 10.7-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"})});u=a("85Hg2");var kb=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"})});Kd=a("4IUwl");var Tb=({listening:e,stopAudio:t,startListening:n,stopListening:i})=>{const{t:o}=Ce(),[a,l]=(0,u.useState)(),c=(0,u.useRef)(null),d=e=>{e.preventDefault(),l(o("write_and_speak.holdToSpeak")||"Hold to record"),c.current||(c.current=setTimeout((()=>{t(),l(o("write_and_speak.releaseToEndListening")||"Release to end listening"),n()}),300))},f=()=>{c.current&&(clearTimeout(c.current),c.current=null),i(),l(void 0)};return(0,u.useEffect)((()=>()=>f()),[]),(0,s.jsx)(zm,{visible:!!a,content:(0,s.jsx)("span",{children:a||o("write_and_speak.pressAndHoldToSpeak")||"Press and hold to speak"}),align:"topLeft",className:"memori-mic-btn-tooltip",children:(0,s.jsx)(Qd,{primary:!0,className:r(Kd)("memori-chat-inputs--mic",{"memori-chat-inputs--mic--listening":e}),title:e?o("write_and_speak.micButtonPopoverListening")||"Listening":o("write_and_speak.micButtonPopover")||"Start listening",onMouseDown:d,onTouchStart:d,onMouseUp:f,onMouseLeave:f,onTouchEnd:f,shape:"circle",icon:(0,s.jsx)(kb,{})})})};Kd=a("4IUwl");var Ib=({dialogState:e,instruct:t=!1,sendOnEnter:n="click",setSendOnEnter:i,attachmentsMenuOpen:o,setAttachmentsMenuOpen:a,userMessage:l="",onChangeUserMessage:c,sendMessage:u,onTextareaFocus:d,onTextareaBlur:f,onTextareaPressEnter:h,showMicrophone:p=!1,microphoneMode:m="HOLD_TO_TALK",listening:g=!1,stopAudio:v,startListening:y,stopListening:b,authToken:w})=>{const{t:x}=Ce();return(0,s.jsxs)("fieldset",{id:"chat-fieldset",className:"memori-chat-inputs",disabled:"X2a"===(null==e?void 0:e.state)||"X3"===(null==e?void 0:e.state),children:[(t||(null==e?void 0:e.acceptsMedia))&&(0,s.jsx)(nb,{attachmentsMenuOpen:o,setAttachmentsMenuOpen:a,authToken:w,disabled:!(null==e?void 0:e.acceptsMedia)}),(0,s.jsx)(Mb,{sendOnEnter:n,setSendOnEnter:i}),(0,s.jsx)(Eb,{value:l,onChange:c,onPressEnter:h,onFocus:d,onBlur:f,disabled:["R2","R3","R4","R5","G3","X3"].includes((null==e?void 0:e.state)||"")}),(0,s.jsx)(Qd,{shape:"circle",primary:!!(null==l?void 0:l.length),disabled:!l||0===l.length,className:"memori-chat-inputs--send",onClick:()=>{u(l),v(),speechSynthesis.speak(new SpeechSynthesisUtterance(""))},title:x("send")||"Send",icon:(0,s.jsx)(Cb,{})}),p&&"HOLD_TO_TALK"===m&&(0,s.jsx)(Tb,{listening:g,startListening:y,stopListening:()=>{b(),(null==l?void 0:l.length)&&u(l)},stopAudio:v}),p&&"CONTINUOUS"===m&&(0,s.jsx)(Qd,{primary:!0,className:r(Kd)("memori-chat-inputs--mic",{"memori-chat-inputs--mic--listening":g}),title:g?x("write_and_speak.micButtonPopoverListening")||"Listening":x("write_and_speak.micButtonPopover")||"Start listening",onClick:()=>{g?b():(v(),y())},shape:"circle",icon:(0,s.jsx)(kb,{})})]})};u=a("85Hg2");const Ob=" ",Rb={en:["Generating an accurate and fancy response...","Generating a response that will blow your mind...","Generating a response that will make you smile...","Thinking of a response...","Thinking of a response that will make you smile...","Gathering my thoughts...","Gathering my thoughts to give you a response..."],it:["Sto generando una risposta accurata e fantasiosa...","Sto generando una risposta che ti farà impazzire...","Sto generando una risposta che ti farà sorridere...","Sto pensando ad una risposta...","Sto pensando ad una risposta che ti farà sorridere...","Sto raccogliendo i miei pensieri...","Sto raccogliendo i miei pensieri per darti una risposta..."]};var Pb=({useDefaultSentences:e=!1,lang:t="en",sentence:n})=>{const[r,i]=(0,u.useState)(n?`${n.endsWith("...")?n:`${n}...`}${Ob}`:""),[o,a]=(0,u.useState)("");return(0,u.useEffect)((()=>{const s=setInterval((()=>{const s=r[o.length];void 0!==s&&r.length>0?a((e=>e+s)):!n&&e&&(a(""),i(Rb[t][Math.floor(Math.random()*Rb[t].length)]+Ob))}),50);return()=>clearInterval(s)})),(0,s.jsx)("div",{className:"memori-chat--bubble",children:(0,s.jsxs)("div",{className:"memori-chat--bubble-typing",children:[(0,s.jsxs)("div",{id:"wave",children:[(0,s.jsx)("span",{className:"dot"}),(0,s.jsx)("span",{className:"dot"}),(0,s.jsx)("span",{className:"dot"})]}),r.length>0&&(0,s.jsx)("p",{children:o})]})})};var Nb=(0,u.memo)((({memori:e,tenant:t,sessionID:n,baseUrl:i,apiUrl:o,translateTo:a,memoriTyping:l,typingText:c,showTypingText:d=!1,history:f=[],authToken:h,dialogState:p,simulateUserPrompt:m,showDates:g=!1,showContextPerLine:v=!1,showAIicon:y=!0,selectReceiverTag:b,preview:w=!1,instruct:x=!1,showInputs:S=!0,showMicrophone:M=!1,microphoneMode:_="HOLD_TO_TALK",sendOnEnter:A,setSendOnEnter:E,attachmentsMenuOpen:C,setAttachmentsMenuOpen:k,userMessage:T="",onChangeUserMessage:I,sendMessage:O,listening:R,isPlayingAudio:P,stopAudio:N,startListening:L,stopListening:D,resetTranscript:B,customMediaRenderer:j,user:F,userAvatar:U,experts:z})=>{var H,V,W,G,q;const K=()=>{setTimeout((()=>{var e,t,n;null===(e=document.querySelector(".memori-chat--content"))||void 0===e||e.scrollTo(0,null!==(n=null===(t=document.querySelector(".memori-chat--content"))||void 0===t?void 0:t.scrollHeight)&&void 0!==n?n:0)}),200)};(0,u.useEffect)((()=>{!w&&K()}),[f,w]);return(0,s.jsxs)("div",{className:r(Kd)("memori-chat--wrapper",{"memori-chat-wrapper--translate":a}),id:"chat-wrapper",lang:null==a?void 0:a.toUpperCase(),"data-memori-lang":null!==(G=null===(W=null===(V=null===(H=e.culture)||void 0===H?void 0:H.split("-"))||void 0===V?void 0:V[0])||void 0===W?void 0:W.toUpperCase())&&void 0!==G?G:"EN",children:[(0,s.jsx)("div",{className:r(Kd)("memori-chat--history",{"memori-chat--history-touch":Nm()}),children:(0,s.jsxs)("div",{className:r(Kd)("memori-chat--content",{"memori-chat--content-touch":Nm()}),children:[(0,s.jsx)("div",{className:r(Kd)("memori-chat--cover"),style:{backgroundImage:`url("${jm({type:"cover",tenantID:null==t?void 0:t.id,resourceURI:e.coverURL,baseURL:i,apiURL:o})}"), url("${jm({type:"cover",tenantID:null==t?void 0:t.id,baseURL:i||"https://app.twincreator.com",apiURL:o})}")`}}),f.map(((l,c)=>{var d,h,b,w;return(0,s.jsxs)(r(u).Fragment,{children:[(0,s.jsx)(pg,{isFirst:0===c,message:l,memori:e,tenant:t,baseUrl:i,apiUrl:o,simulateUserPrompt:m,showAIicon:y,showFeedback:c===f.length-1&&!l.fromUser&&(null==p?void 0:p.acceptsFeedback),user:F,userAvatar:U,experts:z}),g&&!!l.timestamp&&(0,s.jsx)("small",{className:"memori-chat--timestamp "+(l.fromUser?"text-right":"text-left"),children:new Intl.DateTimeFormat("it",{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(l.timestamp.endsWith("Z")?l.timestamp:`${l.timestamp}Z`))}),v&&!!Object.keys(null!==(d=l.contextVars)&&void 0!==d?d:{}).length&&(0,s.jsx)("div",{className:"memori-chat--context-vars",children:Object.keys(null!==(h=l.contextVars)&&void 0!==h?h:{}).map((e=>{var t,n,r;return"-"===(null===(t=l.contextVars)||void 0===t?void 0:t[e])?(0,s.jsx)("div",{className:"memori-chat--context-tag memori-chat--context-tag-canceled",children:(0,s.jsx)("span",{className:"memori-chat--context-tag-text",children:e})},e):"✔️"===(null===(n=l.contextVars)||void 0===n?void 0:n[e])?(0,s.jsx)("div",{className:"memori-chat--context-tag",children:(0,s.jsx)("span",{className:"memori-chat--context-tag-text",children:e})},e):(0,s.jsx)("div",{className:"memori-chat--context-tag",children:(0,s.jsxs)("span",{className:"memori-chat--context-tag-text",children:[e,": ",null===(r=l.contextVars)||void 0===r?void 0:r[e]]})},e)}))}),(0,s.jsx)($y,{simulateUserPrompt:m,media:null===(b=null==l?void 0:l.media)||void 0===b?void 0:b.filter((e=>"text/html"!==e.mimeType&&"text/plain"!==e.mimeType)),links:null===(w=null==l?void 0:l.media)||void 0===w?void 0:w.filter((e=>"text/html"===e.mimeType)),sessionID:n,baseUrl:i,apiUrl:o,translateTo:a,customMediaRenderer:j})]},c)})),(null==p?void 0:p.hints)&&p.hints.length>0&&(0,s.jsx)($y,{simulateUserPrompt:m,hints:p.translatedHints?p.translatedHints:p.hints.map((e=>({text:e,originalText:e})))}),!!l&&(0,s.jsx)(Pb,{useDefaultSentences:d,lang:a&&"it"===a.toLowerCase()?"it":"en",sentence:c},c),(0,s.jsx)("div",{id:"end-messages-ref"})]})}),"X3"===(null==p?void 0:p.state)&&n&&(0,s.jsx)("div",{className:"memori-chat--known-tags",children:Object.keys(null!==(q=p.knownTags)&&void 0!==q?q:{}).filter((t=>t!==e.giverTag)).map((e=>{var t;return(0,s.jsx)(Qd,{icon:(0,s.jsx)("span",{className:"memori-chat--known-tag-icon",children:e}),className:"memori-chat--known-tag",onClick:()=>b(e),children:null===(t=p.knownTags)||void 0===t?void 0:t[e]},e)}))}),S&&(0,s.jsx)(Ib,{userMessage:T,onChangeUserMessage:I,dialogState:p,instruct:x,authToken:h,sendMessage:O,microphoneMode:_,sendOnEnter:A,setSendOnEnter:E,attachmentsMenuOpen:C,setAttachmentsMenuOpen:k,onTextareaPressEnter:()=>{"keypress"===A&&(null==T?void 0:T.length)>0&&(D(),O(T),I(""),B())},onTextareaFocus:()=>{var e,t,n,r;D(),Nm()&&window.innerWidth<=768&&(null===(t=null===(e=document.getElementById("chat-wrapper"))||void 0===e?void 0:e.classList)||void 0===t||t.add("chat-focused"),null===(r=null===(n=document.querySelector(".memori.memori-widget"))||void 0===n?void 0:n.classList)||void 0===r||r.add("chat-focused"),setTimeout((()=>{K()}),300))},onTextareaBlur:()=>{var e,t,n,r,i;(null===(t=null===(e=document.getElementById("chat-wrapper"))||void 0===e?void 0:e.classList)||void 0===t?void 0:t.contains("chat-focused"))&&(null===(n=document.getElementById("chat-wrapper"))||void 0===n||n.classList.remove("chat-focused"),null===(i=null===(r=document.querySelector(".memori.memori-widget"))||void 0===r?void 0:r.classList)||void 0===i||i.remove("chat-focused"),K())},startListening:L,stopListening:D,stopAudio:N,listening:R,isPlayingAudio:P,showMicrophone:M})]})}));u=a("85Hg2");var Lb=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:[(0,s.jsx)("path",{d:"M140 188h584v164h76V144c0-17.7-14.3-32-32-32H96c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h544v-76H140V188z"}),(0,s.jsx)("path",{d:"M414.3 256h-60.6c-3.4 0-6.4 2.2-7.6 5.4L219 629.4c-.3.8-.4 1.7-.4 2.6 0 4.4 3.6 8 8 8h55.1c3.4 0 6.4-2.2 7.6-5.4L322 540h196.2L422 261.4c-1.3-3.2-4.3-5.4-7.7-5.4zm12.4 228h-85.5L384 360.2 426.7 484zM936 528H800v-93c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v93H592c-13.3 0-24 10.7-24 24v176c0 13.3 10.7 24 24 24h136v152c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V752h136c13.3 0 24-10.7 24-24V552c0-13.3-10.7-24-24-24zM728 680h-88v-80h88v80zm160 0h-88v-80h88v80z"})]});var Db=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"})});var Bb=({memoriName:e,blockedUntil:t,showGiverInfo:n=!1,showTitle:r=!1,marginLeft:i=!1})=>{const{t:o}=Ce(),a=new Date(t);return a>new Date?(0,s.jsx)(zm,{className:"blocked-memori-badge--tooltip",content:(0,s.jsxs)(s.Fragment,{children:[!n&&o("memoriBlockedAnon",{name:e,date:new Intl.DateTimeFormat("it",{day:"numeric",month:"long",year:"numeric"}).format(a)}),n&&o("memoriBlockedUntil",{date:new Intl.DateTimeFormat("it",{day:"numeric",month:"long",year:"numeric"}).format(a)}),n&&` ${o("memoriBlockedReasonExceedChats")}`,n&&(0,s.jsx)("br",{}),n&&`\n${o("memoriBlockedGiverHelper")}`]}),children:(0,s.jsxs)("div",{className:"blocked-memori-badge--wrapper",children:[(0,s.jsx)("div",{className:"blocked-memori-badge "+(i?" margin-left":""),children:(0,s.jsx)(Db,{className:"blocked-memori-badge--icon"})}),r&&(0,s.jsx)("span",{className:"blocked-memori-badge--title",children:o("memoriBlockedTitle")})]})}):null};var jb=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",width:"20",height:"16",viewBox:"0 0 640 512",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M211.2 96a64 64 0 10-128 0 64 64 0 10128 0zM32 256c0 17.7 14.3 32 32 32h85.6c10.1-39.4 38.6-71.5 75.8-86.6-9.7-6-21.2-9.4-33.4-9.4H96c-35.3 0-64 28.7-64 64zm461.6 32H576c17.7 0 32-14.3 32-32 0-35.3-28.7-64-64-64h-96c-11.7 0-22.7 3.1-32.1 8.6 38.1 14.8 67.4 47.3 77.7 87.4zm-102.4-61.6c-6.9-1.6-14.2-2.4-21.6-2.4h-96c-8.5 0-16.7 1.1-24.5 3.1-30.8 8.1-55.6 31.1-66.1 60.9-3.5 10-5.5 20.8-5.5 32 0 17.7 14.3 32 32 32h224c17.7 0 32-14.3 32-32 0-11.2-1.9-22-5.5-32-10.8-30.7-36.8-54.2-68.9-61.6zM563.2 96a64 64 0 10-128 0 64 64 0 10128 0zm-241.6 96a80 80 0 100-160 80 80 0 100 160zM32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32h576c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"})});u=a("85Hg2");var Fb=({forceStatus:e,provider:t})=>{var n;const{t:r}=Ce(),[i,o]=(0,u.useState)(null!=e?e:"none"),a=(e=>{switch(e){case"DEFAULT":case"OpenAI":return{getStatus:async()=>{var e;const t=await fetch("https://status.openai.com/api/v2/summary.json");return null!==(e=(await t.json()).status.indicator)&&void 0!==e?e:"none"},statusPage:"https://status.openai.com/"};default:return{getStatus:async()=>"none",statusPage:""}}})(t);return(0,u.useEffect)((()=>{e||a.getStatus().then((e=>o(e)))}),[e,t]),"none"!==i?(0,s.jsx)(zm,{className:"memori--completion-provider-status--tooltip",align:"topLeft",content:(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{children:r("completionProviderDown",{provider:null!=t?t:r("completionProviderFallbackName")})}),!!(null===(n=a.statusPage)||void 0===n?void 0:n.length)&&(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:a.statusPage,rel:"noopener noreferrer",target:"_blank",children:r("completionProviderCheckStatusPage")})})]}),children:(0,s.jsx)(Db,{className:"memori--completion-provider-status--icon"})}):null};var Ub=({memori:e,tenant:t,gamificationLevel:n,language:r,userLang:i,setUserLang:o,baseUrl:a,apiUrl:l,position:c,openPositionDrawer:d,integrationConfig:f,instruct:h=!1,clickedStart:p,onClickStart:m,initializeTTS:g,_TEST_forceProviderStatus:v})=>{var y,b;const{t:w,i18n:x}=Ce(),[S,M]=(0,u.useState)(e.description),[_,A]=(0,u.useState)(!0);return(0,u.useEffect)((()=>{var t,n,i,o,s,l;(null!==(n=null===(t=x.language)||void 0===t?void 0:t.toUpperCase())&&void 0!==n?n:"IT")!==(null!==(i=null==r?void 0:r.toUpperCase())&&void 0!==i?i:"IT")&&(null===(o=e.description)||void 0===o?void 0:o.length)&&Sg(e.description,null!==(l=null===(s=x.language)||void 0===s?void 0:s.toUpperCase())&&void 0!==l?l:"IT",r,a).then((e=>{M(e.text)})).catch(console.error)}),[x.language,r,e.description,a]),(0,s.jsxs)("div",{className:"memori--start-panel",children:[(0,s.jsxs)("div",{className:"memori--cover",style:{backgroundImage:`url("${jm({type:"cover",tenantID:null==t?void 0:t.id,resourceURI:e.coverURL,baseURL:a,apiURL:l})}"), url("${jm({type:"cover",tenantID:null==t?void 0:t.id,baseURL:a,apiURL:l})}")`},children:[!!(null===(y=null==n?void 0:n.badge)||void 0===y?void 0:y.length)&&!e.enableBoardOfExperts&&(0,s.jsx)("div",{className:"memori--gamification-badge",children:(0,s.jsx)(zm,{align:"left",content:`${w("gamification.level")} ${n.badge}, ${n.points} ${w("gamification.points")}`,children:(0,s.jsx)("span",{"aria-label":`${w("gamification.level")} ${n.badge}, ${n.points} ${w("gamification.points")}`,children:n.badge})})}),!!e.enableCompletions&&!e.enableBoardOfExperts&&(0,s.jsx)("div",{className:"memori--completions-enabled",children:(0,s.jsx)(zm,{align:"left",content:w("completionsEnabled"),children:(0,s.jsx)("span",{"aria-label":w("completionsEnabled")||"Completions",children:(0,s.jsx)(Um,{})})})}),!!e.enableBoardOfExperts&&(0,s.jsx)("div",{className:"memori--board-of-experts",children:(0,s.jsx)(zm,{align:"left",content:w("boardOfExperts"),children:(0,s.jsx)("span",{"aria-label":w("boardOfExperts")||"Board of Experts",children:(0,s.jsx)(jb,{})})})}),!!e.nsfw&&(0,s.jsx)("div",{className:"memori--nsfw",children:(0,s.jsx)(zm,{align:"left",content:w("nsfw"),children:(0,s.jsx)("span",{title:w("nsfw")||"NSFW",children:"🔞"})})})]}),(0,s.jsxs)("picture",{className:"memori--avatar",children:[(0,s.jsx)("source",{src:null!==(b=e.avatarURL)&&void 0!==b?b:jm({type:"avatar",tenantID:null==t?void 0:t.id,resourceURI:e.avatarURL,baseURL:a,apiURL:l})}),(0,s.jsx)("img",{alt:e.name,src:e.avatarURL&&e.avatarURL.length>0?jm({type:"avatar",tenantID:null==t?void 0:t.id,resourceURI:e.avatarURL,baseURL:a,apiURL:l}):jm({type:"avatar",tenantID:null==t?void 0:t.id,baseURL:a,apiURL:l})})]}),(0,s.jsx)("h2",{className:"memori--title",children:e.name}),e.needsPosition&&!c&&(0,s.jsxs)("div",{className:"memori--needsPosition",children:[(0,s.jsx)("p",{children:w("write_and_speak.requirePosition")}),(0,s.jsx)(Qd,{primary:!0,onClick:()=>d(),className:"memori--start-button",children:w("widget.position")})]}),(e.needsPosition&&c||!e.needsPosition)&&(0,s.jsxs)("div",{className:"memori--description",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"memori--description-text",children:S&&_?S:e.description}),S!==e.description&&(0,s.jsx)(Qd,{ghost:!0,className:"memori--translation-toggle",icon:(0,s.jsx)(Lb,{}),onClick:()=>{A((e=>!e))},children:w(_?"showOriginalText":"showTranslatedText")})]}),(null==f?void 0:f.multilanguage)&&!h&&(0,s.jsxs)("div",{className:"memori--language-chooser",children:[(0,s.jsx)("label",{id:"user-lang-pref-label",htmlFor:"user-lang-pref",children:w("write_and_speak.iWantToTalkToIn",{name:e.name})}),(0,s.jsx)("select",{id:"user-lang-pref",className:"memori-select--button",value:(null!=i?i:x.language).toUpperCase(),"aria-labelledby":"user-lang-pref-label",onChange:e=>{o(e.target.value)},children:Mg.map((e=>(0,s.jsx)("option",{value:e.value,"aria-label":e.label,children:e.label},e.value)))})]}),(0,s.jsx)(Qd,{primary:!0,disabled:!!e.blockedUntil&&!e.isGiver,loading:p,onClick:e=>{try{window.speechSynthesis.speak(new SpeechSynthesisUtterance(""))}catch(e){console.error(e)}g&&g(),m&&m()},className:"memori--start-button",children:w("write_and_speak."+(h?"instructButton":"tryMeButton"))}),(0,s.jsx)(Fb,{provider:e.completionProvider,forceStatus:v}),(0,s.jsx)("p",{className:"memori--start-description",children:w(h?"write_and_speak.pageInstructExplanation":"write_and_speak.pageTryMeExplanation")}),!!e.blockedUntil&&(0,s.jsx)(Bb,{memoriName:e.name,blockedUntil:e.blockedUntil,showGiverInfo:e.isGiver,showTitle:!0,marginLeft:!0})]})]})},zb=(u=a("85Hg2"),u=a("85Hg2"),{}),Hb={};(Hb=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}).__esModule=!0,Hb.default=Hb,(zb=function(e,t){if(null==e)return{};var n,r,i=Hb(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}).__esModule=!0,zb.default=zb;u=a("85Hg2");var Vb=["forwardedRef"];function Wb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wb(Object(n),!0).forEach((function(t){r(Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class qb extends u.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){console.error("Uncaught error:",e,t)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,s.jsxs)("div",{style:{background:"rgba(255, 255, 255, 0.4)",color:"#000",padding:"2rem",borderRadius:"10px"},children:[(0,s.jsx)("h2",{children:this.props.t("error.generic")}),(0,s.jsx)(Qd,{primary:!0,onClick:()=>this.setState({hasError:!1}),children:this.props.t("error.tryAgain")||"Try again"})]}):this.props.children}}var Kb=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){function i(i){var o=i.forwardedRef,a=r(zb)(i,Vb),s=Ce(e,Gb(Gb({},a),{},{keyPrefix:t.keyPrefix})),l=r(q)(s,3),c=l[0],d=l[1],f=l[2],h=Gb(Gb({},a),{},{t:c,i18n:d,tReady:f});return t.withRef&&o?h.ref=o:!t.withRef&&o&&(h.forwardedRef=o),(0,u.createElement)(n,h)}i.displayName="withI18nextTranslation(".concat(Me(n),")"),i.WrappedComponent=n;return t.withRef?(0,u.forwardRef)((function(e,t){return(0,u.createElement)(i,Object.assign({},e,{forwardedRef:t}))})):i}}(["common"])(qb),Yb=(u=a("85Hg2"),u=a("85Hg2"),{});e(Yb,"REVISION",(()=>Jb)),e(Yb,"MOUSE",(()=>Qb)),e(Yb,"TOUCH",(()=>Xb)),e(Yb,"CullFaceNone",(()=>Zb)),e(Yb,"CullFaceBack",(()=>$b)),e(Yb,"CullFaceFront",(()=>ew)),e(Yb,"CullFaceFrontBack",(()=>tw)),e(Yb,"BasicShadowMap",(()=>nw)),e(Yb,"PCFShadowMap",(()=>rw)),e(Yb,"PCFSoftShadowMap",(()=>iw)),e(Yb,"VSMShadowMap",(()=>ow)),e(Yb,"FrontSide",(()=>aw)),e(Yb,"BackSide",(()=>sw)),e(Yb,"DoubleSide",(()=>lw)),e(Yb,"NoBlending",(()=>cw)),e(Yb,"NormalBlending",(()=>uw)),e(Yb,"AdditiveBlending",(()=>dw)),e(Yb,"SubtractiveBlending",(()=>fw)),e(Yb,"MultiplyBlending",(()=>hw)),e(Yb,"CustomBlending",(()=>pw)),e(Yb,"AddEquation",(()=>mw)),e(Yb,"SubtractEquation",(()=>gw)),e(Yb,"ReverseSubtractEquation",(()=>vw)),e(Yb,"MinEquation",(()=>yw)),e(Yb,"MaxEquation",(()=>bw)),e(Yb,"ZeroFactor",(()=>ww)),e(Yb,"OneFactor",(()=>xw)),e(Yb,"SrcColorFactor",(()=>Sw)),e(Yb,"OneMinusSrcColorFactor",(()=>Mw)),e(Yb,"SrcAlphaFactor",(()=>_w)),e(Yb,"OneMinusSrcAlphaFactor",(()=>Aw)),e(Yb,"DstAlphaFactor",(()=>Ew)),e(Yb,"OneMinusDstAlphaFactor",(()=>Cw)),e(Yb,"DstColorFactor",(()=>kw)),e(Yb,"OneMinusDstColorFactor",(()=>Tw)),e(Yb,"SrcAlphaSaturateFactor",(()=>Iw)),e(Yb,"NeverDepth",(()=>Ow)),e(Yb,"AlwaysDepth",(()=>Rw)),e(Yb,"LessDepth",(()=>Pw)),e(Yb,"LessEqualDepth",(()=>Nw)),e(Yb,"EqualDepth",(()=>Lw)),e(Yb,"GreaterEqualDepth",(()=>Dw)),e(Yb,"GreaterDepth",(()=>Bw)),e(Yb,"NotEqualDepth",(()=>jw)),e(Yb,"MultiplyOperation",(()=>Fw)),e(Yb,"MixOperation",(()=>Uw)),e(Yb,"AddOperation",(()=>zw)),e(Yb,"NoToneMapping",(()=>Hw)),e(Yb,"LinearToneMapping",(()=>Vw)),e(Yb,"ReinhardToneMapping",(()=>Ww)),e(Yb,"CineonToneMapping",(()=>Gw)),e(Yb,"ACESFilmicToneMapping",(()=>qw)),e(Yb,"CustomToneMapping",(()=>Kw)),e(Yb,"UVMapping",(()=>Yw)),e(Yb,"CubeReflectionMapping",(()=>Jw)),e(Yb,"CubeRefractionMapping",(()=>Qw)),e(Yb,"EquirectangularReflectionMapping",(()=>Xw)),e(Yb,"EquirectangularRefractionMapping",(()=>Zw)),e(Yb,"CubeUVReflectionMapping",(()=>$w)),e(Yb,"RepeatWrapping",(()=>ex)),e(Yb,"ClampToEdgeWrapping",(()=>tx)),e(Yb,"MirroredRepeatWrapping",(()=>nx)),e(Yb,"NearestFilter",(()=>rx)),e(Yb,"NearestMipmapNearestFilter",(()=>ix)),e(Yb,"NearestMipMapNearestFilter",(()=>ox)),e(Yb,"NearestMipmapLinearFilter",(()=>ax)),e(Yb,"NearestMipMapLinearFilter",(()=>sx)),e(Yb,"LinearFilter",(()=>lx)),e(Yb,"LinearMipmapNearestFilter",(()=>cx)),e(Yb,"LinearMipMapNearestFilter",(()=>ux)),e(Yb,"LinearMipmapLinearFilter",(()=>dx)),e(Yb,"LinearMipMapLinearFilter",(()=>fx)),e(Yb,"UnsignedByteType",(()=>hx)),e(Yb,"ByteType",(()=>px)),e(Yb,"ShortType",(()=>mx)),e(Yb,"UnsignedShortType",(()=>gx)),e(Yb,"IntType",(()=>vx)),e(Yb,"UnsignedIntType",(()=>yx)),e(Yb,"FloatType",(()=>bx)),e(Yb,"HalfFloatType",(()=>wx)),e(Yb,"UnsignedShort4444Type",(()=>xx)),e(Yb,"UnsignedShort5551Type",(()=>Sx)),e(Yb,"UnsignedInt248Type",(()=>Mx)),e(Yb,"AlphaFormat",(()=>_x)),e(Yb,"RGBFormat",(()=>Ax)),e(Yb,"RGBAFormat",(()=>Ex)),e(Yb,"LuminanceFormat",(()=>Cx)),e(Yb,"LuminanceAlphaFormat",(()=>kx)),e(Yb,"DepthFormat",(()=>Tx)),e(Yb,"DepthStencilFormat",(()=>Ix)),e(Yb,"RedFormat",(()=>Ox)),e(Yb,"RedIntegerFormat",(()=>Rx)),e(Yb,"RGFormat",(()=>Px)),e(Yb,"RGIntegerFormat",(()=>Nx)),e(Yb,"RGBAIntegerFormat",(()=>Lx)),e(Yb,"RGB_S3TC_DXT1_Format",(()=>Dx)),e(Yb,"RGBA_S3TC_DXT1_Format",(()=>Bx)),e(Yb,"RGBA_S3TC_DXT3_Format",(()=>jx)),e(Yb,"RGBA_S3TC_DXT5_Format",(()=>Fx)),e(Yb,"RGB_PVRTC_4BPPV1_Format",(()=>Ux)),e(Yb,"RGB_PVRTC_2BPPV1_Format",(()=>zx)),e(Yb,"RGBA_PVRTC_4BPPV1_Format",(()=>Hx)),e(Yb,"RGBA_PVRTC_2BPPV1_Format",(()=>Vx)),e(Yb,"RGB_ETC1_Format",(()=>Wx)),e(Yb,"RGB_ETC2_Format",(()=>Gx)),e(Yb,"RGBA_ETC2_EAC_Format",(()=>qx)),e(Yb,"RGBA_ASTC_4x4_Format",(()=>Kx)),e(Yb,"RGBA_ASTC_5x4_Format",(()=>Yx)),e(Yb,"RGBA_ASTC_5x5_Format",(()=>Jx)),e(Yb,"RGBA_ASTC_6x5_Format",(()=>Qx)),e(Yb,"RGBA_ASTC_6x6_Format",(()=>Xx)),e(Yb,"RGBA_ASTC_8x5_Format",(()=>Zx)),e(Yb,"RGBA_ASTC_8x6_Format",(()=>$x)),e(Yb,"RGBA_ASTC_8x8_Format",(()=>eS)),e(Yb,"RGBA_ASTC_10x5_Format",(()=>tS)),e(Yb,"RGBA_ASTC_10x6_Format",(()=>nS)),e(Yb,"RGBA_ASTC_10x8_Format",(()=>rS)),e(Yb,"RGBA_ASTC_10x10_Format",(()=>iS)),e(Yb,"RGBA_ASTC_12x10_Format",(()=>oS)),e(Yb,"RGBA_ASTC_12x12_Format",(()=>aS)),e(Yb,"RGBA_BPTC_Format",(()=>sS)),e(Yb,"LoopOnce",(()=>lS)),e(Yb,"LoopRepeat",(()=>cS)),e(Yb,"LoopPingPong",(()=>uS)),e(Yb,"InterpolateDiscrete",(()=>dS)),e(Yb,"InterpolateLinear",(()=>fS)),e(Yb,"InterpolateSmooth",(()=>hS)),e(Yb,"ZeroCurvatureEnding",(()=>pS)),e(Yb,"ZeroSlopeEnding",(()=>mS)),e(Yb,"WrapAroundEnding",(()=>gS)),e(Yb,"NormalAnimationBlendMode",(()=>vS)),e(Yb,"AdditiveAnimationBlendMode",(()=>yS)),e(Yb,"TrianglesDrawMode",(()=>bS)),e(Yb,"TriangleStripDrawMode",(()=>wS)),e(Yb,"TriangleFanDrawMode",(()=>xS)),e(Yb,"LinearEncoding",(()=>SS)),e(Yb,"sRGBEncoding",(()=>MS)),e(Yb,"BasicDepthPacking",(()=>_S)),e(Yb,"RGBADepthPacking",(()=>AS)),e(Yb,"TangentSpaceNormalMap",(()=>ES)),e(Yb,"ObjectSpaceNormalMap",(()=>CS)),e(Yb,"NoColorSpace",(()=>kS)),e(Yb,"SRGBColorSpace",(()=>TS)),e(Yb,"LinearSRGBColorSpace",(()=>IS)),e(Yb,"ZeroStencilOp",(()=>OS)),e(Yb,"KeepStencilOp",(()=>RS)),e(Yb,"ReplaceStencilOp",(()=>PS)),e(Yb,"IncrementStencilOp",(()=>NS)),e(Yb,"DecrementStencilOp",(()=>LS)),e(Yb,"IncrementWrapStencilOp",(()=>DS)),e(Yb,"DecrementWrapStencilOp",(()=>BS)),e(Yb,"InvertStencilOp",(()=>jS)),e(Yb,"NeverStencilFunc",(()=>FS)),e(Yb,"LessStencilFunc",(()=>US)),e(Yb,"EqualStencilFunc",(()=>zS)),e(Yb,"LessEqualStencilFunc",(()=>HS)),e(Yb,"GreaterStencilFunc",(()=>VS)),e(Yb,"NotEqualStencilFunc",(()=>WS)),e(Yb,"GreaterEqualStencilFunc",(()=>GS)),e(Yb,"AlwaysStencilFunc",(()=>qS)),e(Yb,"StaticDrawUsage",(()=>KS)),e(Yb,"DynamicDrawUsage",(()=>YS)),e(Yb,"StreamDrawUsage",(()=>JS)),e(Yb,"StaticReadUsage",(()=>QS)),e(Yb,"DynamicReadUsage",(()=>XS)),e(Yb,"StreamReadUsage",(()=>ZS)),e(Yb,"StaticCopyUsage",(()=>$S)),e(Yb,"DynamicCopyUsage",(()=>eM)),e(Yb,"StreamCopyUsage",(()=>tM)),e(Yb,"GLSL1",(()=>nM)),e(Yb,"GLSL3",(()=>rM)),e(Yb,"_SRGBAFormat",(()=>iM)),e(Yb,"EventDispatcher",(()=>oM)),e(Yb,"MathUtils",(()=>bM)),e(Yb,"Vector2",(()=>wM)),e(Yb,"Matrix3",(()=>xM)),e(Yb,"ColorManagement",(()=>TM)),e(Yb,"Color",(()=>DM)),e(Yb,"ImageUtils",(()=>jM)),e(Yb,"Source",(()=>FM)),e(Yb,"Texture",(()=>HM)),e(Yb,"Vector4",(()=>VM)),e(Yb,"WebGLRenderTarget",(()=>WM)),e(Yb,"DataArrayTexture",(()=>GM)),e(Yb,"WebGLArrayRenderTarget",(()=>qM)),e(Yb,"Data3DTexture",(()=>KM)),e(Yb,"WebGL3DRenderTarget",(()=>YM)),e(Yb,"WebGLMultipleRenderTargets",(()=>JM)),e(Yb,"Quaternion",(()=>QM)),e(Yb,"Vector3",(()=>XM)),e(Yb,"Box3",(()=>e_)),e(Yb,"Sphere",(()=>b_)),e(Yb,"Ray",(()=>C_)),e(Yb,"Matrix4",(()=>k_)),e(Yb,"Euler",(()=>j_)),e(Yb,"Layers",(()=>F_)),e(Yb,"Object3D",(()=>$_)),e(Yb,"Triangle",(()=>uA)),e(Yb,"Material",(()=>fA)),e(Yb,"MeshBasicMaterial",(()=>hA)),e(Yb,"BufferAttribute",(()=>gA)),e(Yb,"Int8BufferAttribute",(()=>vA)),e(Yb,"Uint8BufferAttribute",(()=>yA)),e(Yb,"Uint8ClampedBufferAttribute",(()=>bA)),e(Yb,"Int16BufferAttribute",(()=>wA)),e(Yb,"Uint16BufferAttribute",(()=>xA)),e(Yb,"Int32BufferAttribute",(()=>SA)),e(Yb,"Uint32BufferAttribute",(()=>MA)),e(Yb,"Float16BufferAttribute",(()=>_A)),e(Yb,"Float32BufferAttribute",(()=>AA)),e(Yb,"Float64BufferAttribute",(()=>EA)),e(Yb,"BufferGeometry",(()=>NA)),e(Yb,"Mesh",(()=>ZA)),e(Yb,"BoxGeometry",(()=>eE)),e(Yb,"UniformsUtils",(()=>rE)),e(Yb,"ShaderMaterial",(()=>iE)),e(Yb,"Camera",(()=>oE)),e(Yb,"PerspectiveCamera",(()=>aE)),e(Yb,"CubeCamera",(()=>lE)),e(Yb,"CubeTexture",(()=>cE)),e(Yb,"WebGLCubeRenderTarget",(()=>uE)),e(Yb,"Plane",(()=>pE)),e(Yb,"Frustum",(()=>vE)),e(Yb,"PlaneGeometry",(()=>wE)),e(Yb,"ShaderChunk",(()=>xE)),e(Yb,"UniformsLib",(()=>SE)),e(Yb,"ShaderLib",(()=>ME)),e(Yb,"OrthographicCamera",(()=>IE)),e(Yb,"PMREMGenerator",(()=>FE)),e(Yb,"MeshDepthMaterial",(()=>Lk)),e(Yb,"MeshDistanceMaterial",(()=>Dk)),e(Yb,"WebGLUtils",(()=>Uk)),e(Yb,"ArrayCamera",(()=>zk)),e(Yb,"Group",(()=>Hk)),e(Yb,"DepthTexture",(()=>Gk)),e(Yb,"WebGLRenderer",(()=>Jk)),e(Yb,"WebGL1Renderer",(()=>Qk)),e(Yb,"FogExp2",(()=>Xk)),e(Yb,"Fog",(()=>Zk)),e(Yb,"Scene",(()=>$k)),e(Yb,"InterleavedBuffer",(()=>eT)),e(Yb,"InterleavedBufferAttribute",(()=>nT)),e(Yb,"SpriteMaterial",(()=>rT)),e(Yb,"Sprite",(()=>vT)),e(Yb,"LOD",(()=>xT)),e(Yb,"SkinnedMesh",(()=>CT)),e(Yb,"Bone",(()=>kT)),e(Yb,"DataTexture",(()=>TT)),e(Yb,"Skeleton",(()=>RT)),e(Yb,"InstancedBufferAttribute",(()=>PT)),e(Yb,"InstancedMesh",(()=>jT)),e(Yb,"LineBasicMaterial",(()=>FT)),e(Yb,"Line",(()=>GT)),e(Yb,"LineSegments",(()=>YT)),e(Yb,"LineLoop",(()=>JT)),e(Yb,"PointsMaterial",(()=>QT)),e(Yb,"Points",(()=>tI)),e(Yb,"VideoTexture",(()=>rI)),e(Yb,"FramebufferTexture",(()=>iI)),e(Yb,"CompressedTexture",(()=>oI)),e(Yb,"CanvasTexture",(()=>aI)),e(Yb,"Curve",(()=>sI)),e(Yb,"EllipseCurve",(()=>lI)),e(Yb,"ArcCurve",(()=>cI)),e(Yb,"CatmullRomCurve3",(()=>mI)),e(Yb,"CubicBezierCurve",(()=>bI)),e(Yb,"CubicBezierCurve3",(()=>wI)),e(Yb,"LineCurve",(()=>xI)),e(Yb,"LineCurve3",(()=>SI)),e(Yb,"QuadraticBezierCurve",(()=>MI)),e(Yb,"QuadraticBezierCurve3",(()=>_I)),e(Yb,"SplineCurve",(()=>AI)),e(Yb,"CurvePath",(()=>CI)),e(Yb,"Path",(()=>kI)),e(Yb,"LatheGeometry",(()=>TI)),e(Yb,"CapsuleGeometry",(()=>II)),e(Yb,"CircleGeometry",(()=>OI)),e(Yb,"CylinderGeometry",(()=>RI)),e(Yb,"ConeGeometry",(()=>PI)),e(Yb,"PolyhedronGeometry",(()=>NI)),e(Yb,"DodecahedronGeometry",(()=>LI)),e(Yb,"EdgesGeometry",(()=>UI)),e(Yb,"Shape",(()=>zI)),e(Yb,"ShapeUtils",(()=>hO)),e(Yb,"ExtrudeGeometry",(()=>gO)),e(Yb,"IcosahedronGeometry",(()=>yO)),e(Yb,"OctahedronGeometry",(()=>bO)),e(Yb,"RingGeometry",(()=>wO)),e(Yb,"ShapeGeometry",(()=>xO)),e(Yb,"SphereGeometry",(()=>SO)),e(Yb,"TetrahedronGeometry",(()=>MO)),e(Yb,"TorusGeometry",(()=>_O)),e(Yb,"TorusKnotGeometry",(()=>AO)),e(Yb,"TubeGeometry",(()=>EO)),e(Yb,"WireframeGeometry",(()=>CO)),e(Yb,"ShadowMaterial",(()=>IO)),e(Yb,"RawShaderMaterial",(()=>OO)),e(Yb,"MeshStandardMaterial",(()=>RO)),e(Yb,"MeshPhysicalMaterial",(()=>PO)),e(Yb,"MeshPhongMaterial",(()=>NO)),e(Yb,"MeshToonMaterial",(()=>LO)),e(Yb,"MeshNormalMaterial",(()=>DO)),e(Yb,"MeshLambertMaterial",(()=>BO)),e(Yb,"MeshMatcapMaterial",(()=>jO)),e(Yb,"LineDashedMaterial",(()=>FO)),e(Yb,"AnimationUtils",(()=>qO)),e(Yb,"Interpolant",(()=>KO)),e(Yb,"CubicInterpolant",(()=>YO)),e(Yb,"LinearInterpolant",(()=>JO)),e(Yb,"DiscreteInterpolant",(()=>QO)),e(Yb,"KeyframeTrack",(()=>XO)),e(Yb,"BooleanKeyframeTrack",(()=>ZO)),e(Yb,"ColorKeyframeTrack",(()=>$O)),e(Yb,"NumberKeyframeTrack",(()=>eR)),e(Yb,"QuaternionLinearInterpolant",(()=>tR)),e(Yb,"QuaternionKeyframeTrack",(()=>nR)),e(Yb,"StringKeyframeTrack",(()=>rR)),e(Yb,"VectorKeyframeTrack",(()=>iR)),e(Yb,"AnimationClip",(()=>oR)),e(Yb,"Cache",(()=>sR)),e(Yb,"LoadingManager",(()=>lR)),e(Yb,"DefaultLoadingManager",(()=>cR)),e(Yb,"Loader",(()=>uR)),e(Yb,"FileLoader",(()=>hR)),e(Yb,"AnimationLoader",(()=>pR)),e(Yb,"CompressedTextureLoader",(()=>mR)),e(Yb,"ImageLoader",(()=>gR)),e(Yb,"CubeTextureLoader",(()=>vR)),e(Yb,"DataTextureLoader",(()=>yR)),e(Yb,"TextureLoader",(()=>bR)),e(Yb,"Light",(()=>wR)),e(Yb,"HemisphereLight",(()=>xR)),e(Yb,"SpotLight",(()=>CR)),e(Yb,"PointLight",(()=>RR)),e(Yb,"DirectionalLight",(()=>NR)),e(Yb,"AmbientLight",(()=>LR)),e(Yb,"RectAreaLight",(()=>DR)),e(Yb,"SphericalHarmonics3",(()=>BR)),e(Yb,"LightProbe",(()=>jR)),e(Yb,"MaterialLoader",(()=>FR)),e(Yb,"LoaderUtils",(()=>UR)),e(Yb,"InstancedBufferGeometry",(()=>zR)),e(Yb,"BufferGeometryLoader",(()=>HR)),e(Yb,"ObjectLoader",(()=>VR)),e(Yb,"ImageBitmapLoader",(()=>KR)),e(Yb,"AudioContext",(()=>JR)),e(Yb,"AudioLoader",(()=>QR)),e(Yb,"HemisphereLightProbe",(()=>XR)),e(Yb,"AmbientLightProbe",(()=>ZR)),e(Yb,"StereoCamera",(()=>nP)),e(Yb,"Clock",(()=>rP)),e(Yb,"AudioListener",(()=>cP)),e(Yb,"Audio",(()=>uP)),e(Yb,"PositionalAudio",(()=>mP)),e(Yb,"AudioAnalyser",(()=>gP)),e(Yb,"PropertyMixer",(()=>vP)),e(Yb,"PropertyBinding",(()=>_P)),e(Yb,"AnimationObjectGroup",(()=>AP)),e(Yb,"AnimationMixer",(()=>kP)),e(Yb,"Uniform",(()=>TP)),e(Yb,"UniformsGroup",(()=>OP)),e(Yb,"InstancedInterleavedBuffer",(()=>RP)),e(Yb,"GLBufferAttribute",(()=>PP)),e(Yb,"Raycaster",(()=>NP)),e(Yb,"Spherical",(()=>BP)),e(Yb,"Cylindrical",(()=>jP)),e(Yb,"Box2",(()=>UP)),e(Yb,"Line3",(()=>VP)),e(Yb,"SpotLightHelper",(()=>GP)),e(Yb,"SkeletonHelper",(()=>JP)),e(Yb,"PointLightHelper",(()=>XP)),e(Yb,"HemisphereLightHelper",(()=>tN)),e(Yb,"GridHelper",(()=>nN)),e(Yb,"PolarGridHelper",(()=>rN)),e(Yb,"DirectionalLightHelper",(()=>sN)),e(Yb,"CameraHelper",(()=>uN)),e(Yb,"BoxHelper",(()=>hN)),e(Yb,"Box3Helper",(()=>pN)),e(Yb,"PlaneHelper",(()=>mN)),e(Yb,"ArrowHelper",(()=>bN)),e(Yb,"AxesHelper",(()=>wN)),e(Yb,"ShapePath",(()=>xN)),e(Yb,"DataUtils",(()=>_N)),e(Yb,"ImmediateRenderObject",(()=>AN)),e(Yb,"WebGLMultisampleRenderTarget",(()=>EN)),e(Yb,"DataTexture2DArray",(()=>CN)),e(Yb,"DataTexture3D",(()=>kN)),e(Yb,"BoxBufferGeometry",(()=>TN)),e(Yb,"CapsuleBufferGeometry",(()=>IN)),e(Yb,"CircleBufferGeometry",(()=>ON)),e(Yb,"ConeBufferGeometry",(()=>RN)),e(Yb,"CylinderBufferGeometry",(()=>PN)),e(Yb,"DodecahedronBufferGeometry",(()=>NN)),e(Yb,"ExtrudeBufferGeometry",(()=>LN)),e(Yb,"IcosahedronBufferGeometry",(()=>DN)),e(Yb,"LatheBufferGeometry",(()=>BN)),e(Yb,"OctahedronBufferGeometry",(()=>jN)),e(Yb,"PlaneBufferGeometry",(()=>FN)),e(Yb,"PolyhedronBufferGeometry",(()=>UN)),e(Yb,"RingBufferGeometry",(()=>zN)),e(Yb,"ShapeBufferGeometry",(()=>HN)),e(Yb,"SphereBufferGeometry",(()=>VN)),e(Yb,"TetrahedronBufferGeometry",(()=>WN)),e(Yb,"TorusBufferGeometry",(()=>GN)),e(Yb,"TorusKnotBufferGeometry",(()=>qN)),e(Yb,"TubeBufferGeometry",(()=>KN));
98
98
  /**
99
99
  * @license
100
100
  * Copyright 2010-2022 Three.js Authors