diff --git a/CHANGELOG.md b/CHANGELOG.md index 1567060..7159c16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ ## CHANGELOG +## v1.2.3 + +### Added: +* Support for users to join session before host + +### Fixed: +* Issue with Command Channel having unexpected failover behavior when ending a session +* Audio and video not reconnecting properly on failover +* Error code not being sent correctly when no server responds to connection requests + +### Known Issue: +On Chromium, video stops playing and goes black when resolution changes to or from 720p. This is caused by a bug in Chromium, which is due to be fixed in Chrome 101, scheduled for release at the end of April. To work around this, you may reduce resolution below 720p; alternatively, if you’d like to continue using 720p, it may help to add a button or messaging to the user to toggle their video on and off + ## v1.2.0 ### Added: diff --git a/dist/index.esm.js b/dist/index.esm.js index 83c1ea6..8357c95 100644 --- a/dist/index.esm.js +++ b/dist/index.esm.js @@ -1 +1 @@ -function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var r=1;r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function l(e,t,r,n,o){var i={};return Object.keys(n).forEach((function(e){i[e]=n[e]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(e,t,i),i=null),i}function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _(e){for(var t=1;t0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):t.flush(this)},t}(Y),Q=function(){function e(t,r){void 0===r&&(r=e.now),this.SchedulerAction=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(r,t)},e.now=function(){return Date.now()},e}(),Z=function(e){function t(r,n){void 0===n&&(n=Q.now);var o=e.call(this,r,(function(){return t.delegate&&t.delegate!==o?t.delegate.now():n()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return I(t,e),t.prototype.schedule=function(r,n,o){return void 0===n&&(n=0),t.delegate&&t.delegate!==this?t.delegate.schedule(r,n,o):e.prototype.schedule.call(this,r,n,o)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var r;this.active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(Q),$=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return I(t,e),t}(Z))(X),ee=new F((function(e){return e.complete()}));function te(e){return e?function(e){return new F((function(t){return e.schedule((function(){return t.complete()}))}))}(e):ee}function re(e){return e&&"function"==typeof e.schedule}var ne,oe=function(e){return function(t){for(var r=0,n=e.length;r0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t.scheduled||(t.scheduled=function(e){var t=fe++;return ye[t]=!0,ve.then((function(){return Ee(t)&&e()})),t}(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);0===t.actions.length&&(function(e){Ee(e)}(r),t.scheduled=void 0)},t}(Y),me=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return I(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,n=-1,o=r.length;e=e||r.shift();do{if(t=e.execute(e.state,e.delay))break}while(++n0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(He);function We(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),Fe(j,e)}function Ke(){return We(1)}function qe(){for(var e=[],t=0;t1?n.next(Array.prototype.slice.call(arguments)):n.next(e)}),n,r)}))}function Xe(e,t,r){return r?Xe(e,t).pipe(Te((function(e){return w(e)?r.apply(void 0,e):r(e)}))):new F((function(r){var n,o=function(){for(var e=[],t=0;t=0}function Ze(e){var t=e.subscriber,r=e.counter,n=e.period;t.next(r),this.schedule({subscriber:t,counter:r+1,period:n},n)}function $e(){for(var e=[],t=0;t1&&"number"==typeof e[e.length-1]&&(r=e.pop())):"number"==typeof o&&(r=e.pop()),null===n&&1===e.length&&e[0]instanceof F?e[0]:We(r)(se(e,n))}function et(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}function tt(e,t){return function(r){return r.lift(new rt(e,t))}}var rt=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new nt(e,this.predicate,this.thisArg))},e}(),nt=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.thisArg=n,o.count=0,o}return I(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)},t}(U);function ot(e,t,r){return[tt(t,r)(new F(Ue(e))),tt(et(t,r))(new F(Ue(e)))]}function it(){for(var e=[],t=0;t0&&r[0].time-n.now()<=0;)r.shift().notification.observe(o);if(r.length>0){var i=Math.max(0,r[0].time-n.now());this.schedule(e,i)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,r=new yt(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(ue.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(ue.createComplete()),this.unsubscribe()},t}(U),yt=function(e,t){this.time=e,this.notification=t};function Et(e){return function(t){return 0===e?te():t.lift(new gt(e))}}var gt=function(){function e(e){if(this.total=e,this.total<0)throw new Ce}return e.prototype.call=function(e,t){return t.subscribe(new mt(e,this.total))},e}(),mt=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return I(t,e),t.prototype._next=function(e){var t=this.total,r=++this.count;r<=t&&(this.destination.next(e),r===t&&(this.destination.complete(),this.unsubscribe()))},t}(U);function St(e){return function(t){return t.lift(new bt(e))}}var bt=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new It(e,this.value))},e}(),It=function(e){function t(t,r){var n=e.call(this,t)||this;return n.value=r,n}return I(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(U);function At(e,t,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof t?Fe((function(){return e}),t,r):("number"==typeof t&&(r=t),Fe((function(){return e}),r))}var Ct=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new Ot(e,this.predicate))},e}(),Ot=function(e){function t(t,r){var n=e.call(this,t)||this;return n.predicate=r,n.skipping=!0,n.index=0,n}return I(t,e),t.prototype._next=function(e){var t=this.destination;this.skipping&&this.tryCallPredicate(e),this.skipping||t.next(e)},t.prototype.tryCallPredicate=function(e){try{var t=this.predicate(e,this.index++);this.skipping=Boolean(t)}catch(e){this.destination.error(e)}},t}(U);function Tt(){for(var e=[],t=0;t0){var o=n.indexOf(r);-1!==o&&n.splice(o,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(Ne),Wt=function(e,t){return e===t||"function"==typeof t&&e===t.toString()},Kt=function(){for(var e=arguments.length,t=Array(e),r=0;r=t.length?r(new rr(a,h,new tr(void 0,e[h]))):ir(e[h],t[h],r,n,a,h,s);for(;h=0?(ir(e[o],t[o],r,n,a,o,s),f=nr(f,c)):ir(e[o],void 0,r,n,a,o,s)})),f.forEach((function(e){ir(void 0,t[e],r,n,a,e,s)}))}s.length=s.length-1}else e!==t&&("number"===d&&isNaN(e)&&isNaN(t)||r(new $t(a,e,t)))}function sr(e,t,r,n){return n=n||[],ir(e,t,(function(e){e&&n.push(e)}),r),n.length?n:void 0}function ar(e,t,r){if(e&&t&&r&&r.kind){for(var n=e,o=-1,i=r.path?r.path.length-1:0;++o1?r-1:0),o=1;o1?t-1:0),n=1;n2?r-2:0),s=2;se,SET_RWG_SERVERS_LIST:e=>e,SET_RWG_RETRY_COUNT:e=>e,SET_XMPP_SOCKET_STATUS:e=>e,SET_IS_XMPP_SDK_LOADED:e=>e,SET_MAIN_SESSION_SOCKET_STATUS:e=>e,SET_CMD_CHANNEL_SOCKET_STATUS:e=>e,RESET_SOCKET:()=>({})}),ln=_r("CONNECT_TO_MEDIA_STREAM"),pn=_r("RECEIVE_PAYLOAD_FROM_MEDIA_SDK"),{setAudioEncodeStatus:hn,setAudioDecodeStatus:_n,setVideoEncodeStatus:fn,setVideoDecodeStatus:vn,setSharingEncodeStatus:yn,setSharingDecodeStatus:En,setMediaConstraints:gn,setMediaEncryptKey:mn,resetMedia:Sn}=Ur("SET_AUDIO_ENCODE_STATUS","SET_AUDIO_DECODE_STATUS","SET_VIDEO_ENCODE_STATUS","SET_VIDEO_DECODE_STATUS","SET_SHARING_ENCODE_STATUS","SET_SHARING_DECODE_STATUS","SET_MEDIA_CONSTRAINTS","SET_MEDIA_ENCRYPT_KEY","RESET_MEDIA");function bn(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o{const t=e(...r);if(!t)throw new TypeError('combineEpics: one of the provided Epics "'.concat(e.name||"","\" does not return a stream. Double check you're not missing a return statement!"));return t.pipe(ut((e,t)=>(setTimeout(()=>{throw e},0),t)))}))};try{Object.defineProperty(n,"name",{value:"combineEpics(".concat(t.map(e=>e.name||"").join(", "),")")})}catch(e){}return n}function An(){for(var e=arguments.length,t=new Array(e),r=0;rObject.values(e));return In(...n)}function Cn(e,t){return e.pipe(Kt("".concat(zr)),tt(e=>e.payload.evt===t))}function On(e,t){return e.pipe(Kt("".concat(Yr)),tt(e=>e.payload.event===t))}function Tn(e,t){return e.pipe(Kt("".concat(tn)),tt(e=>e.payload.evt===t))}function Rn(e,t){return e.pipe(Kt("".concat(zr),"".concat(en)),tt(e=>e.payload.evt===t))}function wn(e,t){return e.pipe(Kt("".concat(pn)),tt(e=>Array.isArray(t)?t.indexOf(e.payload.type)>-1:e.payload.type===t))}var Nn="undefined"!=typeof window&&window,Dn="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Mn="undefined"!=typeof global&&global,Pn=Nn||Mn||Dn;function kn(e,t){return void 0===t&&(t=null),new Fn({method:"GET",url:e,headers:t})}function Un(e,t,r){return new Fn({method:"POST",url:e,body:t,headers:r})}function Vn(e,t){return new Fn({method:"DELETE",url:e,headers:t})}function Ln(e,t,r){return new Fn({method:"PUT",url:e,body:t,headers:r})}function jn(e,t,r){return new Fn({method:"PATCH",url:e,body:t,headers:r})}!function(){if(!Pn)throw new Error("RxJS could not find any global context (window, self, global)")}();var Hn=Te((function(e,t){return e.response}));function xn(e,t){return Hn(new Fn({method:"GET",url:e,responseType:"json",headers:t}))}var Fn=function(e){function t(t){var r=e.call(this)||this,n={async:!0,createXHR:function(){return this.crossDomain?function(){if(Pn.XMLHttpRequest)return new Pn.XMLHttpRequest;if(Pn.XDomainRequest)return new Pn.XDomainRequest;throw new Error("CORS is not supported by your browser")}():function(){if(Pn.XMLHttpRequest)return new Pn.XMLHttpRequest;var e=void 0;try{for(var t=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],r=0;r<3;r++)try{if(e=t[r],new Pn.ActiveXObject(e))break}catch(e){}return new Pn.ActiveXObject(e)}catch(e){throw new Error("XMLHttpRequest is not supported by your browser")}}()},crossDomain:!0,withCredentials:!1,headers:{},method:"GET",responseType:"json",timeout:0};if("string"==typeof t)n.url=t;else for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);return r.request=n,r}var r;return I(t,e),t.prototype._subscribe=function(e){return new Gn(e,this.request)},t.create=((r=function(e){return new t(e)}).get=kn,r.post=Un,r.delete=Vn,r.put=Ln,r.patch=jn,r.getJSON=xn,r),t}(F),Gn=function(e){function t(t,r){var n=e.call(this,t)||this;n.request=r,n.done=!1;var o=r.headers=r.headers||{};return r.crossDomain||n.getHeader(o,"X-Requested-With")||(o["X-Requested-With"]="XMLHttpRequest"),n.getHeader(o,"Content-Type")||Pn.FormData&&r.body instanceof Pn.FormData||void 0===r.body||(o["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),r.body=n.serializeBody(r.body,n.getHeader(r.headers,"Content-Type")),n.send(),n}return I(t,e),t.prototype.next=function(e){this.done=!0;var t,r=this.xhr,n=this.request,o=this.destination;try{t=new Bn(e,r,n)}catch(e){return o.error(e)}o.next(t)},t.prototype.send=function(){var e=this.request,t=this.request,r=t.user,n=t.method,o=t.url,i=t.async,s=t.password,a=t.headers,c=t.body;try{var d=this.xhr=e.createXHR();this.setupEvents(d,e),r?d.open(n,o,i,r,s):d.open(n,o,i),i&&(d.timeout=e.timeout,d.responseType=e.responseType),"withCredentials"in d&&(d.withCredentials=!!e.withCredentials),this.setHeaders(d,a),c?d.send(c):d.send()}catch(e){this.error(e)}},t.prototype.serializeBody=function(e,t){if(!e||"string"==typeof e)return e;if(Pn.FormData&&e instanceof Pn.FormData)return e;if(t){var r=t.indexOf(";");-1!==r&&(t=t.substring(0,r))}switch(t){case"application/x-www-form-urlencoded":return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&");case"application/json":return JSON.stringify(e);default:return e}},t.prototype.setHeaders=function(e,t){for(var r in t)t.hasOwnProperty(r)&&e.setRequestHeader(r,t[r])},t.prototype.getHeader=function(e,t){for(var r in e)if(r.toLowerCase()===t.toLowerCase())return e[r]},t.prototype.setupEvents=function(e,t){var r,n,o=t.progressSubscriber;function i(e){var t,r=i,n=r.subscriber,o=r.progressSubscriber,s=r.request;o&&o.error(e);try{t=new qn(this,s)}catch(e){t=e}n.error(t)}(e.ontimeout=i,i.request=t,i.subscriber=this,i.progressSubscriber=o,e.upload&&"withCredentials"in e)&&(o&&(r=function(e){r.progressSubscriber.next(e)},Pn.XDomainRequest?e.onprogress=r:e.upload.onprogress=r,r.progressSubscriber=o),n=function(e){var t,r=n,o=r.progressSubscriber,i=r.subscriber,s=r.request;o&&o.error(e);try{t=new Wn("ajax error",this,s)}catch(e){t=e}i.error(t)},e.onerror=n,n.request=t,n.subscriber=this,n.progressSubscriber=o);function s(e){}function a(e){var t=a,r=t.subscriber,n=t.progressSubscriber,o=t.request;if(4===this.readyState){var i=1223===this.status?204:this.status,s="text"===this.responseType?this.response||this.responseText:this.response;if(0===i&&(i=s?200:0),i<400)n&&n.complete(),r.next(e),r.complete();else{n&&n.error(e);var c=void 0;try{c=new Wn("ajax error "+i,this,o)}catch(e){c=e}r.error(c)}}}e.onreadystatechange=s,s.subscriber=this,s.progressSubscriber=o,s.request=t,e.onload=a,a.subscriber=this,a.progressSubscriber=o,a.request=t},t.prototype.unsubscribe=function(){var t=this.done,r=this.xhr;!t&&r&&4!==r.readyState&&"function"==typeof r.abort&&r.abort(),e.prototype.unsubscribe.call(this)},t}(U),Bn=function(e,t,r){this.originalEvent=e,this.xhr=t,this.request=r,this.status=t.status,this.responseType=t.responseType||r.responseType,this.response=Kn(this.responseType,t)},Wn=function(){function e(e,t,r){return Error.call(this),this.message=e,this.name="AjaxError",this.xhr=t,this.request=r,this.status=t.status,this.responseType=t.responseType||r.responseType,this.response=Kn(this.responseType,t),this}return e.prototype=Object.create(Error.prototype),e}();function Kn(e,t){switch(e){case"json":return function(e){return"response"in e?e.responseType?e.response:JSON.parse(e.response||e.responseText||"null"):JSON.parse(e.responseText||"null")}(t);case"xml":return t.responseXML;case"text":default:return"response"in t?t.response:t.responseText}}var qn=function(e,t){return Wn.call(this,"ajax timeout",e,t),this.name="AjaxTimeoutError",this},zn=Fn.create;const Jn={default:{"apac.errorcodes_success":"Successfully joined the meeting.","apac.errorcodes_fail":"Fail to join the meeting.","apac.errorcodes_not_init":"Meeting not initialized.","apac.errorcodes_register":"This webinar requires registration.","apac.errorcodes_email_require":"Email is missing to attend webinar.","apac.errorcodes_not_exist":"Meeting does not exist.","apac.errorcodes_not_host":"You are not the meeting host.","apac.errorcodes_wrong_pass":"Meeting Passcode wrong.","apac.errorcodes_not_start":"Meeting has not started","apac.errorcodes_re_connect":"Meeting is reconnecting.","apac.errorcodes_be_removed":"Be removed.","apac.errorcodes_disconnect":"Meeting has been disconnected.","apac.errorcodes_denied_register_with_panelist":"Denied register use panelist email.","apac.errorcodes_web_has_in_progress":"Already has other meetings in progress.","apac.errorcodes_web_require_email":"User email is required.","apac.errorcodes_web_not_support_webinar_pac":"Not support webinar and personal audio conference","apac.errorcodes_web_host_not_exit":"The meeting host does not exist.","apac.errorcodes_web_not_support_webclient":"Not support start or join meeting from web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"The current sdk version doesn't support webinar, please upgrade to the latest version.","apac.errorcodes_web_invalid_id":"Invalid meeting ID.","apac.errorcodes_web_not_support_registration_webinar":"Not support registration webinar","apac.errorcodes_web_not_support_tsp":"Not support start or join meeting from web, when you chose TSP as his audio in a meeting.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Not allow to start webinar from web.","apac.errorcodes_pac_api_wrong":"The accounts API Key is not valid.","apac.errorcodes_pac_signature_expired":"The signature has expired.","apac.errorcodes_pac_mn_wrong":"The meeting number is wrong.","apac.errorcodes_pac_mn_not_fount":"The meeting number is not found.","apac.errorcodes_pac_role_error":"Incorrect role.","apac.errorcodes_pac_host_not_found":"The meeting host is not found.","apac.errorcodes_pac_api_disabled":"The accounts API Key is deactivated.","apac.errorcodes_pac_cant_host_other_mn":"Cannot not host another meeting concurrently.","apac.errorcodes_pac_invalid_signature":"Signature is invalid.","apac.errorcodes_pac_no_permission":"No permission.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Unable join from browser, please join using the Zoom desktop client or mobile app.","apac.errorcodes_rwc_empty":"Could not get a response from the web server.","apac.errorcodes_rwc_error":"Could not connect to Web Server error.","apac.errorcodes_frequent_call":"You have reached the API limit for this call.","apac.errorcodes_frequent_join":"You be limit by zoom, need to check recaptcha.","apac.errorcodes_offline":"The service is temporarily offline.","apac.errorcodes_wasm_fail":"Download wasm files error, please check your network and firewall.","apac.errorcodes_denied_email":"Email is blocked by Administrator.","apac.errorcodes_tk_expired":"Token has expired.","apac.invalid_parameter":"Invalid Parameter","apac.errorcodes_login_required":"Require login","apac.errorcodes_upgrade":"Your sdk version needs to be {0} or higher to join the meeting"},"de-DE":{"apac.errorcodes_web_has_in_progress":"Hat bereits andere laufende Meetings.","apac.errorcodes_web_require_email":"E-Mail-Adresse von Benutzer erforderlich.","apac.errorcodes_web_not_support_webinar_pac":"Unterstützen Webinar und persönliche Audiokonferenz nicht","apac.errorcodes_web_host_not_exit":"Der Meeting-Host ist nicht vorhanden.","apac.errorcodes_web_not_support_webclient":"Start nicht unterstützt bzw. starten Sie das Meeting aus dem Web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"Ihre aktuelle SDK-Version unterstützt keine Webinare. Aktualisieren Sie bitte auf die neueste Version.","apac.errorcodes_web_invalid_id":"Ungültige Meeting-ID.","apac.errorcodes_web_not_support_registration_webinar":"Registrierung für Webinar wird nicht unterstützt","apac.errorcodes_web_not_support_tsp":"Sie unterstützen nicht den Start oder die Teilnahme an einem Meeting aus dem Web, wenn Sie den Telefonieanbieter als seinen Audiobeitrag in einem Meeting gewählt haben.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Das Starten eines Webinars vom Internet aus ist nicht zulässig.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Unfähig beitreten aus Browser, verbinden Sie bitte den Zoom-Desktop-Client oder mobile App."},"es-ES":{"apac.errorcodes_web_has_in_progress":"Ya posee otras reuniones en curso.","apac.errorcodes_web_require_email":"Se requiere correo electrónico del usuario.","apac.errorcodes_web_not_support_webinar_pac":"No soporta seminario web o conferencia de audio personal","apac.errorcodes_web_host_not_exit":"El anfitrión de la reunión no existe.","apac.errorcodes_web_not_support_webclient":"No se puede iniciar ni entrar a una reunión desde la web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"La versión actual de sdk no es compatible con el seminario web, actualice a la última versión.","apac.errorcodes_web_invalid_id":"ID de reunión no válida.","apac.errorcodes_web_not_support_registration_webinar":"Seminario web que no es compatible con la inscripción","apac.errorcodes_web_not_support_tsp":"Cuando eligió el proveedor de servicios telefónicos como audio en una reunión, no se puede iniciar o unirse una reunión desde el sitio web.","apac.errorcodes_web_not_allow_start_webinar_from_web":"No se permite comenzar un seminario web desde la web.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"No puede unirse desde el navegador, por favor unirse usando el cliente de escritorio Zoom o aplicación móvil."},"fr-FR":{"apac.errorcodes_web_has_in_progress":"Il a déjà d’autres réunions en cours.","apac.errorcodes_web_require_email":"Le courriel de l’utilisateur est requis.","apac.errorcodes_web_not_support_webinar_pac":"Ne prend pas en charge le webinaire ni la conférence audio personnelle","apac.errorcodes_web_host_not_exit":"L’animateur de la réunion n’existe pas.","apac.errorcodes_web_not_support_webclient":"Ne supporte pas démarrer ou rejoindre une réunion à partir du web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"La version actuelle du SDK ne prend pas en charge le webinaire, veuillez passer à la dernière version.","apac.errorcodes_web_invalid_id":"Nº de réunion non valide.","apac.errorcodes_web_not_support_registration_webinar":"Ne prend pas en charge le webinaire d’inscription","apac.errorcodes_web_not_support_tsp":"Ne peut pas démarrer ou rejoindre la réunion depuis Internet, lorsque vous sélectionnez le fournisseur de service en téléphonie comma sa sortie audio dans une réunion.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Ne pas permettre de démarrer des webinaires à partir du Web.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Impossible de rejoindre le navigateur, s'il vous plaît rejoindre en utilisant le client de bureau Zoom ou une application mobile."},"jp-JP":{"apac.errorcodes_web_has_in_progress":"すでに他のミーティングが始まっています。","apac.errorcodes_web_require_email":"ユーザーメールは必要です。","apac.errorcodes_web_not_support_webinar_pac":"ウェビナーとパーソナル音声会議がサポートされていません","apac.errorcodes_web_host_not_exit":"このミーティングのホストは存在しません。","apac.errorcodes_web_not_support_webclient":"ウェブからのミーティング開始/参加はサポートされません。","apac.errorcodes_web_should_support_webinar_with_latest_version":"現在のSDKバージョンはウェビナーをサポートしていません。最新バージョンにアップグレードしてください。","apac.errorcodes_web_invalid_id":"無効なミーティングIDです。","apac.errorcodes_web_not_support_registration_webinar":"登録ウェビナー非対応","apac.errorcodes_web_not_support_tsp":"ミーティングのオーディオにテレフォニーサービスプロバイダを選択した場合、ウェブからミーティングを開始したり、ミーティングに参加したりできません。","apac.errorcodes_web_not_allow_start_webinar_from_web":"ウェビナーをウェブから開始できません。","apac.errorcodes_need_use_zoom_desktop_or_mobile":"できませんが、ブラウザから参加し、ズームデスクトップクライアントやモバイルアプリを使用して参加してください。"},"pt-PT":{"apac.errorcodes_web_has_in_progress":"Já há outras reuniões em andamento.","apac.errorcodes_web_require_email":"O e-mail do usuário é obrigatório.","apac.errorcodes_web_not_support_webinar_pac":"Não há suporte para webinar e audioconferência pessoal","apac.errorcodes_web_host_not_exit":"O anfitrião da reunião não existe.","apac.errorcodes_web_not_support_webclient":"Não há suporte para iniciar ou entrar na reunião pela web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"A versão sdk atual não oferece suporte para webinar. Atualize para a versão mais recente.","apac.errorcodes_web_invalid_id":"ID da reunião inválido.","apac.errorcodes_web_not_support_registration_webinar":"O registro do webinar não é compatível","apac.errorcodes_web_not_support_tsp":"Não é compatível iniciar ou ingressar na reunião pela web ao escolher o áudio do provedor de serviços de telefonia em uma reunião.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Não é permitido iniciar o webinar na web.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Incapaz juntar-se a partir do navegador, por favor, junte-se usando o cliente de desktop Zoom ou aplicativo móvel."},"ru-RU":{"apac.errorcodes_web_has_in_progress":"Уже участвует в других конференциях.","apac.errorcodes_web_require_email":"Требуется почта пользователя.","apac.errorcodes_web_not_support_webinar_pac":"Не поддерживает веб-семинар и персональную аудиоконференцию","apac.errorcodes_web_host_not_exit":"Организатор конференции не существует.","apac.errorcodes_web_not_support_webclient":"Запуск или вход в конференцию через сеть не поддерживается.","apac.errorcodes_web_should_support_webinar_with_latest_version":"Текущая версия пакета SDK не поддерживает вебинары. Выполните обновление до последней версии.","apac.errorcodes_web_invalid_id":"Неверный идентификатор конференции.","apac.errorcodes_web_not_support_registration_webinar":"Регистрация на вебинар не поддерживается","apac.errorcodes_web_not_support_tsp":"Если для аудиоконференции используется поставщик службы телефонии, такую конференцию невозможно начать или подключиться к ней через браузер.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Запуск веб-семинара через Интернет запрещен.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Невозможно присоединиться из браузера, пожалуйста, присоединяйтесь с помощью настольного клиента Увеличить или мобильное приложение."},"zh-CN":{"apac.errorcodes_web_has_in_progress":"已经有另一场会议正在进行。","apac.errorcodes_web_require_email":"必须提供用户电子邮件地址。","apac.errorcodes_web_not_support_webinar_pac":"非支持的网络研讨会和个人音频会议","apac.errorcodes_web_host_not_exit":"会议主持人不存在。","apac.errorcodes_web_not_support_webclient":"不支持从 Web 开始或加入会议。","apac.errorcodes_web_should_support_webinar_with_latest_version":"当前 sdk 版本不支持网络研讨会,请升级到最新版本。","apac.errorcodes_web_invalid_id":"无效的会议ID。","apac.errorcodes_web_not_support_registration_webinar":"不支持注册网络研讨会","apac.errorcodes_web_not_support_tsp":"如果选择电话语音服务提供商作为会议音频,则不支持通过网络开始或加入会议。","apac.errorcodes_web_not_allow_start_webinar_from_web":"不允许通过网络开始网络研讨会","apac.errorcodes_need_use_zoom_desktop_or_mobile":"从浏览器无法加入,请加入使用缩放桌面客户端或移动应用程序。"},"zh-TW":{"apac.errorcodes_web_has_in_progress":"已有其他會議正在進行中。","apac.errorcodes_web_require_email":"必須提供使用者電子郵件地址。","apac.errorcodes_web_not_support_webinar_pac":"不支援網路研討會和個人音訊會議","apac.errorcodes_web_host_not_exit":"會議主持人不存在。","apac.errorcodes_web_not_support_webclient":"不支援從 Web 開始或加入會議。","apac.errorcodes_web_should_support_webinar_with_latest_version":"目前的 SDK 版本不支援網路研討會,請升級至最新版本。","apac.errorcodes_web_invalid_id":"無效的會議 ID 。","apac.errorcodes_web_not_support_registration_webinar":"不支援註冊網路研討會","apac.errorcodes_web_not_support_tsp":"當您選擇電話語音服務供應商做為會議語音使用時,不支援經由網頁召開或加入會議。","apac.errorcodes_web_not_allow_start_webinar_from_web":"不允許從 Web 開始網路研討會。","apac.errorcodes_need_use_zoom_desktop_or_mobile":"從瀏覽器無法加入,請加入使用縮放桌面客戶端或移動應用程序。"},"ko-KO":{"apac.errorcodes_web_has_in_progress":"이미 다른 회의가 진행 중입니다.","apac.errorcodes_web_require_email":"사용자 이메일이 필요합니다.","apac.errorcodes_web_not_support_webinar_pac":"웨비나 및 개인 오디오 전화 회의를 지원하지 않음","apac.errorcodes_web_host_not_exit":"회의 호스트가 없습니다.","apac.errorcodes_web_not_support_webclient":"웹에서 회의를 시작하거나 참여하는 것은 지원하지 않습니다.","apac.errorcodes_web_should_support_webinar_with_latest_version":"현재 SDK 버전은 웨비나를 지원하지 않습니다. 최신 버전으로 업그레이드하십시오.","apac.errorcodes_web_invalid_id":"회의 ID가 잘못되었습니다.","apac.errorcodes_web_not_support_registration_webinar":"등록 웨비나를 지원하지 않음","apac.errorcodes_web_not_support_tsp":"회의에서 Telephony Service Provider를 오디오로 선택한 경우 웹에서 회의를 시작하거나 회의에 참가할 수 없습니다.","apac.errorcodes_web_not_allow_start_webinar_from_web":"웹에서 웨비나를 시작할 수 없습니다.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"수 없습니다 브라우저에서 조인 줌 데스크톱 클라이언트 또는 모바일 앱을 사용하여 가입하시기 바랍니다."},"vi-VN":{"apac.errorcodes_web_has_in_progress":"Đã có cuộc họp khác đang diễn ra.","apac.errorcodes_web_require_email":"Email người dùng là bắt buộc.","apac.errorcodes_web_not_support_webinar_pac":"Không hỗ trợ hội thảovideo và hội nghị âm thanh cá nhân","apac.errorcodes_web_host_not_exit":"Người chủ trì cuộc họp không tồn tại.","apac.errorcodes_web_not_support_webclient":"Không hỗ trợ bắt đầu hoặc vào cuộc họp từ web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"Phiên bản sdk hiện tại không hỗ trợ hội thảo trực tuyến, hãy nâng cấp lên phiên bản mới nhất.","apac.errorcodes_web_invalid_id":"ID cuộc họp không hợp lệ.","apac.errorcodes_web_not_support_registration_webinar":"Không hỗ trợ đăng ký hội thảo trực tuyến","apac.errorcodes_web_not_support_tsp":"Không hỗ trợ bắt đầu hoặc vào cuộc họp từ web, khi bạn chọn Nhà cung cấp dịch vụ điện thoại làm nguồn âm thanh trong cuộc họp.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Không cho phép bắt đầu hội thảo trực tuyến từ web.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Không thể tham gia từ trình duyệt, hãy tham gia bằng cách sử dụng client desktop Phóng to hoặc ứng dụng di động."},"it-IT":{"apac.errorcodes_web_has_in_progress":"Sta partecipando a un’altra riunione in corso.","apac.errorcodes_web_require_email":"È richiesta l’email dell’utente.","apac.errorcodes_web_not_support_webinar_pac":"Non supporta webinar e conferenza audio personale","apac.errorcodes_web_host_not_exit":"L’ospite della riunione non esiste.","apac.errorcodes_web_not_support_webclient":"Non supporta l’avvio o la partecipazione alla riunione dal Web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"La versione sdk corrente non supporta i webinar. Effettua l’aggiornamento alla versione più recente.","apac.errorcodes_web_invalid_id":"ID riunione non valido.","apac.errorcodes_web_not_support_registration_webinar":"Non supporta webinar con iscrizione","apac.errorcodes_web_not_support_tsp":"In caso che hai selezionato il fornitore di servizio telefonico come l’audio in riunione, non supporta l’avvio o la partecipazione alla riunione dal Web.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Non è consentito avviare il webinar dal Web.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Impossibile unirsi dal browser, si prega di unirsi con il client desktop Zoom o app mobile."}},Yn=Jn.default;let Xn,Qn,Zn;function $n(e,t){return t in Yn?Yn[t]:e}!function(e){e[e.CONF_SUCCESS=0]="CONF_SUCCESS",e[e.CONF_FAIL_MEETING_OVER=6]="CONF_FAIL_MEETING_OVER",e[e.CONF_FAIL_CONF_USER_FULL=9]="CONF_FAIL_CONF_USER_FULL",e[e.CONF_FAIL_CONFLOCKED=12]="CONF_FAIL_CONFLOCKED",e[e.CONF_FAIL_WEBINAR_DENIED_EMAIL=3033]="CONF_FAIL_WEBINAR_DENIED_EMAIL",e[e.CONF_FAIL_MEETING_HAS_CLOSED=103003]="CONF_FAIL_MEETING_HAS_CLOSED",e[e.CONF_FAIL_HAS_BEEN_REMOVED=103039]="CONF_FAIL_HAS_BEEN_REMOVED",e[e.CONF_RESULT_MMR_IB_REJECT=103043]="CONF_RESULT_MMR_IB_REJECT",e[e.CONF_FAIL_RESULT_MMR_CONF_PARTICIPANT_EXISTS=103044]="CONF_FAIL_RESULT_MMR_CONF_PARTICIPANT_EXISTS"}(Xn||(Xn={})),function(e){e[e.LEAVEREASON_RECONNECT=5]="LEAVEREASON_RECONNECT",e[e.LEAVEREASON_KICKEDBYHOST=7]="LEAVEREASON_KICKEDBYHOST",e[e.LEAVEREASON_ENDBYHOST=8]="LEAVEREASON_ENDBYHOST",e[e.LEAVEREASON_ENDBYHOSTSTARTANOTHERMEETING=9]="LEAVEREASON_ENDBYHOSTSTARTANOTHERMEETING",e[e.LEAVEREASON_NORMAL=1]="LEAVEREASON_NORMAL"}(Qn||(Qn={})),function(e){e[e.LEAVESUBREASON_WAITINGROOMFAILOVER=1]="LEAVESUBREASON_WAITINGROOMFAILOVER"}(Zn||(Zn={}));const eo={ANOTHER_MEETING_RUNNING:3e3,ERROR_NOT_EXIST:3001,ERROR_NOT_HOST:3003,WRONG_MEETING_PASSWORD:3004,EMAIL_REQUIRED:3005,MEETING_NOT_START:3008,BE_REMOVED:3009,ERROR_WEBINAR_ENFORCE_LOGIN:3034,NEED_REAL_NAME:3082,REGISTER_REQUIRED:3099,SSO_LOGIN_WINDOW:6024,ZOOM_LOGIN_WINDOW:3051,ZOOM_SPECIFIC_LOGIN_WINDOW:3052,LOGIN_REQUIRED:3100,RE_CONNECTING:4e3,DISCONNECT:4001,INVALID_PARAMETER:4003,DENIED_REGISTER_WITH_PANELIST:3032,SERVICE_OFFLINE:403,RWC_EMPTY:3621,RWC_ERROR:3622,FREQUENT_CALL:3633,FREQUENT_JOIN:3634,WASM_FAIL:3635,COMMON_ERROR:200,COMMON_SUCCESS:0,UPGRADE:1e3},to={SUCCESS:"apac.errorcodes_success",FAIL:"apac.errorcodes_fail",MEETING_NOT_INIT:"apac.errorcodes_not_init",REGISTER_REQUIRED:"apac.errorcodes_register",LOGIN_REQUIRED:"apac.errorcodes_login_required",SSO_LOGIN_WINDOW:"apac.errorcodes_login_required",ZOOM_LOGIN_WINDOW:"apac.errorcodes_login_required",ZOOM_SPECIFIC_LOGIN_WINDOW:"apac.errorcodes_login_required",EMAIL_REQUIRED:"apac.errorcodes_email_require",ERROR_NOT_EXIST:"apac.errorcodes_not_exist",ERROR_NOT_HOST:"apac.errorcodes_not_host",WRONG_MEETING_PASSWORD:"apac.errorcodes_wrong_pass",ANOTHER_MEETING_RUNNING:"apac.errorcodes_meeting_has_in_progress",MEETING_NOT_START:"apac.errorcodes_not_start",INVALID_PARAMETER:"apac.invalid_parameter",RE_CONNECTING:"apac.errorcodes_re_connect",BE_REMOVED:"apac.errorcodes_be_removed",ERROR_WEBINAR_ENFORCE_LOGIN:"apac.errorcodes_webinar_enforce_login",DISCONNECT:"apac.errorcodes_disconnect",DENIED_REGISTER_WITH_PANELIST:"apac.errorcodes_denied_register_with_panelist",RWC_EMPTY:"apac.errorcodes_rwc_empty",RWC_ERROR:"apac.errorcodes_rwc_error",FREQUENT_CALL:"apac.errorcodes_frequent_call",FREQUENT_JOIN:"apac.errorcodes_frequent_join",WASM_FAIL:"apac.errorcodes_wasm_fail",UPGRADE:"apac.errorcodes_upgrade"},ro={3e3:{"apac.errorcodes_web_has_in_progress":3e3,"apac.errorcodes_web_require_email":3005,"apac.errorcodes_web_not_support_webinar_pac":3701,"apac.errorcodes_web_host_not_exit":3702,"apac.errorcodes_web_not_support_webclient":3603,"apac.errorcodes_web_should_support_webinar_with_latest_version":3604,"apac.errorcodes_web_invalid_id":3703,"apac.errorcodes_web_not_support_registration_webinar":3606,"apac.errorcodes_web_not_support_tsp":3608,"apac.errorcodes_web_not_allow_start_webinar_from_web":3609,"apac.errorcodes_need_use_zoom_desktop_or_mobile":3611},3001:{"apac.errorcodes_not_exist":3610},200:{"apac.errorcodes_pac_api_wrong":3704,"apac.errorcodes_pac_signature_expired":3705,"apac.errorcodes_pac_mn_wrong":3706,"apac.errorcodes_pac_mn_not_fount":3707,"apac.errorcodes_pac_role_error":3708,"apac.errorcodes_pac_host_not_found":3709,"apac.errorcodes_pac_api_disabled":3710,"apac.errorcodes_pac_cant_host_other_mn":3711,"apac.errorcodes_pac_invalid_signature":3712,"apac.errorcodes_pac_no_permission":3713},3099:{"apac.errorcodes_register":3099},3100:{"apac.errorcodes_login_required":3100},3003:{"apac.errorcodes_not_host":3003},3004:{"apac.errorcodes_wrong_pass":3004},3008:{"apac.errorcodes_not_start":3008},3009:{"apac.errorcodes_be_removed":3009},3501:{"apac.errorcodes_login_required":3082},3502:{"apac.errorcodes_login_required":3082},3032:{"apac.errorcodes_denied_register_with_panelist":3100},3033:{"apac.errorcodes_denied_email":3620},3059:{"apac.errorcodes_not_support_simulive":3630},3082:{"apac.errorcodes_real_name":3082},403:{"apac.errorcodes_offline":403},404:{"apac.errorcodes_offline":403},4003:{"apac.invalid_parameter":4003},124:{"apac.errorcodes_tk_expired":3610},3136:{"apac.errorcodes_require_host":3709}},no={3004:{"apac.errorcodes_pac_mn_wrong":3714},3005:{"apac.errorcodes_web_has_in_progress":3e3},3008:{"apac.errorcodes_not_start":3008},3033:{"apac.errorcodes_denied_email":3620},1005:{"apac.errorcodes_denied_email":3620},103039:{"apac.errorcodes_be_removed":3009},6:{"meeting ended":4004},9:{"meeting is at capacity":4005},12:{"meeting locked":4006},103043:{"reject for information barriers":4007},103044:{"participant exist":4008}};function oo(e,t){return Object.keys(e).find(r=>e[r]===t)}let io;function so(e,t){const{key:r,value:n}=function(e,t){let r=!1;if(-1===e)return{key:"apac.errorcodes_offline",value:403};if(3e3===e){const n=["en-US","de-DE","es-ES","en-US","fr-FR","jp-JP","pt-PT","ru-RU","zh-CN","zh-TW","ko_KO","vi-VN","it-IT"];let o={};if(io)o=io;else{const e=Object.keys(ro[3e3]);n.forEach(t=>{const r=function(e){return"en-US"===e&&(e="default"),Jn[e]||Jn.default}(t);o[t]={},e.forEach(e=>{o[t][e]=r[e]})}),io=o}return n.forEach(n=>{if(r)return;const i=oo(o[n],t);i&&(r={key:i,value:ro[e][i]})}),r||(r={key:"apac.errorcodes_fail",value:200}),r}if(200===e){const n=oo({"apac.errorcodes_pac_api_wrong":"The api key is wrong.","apac.errorcodes_pac_signature_expired":"The signature has expired.","apac.errorcodes_pac_mn_wrong":"The meeting number is wrong.","apac.errorcodes_pac_mn_not_fount":"The meeting number is not found.","apac.errorcodes_pac_role_error":"The role is not applicable.","apac.errorcodes_pac_host_not_found":"The meeting host is not found.","apac.errorcodes_pac_api_disabled":"The account don't enable API.","apac.errorcodes_pac_cant_host_other_mn":"Can not be host in other account's meeting.","apac.errorcodes_pac_invalid_signature":"Invalid signature.","apac.errorcodes_pac_no_permission":"No permission"},t);return r=n?{key:n,value:ro[e][n]}:{key:"apac.errorcodes_fail",value:200},r}if(void 0!==ro[e]){const t=ro[e],n=Object.keys(t)[0];r={key:n,value:t[n]}}if(r)return r;const n=oo(eo,e),o=to[n];return o?{key:o,value:e}:{key:"apac.errorcodes_fail",value:200}}(e,t),o=$n(r,r);return r!==o?{reason:o,errorCode:n}:{reason:Yn[r],errorCode:n}}function ao(e){let t=!1;const r="number"==typeof e?e:e.body.res;if(void 0!==no[r]){const e=no[r],n=Object.keys(e)[0];t={key:n,value:e[n]}}if(t){const{key:r,value:n}=t,o=$n(r,r);return r!==o?Object.assign({},e,{reason:o,errorCode:n}):Object.assign({},e,{reason:Yn[r],errorCode:n})}const n=so(r);return Object.assign({},e,{reason:n.reason,errorCode:n.errorCode})}var co="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function uo(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var lo=uo((function(e,t){!function(t,r){e.exports=function(t){var r,n=(t=t||{}).Base64,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=function(e){for(var t={},r=0,n=e.length;r>>6)+s(128|63&t):s(224|t>>>12&15)+s(128|t>>>6&63)+s(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return s(240|t>>>18&7)+s(128|t>>>12&63)+s(128|t>>>6&63)+s(128|63&t)},c=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,d=function(e){return e.replace(c,a)},u=function(e){var t=[0,2,1][e.length%3],r=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[o.charAt(r>>>18),o.charAt(r>>>12&63),t>=2?"=":o.charAt(r>>>6&63),t>=1?"=":o.charAt(63&r)].join("")},l=t.btoa&&"function"==typeof t.btoa?function(e){return t.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,u)},p=function(e){return l(d(String(e)))},h=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},_=function(e,t){return t?h(p(e)):p(e)};t.Uint8Array&&(r=function(e,t){for(var r="",n=0,i=e.length;n>>18)+o.charAt(d>>>12&63)+(void 0!==a?o.charAt(d>>>6&63):"=")+(void 0!==c?o.charAt(63&d):"=")}return t?h(r):r});var f,v=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,y=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return s(55296+(t>>>10))+s(56320+(1023&t));case 3:return s((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return s((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},E=function(e){return e.replace(v,y)},g=function(e){var t=e.length,r=t%4,n=(t>0?i[e.charAt(0)]<<18:0)|(t>1?i[e.charAt(1)]<<12:0)|(t>2?i[e.charAt(2)]<<6:0)|(t>3?i[e.charAt(3)]:0),o=[s(n>>>16),s(n>>>8&255),s(255&n)];return o.length-=[0,0,2,1][r],o.join("")},m=t.atob&&"function"==typeof t.atob?function(e){return t.atob(e)}:function(e){return e.replace(/\S{1,4}/g,g)},S=function(e){return m(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},b=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},I=function(e){return function(e){return E(m(e))}(b(e))};t.Uint8Array&&(f=function(e){return Uint8Array.from(S(b(e)),(function(e){return e.charCodeAt(0)}))});if(t.Base64={VERSION:"2.6.4",atob:S,btoa:l,fromBase64:I,toBase64:_,utob:d,encode:_,encodeURI:function(e){return _(e,!0)},btou:E,decode:I,noConflict:function(){var e=t.Base64;return t.Base64=n,e},fromUint8Array:r,toUint8Array:f},"function"==typeof Object.defineProperty){var A=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};t.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",A((function(){return I(this)}))),Object.defineProperty(String.prototype,"toBase64",A((function(e){return _(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",A((function(){return _(this,!0)})))}}return t.Meteor&&(Base64=t.Base64),e.exports&&(e.exports.Base64=t.Base64),{Base64:t.Base64}}(t)}("undefined"!=typeof self?self:"undefined"!=typeof window?window:co)}));function po(e){return lo.Base64.encode(e,!0)}function ho(e){return lo.Base64.decode(e)}const _o={"-":"+",_:"/",".":"="};function fo(e){const t=e.replace(/[-_.]/g,e=>_o[e]);return Uint8Array.from(atob(t),e=>e.charCodeAt(0))}const vo=(e,t)=>Object.keys(e).find(r=>e[r]===t)||0,yo=["bLock","bHoldUponEntry","viewOnly","listenOnlyPhone","bAllowRaiseHand","bAllowAttendeeRename","bBroadcast","bAllowPlayChimeForEnterOrExit","bIbDisableShare","bIbDisableChat","encryptKey","bNoHostTimeOut","bAllowShowCount","bHasAST","bHasRMC"],Eo={bChime:"bAllowPlayChimeForEnterOrExit",bHasAST:"hasAst",bHasRMC:"hasRmc",topic:e=>({meetingTopic:ho(e)})},go=_r("GET_MEETING_INFO"),mo=_r("GET_INSTANT_MEETING_INFO"),So=(_r("LOGON_ZOOM_DOMAIN"),_r("VERIFY_ZOOM_RECAPTCHA"),_r("LOGON_THIRD_PARTY_DOMAIN"),_r("PING_RWC_SERVER")),bo=_r("MEETING_FAILOVER"),Io=_r("LEAVE_MEETING"),Ao=_r("END_MEETING"),Co=(_r("REGISTER_WEBINAR"),_r("TRIGGER_IDLE_CHECK")),{setMeetingInfo:Oo,setWindownOpen:To,setAppidSignature:Ro,setZak:wo,setTkMtkguid:No,setPingRwcTimestamp:Do,setInMeetingInfo:Mo,setMeetingAttribute:Po,resetMeeting:ko,setIsHost:Uo,setIsCohost:Vo,setMeetingIsOnHold:Lo,setIsMeetingReset:jo,setAudioVideoBeforeOnHold:Ho,setCurrentUserAudioBeforeReset:xo,setIsCurrentUserMutedBeforeReset:Fo,setMeetingStatus:Go,setMeetingRegion:Bo,setIsCurrentUserStartVideoBeforeReset:Wo,setJoinMeetingTimeStamp:Ko,setIsEnableQos:qo,setActiveAppInfo:zo,setMeetingIdleStartTime:Jo,setSessionIdleTimeoutMinutes:Yo}=Ur({SET_MEETING_INFO:e=>e,SET_WINDOWN_OPEN:e=>e,SET_APPID_SIGNATURE:e=>e,SET_ZAK:e=>e,SET_TK_MTKGUID:e=>e,SET_PING_RWC_TIMESTAMP:e=>e,SET_IN_MEETING_INFO:e=>e,SET_MEETING_ATTRIBUTE:e=>{if(yo.some(t=>e&&void 0!==e[t])){let t=e;return Object.keys(Eo).some(t=>void 0!==e[t])&&(t=Object.keys(e).reduce((t,r)=>{const n=Eo[r];return"function"==typeof n?Object.assign(t,n(e[r])):"string"==typeof n?t[n]=e[r]:(t[r],e[r]),t},{})),t}return{}},SET_IS_HOST:e=>e&&e.bHost,SET_IS_COHOST:e=>e&&e.bCoHost,RESET_MEETING:e=>e,SET_MEETING_IS_ON_HOLD:e=>e,SET_IS_MEETING_RESET:e=>e,SET_AUDIO_VIDEO_BEFORE_ON_HOLD:e=>e,SET_CURRENT_USER_AUDIO_BEFORE_RESET:e=>e,SET_IS_CURRENT_USER_MUTED_BEFORE_RESET:e=>e,SET_MEETING_STATUS:e=>e,SET_MEETING_REGION:e=>e,SET_IS_CURRENT_USER_START_VIDEO_BEFORE_RESET:e=>e,SET_JOIN_MEETING_TIME_STAMP:e=>e,SET_IS_ENABLE_QOS:e=>e,SET_ACTIVE_APP_INFO:e=>e,SET_MEETING_IDLE_START_TIME:e=>e,SET_SESSION_IDLE_TIMEOUT_MINUTES:e=>e});function Xo(e,t,r){const n=document.createElement("script");n.type="text/javascript",n.readyState?n.onreadystatechange=()=>{"loaded"!==n.readyState&&"complete"!==n.readyState||(n.onreadystatechange=null,t())}:(n.onload=()=>{t()},n.onerror=()=>{r()}),n.src=e,"function"==typeof document.body.append?document.getElementsByTagName("head")[0].append(n):document.getElementsByTagName("head")[0].appendChild(n)}let Qo,Zo,$o,ei,ti,ri,ni;!function(e){e[e.None=0]="None",e[e.Hand=1]="Hand",e[e.Yes=2]="Yes",e[e.No=3]="No",e[e.Fast=4]="Fast",e[e.Slow=5]="Slow",e[e.Bad=6]="Bad",e[e.Good=7]="Good",e[e.Clap=8]="Clap",e[e.Coffee=9]="Coffee",e[e.Clock=10]="Clock",e[e.Emoji=11]="Emoji"}(Qo||(Qo={})),function(e){e.LoginSuccess="zoomLoginSuccess",e.LoginFail="zoomLoginFail",e.CaptchaSuccess="captchaSuccess",e.CaptchaFail="captchaFail",e.SSOLoginSuccess="ssoLoginSuccess",e.SSOLoginFail="ssoLoginFail",e.JoinSuccess="joinSuccess",e.RegisterSuccess="registerSuccess"}(Zo||(Zo={})),function(e){e.Failover="failover",e.OnHold="on hold",e.Promote="promote",e.Depromote="depromote",e.JoinBreakoutRoom="join breakout room",e.MoveToBreakoutRoom="move to breakout room",e.BackToMeeting="back to meeting"}($o||($o={})),function(e){e.CDN="CDN",e.Global="Global",e.CN="CN"}(ei||(ei={})),function(e){e.Connected="Connected",e.Reconnecting="Reconnecting",e.Closed="Closed",e.Fail="Fail"}(ti||(ti={})),function(e){e.Loading="loading",e.Success="success",e.Fail="fail"}(ri||(ri={})),function(e){e.LocalStorage="LocalStorage",e.SessionStorage="SessionStorage",e.Memory="Memory"}(ni||(ni={}));const oi=po("{}");class ii{constructor(e){this.sessionStorageKey=void 0,this.localStorageKey=void 0,this.sessionCache=void 0,this.localCache=void 0,this.memoryCache=void 0,this.sessionStorageKey=po("zoom-storage-".concat(e)),this.localStorageKey=po("zoom-local-storage"),this.memoryCache={},this.sessionCache=JSON.parse(ho(sessionStorage.getItem(this.sessionStorageKey)||oi)),this.localCache=JSON.parse(ho(localStorage.getItem(this.localStorageKey)||oi))}static init(e){this.instance=new ii(e)}static get(e){if(void 0===this.instance)throw new Error("read before initial");return this.instance.getValue(e).value}static set(e,t,r){if(void 0===this.instance)throw new Error("set before initial");return this.instance.setValue(e,t,r)}static remove(e){if(void 0===this.instance)throw new Error("remove before initial");return this.instance.removeValue(e)}static clearSession(){if(void 0===this.instance)throw new Error("clear before initial");return this.instance.memoryCache={},this.instance.sessionCache={},this.instance.localCache={},sessionStorage.removeItem(this.instance.sessionStorageKey)}getValue(e){return this.sessionCache.hasOwnProperty(e)?{value:this.sessionCache[e],type:ni.SessionStorage}:this.localCache.hasOwnProperty(e)?{value:this.localCache[e],type:ni.LocalStorage}:{value:this.memoryCache[e],type:ni.Memory}}setValue(e,t,r){if(!e)throw new Error("key is null");switch(r){case ni.SessionStorage:{const r=this.sessionCache[e];let n=t;return"function"==typeof t&&(n=t(r)),r!==n&&(this.sessionCache[e]=n,this.flushValue(ni.SessionStorage)),n}case ni.LocalStorage:{const r=this.localCache[e];let n=t;return"function"==typeof t&&(n=t(r)),r!==n&&(this.localCache[e]=n,this.flushValue(ni.LocalStorage)),n}case ni.Memory:{const r=this.memoryCache[e];let n=t;return"function"==typeof t&&(n=t(r)),this.memoryCache[e]=n,n}default:return null}}removeValue(e){const{type:t}=this.getValue(e);switch(t){case ni.SessionStorage:delete this.sessionCache[e],this.flushValue(ni.SessionStorage);break;case ni.LocalStorage:delete this.localCache[e],this.flushValue(ni.LocalStorage);break;case ni.Memory:delete this.memoryCache[e]}}flushValue(e){e===ni.SessionStorage?sessionStorage.setItem(this.sessionStorageKey,po(JSON.stringify(this.sessionCache))):e===ni.LocalStorage&&localStorage.setItem(this.localStorageKey,po(JSON.stringify(this.localCache)))}}function si(){const e=navigator.userAgent;let t,r=e.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(r[1])?(t=/\brv[ :]+(\d+)/g.exec(e)||[],"IE ".concat(t[1]||"")):"Chrome"===r[1]&&(t=e.match(/\b(OPR|Edge)\/(\d+)/),t&&t.length)?t.slice(1).join(" ").replace("OPR","Opera"):(r=r[2]?[r[1],r[2]]:[navigator.appName,navigator.appVersion,"-?"],(t=e.match(/version\/(\d+)/i))&&r.splice(1,1,t[1]),r.join(""))}function ai(){const e=navigator.userAgent.toLowerCase();return!/opera|opr\/[\d]+/.test(e)&&/(msie|trident)/.test(e)}function ci(){return"object"==typeof WebAssembly&&"function"==typeof Worker}ii.instance=void 0;const di=()=>"function"==typeof AudioWorklet,ui=()=>ai(),li=()=>!ai()&&!ci(),pi=()=>/arm/i.test(navigator.userAgent),hi=()=>/\bCrOS\b/.test(navigator.userAgent),_i=()=>{return null!==(e=navigator)&&void 0!==e&&e.hardwareConcurrency&&"function"==typeof window.OffscreenCanvas&&"function"==typeof window.requestAnimationFrame&&"function"==typeof window.SharedArrayBuffer?hi()&&pi()||hi()&&!pi()?navigator.hardwareConcurrency>=4?9:4:9:1;var e};let fi,vi;!function(e){e.VIDEO_ENCODE="0",e.VIDEO_DECODE="1",e.AUDIO_ENCODE="2",e.AUDIO_DECODE="3",e.SHARING_ENCODE="4",e.SHARING_DECODE="5"}(fi||(fi={})),function(e){e[e.NONE=0]="NONE",e[e.AES_256=1]="AES_256",e[e.AES_GCM=2]="AES_GCM"}(vi||(vi={}));const yi=Object.freeze({RWG_CHAT:{gcmType:1,sessionType:"RWG_CHAT"},XMPP_CHAT:{gcmType:1,sessionType:"XMPP_CHAT"},CC_MESSAGE:{gcmType:3,sessionType:"CC_MESSAGE"},BO_BROADCAST:{gcmType:1,sessionType:"BO_BROADCAST"}});let Ei,gi;!function(e){e.WebclientOpt="WEB_CLIENT_OPT",e.WebclientWebinarToken="WEB_CLIENT_WEBINAR_TOKEN",e.WebclientMeetingToken="WEB_CLIENT_MEETING_TOKEN",e.WebclientZak="WEB_CLIENT_ZAK",e.WebclientTk="WEB_CLIENT_TK",e.WebclientIVState="WEB_CLIENT_IV_STATE",e.WebclientIsOnHold="WEB_CLIENT_IS_ON_HOLD",e.WebclientUserId="WEB_CLIENT_USER_ID",e.WebclientParticipantId="WEB_CLIENT_PARTICIPANT_ID",e.WebclientZoomId="WEB_CLIENT_ZOOM_ID",e.WebclientUserName="WEB_CLIENT_USER_NAME",e.WebclientUserEmail="WEB_CLIENT_USER_EMAIL",e.WebclientBreakoutRoomAttendeeStatus="WEB_CLIENT_BO_ATTENDEE_STATUS",e.WebclientBreakoutRoomCommand="WEB_CLIENT_BO_COMMAND",e.WebclientAudioEncryptKey="WEB_CLIENT_AUDIO_ENCRYPT_KEY",e.WebclientVideoEncryptKey="WEB_CLIENT_VIDEO_ENCRYPT_KEY",e.WebclientSharingEncryptKey="WEB_CLIENT_SHARING_ENCRYPT_KEY"}(Ei||(Ei={})),(gi||(gi={})).WebclientDeviceId="WEBCLIENT_DEVICE_ID";const mi=(window.crypto||window.msCrypto).subtle,Si=Ei.WebclientIVState,bi=Object.keys(yi).map(e=>yi[e].sessionType);class Ii{constructor(e,t,r){this.isGCMEnabled=void 0,this.gcmSessionKey=void 0,this.gcmMainSessionKey=void 0,this.zoomId=void 0,this.resetParameters(e,t,r),ii.set(Si,{},ni.SessionStorage)}static init(e,t,r){this.instance?this.instance.resetParameters(e,t,r):this.instance=new Ii(e,t,r)}static destroy(){this.instance&&(this.instance=void 0)}resetParameters(e,t,r){this.isGCMEnabled=!(ai()||!ci())&&r===vi.AES_GCM,this.gcmSessionKey=fo(t),this.gcmMainSessionKey||(this.gcmMainSessionKey=this.gcmSessionKey),this.zoomId=String(e)}beginCrypto(e,t,r){const n=new Uint32Array(1);n[0]=9,n[0]+=Number(r);const o=new Uint8Array(n.buffer);let i=new Uint8Array(132);const s=fo(t);return i.set(s,0),i.set(o,s.length),i=i.subarray(0,s.length+4),mi.importKey("raw",e,{name:"HMAC",hash:"SHA-256"},!0,["sign"]).then(e=>mi.sign({name:"HMAC"},e,i)).then(e=>mi.importKey("raw",e,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]))}getNextIV(e){const t=ii.get(Si);return void 0===t[e]?(t[e]=0,ii.set(Si,t,ni.SessionStorage)):ii.set(Si,t=>c(c({},t),{},{[e]:t[e]+1}),ni.SessionStorage)}resetIVState(){const e=ii.get(Si);if(void 0===e);else{const t=Object.keys(e).filter(e=>bi.indexOf(e)>-1);t.length>0&&(t.forEach(t=>{e[t]+=1e6}),ii.set(Si,e,ni.SessionStorage))}}static resetIV(){if(void 0===this.instance)throw new Error("reset before intialize");this.instance.resetIVState()}static beginEncrypt(e){let{text:t,type:r}=e;const n=new Uint8Array(0);if(this.instance&&this.instance.isGCMEnabled){const e=16,o=this.instance.getNextIV(r.sessionType),i=new ArrayBuffer(16),s=new Uint8Array(i);new DataView(i).setUint32(0,o,!0);let a=null;return a="BO_BROADCAST"===r.sessionType?this.instance.gcmMainSessionKey:this.instance.gcmSessionKey,this.instance.beginCrypto(a,this.instance.zoomId,r.gcmType).then(r=>{const o=(new TextEncoder).encode(t);return mi.encrypt({name:"AES-GCM",iv:s,additionalData:n,tagLength:8*e},r,o)}).then(t=>{const r=1+s.byteLength+2+n.byteLength+4+t.byteLength,o=new ArrayBuffer(r);new Uint8Array(o)[0]=s.length,new Uint8Array(o,1,s.byteLength).set(s),new DataView(o).setUint16(1+s.byteLength,n.length,!0),new Uint8Array(o,3+s.byteLength).set(n),new DataView(o).setUint32(1+s.byteLength+2+n.byteLength,t.byteLength-e,!0),new Uint8Array(o,1+s.byteLength+2+n.byteLength+4).set(new Uint8Array(t));const i=new Uint8Array(o).reduce((e,t)=>e+String.fromCharCode(t),"");return window.btoa(i).replace(/_/g,"/").replace(/-/g,"+").replace(/\=/g,"")})}return Promise.resolve(po(t))}static beginDecrypt(e){let{decryptedText:t,type:r,zoomId:n}=e;if(this.instance&&this.instance.isGCMEnabled){const e=function(e){let t;const r=e.length,n=new Array(r);for(t=0;t{const t=function(e,t){e=new Uint8Array(e),t=new Uint8Array(t);const r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}(l,p);return mi.decrypt({name:"AES-GCM",iv:i,additionalData:c,tagLength:8*p.length},e,t.buffer)}).then(e=>({message:(new TextDecoder).decode(e),iv:i,aad:c})).catch(e=>({message:"[".concat("This is an encrypted message","]"),iv:i,aad:c}))}{const e=new TextDecoder("utf-8");return Promise.resolve({message:e.decode(fo(t))})}}}Ii.instance=void 0;const Ai=20234,Ci=7937,Oi=7938,Ti=12039,Ri=16138;let wi,Ni,Di,Mi,Pi;!function(e){e.Open="open",e.Message="message",e.Error="error",e.Close="close"}(wi||(wi={}));class ki{constructor(){this.eventHandlers=void 0,this.websocket=void 0,this.seq=void 0,this.intervalsToBeCleardWhenSocketClose=[],this.heartBeatInterval=6e4,this.eventHandlers=new Map,this.websocket=null,this.seq=1}on(e,t){let r=this.eventHandlers.get(e);r||(r=[]),r.push(t),this.eventHandlers.set(e,r)}off(e,t){const r=this.eventHandlers.get(e);if(r){const n=r.filter(e=>e!==t);this.eventHandlers.set(e,n)}}emit(e,t){const r=this.eventHandlers.get(e);r&&r instanceof Array&&r.slice(0).forEach(e=>{try{e(t)}catch(e){console.error(e)}})}sendMessageToRwg(e){this.seq+=1;const t=this.seq;return this.websocket&&this.websocket.readyState===WebSocket.OPEN&&this.websocket.send(JSON.stringify(Object.assign(e,{seq:t}))),t}connect(e){this.websocket=new WebSocket(e),this.websocket.binaryType="arraybuffer",this.addWebSocketEventListeners()}close(){var e;null===(e=this.websocket)||void 0===e||e.close()}addHeartBeat(){const e=setInterval(()=>{this.sendMessageToRwg({evt:0})},this.heartBeatInterval);this.intervalsToBeCleardWhenSocketClose.push(e)}clearIntervals(){this.intervalsToBeCleardWhenSocketClose.forEach(e=>clearInterval(e))}addWebSocketEventListeners(){this.websocket&&(this.websocket.addEventListener("open",e=>{this.addHeartBeat(),this.emit("open",e)}),this.websocket.addEventListener("message",e=>{this.emit("message",e)}),this.websocket.addEventListener("close",e=>{this.clearIntervals(),this.emit("close",e)}),this.websocket.addEventListener("error",e=>{this.emit("error",e)}))}joinMeeting(e){return{seq:this.sendMessageToRwg({evt:4097,body:{meetingtoken:e}})}}lockMeeting(e){return{seq:this.sendMessageToRwg({evt:4099,body:{bLock:e}})}}endMeeting(){return{seq:this.sendMessageToRwg({evt:4101,body:{}})}}leaveMeeting(){return{seq:this.sendMessageToRwg({evt:4103,body:{}})}}recordMeeting(e,t){return{seq:this.sendMessageToRwg({evt:4105,body:{bRecord:e,bPause:t}})}}expel(e){return{seq:this.sendMessageToRwg({evt:4107,body:{id:e}})}}expelAttendee(e){return{seq:this.sendMessageToRwg({evt:4205,body:{jid:e}})}}rename(e,t,r){return{seq:this.sendMessageToRwg({evt:4109,body:{id:e,dn2:t,olddn2:r}})}}assignHost(e,t){return{seq:this.sendMessageToRwg({evt:4111,body:{id:e,bCoHost:t}})}}reclaimHost(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{seq:this.sendMessageToRwg({evt:4133,body:{id:e,bCoHost:t}})}}revokeCoHost(e){return{seq:this.sendMessageToRwg({evt:4195,body:{id:e}})}}putOnHold(e,t){return{seq:this.sendMessageToRwg({evt:4113,body:{id:e,bHold:t}})}}setMuteOnEntry(e){return{seq:this.sendMessageToRwg({evt:4115,body:{bOn:e}})}}setHoldOnEntry(e){return{seq:this.sendMessageToRwg({evt:4117,body:{bOn:e}})}}inviteCRCDevice(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;return{seq:this.sendMessageToRwg({evt:4119,body:{ip:e,type:t,encrypt:r}})}}cancelInviteCRCDevice(e){return{seq:this.sendMessageToRwg({evt:4121,body:{transID:e}})}}sendCloseCaption(e){return{seq:this.sendMessageToRwg({evt:4125,body:c({},e)})}}allowViewParticipantNumber(e){return{seq:this.sendMessageToRwg({evt:4127,body:{bOn:e}})}}lowerAllHands(){return{seq:this.sendMessageToRwg({evt:4129,body:{}})}}raiseLowerHand(e,t){return{seq:this.sendMessageToRwg({evt:4131,body:{id:e,bOn:t}})}}chat(e,t,r,n){const o={text:e,destNodeID:t};return r&&Object.assign(o,{sn:r}),n&&Object.assign(o,{attendeeNodeID:n}),{seq:this.sendMessageToRwg({evt:4135,body:o})}}assignCC(e,t){return{seq:this.sendMessageToRwg({evt:4137,body:{id:e,bCCEditor:t}})}}enableLT(e){return{seq:this.sendMessageToRwg({evt:4227,body:{op:e?2:4}})}}allowAskLT(e){return{seq:this.sendMessageToRwg({evt:4263,body:{bAnonymous:e}})}}approveLT(){return{seq:this.sendMessageToRwg({evt:4262,body:{bApproved:!0}})}}askLT(e){return{seq:this.sendMessageToRwg({evt:4261,body:{bAnonymous:e}})}}setChatPriviledge(e){return{seq:this.sendMessageToRwg({evt:4141,body:{chatPriviledge:e}})}}sendFeedback(e){return{seq:this.sendMessageToRwg({evt:4143,body:{feedback:e}})}}clearFeedback(){return{seq:this.sendMessageToRwg({evt:4145,body:{}})}}allowUnmuteVideo(e){return{seq:this.sendMessageToRwg({evt:4147,body:{bOn:e}})}}allowUnmuteAudio(e){return{seq:this.sendMessageToRwg({evt:4149,body:{bOn:e}})}}allowRaiseHand(e){return{seq:this.sendMessageToRwg({evt:4151,body:{bOn:e}})}}boToken(e){return{seq:this.sendMessageToRwg({evt:4173,body:{topic:e}})}}startBO(e){return{seq:this.sendMessageToRwg({evt:4175,body:{proto:e}})}}stopBO(e){return{seq:this.sendMessageToRwg({evt:4177,body:{status:e}})}}assignToBO(e,t){return{seq:this.sendMessageToRwg({evt:4179,body:{targetID:e,targetBID:t}})}}switchBO(e,t){return{seq:this.sendMessageToRwg({evt:4181,body:{targetID:e,targetBID:t}})}}wantJoinBO(e,t){return{seq:this.sendMessageToRwg({evt:4183,body:{targetID:e,targetBID:t}})}}joinBO(e){return{seq:this.sendMessageToRwg({evt:4193,body:{targetBID:e}})}}leaveBO(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return{seq:this.sendMessageToRwg({evt:4185,body:{reason:e}})}}broadcastBO(e){return{seq:this.sendMessageToRwg({evt:4187,body:{textContent:e}})}}askForHelpBO(e){return{seq:this.sendMessageToRwg({evt:4189,body:{targetID:e}})}}askForHelpResultBO(e,t){return{seq:this.sendMessageToRwg({evt:4191,body:{targetID:e,helpResult:t}})}}allowParticipantRename(e){return{seq:this.sendMessageToRwg({evt:4163,body:{bOn:e}})}}allowMessageFeedbackNotify(e,t){return{seq:this.sendMessageToRwg({evt:4171,body:{bOn:e,id:t}})}}setPlayChime(e,t){return{seq:this.sendMessageToRwg({evt:4197,body:{bOn:e,id:t}})}}admitAllSilentUsers(){return{seq:this.sendMessageToRwg({evt:4199,body:{}})}}bindTeleUser(e,t,r){return{seq:this.sendMessageToRwg({evt:4201,body:{teleUserID:e,targetUserID:t,bBind:r}})}}practiceSession(){return{seq:this.sendMessageToRwg({evt:4207,body:null})}}roleChangeWebinar(e,t,r,n){return{seq:this.sendMessageToRwg({evt:4209,body:{jid:t,userID:r,clientCap:n,bPromote:e}})}}sendPromoteConsent(e,t){return{seq:this.sendMessageToRwg({evt:4254,body:{agreed:e,req_id:t}})}}batchCreateBOToken(e){const t=e.map((e,t)=>({topic:e,index:t}));return{seq:this.sendMessageToRwg({evt:4211,body:t})}}mute(e,t){return{seq:this.sendMessageToRwg({evt:8193,body:{bMute:t,id:e}})}}audioDrop(e){return{seq:this.sendMessageToRwg({evt:8195,body:{id:e}})}}audioDialout(e,t,r,n,o){return{seq:this.sendMessageToRwg({evt:8197,body:{pn:e,dn2:po(t),bCallme:r,bPressOne:n,bGreeting:o}})}}audioCancelDialout(e,t){return{seq:this.sendMessageToRwg({evt:8199,body:{pn:e,bCallme:t}})}}audioMuteAll(e){return{seq:this.sendMessageToRwg({evt:8201,body:{bMute:e}})}}allowToTalk(e,t){return{seq:this.sendMessageToRwg({evt:8204,body:{id:e,bAllowTalk:t}})}}subscribeVideo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;return{seq:this.sendMessageToRwg({evt:12289,body:{id:e,size:t,bOn:r}})}}unsubscribeVideo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return{seq:this.sendMessageToRwg({evt:12291,body:{id:e}})}}muteAttendeeVideo(e,t){return{seq:this.sendMessageToRwg({evt:12297,body:{id:e,bOn:t}})}}notifyRwgIsMuteVideo(e,t){return this.muteAttendeeVideo(e,t)}pauseSharing(){return{seq:this.sendMessageToRwg({evt:16385,body:{}})}}resumeSharing(){return{seq:this.sendMessageToRwg({evt:16387,body:{}})}}allowAnonymousQuestion(e,t){return{seq:this.sendMessageToRwg({evt:4155,body:{userId:e,bOn:t}})}}allowViewAll(e,t){return{seq:this.sendMessageToRwg({evt:4157,body:{userId:e,bOn:t}})}}allowVote(e,t){return{seq:this.sendMessageToRwg({evt:4159,body:{userId:e,bOn:t}})}}allowComment(e,t){return{seq:this.sendMessageToRwg({evt:4161,body:{userId:e,bOn:t}})}}sharingRequestRemoteControl(e,t){return{seq:this.sendMessageToRwg({evt:16389,body:{id:e,bOn:t}})}}subscribeGrabRemoteControl(e,t){return{seq:this.sendMessageToRwg({evt:16393,body:{id:e,bOn:t}})}}subscribeSharing(e,t,r){const n={id:e,size:t};return r&&Object.assign(n,{bShareToBO:!0}),{seq:this.sendMessageToRwg({evt:16415,body:n})}}unsubscribeSharing(e,t){const r={id:e};return t&&Object.assign(r,{bShareToBO:!0}),{seq:this.sendMessageToRwg({evt:16417,body:r})}}sendRWGConnectionPerformance(e){return{seq:this.sendMessageToRwg({evt:4167,body:{data:e}})}}sendDatachannelOffer(e){return{seq:this.sendMessageToRwg({evt:24321,offer:e})}}joinOrLeaveVoip(e){return{seq:this.sendMessageToRwg({evt:8203,body:{bOn:e}})}}startSharing(e,t){return{seq:this.sendMessageToRwg({evt:16409,body:c({id:e,boOn:!1},null!=t?t:{})})}}stopSharing(e){return{seq:this.sendMessageToRwg({evt:16409,body:{id:e,bOn:!0}})}}lockSharing(e){return{seq:this.sendMessageToRwg({evt:4169,body:{lockShare:e}})}}startShareToBreakoutRoom(e){return{seq:this.sendMessageToRwg({evt:16425,body:{id:e,bShareToBO:!0}})}}stopShareToBreakoutRoom(e){return{seq:this.sendMessageToRwg({evt:16425,body:{id:e,bShareToBO:!1}})}}preAssignBreakoutRoom(){return{seq:this.sendMessageToRwg({evt:4213,body:{}})}}claimHost(e){return{seq:this.sendMessageToRwg({evt:4215,body:{hostKey:e}})}}allowMultiplePin(e,t){return{seq:this.sendMessageToRwg({evt:4217,body:{userID:e,bOn:t}})}}spotlightVideo(e,t){return{seq:this.sendMessageToRwg({evt:4219,body:c({id:e},t)})}}followHostLayout(e){return{seq:this.sendMessageToRwg({evt:4223,body:{bFollowHostVideo:e}})}}setVideoDragLayout(e){return{seq:this.sendMessageToRwg({evt:4218,body:{drag_list:e}})}}chatCmdReq(e,t){return{seq:this.sendMessageToRwg({evt:4237,body:{msgID:e,cmd:t}})}}activeAppLinkReq(e){return{seq:this.sendMessageToRwg({evt:4257,body:{appId:e}})}}activeAppInfoReq(){return{seq:this.sendMessageToRwg({evt:4255,body:{}})}}}class Ui extends ki{static createAgent(){return this.rwgInstance||(this.rwgInstance=new Ui),this.rwgInstance}}Ui.rwgInstance=null;class Vi extends ki{static getInstance(){return this.instance||(this.instance=new Vi),this.instance}}Vi.instance=null,function(e){e[e.NoAttendee=0]="NoAttendee",e[e.All=1]="All",e[e.AllPanelist=2]="AllPanelist",e[e.Host=3]="Host",e[e.NoOne=4]="NoOne",e[e.EveryonePublicly=5]="EveryonePublicly"}(Ni||(Ni={})),function(e){e[e.All=0]="All",e[e.Panelist=1]="Panelist",e[e.IndividualCcPanelist=2]="IndividualCcPanelist",e[e.Individual=3]="Individual",e[e.SilentModeUsers=4]="SilentModeUsers"}(Di||(Di={})),function(e){e[e.None=0]="None",e[e.Delete=1]="Delete",e[e.Modify=2]="Modify"}(Mi||(Mi={})),function(e){e[e.Success=0]="Success",e[e.Delete=1]="Delete",e[e.Block=3]="Block"}(Pi||(Pi={}));const Li=[Ni.All,Ni.Host,Ni.NoOne,Ni.EveryonePublicly],ji=[Ni.NoOne,Ni.All,Ni.AllPanelist],Hi={userId:Di.All,displayName:"Everyone",isHost:!1,isCoHost:!1},xi={userId:Di.Panelist,displayName:"All panelists"},Fi={userId:Di.SilentModeUsers,displayName:"Everyone (in Waiting Room)",isHost:!1,isCoHost:!1};class Gi{static getInstance(){return this.instance||(this.instance=new Gi),this.instance}constructor(){this.eventHandlers=void 0,this.websocket=void 0,this.seq=void 0,this.intervalsToBeCleardWhenSocketClose=[],this.heartBeatInterval=6e4,this.eventHandlers=new Map,this.websocket=null,this.seq=1}on(e,t){let r=this.eventHandlers.get(e);r||(r=[]),r.push(t),this.eventHandlers.set(e,r)}off(e,t){const r=this.eventHandlers.get(e);if(r){const n=r.filter(e=>e!==t);this.eventHandlers.set(e,n)}}emit(e,t){const r=this.eventHandlers.get(e);r&&r instanceof Array&&r.slice(0).forEach(e=>{try{e(t)}catch(e){console.error(e)}})}sendCommandMsg(e,t,r){this.seq+=1;const n=this.seq;return this.websocket&&this.websocket.readyState===WebSocket.OPEN&&this.websocket.send(JSON.stringify({seq:n,body:{bcm:r,type:t?Ni.AllPanelist:Ni.All,msg:e,jid:[t]},evt:24582})),n}connectXmpp(){this.seq+=1;const e=this.seq;return this.websocket&&this.websocket.readyState===WebSocket.OPEN&&this.websocket.send(JSON.stringify({seq:e,body:{},evt:24576})),e}connect(e){this.websocket=new WebSocket(e),this.websocket.binaryType="arraybuffer",this.addWebSocketEventListeners()}close(){var e;null===(e=this.websocket)||void 0===e||e.close()}clearIntervals(){this.intervalsToBeCleardWhenSocketClose.forEach(e=>clearInterval(e))}addWebSocketEventListeners(){this.websocket&&(this.websocket.addEventListener("open",e=>{this.emit("open",e)}),this.websocket.addEventListener("message",e=>{this.emit("message",e)}),this.websocket.addEventListener("close",e=>{this.clearIntervals(),this.emit("close",e)}),this.websocket.addEventListener("error",e=>{this.emit("error",e)}))}}Gi.instance=null;const Bi=Ei.WebclientIVState;class Wi{static getInstance(){return void 0===this.agentInstance&&(this.agentInstance=new Wi),this.agentInstance}constructor(){this.assetsPath=void 0,this.instance=void 0,this.callbackList=void 0,this.mediaWorkersPath=void 0,this.constraints=void 0,this.svcUrl=void 0,this.meetingNumber=void 0,this.confId=void 0,this.mediaSocketAddress=void 0,this.currentUserId=void 0,this.receivedSharingCanvas=void 0,this.sharingCanvas=void 0,this.callbackList=[]}init(){if(!this.instance){const e={ivObj:{[fi.AUDIO_ENCODE]:ii.get(Bi)&&ii.get(Bi)[fi.AUDIO_ENCODE],[fi.VIDEO_ENCODE]:ii.get(Bi)&&ii.get(Bi)[fi.VIDEO_ENCODE],[fi.SHARING_ENCODE]:ii.get(Bi)&&ii.get(Bi)[fi.SHARING_ENCODE]}};this.instance=new JsMediaSDK_Instance(e),this.instance.setRWGAgent(Ui.createAgent())}}setAssetsAndConstraint(e,t,r){var n;this.assetsPath=e,this.constraints=t,this.mediaWorkersPath=((e,t)=>t?{audioWorkerPath:"".concat(e,"/").concat("1509","_js_audio_process.min.js"),audioWorkletPath:"".concat(e,"/").concat("1509","_js_audio_worklet.min.js"),audioWasm:"".concat(e,"/").concat("1509","_audio.encode.wasm"),videoWorkerPath:"".concat(e,"/").concat("1509","_video_s.min.js"),videoMtWorkerPath:"".concat(e,"/").concat("1509","_video_m.min.js"),videoWasm:"".concat(e,"/").concat("1509","_video.decode.wasm"),videoMtWasm:"".concat(e,"/").concat("1509","_video.mt.wasm"),sharingWorkerPath:"".concat(e,"/").concat("1509","_sharing_s.min.js"),sharingMtWorkerPath:"".concat(e,"/").concat("1509","_sharing_m.min.js"),videoSIMDWorkerPath:"".concat(e,"/").concat("1509","_video_simd.min.js"),videoSIMDWasm:"".concat(e,"/").concat("1509","_video.simd.wasm"),sharingSIMDWorkerPath:"".concat(e,"/").concat("1509","_sharing_simd.min.js"),videoMSIMDWasm:"".concat(e,"/").concat("1509","_video.mtsimd.wasm"),sharingMSIMDWorkerPath:"".concat(e,"/").concat("1509","_sharing_mtsimd.min.js"),videoMSIMDWorkerPath:"".concat(e,"/").concat("1509","_video_mtsimd.min.js"),audioSIMDWorkletPath:"".concat(e,"/").concat("1509","_audio_simd.min.js"),audioSIMDWasm:"".concat(e,"/").concat("1509","_audio.simd.wasm")}:{audioWorkerPath:"".concat(e,"/js_audio_process.min.js"),audioWorkletPath:"".concat(e,"/js_audio_worklet.min.js"),audioWasm:"".concat(e,"/audio.encode.wasm"),videoWorkerPath:"".concat(e,"/video_s.min.js"),videoMtWorkerPath:"".concat(e,"/video_m.min.js"),videoWasm:"".concat(e,"/video.decode.wasm"),videoMtWasm:"".concat(e,"/video.mt.wasm"),sharingWorkerPath:"".concat(e,"/sharing_s.min.js"),sharingMtWorkerPath:"".concat(e,"/sharing_m.min.js"),videoSIMDWorkerPath:"".concat(e,"/video_simd.min.js"),videoSIMDWasm:"".concat(e,"/video.simd.wasm"),sharingSIMDWorkerPath:"".concat(e,"/sharing_simd.min.js"),videoMSIMDWasm:"".concat(e,"/video.mtsimd.wasm"),sharingMSIMDWorkerPath:"".concat(e,"/sharing_mtsimd.min.js"),videoMSIMDWorkerPath:"".concat(e,"/video_mtsimd.min.js"),audioSIMDWorkletPath:"".concat(e,"/audio_simd.min.js"),audioSIMDWasm:"".concat(e,"/audio.simd.wasm")})(this.assetsPath,!!r),this.onMediaSDKCallback=this.onMediaSDKCallback.bind(this),null===(n=this.instance)||void 0===n||n.JsMediaSDK_PreLoad(this.mediaWorkersPath,this.onMediaSDKCallback)}onMediaSDKCallback(e,t){this.callbackList.length>0&&this.callbackList.forEach(r=>r(e,t))}registerCallback(e){this.callbackList.push(e)}unregisterCallback(e){this.callbackList=this.callbackList.filter(t=>t!==e)}static isSupportVideoEncodeHardwareAcceleration(){return JsMediaSDK_Instance.util.IsSupportVideoEncodeHardwareAcceleration()}static isSupportVideoDecodeHardwareAcceleration(){return JsMediaSDK_Instance.util.IsSupportVideoDecodeHardwareAcceleration()}static isCompatibleHardwareForEncode(){return"function"==typeof window.OffscreenCanvas&&0==JsMediaSDK_Instance.util.AdapterWhiteListCheckForEncoder()}connect(e){var t,r,n;let{svcUrl:o,meetingNumber:i,conId:s,e2eEncrypt:a,isViewOnly:c,currentUserId:d,isWebinar:u,enableAudioQos:l,enableVideoQos:p=!1}=e;this.svcUrl=o,this.meetingNumber=i,this.confId=s;const h=((e,t,r)=>({videoSocketAddress:"wss://".concat(e,"/wc/media/").concat(t,"?type=v&cid=").concat(r),audioSocketAddress:"wss://".concat(e,"/wc/media/").concat(t,"?type=a&cid=").concat(r),sharingSocketAddress:"wss://".concat(e,"/wc/media/").concat(t,"?type=").concat(ui()?"j":"s","&cid=").concat(r)}))(o,i,s);this.mediaSocketAddress=h,this.currentUserId=d;const _=_i();var f,v,y,E,g,m,S,b,I,A;(ci()?null===(f=this.instance)||void 0===f||f.setPropsBeforeInit({callback:this.onMediaSDKCallback,audioWorkletPath:null===(v=this.mediaWorkersPath)||void 0===v?void 0:v.audioWorkletPath,e2eEncrypt:a,isEnableListenInitEvent:!0}):null===(y=this.instance)||void 0===y||y.setPropsBeforeInit({callback:this.onMediaSDKCallback,e2eEncrypt:a,isEnableListenInitEvent:!0}),!0===(null===(t=this.constraints)||void 0===t?void 0:t.audio)&&ci())&&((u||di())&&(null===(I=this.instance)||void 0===I||I.initAudioDecode(this.mediaWorkersPath,h.audioSocketAddress,d,!1,s,i,_,l)),!di()||u&&c||null===(A=this.instance)||void 0===A||A.initAudioEncode(this.mediaWorkersPath,h.audioSocketAddress,d,!1,s,i,_,l));!0===(null===(r=this.constraints)||void 0===r?void 0:r.video)&&ci()&&(null===(E=this.instance)||void 0===E||E.initVideoDecode(this.mediaWorkersPath,h.videoSocketAddress,d,!1,s,i,_),u&&c||null===(g=this.instance)||void 0===g||g.initVideoEncode(this.mediaWorkersPath,h.videoSocketAddress,d,!1,s,i,_,!1,p,!0,!0)),!0===(null===(n=this.constraints)||void 0===n?void 0:n.screen)&&(ci()?(null===(m=this.instance)||void 0===m||m.initSharingDecode(this.mediaWorkersPath,h.sharingSocketAddress,d,!1,s,i,_),u&&c||null===(S=this.instance)||void 0===S||S.initSharingEncode(this.mediaWorkersPath,h.sharingSocketAddress,d,!1,s,i,_)):null===(b=this.instance)||void 0===b||b.initSharingDecode(h.sharingSocketAddress))}destroy(){var e;null===(e=this.instance)||void 0===e||e.destroy(),this.instance=null,this.callbackList=[]}disconnect(){var e,t;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(17,{}),null===(t=this.instance)||void 0===t||t.JsMediaSDK_UnInit()}muteAudio(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(8,{ssrc:0})}unmuteAudio(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(7,{ssrc:0,AudioSelectValue:0})}joinComputerAudio(e,t,r,n){var o;return null===(o=this.instance)||void 0===o?void 0:o.Notify_MeidaSDK(22,{CaptureAudio:n,CaptureAudioInfo:{ssrc:e,AudioSelectValue:"default"===t?null:t},speakerInfo:{defaultDeviceId:r}})}leaveComputerAudio(){var e;return null===(e=this.instance)||void 0===e?void 0:e.Notify_MeidaSDK(21,null)}changeSpeaker(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(11,{ssrc:0,AudioSelectValue:e})}changeMicrophone(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(18,{ssrc:0,AudioSelectValue:"default"===e?null:e})}restoreWebRTC(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(19,{ssrc:0,AudioSelectValue:"default"===e?null:e})}renderVideo(e,t,r,n,o,i,s,a,c,d,u){var l;null===(l=this.instance)||void 0===l||l.Notify_MeidaSDK(1,{userId:t,width:n,height:o,x:i,y:s,quality:a,isMyself:c,canvas:e,enableWaterMark:u,waterMarkText:d,zone:r})}stopRenderVideo(e,t,r,n){var o;let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(2,{canvas:e,userId:t,RGBA:n,doNotClean:i,zone:r})}startCaptureVideo(e,t,r,n,o){var i;null===(i=this.instance)||void 0===i||i.Notify_MeidaSDK(3,{ssid:e,width:r,height:n,fps:24,video:o,VideoSelectValue:"default"===t?null:t})}stopCaptureVideo(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(4,{ssrc:0})}changeCamera(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(12,{VideoSelectValue:"default"===e?null:e})}switchCanvasForVideoCapture(e){var t;let r=e;Array.isArray(e)||(r=[e]),null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(25,r)}renderSharing(e,t){var r;let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];this.receivedSharingCanvas=t,null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(23,{width:0,height:0,ssrc:e,canvas:t,enableWaterMark:n,waterMarkText:o,isFromMainSession:i})}stopRenderSharing(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(24,{})}switchSharingSource(e){var t;let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(36,{ssrc:e,isFromMainSession:Number(r)})}ajustmentReceivedSharingCanvas(e,t){if(this.receivedSharingCanvas)try{this.receivedSharingCanvas.width=e,this.receivedSharingCanvas.height=t}catch(e){}}startRemoteControl(e,t,r){var n;null===(n=this.instance)||void 0===n||n.Notify_MeidaSDK(26,c({socketURL:"wss://".concat(this.svcUrl),meetingID:this.meetingNumber,condID:this.confId,os:t,dom:e},r))}stopRemoteControl(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(28)}resendRemoteControlPositionPDU(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(41)}updateRemoteControlProperties(e){var t;const{dimension:r}=e,n=u(e,["dimension"]);null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(27,c(c({},r),n))}startDesktopSharing(e,t,r){var n;let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this.sharingCanvas=document.querySelector("#".concat(t)),null===(n=this.instance)||void 0===n||n.Notify_MeidaSDK(30,{mode:o,ssid:e,canvas:t,video:r})}stopDesktopSharing(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(31,{})}pauseDesktopSharing(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(32,{})}resumeDesktopSharing(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(33,{})}ajustmentSharingCanvas(e,t){if(this.sharingCanvas)try{this.sharingCanvas.width=e,this.sharingCanvas.height=t}catch(e){}}checkChromeSharingExtension(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(34,{})}enableAudioEncode(){var e;null===(e=this.instance)||void 0===e||e.initAudioEncode(this.mediaWorkersPath,this.mediaSocketAddress.audioSocketAddress,this.currentUserId,!1,this.confId,this.meetingNumber,_i())}sendUserNodeList(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(43,e)}updateRenderedSharingDimension(e,t){var r;null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(44,{width:e,height:t})}pauseOrResumeAudio(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(45,{bPause:e})}updateRenderedVideoCanvasDimension(e,t,r){var n;null===(n=this.instance)||void 0===n||n.Notify_MeidaSDK(46,{canvas:e,width:t,height:r})}clearVideoCanvas(e,t){var r;null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(47,{id:e,RGBA:t})}adjustRenderedVideoPosition(e,t,r,n,o,i,s){var a;null===(a=this.instance)||void 0===a||a.Notify_MeidaSDK(48,{userId:t,x:n,y:o,width:i,height:s,canvas:e,zone:r})}mirrorVideo(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(75,{isMirrorMyVideo:e})}updateUserMediaSN(e){var t,r,n;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(80,{isFromMainSession:Number(e.isFromMainSession),mediaActionType:e.iVType,body:{add:null!==(r=e.added)&&void 0!==r?r:[],remove:null!==(n=e.removed)&&void 0!==n?n:[]}})}updateMediaParams(e){var t;const{iVType:r,isFromMainSession:n,updateParams:o}=e;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(81,{mediaActionType:r,isFromMainSession:Number(n),updateParams:o})}createMSChannel(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(84,e)}addReceivedSharingChannelType(e){var t;const{isFromMainSession:r}=e,n=u(e,["isFromMainSession"]);null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(82,c({isFromMainSession:Number(r)},n))}removeReceivedSharingChannelType(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(83,{isFromMainSession:Number(e.isFromMainSession),ssrc:e.ssrc})}enableHardwareAccelerationForVideoDecode(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(70,{enable:e})}enableHardwareAccelerationForVideoEncode(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(71,{enable:e})}}var Ki;Wi.agentInstance=void 0,function(e){e.ConnectionChange="connection-change",e.OnHoldChange="on-hold-change",e.UserAdd="user-added",e.UserUpdate="user-updated",e.UserRemove="user-removed",e.AttendeeUpdate="attendee-updated",e.MeetingAttributeUpdate="meeting-attribute-updated",e.PromoteAttendeeConsent="promote-attendee-consent",e.ActiveAppsUpdate="active-apps-updated"}(Ki||(Ki={}));const qi={success:"ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",fail:["JOIN_MEETING_FAILED"]},zi={[Ki.ConnectionChange]:[{event:"JOIN_MEETING_SUCCESS",payload:()=>({state:ti.Connected})},{event:"JOIN_MEETING_FAILED",payload:e=>c({state:ti.Fail},e)},{event:"RECONNECTING_MEETING",payload:e=>c({state:ti.Reconnecting},e)},{event:"LEAVING_MEETING",payload:e=>c({state:ti.Closed},e)}],[Ki.OnHoldChange]:[{event:"MEETING_IN_WAITING_ROOM",payload:e=>({isOnHold:e})}],[Ki.UserAdd]:[{event:"ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",payload:e=>[e]},{event:"ADD_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[Ki.UserUpdate]:[{event:"UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",payload:e=>[e]},{event:"UPDATE_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[Ki.UserRemove]:[{event:"REMOVE_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[Ki.AttendeeUpdate]:[{event:"UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[Ki.MeetingAttributeUpdate]:[{event:"UPDATE_MEETING_ATTRIBUTE",payload:()=>{}}],[Ki.PromoteAttendeeConsent]:[{event:"MEETING_WEBINAR_PROMOTE_CONSENT_REQ",payload:e=>{let{req_id:t,sender_id:r}=e;return{reqId:t,senderId:r}}}],[Ki.ActiveAppsUpdate]:[{event:"ACTIVE_APPS_UPDATE",payload:()=>{}}]};let Ji;!function(e){e.ChatOnMessage="chat-on-message",e.ChatPrivilegeChange="chat-privilege-change",e.ChatDeleteMessage="chat-delete-message"}(Ji||(Ji={}));const Yi={[Ji.ChatOnMessage]:[{event:"CHAT_RECEIVE_MESSAGE_EVENTS",payload:e=>e}],[Ji.ChatPrivilegeChange]:[{event:"CHAT_PRIVILEGE_CHANGE",payload:e=>e}],[Ji.ChatDeleteMessage]:[{event:"CHAT_DELETE_MESSAGE_REPONSE",payload:e=>e}]};let Xi;!function(e){e.CommandChannelStatus="command-channel-status",e.CommandChannelMessage="command-channel-message"}(Xi||(Xi={}));const Qi={[Xi.CommandChannelStatus]:[{event:"COMMAND_STATUS_EVENTS",payload:e=>e}],[Xi.CommandChannelMessage]:[{event:"COMMAND_RECEIVE_MESSAGE_EVENTS",payload:e=>e}]};let Zi,$i,es;!function(e){e.Recording="Recording",e.Paused="Paused",e.Stopped="Stopped"}(Zi||(Zi={})),function(e){e[e.None=0]="None",e[e.Init=1]="Init",e[e.Start=2]="Start",e[e.Pause=3]="Pause",e[e.Stop=4]="Stop"}($i||($i={})),function(e){e.RecordingChange="recording-change",e.LocalRecordingChange="local-recording-change"}(es||(es={}));const ts={[es.RecordingChange]:[{event:"CLOUD_RECORDING_STATUS_CHANGE",payload:e=>{const{cmrServerStatus:t}=e;return t===$i.Start?Zi.Recording:t===$i.Pause?Zi.Paused:Zi.Stopped}}],[es.LocalRecordingChange]:[{event:"LOCAL_RECORDING_CHANGE",payload:e=>e}]};let rs,ns,os,is,ss,as;!function(e){e[e.InitSuccess=1]="InitSuccess",e[e.InitSuccessVideo=1.1]="InitSuccessVideo",e[e.InitSuccessAudio=1.2]="InitSuccessAudio",e[e.InitSuccessSharing=1.3]="InitSuccessSharing",e[e.UserGrantCaptureAudio=2]="UserGrantCaptureAudio",e[e.CurrentVideoResolution=3]="CurrentVideoResolution",e[e.JpegDecThreadOk=4]="JpegDecThreadOk",e[e.JpegData=5]="JpegData",e[e.SharingPara=6]="SharingPara",e[e.VideoDecodeMaxSize=7]="VideoDecodeMaxSize",e[e.CurrentCaptureVideoWidthHeight=8]="CurrentCaptureVideoWidthHeight",e[e.StartVideoCaptureSuccess=9]="StartVideoCaptureSuccess",e[e.StopVideoCaptureSuccess=10]="StopVideoCaptureSuccess",e[e.StartRemoteControlSuccess=11]="StartRemoteControlSuccess",e[e.CancelRemoteControlSuccess=12]="CancelRemoteControlSuccess",e[e.RemoteControlCopiedTextNotify=13]="RemoteControlCopiedTextNotify",e[e.MonitorLog=14]="MonitorLog",e[e.CurrentDesktopSharingWidthHeight=15]="CurrentDesktopSharingWidthHeight",e[e.DesktopSharingCaptureSuccess=16]="DesktopSharingCaptureSuccess",e[e.CheckChromeSharingExtensionResponse=17]="CheckChromeSharingExtensionResponse",e[e.SharingDecodeMaxSize=18]="SharingDecodeMaxSize",e[e.DataChannelOffer=19]="DataChannelOffer",e[e.AesGcmIvResponse=21]="AesGcmIvResponse",e[e.InitFailed=-1]="InitFailed",e[e.InitFailedVideo=-1.1]="InitFailedVideo",e[e.InitFailedAudio=-1.2]="InitFailedAudio",e[e.InitFailedSharing=-1.3]="InitFailedSharing",e[e.UserForbiddedCaptureAudio=-2]="UserForbiddedCaptureAudio",e[e.AudioWebsocketBroken=-3]="AudioWebsocketBroken",e[e.VideoWebsocketBroken=-4]="VideoWebsocketBroken",e[e.SharingDecThreadFailed=-5]="SharingDecThreadFailed",e[e.AudioZeroData=-6]="AudioZeroData",e[e.AudioCtxSamplerate=-7]="AudioCtxSamplerate",e[e.UserForbiddedCaptureVideo=-8]="UserForbiddedCaptureVideo",e[e.UserCameraIsTakenByOtherPrograms=-9]="UserCameraIsTakenByOtherPrograms",e[e.StopVideoCaptureFailed=-10]="StopVideoCaptureFailed",e[e.StartRemoteControlFailed=-11]="StartRemoteControlFailed",e[e.CancelRemoteControlFailed=-12]="CancelRemoteControlFailed",e[e.RemoteControlPasteTextLengthOverflow=-14]="RemoteControlPasteTextLengthOverflow",e[e.UserStopDesktopSharing=-15]="UserStopDesktopSharing",e[e.UserCancelPermissionRequest=-16]="UserCancelPermissionRequest",e[e.DesktopSharingChromeExtensionUninstalled=-17]="DesktopSharingChromeExtensionUninstalled",e[e.DesktopSharingPermissionDenied=-18]="DesktopSharingPermissionDenied",e[e.DesktopSharingTimeOut=-19]="DesktopSharingTimeOut",e[e.DesktopSharingError=-20]="DesktopSharingError",e[e.DesktopSharingSystemError=-22]="DesktopSharingSystemError"}(rs||(rs={})),function(e){e[e.EncodeSuccess=1]="EncodeSuccess",e[e.DecodeSuccess=2]="DecodeSuccess",e[e.EncodeFailed=-1]="EncodeFailed",e[e.DecodeFailed=-2]="DecodeFailed"}(ns||(ns={})),function(e){e.Spotlight="Spotlight",e.Unmute="Unmute",e.AllowToTalk="Allow to talk"}(os||(os={})),function(e){e.Active="active",e.PassiveByMuteOne="passive(mute one)",e.PassiveByMuteAll="passive(mute all)"}(is||(is={})),function(e){e.Join="join",e.Leave="leave",e.Muted="muted",e.Unmuted="unmuted"}(ss||(ss={})),function(e){e[e.Calling=1]="Calling",e[e.Ringing=2]="Ringing",e[e.Accepted=3]="Accepted",e[e.Busy=4]="Busy",e[e.NotAvailable=5]="NotAvailable",e[e.HangUp=6]="HangUp",e[e.Fail=7]="Fail",e[e.Success=8]="Success",e[e.Timeout=9]="Timeout",e[e.Canceling=10]="Canceling",e[e.Canceled=11]="Canceled",e[e.CancelFailed=12]="CancelFailed"}(as||(as={}));const cs=new Blob([new Uint8Array([255,227,24,196,0,0,0,3,72,1,64,0,0,4,132,16,31,227,192,225,76,255,67,12,255,221,27,255,228,97,73,63,255,195,131,69,192,232,223,255,255,207,102,239,255,255,255,101,158,206,70,20,59,255,254,95,70,149,66,4,16,128,0,2,2,32,240,138,255,36,106,183,255,227,24,196,59,11,34,62,80,49,135,40,0,253,29,191,209,200,141,71,7,255,252,152,74,15,130,33,185,6,63,255,252,195,70,203,86,53,15,255,255,247,103,76,121,64,32,47,255,34,227,194,209,138,76,65,77,69,51,46,57,55,170,170,170,170,170,170,170,170,170,170,255,227,24,196,73,13,153,210,100,81,135,56,0,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170])],{type:"audio/mpeg"}),ds=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]);let us,ls,ps,hs,_s,fs,vs,ys,Es,gs,ms;!function(e){e[e.HostGrab=0]="HostGrab",e[e.OnlyHost=1]="OnlyHost",e[e.AnyoneGrab=2]="AnyoneGrab",e[e.MultipleShare=3]="MultipleShare"}(us||(us={})),function(e){e.Sharing="sharing",e.Paused="paused",e.End="ended"}(ls||(ls={})),function(e){e[e.Video_90P=0]="Video_90P",e[e.Video_180P=1]="Video_180P",e[e.Video_360P=2]="Video_360P",e[e.Video_720P=3]="Video_720P"}(ps||(ps={})),function(e){e.Active="Active",e.Inactive="Inactive"}(hs||(hs={})),function(e){e.Muted="Muted",e.Unmuted="Unmuted"}(_s||(_s={})),function(e){e.Active="Active",e.Inactive="Inactive"}(fs||(fs={})),function(e){e.Success="Success",e.Failed="Failed",e.Initial="Initial"}(vs||(vs={})),function(e){e.Started="Started",e.Stopped="Stopped",e.Failed="Failed"}(ys||(ys={})),function(e){e.Approved="Approved",e.Rejected="Rejected"}(Es||(Es={})),function(e){e.PrivilegeChange="PrivilegeChange",e.StopScreenCapture="StopScreenCapture",e.ShareFromMainSession="ShareFromMainSession"}(gs||(gs={})),function(e){e.DeviceChange="device-change",e.MediaSDKChange="media-sdk-change"}(ms||(ms={}));const Ss={[ms.DeviceChange]:[{event:"MEDIA_DEVICE_CHANGE",payload:()=>({})}],[ms.MediaSDKChange]:[{event:"AUDIO_ENCODE_SUCCESS",payload:()=>({type:"audio",action:"encode",result:"success"})},{event:"AUDIO_ENCODE_FAIL",payload:()=>({type:"audio",action:"encode",result:"fail"})},{event:"AUDIO_DECODE_SUCCESS",payload:()=>({type:"audio",action:"decode",result:"success"})},{event:"AUDIO_DECODE_FAIL",payload:()=>({type:"audio",action:"decode",result:"fail"})},{event:"VIDEO_ENCODE_SUCCESS",payload:()=>({type:"video",action:"encode",result:"success"})},{event:"VIDEO_ENCODE_FAIL",payload:()=>({type:"video",action:"encode",result:"fail"})},{event:"VIDEO_DECODE_SUCCESS",payload:()=>({type:"video",action:"decode",result:"success"})},{event:"VIDEO_DECODE_FAIL",payload:()=>({type:"video",action:"decode",result:"fail"})},{event:"SHARING_ENCODE_SUCCESS",payload:()=>({type:"share",action:"encode",result:"success"})},{event:"SHARING_ENCODE_FAIL",payload:()=>({type:"share",action:"encode",result:"fail"})},{event:"SHARING_DECODE_SUCCESS",payload:()=>({type:"share",action:"decode",result:"success"})},{event:"SHARING_DECODE_FAIL",payload:()=>({type:"share",action:"decode",result:"fail"})}]},bs={success:"VIDEO_CAPTURE_START_SUCCESS",fail:["CAN_NOT_DETECT_CAMERA","CAN_NOT_FIND_CAMERA","VIDEO_USER_FORBIDDEN_CAPTURE","VIDEO_ESTABLISH_STREAM_ERROR","VIDEO_CAMERA_IS_TAKEN"]};let Is;!function(e){e.VideoActiveChange="video-active-change",e.PeerVideoStateChange="peer-video-state-change",e.VideoSpotlightChange="video-spotlight-change",e.VideoMutedChange="video-muted-change",e.VideoCapturingChange="video-capturing-change",e.AskForStartVideoConsent="ask-for-start-video-consent",e.VideoDimensionChange="video-dimension-change",e.VideoFollowHostOrder="video-follow-host-order-change",e.VideoHostLayoutChange="video-host-layout-change"}(Is||(Is={}));const As={[Is.VideoActiveChange]:[{event:"RECEIVE_VIDEO_ACTIVE_INDICATION",payload:e=>({state:e.bVideoOn?hs.Active:hs.Inactive,userId:e.userId})}],[Is.VideoCapturingChange]:[{event:"VIDEO_CAPTURE_START_SUCCESS",payload:()=>({state:ys.Started})},{event:"VIDEO_CAPTURE_STOP_RESULT",payload:e=>({state:null!=e&&e.failed?ys.Failed:ys.Stopped})}],[Is.VideoMutedChange]:[{event:"RECEIVE_VIDEO_MUTE_INDICATION",payload:e=>({state:e.isVideoMuted?_s.Muted:_s.Unmuted,userId:e.id})}],[Is.AskForStartVideoConsent]:[{event:"ASK_FOR_START_VIDEO_CONSENT",payload:e=>({state:e.isVideoMuted?_s.Muted:_s.Unmuted,userId:e.id})}],[Is.VideoSpotlightChange]:[{event:"VIDEO_SPOTLIGHT_CHANGE",payload:e=>({spotlightList:e.spotlightList&&e.spotlightList.map(e=>({userId:e}))})}],[Is.VideoDimensionChange]:[{event:"RECEIVE_VIDEO_DIMENSION_CHANGE",payload:e=>({type:"received",width:e.width,height:e.height})}],[Is.VideoFollowHostOrder]:[{event:"VIDEO_FOLLOW_HOST_ORDER_CHANGE",payload:e=>({isFollowHostOrder:e.bOn})}],[Is.VideoHostLayoutChange]:[{event:"VIDEO_HOST_DRAG_LAYOUT_CHANGE",payload:e=>Array.isArray(e.layout)?e.layout.map(e=>({userId:e})):[]}],[Is.PeerVideoStateChange]:[{event:"VIDEO_NEW_USER_START",payload:e=>c({action:"Start"},e)},{event:"VIDEO_OLD_USER_STOP",payload:e=>c({action:"Stop"},e)}]};let Cs;!function(e){e.ActiveSpeaker="active-speaker",e.UnmuteAudioConsent="unmute-audio-consent",e.CurrentAudioChange="current-audio-change",e.DialoutStateChange="dialout-state-change",e.MergeAudio="merged-audio",e.AutoPlayFailed="auto-play-audio-failed",e.AllowTalkChange="allow-talk-change"}(Cs||(Cs={}));const Os={JoinComputerAudio:{success:"AUDIO_CURRENT_USER_JOIN_BY_VOIP",fail:["USER_FORBIDDEN_MICROPHONE","ESTABLISH_AUDIO_STREAM_ERROR"]},LeaveComputerAudio:{success:"AUDIO_CURRENT_USER_LEAVE_AUDIO"},JoinAudioByCallMe:{success:"AUDIO_DIALOUT_RESULT_SUCCESS",fail:["DIALOUT_FAIL"]},cancelDialOut:{success:"AUDIO_DIALOUT_CANCEL_SUCCESS",fail:["DIALOUT_CANCEL_FAIL"]},hangup:{success:"AUDIO_CURRENT_USER_LEAVE_AUDIO"}},Ts={[Cs.ActiveSpeaker]:[{event:"AUDIO_ACTIVE_SPEAKER",payload:e=>e}],[Cs.UnmuteAudioConsent]:[{event:"AUDIO_UNMUTE_CONSENT",payload:e=>({reason:e})}],[Cs.CurrentAudioChange]:[{event:"AUDIO_CURRENT_USER_JOIN_BY_PHONE",payload:()=>({action:ss.Join,type:"phone"})},{event:"AUDIO_CURRENT_USER_JOIN_BY_VOIP",payload:()=>({action:ss.Join,type:"computer"})},{event:"AUDIO_CURRENT_USER_LEAVE_AUDIO",payload:()=>({action:ss.Leave})},{event:"AUDIO_CURRENT_USER_MUTED",payload:e=>{let{source:t}=e;return{action:ss.Muted,source:t}}},{event:"AUDIO_CURRENT_USER_UNMUTED",payload:e=>{let{source:t}=e;return{action:ss.Unmuted,source:t}}}],[Cs.DialoutStateChange]:[{event:"AUDIO_DIALOUT_RESULT_CODE",payload:e=>e}],[Cs.MergeAudio]:[{event:"AUDIO_MERGE_AUDIO_INDICATION",payload:e=>e}],[Cs.AutoPlayFailed]:[{event:"AUDIO_AUTO_PLAY_FAILED",payload:()=>{}}],[Cs.AllowTalkChange]:[{event:"AUDIO_ALLOW_TALK_CHANGE",payload:e=>({enabled:e})}]};let Rs;!function(e){e.ShareActiveChange="active-share-change",e.ShareDimensionChange="share-content-dimension-change",e.SharePassiveStop="passively-stop-share",e.SharePeerStateChange="peer-share-state-change",e.ShareContentChange="share-content-change",e.SharePrivilegeChange="share-privilege-change",e.RemoteControlApprovedChange="remote-control-approved-change",e.RemoteControlInControlChange="remote-control-in-control-change",e.RemoteControlClipboardChange="remote-control-clipboard-change"}(Rs||(Rs={}));const ws={[Rs.ShareActiveChange]:[{event:"SHARE_ACTIVE_INDICATION",payload:e=>{const{isActive:t,activeUserId:r}=e;return c({state:t?"Active":"Inactive",userId:r},u(e,["isActive","activeUserId"]))}}],[Rs.ShareDimensionChange]:[{event:"SHARE_DIMENSION_CHANGE",payload:e=>({type:"sended",width:e.width,height:e.height})},{event:"SHARE_RECEIVED_DIMENSION_CHANGE",payload:e=>({type:"received",width:e.width,height:e.height})}],[Rs.SharePassiveStop]:[{event:"SHARE_VIDEO_STREAMS_END",payload:()=>({reason:gs.StopScreenCapture})},{event:"SHARE_PASSIVE_STOP_SHARE",payload:()=>({reason:gs.PrivilegeChange})},{event:"SHARE_PASSIVE_BO_STOP",payload:()=>({reason:gs.ShareFromMainSession})}],[Rs.SharePeerStateChange]:[{event:"SHARE_NEW_USER_ADD",payload:e=>({userId:e.id,action:"Start"})},{event:"SHARE_USER_REMOVE",payload:e=>({userId:e.id,action:"Stop"})}],[Rs.ShareContentChange]:[{event:"SHARE_AUTO_CHANGE_SOURCE",payload:e=>e}],[Rs.RemoteControlApprovedChange]:[{event:"SHARE_REMOTE_CONTROL_APPROVE",payload:e=>({state:e?Es.Approved:Es.Rejected})}],[Rs.RemoteControlInControlChange]:[{event:"SHARE_GRAB_REMOTE_CONTROL_CHANGE",payload:e=>({isControlling:e})}],[Rs.RemoteControlClipboardChange]:[{event:"SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",payload:e=>e}],[Rs.SharePrivilegeChange]:[{event:"SHARE_PRIVILEGE_CHANGE",payload:e=>({privilege:e})}]},Ns="INVALID_OPERATION",Ds="INVALID_PARAMETERS";let Ms;!function(e){e.InviteToJoin="invite-to-join",e.RoomCountdown="room-countdown",e.RoomTimeUp="room-time-up",e.ClosingRoomCountdown="closing-room-countdown",e.BroadcastMessage="broadcast-message",e.AskForHelp="ask-for-help",e.AskForHelpResponse="ask-for-help-response",e.RoomStateChange="room-state-change",e.MainSessionUserUpdate="main-session-user-updated"}(Ms||(Ms={}));const Ps={[Ms.InviteToJoin]:[{event:"BREAKOUT_ROOM_INVITE_TO_JOIN_NOTIFICATION",payload:e=>e}],[Ms.RoomCountdown]:[{event:"BREAKOUT_ROOM_ROOM_COUTDOWN",payload:e=>e}],[Ms.RoomTimeUp]:[{event:"BREAKOUT_ROOM_ROOM_COUNTDOWN_TIME_UP",payload:e=>e}],[Ms.ClosingRoomCountdown]:[{event:"BREAKOUT_ROOM_ROOM_CLOSING_COUNTDOWN",payload:e=>e}],[Ms.BroadcastMessage]:[{event:"BREAKOUT_ROOM_BROADCAST_MESSAGE",payload:e=>e}],[Ms.AskForHelp]:[{event:"BREAKOUT_ROOM_ASK_HELP_REQUEST",payload:e=>e}],[Ms.AskForHelpResponse]:[{event:"BREAKOUT_ROOM_ASK_HELP_RESPONSE",payload:e=>e}],[Ms.RoomStateChange]:[{event:"BREAKOUT_ROOM_ATTRIBUTE_INDICATION",payload:e=>({status:e.controlStatus})}],[Ms.MainSessionUserUpdate]:[{event:"BREAKOUT_ROOM_MAIN_SESSION_USER_UPDATE",payload:()=>({})}]},ks=c(c(c(c(c(c(c(c(c(c(c({},zi),{"closed-caption-message":[{event:"CC_RECEIVE_MESSAGE",payload:e=>e}],"closed-caption-lt-status":[{event:"LT_STATUS_CHANGE",payload:e=>e}],"closed-caption-lt-message":[{event:"LT_RECEIVE_MESSAGE",payload:e=>e}],"closed-caption-status":[{event:"CC_ASSIGN_CC_EDITOR_SUCCESS",payload:e=>e},{event:"CC_STATUS_CHANGE",payload:e=>e}]}),Yi),Qi),ts),Ts),As),{"qa-message":[{event:"QA_VOTE_EVENTS",payload:e=>e},{event:"QA_DISMISS_EVENT",payload:e=>e},{event:"QA_LIVE_ANSWER_EVENT",payload:e=>e},{event:"QA_NEW_ANSWER_EVENT",payload:e=>e},{event:"QA_NEW_QUESTION_EVENT",payload:e=>e}],"qa-setting":[{event:"QA_SETTING_SUCCESS_EVENT",payload:e=>e}]}),ws),Ss),Ps),Us=(Vs=Vs||Object.create(null),{on:function(e,t){(Vs[e]||(Vs[e]=[])).push(t)},off:function(e,t){Vs[e]&&Vs[e].splice(Vs[e].indexOf(t)>>>0,1)},emit:function(e,t){(Vs[e]||[]).slice().map((function(e){e(t)})),(Vs["*"]||[]).slice().map((function(r){r(e,t)}))}});var Vs;const Ls=new Map,js=new Array,Hs=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;Us.emit(e,t)},xs=e=>new Promise((t,r)=>{e.fail&&e.fail.length>0?it(Ye(Us,e.success).pipe(Et(1)),$e(...e.fail.map(e=>Ye(Us,e).pipe(Et(1),Fe(t=>ce({type:e,payload:t})))))).subscribe(e=>t(e),e=>{"object"==typeof e.payload?r(c({type:e.type},e.payload)):void 0===e.payload?r({type:e.type}):r(e)}):Ye(Us,e.success).pipe(Et(1)).subscribe(e=>t(e))}),Fs=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e4;return new Promise((n,o)=>{let i=ee;"string"==typeof e?i=Ye(Us,e).pipe(Et(1)):(i=Ye(Us,e.event),e.operations&&(i=e.operations.reduce((e,t)=>e.pipe(t),i))),it(i,ct(r).pipe(At(ce("timeout")))).subscribe(e=>{if(t){const r=t(e);"boolean"==typeof r?r?n(""):o({type:"INTERNAL_ERROR"}):0===r.ret?n(r.body):o({type:"INTERNAL_ERROR",reason:r.body})}else n(e)},()=>{o({type:"OPERATION_TIMEOUT"})})})},Gs=(e,t)=>void 0!==t?Ye(Us,e).pipe(Et(t)):Ye(Us,e),Bs=()=>{js.forEach(e=>{e.unsubscribe()}),js.length=0,Ls.clear()},{setAttendeesList:Ws,setXmppAttendeeList:Ks,setIsAdmitAllSilentUsers:qs,resetParticipants:zs,addFailoverAttendees:Js,removeFailoverAttendees:Ys,setClearRaiseHand:Xs,setClearAttendeeFeedback:Qs}=Ur({SET_ATTENDEES_LIST:e=>e,SET_XMPP_ATTENDEE_LIST:e=>e,RESET_PARTICIPANTS:()=>({}),SET_IS_ADMIT_ALL_SILENT_USERS:e=>e,REMOVE_FAILOVER_ATTENDEES:e=>e,ADD_FAILOVER_ATTENDEES:e=>e,SET_CLEAR_RAISE_HAND:()=>({}),SET_CLEAR_ATTENDEE_FEEDBACK:()=>({})});var Zs=function(e,t){return e===t};function $s(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var r=t.map((function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+r+"]")}return t}var ea=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n-1){var o=r[n];return n>0&&(r.splice(n,1),r.unshift(o)),o.value}return"NOT_FOUND"}return{get:n,put:function(t,o){"NOT_FOUND"===n(t)&&(r.unshift({key:t,value:o}),r.length>e&&r.pop())},getEntries:function(){return r},clear:function(){r=[]}}}(c,u);function p(){var t=l.get(arguments);if("NOT_FOUND"===t){if(t=e.apply(null,arguments),d){var r=l.getEntries(),n=r.find((function(e){return d(e.value,t)}));n&&(t=n.value)}l.put(arguments,t)}return t}return p.clearCache=function(){return l.clear()},p}));const ta=e=>{let{participants:{attendeesList:t}}=e;return t};let ra,na,oa;!function(e){e[e.Attendee=0]="Attendee",e[e.Host=1]="Host",e[e.Owner=4]="Owner",e[e.ViewOnly=8]="ViewOnly",e[e.HostOwner=5]="HostOwner",e[e.ViewOnlyCanTalk=24]="ViewOnlyCanTalk"}(ra||(ra={})),function(e){e[e.Host=10]="Host",e[e.Panelist=20]="Panelist",e[e.Attendee=30]="Attendee"}(na||(na={})),function(e){e[e.Client=9]="Client",e[e.Phone=5]="Phone",e[e.H323=15]="H323"}(oa||(oa={}));const ia=e=>(e&ra.Host)===ra.Host,sa=e=>(e&oa.Phone)===oa.Phone,aa=e=>e===ra.ViewOnlyCanTalk,ca=e=>(e&ra.ViewOnly)===ra.ViewOnly;let da,ua,la,pa,ha,_a;!function(e){e[e.Automatically=1]="Automatically",e[e.Manually=2]="Manually"}(da||(da={})),function(e){e[e.NotStarted=1]="NotStarted",e[e.InProgress=2]="InProgress",e[e.Closing=3]="Closing",e[e.Closed=4]="Closed"}(ua||(ua={})),function(e){e[e.NoToken=1]="NoToken",e[e.GotToken=2]="GotToken",e[e.Started=3]="Started",e[e.Closing=4]="Closing",e[e.Closed=5]="Closed"}(la||(la={})),function(e){e.Initial="initial",e.Invited="invited",e.Joining="joining",e.InRoom="in room",e.Leaving="leaving",e.TimeUp="time up",e.MainSession="main session"}(pa||(pa={})),function(e){e.Join="joinRequest",e.Switch="switchRequest",e.Leave="leaveRequest",e.Broadcast="messageText",e.HelpReq="helpRequest",e.HelpRes="helpResponse",e.CoHostWantJoinThisBo="wantJoinThisBO"}(ha||(ha={})),function(e){e[e.Received=0]="Received",e[e.Busy=1]="Busy",e[e.Ignore=2]="Ignore",e[e.AlreadyInRoom=3]="AlreadyInRoom"}(_a||(_a={}));const fa=ea([e=>{let{meeting:{userId:t}}=e;return t},ta],(e,t)=>t.find(t=>t.userId===e)),va=ea([fa],e=>(null==e?void 0:e.isHost)||(null==e?void 0:e.bCoHost)),ya=ea([fa],e=>null==e?void 0:e.isHost),Ea=ea([e=>{let{participants:{xmppAttendeeList:t}}=e;return t}],e=>e.filter(e=>e.userRole===na.Attendee)),ga=ea([ta],e=>e.filter(e=>e.bHold&&!e.bid)),ma=ea([ta,e=>{let{breakoutRoom:t}=e;return t&&t.controlStatus},e=>{let{breakoutRoom:t}=e;return t&&t.currentRoom.status}],(e,t,r)=>t!==ua.InProgress&&t!==ua.Closing||r!==pa.InRoom?e.filter(e=>!e.bHold&&!e.bid):e.filter(e=>!e.bHold)),Sa=ea([ma],e=>e.find(e=>e.isHost)),ba=ea([ma],e=>e.filter(e=>e.bCoHost));let Ia;!function(e){e.Closed="closed",e.Connecting="connecting",e.Connected="connected"}(Ia||(Ia={}));const{setAsnIds:Aa,setIsCanUnmute:Ca,setDialoutSequence:Oa,setDialoutResultCode:Ta,setIsAllowToTalk:Ra,setIsHostMuteAll:wa,setIsActiveOperation:Na,setAudioSsrc:Da,setIsMutedUponEntry:Ma,setIsUserGrantCaptureAudio:Pa,setIsMicrophoneForbidden:ka,setWebrtcRestartCount:Ua,setMicrophoneList:Va,setSpeakerList:La,setActiveMicrophone:ja,setActiveSpeaker:Ha,setCanPlayAudio:xa,resetAudio:Fa,setIsComputerAudioLoading:Ga,setIsSpeakerOnly:Ba,setIsAllowToTalkAttendeeConnected:Wa}=Ur("SET_ASN_IDS","SET_IS_CAN_UNMUTE","SET_DIALOUT_SEQUENCE","SET_DIALOUT_RESULT_CODE","SET_IS_ALLOW_TO_TALK","SET_IS_HOST_MUTE_ALL","SET_IS_ACTIVE_OPERATION","SET_AUDIO_SSRC","SET_IS_MUTED_UPON_ENTRY","SET_IS_USER_GRANT_CAPTURE_AUDIO","SET_IS_MICROPHONE_FORBIDDEN","SET_WEBRTC_RESTART_COUNT","SET_MICROPHONE_LIST","SET_SPEAKER_LIST","SET_ACTIVE_MICROPHONE","SET_ACTIVE_SPEAKER","SET_CAN_PLAY_AUDIO","RESET_AUDIO","SET_IS_COMPUTER_AUDIO_LOADING","SET_IS_SPEAKER_ONLY","SET_IS_ALLOW_TO_TALK_ATTENDEE_CONNECTED"),{setSharePrivilege:Ka,setShareActiveNode:qa,setIsReceiveSharing:za,setIsChromeExtensionInstalled:Ja,setIsScreenShareForbidden:Ya,setShareDimension:Xa,setShareStatus:Qa,setShareSsrc:Za,setShareQuality:$a,setReceivedShareDimension:ec,setIsRemoteControlApproved:tc,setIsGrabRemoteControl:rc,setIsVerifiedSharingRenderCanvasAfterFailover:nc,setIsVerifiedSharingCaptureCanvasAfterFailover:oc,setIsSdkGrabControl:ic,setIsReceiveSharingFromMainSession:sc,setIsSharingToBreakoutRoom:ac,resetShare:cc}=Ur("SET_SHARE_PRIVILEGE","SET_SHARE_ACTIVE_NODE","SET_IS_RECEIVE_SHARING","SET_IS_CHROME_EXTENSION_INSTALLED","SET_IS_SCREEN_SHARE_FORBIDDEN","SET_SHARE_DIMENSION","SET_SHARE_STATUS","SET_SHARE_SSRC","SET_SHARE_QUALITY","SET_RECEIVED_SHARE_DIMENSION","SET_IS_REMOTE_CONTROL_APPROVED","SET_IS_GRAB_REMOTE_CONTROL","SET_IS_VERIFIED_SHARING_RENDER_CANVAS_AFTER_FAILOVER","SET_IS_VERIFIED_SHARING_CAPTURE_CANVAS_AFTER_FAILOVER","SET_IS_SDK_GRAB_CONTROL","SET_IS_RECEIVE_SHARING_FROM_MAIN_SESSION","SET_IS_SHARING_TO_BREAKOUT_ROOM","RESET_SHARE"),{setVideoSsrc:dc,setActiveVideoId:uc,setCameraList:lc,setActiveCamera:pc,setIsCurrentUserStartedVideo:hc,setSpotlightVideo:_c,setIsCaptureForbidden:fc,setVideoMaxQuality:vc,setCaptureCanvasList:yc,setIsVideoMuted:Ec,setIsCaptureCameraLoading:gc,setIsCameraTaken:mc,setIsVerifiedVideoRenderCanvasAfterFailover:Sc,setIsVerifiedVideoCaptureCanvasAfterFailover:bc,resetVideo:Ic,setReceivedVideoDimension:Ac,addSubscribedVideoId:Cc,removeSubscribedVideoId:Oc,setIsFollowHostVideoLayout:Tc,setHostDragLayout:Rc,addRenderedVideoId:wc,removeRenderedVideoId:Nc,setIsSupportHdVideo:Dc,setHighDefinitionVideoId:Mc,setIsCanUnmuteVideo:Pc}=Ur("SET_VIDEO_SSRC","SET_ACTIVE_VIDEO_ID","SET_CAMERA_LIST","SET_ACTIVE_CAMERA","SET_IS_CURRENT_USER_STARTED_VIDEO","SET_SPOTLIGHT_VIDEO","SET_IS_CAPTURE_FORBIDDEN","SET_VIDEO_MAX_QUALITY","SET_CAPTURE_CANVAS_LIST","SET_IS_VIDEO_MUTED","SET_IS_CAPTURE_CAMERA_LOADING","SET_IS_CAMERA_TAKEN","SET_IS_VERIFIED_VIDEO_RENDER_CANVAS_AFTER_FAILOVER","SET_IS_VERIFIED_VIDEO_CAPTURE_CANVAS_AFTER_FAILOVER","RESET_VIDEO","SET_RECEIVED_VIDEO_DIMENSION","ADD_SUBSCRIBED_VIDEO_ID","REMOVE_SUBSCRIBED_VIDEO_ID","SET_IS_FOLLOW_HOST_VIDEO_LAYOUT","SET_HOST_DRAG_LAYOUT","ADD_RENDERED_VIDEO_ID","REMOVE_RENDERED_VIDEO_ID","SET_IS_SUPPORT_HD_VIDEO","SET_HIGH_DEFINITION_VIDEO_ID","SET_IS_CAN_UNMUTE_VIDEO"),{setTempSetting:kc,setSetting:Uc,setQuestionList:Vc,setQuestionUpVoted:Lc,resetQa:jc}=Ur("SET_TEMP_SETTING","SET_SETTING","SET_QUESTION_LIST","SET_QUESTION_UP_VOTED","SET_SELF_LIVE_ANSWER","RESET_QA"),{setChatPrivilege:Hc,addChatMessageHistory:xc,resetChat:Fc,setIsAllowAttendeeChat:Gc,setLatestChatMessageId:Bc,removeChatMessage:Wc}=Ur("SET_CHAT_PRIVILEGE","ADD_CHAT_MESSAGE_HISTORY","RESET_CHAT","SET_IS_ALLOW_ATTENDEE_CHAT","SET_LATEST_CHAT_MESSAGE_ID","REMOVE_CHAT_MESSAGE"),{setCcEditorInfo:Kc,setTempSendCcText:qc,setCcLtMessage:zc,setTempReceiveLtText:Jc,setTempReceiveCcText:Yc,setGatewayInfoList:Xc,setLtEnable:Qc,setIsListenClosedCaption:Zc,setCcEnable:$c,allowParticipantAskLt:ed,receiveAskStartLt:td,setMeetingEnabledLtFeature:rd,updateLtStatus:nd,deleteMessage:od,updateMessage:id,resetClosedCaption:sd}=Ur("SET_CC_EDITOR_INFO","SET_CC_LT_MESSAGE","SET_TEMP_SEND_CC_TEXT","SET_TEMP_RECEIVE_LT_TEXT","SET_TEMP_RECEIVE_CC_TEXT","SET_GATEWAY_INFO_LIST","SET_LT_ENABLE","SET_IS_LISTEN_CLOSED_CAPTION","SET_CC_ENABLE","ALLOW_PARTICIPANT_ASK_LT","RECEIVE_ASK_START_LT","SET_MEETING_ENABLED_LT_FEATURE","UPDATE_LT_STATUS","DELETE_MESSAGE","UPDATE_MESSAGE","RESET_CLOSED_CAPTION"),{addBreakoutRooms:ad,setBreakoutRoomAllocationPattern:cd,setBreakoutRoomSequenceId:dd,setMeetingElapsedTime:ud,setStartRoomElapsedTime:ld,setBreakoutRoomOptions:pd,setBreakoutRoomControlStatus:hd,setBreakoutRooms:_d,setCurrentBreakoutRoom:fd,setBreakoutRoomAttendeeStatus:vd,setBreakoutRoomConfId:yd,setBreakoutRoomToken:Ed,resetBreakoutRoom:gd,setBreakoutRoomClosingRoomTime:md,setBreakoutRoomBroadcastMessage:Sd,setBreakoutRoomHostReplyType:bd,setBreakoutRoomHostReplyRequestId:Id,setMainSessionAttendeeList:Ad,setIsHugeBreakoutRoom:Cd,setBreakoutRoomUpdatedUserRoleCount:Od,setBreakoutRoomPreAssignedRoomList:Td}=Ur("ADD_BREAKOUT_ROOMS","SET_BREAKOUT_ROOM_ALLOCATION_PATTERN","SET_BREAKOUT_ROOM_SEQUENCE_ID","SET_MEETING_ELAPSED_TIME","SET_START_ROOM_ELAPSED_TIME","SET_BREAKOUT_ROOM_OPTIONS","SET_BREAKOUT_ROOM_CONTROL_STATUS","SET_BREAKOUT_ROOMS","SET_CURRENT_BREAKOUT_ROOM","SET_BREAKOUT_ROOM_ATTENDEE_STATUS","SET_BREAKOUT_ROOM_CONF_ID","SET_BREAKOUT_ROOM_TOKEN","RESET_BREAKOUT_ROOM","SET_BREAKOUT_ROOM_CLOSING_ROOM_TIME","SET_BREAKOUT_ROOM_BROADCAST_MESSAGE","SET_BREAKOUT_ROOM_HOST_REPLY_TYPE","SET_BREAKOUT_ROOM_HOST_REPLY_REQUEST_ID","SET_MAIN_SESSION_ATTENDEE_LIST","SET_IS_HUGE_BREAKOUT_ROOM","SET_BREAKOUT_ROOM_UPDATED_USER_ROLE_COUNT","SET_BREAKOUT_ROOM_PRE_ASSIGNED_ROOM_LIST"),Rd=(e,t,r,n,o,i)=>{const s={ts:n,auth:o,rwcToken:r,dmz:1};return i&&Object.assign(s,{confID:i}),"https://".concat(e,"/wc/ping/").concat(t,"?").concat(new URLSearchParams(s).toString())},wd=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{socket:{zoomSocketStatus:r,xmppSocketStatus:n,mainSessionSocketStatus:o},meeting:{meetingStatus:i}}=e,s=[Go("closed")];if("joined"===i){const t=Wi.getInstance(),r=Ui.createAgent();if(t.disconnect(),t.destroy(),e.video&&e.video.subscribedVideoList.length>0&&e.video.subscribedVideoList.forEach(e=>{r.unsubscribeVideo(e)}),e.share&&e.share.isReceiveSharing){const t=e.share.activeNodeId;e.share.isRemoteControlApproved&&r.sharingRequestRemoteControl(t,!1),r.unsubscribeSharing(t)}}if(t||(ii.clearSession(),sessionStorage.clear(),Ii.destroy()),r!==Ia.Closed&&s.push(Wr()),n!==Ia.Closed&&s.push(Kr()),o!==Ia.Closed&&s.push(Qr()),t){const t=fa(e);s.push(ko({audio:null==t?void 0:t.audio,muted:null==t?void 0:t.muted,video:null==t?void 0:t.bVideoOn}))}else s.push(ko({audio:!1,muted:void 0,video:!1}));return s.push(un(),Sn(),zs(),Fa(),cc(),Ic(),jc(),Fc(),sd(),gd()),s},Nd=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;nt.find(t=>t.userId===e)),tt(e=>!!e),Et(1)]},...r)};function Dd(e){return H(Te((t,r)=>e(t,r)),tt(e=>null!=e))}function Md(e){return H(Fe((t,r)=>e(t,r)||ee))}function Pd(e){return H(Dt((t,r)=>e(t,r)||ee))}const kd=(e,t)=>{const r=performance.now();let n=0,o=!1;return setTimeout((function i(){n+=t,e();const s=performance.now()-r-n,a=setTimeout(i,Math.max(t-s,0));o&&clearTimeout(a)}),t),()=>{o=!0}},Ud={period:500,rules:[{peak:50,throttle:300},{peak:60,throttle:400}]},Vd={["".concat(Ci)]:()=>({payloads:{add:[],update:[],remove:[]},onThrottle(e){e.add&&this.payloads.add.push(...e.add),e.update&&this.payloads.update.push(...e.update),e.remove&&this.payloads.remove.push(...e.remove)}})};function Ld(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ud;return t=>new F(r=>{const n=new Map;let o=0,i=null;const{period:s,rules:a}=e;let c=null;i||(i=kd(()=>{o=0},s));const d=Object.keys(Vd),u=t.subscribe({next(e){if(e&&e.evt&&null!==i){o+=1;const{evt:t,body:i}=e,s=String(t);if(d.indexOf(s)>=0)if(c){const e=n.get(s);if(e)e.onThrottle(i);else{const e=Vd[s]();e.onThrottle(i),n.set(s,e)}}else{let t=0;if(a.forEach(e=>{o>e.peak&&(t=e.throttle)}),t>0){const e=Vd[s]();e.onThrottle(i),n.set(s,e),c=setTimeout(()=>{n.forEach((e,t)=>{const n={evt:Number(t),body:e.payloads};r.next(n)}),n.clear(),c=null},t)}else r.next(e)}else r.next(e)}else r.next(e)},error(e){r.error(e)},complete(){r.complete()}});return()=>{u.unsubscribe(),i&&(i(),i=null),o=0}})}ea([ma,e=>{let{share:{isReceiveSharing:t}}=e;return t},e=>{let{share:{activeNodeId:t}}=e;return t}],(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;return t?e.find(e=>e.userId===r&&!0===e.sharerOn):null}));const jd=ea([ma],e=>e.filter(e=>e.sharerOn||e.sharerPause)),Hd=(e,t,r)=>ze(...[t,r].map((t,r)=>{if("initial"!==t)return Le(Promise.resolve("success"===t));{const t=0===r?"ENCODE":"DECODE";return it(Gs("".concat(e.toUpperCase(),"_").concat(t,"_SUCCESS"),1).pipe(St(!0)),Gs("".concat(e.toUpperCase(),"_").concat(t,"_FAIL"),1).pipe(St(!1)))}})),xd=e=>{const t=fa(e.value);return t?ae(t):Gs("ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",1).pipe(le(me),Ht(e),Te(e=>{let[,t]=e;return fa(t)}))},Fd=()=>Le(navigator.mediaDevices.enumerateDevices()).pipe(Te(e=>{const t=[],r=[],n=[];return e.forEach(e=>{const{kind:o,deviceId:i,label:s}=e;switch(o){case"audioinput":"communications"===i||/ZoomAudioDevice/i.test(s)||/Zoom-\S*/.test(s)||/CubebAggregateDevice\S*/.test(s)||t.push({deviceId:i,label:s});break;case"audiooutput":"communications"===i||/ZoomAudioDevice/i.test(s)||r.push({deviceId:i,label:s});break;case"videoinput":n.push({deviceId:i,label:s})}}),{microphones:t,speakers:r,cameras:n}}));function Gd(e){if(e){let r=e;try{const t=e.width;e.width=t}catch(n){var t;r=e.cloneNode(!0),null===(t=e.parentNode)||void 0===t||t.replaceChild(r,e)}return r}return e}const Bd=Ui.createAgent();var Wd=Object.freeze({__proto__:null,sharePrivilegeChangeEpic:(e,t)=>Cn(e,Oi).pipe(tt(e=>{var t;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.lockShare)}),Ht(t),kt(e=>{let[t,r]=e;const{share:{sharePrivilege:n}}=r,{payload:{body:{lockShare:o}}}=t;n!==o&&Hs("SHARE_PRIVILEGE_CHANGE",o)}),Te(e=>{let[t]=e;return Ka(t.payload.body.lockShare)})),shareSSrcEpic:e=>Cn(e,20227).pipe(Te(e=>Za(e.payload.body.ssrc))),shareStatusChangeEpic:(e,t)=>Cn(e,20225).pipe(Ht(t),tt(e=>{let[t,r]=e;const{payload:{body:n}}=t,{share:{isReceiveSharingFromMainSession:o}}=r;return!o||o&&n.fromMainSession}),Te(e=>{let[t,r]=e;const{share:{isReceiveSharing:n,activeNodeId:o,shareQuality:i,isReceiveSharingFromMainSession:s},breakoutRoom:a}=r,{payload:{body:c}}=t;if(n&&1===c.bStatus){let e=!1;(null==a?void 0:a.currentRoom.status)===pa.InRoom&&a.mainSessionAttendeeList.length>0&&(e=a.mainSessionAttendeeList.findIndex(e=>e.userId===o)>-1),Bd.unsubscribeSharing(o,e),Bd.subscribeSharing(c.activeNodeID,i,s),Wi.getInstance().switchSharingSource(c.ssrc,s),Hs("SHARE_AUTO_CHANGE_SOURCE",{userId:c.activeNodeID})}else if(1===c.bStatus){const e={activeUserId:c.activeNodeID,isActive:!0};s&&Object.assign(e,{isFromMainSession:!0}),Hs("SHARE_ACTIVE_INDICATION",e)}else if(n){const e={activeUserId:c.activeNodeID,isActive:!1};s&&Object.assign(e,{isFromMainSession:!0}),Hs("SHARE_ACTIVE_INDICATION",e)}return qa(c)})),handleChromeExtensionEpic:e=>wn(e,rs.CheckChromeSharingExtensionResponse).pipe(Te(e=>(Hs("SHARE_CHECK_CHROME_SHARING_EXTENSION",e.payload.data),Ja(e.payload.data)))),handleSDKShareSuccessEpic:(e,t)=>wn(e,rs.DesktopSharingCaptureSuccess).pipe(Ht(t),Te(e=>{let[,t]=e;const{meeting:{userId:r},share:{isSharingToBreakoutRoom:n}}=t;return Bd.startSharing(r,{bShareToBO:n}),Ya(!1)})),handleSDKShareErrorEpic:e=>wn(e,[rs.DesktopSharingError,rs.DesktopSharingChromeExtensionUninstalled,rs.DesktopSharingPermissionDenied,rs.DesktopSharingSystemError]).pipe(Fe(e=>{const t=[];let r="";return[rs.DesktopSharingPermissionDenied,rs.DesktopSharingSystemError].includes(e.payload.type)&&(t.push(Ya(!0)),e.payload.type===rs.DesktopSharingSystemError?/mac/i.test(navigator.platform)&&(r="To use screen share on Chrome, please allow screen recording access in system setting."):r="To use screen share, please allow the permission request."),Hs("SHARE_START_DESKTOP_SHARE_FAILED",{reason:r}),Le(t)})),handleSDKShareDimensionChangeEpic:e=>wn(e,rs.CurrentDesktopSharingWidthHeight).pipe(tt(e=>!!e.payload.data),Te(e=>{Hs("SHARE_DIMENSION_CHANGE",e.payload.data);const{payload:{data:{width:t,height:r}}}=e;return Wi.getInstance().ajustmentSharingCanvas(t,r),Xa(e.payload.data)})),handleSDKReceivedShareSizeChangeEpic:(e,t)=>wn(e,rs.SharingDecodeMaxSize).pipe(tt(e=>!!e.payload.data),Ht(t),Dd(e=>{let[t,r]=e;const{share:{shareQuality:n,activeNodeId:o,isReceiveSharingFromMainSession:i}}=r,{payload:{data:{size:s}}}=t,a=Number(s);if(n!==a)return Bd.subscribeSharing(o,a,i),$a(a)})),handleRWGShareOriginalDimensionEpic:e=>Cn(e,20226).pipe(kt(e=>{var t,r;if(Hs("SHARE_RECEIVED_DIMENSION_CHANGE",null===(t=e.payload)||void 0===t?void 0:t.body),null!==(r=e.payload)&&void 0!==r&&r.body){const{payload:{body:{width:t,height:r}}}=e;Wi.getInstance().ajustmentReceivedSharingCanvas(t,r)}}),Te(e=>ec(e.payload.body))),handleSDKShareOriginalDimensionEpic:e=>wn(e,rs.SharingPara).pipe(kt(e=>{var t,r;if(Hs("SHARE_RECEIVED_DIMENSION_CHANGE",null===(t=e.payload.data)||void 0===t?void 0:t.body),null!==(r=e.payload.data)&&void 0!==r&&r.body){const{payload:{data:{body:{width:t,height:r}}}}=e;Wi.getInstance().ajustmentReceivedSharingCanvas(t,r)}}),Te(e=>{var t;return ec(null===(t=e.payload.data)||void 0===t?void 0:t.body)})),handleSDKStopShareEpic:(e,t)=>wn(e,rs.UserStopDesktopSharing).pipe(Ht(t),Te(e=>{let[,t]=e;const{meeting:{userId:r},share:{status:n}}=t;return n!==ls.End&&(Bd.stopSharing(r),Hs("SHARE_VIDEO_STREAMS_END")),Qa(ls.End)})),handleRWGCurrentUserShareChangeEpic:(e,t)=>Cn(e,Ci).pipe(Ht(t),tt(e=>{let[t,r]=e;const{meeting:{userId:n}}=r,o=t.payload.body.update;return o&&o.length>0&&o.findIndex(e=>e.id===n&&void 0!==e.bShareOn)>-1}),Fe(e=>{let[t,r]=e;const{meeting:{userId:n},share:{status:o,isReceiveSharing:i,activeNodeId:s}}=r,{payload:{body:{update:a}}}=t,c=a.find(e=>e.id===n&&!1===e.bShareOn),d=a.find(e=>e.id===n&&!0===e.bShareOn),u=[],l=Wi.getInstance();return c&&o!==ls.End&&(Bd.stopSharing(n),l.stopDesktopSharing(),u.push(Qa(ls.End)),Hs("SHARE_PASSIVE_STOP_SHARE")),d&&o===ls.End&&(i&&(l.stopRenderSharing(),Bd.unsubscribeSharing(s),u.push(za(!1))),u.push(Qa(ls.Sharing))),Le(u)})),handleMultipleShareChangeEpic:(e,t)=>Cn(e,Ci).pipe(Ht(t),tt(e=>{let[t,r]=e;const{meeting:{userId:n}}=r,o=t.payload.body.update;return o&&o.length>0&&o.findIndex(e=>e.id!==n&&void 0!==e.bShareOn)>-1}),Fe(t=>{let[r,n]=t;const{payload:{body:{update:o}}}=r,{share:{activeNodeId:i,isReceiveSharing:s,shareQuality:a,isReceiveSharingFromMainSession:c}}=n,d=jd(n),u=o.filter(e=>!0===e.bShareOn&&!1===e.bSharePause),l=o.filter(e=>!1===e.bShareOn);return u.length>0&&u.forEach(e=>{-1===d.findIndex(t=>t.userId===e.id)&&Hs("SHARE_NEW_USER_ADD",e)}),l.length>0&&(l.forEach(e=>{Hs("SHARE_USER_REMOVE",e)}),s&&l.some(e=>e.id===i))?it(Cn(e,20225).pipe(Et(1),At(ee)),ct(50).pipe(At(ce("timeout")))).pipe(ut(()=>{const e=d.filter(e=>e.userId!==i);if(e.length>0){const t=e[0],{userId:r}=t;return Bd.unsubscribeSharing(i,c),Bd.subscribeSharing(r,a,c),Wi.getInstance().switchSharingSource(r,c),Hs("SHARE_AUTO_CHANGE_SOURCE",{userId:r}),ae(qa({activeNodeID:r,bStatus:1,ssrc:r}))}return ee})):ee})),handleSharingEncryptIndication:(e,t)=>Cn(e,Ai).pipe(Ht(t),Dt(e=>{let[r,n]=e;const{payload:{body:{encryptKey:o,additionalType:i}}}=r,{media:{sharingDecodeStatus:s,sharingEncodeStatus:a},meeting:{confId:c,userId:d,zoomId:u,meetingId:l,meetingNumber:p,isWebinar:h}}=n;return xd(t).pipe(Dt(e=>{let r=a;return h&&e&&ca(e.userRole)&&(r="failed"),Hd("sharing",r,s).pipe(kt(e=>{let[r,n]=e;const s=Wi.getInstance(),a={userId:d,sn:fo(u),confId:c,encryptKey:fo(o),encryptType:i,meetingId:l,meetingNumber:p};if(r&&(null==s||s.updateMediaParams({iVType:fi.SHARING_ENCODE,isFromMainSession:!1,updateParams:a})),n){s.updateMediaParams({iVType:fi.SHARING_DECODE,isFromMainSession:!1,updateParams:a});const{participants:{attendeesList:e}}=t.value;if(e.length>0){const t=e.map(e=>({userid:e.userId,sn:e.zoomID&&fo(e.zoomID)}));s.updateUserMediaSN({added:t,isFromMainSession:!1,iVType:fi.SHARING_DECODE})}}}),At(ee))}))})),handleSharingReceivingChannelReadyEpic:(e,t)=>Rn(e,20235).pipe(Ht(t),kt(e=>{let[t,r]=e;const{media:{sharingDecodeStatus:n}}=r,{type:o,payload:{body:i}}=t,s=o==="".concat(en);Hd("sharing","success",n).subscribe(e=>{let[,t]=e;t&&Wi.getInstance().addReceivedSharingChannelType(c({isFromMainSession:s},i))})}),At(ee)),handleSharingReceivingChannelCloseEpic:(e,t)=>Rn(e,20236).pipe(Ht(t),kt(e=>{let[t,r]=e;const{media:{sharingDecodeStatus:n}}=r,{type:o,payload:{body:{ssrc:i}}}=t,s=o==="".concat(en);Hd("sharing","success",n).subscribe(e=>{let[,t]=e;t&&Wi.getInstance().removeReceivedSharingChannelType({isFromMainSession:s,ssrc:i})})}),At(ee))});function Kd(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n3?t.i-4:t.i:Array.isArray(e)?1:Zd(e)?2:$d(e)?3:0}function Xd(e,t){return 2===Yd(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Qd(e,t,r){var n=Yd(e);2===n?e.set(t,r):3===n?(e.delete(t),e.add(r)):e[t]=r}function Zd(e){return Cu&&e instanceof Map}function $d(e){return Ou&&e instanceof Set}function eu(e){return e.o||e.t}function tu(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Pu(e);delete t[Nu];for(var r=Mu(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=nu),Object.freeze(e),t&&Jd(e,(function(e,t){return ru(t,!0)}),!0)),e}function nu(){Kd(2)}function ou(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function iu(e){var t=ku[e];return t||Kd(18,e),t}function su(){return Iu}function au(e,t){t&&(iu("Patches"),e.u=[],e.s=[],e.v=t)}function cu(e){du(e),e.p.forEach(lu),e.p=null}function du(e){e===Iu&&(Iu=e.l)}function uu(e){return Iu={p:[],l:Iu,h:e,m:!0,_:0}}function lu(e){var t=e[Nu];0===t.i||1===t.i?t.j():t.O=!0}function pu(e,t){t._=t.p.length;var r=t.p[0],n=void 0!==e&&e!==r;return t.h.g||iu("ES5").S(t,e,n),n?(r[Nu].P&&(cu(t),Kd(4)),zd(e)&&(e=hu(t,e),t.l||fu(t,e)),t.u&&iu("Patches").M(r[Nu],e,t.u,t.s)):e=hu(t,r,[]),cu(t),t.u&&t.v(t.u,t.s),e!==Ru?e:void 0}function hu(e,t,r){if(ou(t))return t;var n=t[Nu];if(!n)return Jd(t,(function(o,i){return _u(e,n,t,o,i,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return fu(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var o=4===n.i||5===n.i?n.o=tu(n.k):n.o;Jd(3===n.i?new Set(o):o,(function(t,i){return _u(e,n,o,t,i,r)})),fu(e,o,!1),r&&e.u&&iu("Patches").R(n,r,e.u,e.s)}return n.o}function _u(e,t,r,n,o,i){if(qd(o)){var s=hu(e,o,i&&t&&3!==t.i&&!Xd(t.D,n)?i.concat(n):void 0);if(Qd(r,n,s),!qd(s))return;e.m=!1}if(zd(o)&&!ou(o)){if(!e.h.F&&e._<1)return;hu(e,o),t&&t.A.l||fu(e,o)}}function fu(e,t,r){void 0===r&&(r=!1),e.h.F&&e.m&&ru(t,r)}function vu(e,t){var r=e[Nu];return(r?eu(r):e)[t]}function yu(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function Eu(e){e.P||(e.P=!0,e.l&&Eu(e.l))}function gu(e){e.o||(e.o=tu(e.t))}function mu(e,t,r){var n=Zd(t)?iu("MapSet").N(t,r):$d(t)?iu("MapSet").T(t,r):e.g?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:su(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=n,i=Uu;r&&(o=[n],i=Vu);var s=Proxy.revocable(o,i),a=s.revoke,c=s.proxy;return n.k=c,n.j=a,c}(t,r):iu("ES5").J(t,r);return(r?r.A:su()).p.push(n),n}function Su(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return tu(e)}var bu,Iu,Au="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Cu="undefined"!=typeof Map,Ou="undefined"!=typeof Set,Tu="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Ru=Au?Symbol.for("immer-nothing"):((bu={})["immer-nothing"]=!0,bu),wu=Au?Symbol.for("immer-draftable"):"__$immer_draftable",Nu=Au?Symbol.for("immer-state"):"__$immer_state",Du=""+Object.prototype.constructor,Mu="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Pu=Object.getOwnPropertyDescriptors||function(e){var t={};return Mu(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},ku={},Uu={get:function(e,t){if(t===Nu)return e;var r=eu(e);if(!Xd(r,t))return function(e,t,r){var n,o=yu(t,r);return o?"value"in o?o.value:null===(n=o.get)||void 0===n?void 0:n.call(e.k):void 0}(e,r,t);var n=r[t];return e.I||!zd(n)?n:n===vu(e.t,t)?(gu(e),e.o[t]=mu(e.A.h,n,e)):n},has:function(e,t){return t in eu(e)},ownKeys:function(e){return Reflect.ownKeys(eu(e))},set:function(e,t,r){var n=yu(eu(e),t);if(null==n?void 0:n.set)return n.set.call(e.k,r),!0;if(!e.P){var o=vu(eu(e),t),i=null==o?void 0:o[Nu];if(i&&i.t===r)return e.o[t]=r,e.D[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(r,o)&&(void 0!==r||Xd(e.t,t)))return!0;gu(e),Eu(e)}return e.o[t]===r&&"number"!=typeof r&&(void 0!==r||t in e.o)||(e.o[t]=r,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==vu(e.t,t)||t in e.t?(e.D[t]=!1,gu(e),Eu(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=eu(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty:function(){Kd(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Kd(12)}},Vu={};Jd(Uu,(function(e,t){Vu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Vu.deleteProperty=function(e,t){return Uu.deleteProperty.call(this,e[0],t)},Vu.set=function(e,t,r){return Uu.set.call(this,e[0],t,r,e[0])};var Lu=new(function(){function e(e){var t=this;this.g=Tu,this.F=!0,this.produce=function(e,r,n){if("function"==typeof e&&"function"!=typeof r){var o=r;r=e;var i=t;return function(e){var t=this;void 0===e&&(e=o);for(var n=arguments.length,s=Array(n>1?n-1:0),a=1;a1?n-1:0),i=1;i=0;r--){var n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));var o=iu("Patches").$;return qd(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}()),ju=Lu.produce;Lu.produceWithPatches.bind(Lu),Lu.setAutoFreeze.bind(Lu),Lu.setUseProxies.bind(Lu),Lu.applyPatches.bind(Lu),Lu.createDraft.bind(Lu),Lu.finishDraft.bind(Lu);const Hu={ssrc:0,status:ls.End,shareDimension:{width:0,height:0},receivedShareDimension:{width:1920,height:1080,logicWidth:1920,logicHeight:1080},sharePrivilege:us.OnlyHost,activeNodeId:0,activeSsrc:0,shareQuality:1,isRemoteSharingActive:!1,isReceiveSharing:!1,isRemoteControlApproved:!1,isGrabRemoteControl:!1,isSDKGrabControl:!1,isChromeExtensionInstalled:!1,isScreenShareForbidden:!1,isReceiveSharingFromMainSession:!1,isSharingToBreakoutRoom:!1},xu=Fr({["".concat(Ka)]:ju((e,t)=>{let{payload:r}=t;e.sharePrivilege=r}),["".concat(qa)]:ju((e,t)=>{let{payload:r}=t;e.isRemoteSharingActive=1===r.bStatus,e.activeNodeId=r.activeNodeID,e.activeSsrc=r.ssrc}),["".concat(za)]:ju((e,t)=>{let{payload:r}=t;e.isReceiveSharing=r}),["".concat(Ja)]:ju((e,t)=>{let{payload:r}=t;e.isChromeExtensionInstalled=r}),["".concat(Xa)]:ju((e,t)=>{let{payload:r}=t;e.shareDimension=c({},r)}),["".concat(Qa)]:ju((e,t)=>{let{payload:r}=t;e.status=r}),["".concat(Za)]:ju((e,t)=>{let{payload:r}=t;e.ssrc=r}),["".concat($a)]:ju((e,t)=>{let{payload:r}=t;e.shareQuality=r}),["".concat(ec)]:ju((e,t)=>{let{payload:r}=t;e.receivedShareDimension=c({},r)}),["".concat(tc)]:ju((e,t)=>{let{payload:r}=t;e.isRemoteControlApproved=r}),["".concat(rc)]:ju((e,t)=>{let{payload:r}=t;e.isGrabRemoteControl=r}),["".concat(nc)]:ju((e,t)=>{let{payload:r}=t;e.isVerifiedRenderCanvasAfterFailover=r}),["".concat(oc)]:ju((e,t)=>{let{payload:r}=t;e.isVerifiedCaptureCanvasAfterFailover=r}),["".concat(ic)]:ju((e,t)=>{let{payload:r}=t;e.isSDKGrabControl=r}),["".concat(sc)]:ju((e,t)=>{let{payload:r}=t;e.isReceiveSharingFromMainSession=r}),["".concat(ac)]:ju((e,t)=>{let{payload:r}=t;e.isSharingToBreakoutRoom=r}),["".concat(cc)]:()=>c(c({},Hu),{},{isVerifiedRenderCanvasAfterFailover:!1,isVerifiedCaptureCanvasAfterFailover:!1})},Hu),Fu=An(Wd),Gu=Ui.createAgent(),Bu=(e,t)=>e.pipe(Kt("".concat(So)),Ht(t),tt(e=>{let[,t]=e;return void 0!==t.meeting.encryptedRWC}),Pd(e=>{let[,t]=e;const{meeting:{encryptedRWC:r,ts:n,auth:o,meetingNumber:i},breakoutRoom:s}=t;if(r)return Le(Object.keys(r).map(e=>{const t=r[e];let a=void 0;return a=s&&s.currentRoom.boConfId?Rd(e,i,t,n,o,s.currentRoom.boConfId):Rd(e,i,t,n,o),{url:a,domain:e,rwcToken:t}})).pipe(Fe(e=>zn(e.url).pipe(Fe(t=>{let r={};return r=t.response?c(c({},t.response),{},{fromNginx:!1}):{rwg:e.domain,rwcToken:e.rwcToken,fromNginx:!0},Le([nn(r),Gr()])}),ut(()=>ee))),Tt(Do(performance.now())))}));var Wu=Object.freeze({__proto__:null,pingRWCEpic:Bu,joinMeetingWelcomeEpic:e=>Cn(e,0).pipe(kt(e=>{var t;if("READY"===(null===(t=e.payload.body)||void 0===t?void 0:t.status)){const e=ii.get(Ei.WebclientMeetingToken);e&&Gu.joinMeeting(e)}}),At(ee)),joinMeetingSuccessfulEpic:(e,t)=>Cn(e,4098).pipe(Ht(t),Pd(e=>{let[t,r]=e;const{payload:{body:{res:n,userID:o,zoomID:i,mn:s,participantID:a,hugeBO:c,elapsed:d,disableAqos:u,disableVqos:l,meetingtoken:p,role:h}}}=t,{meeting:{pingRWCTimestamp:_,isWebinar:f,userEmail:v,userName:y,isMeetingReset:E,meetingOptions:g,xmppConfig:m,zlkJwtToken:S,cv:b},media:{mediaConstraints:I,assetsPath:A},breakoutRoom:C}=r;if(Xn.CONF_SUCCESS===n){const{WebclientParticipantId:e,WebclientUserId:r,WebclientZoomId:n,WebclientUserEmail:O,WebclientUserName:T,WebclientMeetingToken:R}=Ei;ii.set(r,o,ni.SessionStorage),ii.set(n,i,ni.SessionStorage),ii.set(e,a,ni.SessionStorage),v&&ii.set(O,v,ni.SessionStorage),ii.set(T,y,ni.SessionStorage),p&&ii.set(R,p,ni.SessionStorage),Gu.sendRWGConnectionPerformance("WCL_M, JMCT(".concat(performance.now()-_,")"));const w=[Mo(t.payload.body),Ko(performance.now())];Wi.getInstance().init(),E&&(w.push(jo(!1)),void 0!==I&&void 0!==A&&w.push(ln())),f&&w.push(Br()),m&&S&&w.push(Zr()),C&&(g&&!0===g.isBO100Enabled&&w.push(Cd(c)),C.currentRoom.boConfId&&w.push(Xr()),void 0!==d&&w.push(ud(d)));let N=!l;const D=!u;return S&&((e,t)=>{const r=e.split(".").map(e=>Number(e)).slice(0,3),n="1.3.0".split(".").map(e=>Number(e)).slice(0,3);let o=0;for(let e=0;e<3;e++){const t=ei){o=1;break}}return o})(b)<0&&(N=!1),w.unshift(qo({audioQos:D,videoQos:N})),(h&ra.Owner)===ra.Owner&&(Hs("JOIN_MEETING_FAILED",{reason:"dont support assisnt join through widget",errorCode:-1}),Gu.leaveMeeting()),Hs("JOIN_MEETING_SUCCESS",{meetingNumber:s}),Le(w)}return Xn.CONF_FAIL_CONFLOCKED===n?Hs("JOIN_MEETING_FAILED",ao(n)):Xn.CONF_FAIL_CONF_USER_FULL===n?Hs("JOIN_MEETING_FAILED",Object.assign({},ao(n),{lmUrl:t.payload.body.lmURL})):(Xn.CONF_FAIL_MEETING_OVER===n||Xn.CONF_RESULT_MMR_IB_REJECT===n||Xn.CONF_FAIL_RESULT_MMR_CONF_PARTICIPANT_EXISTS===n||[Xn.CONF_FAIL_HAS_BEEN_REMOVED,Xn.CONF_FAIL_WEBINAR_DENIED_EMAIL].includes(n),Hs("JOIN_MEETING_FAILED",ao(n))),Le(wd(r,!1))})),handleMeetingAttributeChangeEpic:(e,t)=>Cn(e,Oi).pipe(Ht(t),Te(e=>{let[t,r]=e;const{payload:{body:n}}=t,{meeting:{zoomId:o,encType:i}}=r;if(void 0!==(null==n?void 0:n.encryptKey)&&Ii.init(o,n.encryptKey,i),void 0!==(null==n?void 0:n.gatewayKey)){const e=Wi.getInstance(),[,t,r]=n.gatewayKey.split(".");e.sendUserNodeList([{userid:Number(t),sn:r&&fo(r)}])}return Hs("UPDATE_MEETING_ATTRIBUTE",n),Po(n)})),handleMeetingEndEpic:(e,t)=>Cn(e,7939).pipe(Ht(t),Fe(e=>{let[t,r]=e;const{payload:{body:n}}=t;if(void 0!==n.reason){if(Qn.LEAVEREASON_RECONNECT===n.reason)return Zn.LEAVESUBREASON_WAITINGROOMFAILOVER===n.subReason?Hs("RECONNECTING_MEETING",{reason:$o.OnHold}):Hs("RECONNECTING_MEETING",{reason:$o.Failover}),ae(bo());Qn.LEAVEREASON_KICKEDBYHOST===n.reason?Hs("LEAVING_MEETING",{reason:"kicked by host"}):Qn.LEAVEREASON_ENDBYHOST!==n.reason&&Qn.LEAVEREASON_ENDBYHOSTSTARTANOTHERMEETING!==n.reason||Hs("LEAVING_MEETING",{reason:"ended by host"})}return r.meeting.isMeetingReset?ee:Le(wd(r,!1))})),meetingFailoverEpic:(e,t)=>e.pipe(Kt("".concat(bo)),Ht(t),Fe(e=>{let[,t]=e;const r=wd(t,!0);let n;if(t.meeting.zlkJwtToken){const e=function(e){if(e){const{meeting:{topic:t,passWord:r,userName:n,zlkJwtToken:o,lang:i,cv:s,customerKey:a}}=e;return{topic:t,passWord:r,userName:n,zlkJwtToken:o,lang:i,cv:s,customerKey:a}}return null}(t),r={topic:null==e?void 0:e.topic,password:null==e?void 0:e.passWord,userName:null==e?void 0:e.userName,zlk:null==e?void 0:e.zlkJwtToken,lang:null==e?void 0:e.lang,cv:null==e?void 0:e.cv,customerKey:null==e?void 0:e.customerKey};n=ae(mo(r)).pipe(_t(1e3))}else{const e=function(e){const{meeting:{apiKey:t,signature:r,meetingNumber:n,userName:o,lang:i,passWord:s,userEmail:a,sdkUrl:c,sdkOrigin:d,proxy:u,cv:l,zak:p,tk:h}}=e;return{apiKey:t,signature:r,meetingNumber:n,userName:o,lang:i,passWord:s,userEmail:a,sdkUrl:c,sdkOrigin:d,proxy:u,cv:l,ztk:p||sessionStorage.getItem(Ei.WebclientZak),tk:h||sessionStorage.getItem(Ei.WebclientTk)}}(t);n=ae(go(e)).pipe(_t(1e3))}return qe(Le(r),n)})),hostChangeEpic:e=>Rn(e,7940).pipe(kt(e=>{Hs("MEETING_HOST_CHANGE_INDICATION",e.payload.body.bHost)}),Te(e=>Uo(e.payload.body))),cohostChangeEpic:e=>Rn(e,7941).pipe(kt(e=>{Hs("MEETING_COHOST_CHANGE_INDICATION",e.payload.body.bCoHost)}),Te(e=>Vo(e.payload.body))),setMeetingOptEpic:e=>Rn(e,7945).pipe(kt(e=>{const{payload:{body:{opt:t}}}=e;ii.set(Ei.WebclientOpt,t,ni.SessionStorage)}),At(ee)),setMeetingOnHoldEpic:(e,t)=>Cn(e,7942).pipe(kt(e=>{const{payload:{body:{bHold:t}}}=e;ii.set(Ei.WebclientIsOnHold,t?1:0,ni.SessionStorage),Hs("MEETING_IN_WAITING_ROOM",t)}),Ht(t),Fe(e=>{let[t,r]=e;const n=[Lo(t.payload.body.bHold)];if(t.payload.body.bHold){const e=fa(r);if(e){n.push(Ho({audio:e.audio,video:e.bVideoOn,muted:e.muted}));const t=Wi.getInstance();if("computer"===e.audio&&(t.leaveComputerAudio(),Gu.joinOrLeaveVoip(!1)),e.bVideoOn&&t.stopCaptureVideo(),e.sharerOn&&(Gu.stopSharing(e.userId),t.stopDesktopSharing(),n.push(Qa(ls.End))),r.video&&r.video.subscribedVideoList.length>0&&r.video.subscribedVideoList.forEach(e=>{Gu.unsubscribeVideo(e)}),r.share&&r.share.isReceiveSharing){const e=r.share.activeNodeId;r.share.isRemoteControlApproved&&(Gu.sharingRequestRemoteControl(e,!1),t.stopRemoteControl()),Gu.unsubscribeSharing(e),t.stopRenderSharing()}}}return Le(n)})),setMeetingDataCenterRegionEpic:e=>Cn(e,7954).pipe(Te(e=>Bo(e.payload.body))),claimHostResponseEpic:e=>Cn(e,4216).pipe(kt(e=>{Hs("MEETING_CLAIM_HOST_KEY_RESPONSE",e.payload.body.bresult)}),At(ee)),leaveMeetingEpic:(e,t)=>e.pipe(Kt("".concat(Io),"".concat(Ao)),Ht(t),Fe(e=>{let[t,r]=e;return t.type==="".concat(Io)?(Gu.leaveMeeting(),Hs("LEAVING_MEETING",{})):t.type==="".concat(Ao)&&(Gu.endMeeting(),Hs("LEAVING_MEETING",{})),Le(wd(r,!1))})),versionUpgradeEpic:e=>Cn(e,2).pipe(kt(()=>{console.warn("Upgrade to latest version to optimize meeting experience")}),At(ee)),versionBlockEpic:e=>Cn(e,1).pipe(kt(e=>{const{payload:{body:{upgradeVersion:t}}}=e,r=ao(1e3);if(r&&r.reason){const e=r.reason.replace(/{(\d+)}/g,()=>t);r.reason=e}Hs("JOIN_MEETING_FAILED",r)}),At(ee))});let Ku="zoom.us";const qu="https://dmogdx0jrul3u.cloudfront.net/".concat("2.3.0","/lib/av"),zu="https://source.zoom.us/".concat("2.3.0","/lib/av"),Ju="https://jssdk.zoomus.cn/".concat("2.3.0","/lib/av");let Yu,Xu;!function(e){e.Expel="expel",e.Promote="promote",e.Depromote="depromote",e.MemberChange="memberChange",e.RaiseHand="raisehand",e.LowerHand="lowerhand",e.PutdownHands="putdownhands"}(Yu||(Yu={})),function(e){e[e.AttendeeToAllPanelist=1]="AttendeeToAllPanelist",e[e.PanelistToAttendee=3]="PanelistToAttendee"}(Xu||(Xu={}));const Qu=["CONNECTED","DISCONNECTED","POOL","CONNFAIL","OnlineMembers","GroupChange","RosterChange","WebinarQA","Message"];class Zu{constructor(){if(this.callbackList=void 0,this.instance=void 0,this.callbackList=[],"undefined"!=typeof webIM&&(this.instance=new webIM.WebimInstance,this.instance)){const e=this.instance.server;Qu.forEach(t=>{e.on(t,e=>{this.onXmppCallback(t,e)})})}this.onXmppCallback=this.onXmppCallback.bind(this)}static getInstance(){return void 0===this.agentInstance&&(this.agentInstance=new Zu),this.agentInstance}onXmppCallback(e,t){this.callbackList.length>0&&this.callbackList.forEach(r=>r(e,t))}registerCallback(e){this.callbackList.push(e)}unregisterCallback(e){this.callbackList=this.callbackList.filter(t=>t!==e)}connect(e){var t;const{svcUrl:r,meetingNumber:n,conId:o,clientCap:i,jid:s,displayName:a}=e;if(!this.instance&&void 0!==window.webIM){this.instance=new window.webIM.WebimInstance;const e=this.instance.server;Qu.forEach(t=>{e.on(t,e=>{this.onXmppCallback(t,e)})})}const c="wss://".concat(r,"/wc/media/").concat(n,"?type=x&cid=").concat(o);null===(t=this.instance)||void 0===t||t.server.connect({url:c,jid:s,meetingNumber:n,clientCap:i,displayName:a})}lowerHand(e){var t;null===(t=this.instance)||void 0===t||t.server.lowerHand(e)}raiseHand(){var e;null===(e=this.instance)||void 0===e||e.server.raiseHand()}sendWebinarMsg(e,t,r,n){var o;null===(o=this.instance)||void 0===o||o.server.sendWebinarMsg(e,t,r,n)}rename(e,t){var r;null===(r=this.instance)||void 0===r||r.server.rename(e,t)}sendAsk(e,t,r){var n;null===(n=this.instance)||void 0===n||n.server.sendAsk(e,t,r)}sendAnswer(e,t,r){var n;null===(n=this.instance)||void 0===n||n.server.sendAnswer(e,t,r)}answerOnline(e,t){var r;null===(r=this.instance)||void 0===r||r.server.answerOnline(e,t)}sendDismiss(e){var t;null===(t=this.instance)||void 0===t||t.server.sendDismiss(e)}sendReOpen(e){var t;null===(t=this.instance)||void 0===t||t.server.sendReOpen(e)}sendUpVote(e){var t;null===(t=this.instance)||void 0===t||t.server.sendUpVote(e)}sendDownVote(e){var t;null===(t=this.instance)||void 0===t||t.server.sendDownVote(e)}disconnect(){var e;null===(e=this.instance)||void 0===e||e.server.disconnect(),this.instance=void 0}}let $u;Zu.agentInstance=void 0;var el=Object.freeze({__proto__:null,startIdleTimerEpic:(e,t)=>e.pipe(Kt("".concat(Mo)),Ht(t),tt(e=>{let[,t]=e;return void 0!==t.meeting.zlkJwtToken}),Dt(()=>{var e,t;return $u&&$u.complete(),$u=new q,(e=6e4,void 0===e&&(e=0),void 0===t&&(t=Ie),(!Qe(e)||e<0)&&(e=0),t&&"function"==typeof t.schedule||(t=Ie),new F((function(r){return r.add(t.schedule(Ze,e,{subscriber:r,counter:0,period:e})),r}))).pipe(Te(()=>performance.now())).subscribe($u),$u.pipe(Te(e=>Co(e)))})),terminateIdleTimerEpic:e=>e.pipe(Kt("".concat(Wr))).pipe(kt(()=>{$u&&$u.complete()}),At(ee)),idleCheckingEpic:(e,t)=>e.pipe(Kt("".concat(Co)),Ht(t),Fe(e=>{var t;let[r,n]=e;const{meeting:{idleStartTime:o,sessionIdleTimeoutMins:i,isOriginHost:s},participants:{attendeesList:a,xmppAttendeeList:c},recording:d,breakoutRoom:u}=n,l=r.payload,p=[];if(1===a.length&&0===c.length&&(null==u||null===(t=u.currentRoom)||void 0===t?void 0:t.status)!==pa.InRoom&&(null==d?void 0:d.cmrStatus)!==$i.Start)if(o){const e=s&&ia(a[0].userRole)?i:40;l-o>60*e*1e3&&(console.warn("No active for ".concat(e," minutes, will end the session.")),p.push(Ao()),ct(500).subscribe(()=>{Bs()}))}else p.push(Jo(l));else p.push(Jo(void 0));return Le(p)})),resetIdleStartTimeEpic:(e,t)=>e.pipe(Kt("".concat(zr)),tt(e=>[Ci,Oi].includes(e.payload.evt)&&void 0!==t.value.meeting.idleStartTime),le(be),Fe(()=>{var e;const{participants:{attendeesList:r,xmppAttendeeList:n},recording:o,breakoutRoom:i}=t.value,s=[];return(r.length>1||n.length>0||(null==o?void 0:o.cmrStatus)===$i.Start||(null==i||null===(e=i.currentRoom)||void 0===e?void 0:e.status)===pa.InRoom)&&s.push(Jo(void 0)),Le(s)}))});let tl=0;var rl,nl=uo((function(e,t){var r;r=function(){function e(){for(var e=0,t={};e1&&void 0!==arguments[1]?arguments[1]:0,r=(cl[e[t+0]]+cl[e[t+1]]+cl[e[t+2]]+cl[e[t+3]]+"-"+cl[e[t+4]]+cl[e[t+5]]+"-"+cl[e[t+6]]+cl[e[t+7]]+"-"+cl[e[t+8]]+cl[e[t+9]]+"-"+cl[e[t+10]]+cl[e[t+11]]+cl[e[t+12]]+cl[e[t+13]]+cl[e[t+14]]+cl[e[t+15]]).toLowerCase();if(!al(r))throw TypeError("Stringified UUID is invalid");return r}(n)}let ll;!function(e){e[e.Unknown=0]="Unknown",e[e.Windows=1]="Windows",e[e.Mac=2]="Mac",e[e.Pad=3]="Pad",e[e.Mobile=4]="Mobile",e[e.CallIn=5]="CallIn",e[e.Linux=6]="Linux",e[e.WebClient=7]="WebClient",e[e.ChromeOs=8]="ChromeOs"}(ll||(ll={}));const{WebclientIsOnHold:pl,WebclientOpt:hl,WebclientParticipantId:_l,WebclientZoomId:fl,WebclientWebinarToken:vl,WebclientMeetingToken:yl}=Ei,{WebclientDeviceId:El}=gi,gl=Zu.getInstance();let ml;var Sl=Object.freeze({__proto__:null,loadWebIMEpic:(e,t)=>e.pipe(Kt("".concat(qr)),Ht(t),Fe(e=>{let[,t]=e;const{media:{assetsPath:r}}=t;return Le(new Promise((e,t)=>{Xo("".concat(r,"/webim.min.js"),()=>{e("")},()=>{t()})})).pipe(St(an(!0)),ut(e=>ae(an(!1))))})),connectXMPPSocketEpic:(e,t)=>e.pipe(Kt("".concat(Br)),Ht(t),tt(e=>{let[,t]=e;return"closed"===t.socket.xmppSocketStatus}),Pd(t=>{let[,r]=t;const{meeting:{svcUrl:n,meetingNumber:o,conId:i,jid:s,userName:a},socket:{isXmppSDKLoaded:c}}=r,d=ci()&&di()?11:10;let u=ae(c);return!1===c&&(u=e.pipe(Kt("".concat(an)),Et(1))),u.pipe(Fe(e=>{return e?(t={svcUrl:n,meetingNumber:o,conId:i,jid:s,userName:a,clientCap:d},gl.connect(t),ml=new q,Xe(e=>gl.registerCallback(e),e=>gl.unregisterCallback(e),(e,t)=>({event:e,data:t})).subscribe(ml),ml).pipe(Te(e=>Yr(e)),Tt(sn(Ia.Connecting))):ce("webim load fail");var t}))})),connectedXmppSocketEpic:(e,t)=>e.pipe(Kt("".concat(sn)),tt(e=>e.payload===Ia.Connecting),Pd(()=>{if(ml){const e=ml.pipe(tt(e=>"CONNECTED"===e.event)),r=ml.pipe(tt(e=>"DISCONNECTED"===e.event));return $e(e.pipe(Fe(()=>ae(sn(Ia.Connected)))),r.pipe(_t(1e3),Ht(t),tt(e=>{let[,t]=e;return"closed"!==t.socket.xmppSocketStatus&&"joined"===t.meeting.meetingStatus&&!t.meeting.isMeetingReset}),Te(()=>(Hs("RECONNECTING_MEETING",{reason:$o.Failover}),bo()))))}})),disconnectXmppSocketEpic:e=>e.pipe(Kt("".concat(Kr)),St(sn(Ia.Closed)),kt(()=>{var e;gl.disconnect(),null===(e=ml)||void 0===e||e.complete()}))});const{setCloudRecordingStatus:bl,setCloudRecordingEnable:Il,setAllowStopAutoRecording:Al,setAutomaticCloudRecordingEnable:Cl}=Ur("SET_CLOUD_RECORDING_STATUS","SET_CLOUD_RECORDING_ENABLE","SET_ALLOW_STOP_AUTO_RECORDING","SET_AUTOMATIC_CLOUD_RECORDING_ENABLE"),Ol={meetingStatus:"initial",isWindowOpen:!1,apiKey:"",signature:"",lang:"en-US",tk:"",customerKey:"",mtkGuid:"",pingRWCTimestamp:0,passWord:"",meetingNumber:0,userName:"",userEmail:"",sdkUrl:"",sdkOrigin:"",proxy:1,cv:"",meetingId:"",tid:"",ts:"",auth:"",sign:"",isSupportCallOut:!1,tollNumbers:void 0,recordingEnable:!1,callOutCountry:void 0,inviteEmail:"",xmppConfig:null,isSupportH323:!1,h323GatewayInfo:"",h323Password:"",trackAuth:"",isOriginHost:!1,isWebinar:!1,encryptedRWC:void 0,meetingOptions:{},meetingTopic:"",isSupportQA:!1,bLock:!1,bHoldUponEntry:!1,viewOnly:0,listenOnlyPhone:0,bAllowRaiseHand:!1,bAllowAttendeeRename:!1,bBroadcast:void 0,bAllowPlayChimeForEnterOrExit:!1,bIbDisableShare:!1,bIbDisableChat:!1,bAllowShowCount:!1,encryptKey:"",bNoHostTimeOut:!1,confId:"",conId:"",e2eEncrypt:!1,zoomId:"",jid:"",xtoken:"",groups:void 0,svcUrl:"",encType:NaN,userGUID:"",userId:NaN,isHost:!1,isCoHost:!1,participantID:0,isOnHold:!1,isMeetingReset:!1,bRecord:!1,audioVideoBeforeOnHold:void 0,region:void 0,network:void 0,joinMeetingTimeStamp:0,enableAudioQos:!0,enableVideoQos:!0,activeAppInfo:void 0,recordingDisclaimerForRecorder:{},recordingDisclaimer:{},ccUrl:"",sessionIdleTimeoutMins:40},Tl=Fr({["".concat(Oo)]:ju((e,t)=>{let{payload:r}=t;Object.assign(e,r)}),["".concat(To)]:ju((e,t)=>{let{payload:r}=t;e.isWindowOpen=r}),["".concat(Ro)]:ju((e,t)=>{let{payload:r}=t;e.apiKey=r.apiKey,e.signature=r.signature,e.lang=r.language}),["".concat(wo)]:ju((e,t)=>{let{payload:r}=t;e.zak=r}),["".concat(No)]:ju((e,t)=>{let{payload:r}=t;e.tk=r.tk,e.mtkGuid=r.mtkGuid}),["".concat(Do)]:ju((e,t)=>{let{payload:r}=t;e.pingRWCTimestamp=r}),["".concat(Mo)]:ju((e,t)=>{let{payload:r}=t;e.confId=r.confID,e.conId=r.conID,e.e2eEncrypt=r.e2eEncrypt,e.meetingNumber=parseInt(r.mn,10),e.zoomId=r.zoomID,e.meetingStatus="joined",e.jid=r.jid,e.xtoken=r.xtoken,e.groups=r.groups,e.svcUrl=r.svcUrl,e.encType=r.encType,e.userGUID=r.userGUID,e.userId=r.userID,e.role=r.role,e.participantID=r.participantID}),["".concat(Po)]:ju((e,t)=>{let{payload:r}=t;Object.assign(e,r)}),["".concat(Uo)]:ju((e,t)=>{let{payload:r}=t;e.isHost=r}),["".concat(Vo)]:ju((e,t)=>{let{payload:r}=t;e.isCoHost=r}),["".concat(Lo)]:ju((e,t)=>{let{payload:r}=t;e.isOnHold=r}),["".concat(jo)]:ju((e,t)=>{let{payload:r}=t;e.isMeetingReset=r}),["".concat(Ho)]:ju((e,t)=>{let{payload:r}=t;e.audioVideoBeforeOnHold=r}),["".concat(xo)]:ju((e,t)=>{let{payload:r}=t;e.currentUserAudioBeforeReset=r}),["".concat(Fo)]:ju((e,t)=>{let{payload:r}=t;e.isCurrentUserMutedBeforeReset=r}),["".concat(Go)]:ju((e,t)=>{let{payload:r}=t;e.meetingStatus=r}),["".concat(Bo)]:ju((e,t)=>{let{payload:r}=t;e.region=r.region,e.network=r.network}),["".concat(Wo)]:ju((e,t)=>{let{payload:r}=t;e.isCurrentUserStartVideoBeforeReset=r}),["".concat(Ko)]:ju((e,t)=>{let{payload:r}=t;e.joinMeetingTimeStamp=r}),["".concat(qo)]:ju((e,t)=>{let{payload:r}=t;e.enableAudioQos=r.audioQos,e.enableVideoQos=r.videoQos}),["".concat(zo)]:ju((e,t)=>{let{payload:r}=t;e.activeAppInfo=r}),["".concat(Jo)]:ju((e,t)=>{let{payload:r}=t;e.idleStartTime=r}),["".concat(Yo)]:ju((e,t)=>{let{payload:r}=t;e.sessionIdleTimeoutMins=r}),["".concat(ko)]:ju((e,t)=>{let{payload:r}=t;Object.assign(e,c(c({},Ol),{},{isMeetingReset:!0,currentUserAudioBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.audio:r.audio,isCurrentUserMutedBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.muted:r.muted,isCurrentUserStartVideoBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.video:r.video,apiKey:e.apiKey,signature:e.signature,meetingNumber:e.meetingNumber,userName:e.userName,lang:e.lang,passWord:e.passWord,userEmail:e.userEmail,sdkUrl:e.sdkUrl,sdkOrigin:e.sdkOrigin,proxy:1,cv:e.cv,idleStartTime:e.idleStartTime,sessionIdleTimeoutMins:e.sessionIdleTimeoutMins}))})},Ol),Rl=An(Wu,el,{meetingInfoEpic:(e,t)=>e.pipe(Kt("".concat(mo)),Dt(e=>{const r=Object.assign({},e.payload,{password:po(e.payload.password),topic:po(e.payload.topic)}),{videoSDKUrl:n}={meetingSDKUrl:"https://".concat(Ku,"/api/v1/wc/info"),videoSDKUrl:"https://".concat(Ku,"/wc/lsdk")};return function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"zoomsdkjsonpcallback";return new F(n=>{tl++;const o="".concat(r).concat(tl),i=document.createElement("script");Object.keys(t).forEach(e=>(void 0===t[e]||null===t[e])&&delete t[e]),i.src="".concat(e,"?").concat(new URLSearchParams(Object.assign(t,{callback:o})).toString()),i.async=!0,i.onerror=e=>n.error(e),document.getElementsByTagName("head")[0].appendChild(i),window[o]=e=>{i.parentNode&&i.parentNode.removeChild(i),delete window[o],n.next(e),n.complete()}})}(n,r).pipe(ut(e=>ae({status:!1,result:e.toString(),errorCode:-3e3})),Fe(r=>{const[n,o]=ot(ae(r),e=>!0===e.status&&void 0!==e.result);return o.subscribe(e=>{e.state||(3e3===e.errorCode&&"Meeting password is incorrect"===e.errorMessage?Hs("JOIN_MEETING_FAILED",so(3004)):-3e3===e.errorCode?Hs("JOIN_MEETING_FAILED",{reason:"connection error"}):3e3===e.errorCode?Hs("JOIN_MEETING_FAILED",{reason:e.errorMessage,errorCode:200}):300===e.errorCode?Hs("JOIN_MEETING_FAILED",{reason:"This account does not exist or does not belong to you",errorCode:200}):124===e.errorCode&&"Parse lite sdk topic and pwd fail"===e.errorMessage?Hs("JOIN_MEETING_FAILED",{reason:"Parse topic and pwd fail",errorCode:200}):124===e.errorCode&&"The java web token is expired or more than 2 days or ineffective."===e.errorMessage?Hs("JOIN_MEETING_FAILED",{reason:"The token is expired or more than 2 days or ineffective.",errorCode:200}):124===e.errorCode&&Hs("JOIN_MEETING_FAILED",{reason:"Verify JWT failed",errorCode:200}))}),n.pipe(Md(r=>{if(!0===r.status){const{result:{mid:n}}=r;ii.init(n);const o=((e,t)=>{if(e.result){const{result:{mn:r,ts:n,auth:o,track_auth:i,mid:s,tid:a,encryptedRWC:c,user_identity:d,meetingOptions:u,can_recording:l,wcXMPPConfig:p,call_out_country_json:h,isOriginalHost:_,support_call_out:f}}=e,{lang:v,password:y,topic:E,zlk:g,cv:m,userName:S}=t;return{meetingNumber:r,meetingId:s,tid:a,ts:n,auth:o,passWord:y,trackAuth:i,customerKey:d,encryptedRWC:JSON.parse(c||"{}"),meetingOptions:JSON.parse(u||"{}"),recordingEnable:"1"===l,topic:E,userName:ii.get(Ei.WebclientUserName)||S,cv:m,zlkJwtToken:g,xmppConfig:JSON.parse(p||"{}"),callOutCountry:JSON.parse(h||"{}"),lang:v,isOriginHost:_,isSupportCallOut:"1"===f}}return e})(r,e.payload);return qe(ae(Oo(o)),ae(Il(null==o?void 0:o.recordingEnable)),bn(Bu,t,So()))}}))}))}))}),wl=Ui.createAgent();let Nl;var Dl=Object.freeze({__proto__:null,connectZoomSocketEpic:(e,t)=>e.pipe(Kt("".concat(Gr)),Ht(t),tt(e=>{let[,t]=e;return"closed"===t.socket.zoomSocketStatus}),Pd(e=>{let[,t]=e;const{socket:{retryCount:r,rwgServerList:n},meeting:o,breakoutRoom:i}=t;let s;if(o.zlkJwtToken)s=function(e){let{passWord:t,meetingNumber:r,userName:n,topic:o,trackAuth:i,tid:s,meetingId:a,ts:c,auth:d,lang:u,retryCount:l,rwgServerList:p,cv:h,customerKey:_,zlkJwtToken:f}=e;const v=nl.get("_zm_mtk_guid");let y=ii.get(El);if(y||(y=ul(),ii.set(El,y,ni.LocalStorage)),p.length>l){const e=p[l];let E={dn2:po(n),topic:po(o),auth:d,browser:si(),trackAuth:i,mid:a,tid:s,lang:u,ts:c,"ZM-CID":y,_ZM_MTG_TRACK_ID:v||"",iccv:h,customer_key:po(_),cfs:0,zlkJwtToken:f};""!==t&&(E=Object.assign(E,{mpwd:po(t)})),e.rwcAuth?E=Object.assign(E,{rwcAuth:e.rwcAuth}):e.rwcToken&&(E=Object.assign(E,{rwcToken:e.rwcToken}));let g=2;return ui()?g=1:li()&&(g=0),E=Object.assign(E,{as_type:g}),[{key:hl,queryKey:"opt"},{key:_l,queryKey:"participantID"},{key:fl,queryKey:"zoomid"}].forEach(e=>{const t=ii.get(e.key);void 0!==t&&(E[e.queryKey]=t)}),ii.get(yl)&&Object.assign(E,{isdj:1}),"wss://".concat(e.rwg,"/instantsdk/").concat(r,"?").concat(new URLSearchParams(E).toString())}return null}(c(c({},o),{},{retryCount:r,rwgServerList:n}));else{let e=c(c({},o),{},{retryCount:r,rwgServerList:n});if(i&&i.currentRoom.status===pa.Joining){const{currentRoom:{boId:t,boConfId:r,boToken:n}}=i;e=c(c({},e),{},{bid:t,botk:n,confID:r})}s=function(e){let{isHost:t,isOriginHost:r,passWord:n,meetingNumber:o,userName:i,zak:s,trackAuth:a,tid:c,sign:d,meetingId:u,ts:l,auth:p,lang:h,tk:_,retryCount:f,rwgServerList:v,userEmail:y,cv:E,bid:g,botk:m,confID:S,customerKey:b}=e;const I=nl.get("_zm_mtk_guid");let A=ii.get(El);if(A||(A=ul(),ii.set(El,A,ni.LocalStorage)),v.length>f){const e=v[f];let C={dn2:po(i),auth:p,sign:d,browser:si(),trackAuth:a,mid:u,tid:c,email:y,lang:h,zak:s||"",tk:_||"",customer_key:po(b),ts:l,"ZM-CID":A,_ZM_MTG_TRACK_ID:I||"",jscv:E,cfs:0};t&&r||""===n||(C=Object.assign(C,{mpwd:n})),e.rwcAuth?C=Object.assign(C,{rwcAuth:e.rwcAuth}):e.rwcToken&&(C=Object.assign(C,{rwcToken:e.rwcToken}));let O=2;return ui()?O=1:li()&&(O=0),C=Object.assign(C,{as_type:O}),[{key:pl,queryKey:"cfs"},{key:hl,queryKey:"opt"},{key:_l,queryKey:"participantID"},{key:fl,queryKey:"zoomid"},{key:vl,queryKey:"tk"}].forEach(e=>{const t=ii.get(e.key);void 0!==t&&(C[e.queryKey]=t)}),g&&m&&S&&Object.assign(C,{bid:po(g),botk:m,confID:S}),ii.get(yl)&&Object.assign(C,{isdj:1}),"wss://".concat(e.rwg,"/wc/api/").concat(o,"?").concat(new URLSearchParams(C).toString())}return null}(e)}if(s){const e=(a=s,wl.connect(a),Nl=new q,Xe(e=>wl.on(wi.Message,e),e=>wl.off(wi.Message,e),e=>e.data).subscribe(Nl),Nl);return $e(e.pipe(tt(e=>"string"==typeof e),Te(e=>JSON.parse(e)),Ld(),Dd(e=>{if(0!==e.evt||!e.body||"invalid parameters!"!==e.body.test)return zr(e);Hs("JOIN_MEETING_FAILED",so(eo.INVALID_PARAMETER))}),Tt(rn(Ia.Connecting))),e.pipe(tt(e=>e instanceof ArrayBuffer),Te(e=>Jr(e))))}var a})),connectedZoomSocketEpic:(e,t)=>e.pipe(Kt("".concat(Gr)),Dt(()=>{const[e,r,n]=[wi.Open,wi.Close,wi.Error].map(e=>Xe(t=>wl.on(e,t),t=>wl.on(e,t)));return $e(e.pipe(Fe(()=>$e(ae(rn(Ia.Connected)),ct(6e4).pipe(Ht(t),tt(e=>{let[,t]=e;return"initial"===t.meeting.meetingStatus&&!t.meeting.isMeetingReset}),Te(()=>(Hs("RECONNECTING_MEETING",{reason:$o.Failover}),bo())))))),r.pipe(Ht(t),tt(e=>{let[,t]=e;return"closed"!==t.socket.zoomSocketStatus&&"joined"===t.meeting.meetingStatus&&!t.meeting.isMeetingReset}),Te(()=>(Hs("RECONNECTING_MEETING",{reason:$o.Failover}),bo()))),n.pipe(Ht(t),Md(e=>{let[,t]=e;const{meeting:{meetingStatus:r,isMeetingReset:n},socket:{retryCount:o}}=t;return"initial"===r?Le([on(o+1),Wr({retry:!0})]):n?void 0:(Hs("RECONNECTING_MEETING",{reason:$o.Failover}),ae(bo()))})))})),disconnectZoomSocketEpic:e=>e.pipe(Kt("".concat(Wr)),Fe(e=>e.payload&&e.payload.retry?ae(Gr()).pipe(_t(1e3),Tt(rn(Ia.Closed))):ae(rn(Ia.Closed))),_t(100),kt(()=>{var e;wl.close(),null===(e=Nl)||void 0===e||e.complete()}))});const Ml=Vi.getInstance();let Pl;var kl=Object.freeze({__proto__:null,connectMainSessionSocketEpic:(e,t)=>e.pipe(Kt("".concat(Xr)),Ht(t),tt(e=>{let[,t]=e;return"closed"===t.socket.mainSessionSocketStatus}),Dt(e=>{let[,t]=e;const{meeting:{svcUrl:r,meetingNumber:n,conId:o}}=t;return(e=>(Ml.connect(e),Pl=new q,Xe(e=>Ml.on(wi.Message,e),e=>Ml.off(wi.Message,e)).pipe(Te(e=>e.data)).subscribe(Pl),Pl))(function(e,t,r){return"wss://".concat(e,"/wc/media/").concat(t,"?type=m&cid=").concat(r,"&mode=2")}(r,n,o)).pipe(Te(e=>JSON.parse(e)),tt(e=>0!==e.evt),Ld(),Te(e=>en(e)),Tt(cn(Ia.Connecting)))})),connectedMainSessionSocketEpic:(e,t)=>e.pipe(Kt("".concat(Xr)),Dt(()=>{const[e,r,n]=[wi.Open,wi.Close,wi.Error].map(e=>Xe(t=>Ml.on(e,t),t=>Ml.on(e,t)));return $e(e.pipe(St(cn(Ia.Connected))),r.pipe(Ht(t),tt(e=>{let[,t]=e;return"closed"!==t.socket.zoomSocketStatus&&"joined"===t.meeting.meetingStatus}),Te(()=>(Hs("RECONNECTING_MEETING",{reason:$o.Failover}),bo()))),n.pipe(Te(()=>(Hs("RECONNECTING_MEETING",{reason:$o.Failover}),bo()))))})),disconnectMainSessionSocketEpic:e=>e.pipe(Kt("".concat(Qr)),St(cn(Ia.Closed)),kt(()=>{var e;Ml.close(),null===(e=Pl)||void 0===e||e.complete()}))});const Ul=Gi.getInstance();let Vl;var Ll=Object.freeze({__proto__:null,connectCmdChannelSocketEpic:(e,t)=>e.pipe(Kt("".concat(Zr)),Ht(t),tt(e=>{let[,t]=e;return"closed"===t.socket.cmdChannelSocketStatus}),Dt(e=>{let[,t]=e;const{meeting:{svcUrl:r,meetingNumber:n,conId:o},socket:{cmdChannelSocketStatus:i}}=t;return(e=>(Ul.connect(e),Vl=new q,Xe(e=>Ul.on(wi.Message,e),e=>Ul.off(wi.Message,e)).pipe(Te(e=>e.data)).subscribe(Vl),Vl))(function(e,t,r){return"wss://".concat(e,"/wc/media/").concat(t,"?type=x&cid=").concat(r)}(r,n,o)).pipe(Te(e=>{if("string"==typeof e){const t=JSON.parse(e);return 0===(null==t?void 0:t.evt)&&i!==Ia.Connected&&Gi.getInstance().connectXmpp(),t}return{}}),tt(e=>void 0!==(null==e?void 0:e.evt)),Te(e=>tn(e)),Tt(dn(Ia.Connecting)))})),connectedCmdChannelSocketEpic:(e,t)=>e.pipe(Kt("".concat(Zr)),Dt(()=>{const[e,r,n]=[wi.Open,wi.Close,wi.Error].map(e=>Xe(t=>Ul.on(e,t),t=>Ul.on(e,t)));return $e(e.pipe(St(dn(Ia.Connected))),r.pipe(Ht(t),tt(e=>{let[,t]=e;return"closed"!==t.socket.cmdChannelSocketStatus&&"joined"===t.meeting.meetingStatus}),Te(()=>(Hs("RECONNECTING_MEETING",{reason:$o.Failover}),bo()))),n.pipe(Te(()=>(Hs("RECONNECTING_MEETING",{reason:$o.Failover}),bo()))))})),disconnectCmdChannelSocketEpic:e=>e.pipe(Kt("".concat($r)),St(dn(Ia.Closed)),_t(100),kt(()=>{var e;Ul.close(),null===(e=Vl)||void 0===e||e.complete()}))});const jl={zoomSocketStatus:Ia.Closed,isXmppSDKLoaded:!1,xmppSocketStatus:Ia.Closed,mainSessionSocketStatus:Ia.Closed,cmdChannelSocketStatus:Ia.Closed,retryCount:0,rwgServerList:[]},Hl=Fr({["".concat(rn)]:ju((e,t)=>{let{payload:r}=t;e.zoomSocketStatus=r}),["".concat(nn)]:ju((e,t)=>{let{payload:r}=t;const{rwgServerList:n}=e;n.find(e=>e===r.rwg)||n.push(r)}),["".concat(on)]:ju((e,t)=>{let{payload:r}=t;e.retryCount=r}),["".concat(sn)]:ju((e,t)=>{let{payload:r}=t;e.xmppSocketStatus=r}),["".concat(an)]:ju((e,t)=>{let{payload:r}=t;e.isXmppSDKLoaded=r}),["".concat(cn)]:ju((e,t)=>{let{payload:r}=t;e.mainSessionSocketStatus=r}),["".concat(dn)]:ju((e,t)=>{let{payload:r}=t;e.cmdChannelSocketStatus=r}),["".concat(un)]:()=>jl},jl),xl=An(Dl,Sl,kl,Ll),Fl={id:"userId",type:e=>sa(e)?{userType:e,avatarBackgroundType:Math.floor(8*Math.random())+1}:{userType:e},role:e=>({userRole:e,isHost:ia(e)}),dn2:e=>({displayName:ho(e)}),bShareOn:"sharerOn",bSharePause:"sharerPause",bLocalRecordStatus:e=>({bLocalRecord:1===e}),bGuest:"isGuest",bCapsRequestLT:"isRequestLT"};var Gl=Object.freeze({__proto__:null,updateAttendeesEpic:(e,t)=>Cn(e,Ci).pipe(Te(e=>(e=>{const t={};return["add","remove","update"].forEach(r=>{null!==e[r]&&void 0!==e[r]&&(t[r]=e[r].reduce((e,t)=>{const r=Object.keys(t).reduce((e,r)=>{const n=Fl[r];return"function"==typeof n?Object.assign(e,n(t[r])):"string"==typeof n?e[n]=t[r]:e[r]=t[r],e},{}),n=e.find(e=>e.userId===r.userId);return void 0!==n?Object.assign(n,r):e.push(r),e},[]))}),t})(e.payload.body)),Ht(t),Fe(e=>{let[t,r]=e;const n=[Ws(t)],{meeting:{userId:o,isWebinar:i},participants:{attendeesList:s,failoverAttendeesList:a,allowTalkAttendeesList:d}}=r,u=d.map(e=>e.userId);if(t.add){const e=t.add.find(e=>e.userId===o);void 0!==e&&Hs("ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e);const r=t.add.filter(e=>e.userId!==o);if(r.length>0){const e=r.filter(e=>!aa(e.userRole)).map(e=>{const t=a.find(t=>t.zoomID===e.zoomID);return t?c(c({},e),{},{source:t.isOnHold?"on hold":"failover"}):e}),t=e.filter(e=>!!e.source).map(e=>({zoomID:e.zoomID}));if(n.push(Ys(t)),Hs("ADD_USER_PARTICIPANT_ATTRIBUTE",e),i){const e=r.filter(e=>aa(e.userRole));e.length>0&&Hs("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",e.map(e=>({userId:e.userId,isAllowToTalk:!0})))}}}if(t.update){const e=t.update.find(e=>e.userId===o);void 0!==e&&Hs("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e);const r=t.update.filter(e=>!(e.userId===o||u.includes(e.userId)));if(r.length>0&&Hs("UPDATE_USER_PARTICIPANT_ATTRIBUTE",r),i){const e=t.update.filter(e=>e.userId!==o&&u.includes(e.userId));e.length>0&&Hs("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",e)}}if(t.remove){const e=t.remove.map(e=>{const t=s.find(t=>t.userId===e.userId);return t?2===e.action&&1===e.nUserStatus?t.bHold?(n.push(Js({zoomID:t.zoomID,isOnHold:!0})),c(c({},e),{},{reason:"on hold"})):(n.push(Js({zoomID:t.zoomID,isOnHold:!1})),c(c({},e),{},{reason:"failover"})):e:null}).filter(e=>!!e);if(Hs("REMOVE_USER_PARTICIPANT_ATTRIBUTE",e),i){const e=t.remove.filter(e=>u.includes(e.userId));e.length>0&&Hs("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",e.map(e=>({userId:e.userId,isAllowToTalk:!1})))}}return Le(n)})),receiveUserListFromXMPPEpic:e=>On(e,"POOL").pipe(tt(e=>e.payload.data.action===Yu.MemberChange),kt(e=>{Hs("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",e.payload.data.data)}),Fe(e=>Le([Ks(e.payload.data.data)]))),handleAdmitAllSilentUsersEpic:e=>Cn(e,7951).pipe(kt(e=>{!1===e.payload.body.bStarted&&Hs("ADMIT_ALL_SILENT_USERS_END",e.payload.body.bStarted)}),Te(e=>qs(e.payload.body.bStarted))),handleKVUpdateIndicationEpic:e=>Cn(e,7946).pipe(tt(e=>{var t;return["bRaiseHand","feedback"].includes(null===(t=e.payload.body)||void 0===t?void 0:t.key)&&0===e.payload.body.value}),Te(e=>(Hs("UPDATE_USER_PARTICIPANT_ATTRIBUTE",{}),"bRaiseHand"===e.payload.body.key?Xs():Qs())))});const Bl={attendeesList:[],xmppAttendeeList:[],allowTalkAttendeesList:[],failoverAttendeesList:[],isAdmitAllSilentUsers:!1},Wl=Fr({["".concat(Ws)]:ju((e,t)=>{let{payload:r}=t;void 0!==r.add&&r.add.length>0&&r.add.forEach(t=>{const r=e.attendeesList.find(e=>e.userId===t.userId);if(void 0!==r)Object.assign(r,t);else{const r=e.allowTalkAttendeesList.find(e=>e.userId===t.userId);void 0!==r?Object.assign(r,t):aa(t.userRole)?e.allowTalkAttendeesList.push(t):e.attendeesList.push(t)}}),void 0!==r.update&&r.update.length>0&&r.update.forEach(t=>{const r=e.attendeesList.find(e=>e.userId===t.userId);if(void 0!==r)Object.assign(r,t);else{const r=e.allowTalkAttendeesList.find(e=>e.userId===t.userId);void 0!==r&&Object.assign(r,t)}}),void 0!==r.remove&&r.remove.length>0&&r.remove.forEach(t=>{const r=e.attendeesList.findIndex(e=>e.userId===t.userId);if(-1!==r)e.attendeesList.splice(r,1);else{const r=e.allowTalkAttendeesList.findIndex(e=>e.userId===t.userId);-1!==r&&e.allowTalkAttendeesList.splice(r,1)}})}),["".concat(Ks)]:ju((e,t)=>{let{payload:r}=t;e.xmppAttendeeList=r.map(e=>c(c({},e),{},{displayName:e.name,userId:Number(e.node),userRole:Number(e.role)}))}),["".concat(qs)]:ju((e,t)=>{let{payload:r}=t;e.isAdmitAllSilentUsers=r}),["".concat(Xs)]:ju(e=>{e.attendeesList.forEach(e=>{e.bRaiseHand&&(e.bRaiseHand=!1)})}),["".concat(Qs)]:ju(e=>{e.attendeesList.forEach(e=>{e.feedback>0&&(e.feedback=0)})}),["".concat(Js)]:ju((e,t)=>{let{payload:r}=t;e.failoverAttendeesList.push(r)}),["".concat(Ys)]:ju((e,t)=>{let{payload:r}=t;r.forEach(t=>{const r=e.failoverAttendeesList.findIndex(e=>e.zoomID===t.zoomID);-1!==r&&e.failoverAttendeesList.splice(r,1)})}),["".concat(zs)]:()=>Bl},Bl),Kl=An(Gl),ql={audioEncodeStatus:"initial",audioDecodeStatus:"initial",videoEncodeStatus:"initial",videoDecodeStatus:"initial",sharingEncodeStatus:"initial",sharingDecodeStatus:"initial",assetsPath:"",mediaConstraints:void 0,fileWithVersion:!1},zl=Fr({["".concat(_n)]:ju((e,t)=>{let{payload:r}=t;e.audioDecodeStatus=r}),["".concat(hn)]:ju((e,t)=>{let{payload:r}=t;e.audioEncodeStatus=r}),["".concat(En)]:ju((e,t)=>{let{payload:r}=t;e.sharingDecodeStatus=r}),["".concat(yn)]:ju((e,t)=>{let{payload:r}=t;e.sharingEncodeStatus=r}),["".concat(vn)]:ju((e,t)=>{let{payload:r}=t;e.videoDecodeStatus=r}),["".concat(fn)]:ju((e,t)=>{let{payload:r}=t;e.videoEncodeStatus=r}),["".concat(gn)]:ju((e,t)=>{let{payload:r}=t;e.mediaConstraints=r.mediaConstraints,e.assetsPath=r.assetsPath,e.fileWithVersion=r.fileWithVersion}),["".concat(mn)]:ju((e,t)=>{let{payload:r}=t;const{type:n,encrypeKey:o,additionalType:i}=r,s={encrypeKey:o,additionalType:i};"audio"===n?e.audioEncrypt=s:"video"===n?e.videoEncrypt=s:"sharing"===n&&(e.sharingEncrypt=s)}),["".concat(Sn)]:e=>c(c({},ql),{},{mediaConstraints:e.mediaConstraints,assetsPath:e.assetsPath,fileWithVersion:e.fileWithVersion})},ql),Jl=Ui.createAgent();var Yl=Object.freeze({__proto__:null,audioAsnsEpic:(e,t)=>Cn(e,12033).pipe(Ht(t),Te(e=>{let[t,r]=e;const{participants:{attendeesList:n,allowTalkAttendeesList:o}}=r,i=t.payload.body,s={};return i&&([...n,...o].forEach(e=>{for(let t=1;t<=3;t++){const r="asn".concat(t),{userId:n,displayName:o}=e;if(void 0!==i[r]&&n===i[r]){s[r]={userId:n,displayName:o};break}}}),Hs("AUDIO_ACTIVE_SPEAKER",Object.values(s))),Aa(s)})),unmuteConsentAfterSpotlighted:(e,t)=>Cn(e,16135).pipe(Ht(t),kt(e=>{let[t,r]=e;const{payload:{body:{id:n,bLeadershipOn:o}}}=t,{audio:{bCanUnmute:i}}=r,s=fa(r);if(s){const{isHost:e,bCoHost:t,userId:r,audio:a,muted:c}=s,d=e||t;o&&r>>10==n>>10&&(null!==a&&""!==a&&!0!==c||!d&&!i||Hs("AUDIO_UNMUTE_CONSENT",os.Spotlight))}}),At(ee)),unmuteConsentEpic:(e,t)=>Cn(e,12037).pipe(Ht(t),kt(e=>{let[,t]=e;const r=fa(t);null!==(null==r?void 0:r.audio)&&""!==(null==r?void 0:r.audio)&&1==(null==r?void 0:r.muted)&&Hs("AUDIO_UNMUTE_CONSENT",os.Unmute)}),At(ee)),setAudioAttributeEpic:(e,t)=>Cn(e,Oi).pipe(tt(e=>e.payload.body&&["bCanUnmute","bMutedAll","bMutedUponEntry"].some(t=>void 0!==e.payload.body[t])),Dd(e=>{if(void 0!==e.payload.body.bCanUnmute)return Ca(e.payload.body.bCanUnmute);if(void 0!==e.payload.body.bMutedAll){const r=fa(t.value);if(("computer"===(null==r?void 0:r.audio)||"phone"===(null==r?void 0:r.audio))&&0==r.muted)return wa(e.payload.body.bMutedAll)}return void 0!==e.payload.body.bMutedUponEntry?Ma(e.payload.body.bMutedUponEntry):void 0})),currentUserAudioChangeEpic:(e,t)=>Cn(e,Ci).pipe(Ht(t),tt(e=>{let[,t]=e;return t.socket.zoomSocketStatus===Ia.Connected}),Md(e=>{let[t,r]=e;if(t.payload.body.update&&t.payload.body.update.some(e=>void 0!==e.audio||void 0!==e.muted)){const e=r.meeting.userId,n=t.payload.body.update,[o,i]=ot(Le(n),t=>t.id===e);i.subscribe(e=>{Hs("AUDIO_PARTICIPANT_AUDIO_UPDATE",e)});const{audio:{activeMicrophone:s,activeSpeaker:a,audioSsrc:c,isActiveOperation:d,isMutedAll:u,isSpeakerOnly:l,isAllowToTalk:p}}=r;let h=fa(r);!h&&t.payload.body.add&&t.payload.body.add.length>0&&(h=t.payload.body.add.find(t=>t.id===e),h&&(h.userRole=h.role));const _=ca(h.userRole);return o.pipe(kt(e=>{var t,r,n,o;if(e.audio!==(null===(t=h)||void 0===t?void 0:t.audio))if(""===e.audio)Hs("AUDIO_CURRENT_USER_LEAVE_AUDIO");else if("computer"===e.audio){const e=Wi.getInstance(),t=_&&!p||l;e.joinComputerAudio(c,s,a,!t),t&&Hs("AUDIO_CURRENT_USER_JOIN_BY_VOIP")}else if("phone"===e.audio){var i;"computer"===(null===(i=h)||void 0===i?void 0:i.audio)&&(Wi.getInstance().leaveComputerAudio(),Jl.joinOrLeaveVoip(!1)),Hs("AUDIO_CURRENT_USER_JOIN_BY_PHONE")}if(null!==(r=h)&&void 0!==r&&r.audio&&""!==(null===(n=h)||void 0===n?void 0:n.audio)&&e.muted!==(null===(o=h)||void 0===o?void 0:o.muted))if(!0===e.muted){const e=d?is.Active:u?is.PassiveByMuteAll:is.PassiveByMuteOne;Hs("AUDIO_CURRENT_USER_MUTED",{source:e})}else!1===e.muted&&Hs("AUDIO_CURRENT_USER_UNMUTED",{source:d?"active":"passive"})}),tt(e=>{var t,r;return""!==(null===(t=h)||void 0===t?void 0:t.audio)&&e.muted!==(null===(r=h)||void 0===r?void 0:r.muted)}),At(ae(Na(!1),wa(!1))))}})),handleDialOutEpic:(e,t)=>Cn(e,8198).pipe(Ht(t),tt(e=>{let[t,r]=e;return t.payload.seq==r.audio.dialout.sequence}),kt(e=>{let[t]=e;const r=t.payload.body.result;Hs("AUDIO_DIALOUT_RESULT_CODE",{code:r}),r===as.Success?Hs("AUDIO_DIALOUT_RESULT_SUCCESS"):-1===[as.Calling,as.Ringing,as.Accepted,as.Success].indexOf(r)&&Hs("DIALOUT_FAIL")}),Te(e=>{let[t]=e;return Ta(t.payload.body.result)})),handleDialouCancelEpic:e=>Cn(e,8198).pipe(tt(e=>{var t;return[as.Canceling,as.Canceled,as.CancelFailed].includes(null===(t=e.payload.body)||void 0===t?void 0:t.result)}),kt(e=>{var t;const r=null===(t=e.payload.body)||void 0===t?void 0:t.result;Hs("AUDIO_DIALOUT_RESULT_CODE",{code:r}),r===as.Canceled?Hs("AUDIO_DIALOUT_CANCEL_SUCCESS"):r===as.CancelFailed&&Hs("DIALOUT_CANCEL_FAIL")}),Te(e=>Ta(e.payload.body.result))),handleAllowToTalkEpic:(e,t)=>Cn(e,12036).pipe(Ht(t),Fe(e=>{let[t,r]=e;const n=fa(r),{media:{audioEncodeStatus:o},audio:{audioSsrc:i,activeMicrophone:s,activeSpeaker:a}}=r,{promoterID:c,bAllowTalk:d}=t.payload.body;if((null==n?void 0:n.userId)===c){Hs("AUDIO_ALLOW_TALK_CHANGE",d);const e=Wi.getInstance();if(d){let t=ae(!0);return"success"!==o&&(e.enableAudioEncode(),t=it(Gs("AUDIO_ENCODE_SUCCESS",1).pipe(St(!0)),Gs("AUDIO_ENCODE_FAIL",1).pipe(St(!1)))),t.pipe(Fe(e=>(e&&Hs("AUDIO_UNMUTE_CONSENT",os.AllowToTalk),ee)),Tt(Ra(!0)))}if(Jl.mute(c,!0),"computer"===(null==n?void 0:n.audio))return e.leaveComputerAudio(),ct(300).pipe(Fe(()=>(e.joinComputerAudio(i,s,a,!1),ee)),Tt(Ra(!1)))}return ee})),handleAllowToTalkResponseEpic:e=>Cn(e,8205).pipe(kt(e=>{Hs("AUDIO_ALLOW_TO_TALK_RESPONSE",e.payload.body)}),At(ee)),handleAttendeePromoteDepromote:(e,t)=>On(e,"POOL").pipe(tt(e=>e.payload.data.action===Yu.Depromote||e.payload.data.action===Yu.Promote),Ht(t),kt(e=>{let[t,r]=e;const n=fa(r);"phone"===(null==n?void 0:n.audio)?Jl.audioDrop(n.userId):"computer"===(null==n?void 0:n.audio)&&(t.payload.data.action,Yu.Promote)}),At(ee)),setAudioSSRCEpic:(e,t)=>Cn(e,12035).pipe(Ht(t),Fe(e=>{let[t,r]=e;const{meeting:{currentUserAudioBeforeReset:n},media:{audioDecodeStatus:o,audioEncodeStatus:i}}=r,{payload:{body:{ssrc:s}}}=t;let a=void 0;const c=fa(r);if(c&&"computer"===n&&!c.audio){const e=ca(c.userRole);a=Hd("audio",e?"success":i,o).pipe(tt(e=>{let[t,r]=e;return t&&r}),kt(()=>{Jl.joinOrLeaveVoip(!0)}),St(xo(void 0)))}return a?$e(ae(Da(s)),a):ae(Da(s))})),handleMergeAudioEpic:(e,t)=>Cn(e,7952).pipe(Dt(e=>Gs("AUDIO_CURRENT_USER_JOIN_BY_PHONE",1).pipe(Ht(t),kt(t=>{let[,r]=t;const{BindStatus:n,nOperatorUserId:o}=e.payload.body,i=r.participants.attendeesList.find(e=>e.userId===o);!0===n&&Hs("AUDIO_MERGE_AUDIO_INDICATION",{operatorName:null==i?void 0:i.displayName,operatorUserId:o,operatorRole:null==i?void 0:i.userRole})})))),handleUserGrantAudioCaptureEpic:(e,t)=>wn(e,rs.UserGrantCaptureAudio).pipe(Ht(t),Fe(e=>{let[,t]=e;Hs("AUDIO_CURRENT_USER_JOIN_BY_VOIP");const r=fa(t),{meeting:{isCurrentUserMutedBeforeReset:n},audio:{bMutedUponEntry:o,isUserGrantCaptureAudio:i,isAllowToTalk:s}}=t,a=[Pa(!0)];if(r){!0!==r.muted||s||Jl.mute(r.userId,!0);const e=i||r.isHost||s;(!0===n||!e&&o)&&(Jl.mute(r.userId,!0),n&&a.push(Fo(void 0)))}return Le(a)})),handleUserForbiddenMicrophoneEpic:e=>wn(e,rs.UserForbiddedCaptureAudio).pipe(kt(()=>{Hs("USER_FORBIDDEN_MICROPHONE")}),St(ka(!0))),handleAudioSocketErrorEpic:e=>wn(e,rs.AudioWebsocketBroken).pipe(kt(()=>{Hs("ESTABLISH_AUDIO_STREAM_ERROR")}),At(ee)),handleAudioZeroDataEpic:(e,t)=>wn(e,rs.AudioZeroData).pipe(Ht(t),Dd(e=>{let[,t]=e;const{audio:{webrtcRestartCount:r,activeMicrophone:n}}=t;if(r<3)return Wi.getInstance().restoreWebRTC(n),Ua(r+1)})),handleAutoPlayEpic:(e,t)=>e.pipe(Kt("".concat(xa)),tt(e=>!1===e.payload),Fe(()=>(Hs("AUDIO_AUTO_PLAY_FAILED"),it(Ye(document,"click").pipe(Et(1)),Ye(document,"touchend").pipe(Et(1))).pipe(Ht(t),kt(e=>{let[,t]=e;const{audio:{audioSsrc:r,activeMicrophone:n,activeSpeaker:o}}=t,i=fa(t),s=ca(i.userRole);Wi.getInstance().joinComputerAudio(r,n,o,!s),Jl.joinOrLeaveVoip(!0)}),St(xa(!0))))))});const Xl={asnIds:{asn1:{userId:0,displayName:null},asn2:{userId:0,displayName:null},asn3:{userId:0,displayName:null}},microphoneDevicesList:[],speakerDevicesList:[],activeMicrophone:"default",activeSpeaker:"default",isMicrophoneForbidden:!1,audioSsrc:0,bCanUnmute:!1,bMutedUponEntry:!1,isAllowToTalk:!1,dialout:{sequence:0,returnCode:-1},canPlayAudio:!1,isActiveOperation:!1,isMutedAll:!1,isUserGrantCaptureAudio:!1,webrtcRestartCount:0,isComputerAudioLoading:!1,isSpeakerOnly:!1},Ql=Fr({["".concat(Aa)]:ju((e,t)=>{let{payload:r}=t;e.asnIds=c({},r)}),["".concat(Ca)]:ju((e,t)=>{let{payload:r}=t;e.bCanUnmute=r}),["".concat(Oa)]:ju((e,t)=>{let{payload:r}=t;const{dialout:n}=e;n.sequence=r}),["".concat(Ta)]:ju((e,t)=>{let{payload:r}=t;const{dialout:n}=e;n.returnCode=r}),["".concat(Ra)]:ju((e,t)=>{let{payload:r}=t;e.isAllowToTalk=r,e.isAllowToTalkAttendeeConnected=!1}),["".concat(Na)]:ju((e,t)=>{let{payload:r}=t;e.isActiveOperation=r}),["".concat(wa)]:ju((e,t)=>{let{payload:r}=t;e.isMutedAll=r}),["".concat(Da)]:ju((e,t)=>{let{payload:r}=t;e.audioSsrc=r}),["".concat(Ma)]:ju((e,t)=>{let{payload:r}=t;e.bMutedUponEntry=r}),["".concat(Pa)]:ju((e,t)=>{let{payload:r}=t;e.isUserGrantCaptureAudio=r}),["".concat(ka)]:ju((e,t)=>{let{payload:r}=t;e.isMicrophoneForbidden=r}),["".concat(Ua)]:ju((e,t)=>{let{payload:r}=t;e.webrtcRestartCount=r}),["".concat(Va)]:ju((e,t)=>{let{payload:r}=t;e.microphoneDevicesList=r}),["".concat(La)]:ju((e,t)=>{let{payload:r}=t;e.speakerDevicesList=r}),["".concat(ja)]:ju((e,t)=>{let{payload:r}=t;e.activeMicrophone=r}),["".concat(Ha)]:ju((e,t)=>{let{payload:r}=t;e.activeSpeaker=r}),["".concat(xa)]:ju((e,t)=>{let{payload:r}=t;e.canPlayAudio=r}),["".concat(Fa)]:e=>{let{dialout:{returnCode:t}}=e;return c(c({},Xl),{},{dialout:c(c({},Xl.dialout),{},{returnCode:t})})},["".concat(Ga)]:ju((e,t)=>{let{payload:r}=t;e.isComputerAudioLoading=r}),["".concat(Ba)]:ju((e,t)=>{let{payload:r}=t;e.isSpeakerOnly=r}),["".concat(Wa)]:ju((e,t)=>{let{payload:r}=t;e.isAllowToTalkAttendeeConnected=r})},Xl),Zl=An(Yl),$l=e=>4294966272&e,ep=e=>{let t={R:0,G:0,B:0,A:0};if("string"==typeof e&&e.startsWith("#")){const a=e.slice(1);try{if(3===a.length){const e=Array.from(a).map(e=>e.repeat(2)).map(e=>parseInt(e,16));t={R:e[0]/255,G:e[1]/255,B:e[2]/255,A:1}}else if(6===a.length||8===a.length){var r,n,o,i,s;const e=null===(r=a.match(/\S{2}/g))||void 0===r?void 0:r.map(e=>parseInt(e,16));t={R:(null!==(n=null==e?void 0:e[0])&&void 0!==n?n:0)/255,G:(null!==(o=null==e?void 0:e[1])&&void 0!==o?o:0)/255,B:(null!==(i=null==e?void 0:e[2])&&void 0!==i?i:0)/255,A:null!=e&&e[3]?(null!==(s=null==e?void 0:e[3])&&void 0!==s?s:0)/255:1}}}catch(t){console.warn("error color representation:",e)}}else"object"==typeof e&&(t={R:e.R/255,G:e.G/255,B:e.B/255,A:e.A||1});return t},tp=Ui.createAgent(),rp=Wi.getInstance();var np=Object.freeze({__proto__:null,handleStartCaptureVideoSuccessEpic:(e,t)=>wn(e,rs.StartVideoCaptureSuccess).pipe(Ht(t),Dd(e=>{let[,t]=e;const{video:{cameraDevicesList:r,activeCamera:n},meeting:{userId:o}}=t;return r.length<1?(Hs("CAN_NOT_DETECT_CAMERA",{reason:"Cannot detect camera devices"}),void rp.stopCaptureVideo()):"default"===n||r.some(e=>e.deviceId===n)?void tp.muteAttendeeVideo(o,!1):(Hs("CAN_NOT_FIND_CAMERA",{reason:"cannot find target camera"}),void rp.stopCaptureVideo())})),startVideoResponse:(e,t)=>Cn(e,Ci).pipe(Ht(t),tt(e=>{var t,r,n,o;let[i,s]=e;const a=s.meeting.userId;return(null==i||null===(t=i.payload)||void 0===t||null===(r=t.body)||void 0===r||null===(n=r.update)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.id)===a}),tt(e=>{var t,r,n,o;let[i]=e;return!0===(null==i||null===(t=i.payload)||void 0===t||null===(r=t.body)||void 0===r||null===(n=r.update)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.bVideoOn)}),Dd(()=>(Hs("VIDEO_CAPTURE_START_SUCCESS"),hc(!0)))),handleForbiddenCaptureVideoEpic:e=>wn(e,rs.UserForbiddedCaptureVideo).pipe(kt(()=>Hs("VIDEO_USER_FORBIDDEN_CAPTURE")),St(fc(!0))),handleCameraIsTakenByOtherProgramsEpic:e=>wn(e,rs.UserCameraIsTakenByOtherPrograms).pipe(kt(()=>Hs("VIDEO_CAMERA_IS_TAKEN",{reason:"User camera is taken by other programs."})),St(mc(!0))),handleVideoSocketErrorEpic:e=>wn(e,rs.VideoWebsocketBroken).pipe(kt(()=>{Hs("VIDEO_ESTABLISH_STREAM_ERROR",{reason:"Video websocket broken."})}),At(ee)),handleStopVideoCaptureFailedEpic:e=>wn(e,rs.StopVideoCaptureFailed).pipe(kt(()=>{Hs("VIDEO_CAPTURE_STOP_RESULT",{failed:!0,reason:"Unknown."})}),At(ee)),handleStopVideoCaptureSuccessEpic:(e,t)=>wn(e,rs.StopVideoCaptureSuccess).pipe(Ht(t),Dd(e=>{let[,t]=e;const{meeting:{userId:r},video:{isCurrentUserStartedVideo:n}}=t;n||Hs("VIDEO_CAPTURE_STOP_RESULT"),tp.muteAttendeeVideo(r,!0)})),stopVideoResponse:(e,t)=>Cn(e,Ci).pipe(Ht(t),tt(e=>{var t,r,n,o;let[i,s]=e;const a=s.meeting.userId;return(null==i||null===(t=i.payload)||void 0===t||null===(r=t.body)||void 0===r||null===(n=r.update)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.id)===a}),tt(e=>{var t,r,n,o;let[i]=e;return!1===(null==i||null===(t=i.payload)||void 0===t||null===(r=t.body)||void 0===r||null===(n=r.update)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.bVideoOn)}),Dd(()=>(Hs("VIDEO_CAPTURE_STOP_RESULT"),hc(!1)))),receiveVideoMuteIndication:(e,t)=>Cn(e,16133).pipe(Ht(t),tt(e=>{var t,r;let[n,o]=e;return(null==n||null===(t=n.payload)||void 0===t||null===(r=t.body)||void 0===r?void 0:r.id)===o.meeting.userId}),Dd(e=>{let[t]=e;const{id:r,bVideoMute:n}=t.payload.body;return Hs("RECEIVE_VIDEO_MUTE_INDICATION",{id:r,isVideoMuted:n}),!0===n&&rp.stopCaptureVideo(),!1===n&&Hs("ASK_FOR_START_VIDEO_CONSENT",{id:r,isVideoMuted:n}),Ec(n)})),receiveVideoActiveIndication:e=>Cn(e,16129).pipe(Te(e=>{const{payload:{body:{id:t,bVideoOn:r}}}=e,n=$l(t);return Hs("RECEIVE_VIDEO_ACTIVE_INDICATION",{bVideoOn:r,userId:n}),uc({bVideoOn:r,userId:n})})),receiveVideoSsrcIndication:(e,t)=>Cn(e,16131).pipe(tt(e=>void 0!==e.payload.body.ssrc),Ht(t),Dt(e=>{let[t,r]=e;const{meeting:{isCurrentUserStartVideoBeforeReset:n},media:{videoEncodeStatus:o},video:{captureCanvasList:i,activeCamera:s,isVerifiedVideoCaptureCanvasAfterFailover:a}}=r,{payload:{body:{ssrc:c}}}=t;let d=void 0;const u=fa(r);return u&&!0===n&&!0!==u.bVideoOn&&(d=Hd("video",o,"success").pipe(tt(e=>{let[t,r]=e;return t&&r}),Fe(()=>{const e=[hc(void 0)];return!1===a&&(Array.isArray(i)?i.forEach(e=>{Gd(document.querySelector("#".concat(e)))}):Gd(document.querySelector("#".concat(i))),e.push(bc(!0))),Wi.getInstance().startCaptureVideo(c,s,640,360),Le(e)}))),d?$e(ae(dc(c)),d):ae(dc(c))})),receiveVideoDecodeMaxSizeEpic:e=>wn(e,rs.VideoDecodeMaxSize).pipe(tt(e=>{var t;return null==e||null===(t=e.payload)||void 0===t?void 0:t.data}),Md(e=>{const{size:t}=e.payload.data;return ae(vc(t))})),spotlightVideoResponseEpic:e=>Cn(e,16135).pipe(Te(e=>{const{payload:{body:{bLeadershipOn:t,id:r}}}=e,n=[];return t&&n.push($l(r)),Hs("VIDEO_SPOTLIGHT_CHANGE",{spotlightList:n}),_c(n)})),handleGroupLayoutIndicationEpic:(e,t)=>Cn(e,7958).pipe(Ht(t),Te(e=>{let[t,r]=e;const{payload:{body:n}}=t;let o=[];n&&n.group_list&&n.group_list[0]&&(o=n.group_list[0].map(e=>e.id));const i=ma(r);return o=o.filter(e=>i.findIndex(t=>t.userId===e)>=0),Hs("VIDEO_SPOTLIGHT_CHANGE",{spotlightList:o}),_c(o)})),handleCurrentVideoResolution:e=>wn(e,rs.CurrentVideoResolution).pipe(Dd(e=>(Hs("VIDEO_RENDER_START_SUCCESS"),Hs("RECEIVE_VIDEO_DIMENSION_CHANGE",e.payload.data),Ac(e.payload.data)))),handleMeetingVideoAttributeEpic:e=>Cn(e,Oi).pipe(tt(e=>{const{payload:{body:t}}=e;return void 0!==(null==t?void 0:t.bFollowHostVideo)||void 0!==(null==t?void 0:t.VideoHd)||void 0!==(null==t?void 0:t.bCanUnmuteVideo)}),Te(e=>{const{payload:{body:{bFollowHostVideo:t,VideoHd:r,bCanUnmuteVideo:n}}}=e;return void 0!==t?(Hs("VIDEO_FOLLOW_HOST_ORDER_CHANGE",{bOn:t}),Tc(t)):void 0!==n?Pc(n):(rp.enableHardwareAccelerationForVideoEncode(!1),Dc(1===r))})),handleHostDragLayoutIndicationEpic:(e,t)=>Cn(e,7957).pipe(Ht(t),Te(e=>{let[t,r]=e;const{video:{isFollowHostVideoLayout:n}}=r,{payload:{body:o}}=t,i=o&&o.drag_list&&o.drag_list.map(e=>e.id);return n&&Hs("VIDEO_HOST_DRAG_LAYOUT_CHANGE",{layout:i}),Rc(i)})),handlePeerVideoStateChangeEpic:(e,t)=>Cn(e,Ci).pipe(Ht(t),tt(e=>{let[t,r]=e;const{meeting:{userId:n},video:{subscribedVideoList:o}}=r,i=t.payload.body.update,s=t.payload.body.remove;return i&&i.length>0&&i.findIndex(e=>e.id!==n&&(void 0!==e.bVideoOn||e.bHold))>-1||s&&s.some(e=>o.includes(e.id))}),kt(e=>{let[t,r]=e;const{payload:{body:{remove:n,update:o}}}=t,{video:{subscribedVideoList:i}}=r,s=ga(r);if(n&&n.length>0&&n.filter(e=>i.includes(e.id)).forEach(e=>{Hs("VIDEO_OLD_USER_STOP",{userId:e.id})}),o&&o.length>0){const e=o.filter(e=>void 0!==e.bVideoOn).filter(e=>-1===s.findIndex(t=>t.userId===e.id)),t=o.filter(e=>!0===e.bHold);t.length>0&&t.filter(e=>i.includes(e.id)).forEach(e=>{Hs("VIDEO_OLD_USER_STOP",{userId:e.id})}),e.forEach(e=>{e.bVideoOn?Hs("VIDEO_NEW_USER_START",{userId:e.id}):Hs("VIDEO_OLD_USER_STOP",{userId:e.id})})}}),At(ee))});const op={videoSsrc:0,cameraDevicesList:[],activeCamera:"default",activeVideoId:0,isCurrentUserStartedVideo:!1,spotlightUserList:[],isCaptureForbidden:!1,receivedVideoMaxQuality:2,captureCanvasList:[],subscribedVideoList:[],renderedVideoList:[],isVideoMuted:!1,isCaptureCameraLoading:!1,isCameraTaken:!1,receivedVideoDimension:{width:0,height:0},isFollowHostVideoLayout:!1,hostDragLayout:[],isSupportHDVideo:!1,highDefinitionVideoId:void 0,bCanUnmuteVideo:!1},ip=Fr({["".concat(dc)]:ju((e,t)=>{let{payload:r}=t;e.videoSsrc=r}),["".concat(lc)]:ju((e,t)=>{let{payload:r}=t;e.cameraDevicesList=r}),["".concat(pc)]:ju((e,t)=>{let{payload:r}=t;e.activeCamera=r}),["".concat(uc)]:ju((e,t)=>{let{payload:r}=t;e.activeVideoId=r.userId}),["".concat(hc)]:ju((e,t)=>{let{payload:r}=t;e.isCurrentUserStartedVideo=r}),["".concat(_c)]:ju((e,t)=>{let{payload:r}=t;e.spotlightUserList=r}),["".concat(fc)]:ju((e,t)=>{let{payload:r}=t;e.isCaptureForbidden=r}),["".concat(vc)]:ju((e,t)=>{let{payload:r}=t;e.receivedVideoMaxQuality=r}),["".concat(yc)]:ju((e,t)=>{let{payload:r}=t,n=r;Array.isArray(r)||(n=[r]),e.captureCanvasList=n}),["".concat(Ec)]:ju((e,t)=>{let{payload:r}=t;e.isVideoMuted=r}),["".concat(gc)]:ju((e,t)=>{let{payload:r}=t;e.isCaptureCameraLoading=r}),["".concat(mc)]:ju((e,t)=>{let{payload:r}=t;e.isCameraTaken=r}),["".concat(bc)]:ju((e,t)=>{let{payload:r}=t;e.isVerifiedVideoCaptureCanvasAfterFailover=r}),["".concat(Sc)]:ju((e,t)=>{let{payload:r}=t;e.isVerifiedVideoRenderCanvasAfterFailover=r}),["".concat(Ac)]:ju((e,t)=>{let{payload:r}=t;e.receivedVideoDimension=r}),["".concat(Cc)]:ju((e,t)=>{let{payload:r}=t;e.subscribedVideoList.includes(r)||e.subscribedVideoList.push(r)}),["".concat(Oc)]:ju((e,t)=>{let{payload:r}=t;const n=e.subscribedVideoList.indexOf(r);n>=0&&e.subscribedVideoList.splice(n,1)}),["".concat(wc)]:ju((e,t)=>{let{payload:r}=t;-1===e.renderedVideoList.findIndex(e=>e.userId===r.userId&&e.key===r.key&&e.canvasId===r.canvasId)&&e.renderedVideoList.push(c({},r))}),["".concat(Nc)]:ju((e,t)=>{let{payload:r}=t;const n=e.renderedVideoList.findIndex(e=>e.userId===r.userId&&e.key===r.key&&e.canvasId===r.canvasId);n>=0&&e.renderedVideoList.splice(n,1)}),["".concat(Tc)]:ju((e,t)=>{let{payload:r}=t;e.isFollowHostVideoLayout=r}),["".concat(Rc)]:ju((e,t)=>{let{payload:r}=t;e.hostDragLayout=r}),["".concat(Dc)]:ju((e,t)=>{let{payload:r}=t;e.isSupportHDVideo=r}),["".concat(Mc)]:ju((e,t)=>{let{payload:r}=t;e.highDefinitionVideoId=r}),["".concat(Pc)]:ju((e,t)=>{let{payload:r}=t;e.bCanUnmuteVideo=r}),["".concat(Ic)]:e=>c(c({},op),{},{captureCanvasList:e.captureCanvasList,activeCamera:e.activeCamera,isVerifiedVideoCaptureCanvasAfterFailover:!1,isVerifiedVideoRenderCanvasAfterFailover:!1})},op),sp=An(np),{InitSuccessVideo:ap,InitSuccessAudio:cp,InitSuccessSharing:dp,InitFailedVideo:up,InitFailedAudio:lp,InitFailedSharing:pp}=rs;let hp;const _p=new J(In(Rl,xl,Kl,An(Object.freeze({__proto__:null,connectToMediaStreamEpic:(e,t)=>e.pipe(Kt("".concat(ln)),Ht(t),tt(e=>{let[,t]=e;return void 0!==t.media.assetsPath&&void 0!==t.media.mediaConstraints}),kt(e=>{let[,r]=e;const{media:{assetsPath:n,mediaConstraints:o,fileWithVersion:i},meeting:{enableAudioQos:s,enableVideoQos:a}}=r;hp=Wi.getInstance(),n&&o&&hp.setAssetsAndConstraint(n,o,i),xd(t).pipe(Ht(t)).subscribe(e=>{let[t,r]=e;const{meeting:{svcUrl:n,meetingNumber:o,conId:i,e2eEncrypt:c,userId:d,isWebinar:u}}=r;var l;t&&(null===(l=hp)||void 0===l||l.connect({svcUrl:n,meetingNumber:o,conId:i,e2eEncrypt:c,isViewOnly:ca(t.userRole),currentUserId:d,isWebinar:u,enableAudioQos:s,enableVideoQos:a}))})}),Dt(()=>Xe(e=>{var t;return null===(t=hp)||void 0===t?void 0:t.registerCallback(e)},e=>{var t;return null===(t=hp)||void 0===t?void 0:t.unregisterCallback(e)},(e,t)=>({type:e,data:t})).pipe(Te(e=>pn(e))))),connectedMediaStreamEpic:e=>wn(e,[ap,cp,dp,up,lp,pp]).pipe(Md(e=>{const{payload:{type:t,data:r}}=e;if(t===cp||t===lp){if(r===ns.EncodeSuccess)return Hs("AUDIO_ENCODE_SUCCESS"),ae(hn("success"));if(r===ns.DecodeSuccess)return Hs("AUDIO_DECODE_SUCCESS"),ae(_n("success"));if(r===ns.EncodeFailed)return Hs("AUDIO_ENCODE_FAIL"),ae(hn("failed"));if(r===ns.DecodeFailed)return Hs("AUDIO_DECODE_FAIL"),ae(_n("failed"))}else if(t===ap||t===up){if(r===ns.EncodeSuccess)return Hs("VIDEO_ENCODE_SUCCESS"),ae(fn("success"));if(r===ns.DecodeSuccess)return Hs("VIDEO_DECODE_SUCCESS"),ae(vn("success"));if(r===ns.EncodeFailed)return Hs("VIDEO_ENCODE_FAIL"),ae(fn("failed"));if(r===ns.DecodeFailed)return Hs("VIDEO_DECODE_FAIL"),ae(vn("failed"))}else if(t===dp||t===pp){if(r===ns.EncodeSuccess)return Hs("SHARING_ENCODE_SUCCESS"),ae(yn("success"));if(r===ns.DecodeSuccess)return Hs("SHARING_DECODE_SUCCESS"),ae(En("success"));if(r===ns.EncodeFailed)return Hs("SHARING_ENCODE_FAIL"),ae(yn("failed"));if(r===ns.DecodeFailed)return Hs("SHARING_DECODE_FAIL"),ae(En("failed"));if(t===dp&&void 0===r)return Hs("SHARING_DECODE_SUCCESS"),ae(En("success"))}})),mediaDeviceUpdateEpic:(e,t)=>wn(e,[ap,cp]).pipe(Pd(()=>{if("object"==typeof navigator.mediaDevices)return $e(Fd(),$e(wn(e,rs.StartVideoCaptureSuccess),Ye(navigator.mediaDevices,"devicechange"),wn(e,rs.UserGrantCaptureAudio)).pipe(Fe(()=>Fd().pipe(kt(()=>{Hs("MEDIA_DEVICE_CHANGE")}))))).pipe(Ht(t),Fe(e=>{let[t,r]=e;const n=[Va(t.microphones),La(t.speakers),lc(t.cameras)];if(r.audio){const{audio:{activeMicrophone:e,activeSpeaker:s,microphoneDevicesList:a,speakerDevicesList:c}}=r,{microphones:d,speakers:u}=t,l=a.filter(e=>-1===d.findIndex(t=>t.deviceId===e.deviceId)),p=c.filter(e=>-1===u.findIndex(t=>t.deviceId===e.deviceId));var o,i;l.length>0&&l[0].deviceId===e&&(null===(o=hp)||void 0===o||o.changeMicrophone("default"),n.push(ja("default"))),p.length>0&&p[0].deviceId===s&&(null===(i=hp)||void 0===i||i.changeSpeaker("default"),n.push(Ha("default")))}return Le(n)}))})),sendUserNodeListToMediaSDKEpic:e=>Rn(e,Ci).pipe(kt(e=>{const{type:t,payload:{body:r}}=e,n=Wi.getInstance(),o=t==="".concat(en);if(r.add){const e=r.add.map(e=>({userid:e.id,sn:e.zoomID&&fo(e.zoomID)}));o||n.sendUserNodeList(e),n.updateUserMediaSN({added:e,isFromMainSession:o,iVType:fi.SHARING_DECODE})}r.remove&&(o||n.sendUserNodeList(r.remove.map(e=>({userid:e.id,bremove:!0}))),n.updateUserMediaSN({removed:r.remove.map(e=>e.id),isFromMainSession:o,iVType:fi.SHARING_DECODE}))}),At(ee)),handleMediaSdkGcmIVResponseEpic:e=>wn(e,rs.AesGcmIvResponse).pipe(kt(e=>{const{payload:{data:{workerType:t,iv:r}}}=e,n=ii.get(Ei.WebclientIVState);if(n){const e=c(c({},n),{},{[t]:r});ii.set(Ei.WebclientIVState,e,ni.SessionStorage)}}),At(ee)),handleMediaEncryptIndication:e=>e.pipe(Kt("".concat(zr)),tt(e=>[Ti,Ri,Ai].includes(e.payload.evt)),Te(e=>{const{payload:{evt:t,body:{encryptKey:r,additionalType:n}}}=e;return mn({type:t===Ti?"audio":t===Ri?"video":"sharing",encryptKey:r,additionalType:n})}))})))),fp=(e,t,r)=>_p.pipe(Fe(n=>n(e,t,r))),vp={meeting:Tl,socket:Hl,participants:Wl,media:zl},yp=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=$.constructor,r=new t($.SchedulerAction),n=new q,o=void 0,i=function(t){o=t;var i=(new q).pipe(le(r)),s=(new q).pipe(le(r)),a=new zt(i),c=new Jt(s,o.getState());return n.pipe(Te((function(t){var r="dependencies"in e?t(a,c,e.dependencies):t(a,c);if(!r)throw new TypeError('Your root Epic "'+(t.name||"")+"\" does not return a stream. Double check you're not missing a return statement!");return r})),Fe((function(e){return Le(e).pipe(wt(r),le(r))}))).subscribe(o.dispatch),function(e){return function(t){var r=e(t);return s.next(o.getState()),i.next(t),r}}};return i.run=function(e){n.next(e)},i}(),Ep=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||S;function gp(e){return function(e){for(var t=Object.keys(e),r={},n=0;ne.userId===t);if(o.findIndex(e=>e===wp.Attendee)>-1&&(i=Ea(n).find(e=>e.userId===t)),!i)return Promise.reject({type:Ds,reason:"no matching user"});{const{meeting:{userId:e}}=r.getState();for(let r=0;r1?n-1:0),s=1;s{if(this[Ip][e]&&void 0===o.getState()[e]){const{epic:t,reducer:r,Client:n}=this[Ip][e];o.injectReducer(e,r),o.injectEpic(t);const i=new n(o);this.modules.set(e,i)}}),null!=n&&n.audio&&void 0===o.getState().audio&&(o.injectReducer("audio",Ql),o.injectEpic(Zl)),null!=n&&n.video&&void 0===o.getState().video&&(o.injectReducer("video",ip),o.injectEpic(sp)),null!=n&&n.screen&&void 0===o.getState().share&&(o.injectReducer("share",xu),o.injectEpic(Fu))}return n(Ro({apiKey:e,signature:t,language:a})),n(gn({mediaConstraints:r&&r.constraints||{},assetsPath:i,fileWithVersion:s})),new Promise((e,t)=>{null!=r&&r.skipJsMedia?e(""):Xo(c,()=>{e("")},()=>{t({type:Ds,reason:"depedent assets are not accessible"})})})}on(e,t){((e,t)=>{const r=ks[e];if(r){const n=Ls.get(e);if(n)n.push(t),Ls.set(e,n);else{const n=[t];Ls.set(e,n);const o=$e(...r.map(e=>{const{event:t,payload:r}=e;return Ye(Us,t).pipe(Te(e=>r(e)),le(me))})).subscribe(t=>{const r=Ls.get(e);r&&r.forEach(e=>{e(t)})});js.push(o)}}})(e,t)}off(e,t){((e,t)=>{if(ks[e]){const r=Ls.get(e);if(Array.isArray(r)){const n=r.filter(e=>e!==t);Ls.set(e,n)}}})(e,t)}getFeatureModule(e){return this.modules.get(e)}leave(){const{[Sp]:e,[bp]:t}=this;return"connected"===e().socket.zoomSocketStatus&&t(Io()),Promise.resolve("")}end(){const{[Sp]:e,[bp]:t}=this;return"connected"===e().socket.zoomSocketStatus?(t(Ao()),ct(500).pipe(kt(()=>{Bs()}),St("")).toPromise()):Promise.resolve("")}changeName(e,t){const r=this[mp].getState(),{meeting:{bAllowAttendeeRename:n}}=r,o=fa(r),i=ca(o.userRole),s=va(r);if(i)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"});if(t&&t!==(null==o?void 0:o.userId)){if(s){const{participants:{attendeesList:n}}=r,o=n.find(e=>e.userId===t);if(o)return Vp.rename(t,po(e),po(o.displayName)),Nd(t,t=>t.displayName===e);{const n=Ea(r).find(e=>e.userId===t);return n?(Zu.getInstance().rename(n.jid,e),Fs("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",t=>{const r=t.find(e=>e.jid===n.jid);return r&&r.name===e})):Promise.reject({type:Ds,reason:"no matching user"})}}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})}return e===o.displayName?Promise.resolve():s||n?(Vp.rename(o.userId,po(e),po(o.displayName)),Fs("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t=>t.displayName===e)):Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"host disallow rename themselves"})}makeHost(e){return Vp.assignHost(e,!1),Nd(e,e=>!0===e.isHost)}makeCoHost(e){const t=this[mp].getState(),r=ma(t).find(t=>t.userId===e);return!0===(null==r?void 0:r.bCoHost)?Promise.reject({type:Ds,reason:"user:[".concat(e,"] is already co-host ")}):(Vp.assignHost(e,!0),Nd(e,e=>!0===e.bCoHost))}revokeCoHost(e){const t=this[mp].getState(),r=ma(t).find(t=>t.userId===e);return!1===(null==r?void 0:r.bCoHost)?Promise.reject({type:Ds,reason:"user:[".concat(e,"] is not a co-host")}):(Vp.revokeCoHost(e),Nd(e,e=>!1===e.bCoHost))}isHost(){const e=this[mp].getState(),t=fa(e);return!!t&&t.isHost}isCoHost(){const e=this[mp].getState(),t=fa(e);return!!t&&!!t.bCoHost}isOriginHost(){const{meeting:{isOriginHost:e}}=this[Sp]();return e}getCurrentUserInfo(){const e=this[mp].getState(),t=fa(e);if(t){const r={userId:t.userId,displayName:t.displayName,audio:t.audio,muted:t.muted,isHost:t.isHost,isCoHost:t.bCoHost,isGuest:t.bGuest,avatar:t.avatar,isPhoneUser:sa(t.userType),bRaiseHand:t.bRaiseHand,bHold:t.bHold,bVideoOn:t.bVideoOn,sharerOn:t.sharerOn,sharePause:t.sharerPause,feedback:t.feedback};if(e.meeting.isWebinar&&ca(t.userRole)){const{audio:t}=e,n=null==t?void 0:t.isAllowToTalk;Object.assign(r,{isAllowToTalk:n})}return r}return null}getParticipantsList(){const e=this[mp].getState(),{meeting:{meetingStatus:t}}=e,r=fa(e);return"joined"===t&&r&&!r.bHold?ma(e).map(e=>({userId:e.userId,displayName:e.displayName,audio:e.audio,muted:e.muted,isHost:e.isHost,isCoHost:e.bCoHost,isGuest:e.bGuest,avatar:e.avatar,isPhoneUser:sa(e.userType),bRaiseHand:e.bRaiseHand,bHold:e.bHold,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharePause:e.sharerPause,feedback:e.feedback,bLocalRecord:e.bLocalRecord,sdkKey:e.sdkKey})):[]}getMeetingHost(){const e=this[Sp](),t=Sa(e);return t?{userId:t.userId,displayName:t.displayName,audio:t.audio,muted:t.muted,isHost:t.isHost,isCoHost:t.bCoHost,avatar:t.avatar,isPhoneUser:sa(t.userType),bRaiseHand:t.bRaiseHand,bHold:t.bHold,bVideoOn:t.bVideoOn,sharerOn:t.sharerOn,feedback:t.feedback}:null}getMeetingInfo(){const{meeting:{meetingStatus:e,isOnHold:t,meetingNumber:r,passWord:n,userName:o,userEmail:i,meetingTopic:s,meetingOptions:a,encType:c,region:d,network:u,topic:l,zlkJwtToken:p,userId:h,lang:_,inviteEmail:f,meetingId:v,participantID:y,h323Password:E,recordingDisclaimer:g,recordingDisclaimerForRecorder:m}}=this[Sp](),S="joined"===e&&!t;if(p)return{topic:l,password:n,userName:o,isInMeeting:S,userId:h,meetingId:v};{let e="";return 0===c?e="None":1===c?e="AES ECB":2===c&&(e="AES GCM"),{meetingNumber:r,password:n,userName:o,userEmail:i,inviteEmail:f,meetingTopic:s,encryptionType:e,region:d,network:u,isInMeeting:S,userId:h,lang:_,webEndpoint:Ku,meetingId:v,participantId:y,telPwd:E,recordingInfo:{recordingDisclaimer:g,recordingDisclaimerForRecorder:m,isUserEnableRecordingReminder:null==a?void 0:a.isUserEnableRecordingReminder}}}}}).prototype,"end",[Tp,Cp],Object.getOwnPropertyDescriptor(Up.prototype,"end"),Up.prototype),l(Up.prototype,"changeName",[Cp],Object.getOwnPropertyDescriptor(Up.prototype,"changeName"),Up.prototype),l(Up.prototype,"makeHost",[Mp,Tp,Cp],Object.getOwnPropertyDescriptor(Up.prototype,"makeHost"),Up.prototype),l(Up.prototype,"makeCoHost",[Pp,Tp,Cp],Object.getOwnPropertyDescriptor(Up.prototype,"makeCoHost"),Up.prototype),l(Up.prototype,"revokeCoHost",[kp,Tp,Cp],Object.getOwnPropertyDescriptor(Up.prototype,"revokeCoHost"),Up.prototype),Up);var jp=Object.freeze({__proto__:null,receiveChatMessageFromXMPPEpic:(e,t)=>On(e,"Message").pipe(Ht(t),Fe(e=>{let[t,r]=e;const{payload:{data:{sn:n,senderName:o,senderJid:i,receiver:s,text:a,type:c}}}=t,d=fa(r),u=Ea(r),{meeting:{jid:l,userId:p},participants:{xmppAttendeeList:h}}=r;return Ii.beginDecrypt({decryptedText:a,type:yi.XMPP_CHAT,zoomId:n}).then(e=>{var t;let{message:r}=e,n=null,a=0,_="";d&&ca(d.userRole)&&l===s?(n=h.find(e=>e.jid===i),a=p,_=d.displayName):c===Di.Panelist&&(n=u.find(e=>e.jid===i),a=Di.Panelist,_=xi.displayName);const f={message:r,sender:{name:o,userId:(null===(t=n)||void 0===t?void 0:t.userId)||0,avatar:""},receiver:{name:_,userId:a},timestamp:(new Date).getTime()};return Hs("CHAT_RECEIVE_MESSAGE_EVENTS",f),xc(f)})})),receiveChatMessageFromRWGEpic:(e,t)=>Cn(e,7944).pipe(Ht(t),Fe(e=>{let[t,r]=e;const{meeting:{bIbDisableChat:n,isWebinar:o},participants:{attendeesList:i}}=r,{payload:{body:{attendeeNodeID:s,sn:a,destNodeID:c,text:d,senderName:u,msgID:l}}}=t,p=fa(r),h=Ea(r);if(p){const e=ca(null==p?void 0:p.userRole)&&s===p.userId&&!l;if(!n&&!e){let e,t=a;if(!a){const e=i.find(e=>e.userId===c);e&&(t=e.zoomID)}if(s===Di.SilentModeUsers){const t=ho(d),r={id:l,message:t,sender:{name:"Host",userId:c},receiver:{name:"Everyone (in Waiting Room)",userId:s},timestamp:(new Date).getTime()};e=Promise.resolve(r)}else e=Ii.beginDecrypt({decryptedText:d,zoomId:t,type:yi.RWG_CHAT}).then(e=>{let{message:t}=e;const r=i.find(e=>e.userId===c),n=u?ho(u):null==r?void 0:r.displayName;let a="";if(s===Di.All)a=o?"All panelists and attendees":"Everyone";else if(s===Di.Panelist)a="All panelists";else if(o&&h.findIndex(e=>e.userId===s)>-1)a=h.find(e=>e.userId===s).displayName;else{const e=i.find(e=>e.userId===s);e&&(a=e.displayName)}return{id:l,message:t,sender:{name:n,userId:c,avatar:null==r?void 0:r.avatar},receiver:{name:a,userId:s},timestamp:(new Date).getTime()}});return e.then(e=>(Hs("CHAT_RECEIVE_MESSAGE_EVENTS",e),xc(e)))}}return ee})),changePrivilegeResponse:(e,t)=>Cn(e,Oi).pipe(tt(e=>{var t,r;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.chatPriviledge)||void 0!==(null===(r=e.payload.body)||void 0===r?void 0:r.bAllowAttendeeChat)}),Ht(t),Te(e=>{let[t,r]=e;const{payload:{body:{chatPriviledge:n,bAllowAttendeeChat:o}}}=t,{chat:{chatPrivilege:i}}=r;return void 0!==o?(Hs("CHAT_PRIVILEGE_CHANGE",!0===o?{chatPrivilege:i}:{chatPrivilege:Ni.NoAttendee}),Gc(o)):(Hs("CHAT_PRIVILEGE_CHANGE",{chatPrivilege:n}),Hc(n))})),chatResponseEpic:(e,t)=>Cn(e,4136).pipe(Ht(t),Fe(e=>{let[t,r]=e;const{payload:{body:{result:n,destNodeID:o,msgID:i}}}=t,{meeting:{userId:s},chat:{chatHistory:a}}=r;if(n===Pi.Success){var c,d;const e=[];for(let t=a.length-1;t>=0;t--){const r=a[t];if(!r.id&&r.sender.userId===s&&[Di.All,Di.Panelist,o].includes(r.receiver.userId)&&e.unshift(r),r.id)break}const t=e.length>0&&null!==(c=null===(d=e[0])||void 0===d?void 0:d.highResTimeStampForIdentification)&&void 0!==c?c:0;return Hs("CHAT_MESSAGE_RESPONSE",{msgId:i,receiverId:o,identification:t}),ae(Bc({destNodeID:o,msgID:i,userId:s}))}return n===Pi.Delete||n===Pi.Block?ae(Wc({msgId:i})):ee})),chatCmdResponseEpic:e=>Cn(e,4238).pipe(Fe(e=>{const{payload:{body:{bSuccess:t,cmd:r,msgID:n}}}=e,o=[];if(t)switch(r){case Mi.Delete:o.push(Wc({msgId:n})),Hs("CHAT_DELETE_MESSAGE_REPONSE",{id:n})}return Le(o)})),chatCmdIndicationEpic:e=>Cn(e,7960).pipe(Fe(e=>{const{payload:{body:{cmd:t,msgID:r}}}=e,n=[];switch(t){case Mi.Delete:n.push(Wc({msgId:r})),Hs("CHAT_DELETE_MESSAGE_REPONSE",{id:r})}return Le(n)}))});const Hp={chatHistory:[],chatPrivilege:Ni.All,isAllowAttendeeChat:!0},xp=Fr({["".concat(xc)]:ju((e,t)=>{let{payload:r}=t;e.chatHistory.push(r)}),["".concat(Hc)]:ju((e,t)=>{let{payload:r}=t;e.chatPrivilege=r}),["".concat(Gc)]:ju((e,t)=>{let{payload:r}=t;e.isAllowAttendeeChat=r}),["".concat(Bc)]:ju((e,t)=>{let{payload:r}=t;const{destNodeID:n,msgID:o,userId:i}=r,s=[];for(let t=e.chatHistory.length-1;t>=0;t--){const r=e.chatHistory[t];if(!r.id&&r.sender.userId===i&&[Di.All,Di.Panelist,n].includes(r.receiver.userId)&&s.unshift(r),r.id)break}s.length>0&&(s[0].id=o)}),["".concat(Wc)]:ju((e,t)=>{let{payload:r}=t;const{msgId:n}=r,o=e.chatHistory.findIndex(e=>e.id===n);o>=0&&e.chatHistory.splice(o,1)}),["".concat(Fc)]:()=>c({},Hp)},Hp);function Fp(e,t,r){if(null!=r&&r.host)return[Sa(e),...ba(e)].filter(e=>(null==e?void 0:e.userId)!==t).map(e=>({userId:null==e?void 0:e.userId,displayName:null==e?void 0:e.displayName,isHost:null==e?void 0:e.isHost,isCoHost:null==e?void 0:e.bCoHost}));{let n=[Sa(e),...ba(e),...e.participants.attendeesList.filter(e=>!(e.bCoHost||e.isHost||e.bHold))];if(null!=r&&r.includeAttendee){const t=Ea(e).filter(e=>!sa(e.userType));n=[...n,...t]}return n.filter(e=>(null==e?void 0:e.userId)!==t).map(e=>({userId:null==e?void 0:e.userId,displayName:null==e?void 0:e.displayName,isHost:null==e?void 0:e.isHost,isCoHost:null==e?void 0:e.bCoHost}))}}var Gp;const Bp=Ui.createAgent(),Wp=Zu.getInstance(),Kp=e=>{const{text:t,destId:r,sn:n,attendeeId:o}=e;return Ii.beginEncrypt({text:t,type:yi.RWG_CHAT}).then(e=>{Bp.chat(e,r,n,o)})};let qp=(l((Gp=class extends Dp{send(e,t){if(!e)return Promise.reject({type:Ds,reason:"Text is empty"});const{[Sp]:r,[bp]:n}=this,o=r(),i=fa(o),s=function(e,t){if(t===Di.All)return Hi;if(t===Di.Panelist)return xi;if(t===Di.SilentModeUsers)return Fi;{const{meeting:{isWebinar:r},participants:{xmppAttendeeList:n,attendeesList:o}}=e;return r?o.find(e=>e.userId===t)||n.find(e=>e.userId===t):o.find(e=>e.userId===t)}}(o,t),a=((e,t,r)=>{const n=null==t?void 0:t.userId;if(null==e||!e.zoomID||null==t||!t.displayName||n===e.userId)return{type:Ds,reason:"invalid target user"};const{chat:{chatPrivilege:o},meeting:{isWebinar:i}}=r,s=va(r),a=t.isHost||t.bCoHost;if(!s)if(i&&ca(e.userRole)){if(o===Ni.NoAttendee||o===Ni.AllPanelist&&n!==Di.Panelist||o===Ni.All&&n!==Di.All&&n!==Di.Panelist)return{type:"INSUFFICIENT_PRIVILEGES",reason:"Insufficient chat privilege"}}else if(o===Ni.NoAttendee||o===Ni.Host&&!a||n===Di.SilentModeUsers||o===Ni.EveryonePublicly&&n!==Di.All&&!a)return{type:"INSUFFICIENT_PRIVILEGES",reason:"Insufficient chat privilege"};return null})(i,s,o);if(a)return Promise.reject(a);const{meeting:{isWebinar:d,encType:l}}=o,p=l===vi.AES_GCM;let h=Promise.resolve(),_=!1;return t===Di.SilentModeUsers?Bp.chat(po(e),t):d?s.userRole===na.Attendee?8==(8&s.clientCap)?h=Kp({text:e,destId:Di.IndividualCcPanelist,sn:null==i?void 0:i.zoomID,attendeeId:t}):(h=Kp({text:e,destId:Di.Panelist,sn:null==i?void 0:i.zoomID,attendeeId:t}).then(()=>(e=>{const{text:t,jid:r,isGCMEnabled:n}=e;return Ii.beginEncrypt({text:t,type:yi.XMPP_CHAT}).then(e=>{Wp.sendWebinarMsg(e,r,Di.IndividualCcPanelist,n)})})({text:e,jid:s.jid,isGCMEnabled:p})),_=!0):s&&(h=Kp({text:e,destId:s.userId,sn:null==i?void 0:i.zoomID})):h=Kp({text:e,destId:s.userId,sn:null==i?void 0:i.zoomID}),h.then(()=>{const r=(new Date).getTime(),o=performance.now(),a={message:e,sender:{name:null==i?void 0:i.displayName,userId:null==i?void 0:i.userId,avatar:null==i?void 0:i.avatar},receiver:{name:null==s?void 0:s.displayName,userId:null==s?void 0:s.userId},timestamp:r,highResTimeStampForIdentification:o};return n(xc(a)),_?(Hs("CHAT_RECEIVE_MESSAGE_EVENTS",a),a):new Promise((e,r)=>{var n;Gs("CHAT_MESSAGE_RESPONSE").pipe(function(e,t){return void 0===t&&(t=Ie),function(e,t,r){return void 0===r&&(r=Ie),function(n){var o=ht(e),i=o?+e-r.now():Math.abs(e);return n.lift(new Lt(i,o,t,r))}}(e,ce(new Oe),t)}(5e3),(n=e=>o!==e.identification||!([e.receiverId,Di.All,Di.Panelist].includes(t)||e.receiverId===Di.IndividualCcPanelist),function(e){return e.lift(new Ct(n))}),Et(1)).subscribe(t=>{const{msgId:r}=t,n=c({id:r},u(a,["highResTimeStampForIdentification"]));Hs("CHAT_RECEIVE_MESSAGE_EVENTS",n),e(n)},()=>{r({type:"OPERATION_TIMEOUT"})})})})}setPrivilege(e){const t=this[Sp](),{meeting:{isWebinar:r},chat:{chatPrivilege:n}}=t;return n===e?Promise.resolve(""):!r&&!Li.includes(e)||r&&!ji.includes(e)?Promise.reject({type:Ds,reason:"invalid privilege value of parameter"}):(Bp.setChatPriviledge(e),Fs("CHAT_PRIVILEGE_CHANGE",t=>t.chatPrivilege===e))}deleteMessage(e){const t=this[Sp](),{chat:{chatHistory:r},meeting:{meetingOptions:n,userId:o}}=t;if(null!=n&&n.isEnableDeleteChatMsg){const n=va(t),i=r.find(t=>t.id===e);if(i){const{sender:t}=i;if(n)Bp.chatCmdReq(e,Mi.Delete);else{if(t.userId!==o)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"can not delete message"});Bp.chatCmdReq(e,Mi.Delete)}return Fs("CHAT_DELETE_MESSAGE_REPONSE",t=>t.id===e).then(()=>({id:e}))}return Promise.reject({type:Ds,reason:"msgId is wrong"})}return Promise.reject({type:Ns,reason:"can not delete messages"})}lockChat(e){const t=this[Sp](),{meeting:{meetingOptions:r}}=t,n=null!=r&&r.isPrivateChatEnabled?Ni.All:Ni.EveryonePublicly;return this.setPrivilege(e?Ni.NoOne:n)}getPrivilege(){const{chat:{chatPrivilege:e,isAllowAttendeeChat:t}}=this[Sp]();return t?e:Ni.NoAttendee}getReceivers(){const e=this[Sp](),{chat:{chatPrivilege:t,isAllowAttendeeChat:r},meeting:{isWebinar:n}}=e;if(!n&&!r)return[];const o=fa(e);if(o)if(n){if(!ca(o.userRole)){const t=Fp(e,o.userId,{includeAttendee:!0});return[xi,Hi,...t]}if(!r)return[];if(t===Ni.All)return[xi,Hi];if(t===Ni.AllPanelist)return[xi];if(t===Ni.NoOne)return[]}else{const r=va(e);if(t===Ni.All||r){const t=Fp(e,o.userId);return[Hi,...t]}if(t===Ni.Host)return Fp(e,o.userId,{host:!0});if(t===Ni.EveryonePublicly){const t=Fp(e,o.userId,{host:!0});return[Hi,...t]}if(t===Ni.NoOne)return[]}return[]}getHistory(){return this[Sp]().chat.chatHistory.map(e=>u(e,["highResTimeStampForIdentification"]))}isAllowToDeleteMessages(){const e=this[Sp](),{meeting:{meetingOptions:t}}=e;return null==t?void 0:t.isEnableDeleteChatMsg}}).prototype,"send",[Cp],Object.getOwnPropertyDescriptor(Gp.prototype,"send"),Gp.prototype),l(Gp.prototype,"setPrivilege",[Op,Cp],Object.getOwnPropertyDescriptor(Gp.prototype,"setPrivilege"),Gp.prototype),l(Gp.prototype,"deleteMessage",[Cp],Object.getOwnPropertyDescriptor(Gp.prototype,"deleteMessage"),Gp.prototype),l(Gp.prototype,"lockChat",[Op,Cp],Object.getOwnPropertyDescriptor(Gp.prototype,"lockChat"),Gp.prototype),Gp);const zp=An(jp);var Jp=Object.freeze({__proto__:null,receiveCloudRecordIndication:e=>Cn(e,Oi).pipe(tt(e=>{var t,r,n;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.cmrServerStatus)||void 0!==(null===(r=e.payload.body)||void 0===r?void 0:r.disAllowClientStopAutoCmr)||void 0!==(null===(n=e.payload.body)||void 0===n?void 0:n.enableAutomicRecordingCloud)}),Fe(e=>{const{cmrServerStatus:t,disAllowClientStopAutoCmr:r,enableAutomicRecordingCloud:n}=e.payload.body,o=[];return void 0!==t&&(t!==$i.Init&&Hs("CLOUD_RECORDING_STATUS_CHANGE",{cmrServerStatus:t}),o.push(bl(t))),void 0!==r&&o.push(Al(!r)),void 0!==n&&o.push(Cl(n)),Le(o)})),receiveLocalRecordingIndicationEpic:e=>Cn(e,Ci).pipe(tt(e=>{const{payload:{body:{update:t}}}=e;return null==t?void 0:t.some(e=>void 0!==e.bLocalRecordStatus)}),kt(e=>{const{payload:{body:{update:t}}}=e;t.filter(e=>void 0!==e.bLocalRecordStatus).forEach(e=>{Hs("LOCAL_RECORDING_CHANGE",{userId:e.id,bLocalRecord:1===e.bLocalRecordStatus})})}),At(ee))});const Yp={cmrStatus:$i.Stop,recordingEnable:!1,allowStopAutoRecording:!1,automaticCloudRecordingEnable:!1},Xp=Fr({["".concat(bl)]:ju((e,t)=>{let{payload:r}=t;e.cmrStatus=r}),["".concat(Il)]:ju((e,t)=>{let{payload:r}=t;e.recordingEnable=r}),["".concat(Al)]:ju((e,t)=>{let{payload:r}=t;e.allowStopAutoRecording=r}),["".concat(Cl)]:ju((e,t)=>{let{payload:r}=t;e.automaticCloudRecordingEnable=r})},Yp);var Qp,Zp,$p,eh;const th=Ui.createAgent();let rh=(Qp=Rp("recording"),Zp=Rp("recording"),$p=Rp("recording"),l((eh=class extends Dp{startRecording(){const e=this[Sp](),{meeting:{bIbDisableRecording:t,recordingEnable:r},recording:{cmrStatus:n}}=e;return t?Promise.reject({type:Ns,reason:"Rejected by Information Barrier"}):r?n===$i.Start?Promise.resolve(""):(th.recordMeeting(!0,!1),Fs("CLOUD_RECORDING_STATUS_CHANGE",e=>e.cmrServerStatus===$i.Start)):Promise.reject({type:Ns,reason:"The account of the meeting disabled the cloud recording"})}pauseRecording(){const e=this[Sp](),{recording:{cmrStatus:t}}=e;return t===$i.Pause?Promise.resolve(""):t!==$i.Start?Promise.reject({type:Ns,reason:"Recording is not started"}):(th.recordMeeting(!1,!0),Fs("CLOUD_RECORDING_STATUS_CHANGE",e=>e.cmrServerStatus===$i.Pause))}stopRecording(){const e=this[Sp](),{recording:{cmrStatus:t}}=e;return t===$i.Stop?Promise.resolve(""):(th.recordMeeting(!1,!1),Fs("CLOUD_RECORDING_STATUS_CHANGE",e=>e.cmrServerStatus===$i.Stop))}getRecordingStatus(){const e=this[Sp](),{recording:{cmrStatus:t}}=e;return t===$i.Start?Zi.Recording:t===$i.Pause?Zi.Paused:Zi.Stopped}isRecordingEnabled(){const e=this[Sp](),{recording:{recordingEnable:t}}=e;return t}isAllowedToStopAutoRecording(){const e=this[Sp](),{recording:{allowStopAutoRecording:t}}=e;return t}isAutomaticCloudRecordingEnabled(){const e=this[Sp](),{recording:{automaticCloudRecordingEnable:t}}=e;return t}}).prototype,"startRecording",[Op,Cp,Qp],Object.getOwnPropertyDescriptor(eh.prototype,"startRecording"),eh.prototype),l(eh.prototype,"pauseRecording",[Op,Cp,Zp],Object.getOwnPropertyDescriptor(eh.prototype,"pauseRecording"),eh.prototype),l(eh.prototype,"stopRecording",[Op,Cp,$p],Object.getOwnPropertyDescriptor(eh.prototype,"stopRecording"),eh.prototype),eh);const nh=An(Jp);let oh,ih;!function(e){e[e.All=1]="All",e[e.Private=2]="Private"}(oh||(oh={})),(ih||(ih={})).SUCCESS="success";const{updateCmdJid:sh,removeCmdJid:ah,resetCmdChannel:ch}=Ur("UPDATE_CMD_JID","REMOVE_CMD_JID","RESET_CMD_CHANNEL");var dh=Object.freeze({__proto__:null,receiveCmdChannelResponseXMPPEpic:(e,t)=>Tn(e,24577).pipe(Ht(t),kt(e=>{let[t]=e;const{payload:{body:{status:r}}}=t;r===ih.SUCCESS&&Hs("COMMAND_STATUS_EVENTS",ti.Connected)}),At(ee)),receiveCmdChannelMessageFromXMPPEpic:(e,t)=>Tn(e,24583).pipe(Ht(t),kt(e=>{let[t,r]=e;const{meeting:{userId:n,encType:o},cmd:{jids:i}}=r,{payload:{body:{senderName:s,senderJid:a,text:c,type:d,receiver:u,msgid:l,sn:p}}}=t,h=vo(i,u),_=o===vi.AES_GCM,f=vo(i,a),v=(new Date).getTime();let y=Promise.resolve({message:c});return _&&(y=Ii.beginDecrypt({decryptedText:c,type:yi.XMPP_CHAT,zoomId:p})),y.then(e=>{let{message:t}=e;(d===oh.Private&&parseInt(h,10)===n||d===oh.All)&&Hs("COMMAND_RECEIVE_MESSAGE_EVENTS",{senderId:f,senderName:s,text:ho(t),timestamp:v,msgid:l})})}),At(ee)),receiveUserJidUpdateFromXMPPEpic:e=>Tn(e,24595).pipe(Te(e=>{const{payload:{body:{action:t,data:r}}}=e;return["list","UPDATE","add"].includes(t)&&r?sh(r):"memberremove"===t&&r?ah(r):{type:""}}))});const uh={jids:{}},lh=Fr({["".concat(ch)]:()=>c({},uh),["".concat(sh)]:ju((e,t)=>{let{payload:r}=t;r.map(t=>{const{jid:r,node:n}=t;e.jids[n]=r})}),["".concat(ah)]:ju((e,t)=>{let{payload:r}=t;r.map(t=>{const{jid:r}=t,n=vo(e.jids,r);delete e.jids[n]})})},uh);var ph;let hh=!0;const _h=Gi.getInstance(),fh=(e,t,r)=>{const n=t,o=po(e);return hh=!1,setTimeout(()=>{hh=!0},50),r?Ii.beginEncrypt({text:o,type:yi.XMPP_CHAT}).then(e=>{_h.sendCommandMsg(e,n,!0)}):_h.sendCommandMsg(o,n,!1)};let vh=(l((ph=class extends Dp{send(e,t){if(!e)return Promise.reject({type:Ds,reason:"Text is empty"});if("string"!=typeof e)return Promise.reject({type:Ds,reason:"only support send string"});if(e.length>512)return Promise.reject({type:Ds,reason:"Text too long > 512"});if(!hh)return Promise.reject({type:"OPERATION_LOCKED",reason:"You reach rate limit, only can send once peer ".concat(50,"ms")});const{[Sp]:r}=this,n=r(),{socket:{cmdChannelSocketStatus:o},meeting:{userId:i,encType:s},cmd:{jids:a}}=n,c=s===vi.AES_GCM;return o!==Ia.Connected?Promise.reject({type:"IMPROPER_MEETING_STATE",reason:"cmd channel not ready"}):t?t in a?(fh(e,a[t],c),Promise.resolve({timestamp:(new Date).getTime(),text:e,receiverId:t,senderId:i})):Promise.reject({type:Ns,reason:"can't find userId ".concat(t)}):(fh(e,"",c),Promise.resolve({timestamp:(new Date).getTime(),text:e,receiverId:"",senderId:i}))}getJids(){const{[Sp]:e}=this,t=e(),{cmd:{jids:r}}=t;return r}}).prototype,"send",[Cp],Object.getOwnPropertyDescriptor(ph.prototype,"send"),ph.prototype),ph);const yh=An(dh),Eh=(e,t,r)=>{const{store:{getState:n,dispatch:o},mediaAgent:i}=e,s=n(),{meeting:{bIbDisableShare:a},share:{sharePrivilege:d,ssrc:u,isChromeExtensionInstalled:l,isVerifiedCaptureCanvasAfterFailover:p,isReceiveSharingFromMainSession:h},media:{sharingEncodeStatus:_},breakoutRoom:f}=s;if(a)return Promise.reject({type:Ns,reason:"information barrier"});if(h)return Promise.resolve({type:Ns,reason:"Unable to share your screen while someone is sharing from the main session"});if("function"==typeof window.MediaStreamTrackProcessor&&!(t instanceof HTMLVideoElement))return Promise.reject({type:Ds,reason:"Use Video element instead of Canvas element when WebCodecs enabled"});const v=va(s);if(null!=r&&r.broadcastToBreakoutRoom){if(!v||(null==f?void 0:f.currentRoom.status)===pa.InRoom)return v?Promise.reject({type:Ns,reason:"Unable to share screen to breakout room when in the room"}):Promise.reject({type:"INSUFFICIENT_PRIVILEGES"});o(ac(!0))}else o(ac(!1));const y=jd(s);if(d===us.OnlyHost&&!v)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"only host can start screen share"});if(d===us.HostGrab&&!v&&y.length>0)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"only host can grab screen share"});const E=fa(s);if(!0===(null==E?void 0:E.sharerOn))return Promise.reject({type:Ns,reason:"you have already started screen share."});let g=ae(!0);return(()=>{const{userAgent:e}=navigator;return!/opera|opr\/[\d]+/i.test(navigator.userAgent)&&!/edge\/(\d+)/i.test(navigator.userAgent)&&/chrome/i.test(e)&&/webkit/i.test(e)})()&&void 0===navigator.mediaDevices.getDisplayMedia&&!l&&(i.checkChromeSharingExtension(),g=Gs("SHARE_CHECK_CHROME_SHARING_EXTENSION",1)),t.id||(t.id="__ZOOM_SDK_SHARE_CANVAS_@__".replace("@","".concat(Math.floor(1e4*Math.random())))),ze([Hd("sharing",_,"success"),g]).subscribe(e=>{let[r,n]=e;const[s]=r;if(s&&n){!1===p&&(Gd(t),o(oc(!0)));let e=document.querySelector("#".concat("__ZOOM_SDK_SHARING_VIDEO__"));e&&"VIDEO"===e.tagName||(e=document.createElement("video"),e.id="__ZOOM_SDK_SHARING_VIDEO__",e.style.display="none",document.body.appendChild(e)),i.startDesktopSharing(u,t.id,"__ZOOM_SDK_SHARING_VIDEO__")}}),new Promise((e,t)=>{it(Gs("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",1),Gs("SHARE_CHECK_CHROME_SHARING_EXTENSION").pipe(tt(e=>!e),Et(1),At(ce({reason:"required extension",extensionUrl:"https://chrome.google.com/webstore/detail/zoom-scheduler/kgjfgplpablkjnlkjmjdecgdpfankdle"}))),Gs("SHARE_START_DESKTOP_SHARE_FAILED",1).pipe(Fe(e=>ce({reason:e.reason||"user deny screen share"})))).subscribe(r=>{!0===r.sharerOn?e(""):t({type:"INTERNAL_ERROR"})},e=>{t(c({type:Ns},e))})})},gh=ea([ma],e=>e.filter(e=>e.bVideoOn)),mh=()=>"function"==typeof window.OffscreenCanvas&&("function"==typeof window.ImageCapture||"function"==typeof window.MediaStreamTrackProcessor)&&function(){try{return"undefined"!=typeof MessageChannel&&(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(ds)}catch(e){return!1}}();var Sh,bh,Ih,Ah,Ch,Oh,Th,Rh,wh,Nh,Dh,Mh,Ph,kh,Uh,Vh,Lh,jh,Hh,xh,Fh,Gh,Bh,Wh,Kh,qh,zh,Jh,Yh;let Xh=(Sh=Rp("audio"),bh=Rp("audio"),Ih=Rp("audio"),Ah=Rp("audio"),Ch=Rp("audio"),Oh=Rp("audio"),Th=Rp("audio"),Rh=Rp("audio"),wh=Rp("audio"),Nh=Rp("video"),Dh=Rp("video"),Mh=Rp("video"),Ph=Rp("video"),kh=Rp("video"),Uh=Rp("video"),Vh=Rp("video"),Lh=Rp("video"),jh=Rp("video"),Hh=Rp("video"),xh=Rp("share"),Fh=Rp("share"),Gh=Rp("share"),Bh=Rp("share"),Wh=Rp("share"),Kh=Rp("share"),qh=Rp("share"),zh=Rp("share"),Qh="isShareOptionLocked",Jh=function(e,t,r){const n=r.value;r.value=function(){const e=this[mp];if(e){const{meeting:{meetingOptions:t}}=e.getState();if(!0===t[Qh])return Promise.reject({type:"OPERATION_LOCKED",reason:"".concat(Qh," is locked")})}for(var t=arguments.length,r=new Array(t),o=0;o{const{store:{getState:r,dispatch:n},rwgAgent:o}=e,i=r(),{speakerOnly:s}=t||{},a=fa(i);if("computer"===(null==a?void 0:a.audio))return Promise.resolve();if("phone"===(null==a?void 0:a.audio))return Promise.reject({type:Ns,reason:"joined by phone"});{const{audio:{isAllowToTalk:e,isComputerAudioLoading:t,canPlayAudio:r},media:{audioDecodeStatus:c,audioEncodeStatus:d}}=i;if(t)return Promise.reject({type:Ns,reason:"Computer audio has been loading, please wait."});if(s&&n(Ba(s)),!a)return Promise.reject({type:Ns,reason:"Please call `startAudio` method after the `join` has been resolved"});{n(Ga(!0));const{userRole:t}=a,i=ca(t);Hd("audio",i&&!e||s?"success":d,c).subscribe(t=>{let[s,a]=t;if(s&&a){let t=r?Promise.resolve():function(){const e=document.createElement("audio");return e.muted=!1,e.volume=.1,e.src=URL.createObjectURL(cs),e.play()}();void 0===t&&(t=Promise.resolve()),t.then(()=>{o.joinOrLeaveVoip(!0),i&&e&&n(Wa(!0))}).catch(()=>{n(xa(!1))})}})}return"failed"===d||"failed"===c?(n(Ga(!1)),Promise.reject({type:"INTERNAL_ERROR",reason:"audio encode or decode error"})):new Promise((e,t)=>{it(Gs(Os.JoinComputerAudio.success,1),$e(...Os.JoinComputerAudio.fail.map(e=>Gs(e,1).pipe(Fe(()=>ce({type:"INSUFFICIENT_PRIVILEGES",reason:e}))))),ct(3e4).pipe(Fe(()=>ce({type:"OPERATION_TIMEOUT"})))).subscribe(()=>{n(Ga(!1)),e("")},e=>{o.joinOrLeaveVoip(!1),n(Ga(!1)),t(e)})})}})(this[Ap],e)}stopAudio(){return(e=>{const{store:{getState:t,dispatch:r},mediaAgent:n,rwgAgent:o}=e,i=t(),{audio:{isComputerAudioLoading:s}}=i,a=fa(i);return s?Promise.reject({type:Ns,reason:"Computer audio has not finished joining, please wait."}):"computer"===(null==a?void 0:a.audio)?(n.leaveComputerAudio(),o.joinOrLeaveVoip(!1),r(Ua(0)),Fs("AUDIO_CURRENT_USER_LEAVE_AUDIO")):Promise.resolve("")})(this[Ap])}muteAudio(e){return((e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),a=fa(s);if(null==t||t===(null==a?void 0:a.userId))return""===(null==a?void 0:a.audio)||null===(null==a?void 0:a.audio)?Promise.reject({type:Ns,reason:"no audio joined"}):!0===(null==a?void 0:a.muted)?Promise.resolve(""):(n(Na(!0)),o.mute(a.userId,!0),Fs("AUDIO_CURRENT_USER_MUTED").then(()=>(i.muteAudio(),"")));if(va(s)){const{participants:{allowTalkAttendeesList:e,attendeesList:r}}=s,n=e.concat(r).find(e=>e.userId===t);return n?""===n.audio||null===n?Promise.reject({type:Ns,reason:"no audio joined"}):!1===n.muted?(o.mute(t,!0),Fs("AUDIO_PARTICIPANT_AUDIO_UPDATE",e=>e.id===t&&1==e.muted)):Promise.resolve(""):Promise.reject({type:Ds,reason:"no matching user"})}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})})(this[Ap],e)}unmuteAudio(e){return(async(e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),a=fa(s);if(void 0===t||t===(null==a?void 0:a.userId)){if(""===(null==a?void 0:a.audio)||null===(null==a?void 0:a.audio))return Promise.reject({type:Ns,reason:"no audio joined"});if(!1===(null==a?void 0:a.muted))return Promise.resolve("");if(n(Na(!0)),s.audio.bCanUnmute||null!=a&&a.isHost||null!=a&&a.bCoHost){if(ca(a.userRole)){const{audio:{audioSsrc:e,isAllowToTalk:t,isAllowToTalkAttendeeConnected:r,activeMicrophone:o,activeSpeaker:a}}=s;t?r||(await i.leaveComputerAudio(),await i.joinComputerAudio(e,o,a,!0),n(Wa(!0))):Promise.reject({type:Ns,reason:"Webinar attendee cannot unmute self audio."})}return o.mute(a.userId,!1),Fs("AUDIO_CURRENT_USER_UNMUTED").then(()=>(i.unmuteAudio(),""))}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"host not allow unmute themselves"})}if(va(s)){const{participants:{allowTalkAttendeesList:e,attendeesList:r}}=s,n=e.concat(r).find(e=>e.userId===t);return n?""===n.audio||null===n?Promise.reject({type:Ns,reason:"no audio joined"}):(!0===n.muted&&o.mute(t,!1),Promise.resolve("")):Promise.reject({type:Ds,reason:"no matching user"})}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})})(this[Ap],e)}dialOut(e,t,r,n){return((e,t,r,n,o)=>{const{store:{getState:i,dispatch:s},rwgAgent:a}=e,c=i(),{meeting:{callOutCountry:d,isSupportCallOut:u}}=c;if(u&&Array.isArray(d)&&d.findIndex(e=>e.code===t)>-1){const{seq:e}=a.audioDialout(t+r,n,!(null==o||!o.callMe),!(null==o||!o.pressingOne),!(null==o||!o.greeting));return s(Oa(e)),xs(Os.JoinAudioByCallMe)}return Promise.reject({type:Ds,reason:"no matching country code"})})(this[Ap],e,t,r,n)}cancelDialOut(e,t,r){return((e,t,r,n)=>{const{rwgAgent:o}=e;return o.audioCancelDialout(t+r,!(null==n||!n.callMe)),xs(Os.cancelDialOut)})(this[Ap],e,t,r)}hangup(){return(e=>{const{store:{getState:t},rwgAgent:r}=e,n=t(),o=fa(n);return"phone"===(null==o?void 0:o.audio)&&null!==o.userId?(r.audioDrop(o.userId),xs(Os.hangup)):Promise.reject({type:Ns,reason:"not joined audio by phone"})})(this[Ap])}switchMicrophone(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,{audio:{microphoneDevicesList:i,activeMicrophone:s}}=r();return"default"!==t&&-1==i.findIndex(e=>e.deviceId===t)?Promise.reject({type:"INVALID_DEVICE_ID"}):(t!==s&&(o.changeMicrophone(t),n(ja(t))),Promise.resolve(""))})(this[Ap],e)}switchSpeaker(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,{audio:{speakerDevicesList:i,activeSpeaker:s}}=r();return"default"!==t&&-1==i.findIndex(e=>e.deviceId===t)?Promise.reject({type:"INVALID_DEVICE_ID"}):(t!==s&&(o.changeSpeaker(t),n(Ha(t))),Promise.resolve(""))})(this[Ap],e)}getMicList(){return(e=>{let{store:{getState:t}}=e;const r=t();return r.audio?[...r.audio.microphoneDevicesList]:[]})(this[Ap])}getSpeakerList(){return(e=>{let{store:{getState:t}}=e;const r=t();return r.audio?[...r.audio.speakerDevicesList]:[]})(this[Ap])}isAudioMuted(e){return((e,t)=>{let{store:{getState:r}}=e;const n=r(),{meeting:{isWebinar:o}}=n;let i=null;return void 0===t?i=fa(n):(i=n.participants.attendeesList.find(e=>e.userId===t),o&&!i&&(i=n.participants.xmppAttendeeList.find(e=>e.userId===t))),!!i&&!!i.muted})(this[Ap],e)}getActiveMicrophone(){return(e=>{let{store:{getState:t}}=e;const r=t();return r.audio?r.audio.activeMicrophone:null})(this[Ap])}getActiveSpeaker(){return(e=>{let{store:{getState:t}}=e;const r=t();return r.audio?r.audio.activeSpeaker:null})(this[Ap])}isSupportCallOut(){return(e=>{let{store:{getState:t}}=e;const{meeting:{isSupportCallOut:r,callOutCountry:n}}=t();return r&&Array.isArray(n)&&(null==n?void 0:n.length)>0})(this[Ap])}getDialOutStatus(){return(e=>{let{store:{getState:t}}=e;const{audio:r}=t();return null==r?void 0:r.dialout.returnCode})(this[Ap])}getDialOutCountries(){return(e=>{let{store:{getState:t}}=e;const{meeting:{callOutCountry:r}}=t();return Array.isArray(r)?r:[]})(this[Ap])}startVideo(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,i=r(),{media:{videoDecodeStatus:s,videoEncodeStatus:a},video:{videoSsrc:c,activeCamera:d,isCaptureCameraLoading:u,isCurrentUserStartedVideo:l,isVideoMuted:p,isSupportHDVideo:h}}=i;return l?Promise.reject({type:Ns,reason:"Video is started"}):u?Promise.reject({type:Ns,reason:"Camera is starting,please wait."}):p&&!va(i)?Promise.reject({type:Ns,reason:"Video is muted by the host"}):(mh()||"function"!=typeof window.OffscreenCanvas)&&!/android/i.test(navigator.userAgent)||null!=t&&t.videoElement?(n(gc(!0)),Hd("video",a,s).subscribe(e=>{let[r]=e;if(r){const{cameraId:e=d,captureWidth:r=0,captureHeight:i=0,videoElement:s,mirrored:a,hd:u}=t||{};a&&o.mirrorVideo(a);let l=void 0;s&&(s.id?l=s.id:(l="__ZOOM_SDK_SELF_VIDEO_@__".replace("@","".concat(Math.floor(1e4*Math.random()))),s.id=l)),u&&(console.log("HD support is still in its Alpha stage, and comes with a number of restrictions and limitations. Please visit https://marketplace.zoom.us/docs/sdk/overview/720p for more details"),h&&Wi.isCompatibleHardwareForEncode()?Wi.isSupportVideoEncodeHardwareAcceleration().then(e=>{e?o.enableHardwareAccelerationForVideoEncode(!0):console.warn("Cannot capture HD video due to hardware limitation")}):console.warn("Cannot capture HD video due to either account restriction and/or hardware limitation")),o.startCaptureVideo(c,e,r,i,l),d!==e&&n(pc(e))}else n(gc(!1))}),xs(bs).then(()=>{n(mc(!1)),n(fc(!1))}).finally(()=>{n(gc(!1))})):Promise.reject({type:Ds,reason:"You must pass a