(window.webpackJsonp=window.webpackJsonp||[]).push([[1],[function(e,t,r){"use strict";e.exports=r(1597)},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){s=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(s)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r
=0&&e.splice(r,1)}function h(e){var t=!1;return function(){t||(t=!0,e())}}var v=function(e){throw e},y=function(e){return{value:e,done:!0}};function m(e,t,r){void 0===t&&(t=v),void 0===r&&(r="iterator");var n={meta:{name:r},next:e,throw:t,return:y,isSagaIterator:!0};return"undefined"!=typeof Symbol&&(n[Symbol.iterator]=function(){return n}),n}function b(e,t){var r=t.sagaStack;console.error(e),console.error(r)}var g=function(e){return new Error("\n redux-saga: Error checking hooks detected an inconsistent state. This is likely a bug\n in redux-saga code and not yours. Thanks for reporting this in the project's github repo.\n Error: "+e+"\n")},_=function(e){return Array.apply(null,new Array(e))},T=function(e){return function(t){return e(Object.defineProperty(t,n.f,{value:!0}))}},E=function(e){return e===n.k},S=function(e){return e===n.j},A=function(e){return E(e)||S(e)};function O(e,t){var r=Object.keys(e),n=r.length;var o,a=0,u=Object(i.a)(e)?_(n):{},c={};return r.forEach((function(e){var r=function(r,i){o||(i||A(r)?(t.cancel(),t(r,i)):(u[e]=r,++a===n&&(o=!0,t(u))))};r.cancel=s,c[e]=r})),t.cancel=function(){o||(o=!0,r.forEach((function(e){return c[e].cancel()})))},c}function w(e){return{name:e.name||"anonymous",location:C(e)}}function C(e){return e[n.g]}var I={isEmpty:u,put:s,take:s};function P(e,t){void 0===e&&(e=10);var r=new Array(e),n=0,o=0,i=0,a=function(t){r[o]=t,o=(o+1)%e,n++},u=function(){if(0!=n){var t=r[i];return r[i]=null,n--,i=(i+1)%e,t}},s=function(){for(var e=[];n;)e.push(u());return e};return{isEmpty:function(){return 0==n},put:function(u){var c;if(n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n0&&void 0!==arguments[0]?arguments[0]:16e3,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:f.PCM;switch(s(this,r),(e=t.call(this)).setString=function(e,t,r){for(var n=0;n");return e};var n,o=r(0),i=(n=r(630))&&n.__esModule?n:{default:n}},function(e,t,r){var n=r(8);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,r){var n;function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var i={}.hasOwnProperty;function a(){for(var e=[],t=0;tt)return e;for(var n=t/r,o=Math.round(e.length/n),i=new Float32Array(o),a=0,u=0;u=32e3;)t<<=1,r>>=1;return e.createScriptProcessor(t,1,1)}}(),i=new a(e.sampleRate,16e3);o.onaudioprocess=function(e){var t=e.inputBuffer.getChannelData(0);if(n&&!n.isClosed){var r=i.encode(t);r&&(n.writeStreamChunk({buffer:r,isEnd:!1,timeReceived:Date.now()}),!1)}};var u=e.createMediaStreamSource(r);t.privSpeechProcessorScript&&e.audioWorklet?e.audioWorklet.addModule(t.privSpeechProcessorScript).then((function(){var o=new AudioWorkletNode(e,"speech-processor");o.port.onmessage=function(e){var t=e.data;if(n&&!n.isClosed){var r=i.encode(t);r&&(n.writeStreamChunk({buffer:r,isEnd:!1,timeReceived:Date.now()}),!1)}},u.connect(o),o.connect(e.destination),t.privMediaResources={scriptProcessorNode:o,source:u,stream:r}})).catch((function(){u.connect(o),o.connect(e.destination),t.privMediaResources={scriptProcessorNode:o,source:u,stream:r}})):(u.connect(o),o.connect(e.destination),t.privMediaResources={scriptProcessorNode:o,source:u,stream:r})},this.releaseMediaResources=function(e){t.privMediaResources&&(t.privMediaResources.scriptProcessorNode&&(t.privMediaResources.scriptProcessorNode.disconnect(e.destination),t.privMediaResources.scriptProcessorNode=null),t.privMediaResources.source&&(t.privMediaResources.source.disconnect(),t.privMediaResources.stream.getTracks().forEach((function(e){return e.stop()})),t.privMediaResources.source=null))}}var t,r,n;return t=e,(r=[{key:"setWorkletUrl",value:function(e){this.privSpeechProcessorScript=e}}])&&s(t.prototype,r),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),l=r(159),f=r(261),p=r(149),d=r(2904),h=r(781),v=r(94),y=r(323),m=r(15);function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),w(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;w(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function E(e,t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function C(e,t){for(var r=0;r504)return void r.reject("Invalid WAV header in file, data block was not found");e.privHeaderEnd=c+8,r.resolve(m.b.getWaveFormatPCM(u,s,a))}else r.reject("Invalid WAV header in file, WAVEfmt was not found");else r.reject("Invalid WAV header in file, RIFF was not found")};if("undefined"!=typeof window&&"undefined"!=typeof Blob&&t instanceof Blob){var o=new FileReader;o.onload=function(e){var t=e.target.result;n(t)},o.readAsArrayBuffer(t)}else{var i=t;n(i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength))}return r.promise}},{key:"upload",value:function(e){return I(this,void 0,void 0,w().mark((function t(){var r,n,o,i,a,u,s,c=this;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=function(t){var r="Error occurred while processing '".concat(c.privFilename,"'. ").concat(t);throw c.onEvent(new p.h(c.privId,e,r)),new Error(r)},t.prev=1,t.next=4,this.turnOn();case 4:return t.next=6,this.privAudioFormatPromise;case 6:return n=t.sent,o=new d.a(n.avgBytesPerSec/10,e),this.privStreams[e]=o,i=this.privSource.slice(this.privHeaderEnd),a=function(e){o.isClosed||(o.writeStreamChunk({buffer:e,isEnd:!1,timeReceived:Date.now()}),o.close())},"undefined"!=typeof window&&"undefined"!=typeof Blob&&i instanceof Blob?((u=new FileReader).onerror=function(e){r(e.toString())},u.onload=function(e){var t=e.target.result;a(t)},u.readAsArrayBuffer(i)):a((s=i).buffer.slice(s.byteOffset,s.byteOffset+s.byteLength)),t.abrupt("return",o);case 15:t.prev=15,t.t0=t.catch(1),r(t.t0);case 18:case"end":return t.stop()}}),t,this,[[1,15]])})))}}])&&C(t.prototype,r),n&&C(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),R=r(1);function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e,t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function F(e,t){for(var r=0;r0&&this.sourceBufferAvailable())){e.next=16;break}this.privAppendingToBuffer=!0,t=this.privAudioBuffer.shift(),e.prev=3,this.privSourceBuffer.appendBuffer(t),e.next=12;break;case 7:return e.prev=7,e.t0=e.catch(3),this.privAudioBuffer.unshift(t),console.log("buffer filled, pausing addition of binaries until space is made"),e.abrupt("return");case 12:return e.next=14,this.notifyPlayback();case 14:e.next=19;break;case 16:if(!this.canEndStream()){e.next=19;break}return e.next=19,this.handleSourceBufferUpdateEnd();case 19:case"end":return e.stop()}}),e,this,[[3,7]])})))}},{key:"handleSourceBufferUpdateEnd",value:function(){return G(this,void 0,void 0,V().mark((function e(){return V().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.canEndStream()||!this.sourceBufferAvailable()){e.next=4;break}return this.privMediaSource.endOfStream(),e.next=4,this.notifyPlayback();case 4:case"end":return e.stop()}}),e,this)})))}},{key:"notifyPlayback",value:function(){return G(this,void 0,void 0,V().mark((function e(){var t=this;return V().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.privPlaybackStarted||void 0===this.privAudio){e.next=7;break}if(this.privPlaybackStarted=!0,this.onAudioStart&&this.onAudioStart(this),this.privAudio.onended=function(){t.onAudioEnd&&t.onAudioEnd(t)},this.privIsPaused){e.next=7;break}return e.next=7,this.privAudio.play();case 7:case"end":return e.stop()}}),e,this)})))}},{key:"canEndStream",value:function(){return this.isClosed&&void 0!==this.privSourceBuffer&&0===this.privAudioBuffer.length&&this.privMediaSourceOpened&&!this.privAppendingToBuffer&&"open"===this.privMediaSource.readyState}},{key:"sourceBufferAvailable",value:function(){return void 0!==this.privSourceBuffer&&!this.privSourceBuffer.updating}}])&&F(t.prototype,r),n&&F(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function q(e){return(q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"unnamedBuffer.wav";return new pe(new P(e,t))}},{key:"fromStreamInput",value:function(e){if(e instanceof D)return new pe(new M.c(e));if(e instanceof M.a)return new pe(e);if("undefined"!=typeof MediaStream&&e instanceof MediaStream){var t=new c;return new pe(new A(t,null,null,e))}throw new Error("Not Supported Type")}},{key:"fromDefaultSpeakerOutput",value:function(){return new de(new K)}},{key:"fromSpeakerOutput",value:function(t){if(void 0===t)return e.fromDefaultSpeakerOutput();if(t instanceof K)return new de(t);throw new Error("Not Supported Type")}},{key:"fromAudioFileOutput",value:function(e){return new de(new te(e))}},{key:"fromStreamOutput",value:function(e){if(e instanceof J)return new de(new H.e(e));if(e instanceof H.d)return new de(e);if(e instanceof H.b)return new de(e);throw new Error("Not Supported Type")}}]),e}(),pe=function(e){ne(r,e);var t=ie(r);function r(e){var n;return se(this,r),(n=t.call(this)).privSource=e,n}return le(r,[{key:"format",get:function(){return this.privSource.format}},{key:"close",value:function(e,t){this.privSource.turnOff().then((function(){e&&e()}),(function(e){t&&t(e)}))}},{key:"id",value:function(){return this.privSource.id()}},{key:"blob",get:function(){return this.privSource.blob}},{key:"turnOn",value:function(){return this.privSource.turnOn()}},{key:"attach",value:function(e){return this.privSource.attach(e)}},{key:"detach",value:function(e){return this.privSource.detach(e)}},{key:"turnOff",value:function(){return this.privSource.turnOff()}},{key:"events",get:function(){return this.privSource.events}},{key:"setProperty",value:function(e,t){if(R.a.throwIfNull(t,"value"),void 0===this.privSource.setProperty)throw new Error("This AudioConfig instance does not support setting properties.");this.privSource.setProperty(e,t)}},{key:"getProperty",value:function(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.")}},{key:"deviceInfo",get:function(){return this.privSource.deviceInfo}}]),r}(fe),de=function(e){ne(r,e);var t=ie(r);function r(e){var n;return se(this,r),(n=t.call(this)).privDestination=e,n}return le(r,[{key:"format",set:function(e){this.privDestination.format=e}},{key:"write",value:function(e){this.privDestination.write(e)}},{key:"close",value:function(){this.privDestination.close()}},{key:"id",value:function(){return this.privDestination.id()}},{key:"setProperty",value:function(e,t){throw new Error("This AudioConfig instance does not support setting properties.")}},{key:"getProperty",value:function(e,t){throw new Error("This AudioConfig instance does not support getting properties.")}}]),r}(fe),he=r(225);function ve(e){return(ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ye(e,t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function lt(e,t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function mt(e,t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function Nt(e,t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function Gt(e,t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function kn(e,t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function qn(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function ao(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Oo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function Mo(e,t){for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:Ve.a.RecognizedSpeaker;if(qo(this,e),this.privProperties=new Ge.a,this.privReason=o,this.privReason!==Ve.a.Canceled)if(t===Vo.Identify){var i=JSON.parse(r);R.a.throwIfNullOrUndefined(i,"JSON"),this.privProfileId=i.identifiedProfile.profileId,this.privScore=i.identifiedProfile.score}else{var a=JSON.parse(r);R.a.throwIfNullOrUndefined(a,"JSON"),this.privScore=a.score,"accept"!==a.recognitionResult.toLowerCase()&&(this.privReason=Ve.a.NoMatch),void 0!==n&&""!==n&&(this.privProfileId=n)}else{var u=JSON.parse(r);R.a.throwIfNullOrUndefined(u,"JSON"),this.privErrorDetails=u.statusText,this.privProperties.setProperty(Ye.CancellationErrorCodePropertyName,dr.a[dr.a.ServiceError])}this.privProperties.setProperty(ze.a.SpeechServiceResponse_JsonResult,r)}return Xo(e,[{key:"properties",get:function(){return this.privProperties}},{key:"reason",get:function(){return this.privReason}},{key:"profileId",get:function(){return this.privProfileId}},{key:"errorDetails",get:function(){return this.privErrorDetails}},{key:"score",get:function(){return this.privScore}}]),e}(),Zo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zo(e,t)}(r,e);var t=Go(r);function r(e,n,o){return qo(this,r),t.call(this,e,n,o)}return Xo(r,null,[{key:"fromResult",value:function(e){var t=he.a.Error,n=dr.a.NoError;return e.properties&&(n=dr.a[e.properties.getProperty(Ye.CancellationErrorCodePropertyName,dr.a[dr.a.NoError])]),new r(t,e.errorDetails,n)}}]),r}(fr);function Qo(e){return(Qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ei(e,t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function oi(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;wi(this,e),this.participants=t,this.meId=r}var t,r,n;return t=e,(r=[{key:"addOrUpdateParticipant",value:function(e){if(void 0!==e){var t=this.getParticipantIndex(e.id);return t>-1?this.participants.splice(t,1,e):this.participants.push(e),this.getParticipant(e.id)}}},{key:"getParticipantIndex",value:function(e){return this.participants.findIndex((function(t){return t.id===e}))}},{key:"getParticipant",value:function(e){return this.participants.find((function(t){return t.id===e}))}},{key:"deleteParticipant",value:function(e){this.participants=this.participants.filter((function(t){return t.id!==e}))}},{key:"host",get:function(){return this.participants.find((function(e){return!0===e.isHost}))}},{key:"me",get:function(){return this.getParticipant(this.meId)}}])&&Ci(t.prototype,r),n&&Ci(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Pi="final",Ri="instant_message",Ni="partial",xi="participant_command",ki="ChangeNickname",Li="EjectParticipant",Di="SetLockState",Mi="SetMute",ji="SetMuteAll",Bi="SetProfanityFiltering",Hi="SetTranslateToLanguages",Ui="SetUseTTS",Vi=r(1296);function Fi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}function Yi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Fi(t);return r?e+(-1===e.indexOf("?")?"?":"&")+r:e}function zi(e){return{data:e.responseText,headers:e.getAllResponseHeaders(),json:function(){return JSON.parse(e.responseText)},ok:e.status>=200&&e.status<300,status:e.status,statusText:e.statusText}}function Gi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{data:t||e.statusText,headers:e.getAllResponseHeaders(),json:function(){return JSON.parse(t||'"'+e.statusText+'"')},ok:!1,status:e.status,statusText:e.statusText}}function Wi(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=arguments.length>5?arguments[5]:void 0,u=yi.a.requestOptions,s=i.ignoreCache||u.ignoreCache,c=i.headers||u.headers,l=i.timeout||u.timeout;(r="undefined"==typeof window?new Vi.XMLHttpRequest:new XMLHttpRequest).open(e,Yi(t,n),!0),c&&Object.keys(c).forEach((function(e){return r.setRequestHeader(e,c[e])})),s&&r.setRequestHeader("Cache-Control","no-cache"),r.timeout=l,r.onload=function(e){a(zi(r))},r.onerror=function(e){a(Gi(r,"Failed to make request."))},r.ontimeout=function(e){a(Gi(r,"Request took longer than expected."))},"post"===e&&o?(r.setRequestHeader("Content-Type","application/json"),r.send(JSON.stringify(o))):r.send()}function Ki(e){return(Ki="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qi(e,t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function Va(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Fa(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fa(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Fa(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Au(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function wu(e,t){for(var r=0;r0||d.id===this.privLastPartialUtteranceId)&&(i=!0),i&&this.privConversationServiceConnector.translationReceived&&this.privConversationServiceConnector.translationReceived(this.privConversationServiceConnector,new au(Pi,h,o))):void 0!==h.text&&(this.privLastPartialUtteranceId=d.id,this.privConversationServiceConnector.translationReceived&&this.privConversationServiceConnector.translationReceived(this.privConversationServiceConnector,new au(Ni,h,o))),e.abrupt("break",65);case 60:return v=Tu.fromJSON(n.textBody),y=new Ba(v.participantId,this.getTranslations(v.translations),v.language,void 0,void 0,v.originalText,void 0,void 0,void 0,n.textBody,void 0),this.privConversationServiceConnector.translationReceived&&this.privConversationServiceConnector.translationReceived(this.privConversationServiceConnector,new au(Ri,y,o)),e.abrupt("break",65);case 64:return e.abrupt("break",65);case 65:e.next=69;break;case 67:e.prev=67,e.t2=e.catch(17);case 69:return e.abrupt("return",this.receiveConversationMessageOverride());case 72:e.prev=72,e.t3=e.catch(3),this.terminateMessageLoop=!0;case 75:return e.abrupt("return",t.promise);case 76:case"end":return e.stop()}}),e,this,[[3,72],[17,67]])})))}},{key:"startMessageLoop",value:function(){return ku(this,void 0,void 0,Ou().mark((function e(){var t,r;return Ou().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isDisposed()){e.next=2;break}return e.abrupt("return",Promise.resolve());case 2:return this.terminateMessageLoop=!1,t=this.receiveConversationMessageOverride(),e.prev=4,e.next=7,t;case 7:return r=e.sent,e.abrupt("return",r);case 11:return e.prev=11,e.t0=e.catch(4),this.cancelRecognition(this.privRequestSession?this.privRequestSession.sessionId:"",this.privRequestSession?this.privRequestSession.requestId:"",he.a.Error,dr.a.RuntimeError,e.t0),e.abrupt("return",null);case 15:case"end":return e.stop()}}),e,this,[[4,11]])})))}},{key:"configConnection",value:function(){var e=this;return this.isDisposed()?Promise.resolve(void 0):this.privConnectionConfigPromise?this.privConnectionConfigPromise.then((function(t){return t.state()===ya.a.Disconnected?(e.privConnectionId=null,e.privConnectionConfigPromise=null,e.configConnection()):e.privConnectionConfigPromise}),(function(t){return e.privConnectionId=null,e.privConnectionConfigPromise=null,e.configConnection()})):this.terminateMessageLoop?Promise.resolve(void 0):(this.privConnectionConfigPromise=this.connectImpl().then((function(e){return e})),this.privConnectionConfigPromise)}},{key:"getTranslations",value:function(e){var t;if(void 0!==e){t=new tr.a;var r,n=Su(e);try{for(n.s();!(r=n.n()).done;){var o=r.value;t.set(o.lang,o.translation)}}catch(e){n.e(e)}finally{n.f()}}return t}}])&&wu(t.prototype,r),n&&wu(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(it.a);function Du(e){return(Du="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mu(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Mu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function c(e,t,r,o){var i=t&&t.prototype instanceof p?t:p,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:T(e,r,u)}),a}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f={};function p(){}function d(){}function h(){}var v={};s(v,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(w([])));m&&m!==t&&r.call(m,i)&&(v=m);var b=h.prototype=p.prototype=Object.create(v);function g(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var o;n(this,"_invoke",{value:function(n,i){function a(){return new t((function(o,a){!function n(o,i,a,u){var s=l(e[o],e,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==Du(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,u)}))}u(s.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}})}function T(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return C()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=l(e,t,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function E(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function w(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function ju(){return(ju="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=Bu(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}}).apply(this,arguments)}function Bu(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Yu(e)););return e}function Hu(e,t){return(Hu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Uu(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 r,n=Yu(e);if(t){var o=Yu(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Vu(this,r)}}function Vu(e,t){if(t&&("object"===Du(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Fu(e)}function Fu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yu(e){return(Yu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gu(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function Cs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Is(e,t){for(var r=0;r0&&a!==o.me.displayName&&o.changeNicknameAsync(a)}}catch(t){}},o.onConversationExpiration=function(e,t){var r,n;try{(null===(r=o.privConversationTranslator)||void 0===r?void 0:r.conversationExpiration)&&(null===(n=o.privConversationTranslator)||void 0===n||n.conversationExpiration(o.privConversationTranslator,t))}catch(t){}},o.privProperties=new Ge.a,o.privManager=new $i,e.getProperty(ze.a[ze.a.SpeechServiceConnection_RecoLanguage])||e.setProperty(ze.a[ze.a.SpeechServiceConnection_RecoLanguage],Ai.defaultLanguageCode),o.privLanguage=e.getProperty(ze.a[ze.a.SpeechServiceConnection_RecoLanguage]),n)o.privConversationId=n;else{0===e.targetLanguages.length&&e.addTargetLanguage(o.privLanguage),e.getProperty(ze.a[ze.a.SpeechServiceResponse_ProfanityOption])||e.setProfanity(We.a.Masked);var i=e.getProperty(ze.a[ze.a.ConversationTranslator_Name]);(null==i||i.length<=1||i.length>50)&&(i="Host"),e.setProperty(ze.a[ze.a.ConversationTranslator_Name],i)}o.privConfig=e;var a=e;return R.a.throwIfNull(a,"speechConfig"),o.privProperties=a.properties.clone(),o.privIsConnected=!1,o.privParticipants=new Ii,o.privIsReady=!1,o.privTextMessageMaxLength=1e3,o}return Ps(r,[{key:"conversationTranslator",set:function(e){this.privConversationTranslator=e}},{key:"room",get:function(){return this.privRoom}},{key:"connection",get:function(){return this.privConversationRecognizer}},{key:"authorizationToken",get:function(){return this.privToken},set:function(e){R.a.throwIfNullOrWhitespace(e,"authorizationToken"),this.privToken=e}},{key:"config",get:function(){return this.privConfig}},{key:"conversationId",get:function(){return this.privRoom?this.privRoom.roomId:this.privConversationId}},{key:"properties",get:function(){return this.privProperties}},{key:"speechRecognitionLanguage",get:function(){return this.privLanguage}},{key:"isMutedByHost",get:function(){var e,t;return!(null===(e=this.privParticipants.me)||void 0===e?void 0:e.isHost)&&(null===(t=this.privParticipants.me)||void 0===t?void 0:t.isMuted)}},{key:"isConnected",get:function(){return this.privIsConnected&&this.privIsReady}},{key:"participants",get:function(){return this.toParticipants(!0)}},{key:"me",get:function(){return this.toParticipant(this.privParticipants.me)}},{key:"host",get:function(){return this.toParticipant(this.privParticipants.host)}},{key:"createConversationAsync",value:function(e,t){var r=this;try{this.privConversationRecognizer&&this.handleError(new Error(this.privErrors.permissionDeniedStart),t),this.privManager.createOrJoin(this.privProperties,void 0,(function(n){n||r.handleError(new Error(r.privErrors.permissionDeniedConnect),t),r.privRoom=n,r.handleCallback(e,t)}),(function(e){r.handleError(e,t)}))}catch(e){this.handleError(e,t)}}},{key:"startConversationAsync",value:function(e,t){var r=this;try{this.privConversationRecognizer&&this.handleError(new Error(this.privErrors.permissionDeniedStart),t),R.a.throwIfNullOrUndefined(this.privRoom,this.privErrors.permissionDeniedConnect),this.privParticipants.meId=this.privRoom.participantId,this.privConversationRecognizer=qu.fromConfig(this.privConfig),this.privConversationRecognizer.connected=this.onConnected,this.privConversationRecognizer.disconnected=this.onDisconnected,this.privConversationRecognizer.canceled=this.onCanceled,this.privConversationRecognizer.participantUpdateCommandReceived=this.onParticipantUpdateCommandReceived,this.privConversationRecognizer.lockRoomCommandReceived=this.onLockRoomCommandReceived,this.privConversationRecognizer.muteAllCommandReceived=this.onMuteAllCommandReceived,this.privConversationRecognizer.participantJoinCommandReceived=this.onParticipantJoinCommandReceived,this.privConversationRecognizer.participantLeaveCommandReceived=this.onParticipantLeaveCommandReceived,this.privConversationRecognizer.translationReceived=this.onTranslationReceived,this.privConversationRecognizer.participantsListReceived=this.onParticipantsListReceived,this.privConversationRecognizer.conversationExpiration=this.onConversationExpiration,this.privConversationRecognizer.connect(this.privRoom.token,(function(){r.handleCallback(e,t)}),(function(e){r.handleError(e,t)}))}catch(e){this.handleError(e,t)}}},{key:"addParticipantAsync",value:function(e,t,r){R.a.throwIfNullOrUndefined(e,"Participant"),Object(f.b)(this.addParticipantImplAsync(e),t,r)}},{key:"joinConversationAsync",value:function(e,t,r,n,o){var i=this;try{R.a.throwIfNullOrWhitespace(e,this.privErrors.invalidArgs.replace("{arg}","conversationId")),R.a.throwIfNullOrWhitespace(t,this.privErrors.invalidArgs.replace("{arg}","nickname")),R.a.throwIfNullOrWhitespace(r,this.privErrors.invalidArgs.replace("{arg}","language")),this.privManager.createOrJoin(this.privProperties,e,(function(e){R.a.throwIfNullOrUndefined(e,i.privErrors.permissionDeniedConnect),i.privRoom=e,i.privConfig.authorizationToken=e.cognitiveSpeechAuthToken,n&&n(e.cognitiveSpeechAuthToken)}),(function(e){i.handleError(e,o)}))}catch(e){this.handleError(e,o)}}},{key:"deleteConversationAsync",value:function(e,t){Object(f.b)(this.deleteConversationImplAsync(),e,t)}},{key:"deleteConversationImplAsync",value:function(){return Rs(this,void 0,void 0,ws().mark((function e(){return ws().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return R.a.throwIfNullOrUndefined(this.privProperties,this.privErrors.permissionDeniedConnect),R.a.throwIfNullOrWhitespace(this.privRoom.token,this.privErrors.permissionDeniedConnect),e.next=4,this.privManager.leave(this.privProperties,this.privRoom.token);case 4:this.dispose();case 5:case"end":return e.stop()}}),e,this)})))}},{key:"endConversationAsync",value:function(e,t){Object(f.b)(this.endConversationImplAsync(),e,t)}},{key:"endConversationImplAsync",value:function(){return this.close(!0)}},{key:"lockConversationAsync",value:function(e,t){var r,n=this;try{R.a.throwIfDisposed(this.privIsDisposed),R.a.throwIfDisposed(this.privConversationRecognizer.isDisposed()),R.a.throwIfNullOrUndefined(this.privRoom,this.privErrors.permissionDeniedSend),this.canSendAsHost||this.handleError(new Error(this.privErrors.permissionDeniedConversation.replace("{command}","lock")),t),null===(r=this.privConversationRecognizer)||void 0===r||r.sendRequest(this.getLockCommand(!0),(function(){n.handleCallback(e,t)}),(function(e){n.handleError(e,t)}))}catch(e){this.handleError(e,t)}}},{key:"muteAllParticipantsAsync",value:function(e,t){var r,n=this;try{R.a.throwIfDisposed(this.privIsDisposed),R.a.throwIfDisposed(this.privConversationRecognizer.isDisposed()),R.a.throwIfNullOrUndefined(this.privConversationRecognizer,this.privErrors.permissionDeniedSend),R.a.throwIfNullOrUndefined(this.privRoom,this.privErrors.permissionDeniedSend),this.canSendAsHost||this.handleError(new Error(this.privErrors.permissionDeniedConversation.replace("{command}","mute")),t),null===(r=this.privConversationRecognizer)||void 0===r||r.sendRequest(this.getMuteAllCommand(!0),(function(){n.handleCallback(e,t)}),(function(e){n.handleError(e,t)}))}catch(e){this.handleError(e,t)}}},{key:"muteParticipantAsync",value:function(e,t,r){var n,o=this;try{R.a.throwIfDisposed(this.privIsDisposed),R.a.throwIfDisposed(this.privConversationRecognizer.isDisposed()),R.a.throwIfNullOrWhitespace(e,this.privErrors.invalidArgs.replace("{arg}","userId")),R.a.throwIfNullOrUndefined(this.privRoom,this.privErrors.permissionDeniedSend),this.canSend||this.handleError(new Error(this.privErrors.permissionDeniedSend),r),this.me.isHost||this.me.id===e||this.handleError(new Error(this.privErrors.permissionDeniedParticipant.replace("{command}","mute")),r),-1===this.privParticipants.getParticipantIndex(e)&&this.handleError(new Error(this.privErrors.invalidParticipantRequest),r),null===(n=this.privConversationRecognizer)||void 0===n||n.sendRequest(this.getMuteCommand(e,!0),(function(){o.handleCallback(t,r)}),(function(e){o.handleError(e,r)}))}catch(e){this.handleError(e,r)}}},{key:"removeParticipantAsync",value:function(e,t,r){var n,o=this;try{if(R.a.throwIfDisposed(this.privIsDisposed),this.privTranscriberRecognizer&&e.hasOwnProperty("id"))Object(f.b)(this.removeParticipantImplAsync(e),t,r);else{R.a.throwIfDisposed(this.privConversationRecognizer.isDisposed()),R.a.throwIfNullOrUndefined(this.privRoom,this.privErrors.permissionDeniedSend),this.canSendAsHost||this.handleError(new Error(this.privErrors.permissionDeniedParticipant.replace("{command}","remove")),r);var i="";if("string"==typeof e)i=e;else if(e.hasOwnProperty("id")){i=e.id}else if(e.hasOwnProperty("userId")){i=e.userId}R.a.throwIfNullOrWhitespace(i,this.privErrors.invalidArgs.replace("{arg}","userId")),-1===this.participants.findIndex((function(e){return e.id===i}))&&this.handleError(new Error(this.privErrors.invalidParticipantRequest),r),null===(n=this.privConversationRecognizer)||void 0===n||n.sendRequest(this.getEjectCommand(i),(function(){o.handleCallback(t,r)}),(function(e){o.handleError(e,r)}))}}catch(e){this.handleError(e,r)}}},{key:"unlockConversationAsync",value:function(e,t){var r,n=this;try{R.a.throwIfDisposed(this.privIsDisposed),R.a.throwIfDisposed(this.privConversationRecognizer.isDisposed()),R.a.throwIfNullOrUndefined(this.privRoom,this.privErrors.permissionDeniedSend),this.canSendAsHost||this.handleError(new Error(this.privErrors.permissionDeniedConversation.replace("{command}","unlock")),t),null===(r=this.privConversationRecognizer)||void 0===r||r.sendRequest(this.getLockCommand(!1),(function(){n.handleCallback(e,t)}),(function(e){n.handleError(e,t)}))}catch(e){this.handleError(e,t)}}},{key:"unmuteAllParticipantsAsync",value:function(e,t){var r,n=this;try{R.a.throwIfDisposed(this.privIsDisposed),R.a.throwIfDisposed(this.privConversationRecognizer.isDisposed()),R.a.throwIfNullOrUndefined(this.privRoom,this.privErrors.permissionDeniedSend),this.canSendAsHost||this.handleError(new Error(this.privErrors.permissionDeniedConversation.replace("{command}","unmute all")),t),null===(r=this.privConversationRecognizer)||void 0===r||r.sendRequest(this.getMuteAllCommand(!1),(function(){n.handleCallback(e,t)}),(function(e){n.handleError(e,t)}))}catch(e){this.handleError(e,t)}}},{key:"unmuteParticipantAsync",value:function(e,t,r){var n,o=this;try{R.a.throwIfDisposed(this.privIsDisposed),R.a.throwIfDisposed(this.privConversationRecognizer.isDisposed()),R.a.throwIfNullOrWhitespace(e,this.privErrors.invalidArgs.replace("{arg}","userId")),R.a.throwIfNullOrUndefined(this.privRoom,this.privErrors.permissionDeniedSend),this.canSend||this.handleError(new Error(this.privErrors.permissionDeniedSend),r),this.me.isHost||this.me.id===e||this.handleError(new Error(this.privErrors.permissionDeniedParticipant.replace("{command}","mute")),r),-1===this.privParticipants.getParticipantIndex(e)&&this.handleError(new Error(this.privErrors.invalidParticipantRequest),r),null===(n=this.privConversationRecognizer)||void 0===n||n.sendRequest(this.getMuteCommand(e,!1),(function(){o.handleCallback(t,r)}),(function(e){o.handleError(e,r)}))}catch(e){this.handleError(e,r)}}},{key:"sendTextMessageAsync",value:function(e,t,r){var n,o=this;try{R.a.throwIfDisposed(this.privIsDisposed),R.a.throwIfDisposed(this.privConversationRecognizer.isDisposed()),R.a.throwIfNullOrWhitespace(e,this.privErrors.invalidArgs.replace("{arg}","message")),R.a.throwIfNullOrUndefined(this.privRoom,this.privErrors.permissionDeniedSend),this.canSend||this.handleError(new Error(this.privErrors.permissionDeniedSend),r),e.length>this.privTextMessageMaxLength&&this.handleError(new Error(this.privErrors.invalidArgs.replace("{arg}","message length")),r),null===(n=this.privConversationRecognizer)||void 0===n||n.sendRequest(this.getMessageCommand(e),(function(){o.handleCallback(t,r)}),(function(e){o.handleError(e,r)}))}catch(e){this.handleError(e,r)}}},{key:"changeNicknameAsync",value:function(e,t,r){var n,o=this;try{R.a.throwIfDisposed(this.privIsDisposed),R.a.throwIfDisposed(this.privConversationRecognizer.isDisposed()),R.a.throwIfNullOrWhitespace(e,this.privErrors.invalidArgs.replace("{arg}","nickname")),R.a.throwIfNullOrUndefined(this.privRoom,this.privErrors.permissionDeniedSend),this.canSend||this.handleError(new Error(this.privErrors.permissionDeniedSend),r),null===(n=this.privConversationRecognizer)||void 0===n||n.sendRequest(this.getChangeNicknameCommand(e),(function(){o.handleCallback(t,r)}),(function(e){o.handleError(e,r)}))}catch(e){this.handleError(e,r)}}},{key:"isDisposed",value:function(){return this.privIsDisposed}},{key:"dispose",value:function(e){var t;this.isDisposed||(this.privIsDisposed=!0,null===(t=this.config)||void 0===t||t.close(),this.privConfig=void 0,this.privLanguage=void 0,this.privProperties=void 0,this.privRoom=void 0,this.privToken=void 0,this.privManager=void 0,this.privConversationRecognizer=void 0,this.privIsConnected=!1,this.privIsReady=!1,this.privParticipants=void 0)}},{key:"transcriberRecognizer",get:function(){return this.privTranscriberRecognizer}},{key:"connectTranscriberRecognizer",value:function(e){return Rs(this,void 0,void 0,ws().mark((function t(){return ws().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.privTranscriberRecognizer){t.next=3;break}return t.next=3,this.privTranscriberRecognizer.close();case 3:this.privTranscriberRecognizer=e,this.privTranscriberRecognizer.conversation=this;case 5:case"end":return t.stop()}}),t,this)})))}},{key:"conversationInfo",get:function(){var e,t=this.conversationId,r=this.participants.map((function(e){return{id:e.id,preferredLanguage:e.preferredLanguage,voice:e.voice}})),n={},o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=gs(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(Ai.transcriptionEventKeys);try{for(o.s();!(e=o.n()).done;){var i=e.value,a=this.properties.getProperty(i,"");""!==a&&(n[i]=a)}}catch(e){o.e(e)}finally{o.f()}return{id:t,participants:r,conversationProperties:n}}},{key:"addParticipantImplAsync",value:function(e){if(void 0!==this.privParticipants.addOrUpdateParticipant(e)&&this.privTranscriberRecognizer){var t=this.conversationInfo;return t.participants=[e],this.privTranscriberRecognizer.pushConversationEvent(t,"join")}}},{key:"removeParticipantImplAsync",value:function(e){this.privParticipants.deleteParticipant(e.id);var t=this.conversationInfo;return t.participants=[e],this.privTranscriberRecognizer.pushConversationEvent(t,"leave")}},{key:"close",value:function(e){var t,r;return Rs(this,void 0,void 0,ws().mark((function n(){return ws().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,this.privIsConnected=!1,n.next=4,this.privConversationRecognizer.close();case 4:return n.next=6,null===(t=this.privTranscriberRecognizer)||void 0===t?void 0:t.close();case 6:this.privConversationRecognizer=void 0,null===(r=this.privConversationTranslator)||void 0===r||r.dispose(),n.next=12;break;case 10:n.prev=10,n.t0=n.catch(0);case 12:e&&this.dispose();case 13:case"end":return n.stop()}}),n,this,[[0,10]])})))}},{key:"canSend",get:function(){var e;return this.privIsConnected&&!(null===(e=this.privParticipants.me)||void 0===e?void 0:e.isMuted)}},{key:"canSendAsHost",get:function(){var e;return this.privIsConnected&&(null===(e=this.privParticipants.me)||void 0===e?void 0:e.isHost)}},{key:"handleCallback",value:function(e,t){if(e){try{e()}catch(e){t&&t(e)}e=void 0}}},{key:"handleError",value:function(e,t){if(t)if(e instanceof Error){var r=e;t(r.name+": "+r.message)}else t(e)}},{key:"toParticipants",value:function(e){var t=this,r=this.privParticipants.participants.map((function(e){return t.toParticipant(e)}));return e?r:r.filter((function(e){return!1===e.isHost}))}},{key:"toParticipant",value:function(e){return new ys(e.id,e.avatar,e.displayName,e.isHost,e.isMuted,e.isUsingTts,e.preferredLanguage,e.voice)}},{key:"getMuteAllCommand",value:function(e){return R.a.throwIfNullOrWhitespace(this.privRoom.roomId,"conversationId"),R.a.throwIfNullOrWhitespace(this.privRoom.participantId,"participantId"),JSON.stringify({command:ji,participantId:this.privRoom.participantId,roomid:this.privRoom.roomId,type:xi,value:e})}},{key:"getMuteCommand",value:function(e,t){return R.a.throwIfNullOrWhitespace(this.privRoom.roomId,"conversationId"),R.a.throwIfNullOrWhitespace(e,"participantId"),JSON.stringify({command:Mi,participantId:e,roomid:this.privRoom.roomId,type:xi,value:t})}},{key:"getLockCommand",value:function(e){return R.a.throwIfNullOrWhitespace(this.privRoom.roomId,"conversationId"),R.a.throwIfNullOrWhitespace(this.privRoom.participantId,"participantId"),JSON.stringify({command:Di,participantId:this.privRoom.participantId,roomid:this.privRoom.roomId,type:xi,value:e})}},{key:"getEjectCommand",value:function(e){return R.a.throwIfNullOrWhitespace(this.privRoom.roomId,"conversationId"),R.a.throwIfNullOrWhitespace(e,"participantId"),JSON.stringify({command:Li,participantId:e,roomid:this.privRoom.roomId,type:xi})}},{key:"getChangeNicknameCommand",value:function(e){return R.a.throwIfNullOrWhitespace(this.privRoom.roomId,"conversationId"),R.a.throwIfNullOrWhitespace(e,"nickname"),R.a.throwIfNullOrWhitespace(this.privRoom.participantId,"participantId"),JSON.stringify({command:ki,nickname:e,participantId:this.privRoom.participantId,roomid:this.privRoom.roomId,type:xi,value:e})}},{key:"getMessageCommand",value:function(e){return R.a.throwIfNullOrWhitespace(this.privRoom.roomId,"conversationId"),R.a.throwIfNullOrWhitespace(this.privRoom.participantId,"participantId"),R.a.throwIfNullOrWhitespace(e,"message"),JSON.stringify({participantId:this.privRoom.participantId,roomId:this.privRoom.roomId,text:e,type:Ri})}}]),r}(Ns);function ks(e){return(ks="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ls(e,t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function Bs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hs(e,t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function tc(e,t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function pc(e,t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function Tc(e,t,r){return(t=Oc(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ec(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sc(e,t){for(var r=0;r").concat(a,"")),a="").concat(a,"")}},{key:"speakTextAsync",value:function(e,t,r,n){this.speakImpl(e,!1,t,r,n)}},{key:"speakSsmlAsync",value:function(e,t,r,n){this.speakImpl(e,!0,t,r,n)}},{key:"close",value:function(e,t){R.a.throwIfDisposed(this.privDisposed),Object(f.b)(this.dispose(!0),e,t)}},{key:"internalData",get:function(){return this.privAdapter}},{key:"dispose",value:function(e){return Ic(this,void 0,void 0,_c().mark((function t(){return _c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.privDisposed){t.next=2;break}return t.abrupt("return");case 2:if(!e){t.next=6;break}if(!this.privAdapter){t.next=6;break}return t.next=6,this.privAdapter.dispose();case 6:this.privDisposed=!0;case 7:case"end":return t.stop()}}),t,this)})))}},{key:"createSynthesizerConfig",value:function(e){return new yc.a(e,this.privProperties)}},{key:"createSynthesisAdapter",value:function(e,t,r,n){return new j.a(e,t,n,this,this.audioConfig)}},{key:"implCommonSynthesizeSetup",value:function(){var e=this,t="undefined"!=typeof window?"Browser":"Node",r="unknown",n="unknown";"undefined"!=typeof navigator&&(t=t+"/"+navigator.platform,r=navigator.userAgent,n=navigator.appVersion);var o=this.createSynthesizerConfig(new l.e(new l.a(new l.b(t,r,n)))),i=this.privProperties.getProperty(ze.a.SpeechServiceConnection_Key,void 0),a=i&&""!==i?new at.a(i):new ut.a((function(t){var r=e.privProperties.getProperty(ze.a.SpeechServiceAuthorization_Token,void 0);return Promise.resolve(r)}),(function(t){var r=e.privProperties.getProperty(ze.a.SpeechServiceAuthorization_Token,void 0);return Promise.resolve(r)}));this.privAdapter=this.createSynthesisAdapter(a,this.privConnectionFactory,this.audioConfig,o),this.privAdapter.audioOutputFormat=bc.a.fromSpeechSynthesisOutputFormat(Ke.a[this.properties.getProperty(ze.a.SpeechServiceConnection_SynthOutputFormat,void 0)])}},{key:"speakImpl",value:function(e,t,r,n,o){var i=this;try{R.a.throwIfDisposed(this.privDisposed);var a,u=Object(v.b)();a=o instanceof J?new H.e(o):o instanceof H.b?o:void 0!==o?new te(o):void 0,this.synthesisRequestQueue.enqueue(new Rc(u,e,t,(function(e){if(i.privSynthesizing=!1,r)try{r(e)}catch(e){n&&n(e)}r=void 0,i.adapterSpeak().catch((function(){}))}),(function(e){n&&n(e)}),a)),this.adapterSpeak().catch((function(){}))}catch(e){if(n)if(e instanceof Error){var s=e;n(s.name+": "+s.message)}else n(e);this.dispose(!0).catch((function(){}))}}},{key:"adapterSpeak",value:function(){return Ic(this,void 0,void 0,_c().mark((function e(){var t;return _c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.privDisposed||this.privSynthesizing){e.next=6;break}return this.privSynthesizing=!0,e.next=4,this.synthesisRequestQueue.dequeue();case 4:return t=e.sent,e.abrupt("return",this.privAdapter.Speak(t.text,t.isSSML,t.requestId,t.cb,t.err,t.dataStream));case 6:case"end":return e.stop()}}),e,this)})))}}],[{key:"FromConfig",value:function(t,r,n){var o=t;return r.properties.mergeTo(o.properties),new e(t,n)}},{key:"XMLEncode",value:function(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}}]),e}(),Rc=Ac((function e(t,r,n,o,i,a){Ec(this,e),this.requestId=t,this.text=r,this.isSSML=n,this.cb=o,this.err=i,this.dataStream=a})),Nc=r(318),xc=r(317),kc=r(747),Lc=r(748),Dc=r(749),Mc=r(758);function jc(e){return(jc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hc(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:wc.FivePoint,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Cc.Phoneme,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Bc(this,e),R.a.throwIfNullOrUndefined(t,"referenceText"),this.privProperties=new Ge.a,this.privProperties.setProperty(ze.a.PronunciationAssessment_ReferenceText,t),this.privProperties.setProperty(ze.a.PronunciationAssessment_GradingSystem,wc[r]),this.privProperties.setProperty(ze.a.PronunciationAssessment_Granularity,Cc[n]),this.privProperties.setProperty(ze.a.PronunciationAssessment_EnableMiscue,String(o))}var t,r,n;return t=e,n=[{key:"fromJSON",value:function(t){R.a.throwIfNullOrUndefined(t,"json");var r=new e("");return r.privProperties=new Ge.a,r.properties.setProperty(ze.a.PronunciationAssessment_Json,t),r}}],(r=[{key:"toJSON",value:function(){return this.updateJson(),this.privProperties.getProperty(ze.a.PronunciationAssessment_Params)}},{key:"applyTo",value:function(e){this.updateJson(),e.internalData.speechContext.setPronunciationAssessmentParams(this.properties.getProperty(ze.a.PronunciationAssessment_Params))}},{key:"referenceText",get:function(){return this.properties.getProperty(ze.a.PronunciationAssessment_ReferenceText)},set:function(e){R.a.throwIfNullOrWhitespace(e,"referenceText"),this.properties.setProperty(ze.a.PronunciationAssessment_ReferenceText,e)}},{key:"properties",get:function(){return this.privProperties}},{key:"updateJson",value:function(){var e=this.privProperties.getProperty(ze.a.PronunciationAssessment_Json,"{}"),t=JSON.parse(e),r=this.privProperties.getProperty(ze.a.PronunciationAssessment_ReferenceText);r&&(t.referenceText=r);var n=this.privProperties.getProperty(ze.a.PronunciationAssessment_GradingSystem);n&&(t.gradingSystem=n);var o=this.privProperties.getProperty(ze.a.PronunciationAssessment_Granularity);o&&(t.granularity=o),t.dimension="Comprehensive";var i=this.privProperties.getProperty(ze.a.PronunciationAssessment_EnableMiscue);"true"===i?t.enableMiscue=!0:"false"===i&&(t.enableMiscue=!1),this.privProperties.setProperty(ze.a.PronunciationAssessment_Params,JSON.stringify(t))}}])&&Hc(t.prototype,r),n&&Hc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Vc(e){return(Vc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Fc(e,t){for(var r=0;r=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function u(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,c=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),l=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,f=r(1101);var p=/[&<>"]/,d=/[&<>"]/g,h={"&":"&","<":"<",">":">",'"':"""};function v(e){return h[e]}var y=/[.?*+^$[\]\\(){}|-]/g;var m=r(689);t.lib={},t.lib.mdurl=r(1102),t.lib.ucmicro=r(2350),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!==n(t))throw new TypeError(t+"must be object");Object.keys(t).forEach((function(r){e[r]=t[r]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=i,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(c,(function(e,t,r){return t||function(e,t){var r=0;return i(f,t)?f[t]:35===t.charCodeAt(0)&&l.test(t)&&a(r="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?u(r):e}(e,r)}))},t.isValidEntityCode=a,t.fromCodePoint=u,t.escapeHtml=function(e){return p.test(e)?e.replace(d,v):e},t.arrayReplaceAt=function(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return m.test(e)},t.escapeRE=function(e){return e.replace(y,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},function(e,t,r){var n=r(22),o=r(788),i=r(789),a=r(25),u=r(200),s=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor;t.f=n?i?function(e,t,r){if(a(e),t=u(t),a(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=l(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return c(e,t,r)}:c:function(e,t,r){if(a(e),t=u(t),a(r),o)try{return c(e,t,r)}catch(e){}if("get"in r||"set"in r)throw s("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r2?r-2:0),i=2;i2?r-2:0),i=2;i2?r-2:0),i=2;i3?i-3:0),c=3;c3?i-3:0),c=3;c3?n-3:0),a=3;a2?r-2:0),i=2;i2?r-2:0),i=2;i2?r-2:0),i=2;i3?n-3:0),a=3;a3?n-3:0),a=3;a3?n-3:0),a=3;a");return e};var n,o=r(0),i=(n=r(639))&&n.__esModule?n:{default:n}},function(e,t,r){var n=r(52),o=r(84),i=r(375),a=r(126).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(28),o=r(71),i=r(43);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"keyboard";return{type:n,meta:{method:t},payload:{activity:e}}};t.default=s},function(e,t,r){var n=r(35),o=r(230),i=TypeError;e.exports=function(e){if(n(e))return e;throw i(o(e)+" is not a function")}},function(e,t,r){var n=r(792);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},function(e,t,r){var n=r(346),o=Function.prototype.call;e.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},function(e,t,r){var n=r(51),o=r(154),i=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},function(e,t,r){(function(t){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,r(89))},function(e,t,r){var n=r(72),o=r(476),i=r(156),a=r(648),u=r(653),s=r(1002),c=o("wks"),l=n.Symbol,f=s?l:l&&l.withoutSetter||a;e.exports=function(e){return i(c,e)&&(u||"string"==typeof c[e])||(u&&i(l,e)?c[e]=l[e]:c[e]=f("Symbol."+e)),c[e]}},function(e,t,r){var n=r(1215),o=n.all;e.exports=n.IS_HTMLDDA?function(e){return"function"==typeof e||e===o}:function(e){return"function"==typeof e}},function(e,t,r){"use strict";r.d(t,"a",(function(){return v})),r.d(t,"b",(function(){return y}));var n,o=r(1),i=r(535),a=r(7);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=f(e);if(t){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return l(this,r)}}function l(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;rA;A++)if((d||A in T)&&(g=E(b=T[A],A,_),e))if(t)w[A]=g;else if(g)switch(e){case 3:return!0;case 5:return b;case 6:return A;case 2:c(w,b)}else switch(e){case 4:return!1;case 7:c(w,b)}return f?-1:o||l?l:w}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},function(e,t,r){"use strict";var n=r(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,i.call)(o.default.mark((function t(){var r,n,c,l,f,p;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,i.take)([a.CONNECT_FULFILLING,s.RECONNECT_FULFILLING]);case 2:return r=t.sent,n=r.meta,c=n.userID,l=n.username,f=r.payload.directLine,t.next=9,(0,i.fork)(e,{directLine:f,userID:c,username:l});case 9:return p=t.sent,t.next=12,(0,i.take)([u.DISCONNECT_PENDING,s.RECONNECT_PENDING]);case 12:return t.next=14,(0,i.cancel)(p);case 14:t.next=0;break;case 16:case"end":return t.stop()}}),t)})))};var o=n(r(14)),i=r(53),a=r(279),u=r(431),s=r(430)},function(e,t,r){var n=r(51);e.exports=n({}.isPrototypeOf)},function(e,t,r){var n=r(1135),o=r(2480),i=r(588),a=r(1136);e.exports=function(e,t){return n(e)||o(e,t)||i(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i}));var n=r(743),o=function(){return Object(n.v4)()},i=function(){return o().replace(new RegExp("-","g"),"").toUpperCase()}},function(e,t,r){"use strict";r.d(t,"k",(function(){return h})),r.d(t,"e",(function(){return v})),r.d(t,"i",(function(){return y})),r.d(t,"g",(function(){return m})),r.d(t,"l",(function(){return b})),r.d(t,"j",(function(){return g})),r.d(t,"h",(function(){return _})),r.d(t,"n",(function(){return T})),r.d(t,"a",(function(){return E})),r.d(t,"b",(function(){return S})),r.d(t,"d",(function(){return A})),r.d(t,"o",(function(){return O})),r.d(t,"c",(function(){return w})),r.d(t,"m",(function(){return C})),r.d(t,"f",(function(){return I}));var n=r(26);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),w(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;w(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function c(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&&l(e,t)}function l(e,t){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d(e);if(t){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p(this,r)}}function p(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;re.byteLength)){t.next=7;break}return r.set(this.privLastChunkView.slice(0,e.byteLength)),this.privLastChunkView=this.privLastChunkView.slice(e.byteLength),t.abrupt("return",Promise.resolve(e.byteLength));case 7:r.set(this.privLastChunkView),n=this.privLastChunkView.length,this.privLastChunkView=void 0;case 10:if(!(ne.byteLength-n?(i=o.buffer.slice(0,e.byteLength-n),this.privLastChunkView=new Int8Array(o.buffer.slice(e.byteLength-n))):i=o.buffer,r.set(new Int8Array(i),n),n+=i.byteLength,t.next=23;break;case 21:return t.next=23,this.privStream.readEnded();case 23:t.next=10;break;case 25:return t.abrupt("return",n);case 26:case"end":return t.stop()}}),t,this)})))}},{key:"write",value:function(e){i.a.throwIfNullOrUndefined(this.privStream,"must set format before writing"),this.privStream.writeStreamChunk({buffer:e,isEnd:!1,timeReceived:Date.now()})}},{key:"close",value:function(){this.privStream.close()}}]),r}(g),T=function(e){c(r,e);var t=f(r);function r(){return h(this,r),t.call(this)}return y(r,null,[{key:"create",value:function(e){return new E(e)}}]),r}(b),E=function(e){c(r,e);var t=f(r);function r(e){var o;return h(this,r),(o=t.call(this)).privId=Object(n.b)(),o.privCallback=e,o}return y(r,[{key:"format",set:function(e){}},{key:"write",value:function(e){this.privCallback.write&&this.privCallback.write(e)}},{key:"close",value:function(){this.privCallback.close&&this.privCallback.close()}},{key:"id",value:function(){return this.privId}}]),r}(T)},function(e,t,r){e.exports=r(2243)},function(e,t,r){var n=r(82),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},function(e,t,r){var n,o=r(25),i=r(557),a=r(555),u=r(327),s=r(795),c=r(401),l=r(402),f=l("IE_PROTO"),p=function(){},d=function(e){return"